referrerpolicy=no-referrer-when-downgrade
polkadot_sdk_frame::traits

Trait VerifyExistenceProof

pub trait VerifyExistenceProof {
    type Proof;
    type Hash;

    // Required method
    fn verify_proof(
        proof: Self::Proof,
        root: &Self::Hash,
    ) -> Result<Vec<u8>, DispatchError>;
}
Expand description

Something that can verify the existence of some data in a given proof.

Required Associated Types§

type Proof

The proof type.

type Hash

The hash type.

Required Methods§

fn verify_proof( proof: Self::Proof, root: &Self::Hash, ) -> Result<Vec<u8>, DispatchError>

Verify the given proof.

Ensures that the proof was build for root and returns the proved data.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

§

impl<H> VerifyExistenceProof for BinaryMerkleTreeProver<H>
where H: Hasher, <H as Hasher>::Out: Decode + Encode,

§

type Proof = MerkleProof<<H as Hasher>::Out, Vec<u8>>

§

type Hash = <H as Hasher>::Out

§

impl<H> VerifyExistenceProof for SixteenPatriciaMerkleTreeProver<H>
where H: Hasher,