import { StorageEntryMetadata as MetaV7 } from '../Metadata/v7/Storage'; import { AnyU8a } from '../types'; import Bytes from './Bytes'; export interface StorageEntry { (arg?: any): Uint8Array; headKey?: Uint8Array; meta: MetaV7; method: string; prefix: string; section: string; toJSON: () => any; } interface Decoded { key?: Uint8Array | string; method?: string; section?: string; } interface StorageKeyExtra { method: string; section: string; } /** * @name StorageKey * @description * A representation of a storage key (typically hashed) in the system. It can be * constructed by passing in a raw key or a StorageEntry with (optional) arguments. */ export default class StorageKey extends Bytes { private _meta?; private _method?; private _outputType?; private _section?; constructor(value?: AnyU8a | StorageKey | StorageEntry | [StorageEntry, any], override?: Partial); static decodeStorageKey(value?: AnyU8a | StorageKey | StorageEntry | [StorageEntry, any]): Decoded; static getMeta(value: StorageKey | StorageEntry | [StorageEntry, any]): MetaV7 | undefined; static getType(value: StorageKey | StorageEntry | [StorageEntry, any]): string | undefined; /** * @description The metadata or `undefined` when not available */ readonly meta: MetaV7 | undefined; /** * @description The key method or `undefined` when not specified */ readonly method: string | undefined; /** * @description The output type, `null` when not available */ readonly outputType: string | undefined; /** * @description The key section or `undefined` when not specified */ readonly section: string | undefined; } export {};