/// <reference types="node" />
interface MessageChannelOptions {
    networkId: string;
    protocolVersion: string;
    softwareVersion: string;
    nodeType: number;
    hostname: string;
    port: number;
    cert: Buffer;
    key: Buffer;
    onMessage: (message: Buffer) => void;
    connectionTimeout: number;
}
interface Message {
    f: string;
    d: any;
}
declare class MessageChannel {
    private readonly onMessage;
    private ws;
    private inboundDataBuffer;
    readonly hostname: string;
    readonly port: number;
    readonly connectionTimeout: number;
    readonly networkId: string;
    readonly protocolVersion: string;
    readonly softwareVersion: string;
    readonly nodeType: number;
    readonly cert: Buffer;
    readonly key: Buffer;
    constructor({ networkId, protocolVersion, softwareVersion, nodeType, hostname, port, onMessage, connectionTimeout, cert, key }: MessageChannelOptions);
    connect(): Promise<void>;
    sendMessage(message: Buffer): void;
    close(): void;
    private messageHandler;
    private onConnected;
    private onClose;
}
export { MessageChannel, Message };
