1 | import type { Option, Text, Vec } from '@polkadot/types-codec';
|
2 | import type { Registry } from '@polkadot/types-codec/types';
|
3 | import type { ILookup, TypeDef } from '@polkadot/types-create/types';
|
4 | import type { PortableType } from '../../interfaces/metadata';
|
5 | import type { SiLookupTypeId, SiType } from '../../interfaces/scaleInfo';
|
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 | get names(): string[];
|
11 | /**
|
12 | * @description The types of the registry
|
13 | */
|
14 | get types(): Vec<PortableType>;
|
15 | register(): void;
|
16 | /**
|
17 | * @description Returns the name for a specific lookup
|
18 | */
|
19 | getName(lookupId: SiLookupTypeId | string | number): string | undefined;
|
20 | /**
|
21 | * @description Finds a specific type in the registry
|
22 | */
|
23 | getSiType(lookupId: SiLookupTypeId | string | number): SiType;
|
24 | /**
|
25 | * @description Lookup the type definition for the index
|
26 | */
|
27 | getTypeDef(lookupId: SiLookupTypeId | string | number): TypeDef;
|
28 | sanitizeField(name: Option<Text>): [string | null, string | null];
|
29 | }
|