Skip to content
docs

BtcClient

Defined in: wallet-btc/src/types.ts:8

Minimal chain-data client every transport implements. Values in satoshis, fee rates in sat/vB.

broadcast(rawTx): Promise<string>

Defined in: wallet-btc/src/types.ts:19

Broadcast raw hex; returns the txid.

string

Promise<string>


close(): Promise<void>

Defined in: wallet-btc/src/types.ts:10

Promise<void>


connect(): Promise<void>

Defined in: wallet-btc/src/types.ts:9

Promise<void>


estimateFee(blocks): Promise<number>

Defined in: wallet-btc/src/types.ts:21

Fee rate in sat/vB for confirmation within blocks.

number

Promise<number>


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

Defined in: wallet-btc/src/types.ts:11

string

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


optional getBlockHeight(): Promise<number>

Defined in: wallet-btc/src/types.ts:23

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

Promise<number>


getHistory(address): Promise<object[]>

Defined in: wallet-btc/src/types.ts:13

string

Promise<object[]>


getTransaction(txid): Promise<string>

Defined in: wallet-btc/src/types.ts:15

Raw transaction hex.

string

Promise<string>


optional getTransactionInfo(txid): Promise<BlockbookTx | undefined>

Defined in: wallet-btc/src/types.ts:17

Full tx record (used for receipts).

string

Promise<BlockbookTx | undefined>


listUnspent(address): Promise<Utxo[]>

Defined in: wallet-btc/src/types.ts:12

string

Promise<Utxo[]>