import { Buffer } from '../util'; import { IHandshakeInit, IReader, IHandshakeInitOptions, IHandshakeAccept, IHandshakeAcceptMessage, IHandshakeAcceptOptions, IHandshakeConfirmation, IHandshakeAcceptJSON, IHandshakeConfirmationOptions, IHandshakeConfirmationJSON, IConnection, IHandshakeInitJSON, MsgPackCodec, IWriter } from '../types'; export declare const HANDSHAKE_MSG_VERSION: Buffer; export declare class HandshakeInit implements IHandshakeInit { input: IReader; firstMessage: Uint8Array; handshakeSecret: Uint8Array; constructor({ input, handshakeSecret, firstMessage }: IHandshakeInitOptions); toJSON(): IHandshakeInitJSON; confirm(accept: IHandshakeAcceptMessage): IHandshakeConfirmation; } export declare class HandshakeAccept implements IHandshakeAccept { acceptMessage: IHandshakeAcceptMessage; input: IReader; output: IWriter; connectionKey: Uint8Array; _connectionKeyBase64?: string; constructor(opts: IHandshakeAcceptOptions); get connectionKeyBase64(): string; toJSON(): IHandshakeAcceptJSON; finalize(message: Uint8Array): IConnection; } export declare class HandshakeConfirmation implements IHandshakeConfirmation { finalMessage: Uint8Array; connection: IConnection; constructor(opts: IHandshakeConfirmationOptions); toJSON(): IHandshakeConfirmationJSON; } export declare function initHandshake(): HandshakeInit; export declare function acceptHandshake(firstMessage: Uint8Array): IHandshakeAccept;