Trait smtree::traits::InclusionProvable[][src]

pub trait InclusionProvable {
    type ProofNodeType;
    type TreeStruct;
    fn generate_inclusion_proof(
        tree: &Self::TreeStruct,
        list: &[TreeIndex]
    ) -> Option<Self>
    where
        Self: Sized
;
fn verify_inclusion_proof(
        &self,
        leaves: &[Self::ProofNodeType],
        root: &Self::ProofNodeType
    ) -> bool; }
Expand description

Trait for generating and verifying inclusion proofs.

Associated Types

The data type of a node with necessary information in Merkle proofs.

The data type of the Merkle tree.

Required methods

Generate an inclusion proof for the input list of indexes.

Verify the inclusion proof according to the leave nodes and the root.

Implementors