1 | import { SubscriptionResponse, ErrorResponse, SuccessResponse } from "frontblock-generic/Service";
|
2 | import { Coin, AccountMap, TransactionMap } from "frontblock-generic/Types";
|
3 | import { FrontblockApi as FrontblockApi } from "frontblock-generic/Api";
|
4 | import { Plugin, socketioRPC } from "frontblock-generic/Plugin";
|
5 | export declare type FrontblockApiConf = {
|
6 | apiHost: string;
|
7 | apiPort: number;
|
8 | tls?: boolean;
|
9 | apiKey?: string;
|
10 | };
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 | export default class FrontblockApiClient implements FrontblockApi, Plugin {
|
17 | protected apikey: string;
|
18 | protected conf: FrontblockApiConf;
|
19 | protected socket: any;
|
20 | private started;
|
21 | constructor(conf?: FrontblockApiConf);
|
22 | exportRPCs(): socketioRPC[];
|
23 | start(): void;
|
24 | stop(): void;
|
25 | subscribe<C extends Coin>(apikey: string, coin: C, account: AccountMap[C], callback: (tx: TransactionMap[C]) => void): Promise<SubscriptionResponse | ErrorResponse>;
|
26 | unsubscribe(apikey: string, uid: string): Promise<ErrorResponse | SuccessResponse>;
|
27 | getPluginList(): Promise<string[]>;
|
28 | }
|