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

RPC Metadata

Required methods

Returns the state of the current best round state as well as the ongoing background rounds.

Returns the block most recently finalized by Grandpa, alongside side its justification.

Unsubscribe from receiving notifications about recently finalized blocks.

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.

Provided methods

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

Implementors