Trait pallet_mmr_rpc::MmrApi[][src]

pub trait MmrApi<BlockHash>: Sized + Send + Sync + 'static {
    fn generate_proof(
        &self,
        leaf_index: u64,
        at: Option<BlockHash>
    ) -> Result<LeafProof<BlockHash>>; fn to_delegate<M: Metadata>(self) -> IoDelegate<Self, M>
    where
        BlockHash: Send + Sync + 'static + Serialize + DeserializeOwned
, { ... } }
Expand description

MMR RPC methods.

Required methods

Generate MMR proof for given leaf index.

This method calls into a runtime with MMR pallet included and attempts to generate MMR proof for leaf at given leaf_index. Optionally, a block hash at which the runtime should be queried can be specified.

Returns the (full) leaf itself and a proof for this leaf (compact encoding, i.e. hash of the leaf). Both parameters are SCALE-encoded.

Provided methods

Create an IoDelegate, wiring rpc calls to the trait methods.

Implementors