pub trait OffchainApiServer: Sized + Send + Sync + 'static {
    fn set_local_storage(
        &self,
        kind: StorageKind,
        key: Bytes,
        value: Bytes
    ) -> RpcResult<()>; fn get_local_storage(
        &self,
        kind: StorageKind,
        key: Bytes
    ) -> RpcResult<Option<Bytes>>; fn into_rpc(self) -> RpcModule<Self> { ... } }
Expand description

Server trait implementation for the OffchainApi RPC API.

Required Methods§

source

fn set_local_storage(
    &self,
    kind: StorageKind,
    key: Bytes,
    value: Bytes
) -> RpcResult<()>

Set offchain local storage under given key and prefix.

source

fn get_local_storage(
    &self,
    kind: StorageKind,
    key: Bytes
) -> RpcResult<Option<Bytes>>

Get offchain local storage under given key and prefix.

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§