import type { PerpsSDKClient } from '../types/provider.js'; /** * Per-provider hash index over one of the provider's reference-data lists * (`/markets`, `/assets`), keyed by the list's own primary key. * * NOT a cache: it holds no freshness policy of its own. Every {@link sync} * refetches through the HTTP layer, whose `cache-control` headers decide * whether the response comes from disk or the network. A lookup miss * schedules a cooldown-gated background refetch that bypasses the HTTP * cache — the id may have listed after the cached snapshot. * * @internal */ export declare abstract class ReferenceDataRegistry { protected readonly client: PerpsSDKClient; readonly provider: string; private readonly kind; private index; private current; private inflight; private warnedIds; private refreshAfter; protected constructor(client: PerpsSDKClient, provider: string, kind: string); /** Fetch the provider's full list, bypassing the HTTP cache when asked. */ protected abstract fetchItems(bypassHttpCache: boolean): Promise; /** The item's primary key — what {@link get} is keyed by. */ protected abstract keyOf(item: T): string; /** * Fetch the list through the HTTP cache and rebuild the index. Concurrent * callers share one in-flight fetch; a settled fetch is never reused, so * HTTP `cache-control` alone governs freshness. */ sync(): Promise; /** The most recently synced list. Empty before the first {@link sync}. */ protected get items(): readonly T[]; /** * O(1) lookup by primary key. A miss warns once per id and schedules the * cooldown-gated, cache-bypassing background refetch. */ get(id: string): T | undefined; private load; private scheduleRefresh; } //# sourceMappingURL=referenceDataRegistry.d.ts.map