Trait sc_rpc::offchain::OffchainApiServer
source · pub trait OffchainApiServer: 'static + Sized + 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 into_rpc(self) -> RpcModule<Self> { ... }
}
Expand description
Server trait implementation for the OffchainApi
RPC API.
Required Methods§
sourcefn set_local_storage(
&self,
kind: StorageKind,
key: Bytes,
value: Bytes
) -> Result<(), Error>
fn set_local_storage(
&self,
kind: StorageKind,
key: Bytes,
value: Bytes
) -> Result<(), Error>
Set offchain local storage under given key and prefix.
sourcefn get_local_storage(
&self,
kind: StorageKind,
key: Bytes
) -> Result<Option<Bytes>, Error>
fn get_local_storage(
&self,
kind: StorageKind,
key: Bytes
) -> Result<Option<Bytes>, Error>
Get offchain local storage under given key and prefix.