PosRpcServer

Trait PosRpcServer 

Source
pub trait PosRpcServer:
    Sized
    + Send
    + Sync
    + 'static {
Show 15 methods // Required methods fn pos_status(&self) -> RpcResult<Status>; fn pos_account( &self, address: H256, view: Option<U64>, ) -> RpcResult<Account>; fn pos_account_by_pow_address( &self, address: RpcAddress, view: Option<U64>, ) -> RpcResult<Account>; fn pos_committee(&self, view: Option<U64>) -> RpcResult<CommitteeState>; fn pos_block_by_hash(&self, hash: H256) -> RpcResult<Option<Block>>; fn pos_block_by_number( &self, number: BlockNumber, ) -> RpcResult<Option<Block>>; fn pos_transaction_by_number( &self, number: U64, ) -> RpcResult<Option<Transaction>>; fn pos_consensus_blocks(&self) -> RpcResult<Vec<Block>>; fn pos_get_epoch_state(&self, epoch: U64) -> RpcResult<Option<EpochState>>; fn pos_get_ledger_info_by_epoch( &self, epoch: U64, ) -> RpcResult<Option<LedgerInfoWithSignatures>>; fn pos_get_ledger_info_by_block_number( &self, number: BlockNumber, ) -> RpcResult<Option<LedgerInfoWithSignatures>>; fn pos_get_ledger_info_by_epoch_and_round( &self, epoch: U64, round: U64, ) -> RpcResult<Option<LedgerInfoWithSignatures>>; fn pos_get_ledger_infos_by_epoch( &self, start_epoch: U64, end_epoch: U64, ) -> RpcResult<Vec<LedgerInfoWithSignatures>>; fn pos_get_rewards_by_epoch( &self, epoch: U64, ) -> RpcResult<Option<PoSEpochReward>>; // Provided method fn into_rpc(self) -> RpcModule<Self> { ... }
}
Expand description

Server trait implementation for the PosRpc RPC API.

Required Methods§

Source

fn pos_status(&self) -> RpcResult<Status>

Source

fn pos_account(&self, address: H256, view: Option<U64>) -> RpcResult<Account>

Source

fn pos_account_by_pow_address( &self, address: RpcAddress, view: Option<U64>, ) -> RpcResult<Account>

Source

fn pos_committee(&self, view: Option<U64>) -> RpcResult<CommitteeState>

Source

fn pos_block_by_hash(&self, hash: H256) -> RpcResult<Option<Block>>

Source

fn pos_block_by_number(&self, number: BlockNumber) -> RpcResult<Option<Block>>

Source

fn pos_transaction_by_number( &self, number: U64, ) -> RpcResult<Option<Transaction>>

Source

fn pos_consensus_blocks(&self) -> RpcResult<Vec<Block>>

Source

fn pos_get_epoch_state(&self, epoch: U64) -> RpcResult<Option<EpochState>>

Source

fn pos_get_ledger_info_by_epoch( &self, epoch: U64, ) -> RpcResult<Option<LedgerInfoWithSignatures>>

Source

fn pos_get_ledger_info_by_block_number( &self, number: BlockNumber, ) -> RpcResult<Option<LedgerInfoWithSignatures>>

Source

fn pos_get_ledger_info_by_epoch_and_round( &self, epoch: U64, round: U64, ) -> RpcResult<Option<LedgerInfoWithSignatures>>

Source

fn pos_get_ledger_infos_by_epoch( &self, start_epoch: U64, end_epoch: U64, ) -> RpcResult<Vec<LedgerInfoWithSignatures>>

Source

fn pos_get_rewards_by_epoch( &self, epoch: U64, ) -> RpcResult<Option<PoSEpochReward>>

Provided Methods§

Source

fn into_rpc(self) -> RpcModule<Self>

Collects all the methods and subscriptions defined in the trait and adds them into a single RpcModule.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§