Trait massa_api::api_trait::MassaApiServer
source · pub trait MassaApiServer: Sized + Send + Sync + 'static {
// Required methods
fn get_largest_stakers<'life0, 'async_trait>(
&'life0 self,
page_request: Option<ApiRequest>,
) -> Pin<Box<dyn Future<Output = RpcResult<PagedVecV2<(Address, u64)>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_next_block_best_parents<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<(BlockId, u64)>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_version<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<Version>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn subscribe_new_blocks<'life0, 'async_trait>(
&'life0 self,
subscription_sink: PendingSubscriptionSink,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn subscribe_new_blocks_headers<'life0, 'async_trait>(
&'life0 self,
subscription_sink: PendingSubscriptionSink,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn subscribe_new_filled_blocks<'life0, 'async_trait>(
&'life0 self,
subscription_sink: PendingSubscriptionSink,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn subscribe_new_operations<'life0, 'async_trait>(
&'life0 self,
subscription_sink: PendingSubscriptionSink,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn into_rpc(self) -> RpcModule<Self> { ... }
}Expand description
Server trait implementation for the MassaApi RPC API.
Required Methods§
sourcefn get_largest_stakers<'life0, 'async_trait>(
&'life0 self,
page_request: Option<ApiRequest>,
) -> Pin<Box<dyn Future<Output = RpcResult<PagedVecV2<(Address, u64)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_largest_stakers<'life0, 'async_trait>(
&'life0 self,
page_request: Option<ApiRequest>,
) -> Pin<Box<dyn Future<Output = RpcResult<PagedVecV2<(Address, u64)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the active stakers and their active roll counts for the current cycle sorted by largest roll counts.
sourcefn get_next_block_best_parents<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<(BlockId, u64)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_next_block_best_parents<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<Vec<(BlockId, u64)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the ids of best parents for the next block to be produced along with their period
sourcefn get_version<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<Version>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_version<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = RpcResult<Version>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get Massa node version.
sourcefn subscribe_new_blocks<'life0, 'async_trait>(
&'life0 self,
subscription_sink: PendingSubscriptionSink,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn subscribe_new_blocks<'life0, 'async_trait>(
&'life0 self,
subscription_sink: PendingSubscriptionSink,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
New produced block.
sourcefn subscribe_new_blocks_headers<'life0, 'async_trait>(
&'life0 self,
subscription_sink: PendingSubscriptionSink,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn subscribe_new_blocks_headers<'life0, 'async_trait>(
&'life0 self,
subscription_sink: PendingSubscriptionSink,
) -> Pin<Box<dyn Future<Output = SubscriptionResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
New produced blocks headers.
Provided Methods§
Object Safety§
This trait is not object safe.