/** * @deprecated Use `E2EE_PROTOCOL_VERSION` from `src/e2ee/protocol.ts`, which is * the canonical home. This name survives as a re-export of that one value * because `src/server.ts` and `pair-payload.ts` import it and another track is * editing `server.ts` — deleting the symbol would widen W1a's diff into files * it does not own. `__tests__/e2ee-protocol-version.test.ts` asserts the two * names are one value, which is what makes the alias safe rather than a second * hand-synced copy (NONCE-DESIGN §4). */ export declare const E2EE_EXCHANGE_VERSION = 1; export declare class E2eeRequestError extends Error { /** Stable code for the client, so a version mismatch is not a parse failure. */ readonly code: "E2EE_MALFORMED" | "E2EE_VERSION_UNSUPPORTED"; constructor(code: E2eeRequestError["code"], message: string); } export interface E2eeExchangeRequest { version: number; /** Noise `IK` message 1, decoded. */ message1: Buffer; } /** * `null` for a client that did not ask for encryption; a parsed request for one * that did; a throw for one that asked incoherently. * * The three are deliberately distinct. Collapsing "absent" into "malformed" * breaks every released client, and collapsing "malformed" into "absent" would * silently pair a client that believed it was encrypting — which is the * downgrade the whole negotiation exists to prevent, arrived at through a * parser rather than an attacker. */ export declare function parseE2eeRequest(raw: unknown): E2eeExchangeRequest | null; //# sourceMappingURL=pair-request.d.ts.map