import { NostrEvent } from "nostr-tools";
import { IEventStoreStreams } from "../event-store/interface.js";
/**
 * Setups a process to write batches of new events from an event store to a cache
 * @param eventStore - The event store to read from
 * @param write - The function to write the events to the cache
 * @param opts - The options for the process
 * @param opts.batchTime - The time to wait before writing a batch (default: 5 seconds)
 * @param opts.maxBatchSize - The maximum number of events to write in a batch
 * @returns A function to stop the process
 */
export declare function persistEventsToCache(eventStore: IEventStoreStreams, write: (events: NostrEvent[]) => Promise<void>, opts?: {
    maxBatchSize?: number;
    batchTime?: number;
}): () => void;
/** @deprecated Use persistEventsToCache instead */
export declare const presistEventsToCache: typeof persistEventsToCache;
