pub struct CBMT<T, M> { /* private fields */ }
Implementations§
Source§impl<T, M> CBMT<T, M>
impl<T, M> CBMT<T, M>
pub fn build_merkle_root(leaves: &[T]) -> T
pub fn build_merkle_tree(leaves: &[T]) -> MerkleTree<T, M>
pub fn build_merkle_proof( leaves: &[T], leaf_indices: &[u32], ) -> Option<MerkleProof<T, M>>
Sourcepub fn retrieve_leaves(
leaves: &[T],
proof: &MerkleProof<T, M>,
) -> Option<Vec<T>>
pub fn retrieve_leaves( leaves: &[T], proof: &MerkleProof<T, M>, ) -> Option<Vec<T>>
retrieve that a proof points to leaves of a tree, returning None
if the proof indices is empty or out of bounds
Trait Implementations§
Auto Trait Implementations§
impl<T, M> Freeze for CBMT<T, M>
impl<T, M> RefUnwindSafe for CBMT<T, M>where
T: RefUnwindSafe,
M: RefUnwindSafe,
impl<T, M> Send for CBMT<T, M>
impl<T, M> Sync for CBMT<T, M>
impl<T, M> Unpin for CBMT<T, M>
impl<T, M> UnwindSafe for CBMT<T, M>where
T: UnwindSafe,
M: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more