Trait sc_rpc::offchain::OffchainApi[][src]

pub trait OffchainApi: 'static + Send + Sync {
    fn set_local_storage(
        &self,
        kind: StorageKind,
        key: Bytes,
        value: Bytes
    ) -> Result<(), Error>;
fn get_local_storage(
        &self,
        kind: StorageKind,
        key: Bytes
    ) -> Result<Option<Bytes>, Error>; fn to_delegate<M>(self) -> IoDelegate<Self, M>
    where
        M: Metadata
, { ... } }
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