Solana Transactions
Components for building, signing, and broadcasting Solana transactions, including SOL/SPL transfers and durable nonce account setup.
White Rabbit runs on shared infrastructure with a shared outbound IP pool. Public RPC URLs enforce rate limits per IP — under load this can cause errors across all workspaces sharing that IP. Use a private endpoint (Helius, Alchemy, or self-hosted). See Connecting to Solana.
BROADCAST_SOLANA_TRANSACTION​
BROADCAST_SOLANA_TRANSACTION Workflow ComponentBroadcasts a fully-signed Solana transaction to the network and returns the transaction signature.
Config​
None.
Inputs​
| Field | Type | Description |
|---|---|---|
jsonRpcUrl | string (URL) | Solana JSON-RPC endpoint URL |
signedTransaction | string (base64) | Base64-encoded signed transaction |
Outputs​
| Field | Type | Description |
|---|---|---|
transactionSignature | string (base58) | Transaction signature (txid) — directly usable in Solana explorers |
SDK example​
import { WorkspaceClient, ComponentModule } from 'caller-sdk';
const workspace = new WorkspaceClient({ apiKey: process.env.WR_API_KEY! });
const result = await workspace.call(ComponentModule.BROADCAST_SOLANA_TRANSACTION, {
jsonRpcUrl: 'https://api.mainnet-beta.solana.com',
signedTransaction: 'AQAAAAAAAABh...',
}).promise();
console.log(result.transactionSignature);
BUILD_SOLANA_TRANSACTION​
BUILD_SOLANA_TRANSACTION Workflow ComponentBuilds an unsigned Solana transaction with SOL transfer and/or custom program instructions. Supports durable nonce auto-detection, gas sponsorship via a separate fee payer, and fee deduction.
Config​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
deductFee | boolean | No | false | When true, subtracts the transaction fee from the lamports amount. Only applies when from equals feePayer. Ignored for gas sponsorship |
Inputs​
| Field | Type | Description |
|---|---|---|
jsonRpcUrl | string (URL) | Solana JSON-RPC endpoint |
feePayer | string (base58) | Public key of the account paying transaction fees |
from | string | null (base58) | Public key of the account sending SOL. Defaults to feePayer. Set differently for gas sponsorship |
to | string | null (base58) | Recipient public key for SOL transfer. Leave null if only using instructions |
lamports | string | Amount to transfer in lamports (1 SOL = 1,000,000,000). Decimal or 0x hex. Default "0" |
instructions | Instruction[] | Custom program instructions (default []) |
nonceAccount | string | null (base58) | Durable nonce account public key. If provided, nonce is auto-fetched and a nonceAdvance instruction is prepended. Leave null for recent blockhash |
Outputs​
| Field | Type | Description |
|---|---|---|
unsignedTransaction | string (base64) | Base64-encoded unsigned transaction |
serializedHash | string (hex) | Transaction message hash each signer must sign with Ed25519 |
signers | string[] | Base58 public keys that must sign (fee payer + instruction signers) |
Instruction type​
{
programId: string; // base58 program ID
keys: Array<{
pubkey: string; // base58
isSigner: boolean;
isWritable: boolean;
}>;
data: string | null; // hex-encoded instruction data
}
SDK example​
import { WorkspaceClient, ComponentModule } from 'caller-sdk';
const workspace = new WorkspaceClient({ apiKey: process.env.WR_API_KEY! });
const result = await workspace.call(ComponentModule.BUILD_SOLANA_TRANSACTION, {
jsonRpcUrl: 'https://api.mainnet-beta.solana.com',
feePayer: 'FEEPAYERpubkey...',
from: null,
to: 'RECIPIENTpubkey...',
lamports: '1000000000',
instructions: [],
nonceAccount: null,
}).promise();
console.log(result.unsignedTransaction);
console.log(result.serializedHash); // sign this
console.log(result.signers);
SIGN_SOLANA_TRANSACTION​
SIGN_SOLANA_TRANSACTION Workflow ComponentApplies one or more Ed25519 signatures to an unsigned Solana transaction. Supports multi-party signing for gas sponsorship and multi-sig workflows.
Config​
None.
Inputs​
| Field | Type | Description |
|---|---|---|
unsignedTransaction | string (base64) | Base64-encoded unsigned transaction |
signatures | SignaturePair[] | Array of { publicKey, signature } pairs |
Outputs​
| Field | Type | Description |
|---|---|---|
signedTransaction | string (base64) | Base64-encoded fully-signed transaction, ready to broadcast |
SignaturePair type​
{
publicKey: string; // base58 (32–44 chars)
signature: string; // hex (128 chars or 130 with 0x prefix)
}
BUILD_SOLANA_TRANSFER_INSTRUCTION​
BUILD_SOLANA_TRANSFER_INSTRUCTION ComponentBuilds transfer instructions for native SOL or SPL tokens. When tokenMint is provided, auto-resolves Associated Token Accounts (ATAs) and creates the destination ATA if needed. When tokenMint is null, builds a native SOL transfer.
Config​
None.
Inputs​
| Field | Type | Description |
|---|---|---|
jsonRpcUrl | string (URL) | Solana JSON-RPC endpoint |
from | string (base58) | Sender public key |
to | string (base58) | Recipient public key |
amount | string | Amount in smallest unit (lamports for SOL, raw amount for SPL tokens). Decimal or 0x hex |
tokenMint | string | null (base58) | SPL token mint address. null for native SOL |
Outputs​
| Field | Type | Description |
|---|---|---|
instructions | Instruction[] | Instructions to pass into BUILD_SOLANA_TRANSACTION |
SDK example​
import { WorkspaceClient, ComponentModule } from 'caller-sdk';
const workspace = new WorkspaceClient({ apiKey: process.env.WR_API_KEY! });
// SOL transfer instructions
const result = await workspace.call(ComponentModule.BUILD_SOLANA_TRANSFER_INSTRUCTION, {
jsonRpcUrl: 'https://api.mainnet-beta.solana.com',
from: 'FROMpubkey...',
to: 'TOPubkey...',
amount: '500000000',
tokenMint: null,
}).promise();
console.log(result.instructions);
BUILD_SOLANA_NONCE_ACCOUNT_INSTRUCTION​
BUILD_SOLANA_NONCE_ACCOUNT_INSTRUCTION ComponentBuilds instructions to create and initialize a durable nonce account. Pass the output instructions into BUILD_SOLANA_TRANSACTION.
Config​
None.
Inputs​
| Field | Type | Description |
|---|---|---|
jsonRpcUrl | string (URL) | Solana JSON-RPC endpoint (used to fetch minimum rent-exempt balance) |
feePayer | string (base58) | Account funding the nonce account creation |
nonceAccount | string (base58) | Public key of the new nonce account (must be a fresh keypair) |
nonceAuthority | string | null (base58) | Account authorized to use the nonce. Defaults to feePayer when null |
Outputs​
| Field | Type | Description |
|---|---|---|
instructions | Instruction[] | createAccount + nonceInitialize instructions |
Transaction flow (SOL transfer)​
GET_SOLANA_DERIVATION_PATH
│
â–¼
(external signing)
→ public key
│
â–¼
COMPUTE_SOLANA_ADDRESS BUILD_SOLANA_TRANSFER_INSTRUCTION
│ │ instructions
│ ▼
└────────────▶ BUILD_SOLANA_TRANSACTION
│ serializedHash
â–¼
(external signing)
│ signature
â–¼
BUILD_SOLANA_SIGNATURE_PAIR_ITEM
│ item
â–¼
SIGN_SOLANA_TRANSACTION
│ signedTransaction
â–¼
BROADCAST_SOLANA_TRANSACTION