Add offchain_localStorageClear RPC method (#6070)
This commit is contained in:
@@ -404,6 +404,10 @@ declare module '@polkadot/rpc-core/types/jsonrpc' {
|
||||
version: AugmentedRpc<() => Observable<Text>>;
|
||||
};
|
||||
offchain: {
|
||||
/**
|
||||
* Clear offchain local storage under given key and prefix
|
||||
**/
|
||||
localStorageClear: AugmentedRpc<(kind: StorageKind | 'PERSISTENT' | 'LOCAL' | number | Uint8Array, key: Bytes | string | Uint8Array) => Observable<Null>>;
|
||||
/**
|
||||
* Get offchain local storage under given key and prefix
|
||||
**/
|
||||
|
||||
@@ -67,6 +67,7 @@ export default {
|
||||
"mmr_root",
|
||||
"mmr_verifyProof",
|
||||
"mmr_verifyProofStateless",
|
||||
"offchain_localStorageClear",
|
||||
"offchain_localStorageGet",
|
||||
"offchain_localStorageSet",
|
||||
"payment_queryFeeDetails",
|
||||
|
||||
@@ -68,6 +68,7 @@ export default {
|
||||
"mmr_root",
|
||||
"mmr_verifyProof",
|
||||
"mmr_verifyProofStateless",
|
||||
"offchain_localStorageClear",
|
||||
"offchain_localStorageGet",
|
||||
"offchain_localStorageSet",
|
||||
"payment_queryFeeDetails",
|
||||
|
||||
@@ -74,6 +74,7 @@ export default {
|
||||
"mmr_root",
|
||||
"mmr_verifyProof",
|
||||
"mmr_verifyProofStateless",
|
||||
"offchain_localStorageClear",
|
||||
"offchain_localStorageGet",
|
||||
"offchain_localStorageSet",
|
||||
"payment_queryFeeDetails",
|
||||
|
||||
@@ -68,6 +68,7 @@ export default {
|
||||
"mmr_root",
|
||||
"mmr_verifyProof",
|
||||
"mmr_verifyProofStateless",
|
||||
"offchain_localStorageClear",
|
||||
"offchain_localStorageGet",
|
||||
"offchain_localStorageSet",
|
||||
"payment_queryFeeDetails",
|
||||
|
||||
@@ -4,6 +4,21 @@
|
||||
import type { DefinitionsRpc } from '../../types/index.js';
|
||||
|
||||
export const rpc: DefinitionsRpc = {
|
||||
localStorageClear: {
|
||||
description: 'Clear offchain local storage under given key and prefix',
|
||||
isUnsafe: true,
|
||||
params: [
|
||||
{
|
||||
name: 'kind',
|
||||
type: 'StorageKind'
|
||||
},
|
||||
{
|
||||
name: 'key',
|
||||
type: 'Bytes'
|
||||
}
|
||||
],
|
||||
type: 'Null'
|
||||
},
|
||||
localStorageGet: {
|
||||
description: 'Get offchain local storage under given key and prefix',
|
||||
isUnsafe: true,
|
||||
|
||||
Reference in New Issue
Block a user