Trait SidechainRpcApiServer

Source
pub trait SidechainRpcApiServer:
    Sized
    + Send
    + Sync
    + 'static {
    // Required methods
    fn get_params(&self) -> RpcResult<GetParamsOutput>;
    fn get_status<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = RpcResult<GetStatusResponse>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

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

Server trait implementation for the SidechainRpcApi RPC API.

Required Methods§

Source

fn get_params(&self) -> RpcResult<GetParamsOutput>

Gets the genesis UTXO of the Partner Chain

note: the legacy name get_params comes from the times when there were more parameters that defined a Partner Chain than a single genesis UTXO

Source

fn get_status<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = RpcResult<GetStatusResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Gets information about current Partner Chain and Cardano slot and epoch number

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§

Source§

impl<C, Block> SidechainRpcApiServer for SidechainRpc<C, Block>
where Block: BlockT, C: Send + Sync + 'static + ProvideRuntimeApi<Block> + GetBestHash<Block>, C::Api: SlotApi<Block> + GetGenesisUtxo<Block>,