Trait sc_finality_grandpa_rpc::GrandpaApi [−][src]
pub trait GrandpaApi<Notification, Hash, Number>: Sized + Send + Sync + 'static { type Metadata: PubSubMetadata; fn round_state(
&self
) -> Box<dyn Future<Item = ReportedRoundStates, Error = Error> + Send>; fn subscribe_justifications(
&self,
metadata: Self::Metadata,
subscriber: Subscriber<Notification>
); fn unsubscribe_justifications(
&self,
metadata: Option<Self::Metadata>,
id: SubscriptionId
) -> Result<bool>; fn prove_finality(
&self,
block: Number
) -> Box<dyn Future<Item = Option<EncodedFinalityProof>, Error = Error> + Send>; fn to_delegate(self) -> IoDelegate<Self, Self::Metadata>
where
Notification: Send + Sync + 'static + Serialize,
Hash: Send + Sync + 'static,
Number: Send + Sync + 'static + DeserializeOwned, { ... } }
Expand description
Provides RPC methods for interacting with GRANDPA.
Associated Types
Required methods
fn round_state(
&self
) -> Box<dyn Future<Item = ReportedRoundStates, Error = Error> + Send>
fn round_state(
&self
) -> Box<dyn Future<Item = ReportedRoundStates, Error = Error> + Send>
Returns the state of the current best round state as well as the ongoing background rounds.
fn subscribe_justifications(
&self,
metadata: Self::Metadata,
subscriber: Subscriber<Notification>
)
fn subscribe_justifications(
&self,
metadata: Self::Metadata,
subscriber: Subscriber<Notification>
)
Returns the block most recently finalized by Grandpa, alongside side its justification.
fn unsubscribe_justifications(
&self,
metadata: Option<Self::Metadata>,
id: SubscriptionId
) -> Result<bool>
fn unsubscribe_justifications(
&self,
metadata: Option<Self::Metadata>,
id: SubscriptionId
) -> Result<bool>
Unsubscribe from receiving notifications about recently finalized blocks.