Trait sc_rpc_api::offchain::OffchainApiServer  
source · pub trait OffchainApiServer: Sized + Send + Sync + 'static {
    // Required methods
    fn set_local_storage(
        &self,
        kind: StorageKind,
        key: Bytes,
        value: Bytes
    ) -> RpcResult<()>;
    fn get_local_storage(
        &self,
        kind: StorageKind,
        key: Bytes
    ) -> RpcResult<Option<Bytes>>;
    // Provided method
    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
) -> RpcResult<()>
 
fn set_local_storage( &self, kind: StorageKind, key: Bytes, value: Bytes ) -> RpcResult<()>
Set offchain local storage under given key and prefix.
sourcefn get_local_storage(
    &self,
    kind: StorageKind,
    key: Bytes
) -> RpcResult<Option<Bytes>>
 
fn get_local_storage( &self, kind: StorageKind, key: Bytes ) -> RpcResult<Option<Bytes>>
Get offchain local storage under given key and prefix.