Skip to main content

Module: relay

Interfaces

Functions

getBitcoinTxInfo

getBitcoinTxInfo(electrsClient, txId): Promise<BitcoinTxInfo>

Retrieves information about a Bitcoin transaction, such as version, input vector, output vector, and locktime.

Parameters

NameTypeDescription
electrsClientElectrsClientAn ElectrsClient instance for interacting with the Electrum server.
txIdstringThe ID of the Bitcoin transaction.

Returns

Promise<BitcoinTxInfo>

A promise that resolves to a BitcoinTxInfo object.

Defined in

relay.ts:36


getBitcoinTxProof

getBitcoinTxProof(electrsClient, txId, txProofDifficultyFactor): Promise<BitcoinTxProof>

Retrieves a proof for a Bitcoin transaction, including the merkle proof, transaction index in the block, and Bitcoin headers.

Parameters

NameTypeDescription
electrsClientElectrsClientAn ElectrsClient instance for interacting with the Electrum server.
txIdstringThe ID of the Bitcoin transaction.
txProofDifficultyFactornumberThe number of block headers to retrieve for proof verification.

Returns

Promise<BitcoinTxProof>

A promise that resolves to a BitcoinTxProof object.

Defined in

relay.ts:83