/** * Murasaki's versioned Server Action wire format. * * JSON is only the outer container. Values are encoded as a reference graph, * which keeps browser and production semantics identical for values JSON * cannot represent (and for cyclic object graphs). */ export declare const WIRE_VERSION: 1; export declare const WIRE_CONTENT_TYPE = "application/vnd.murasaki.wire+json; version=1"; export declare const MAX_WIRE_PAYLOAD_BYTES: number; export type WireErrorCode = 'WIRE_UNSUPPORTED_VALUE' | 'WIRE_INVALID_ENVELOPE' | 'WIRE_UNSUPPORTED_VERSION' | 'WIRE_INVALID_NODE' | 'WIRE_INVALID_REFERENCE' | 'WIRE_DUPLICATE_REFERENCE' | 'WIRE_INVALID_BASE64' | 'WIRE_PAYLOAD_TOO_LARGE'; export declare class WireCodecError extends Error { readonly code: WireErrorCode; constructor(code: WireErrorCode, message: string, options?: ErrorOptions); } /** Encode an arbitrary supported value into a versioned JSON payload. */ export declare function stringifyWire(value: unknown, maxBytes?: number): Promise; /** Decode a payload produced by stringifyWire. */ export declare function parseWire(text: string, maxBytes?: number): unknown; //# sourceMappingURL=wire.d.ts.map