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