BlockchairClient
Defined in: wallet-zcash/src/blockchair.ts:38
Minimal chain-data client every transport implements. Values in zatoshis.
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new BlockchairClient(
config?,fetchFn?,timeoutMs?):BlockchairClient
Defined in: wallet-zcash/src/blockchair.ts:44
Parameters
Section titled “Parameters”config?
Section titled “config?”string
string
fetchFn?
Section titled “fetchFn?”{(input, init?): Promise<Response>; (input, init?): Promise<Response>; }
timeoutMs?
Section titled “timeoutMs?”number = DEFAULT_TIMEOUT_MS
Returns
Section titled “Returns”BlockchairClient
Methods
Section titled “Methods”broadcast()
Section titled “broadcast()”broadcast(
rawTx):Promise<string>
Defined in: wallet-zcash/src/blockchair.ts:164
Broadcast raw hex; returns the txid.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<string>
Implementation of
Section titled “Implementation of”close()
Section titled “close()”close():
Promise<void>
Defined in: wallet-zcash/src/blockchair.ts:52
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”connect()
Section titled “connect()”connect():
Promise<void>
Defined in: wallet-zcash/src/blockchair.ts:51
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”getBalance()
Section titled “getBalance()”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.)
Parameters
Section titled “Parameters”address
Section titled “address”string
Returns
Section titled “Returns”Promise<{ confirmed: bigint; unconfirmed: bigint; }>
Implementation of
Section titled “Implementation of”getBlockHeight()
Section titled “getBlockHeight()”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).
Returns
Section titled “Returns”Promise<number>
Implementation of
Section titled “Implementation of”getOutput()
Section titled “getOutput()”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).
Parameters
Section titled “Parameters”string
number
Returns
Section titled “Returns”Promise<SpentOutput | undefined>
Implementation of
Section titled “Implementation of”getTransaction()
Section titled “getTransaction()”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).
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<string>
Implementation of
Section titled “Implementation of”getTransactionDashboard()
Section titled “getTransactionDashboard()”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.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<BlockchairTxDashboard | undefined>
getTransactionDashboards()
Section titled “getTransactionDashboards()”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).
Parameters
Section titled “Parameters”string[]
Returns
Section titled “Returns”Promise<Map<string, BlockchairTxDashboard>>
getTransactionInfo()
Section titled “getTransactionInfo()”getTransactionInfo(
txid):Promise<ZcashTxInfo|undefined>
Defined in: wallet-zcash/src/blockchair.ts:153
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<ZcashTxInfo | undefined>
Implementation of
Section titled “Implementation of”ZcashClient.getTransactionInfo
listTransactions()
Section titled “listTransactions()”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).
Parameters
Section titled “Parameters”address
Section titled “address”string
number
offset
Section titled “offset”number
Returns
Section titled “Returns”Promise<{ hashes: string[]; total: number | undefined; }>
listUnspent()
Section titled “listUnspent()”listUnspent(
address):Promise<Utxo[]>
Defined in: wallet-zcash/src/blockchair.ts:104
Parameters
Section titled “Parameters”address
Section titled “address”string
Returns
Section titled “Returns”Promise<Utxo[]>