/** * Aggregation state caching for receive operations. */ import type { HubEntry, TokenEntry } from "../../registry/tokens.js"; import type { AggregationTreeState } from "../../types.js"; export interface FetchAggregationStateParams { /** Hub configuration used to fetch aggregation tree state. */ hub: HubEntry; /** Token entry used to determine chainId and hub address. */ token: TokenEntry; /** Optional block span used when fetching aggregation tree state (performance tuning). */ eventBlockSpan?: bigint | number; /** * Optional cache TTL (in milliseconds). * @remarks When provided, cached entries are returned if not expired. */ cacheTtlMs?: number; } /** * Manager for caching aggregation tree states with TTL support. */ export declare class AggregationStateCacheManager { private readonly cache; /** * Fetch aggregation tree state with caching. * @remarks Uses TTL-based invalidation when `cacheTtlMs` is provided. */ fetchWithCache(params: FetchAggregationStateParams): Promise; /** * Clear a specific entry or all entries from the cache. */ clear(key?: string): void; /** * Reset the cache to its initial empty state. * @remarks Alias for `clear()`; useful for testing. */ reset(): void; /** * Return the number of cached entries. */ size(): number; /** * Return true if the cache contains an entry for the given key. */ has(key: string): boolean; /** * Return true if the cache contains an entry for the given hub and chain. */ hasEntry(hubAddress: string, chainId: bigint, eventBlockSpan?: bigint | number): boolean; } //# sourceMappingURL=cache.d.ts.map