SOL Transfer
Transfer SOL to another address. Endpoint:/svm/transfer/transaction
| Parameter | Type | Required | Description |
|---|---|---|---|
chain | string | Yes | Always sol |
recipient | string | Yes | Recipient public key |
amount | string | Yes | Amount in lamports |
wallet | string | Yes | Sender public key |
sendRoute | string | No | Public, PublicWithNonce, Antimev, or AntimevWithNonce |
prioFees | string | No | Priority fees (see below) |
bribeFees | string | Based on sendRoute | bribe fees (see below) |
nonceAccount | string | Based on sendRoute | Nonce account for transaction exclusivity |
transactionVersion | string | No | Transaction message format: v0 or v1 (default: v0) |
- Socket.IO
- HTTP
socket.emit(
"/svm/transfer/transaction",
{
chain: "sol",
wallet: "YourSolanaWalletPublicKey",
recipient: "RecipientPublicKey",
amount: "100000000", // 0.1 SOL in lamports
prioFees: "100000",
},
(response) => {
console.log(response);
}
);
await fetch("https://api.chainworks.co/svm/transfer/transaction", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: CHAINWORKS_API_AUTH_TOKEN,
},
body: JSON.stringify({
chain: "sol",
wallet: "YourSolanaWalletPublicKey",
recipient: "RecipientPublicKey",
amount: "100000000", // 0.1 SOL in lamports
prioFees: "100000",
}),
});
{
"success": true,
"result": {
"instructions": [
{
"data": {
"encoded": "AgAAAADh9QUAAAAA",
"encoding": "base64"
},
"keys": [
{
"isSigner": true,
"isWritable": true,
"address": "YourSolanaWalletPublicKey"
},
{
"isSigner": false,
"isWritable": true,
"address": "RecipientPublicKey"
}
],
"programAddress": "11111111111111111111111111111111"
}
],
"transactions": [
{
"routes": [
{
"id": "Public",
"name": "Public",
"isPrivate": false,
"hasRevertProtection": false
}
],
"expectedSigners": ["YourSolanaWalletPublicKey"],
"rawTransactionMessage": {
"encoded": "gAEAAgQN1e8xet/Iym45ebDddH1pVjSfF1C7OiY+qZ1S7f5fFsFPDdgzjeTNFWPvA3KD5jgCXSQFsTHlpFKmlgKFOxGlAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkZv5SEXMv/srbpyw5vnvIzlu8X3EmssQ5s6QAAAAMxJDpKM0uOHO7ND/JXaMxecpg9Nv0bCw26RKZ1V1Oa5AwMABQLCAQAAAwAJA47XPg0AAAAAAgIAAQwCAAAAAOH1BQAAAAAA",
"encoding": "base64"
},
"meta": {
"version": 0,
"cuLimit": "0x1c2",
"cuPrice": "0xd3ed78e",
"prioFees": "0x186a0",
"blockhash": "EkSnNWid2cvwEVnVx9aBqawnmiCNiDgp3gUdkDPTKN1N"
}
}
],
"recentBlockhash": "EkSnNWid2cvwEVnVx9aBqawnmiCNiDgp3gUdkDPTKN1N"
}
}
Token Transfer
Transfer SPL tokens. Endpoint:/svm/transfer/token/transaction
| Parameter | Type | Required | Description |
|---|---|---|---|
chain | string | Yes | Always sol |
token | string | Yes | Token mint address |
recipient | string | Yes | Recipient public key |
amount | string | Yes | Amount in token decimals |
wallet | string | Yes | Sender public key |
ensureRecipientAssociatedTokenAccount | boolean | No | Create the recipient’s associated token account if missing (default: false) |
sendRoute | string | No | Public, PublicWithNonce, Antimev, or AntimevWithNonce |
prioFees | string | No | Priority fees (see below) |
bribeFees | string | Based on sendRoute | bribe fees (see below) |
nonceAccount | string | Based on sendRoute | Nonce account for transaction exclusivity |
transactionVersion | string | No | Transaction message format: v0 or v1 (default: v0) |
- Socket.IO
- HTTP
socket.emit(
"/svm/transfer/token/transaction",
{
chain: "sol",
wallet: "YourSolanaWalletPublicKey",
token: "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263", // BONK
recipient: "RecipientPublicKey",
amount: "100000000000", // 1,000,000 BONK
ensureRecipientAssociatedTokenAccount: true,
},
(response) => {
console.log(response);
}
);
await fetch("https://api.chainworks.co/svm/transfer/token/transaction", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: CHAINWORKS_API_AUTH_TOKEN,
},
body: JSON.stringify({
chain: "sol",
wallet: "YourSolanaWalletPublicKey",
token: "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263", // BONK
recipient: "RecipientPublicKey",
amount: "100000000000", // 1,000,000 BONK
ensureRecipientAssociatedTokenAccount: true,
}),
});
Multi-Transfer
Send SOL to multiple recipients in one transaction. Endpoint:/svm/transfer/multi/transaction
- Socket.IO
- HTTP
socket.emit(
"/svm/transfer/multi/transaction",
{
chain: "sol",
wallet: "YourSolanaWalletPublicKey",
recipients: [
{ wallet: "Recipient1PublicKey", amount: "100000000" },
{ wallet: "Recipient2PublicKey", amount: "200000000" },
],
},
(response) => {
console.log(response);
}
);
await fetch("https://api.chainworks.co/svm/transfer/multi/transaction", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: CHAINWORKS_API_AUTH_TOKEN,
},
body: JSON.stringify({
chain: "sol",
wallet: "YourSolanaWalletPublicKey",
recipients: [
{ wallet: "Recipient1PublicKey", amount: "100000000" },
{ wallet: "Recipient2PublicKey", amount: "200000000" },
],
}),
});
Multi-Token Transfer
Send an SPL token to multiple recipients in one transaction. Endpoint:/svm/transfer/multi/token/transaction
| Parameter | Type | Required | Description |
|---|---|---|---|
chain | string | Yes | Always sol |
wallet | string | Yes | Sender public key |
token | string | Yes | Token mint address to transfer |
recipients | object[] | Yes | Recipients to send to (see below) |
defaultEnsureRecipientAssociatedTokenAccount | boolean | No | Default for creating a recipient’s associated token account when missing (default: false). Creating an account may incur ~0.002 SOL rent |
sendRoute | string | No | Public, PublicWithNonce, Antimev, or AntimevWithNonce |
prioFees | string | No | Priority fees in lamports |
bribeFees | string | Based on sendRoute | Bribe fees in lamports |
nonceAccount | string | Based on sendRoute | Nonce account for transaction exclusivity |
transactionVersion | string | No | Transaction message format: v0 or v1 (default: v0) |
recipients:
| Field | Type | Required | Description |
|---|---|---|---|
wallet | string | Conditional | Recipient wallet address. Required unless associatedTokenAccount is given |
associatedTokenAccount | string | Conditional | Recipient associated token account. Defaults to the wallet’s default account; required if wallet is omitted |
amount | string | Yes | Amount in raw token units (min 1) |
ensureAssociatedTokenAccount | boolean | No | Create the recipient account if missing. Defaults to defaultEnsureRecipientAssociatedTokenAccount |
- Socket.IO
- HTTP
socket.emit(
"/svm/transfer/multi/token/transaction",
{
chain: "sol",
wallet: "YourSolanaWalletPublicKey",
token: "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263", // BONK
recipients: [
{ wallet: "Recipient1PublicKey", amount: "100000000" },
{ wallet: "Recipient2PublicKey", amount: "200000000" },
],
},
(response) => {
console.log(response);
}
);
await fetch("https://api.chainworks.co/svm/transfer/multi/token/transaction", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: CHAINWORKS_API_AUTH_TOKEN,
},
body: JSON.stringify({
chain: "sol",
wallet: "YourSolanaWalletPublicKey",
token: "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263", // BONK
recipients: [
{ wallet: "Recipient1PublicKey", amount: "100000000" },
{ wallet: "Recipient2PublicKey", amount: "200000000" },
],
}),
});

