Token Operations
resource: token — SPL Token balances, Associated Token Accounts, and transfers
SPL Token background: On Solana, holding a token requires an Associated
Token Account (ATA) — a deterministic per-(owner, mint) account, distinct from the owner's
main wallet account.
createAta creates that account; balance reads it;
transfer moves tokens between two existing ATAs.
balance
Returns an owner's balance of one SPL token mint. No credential required.
| Field | Type | Required | Description |
|---|---|---|---|
owner | text | ✓ Yes | Base58 address of the token holder's main wallet. |
mint | text | ✓ Yes | Base58 address of the SPL token mint. |
cluster | select | No | See Clusters. |
Example response:
{
"amount": 150000,
"decimals": 6,
"uiAmount": 0.15
}
amount is the raw base-unit integer; uiAmount is already divided by 10^decimals for display.
createAta (signing operation)
Creates the Associated Token Account for (owner, mint) if it doesn't already exist. Idempotent.
| Field | Type | Required | Description |
|---|---|---|---|
owner | text | ✓ Yes | Base58 address the ATA will belong to. |
mint | text | ✓ Yes | Base58 address of the SPL token mint. |
cluster | select | No | See Clusters. |
credentialID | vault reference | ✓ Yes | CRYPTO_WALLET credential; pays the account-creation rent and signs the create instruction. |
Example response:
{
"ataAddress": "Ata1...xyz",
"alreadyExisted": false,
"signature": "4mK2...abc"
}
Idempotent: If the ATA already exists, the node returns success with
alreadyExisted: true and an empty signature rather than erroring — safe to
call unconditionally before a transfer.
transfer (signing operation)
Transfers SPL tokens from the credentialed wallet's ATA to a destination owner's ATA for the same mint.
Destination ATA must already exist: This operation does not create the destination
account. Call
createAta for the destination owner first if you don't already know it
holds an ATA for this mint.
| Field | Type | Required | Description |
|---|---|---|---|
mint | text | ✓ Yes | Base58 address of the SPL token mint. |
destinationOwner | text | ✓ Yes | Base58 address of the receiving wallet (not its ATA — the node resolves the ATA itself). |
amount | text (integer) | ✓ Yes, > 0 | Raw base-unit amount to transfer (not uiAmount — multiply by 10^decimals first). |
cluster | select | No | See Clusters. |
credentialID | vault reference | ✓ Yes | CRYPTO_WALLET credential for the sending wallet. |
Example response:
{
"signature": "2pQ8...def",
"sourceAta": "Ata2...uvw",
"destinationAta": "Ata3...rst",
"amount": 150000
}
Validation: Missing
mint → VAL_MISSING_MINT. Missing destinationOwner → VAL_MISSING_DESTINATION_OWNER. Zero/missing amount → VAL_MISSING_AMOUNT.