pub trait ChainSpecApiServer: Sized + Send + Sync + 'static {
    // Required methods
    fn chain_spec_unstable_chain_name(&self) -> RpcResult<String>;
    fn chain_spec_unstable_genesis_hash(&self) -> RpcResult<String>;
    fn chain_spec_unstable_properties(&self) -> RpcResult<Properties>;

    // Provided method
    fn into_rpc(self) -> RpcModule<Self> { ... }
}
Expand description

Server trait implementation for the ChainSpecApi RPC API.

Required Methods§

source

fn chain_spec_unstable_chain_name(&self) -> RpcResult<String>

Get the chain name, as present in the chain specification.

Unstable

This method is unstable and subject to change in the future.

source

fn chain_spec_unstable_genesis_hash(&self) -> RpcResult<String>

Get the chain’s genesis hash.

Unstable

This method is unstable and subject to change in the future.

source

fn chain_spec_unstable_properties(&self) -> RpcResult<Properties>

Get the properties of the chain, as present in the chain specification.

Note

The json whitespaces are not guaranteed to persist.

Unstable

This method is unstable and subject to change in the future.

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.

Implementors§