imt_tree/lib.rs
1pub mod hasher;
2pub mod proof;
3pub mod tree;
4pub use proof::{ImtProofData, PUNCTURE_K};
5pub use tree::*;
6
7#[cfg(test)]
8pub(crate) mod test_helpers;
9
10use pasta_curves::Fp;
11
12/// Convenience wrapper: Poseidon hash of two field elements.
13///
14/// This is the same hash used for internal Merkle nodes (`hash(left, right)`).
15pub fn poseidon_hash(left: Fp, right: Fp) -> Fp {
16 hasher::PoseidonHasher::new().hash(left, right)
17}