@neo-one/server-plugin-network
Version:
NEO•ONE Server network plugin.
49 lines (48 loc) • 1.77 kB
TypeScript
import { Monitor } from '@neo-one/monitor';
import { FullNodeEnvironment, FullNodeOptions } from '@neo-one/node';
import { Binary, Config, DescribeTable } from '@neo-one/server-plugin';
import { NodeSettings } from '../types';
import { NodeAdapter, NodeStatus } from './NodeAdapter';
export interface NodeConfig {
readonly log: {
readonly level: string;
readonly maxSize: number;
readonly maxFiles: number;
};
readonly settings: {
readonly test?: boolean;
readonly privateNet?: boolean;
readonly secondsPerBlock?: number;
readonly standbyValidators?: readonly string[];
readonly address?: string;
};
readonly environment: FullNodeEnvironment;
readonly options: FullNodeOptions;
}
export declare const createNodeConfig: ({ dataPath, defaultConfig, }: {
readonly dataPath: string;
readonly defaultConfig?: NodeConfig | undefined;
}) => Config<NodeConfig>;
export declare class NEOONENodeAdapter extends NodeAdapter {
private mutableConfig;
private mutableProcess;
constructor({ monitor, name, binary, dataPath, settings, }: {
readonly monitor: Monitor;
readonly name: string;
readonly binary: Binary;
readonly dataPath: string;
readonly settings: NodeSettings;
});
getDebug(): DescribeTable;
getNodeStatus(): NodeStatus;
protected isLive(): Promise<boolean>;
protected isReady(): Promise<boolean>;
protected createInternal(): Promise<void>;
protected updateInternal(settings: NodeSettings): Promise<void>;
protected startInternal(): Promise<void>;
protected stopInternal(): Promise<void>;
private checkRPC;
private getAddress;
private writeSettings;
private createConfig;
}