import { IStorageAdapter } from './adapters/IStorageAdapter'; export interface IKeyStorageConfig { /** * Path to folder where to store the data (Node.js only). */ dir?: string; /** * Name of the IndexedDB database where to store the data (Browsers only). */ name?: string; /** * The {@link IStorageAdapter} implementation to be used as a storage backend. */ adapter?: IStorageAdapter; } /** * Class representing a storage container for private key data. * Use this class if you need to load the keys stored with * version 4.x of this library. For new code, use the * {@link PrivateKeyStorage} instead. * * @deprecated since version 5.0 */ export declare class KeyStorage { private adapter; constructor(config?: IKeyStorageConfig | string); /** * Checks whether a private key data with the given name exist in persistent storage. * @param {string} name - Name to check. * @returns {Promise} - True if key data exist, otherwise false. */ exists(name: string): Promise; /** * Loads the private key data by the given name. * @param {string} name - Name of key data to load. * @returns {Promise} - Private key data as a string, * or null if there is no data for the given name. */ load(name: string): Promise; /** * Removes the private key data stored under the given name from persistent storage. * @param {string} name - Name of the key data to remove. * @returns {Promise} - True if the key has been removed, otherwise false. */ remove(name: string): Promise; /** * Persists the private key data under the given name. * @param {string} name - Name of the key data. * @param {string} data - The key data. * @returns {Promise} */ save(name: string, data: string): Promise; }