import { KVStore } from "@keplr-wallet/common"; import { PlainObject, Vault } from "./types"; type VaultRemovedHandler = (type: string, vaultId: string) => void; export declare class VaultService { protected readonly kvStore: KVStore; protected vaultMap: Map; protected onVaultRemovedHandlers: VaultRemovedHandler[]; protected _isSignedUp: boolean; protected password: Uint8Array; protected aesCounter: Uint8Array; protected decryptedCache: Map; protected userPasswordSalt: Uint8Array; protected aesCounterSalt: Uint8Array; constructor(kvStore: KVStore); init(): Promise; get isSignedUp(): boolean; signUp(userPassword: string): Promise; checkUserPassword(userPassword: string): Promise; changeUserPassword(prevUserPassword: string, newUserPassword: string): Promise; lock(): void; unlock(userPassword: string): Promise; get isLocked(): boolean; getVaults(type: string): Vault[]; getVault: (type: string, id: string) => Vault | undefined; addVault(type: string, insensitive: PlainObject, sensitive: PlainObject): string; setAndMergeInsensitiveToVault(type: string, id: string, insensitive: PlainObject): void; removeVault(type: string, id: string): void; protected encrypt(sensitive: PlainObject): Uint8Array; decrypt(sensitive: Uint8Array): PlainObject; protected ensureUnlockAndState(): void; protected setPasswordCryptoState(cipher: Uint8Array, mac: Uint8Array): Promise; protected getPasswordCryptoState(): Promise<{ cipher: Uint8Array; mac: Uint8Array; } | undefined>; clearAll(userPassword: string): Promise; protected static pbkdf2(salt: Uint8Array, data: Uint8Array): Promise; protected static aesEncrypt(password: Uint8Array, counter: Uint8Array, data: Uint8Array): Uint8Array; protected static aesDecrypt(password: Uint8Array, counter: Uint8Array, cipher: Uint8Array): Uint8Array; protected static generatePassword(userPassword: string, salt: Uint8Array): Promise<{ cipher: Uint8Array; mac: Uint8Array; password: Uint8Array; }>; protected static encryptPassword(userPassword: string, salt: Uint8Array, password: Uint8Array): Promise<{ cipher: Uint8Array; mac: Uint8Array; }>; protected static decryptPassword(userPassword: string, salt: Uint8Array, mac: Uint8Array, cipher: Uint8Array): Promise; addVaultRemovedHandler(handler: VaultRemovedHandler): void; protected setSessionPassword(password: { password: Uint8Array; aesCounter: Uint8Array; } | undefined): Promise; unlockWithSessionPasswordIfPossible(): Promise; } export {};