Skip to content
docs

BlockbookClient

Defined in: wallet-btc/src/blockbook.ts:60

Blockbook REST transport (Trezor’s indexer; QuickNode’s Blockbook add-on speaks the same API).

new BlockbookClient(config, fetchFn?, timeoutMs?): BlockbookClient

Defined in: wallet-btc/src/blockbook.ts:65

string

{(input, init?): Promise<Response>; (input, init?): Promise<Response>; }

number = DEFAULT_TIMEOUT_MS

BlockbookClient

broadcast(rawTx): Promise<string>

Defined in: wallet-btc/src/blockbook.ts:151

Broadcast raw hex; returns the txid.

string

Promise<string>

BtcClient.broadcast


close(): Promise<void>

Defined in: wallet-btc/src/blockbook.ts:72

Promise<void>

BtcClient.close


connect(): Promise<void>

Defined in: wallet-btc/src/blockbook.ts:71

Promise<void>

BtcClient.connect


estimateFee(blocks): Promise<number>

Defined in: wallet-btc/src/blockbook.ts:159

sat/vB. Blockbook reports BTC/kB (×1e5 → sat/vB); falls back to mempool.space when it has no estimate.

number

Promise<number>

BtcClient.estimateFee


getAddressPage(address, page?, pageSize?): Promise<BlockbookAddressPage>

Defined in: wallet-btc/src/blockbook.ts:113

One page of the address’s transactions, newest first, with inputs / outputs (what the activity history reads).

string

number = 1

number = 25

Promise<BlockbookAddressPage>


getBalance(address): Promise<{ confirmed: bigint; unconfirmed: bigint; unconfirmedOutgoing: bigint; }>

Defined in: wallet-btc/src/blockbook.ts:89

string

Promise<{ confirmed: bigint; unconfirmed: bigint; unconfirmedOutgoing: bigint; }>

BtcClient.getBalance


getBlockHeight(): Promise<number>

Defined in: wallet-btc/src/blockbook.ts:173

Current chain tip height (anti-fee-sniping locktime). Optional.

Promise<number>

BtcClient.getBlockHeight


getHistory(address): Promise<object[]>

Defined in: wallet-btc/src/blockbook.ts:101

string

Promise<object[]>

BtcClient.getHistory


getTransaction(txid): Promise<string>

Defined in: wallet-btc/src/blockbook.ts:145

Raw transaction hex.

string

Promise<string>

BtcClient.getTransaction


getTransactionDetails(txid): Promise<BlockbookTxDetails | undefined>

Defined in: wallet-btc/src/blockbook.ts:122

A transaction with its inputs / outputs; undefined when Blockbook does not know it.

string

Promise<BlockbookTxDetails | undefined>


getTransactionInfo(txid): Promise<BlockbookTx | undefined>

Defined in: wallet-btc/src/blockbook.ts:138

Full tx record (used for receipts).

string

Promise<BlockbookTx | undefined>

BtcClient.getTransactionInfo


listUnspent(address): Promise<Utxo[]>

Defined in: wallet-btc/src/blockbook.ts:95

string

Promise<Utxo[]>

BtcClient.listUnspent