export interface DidEnv { doc: { cookie: string; } | null; storage: { getItem(key: string): string | null; setItem(key: string, value: string): void; } | null; name: string; secure: boolean; /** Returns 16 random bytes. */ random: () => number[]; } export interface Did { /** The stored id, or null when no storage can hold one. */ did: string | null; /** True only on the page view that created the id. */ didNew: boolean; /** Which storages already held a valid id: "c" cookie, "l" localStorage. */ didSrc: string; } /** Reads the stored id, cookie first, creating one if needed. An existing cookie is never rewritten: Safari deletes script-written cookies after 7 days. */ export declare function readDid(env: DidEnv): Did;