import type { Key } from "./common"; import type { Platform } from "../../platform/web/Platform.js"; import type { Storage } from "../storage/idb/Storage"; import type { AccountDataEntry } from "../storage/idb/stores/AccountDataStore"; type EncryptedData = { iv: string; ciphertext: string; mac: string; }; export declare enum DecryptionFailure { NotEncryptedWithKey = 0, BadMAC = 1, UnsupportedAlgorithm = 2 } export declare class SecretStorage { private readonly _key; private readonly _platform; private readonly _storage; constructor({ key, platform, storage }: { key: Key; platform: Platform; storage: Storage; }); /** this method will auto-commit any indexeddb transaction because of its use of the webcrypto api */ hasValidKeyForAnyAccountData(): Promise; /** this method will auto-commit any indexeddb transaction because of its use of the webcrypto api */ readSecret(name: string): Promise; _decryptAccountData(accountData: AccountDataEntry): Promise; _decryptAESSecret(type: string, encryptedData: EncryptedData): Promise; } export {};