/**
 * Shared buffered-delivery plumbing for standalone WS listeners (slot,
 * oracle, native SOL). Owns the cadence triple-branch (immediate / throttle
 * timer / scheduler), latest-wins buffering, and error-routing fallback.
 *
 * Buffer is keyed by `keyOf(event)` — pass it for per-key buckets (e.g.
 * one slot per oracle address); omit for single-slot latest-wins.
 *
 * Each listener decodes the WS message into TEvent, calls `dispatcher.push()`,
 * and returns `makeSubscriptionHandle(dispatcher.unsubscribe, dispatcher.flush)`.
 */
import { type WsCadenceOptions } from './wsCadenceOptions';
export interface BufferedDispatcherOptions<TEvent, TKey = unknown> extends WsCadenceOptions {
    /** Omit for single-slot (latest-wins). Pass for per-key buckets. */
    keyOf?: (event: TEvent) => TKey;
    onDeliver: (event: TEvent) => void;
    onError?: (error: unknown) => void;
    /** Prefix for the default `console.error` fallback (e.g. `'[listenToSlotChanges]'`). */
    errorPrefix: string;
    /** Function name used in validation error messages. */
    callSiteName: string;
}
export interface BufferedDispatcher<TEvent> {
    push(event: TEvent): void;
    flush(): void;
    unsubscribe(): void;
}
export declare function createBufferedDispatcher<TEvent, TKey = unknown>(opts: BufferedDispatcherOptions<TEvent, TKey>): BufferedDispatcher<TEvent>;
//# sourceMappingURL=bufferedDispatcher.d.ts.map