import { Context, Crypto, LDLogger, Storage } from '@launchdarkly/js-sdk-common'; /** * Suffix appended to context storage keys to form the freshness storage key. */ export declare const FRESHNESS_SUFFIX = "_freshness"; /** * Persisted freshness record stored at `{contextStorageKey}_freshness`. */ export interface FreshnessRecord { /** Timestamp in ms since epoch when data was last received. */ timestamp: number; /** SHA-256 hash of the full context's canonical JSON. */ contextHash: string; } /** * Computes a SHA-256 hash of the context's full canonical JSON. * Returns `undefined` if the context cannot be serialized. */ export declare function hashContext(crypto: Crypto, context: Context): Promise; /** * Reads the freshness timestamp from storage for the given context. * * Returns `undefined` if no freshness record exists, the data is corrupt, * or the context attributes have changed since the freshness was recorded. */ export declare function readFreshness(storage: Storage, crypto: Crypto, environmentNamespace: string, context: Context, logger?: LDLogger): Promise; //# sourceMappingURL=freshness.d.ts.map