1 | import type { AnyJson, AnyTuple } from '@polkadot/types-codec/types';
|
2 | import type { StorageEntryMetadataLatest, StorageEntryTypeLatest } from '../interfaces/metadata';
|
3 | import type { SiLookupTypeId } from '../interfaces/scaleInfo';
|
4 | import type { InterfaceTypes, IStorageKey, Registry } from '../types';
|
5 | import type { StorageEntry } from './types';
|
6 | import { Bytes } from '@polkadot/types-codec';
|
7 | interface StorageKeyExtra {
|
8 | method: string;
|
9 | section: string;
|
10 | }
|
11 | export declare function unwrapStorageSi(type: StorageEntryTypeLatest): SiLookupTypeId;
|
12 |
|
13 | export declare function unwrapStorageType(registry: Registry, type: StorageEntryTypeLatest, isOptional?: boolean): keyof InterfaceTypes;
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 | export declare class StorageKey<A extends AnyTuple = AnyTuple> extends Bytes implements IStorageKey<A> {
|
21 | #private;
|
22 | constructor(registry: Registry, value?: string | Uint8Array | StorageKey | StorageEntry | [StorageEntry, unknown[]?], override?: Partial<StorageKeyExtra>);
|
23 | /**
|
24 | * @description Return the decoded arguments (applicable to map with decodable values)
|
25 | */
|
26 | get args(): A;
|
27 | /**
|
28 | * @description The metadata or `undefined` when not available
|
29 | */
|
30 | get meta(): StorageEntryMetadataLatest | undefined;
|
31 | /**
|
32 | * @description The key method or `undefined` when not specified
|
33 | */
|
34 | get method(): string | undefined;
|
35 | /**
|
36 | * @description The output type
|
37 | */
|
38 | get outputType(): string;
|
39 | /**
|
40 | * @description The key section or `undefined` when not specified
|
41 | */
|
42 | get section(): string | undefined;
|
43 | is(key: IStorageKey<AnyTuple>): key is IStorageKey<A>;
|
44 | /**
|
45 | * @description Sets the meta for this key
|
46 | */
|
47 | setMeta(meta?: StorageEntryMetadataLatest, section?: string, method?: string): this;
|
48 | /**
|
49 | * @description Returns the Human representation for this type
|
50 | */
|
51 | toHuman(): AnyJson;
|
52 | /**
|
53 | * @description Returns the raw type for this
|
54 | */
|
55 | toRawType(): string;
|
56 | }
|
57 | export {};
|