import type { ClientFrame, ServerFrame } from './frames.js'; export type AnyFrame = ClientFrame | ServerFrame; /** True if a decoded frame is one a client is allowed to send. The server uses * this to reject server-only frame types before dispatch, so a malicious or * buggy client can't reach an unexpected handler path. */ export declare function isClientFrame(frame: AnyFrame): frame is ClientFrame; /** Encode a frame to a binary msgpack payload for the wire. */ export declare function encodeFrame(frame: AnyFrame): Uint8Array; /** Decode a binary payload into a frame. Returns null on any malformed input or * anything lacking a string `type`, so a bad frame can never crash the handler * — the boundary validates `type` before trusting the rest. */ export declare function decodeFrame(bytes: Uint8Array): AnyFrame | null;