/** * Safe base64 helpers for bounded-core. * * Uses the global atob/btoa when available (browser, RN with polyfill), * falls back to the 'buffer' package (Node.js / SSR / RN without polyfill). * * These are used instead of bare `atob()`/`btoa()` so the core package * works in React Native without requiring the consumer to polyfill globals. * * Both directions are UTF-8-safe: bare btoa / Buffer('binary') are LATIN-1 and * throw (surrogate-pair emoji) or silently mangle (accents, CJK) any code point * > 0xFF, corrupting user text - e.g. an AI-query `prompt` - before it is sent. * safeBtoa base64s the UTF-8 bytes; safeAtob is its exact inverse, and the * realtime worker decodes the same bytes as UTF-8 (src/utf8-base64.ts). ASCII is * byte-identical either way, so JWT (decodeBase64Url) decoding is unaffected. */ export declare function safeAtob(input: string): string; export declare function safeBtoa(input: string): string; /** * Decode a base64url-encoded string (used by JWT payloads). * Normalises base64url → standard base64 before decoding. */ export declare function decodeBase64Url(input: string): string;