Trait beefy_gadget_rpc::BeefyApiServer
source · pub trait BeefyApiServer<Notification, Hash>: Sized + Send + Sync + 'static {
fn latest_finalized<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = RpcResult<Hash>> + Send + 'async_trait>>
where
Self: 'async_trait,
'life0: 'async_trait;
fn subscribe_justifications(
&self,
subscription_sink: SubscriptionSink
) -> SubscriptionResult;
fn into_rpc(self) -> RpcModule<Self>
where
Notification: Send + Sync + 'static + Serialize,
Hash: Send + Sync + 'static + Serialize,
{ ... }
}
Expand description
Server trait implementation for the BeefyApi
RPC API.
Required Methods§
sourcefn latest_finalized<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = RpcResult<Hash>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn latest_finalized<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = RpcResult<Hash>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns hash of the latest BEEFY finalized block as seen by this client.
The latest BEEFY block might not be available if the BEEFY gadget is not running in the network or if the client is still initializing or syncing with the network. In such case an error would be returned.
sourcefn subscribe_justifications(
&self,
subscription_sink: SubscriptionSink
) -> SubscriptionResult
fn subscribe_justifications(
&self,
subscription_sink: SubscriptionSink
) -> SubscriptionResult
Returns the block most recently finalized by BEEFY, alongside side its justification.