Skip to main content

RewardStateService

Trait RewardStateService 

Source
pub trait RewardStateService:
    Send
    + Sync
    + 'static {
    // Required methods
    fn get_reward_balance<'life0, 'async_trait>(
        &'life0 self,
        request: Request<GetRewardBalanceRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<RewardBalanceResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_reward_account_proof<'life0, 'async_trait>(
        &'life0 self,
        request: Request<GetRewardAccountProofRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<RewardAccountProofResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_reward_claim_input<'life0, 'async_trait>(
        &'life0 self,
        request: Request<GetRewardClaimInputRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<RewardClaimInputResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_reward_amounts<'life0, 'async_trait>(
        &'life0 self,
        request: Request<GetRewardAmountsRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<RewardAmountsResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_reward_merkle_tree_v2<'life0, 'async_trait>(
        &'life0 self,
        request: Request<GetRewardMerkleTreeV2Request>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<RewardMerkleTreeV2Response>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Generated trait containing gRPC methods that should be implemented for use with RewardStateServiceServer.

Required Methods§

Source

fn get_reward_balance<'life0, 'async_trait>( &'life0 self, request: Request<GetRewardBalanceRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<RewardBalanceResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get an account’s lifetime rewards at a height finalized by the light client contract, or at the newest one

Source

fn get_reward_account_proof<'life0, 'async_trait>( &'life0 self, request: Request<GetRewardAccountProofRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<RewardAccountProofResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get an account’s lifetime rewards with the Merkle proof backing them, at a height finalized by the light client contract, or at the newest one

Source

fn get_reward_claim_input<'life0, 'async_trait>( &'life0 self, request: Request<GetRewardClaimInputRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<RewardClaimInputResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get everything needed to call claimRewards on the L1 contract

Source

fn get_reward_amounts<'life0, 'async_trait>( &'life0 self, request: Request<GetRewardAmountsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<RewardAmountsResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get a page of reward amounts at a block height

Source

fn get_reward_merkle_tree_v2<'life0, 'async_trait>( &'life0 self, request: Request<GetRewardMerkleTreeV2Request>, ) -> Pin<Box<dyn Future<Output = Result<Response<RewardMerkleTreeV2Response>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get this node’s serialized RewardMerkleTreeV2 snapshot at a block height

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§