pub trait MerkleProof {
    type Hash: PartialEq;
    type Error: Error;

    fn root_hash(&self) -> Result<Self::Hash, Self::Error>;

    fn verify(&self, root_hash: &Self::Hash) -> bool { ... }
}
Expand description

Merkle proof trait of a single leaf node, for details refer to https://www.webopedia.com/definitions/merkle-proof/

Required Associated Types

Hash type

Error type

Required Methods

Calculates the root hash

Provided Methods

Verifies if the proof is valid

Implementors