pub trait BeefyApiClient<Notification, Hash>: SubscriptionClientTwhere
Notification: Send + Sync + 'static + DeserializeOwned,
Hash: Send + Sync + 'static + DeserializeOwned,{
// Provided methods
fn latest_finalized<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Hash, 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 { ... }
}
Expand description
Client implementation for the BeefyApi
RPC API.
Provided Methods§
sourcefn latest_finalized<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Hash, Error>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn latest_finalized<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Hash, Error>> + Send + 'async_trait>>where
Self: Sync + '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<'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 BEEFY, alongside its justification.
Object Safety§
This trait is not object safe.