Module: utils
Functions
getMerkleProof
▸ getMerkleProof(block
, txHash
, forWitness?
): Object
Retrieve a Merkle proof for a Bitcoin transaction from a block's raw data.
Parameters
Name | Type | Description |
---|---|---|
block | Block | The Bitcoin block containing the transaction. |
txHash | string | The transaction hash to construct a proof for. |
forWitness? | boolean | Set to true to construct a witness proof (default is false ). |
Returns
Object
An object containing the position, proof, and root of the Merkle proof.
Name | Type |
---|---|
pos | any |
proof | string |
root | string |
Defined in
utils.ts:166