verusd-web
Version:
A Verus Blockchain library that enables a bi-directional communication with the Verus and other Verus PBaas chains.
30 lines (29 loc) • 927 B
TypeScript
import { ServerInterface } from './ServerInterface';
import { WsServer } from './WsServer';
import { type RouteConfig } from './RestApiRoutesService';
export interface ClientMessageHookInterface {
messageReceived(client: WebSocket, rawMessage?: string): Object;
}
export interface HttpServerConfig {
port: number;
wsServer: WsServer;
clientHooks: ClientMessageHookInterface[];
customApiRoutes: RouteConfig[];
apiToken: string;
}
export declare class HttpServer implements ServerInterface {
private expressApp?;
private wsServer;
private port;
private clientHookInterface;
private customApiRoutes;
private apiToken;
private readonly wsSuffix;
constructor(config: HttpServerConfig);
close(): boolean;
open(): HttpServer;
private attachWsServerConnection;
private static iterateHookOperations;
private setupDefaultRpcApis;
private setupCustomApis;
}