Module merkle_tree

Expand description

Bitcoin merkle tree functions.

§Examples

let tx_hashes = vec![tx1, tx2]; // All the hashes we wish to merkelize.
let root = merkle_tree::calculate_root(tx_hashes.into_iter());

Structs§

MerkleBlock
Data structure that represents a block header paired to a partial merkle tree.
PartialMerkleTree
Data structure that represents a partial merkle tree.

Enums§

MerkleBlockError
An error when verifying the merkle block.

Functions§

calculate_root
Calculates the merkle root of an iterator of hashes.
calculate_root_inline
Calculates the merkle root of a list of hashes, inline (in place) in hashes.