import { Hono } from "hono"; import { type ContextKind, type E2eeContextRegistry } from "../../e2ee/context"; import type { AppEnv } from "../app"; import type { ApiDeps } from "../types/api-deps"; /** * Ceiling on the request body, enforced as it arrives rather than after. * * The only field that carries size is `e2ee.noise`, which `parseE2eeRequest` * caps at roughly 5.5 KB of base64 (`NOISE_MAX_MESSAGE_BYTES`). This is that * plus room for the JSON around it — deliberately snug, because the whole point * of a pre-authentication bound is that it is reached before memory is. */ export declare const MAX_OPEN_BODY_BYTES: number; /** * Message 1's authenticated payload. * * `{ v, kind }`, exactly as NONCE-DESIGN §11 specifies. The two context kinds * (§8) differ in what they carry and how long they live, so the handshake has * to say which one it wants, and a capability that was never asked for must not * be inferred. * * `kind` lives INSIDE the AEAD rather than in the outer JSON for the same * reason the pairing payloads do: the outer body is attacker-modifiable, and a * rewritten `kind` would flip a socket context into a REST one. * * Required, not defaulted: a claim that was never made cannot be defaulted in * either direction (design.md §8's reasoning about `readOnly`). */ export declare function parseOpenPayload(payload: Buffer): { kind: ContextKind; }; export declare const createE2eeRoutes: (deps: Pick, /** Overridden by tests so a suite gets its own registry rather than the process one. */ registry?: E2eeContextRegistry) => Hono; //# sourceMappingURL=e2ee.routes.d.ts.map