Module sparse_merkle

Module sparse_merkle 

Source
Expand description

Sparse Merkle Tree utilities for WASM (no_std compatible)

Provides sparse merkle tree functionality using BTreeMap for no_std compatibility.

Equivalent functionality to circuits::test::utils::sparse_merkle_tree in the circuit crate. But without std dependencies: Bigint and Hashmap dependencies mostly. SMT interface.

Structs§

FindResult
Result of SMT find operation
SMTResult
Result of SMT operations (insert/update/delete)
SparseMerkleTree
Sparse Merkle Tree using BTreeMap for no_std compatibility
WasmFindResult
Result of SMT find operation
WasmSMTProof
SMT Proof for circuit inputs
WasmSMTResult
Result of SMT operations (insert/update/delete)
WasmSparseMerkleTree
WASM-friendly Sparse Merkle Tree wrapper

Functions§

smt_hash_leaf
Compute Poseidon2 hash for leaf nodes: hash(key, value, 1)
smt_hash_pair
Compute Poseidon2 compression hash of two field elements