Trait substrate_api_client::api::runtime_api::mmr::MmrApi
source · pub trait MmrApi: RuntimeApi {
type Error;
type BlockNumber;
type EncodableOpaqueLeaf;
type Proof;
// Required methods
fn generate_proof<'life0, 'async_trait>(
&'life0 self,
block_numbers: Vec<Self::BlockNumber>,
best_known_block_number: Option<Self::BlockNumber>,
at_block: Option<Self::Hash>
) -> Pin<Box<dyn Future<Output = Result<StdResult<(Vec<Self::EncodableOpaqueLeaf>, Self::Proof), Self::Error>>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn root<'life0, 'async_trait>(
&'life0 self,
at_block: Option<Self::Hash>
) -> Pin<Box<dyn Future<Output = Result<StdResult<Vec<Self::Hash>, Self::Error>>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn verify_proof<'life0, 'async_trait>(
&'life0 self,
leaves: Vec<Self::EncodableOpaqueLeaf>,
proof: Self::Proof,
at_block: Option<Self::Hash>
) -> Pin<Box<dyn Future<Output = Result<StdResult<(), Self::Error>>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn verify_proof_stateless<'life0, 'async_trait>(
&'life0 self,
root: Self::Hash,
leaves: Vec<Self::EncodableOpaqueLeaf>,
proof: Self::Proof,
at_block: Option<Self::Hash>
) -> Pin<Box<dyn Future<Output = Result<StdResult<(), Self::Error>>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Required Associated Types§
Required Methods§
sourcefn generate_proof<'life0, 'async_trait>(
&'life0 self,
block_numbers: Vec<Self::BlockNumber>,
best_known_block_number: Option<Self::BlockNumber>,
at_block: Option<Self::Hash>
) -> Pin<Box<dyn Future<Output = Result<StdResult<(Vec<Self::EncodableOpaqueLeaf>, Self::Proof), Self::Error>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn generate_proof<'life0, 'async_trait>(
&'life0 self,
block_numbers: Vec<Self::BlockNumber>,
best_known_block_number: Option<Self::BlockNumber>,
at_block: Option<Self::Hash>
) -> Pin<Box<dyn Future<Output = Result<StdResult<(Vec<Self::EncodableOpaqueLeaf>, Self::Proof), Self::Error>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Generate MMR proof for the given block numbers.
sourcefn root<'life0, 'async_trait>(
&'life0 self,
at_block: Option<Self::Hash>
) -> Pin<Box<dyn Future<Output = Result<StdResult<Vec<Self::Hash>, Self::Error>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn root<'life0, 'async_trait>(
&'life0 self,
at_block: Option<Self::Hash>
) -> Pin<Box<dyn Future<Output = Result<StdResult<Vec<Self::Hash>, Self::Error>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return the on-chain MMR root hash.
sourcefn verify_proof<'life0, 'async_trait>(
&'life0 self,
leaves: Vec<Self::EncodableOpaqueLeaf>,
proof: Self::Proof,
at_block: Option<Self::Hash>
) -> Pin<Box<dyn Future<Output = Result<StdResult<(), Self::Error>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn verify_proof<'life0, 'async_trait>(
&'life0 self,
leaves: Vec<Self::EncodableOpaqueLeaf>,
proof: Self::Proof,
at_block: Option<Self::Hash>
) -> Pin<Box<dyn Future<Output = Result<StdResult<(), Self::Error>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Verify MMR proof against on-chain MMR.
sourcefn verify_proof_stateless<'life0, 'async_trait>(
&'life0 self,
root: Self::Hash,
leaves: Vec<Self::EncodableOpaqueLeaf>,
proof: Self::Proof,
at_block: Option<Self::Hash>
) -> Pin<Box<dyn Future<Output = Result<StdResult<(), Self::Error>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn verify_proof_stateless<'life0, 'async_trait>(
&'life0 self,
root: Self::Hash,
leaves: Vec<Self::EncodableOpaqueLeaf>,
proof: Self::Proof,
at_block: Option<Self::Hash>
) -> Pin<Box<dyn Future<Output = Result<StdResult<(), Self::Error>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Verify MMR proof against given root hash.
Object Safety§
This trait is not object safe.