Skip to content

Latest commit

 

History

27 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Basic implementation of a Merkle Tree in Rust.

Example

let initial_leaf = hex!("0000000000000000000000000000000000000000000000000000000000000000");
let leaf_3 = hex!("3333333333333333333333333333333333333333333333333333333333333333");

let mut tree = MerkleTree::new(4, initial_leaf).unwrap();
tree.set(3, leaf_3.clone()).unwrap();

let proof = tree.proof(3).unwrap();
assert_eq!(&MerkleTree::verify(&proof, leaf_3), tree.root());

About

Basic implementation of a Merkle Tree in Rust

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages