1 | import type { Option, Text, Vec } from '@polkadot/types-codec';
|
2 | import type { LookupString, Registry } from '@polkadot/types-codec/types';
|
3 | import type { ILookup, TypeDef } from '@polkadot/types-create/types';
|
4 | import type { PortableType } from '../../interfaces/metadata/index.js';
|
5 | import type { SiLookupTypeId, SiType } from '../../interfaces/scaleInfo/index.js';
|
6 | import { Struct } from '@polkadot/types-codec';
|
7 | export declare class PortableRegistry extends Struct implements ILookup {
|
8 | #private;
|
9 | constructor(registry: Registry, value?: Uint8Array, isContract?: boolean);
|
10 | /**
|
11 | * @description Returns all the available type names for this chain
|
12 | **/
|
13 | get names(): string[];
|
14 | /**
|
15 | * @description The types of the registry
|
16 | */
|
17 | get types(): Vec<PortableType>;
|
18 | /**
|
19 | * @description Register all available types into the registry (generally for internal usage)
|
20 | */
|
21 | register(): void;
|
22 | /**
|
23 | * @description Returns the name for a specific lookup
|
24 | */
|
25 | getName(lookupId: SiLookupTypeId | LookupString | number): string | undefined;
|
26 | /**
|
27 | * @description Finds a specific type in the registry
|
28 | */
|
29 | getSiType(lookupId: SiLookupTypeId | LookupString | number): SiType;
|
30 | /**
|
31 | * @description Lookup the type definition for the index
|
32 | */
|
33 | getTypeDef(lookupId: SiLookupTypeId | LookupString | number): TypeDef;
|
34 | /**
|
35 | * @description For a specific field, perform adjustments to not have built-in conflicts
|
36 | */
|
37 | sanitizeField(name: Option<Text>): [string | null, string | null];
|
38 | }
|