Skip to main content

MerklizedStateService

Trait MerklizedStateService 

Source
pub trait MerklizedStateService:
    Send
    + Sync
    + 'static {
    // Required methods
    fn get_block_state_path<'life0, 'async_trait>(
        &'life0 self,
        request: Request<GetBlockStatePathRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<MerklePathResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_fee_state_path<'life0, 'async_trait>(
        &'life0 self,
        request: Request<GetFeeStatePathRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<MerklePathResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_latest_fee_balance<'life0, 'async_trait>(
        &'life0 self,
        request: Request<GetLatestFeeBalanceRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<FeeBalanceResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_state_height<'life0, 'async_trait>(
        &'life0 self,
        request: Request<GetStateHeightRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<StateHeightResponse>, 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 MerklizedStateServiceServer.

Required Methods§

Source

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

Get the Merkle path to one leaf of the block merkle tree, which commits to past block headers. Exactly one of height or commit selects the snapshot. None or both is a 400

Source

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

Get the Merkle path to one account of the fee merkle tree, which holds the fee balances. Exactly one of height or commit selects the snapshot. None or both is a 400

Source

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

Get an account’s fee balance in the newest persisted state

Source

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

Get the height of the newest persisted merklized state, which every tree shares

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§