cURL Examples

cURL Collection

Email OTP

curl -X POST https://<BASE_URL>/send_verification -H 'Content-Type: application/json' \
  -d '{"email":"[email protected]"}'

curl -X POST https://<BASE_URL>/login -H 'Content-Type: application/json' \
  -d '{"type":"Email","data":{"email":"[email protected]","code":"123456"}}' -c cookies.txt

Get Session

curl https://<BASE_URL>/session -b cookies.txt

Sign Message

curl -X POST https://<BASE_URL>/sign -H 'Content-Type: application/json' -b cookies.txt \
  -d '{"address":"...","userId":"...","message":"Hello","network":"Solana","requestId":"req-1"}'

Cross-Chain Address

curl "https://<BASE_URL>/address?address=0xabc...&network=Ethereum&target_network=Solana"

Coinbase On-ramp

curl -X POST https://<BASE_URL>/ramp/coinbase -H 'Content-Type: application/json' \
  -d '{"addresses":[{"address":"0x...","blockchains":["Solana","base"]}],"assets":["ETH","USDC"]}'

Export Keys

curl -X POST https://<BASE_URL>/export/init -H 'Content-Type: application/json' -b cookies.txt \
  -d '{"user_nonce":"1234567890abcdef1234567890abcdef"}'

curl -X POST https://<BASE_URL>/export/final -H 'Content-Type: application/json' -b cookies.txt \
  -d '{"user_nonce":"...","server_nonce":"...","is_export":true}'

Close Account

curl -X POST https://<BASE_URL>/close/init -H 'Content-Type: application/json' -b cookies.txt \
  -d '{"user_nonce":"1234567890abcdef1234567890abcdef"}'

curl -X POST https://<BASE_URL>/close/final -H 'Content-Type: application/json' -b cookies.txt \
  -d '{"user_nonce":"...","server_nonce":"..."}'

Last updated