import { EncryptedKey, KeyMetadata, KeyStore } from "../Types"; import { BrowserStorageConfigParams } from "./BrowserStorageFacade"; /** * KeyStore for Chrome and Firefox browser storage API: * https://developer.chrome.com/docs/extensions/reference/storage/. * Once instantiated and configured, pass it to the `KeyManager` contructor to * handle the storage of encrypted keys. * ```js * const browserKeyStore = new KeyManagerPlugins.BrowserStorageKeyStore(); * browserKeyStore.configure({ storage: chrome.storage.local }); * const keyManager = new KeyManager({ * keyStore: browserKeyStore * }); * ``` */ export declare class BrowserStorageKeyStore 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.chrome.com/docs/extensions/reference/storage/). * This is mostly for use with Chrome and Firefox storage in addition to * libraries that shim this (for ex: webextension-polyfill) * @param {BrowserStorageConfigParams} params A configuration object. * @param {Storage} params.storage The Storage instance. Required. * @param {string} [params.prefix] The prefix for the names in the storage. * @returns {Promise} resolved data */ configure(params: BrowserStorageConfigParams): Promise; storeKeys(keys: EncryptedKey[]): Promise; updateKeys(keys: EncryptedKey[]): Promise; loadKey(id: string): Promise; removeKey(id: string): Promise; loadAllKeys(): Promise; }