/** Largest integer magnitude that survives a binary64 round trip exactly. */ export declare const MAX_SAFE_WRITE_INTEGER = 9007199254740991; /** Stable machine-readable category for this write-policy refusal. */ export declare const UNSAFE_INTEGER_CATEGORY = "invalid_number"; /** Stable machine-readable reason for this write-policy refusal. */ export declare const UNSAFE_INTEGER_REASON = "integer_exceeds_interoperable_range"; /** A new-write value carries an integer outside the interoperable IEEE 754 range. * * Extends Error with a stable category and reason so a caller can branch without * parsing the message. The message names the JSON path of the offending member, which * matches the Go SDK's ErrInvalidIJSON wording and the existing assertIJson message. */ export declare class UnsafeIntegerError extends Error { readonly category = "invalid_number"; readonly reason = "integer_exceeds_interoperable_range"; constructor(path: string); } /** True when a number is integer-valued and outside the interoperable range. * * Only integer-valued numbers are bounded. A fractional value carries no claim to * exactness beyond the double itself, which is the same rule the Go SDK applies with * math.Trunc(x) == x. */ export declare function isUnsafeWriteInteger(value: number): boolean; /** Throw UnsafeIntegerError if `value` carries an unsafe integer anywhere within it. * * Recurses through arrays and plain objects so the rule applies to the whole artifact * rather than only its top-level members. Values of any other type are left untouched. * * LIMITATION, documented rather than discovered. This walks the value and the caller * then canonicalizes it, so the value is read twice. For a plain JSON object that is * immaterial. For an object carrying a getter or a Proxy that answers differently on a * second read, an unsafe integer could pass this walk and still be signed. On the JCS * path use canonicalizeJCSForWrite() from canonical-jcs.js instead, which performs the * number check inside the single emitting walk and is not bypassable that way. On the * legacy canonicalize() path this shape is forced, because that canonicalizer's bytes * are frozen and it cannot be modified. */ export declare function assertWriteSafeNumbers(value: unknown, path?: string, ancestors?: WeakSet): void; //# sourceMappingURL=write-policy.d.ts.map