/** * Typed error surface for sqlite3mc-backed page-level encryption failures. * * Three concrete failure modes are surfaced: * * - `invalid_key_length`: caller-side pre-flight (key not 32 bytes). * - `encryption_not_supported_for_ephemeral`: caller-side pre-flight (encryption was requested on an ephemeral * `:memory:` store, which sqlite3mc does not support). * - `decrypt_failed`: runtime failure raised when sqlite3mc cannot decode page 1 of an existing database. Covers * both "wrong key supplied" and "no key supplied to an encrypted DB". */ export type SqliteEncryptionErrorCode = 'invalid_key_length' | 'encryption_not_supported_for_ephemeral' | 'decrypt_failed'; /** * Error thrown by sqlite-opfs when an encryption operation fails. **/ export declare class SqliteEncryptionError extends Error { readonly code: SqliteEncryptionErrorCode; constructor(code: SqliteEncryptionErrorCode, message: string, opts?: { cause?: unknown; }); } /** * Returns `true` if `message` matches one of the known sqlite3mc decrypt-failure * strings. **/ export declare function isDecryptFailureMessage(message: string): boolean; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXJyb3JzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvc3FsaXRlLW9wZnMvZXJyb3JzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7O0dBVUc7QUFDSCxNQUFNLE1BQU0seUJBQXlCLEdBQ2pDLG9CQUFvQixHQUNwQix3Q0FBd0MsR0FDeEMsZ0JBQWdCLENBQUM7QUFFckI7O0lBRUk7QUFDSixxQkFBYSxxQkFBc0IsU0FBUSxLQUFLO0lBQzlDLFFBQVEsQ0FBQyxJQUFJLEVBQUUseUJBQXlCLENBQUM7SUFFekMsWUFBWSxJQUFJLEVBQUUseUJBQXlCLEVBQUUsT0FBTyxFQUFFLE1BQU0sRUFBRSxJQUFJLENBQUMsRUFBRTtRQUFFLEtBQUssQ0FBQyxFQUFFLE9BQU8sQ0FBQTtLQUFFLEVBSXZGO0NBQ0Y7QUFVRDs7O0lBR0k7QUFDSix3QkFBZ0IsdUJBQXVCLENBQUMsT0FBTyxFQUFFLE1BQU0sR0FBRyxPQUFPLENBRWhFIn0=