/// import { ListenerFn } from 'eventemitter2'; import { Logger } from '../logger'; import { EndpointInfo } from '../types'; import { BaseChannel, InvokeRequest } from './channels/base_channel'; import { EventsDefinition } from './event'; import { IPCServer } from './ipc/ipc_server'; import * as JSONRPC from './jsonrpc'; interface BusConfiguration { readonly internalIPCServer: IPCServer; readonly chainID: Buffer; } interface RegisterChannelOptions { readonly type: string; readonly channel: BaseChannel; readonly socketPath?: string; } export declare class Bus { private readonly _endpointInfos; private readonly _events; private readonly _channels; private readonly _rpcClients; private readonly _internalIPCServer; private readonly _rpcRequestIds; private readonly _emitter; private readonly _handleRPCResponse; private readonly _handleRPC; private readonly _handleEvents; private _logger; constructor(config: BusConfiguration); start(logger: Logger): Promise; registerChannel(namespace: string, events: EventsDefinition, endpointInfo: { [key: string]: EndpointInfo; }, options: RegisterChannelOptions): Promise; invoke(rawRequest: string | JSONRPC.RequestObject, context?: InvokeRequest['context']): Promise>; publish(rawRequest: string | JSONRPC.NotificationRequest): void; subscribe(eventName: string, cb: ListenerFn): void; unsubscribe(eventName: string, cb: ListenerFn): void; once(eventName: string, cb: ListenerFn): this; getEndpoints(): ReadonlyArray; getEvents(): ReadonlyArray; cleanup(): Promise; private _setupIPCInternalServer; } export {};