pub trait GrandpaApiClient<Notification, Hash, Number>: SubscriptionClientTwhere
Notification: Send + Sync + 'static + DeserializeOwned,
Hash: Send + Sync + 'static,
Number: Send + Sync + 'static + Serialize,{
// Provided methods
fn round_state<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = RpcResult<ReportedRoundStates>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn prove_finality<'life0, 'async_trait>(
&'life0 self,
block: Number
) -> Pin<Box<dyn Future<Output = RpcResult<Option<EncodedFinalityProof>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn subscribe_justifications<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Subscription<Notification>, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
}
Expand description
Client implementation for the GrandpaApi
RPC API.
Provided Methods§
sourcefn round_state<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = RpcResult<ReportedRoundStates>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn round_state<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = RpcResult<ReportedRoundStates>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,
Returns the state of the current best round state as well as the ongoing background rounds.
sourcefn prove_finality<'life0, 'async_trait>(
&'life0 self,
block: Number
) -> Pin<Box<dyn Future<Output = RpcResult<Option<EncodedFinalityProof>>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn prove_finality<'life0, 'async_trait>( &'life0 self, block: Number ) -> Pin<Box<dyn Future<Output = RpcResult<Option<EncodedFinalityProof>>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,
Prove finality for the given block number by returning the Justification for the last block in the set and all the intermediary headers to link them together.
sourcefn subscribe_justifications<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Subscription<Notification>, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn subscribe_justifications<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Subscription<Notification>, Error>> + Send + 'async_trait>>where Self: Sync + 'async_trait, 'life0: 'async_trait,
Returns the block most recently finalized by Grandpa, alongside side its justification.