Trait sc_rpc_api::offchain::OffchainApi[][src]

pub trait OffchainApi: Sized + Send + Sync + 'static {
    fn set_local_storage(
        &self,
        kind: StorageKind,
        key: Bytes,
        value: Bytes
    ) -> Result<()>;
fn get_local_storage(
        &self,
        kind: StorageKind,
        key: Bytes
    ) -> Result<Option<Bytes>>; fn to_delegate<M: Metadata>(self) -> IoDelegate<Self, M> { ... } }
Expand description

Substrate offchain RPC API

Required methods

Set offchain local storage under given key and prefix.

Get offchain local storage under given key and prefix.

Provided methods

Create an IoDelegate, wiring rpc calls to the trait methods.

Implementors