Crate merkleized_metadata

Source
Expand description

§Merkleized metadata

This crate provides the merkleization of frame_metadata as described in RFC78.

It exports the following main functions:

  • generate_metadata_digest: This generates the MetadataDigest for the given metadata. The hash of this digest is what is called the “metadata hash” in the RFC.

  • generate_proof_for_extrinsic: This generates a proof that contains all the types required for decoding the given extrinsic.

  • generate_proof_for_extrinsic_parts: Similar to the previous one, but doesn’t require the full extrinsic to be passed. However, this may increases the proof size, see the documentation of the function for more information.

These functions are the main entry point providing all the functionality expected from this crate. The crate itself is by default no_std compatible.

Modules§

types

Structs§

ExtraInfo
Extra information that is required to generate the MetadataDigest.
Proof
A proof containing all the nodes to decode a specific extrinsic.
SignedExtrinsicData
Data that is required for a signed extrinsic.

Functions§

generate_metadata_digest
Generate the MetadataDigest using the given extra_info.
generate_proof_for_extrinsic
Generate a proof for the given extrinsic using the given metadata.
generate_proof_for_extrinsic_parts
Generate a proof for the given extrinsic parts using the given metadata.
verify_proof
Verify that the given proof can be used to decode the given extrinsic.