Skip to content

Commit

Permalink
add: check merkle proof to main struct
Browse files Browse the repository at this point in the history
  • Loading branch information
olivmath committed Feb 6, 2024
1 parent 8a01f30 commit 16737b2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,9 @@ impl MerkleTree {
merkle_proof(&self.leaves, leaf)
}
}

impl MerkleTree {
pub fn check_proof(self, proof: Proof, leaf: Leaf) -> Leaf {
merkle_proof_check(proof, leaf)
}
}

0 comments on commit 16737b2

Please sign in to comment.