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
Name | Type | Description |
---|---|---|
electrsClient | ElectrsClient | An ElectrsClient instance for interacting with the Electrum server. |
txId | string | The 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
Name | Type | Description |
---|---|---|
electrsClient | ElectrsClient | An ElectrsClient instance for interacting with the Electrum server. |
txId | string | The ID of the Bitcoin transaction. |
txProofDifficultyFactor | number | The 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