UNPKG

1.12 kBTypeScriptView Raw
1import type { Vec } from '@polkadot/types-codec';
2import type { Registry } from '@polkadot/types-codec/types';
3import type { ILookup, TypeDef } from '@polkadot/types-create/types';
4import type { PortableType } from '../../interfaces/metadata';
5import type { SiLookupTypeId, SiType } from '../../interfaces/scaleInfo';
6import { Struct } from '@polkadot/types-codec';
7export 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}