Skip to content
docs

BlockchairClient

Defined in: wallet-zcash/src/blockchair.ts:38

Minimal chain-data client every transport implements. Values in zatoshis.

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

Defined in: wallet-zcash/src/blockchair.ts:44

string

string

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

number = DEFAULT_TIMEOUT_MS

BlockchairClient

broadcast(rawTx): Promise<string>

Defined in: wallet-zcash/src/blockchair.ts:164

Broadcast raw hex; returns the txid.

string

Promise<string>

ZcashClient.broadcast


close(): Promise<void>

Defined in: wallet-zcash/src/blockchair.ts:52

Promise<void>

ZcashClient.close


connect(): Promise<void>

Defined in: wallet-zcash/src/blockchair.ts:51

Promise<void>

ZcashClient.connect


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

Defined in: wallet-zcash/src/blockchair.ts:96

Confirmed = the UTXOs mined so far; unconfirmed = incoming mempool outputs. (Beyond 1000 UTXOs the dashboard balance is used.)

string

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

ZcashClient.getBalance


getBlockHeight(): Promise<number>

Defined in: wallet-zcash/src/blockchair.ts:180

Current chain tip height (expiry height, anti-fee-sniping lock time, consensus branch selection).

Promise<number>

ZcashClient.getBlockHeight


getOutput(txid, vout): Promise<SpentOutput | undefined>

Defined in: wallet-zcash/src/blockchair.ts:147

Value + scriptPubKey of one output of an existing transaction (what signing a spend of it needs).

string

number

Promise<SpentOutput | undefined>

ZcashClient.getOutput


getTransaction(txid): Promise<string>

Defined in: wallet-zcash/src/blockchair.ts:109

Raw transaction hex (any version — only used to read prevouts and for receipts).

string

Promise<string>

ZcashClient.getTransaction


getTransactionDashboard(txid): Promise<BlockchairTxDashboard | undefined>

Defined in: wallet-zcash/src/blockchair.ts:118

Inputs / outputs with addresses, values and scripts — what the activity history and prevout lookups read.

string

Promise<BlockchairTxDashboard | undefined>


getTransactionDashboards(txids): Promise<Map<string, BlockchairTxDashboard>>

Defined in: wallet-zcash/src/blockchair.ts:132

Several transactions in one call (Blockchair takes up to 10 comma-separated hashes).

string[]

Promise<Map<string, BlockchairTxDashboard>>


getTransactionInfo(txid): Promise<ZcashTxInfo | undefined>

Defined in: wallet-zcash/src/blockchair.ts:153

string

Promise<ZcashTxInfo | undefined>

ZcashClient.getTransactionInfo


listTransactions(address, limit, offset): Promise<{ hashes: string[]; total: number | undefined; }>

Defined in: wallet-zcash/src/blockchair.ts:87

Transaction hashes of an address, newest first, paged by offset (what the activity history walks).

string

number

number

Promise<{ hashes: string[]; total: number | undefined; }>


listUnspent(address): Promise<Utxo[]>

Defined in: wallet-zcash/src/blockchair.ts:104

string

Promise<Utxo[]>

ZcashClient.listUnspent