Skip to main content
POST
/
tx
/
withdraw-spl-tokens
Withdraw Spl Tokens
curl --request POST \
  --url https://privacy.magicblock.app/tx/withdraw-spl-tokens \
  --header 'Content-Type: application/json' \
  --data '
{
  "owner": "<string>",
  "mint": "<string>",
  "vault_source": "<string>",
  "user_dest": "<string>",
  "amount": 1,
  "ephemeral_ata": "<string>",
  "vault": "<string>",
  "vault_bump": 127,
  "cluster_url": "<string>"
}
'
{
  "transaction": "<string>",
  "message": "Transaction created successfully"
}

Body

application/json

Withdraw SPL tokens from an ephemeral ATA.

owner
string
required

Owner of ephemeral ATA (signer)

mint
string
required

SPL token mint

vault_source
string
required

Vault's source token account

user_dest
string
required

User's destination token account

amount
integer
required

Amount of tokens to withdraw

Required range: x >= 0
ephemeral_ata
string
required

Ephemeral ATA PDA

vault
string
required

Global vault PDA

vault_bump
integer
required

Global vault bump

Required range: 0 <= x <= 255
cluster_url
string | null

Solana cluster URL override

Response

Response containing a serialized transaction.

transaction
string
required

Base64-encoded serialized transaction

message
string
default:Transaction created successfully