Module merkle

Module merkle 

Source
Expand description

Merkle tree utilities using Poseidon2 hash

Provides merkle tree operations for use in ZK circuits. These functions match the Circom circuit implementations and produce identical roots/proofs.

Functionsยง

merkle_proof
Compute the Merkle path and path index bits for a given leaf index
merkle_root
Build a Merkle root from a full list of leaves
poseidon2_compression
Poseidon2 compression for merkle tree nodes