1 | import type { SignerPayloadRawBase } from '@polkadot/types/types';
|
2 | import type { ApiOptions, ApiTypes, DecorateMethod, Signer } from '../types/index.js';
|
3 | import { Getters } from './Getters.js';
|
4 | interface KeyringSigner {
|
5 | sign(message: Uint8Array): Uint8Array;
|
6 | }
|
7 | interface SignerRawOptions {
|
8 | signer?: Signer;
|
9 | }
|
10 | export declare abstract class ApiBase<ApiType extends ApiTypes> extends Getters<ApiType> {
|
11 | |
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 | constructor(options: ApiOptions | undefined, type: ApiTypes, decorateMethod: DecorateMethod<ApiType>);
|
30 | /**
|
31 | * @description Connect from the underlying provider, halting all network traffic
|
32 | */
|
33 | connect(): Promise<void>;
|
34 | /**
|
35 | * @description Disconnect from the underlying provider, halting all network traffic
|
36 | */
|
37 | disconnect(): Promise<void>;
|
38 | /**
|
39 | * @description Set an external signer which will be used to sign extrinsic when account passed in is not KeyringPair
|
40 | */
|
41 | setSigner(signer: Signer | undefined): void;
|
42 | /**
|
43 | * @description Signs a raw signer payload, string or Uint8Array
|
44 | */
|
45 | sign(address: KeyringSigner | string, data: SignerPayloadRawBase, { signer }?: SignerRawOptions): Promise<string>;
|
46 | }
|
47 | export {};
|