imt-tree 0.2.0

Indexed Merkle Tree for nullifier non-membership proofs
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
pub mod hasher;
pub mod proof;
pub mod tree;
pub use proof::{ImtProofData, PUNCTURE_K};
pub use tree::*;

#[cfg(test)]
pub(crate) mod test_helpers;

use pasta_curves::Fp;

/// Convenience wrapper: Poseidon hash of two field elements.
///
/// This is the same hash used for internal Merkle nodes (`hash(left, right)`).
pub fn poseidon_hash(left: Fp, right: Fp) -> Fp {
    hasher::PoseidonHasher::new().hash(left, right)
}