pub trait MmrApiClient<BlockHash>: ClientTwhere
    BlockHash: Send + Sync + 'static + Serialize + DeserializeOwned,
{ fn generate_proof<'life0, 'async_trait>(
        &'life0 self,
        leaf_index: LeafIndex,
        at: Option<BlockHash>
    ) -> Pin<Box<dyn Future<Output = RpcResult<LeafProof<BlockHash>>> + Send + 'async_trait>>
    where
        Self: Sync + 'async_trait,
        'life0: 'async_trait
, { ... } fn generate_batch_proof<'life0, 'async_trait>(
        &'life0 self,
        leaf_indices: Vec<LeafIndex>,
        at: Option<BlockHash>
    ) -> Pin<Box<dyn Future<Output = RpcResult<LeafBatchProof<BlockHash>>> + Send + 'async_trait>>
    where
        Self: Sync + 'async_trait,
        'life0: 'async_trait
, { ... } }
Expand description

Client implementation for the MmrApi RPC API.

Provided 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.

Generate MMR proof for the given leaf indices.

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

Returns the leaves and a proof for these leaves (compact encoding, i.e. hash of the leaves). Both parameters are SCALE-encoded. The order of entries in the leaves field of the returned struct is the same as the order of the entries in leaf_indices supplied

Implementors§