Solana Wallets & Addresses
Components for address derivation, public key conversion, balance queries, and BIP-44 path computation.
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.
COMPUTE_SOLANA_ADDRESS​
COMPUTE_SOLANA_ADDRESS ComponentDerives a base58 Solana address from an Ed25519 public key. Accepts raw (32-byte), compressed (33-byte), or uncompressed (65-byte) hex formats and auto-converts.
Config​
None.
Inputs​
| Field | Type | Description |
|---|---|---|
publicKey | string (hex) | Hex-encoded public key. Supports raw 32-byte (64 hex), compressed 33-byte (66 hex with 02/03 prefix), or uncompressed 65-byte (130 hex with 04 prefix). Optional 0x prefix |
Outputs​
| Field | Type | Description |
|---|---|---|
address | string (base58) | Solana address derived from the public key |
CONVERT_SOLANA_PUBLIC_KEY​
CONVERT_SOLANA_PUBLIC_KEY ComponentConverts a base58 Solana public key to hex format.
Config​
| Field | Type | Required | Description |
|---|---|---|---|
format | 'RAW' | 'COMPRESSED' | 'UNCOMPRESSED' | Yes | Output format: RAW = 32-byte hex, COMPRESSED = 02 prefix + 32 bytes, UNCOMPRESSED = 04 prefix + 64 bytes |
Inputs​
| Field | Type | Description |
|---|---|---|
publicKey | string (base58) | Solana public key to convert |
Outputs​
| Field | Type | Description |
|---|---|---|
hex | string | Hex-encoded public key (with 0x prefix) |
GET_SOLANA_ACCOUNT_BALANCE​
GET_SOLANA_ACCOUNT_BALANCE ComponentReturns the SOL balance of an account in lamports. If a token mint is provided, returns the SPL token balance instead.
Config​
None.
Inputs​
| Field | Type | Description |
|---|---|---|
jsonRpcUrl | string (URL) | Solana JSON-RPC endpoint |
account | string (base58) | Account to query |
tokenMint | string | null (base58) | SPL token mint address. null for native SOL balance |
Outputs​
| Field | Type | Description |
|---|---|---|
value | string (hex) | Balance in smallest unit (lamports for SOL, raw amount for SPL tokens) |
SDK example​
import { WorkspaceClient, ComponentModule } from 'caller-sdk';
const workspace = new WorkspaceClient({ apiKey: process.env.WR_API_KEY! });
const result = await workspace.call(ComponentModule.GET_SOLANA_ACCOUNT_BALANCE, {
jsonRpcUrl: 'https://api.mainnet-beta.solana.com',
account: 'ACCOUNTpubkey...',
tokenMint: null,
}).promise();
console.log(`Balance: ${BigInt(result.value)} lamports`);
GET_SOLANA_DERIVATION_PATH​
GET_SOLANA_DERIVATION_PATH ComponentReturns the BIP-44 derivation path for a Solana account. Supports 4-level Phantom/Solflare style (m/44'/501'/account'/change') and 5-level Ledger/CLI style (m/44'/501'/account'/change'/addressIndex').
Config​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
hardened | boolean | No | true | When true, applies the hardened bit (0x80000000) to produce a BIP-44 compliant path |
Inputs​
| Field | Type | Description |
|---|---|---|
accountIndex | number | BIP-44 account index (0-based) |
changeIndex | number | BIP-44 change index. Typically 0 for external addresses |
addressIndex | number | null | Optional 5th-level index (Ledger/CLI style). Omit for 4-level path |
Outputs​
| Field | Type | Description |
|---|---|---|
derivationPath | number[] | Path as integers: [44, 501, account, change] or [44, 501, account, change, addressIndex] with optional hardened bit |