import { EncryptedKey, KeyMetadata, KeyStore } from "../types"; import { LocalStorageConfigParams } from "./LocalStorageFacade"; /** * KeyStore for the Web Storage API : * https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API. * Once instantiated and configured, pass it to the `KeyManager` contructor to * handle the storage of encrypted keys. * ```js * const localKeyStore = new KeyManagerPlugins.LocalStorageKeyStore(); * localKeyStore.configure({ storage: localStorage }); * const keyManager = new KeyManager({ * keyStore: localKeyStore * }); * ``` */ export declare class LocalStorageKeyStore implements KeyStore { name: string; private keyStore; constructor(); /** * The configuration is where the storage engine is set up and configured. * It must follow the Storage interface : * https://developer.mozilla.org/en-US/docs/Web/API/Storage). * In the DOM environment it can be `localStorage` or `sessionStorage`. * In a Node environment, there are some substitution libraries available, * *node-localstorage* for instance. * If not set, the calls to the other methods will fail. * @param {LocalStorageConfigParams} params A configuration object. * @param {Storage} params.storage The Storage instance. Required. * @param {string} [params.prefix] The prefix for the names in the storage. * @return {Promise} */ configure(params: LocalStorageConfigParams): Promise; storeKeys(keys: EncryptedKey[]): Promise; updateKeys(keys: EncryptedKey[]): Promise; loadKey(id: string): Promise; removeKey(id: string): Promise; loadAllKeys(): Promise; }