1 |
|
2 | import type { ApiTypes, DeriveCustom, QueryableStorageMulti } from '@polkadot/api-base/types';
|
3 | import type { ApiInterfaceRx as ApiInterfaceBase } from '@polkadot/api-base/types/api';
|
4 | import type { QueryableCalls } from '@polkadot/api-base/types/calls';
|
5 | import type { QueryableConsts } from '@polkadot/api-base/types/consts';
|
6 | import type { DecoratedErrors } from '@polkadot/api-base/types/errors';
|
7 | import type { DecoratedEvents } from '@polkadot/api-base/types/events';
|
8 | import type { QueryableStorage } from '@polkadot/api-base/types/storage';
|
9 | import type { ProviderInterface, ProviderInterfaceEmitted } from '@polkadot/rpc-provider/types';
|
10 | import type { ExtDef } from '@polkadot/types/extrinsic/signedExtensions/types';
|
11 | import type { Call, Extrinsic, Hash, RuntimeVersionPartial } from '@polkadot/types/interfaces';
|
12 | import type { CallFunction, DefinitionRpc, DefinitionRpcSub, DefinitionsCall, RegisteredTypes, Registry, RegistryError, SignatureOptions, Signer } from '@polkadot/types/types';
|
13 | import type { BN } from '@polkadot/util';
|
14 | import type { HexString } from '@polkadot/util/types';
|
15 | import type { ApiBase } from '../base/index.js';
|
16 | import type { SubmittableExtrinsic } from '../types/submittable.js';
|
17 | import type { AllDerives } from '../util/decorate.js';
|
18 | export type { Signer, SignerResult } from '@polkadot/types/types';
|
19 | export { ApiBase } from '../base/index.js';
|
20 | export * from '@polkadot/api/types/calls';
|
21 | export * from '@polkadot/api/types/consts';
|
22 | export * from '@polkadot/api/types/errors';
|
23 | export * from '@polkadot/api/types/events';
|
24 | export * from '@polkadot/api/types/storage';
|
25 | export * from '@polkadot/api/types/submittable';
|
26 | export * from '@polkadot/api-base/types';
|
27 | export interface ApiInterfaceRx extends ApiInterfaceBase {
|
28 | derive: AllDerives<'rxjs'>;
|
29 | }
|
30 | export interface ApiOptions extends RegisteredTypes {
|
31 | |
32 |
|
33 |
|
34 | derives?: DeriveCustom;
|
35 | |
36 |
|
37 |
|
38 | initWasm?: boolean;
|
39 | |
40 |
|
41 |
|
42 | isPedantic?: boolean;
|
43 | |
44 |
|
45 |
|
46 |
|
47 | metadata?: Record<string, HexString>;
|
48 | |
49 |
|
50 |
|
51 | noInitWarn?: boolean;
|
52 | |
53 |
|
54 |
|
55 |
|
56 | provider?: ProviderInterface;
|
57 | |
58 |
|
59 |
|
60 | registry?: Registry;
|
61 | |
62 |
|
63 |
|
64 | rpc?: Record<string, Record<string, DefinitionRpc | DefinitionRpcSub>>;
|
65 | |
66 |
|
67 |
|
68 | runtime?: DefinitionsCall;
|
69 | |
70 |
|
71 |
|
72 | signedExtensions?: ExtDef;
|
73 | |
74 |
|
75 |
|
76 | signer?: Signer;
|
77 | |
78 |
|
79 |
|
80 | source?: ApiBase<any>;
|
81 | |
82 |
|
83 |
|
84 | throwOnConnect?: boolean;
|
85 | |
86 |
|
87 |
|
88 | throwOnUnknown?: boolean;
|
89 | }
|
90 | export type ApiInterfaceEvents = ProviderInterfaceEmitted | 'ready' | 'decorated';
|
91 | export interface SignerOptions extends SignatureOptions {
|
92 | blockNumber: BN;
|
93 | genesisHash: Hash;
|
94 | }
|
95 | export interface ApiDecoration<ApiType extends ApiTypes> {
|
96 | call: QueryableCalls<ApiType>;
|
97 | consts: QueryableConsts<ApiType>;
|
98 | errors: DecoratedErrors<ApiType>;
|
99 | events: DecoratedEvents<ApiType>;
|
100 | query: QueryableStorage<ApiType>;
|
101 | registry: Registry;
|
102 | runtimeVersion: RuntimeVersionPartial;
|
103 | rx: {
|
104 | call: QueryableCalls<'rxjs'>;
|
105 | query: QueryableStorage<'rxjs'>;
|
106 | };
|
107 | tx: (extrinsic: Call | Extrinsic | Uint8Array | string) => SubmittableExtrinsic<ApiType>;
|
108 | findCall(callIndex: Uint8Array | string): CallFunction;
|
109 | findError(errorIndex: Uint8Array | string): RegistryError;
|
110 | queryMulti: QueryableStorageMulti<ApiType>;
|
111 | }
|