Skip to main content
POST
/
tx
/
deposit-spl-tokens
Deposit Spl Tokens
curl --request POST \
  --url https://privacy.magicblock.app/tx/deposit-spl-tokens \
  --header 'Content-Type: application/json' \
  --data '
{
  "authority": "<string>",
  "user": "<string>",
  "mint": "<string>",
  "source_token": "<string>",
  "vault_token": "<string>",
  "amount": 1,
  "ephemeral_ata": "<string>",
  "vault": "<string>",
  "cluster_url": "<string>"
}
'
{
  "transaction": "<string>",
  "message": "Transaction created successfully"
}

Body

application/json

Deposit SPL tokens into an ephemeral ATA.

authority
string
required

Authority over source token account (signer)

user
string
required

Owner of the ephemeral ATA

mint
string
required

SPL token mint

source_token
string
required

User's source token account

vault_token
string
required

Vault's token account

amount
integer
required

Amount of tokens to deposit

Required range: x >= 0
ephemeral_ata
string
required

Ephemeral ATA PDA

vault
string
required

Global vault PDA

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