Trait SimnodeApiServer

Source
pub trait SimnodeApiServer:
    Sized
    + Send
    + Sync
    + 'static {
    // Required methods
    fn author_extrinsic(&self, call: Bytes, account: String) -> RpcResult<Bytes>;
    fn revert_blocks(&self, n: u32) -> RpcResult<()>;
    fn upgrade_signal<'life0, 'async_trait>(
        &'life0 self,
        go_ahead: bool,
    ) -> Pin<Box<dyn Future<Output = RpcResult<()>> + 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 SimnodeApi RPC API.

Required Methods§

Source

fn author_extrinsic(&self, call: Bytes, account: String) -> RpcResult<Bytes>

Constructs an extrinsic with an empty signature and the given AccountId as the Signer using simnode’s runtime api.

Source

fn revert_blocks(&self, n: u32) -> RpcResult<()>

reverts n number of blocks and their state from the chain.

Source

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

Insert the [UpgradeGoAhead] command into the inherents as if it came from the relay chain. This greenlights/aborts a pending runtime upgrade.

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§