import { EventEmitter } from 'events'; import { KeyvDeserializedData, KeyvOptions, KeyvStore, KeyvStoredData } from './keyv-types.js'; /** * Please note that this is code adapted from @link https://github.com/jaredwray/keyv to support Typescript and ESM in Veramo * * The code should support the storage plugins available for the keyv project. * Veramo itself supports NodeJS, Browser and React-Native environment. * Please be aware that these requirements probably aren't true for any keyv storage plugins. * * One of the big changes compared to the upstream project is that this port does not have dynamic loading of store-adapters based on URIs. * We believe that any Veramo Key Value store should use explicitly defined store-adapters. * * The port is part of the Veramo Key Value Store module, as we do not want to make an official maintained port out of it. * Veramo exposes its own API/interfaces for the Key Value store, meaning we could also support any other implementation in the future * * The Veramo kv-store module provides out of the box support for in memory/maps, sqlite and typeorm implementations, * including a tiered local/remote implementation that support all environments. * * We welcome any new storage modules */ export declare class Keyv extends EventEmitter implements KeyvStore { readonly opts: KeyvOptions; readonly namespace: string; iterator?: (namespace?: string) => AsyncGenerator; constructor(uri?: string | Map | KeyvStore | undefined, options?: KeyvOptions); get store(): Required>; get deserialize(): (data: any) => import("@veramo/utils").OrPromise | undefined>; get serialize(): (data: KeyvDeserializedData) => import("@veramo/utils").OrPromise; _checkIterableAdapter(): any; _getKeyPrefix(key: string): string; _getKeyPrefixArray(keys: string[]): string[]; _getKeyUnprefix(key: string): string; getMany(keys: string[], options?: { raw?: boolean; }): Promise>>; get(key: string | string[], options?: { raw?: boolean; }): Promise | KeyvStoredData[] | undefined>; private isExpired; set(key: string, value: Value, ttl?: number): Promise; delete(key: string | string[]): Promise; clear(): Promise; has(key: string): Promise; disconnect(): void; } //# sourceMappingURL=keyv.d.ts.map