1 | import { Monitor } from '@neo-one/monitor-esnext-esm';
|
2 | import { FullNodeEnvironment, FullNodeOptions } from '@neo-one/node-esnext-esm';
|
3 | import { Binary, Config, DescribeTable } from '@neo-one/server-plugin-esnext-esm';
|
4 | import { NodeSettings } from '../types';
|
5 | import { NodeAdapter, NodeStatus } from './NodeAdapter';
|
6 | export interface NodeConfig {
|
7 | readonly log: {
|
8 | readonly level: string;
|
9 | readonly maxSize: number;
|
10 | readonly maxFiles: number;
|
11 | };
|
12 | readonly settings: {
|
13 | readonly test?: boolean;
|
14 | readonly privateNet?: boolean;
|
15 | readonly secondsPerBlock?: number;
|
16 | readonly standbyValidators?: ReadonlyArray<string>;
|
17 | readonly address?: string;
|
18 | };
|
19 | readonly environment: FullNodeEnvironment;
|
20 | readonly options: FullNodeOptions;
|
21 | }
|
22 | export declare const createNodeConfig: ({ dataPath, defaultConfig, }: {
|
23 | readonly dataPath: string;
|
24 | readonly defaultConfig?: NodeConfig | undefined;
|
25 | }) => Config<NodeConfig>;
|
26 | export declare class NEOONENodeAdapter extends NodeAdapter {
|
27 | private mutableConfig;
|
28 | private mutableProcess;
|
29 | constructor({ monitor, name, binary, dataPath, settings, }: {
|
30 | readonly monitor: Monitor;
|
31 | readonly name: string;
|
32 | readonly binary: Binary;
|
33 | readonly dataPath: string;
|
34 | readonly settings: NodeSettings;
|
35 | });
|
36 | getDebug(): DescribeTable;
|
37 | getNodeStatus(): NodeStatus;
|
38 | protected isLive(): Promise<boolean>;
|
39 | protected isReady(): Promise<boolean>;
|
40 | protected createInternal(): Promise<void>;
|
41 | protected updateInternal(settings: NodeSettings): Promise<void>;
|
42 | protected startInternal(): Promise<void>;
|
43 | protected stopInternal(): Promise<void>;
|
44 | private checkRPC;
|
45 | private getAddress;
|
46 | private writeSettings;
|
47 | private createConfig;
|
48 | }
|