pub mod error;
use error::Error;
use jsonrpsee::proc_macros::rpc;
use sp_core::{offchain::StorageKind, Bytes};
#[rpc(client, server)]
pub trait OffchainApi {
#[method(name = "offchain_localStorageSet", with_extensions)]
fn set_local_storage(&self, kind: StorageKind, key: Bytes, value: Bytes) -> Result<(), Error>;
#[method(name = "offchain_localStorageClear", with_extensions)]
fn clear_local_storage(&self, kind: StorageKind, key: Bytes) -> Result<(), Error>;
#[method(name = "offchain_localStorageGet", with_extensions)]
fn get_local_storage(&self, kind: StorageKind, key: Bytes) -> Result<Option<Bytes>, Error>;
}