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> { ... } }

Substrate offchain RPC API

Required methods

fn set_local_storage(
    &self,
    kind: StorageKind,
    key: Bytes,
    value: Bytes
) -> Result<()>
[src]

Set offchain local storage under given key and prefix.

fn get_local_storage(
    &self,
    kind: StorageKind,
    key: Bytes
) -> Result<Option<Bytes>>
[src]

Get offchain local storage under given key and prefix.

Loading content...

Provided methods

fn to_delegate<M: Metadata>(self) -> IoDelegate<Self, M>[src]

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

Loading content...

Implementors

Loading content...