Skip to main content

Bitcoin Wallets & Addresses

Components for address derivation, balance queries, and BIP-44 path computation.

Avoid public RPC endpoints

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 Component

Derives a Bitcoin address from a public key with configurable payment type and optional custom bech32 prefix.

Config​

FieldTypeRequiredDescription
paymentType'p2pkh' | 'p2sh-p2wpkh' | 'p2wpkh' | 'p2tr'YesBitcoin payment type (address format)
network'mainnet' | 'testnet'YesTarget Bitcoin network
bech32Prefixstring | nullNoCustom bech32 HRP (e.g. bc, tb, bbn). null uses the network default

Inputs​

FieldTypeDescription
publicKeystring (hex)Public key — compressed 33 bytes (66 hex) or uncompressed 65 bytes (130 hex)

Outputs​

FieldTypeDescription
addressstringDerived 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 Component

Queries the blockchain and returns the total UTXO balance for a Bitcoin address.

Config​

FieldTypeRequiredDefaultDescription
network'mainnet' | 'testnet'Yes—Target Bitcoin network
confirmedOnlybooleanNotrueWhen true, only counts confirmed UTXOs. When false, includes mempool UTXOs

Inputs​

FieldTypeDescription
addressstringBitcoin address to query

Outputs​

FieldTypeDescription
balancenumberTotal 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 Workflow

Returns 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​

FieldTypeRequiredDefaultDescription
paymentType'p2pkh' | 'p2sh-p2wpkh' | 'p2wpkh' | 'p2tr'Yes—Determines the BIP purpose level
hardenedbooleanNotrueWhen true, applies the hardened bit (0x80000000) to purpose, coinType, and account levels

Inputs​

FieldTypeDescription
accountIndexnumberAccount index (0-based)
changeIndexnumberChange index — 0 for external (receiving), 1 for internal (change)
addressIndexnumberAddress index within the change level (0-based)

Outputs​

FieldTypeDescription
derivationPathnumber[]Derivation path as integers: [purpose, 0, account, change, addressIndex] with optional hardened bit applied