pub trait PhronNodeApiServer<B, BE>: Sized + Send + Sync + 'static {
    // Required methods
    fn emergency_finalize(
        &self,
        justification: Bytes,
        hash: BlockHash,
        number: BlockNumber
    ) -> RpcResult<()>;
    fn block_author(&self, hash: BlockHash) -> RpcResult<Option<AccountId>>;
    fn ready(&self) -> RpcResult<bool>;
    fn validator_network_info(
        &self
    ) -> RpcResult<HashMap<AccountId, ValidatorAddressingInfo>>;

    // Provided method
    fn into_rpc(self) -> RpcModule<Self>
       where B: Send + Sync + 'static,
             BE: Send + Sync + 'static { ... }
}
Expand description

Server trait implementation for the PhronNodeApi RPC API.

Required Methods§

source

fn emergency_finalize( &self, justification: Bytes, hash: BlockHash, number: BlockNumber ) -> RpcResult<()>

Finalize the block with given hash and number using attached signature. Returns the empty string or an error.

source

fn block_author(&self, hash: BlockHash) -> RpcResult<Option<AccountId>>

Get the author of the block with given hash.

source

fn ready(&self) -> RpcResult<bool>

source

fn validator_network_info( &self ) -> RpcResult<HashMap<AccountId, ValidatorAddressingInfo>>

Provided Methods§

source

fn into_rpc(self) -> RpcModule<Self>
where B: Send + Sync + 'static, BE: Send + Sync + 'static,

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

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<B, Client, BE, SO> PhronNodeApiServer<B, BE> for PhronNode<Client, SO>
where B: BlockT<Hash = H256> + 'static, BE: Backend<B> + 'static, Client: HeaderBackend<B> + StorageProvider<B, BE> + 'static, SO: SyncOracle + Send + Sync + 'static,