import { D as DPoPNonceStore } from '../types-CuViAwD5.cjs'; import 'hono'; /** Minimal DurableObjectStorage subset (avoids @cloudflare/workers-types dependency). */ interface DurableObjectStorageLike { get(key: string): Promise; put(key: string, value: T, options?: { allowUnconfirmed?: boolean; }): Promise; delete(key: string): Promise; list(options: { prefix: string; }): Promise>; } interface DurableObjectStoreOptions { /** Durable Object storage instance (from `this.ctx.storage` inside a DO class). */ storage: DurableObjectStorageLike; /** Key prefix to namespace replay-cache entries (default: "dpop:jti:"). */ keyPrefix?: string; /** * Fallback TTL in milliseconds applied when `expiresAt` is in the past or missing * (default: 300000 = 5 min). Normal callers always pass a future `expiresAt`. */ defaultTtl?: number; } /** * Durable Object storage-backed replay cache. DO storage has no native TTL, so each entry * stores its own `expiresAt` and is lazy-deleted on read. The DO single-writer guarantee * makes the read-then-write pattern atomic without explicit locking — concurrent requests * to the same Object are serialized by the runtime. * * `purge()` lists entries under `keyPrefix` and deletes those past their `expiresAt`, * returning the count removed. Run from a scheduled handler or alarm to bound storage. */ declare function durableObjectStore(options: DurableObjectStoreOptions): DPoPNonceStore; export { type DurableObjectStorageLike, type DurableObjectStoreOptions, durableObjectStore };