Bitcoin Wallets & Addresses
Components for address derivation, balance queries, and BIP-44 path computation.
White Rabbit runs on shared infrastructure with a shared outbound IP pool. Public endpoints enforce rate limits per IP — under load this can cause errors across all workspaces sharing that IP. Use a private or self-hosted Bitcoin node. See Connecting to Bitcoin.
COMPUTE_BITCOIN_ADDRESS​
COMPUTE_BITCOIN_ADDRESS Workflow ComponentDerives a Bitcoin address from a public key with configurable payment type and optional custom bech32 prefix.
Config​
| Field | Type | Required | Description |
|---|---|---|---|
paymentType | 'p2pkh' | 'p2sh-p2wpkh' | 'p2wpkh' | 'p2tr' | Yes | Bitcoin payment type (address format) |
network | 'mainnet' | 'testnet' | Yes | Target Bitcoin network |
bech32Prefix | string | null | No | Custom bech32 HRP (e.g. bc, tb, bbn). null uses the network default |
Inputs​
| Field | Type | Description |
|---|---|---|
publicKey | string (hex) | Public key — compressed 33 bytes (66 hex) or uncompressed 65 bytes (130 hex) |
Outputs​
| Field | Type | Description |
|---|---|---|
address | string | Derived Bitcoin address |
SDK example​
import { WorkspaceClient, ComponentModule } from 'caller-sdk';
const workspace = new WorkspaceClient({ apiKey: process.env.WR_API_KEY! });
const result = await workspace.call(ComponentModule.COMPUTE_BITCOIN_ADDRESS, {
publicKey: '02abc123...',
}).promise();
console.log(result.address);
GET_BITCOIN_ACCOUNT_BALANCE​
GET_BITCOIN_ACCOUNT_BALANCE Workflow ComponentQueries the blockchain and returns the total UTXO balance for a Bitcoin address.
Config​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
network | 'mainnet' | 'testnet' | Yes | — | Target Bitcoin network |
confirmedOnly | boolean | No | true | When true, only counts confirmed UTXOs. When false, includes mempool UTXOs |
Inputs​
| Field | Type | Description |
|---|---|---|
address | string | Bitcoin address to query |
Outputs​
| Field | Type | Description |
|---|---|---|
balance | number | Total balance in satoshis |
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_BITCOIN_ACCOUNT_BALANCE, {
address: 'bc1q...',
}).promise();
console.log(`Balance: ${result.balance} satoshis`);
GET_BITCOIN_DERIVATION_PATH​
GET_BITCOIN_DERIVATION_PATH WorkflowReturns the BIP-44/49/84/86 derivation path for a Bitcoin account. The BIP standard is inferred from the payment type: P2PKH → BIP-44 (m/44'), P2SH-P2WPKH → BIP-49 (m/49'), P2WPKH → BIP-84 (m/84'), P2TR → BIP-86 (m/86').
Config​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
paymentType | 'p2pkh' | 'p2sh-p2wpkh' | 'p2wpkh' | 'p2tr' | Yes | — | Determines the BIP purpose level |
hardened | boolean | No | true | When true, applies the hardened bit (0x80000000) to purpose, coinType, and account levels |
Inputs​
| Field | Type | Description |
|---|---|---|
accountIndex | number | Account index (0-based) |
changeIndex | number | Change index — 0 for external (receiving), 1 for internal (change) |
addressIndex | number | Address index within the change level (0-based) |
Outputs​
| Field | Type | Description |
|---|---|---|
derivationPath | number[] | Derivation path as integers: [purpose, 0, account, change, addressIndex] with optional hardened bit applied |