pub fn merkle_proof<H, I, T>(
leaves: I,
leaf_index: u32,
) -> MerkleProof<H::Out, T>
Expand description
Construct a Merkle Proof for leaves given by indices.
The function constructs a (partial) Merkle Tree first and stores all elements required to prove requested item (leaf) given the root hash.
Both the Proof and the Root Hash is returned.
ยงPanic
The function will panic if given leaf_index
is greater than the number of leaves.