UNPKG

1.71 kBTypeScriptView Raw
1import type { SignOptions } from '@polkadot/keyring/types';
2import type { AnyTuple, Codec, IMethod as IMethodBase, INumber, IText } from '@polkadot/types-codec/types';
3import type { FunctionMetadataLatest, StorageEntryMetadataLatest } from '../interfaces/metadata';
4import type { Registry } from './registry';
5export type { ICompact, IEnum, IMap, INumber, IOption, IResult, ISet, IStruct, IText, ITuple, IU8a, IVec } from '@polkadot/types-codec/types';
6export interface IMethod<A extends AnyTuple = AnyTuple, M = FunctionMetadataLatest> extends IMethodBase<A, M> {
7 readonly registry: Registry;
8}
9export interface IKeyringPair {
10 readonly address: string;
11 readonly addressRaw: Uint8Array;
12 readonly publicKey: Uint8Array;
13 sign: (data: Uint8Array, options?: SignOptions) => Uint8Array;
14}
15export interface IRuntimeVersionBase {
16 readonly apis: unknown[];
17 readonly authoringVersion: unknown;
18 readonly implName: unknown;
19 readonly implVersion: unknown;
20 readonly specName: unknown;
21 readonly specVersion: unknown;
22 readonly transactionVersion: unknown;
23}
24export interface IRuntimeVersion extends IRuntimeVersionBase {
25 readonly apis: Codec[];
26 readonly authoringVersion: INumber;
27 readonly implName: IText;
28 readonly implVersion: INumber;
29 readonly specName: IText;
30 readonly specVersion: INumber;
31 readonly transactionVersion: INumber;
32}
33export interface IStorageKey<A extends AnyTuple> {
34 readonly args: A;
35 readonly meta: StorageEntryMetadataLatest | undefined;
36 readonly method: string | undefined;
37 readonly outputType: string;
38 readonly section: string | undefined;
39 is: (key: IStorageKey<AnyTuple>) => key is IStorageKey<A>;
40}