QueryableStorage

A helper to encode key & decode value for a storage entry

Constructors

Properties

pallet: {
    calls: undefined | number;
    constants: {
        docs: string[];
        name: string;
        typeId: number;
        value: `0x${string}`;
    }[];
    docs: string[];
    error: undefined | number;
    event: undefined | number;
    index: number;
    name: string;
    storage: undefined | {
        entries: {
            default: `0x${string}`;
            docs: string[];
            modifier: string;
            name: string;
            storageType: {
                type: "Plain";
                value: {
                    valueTypeId: number;
                };
            } | {
                type: "Map";
                value: {
                    hashers: (
                        | "identity"
                        | "blake2_128"
                        | "blake2_256"
                        | "blake2_128Concat"
                        | "twox128"
                        | "twox256"
                        | "twox64Concat")[];
                    keyTypeId: number;
                    valueTypeId: number;
                };
            };
        }[];
        prefix: string;
    };
}
palletName: string
storageEntry: {
    default: `0x${string}`;
    docs: string[];
    modifier: string;
    name: string;
    storageType: {
        type: "Plain";
        value: {
            valueTypeId: number;
        };
    } | {
        type: "Map";
        value: {
            hashers: (
                | "identity"
                | "blake2_128"
                | "blake2_256"
                | "blake2_128Concat"
                | "twox128"
                | "twox256"
                | "twox64Concat")[];
            keyTypeId: number;
            valueTypeId: number;
        };
    };
}
storageItem: string

Accessors

  • get prefixKey(): `0x${string}`
  • Returns `0x${string}`

  • get prefixKeyAsU8a(): Uint8Array
  • Returns Uint8Array

Methods

  • Decode storage key to plain key input Only storage keys that hashed by twox64Concat, blake2_128Concat, or identity can be decoded

    Parameters

    • key: `0x${string}`

    Returns any

  • Decode raw/bytes storage data to plain value

    Parameters

    • Optionalraw: null | `0x${string}`

    Returns any

  • Encode plain key input to raw/bytes storage key

    Parameters

    • OptionalkeyInput: any

    Returns `0x${string}`