import { D as DPoPNonceStore } from '../types-CuViAwD5.js'; import 'hono'; /** Minimal Redis client subset compatible with ioredis, node-redis, and @upstash/redis. */ interface RedisClientLike { set(key: string, value: string, options?: { NX?: boolean; EX?: number; }): Promise; } interface RedisStoreOptions { /** Redis client instance (ioredis, node-redis, or @upstash/redis). */ client: RedisClientLike; /** Maximum TTL in seconds applied to each jti entry (default: 300 = 5 min). */ ttl?: number; /** Key prefix to namespace replay-cache entries (default: "dpop:jti:"). */ keyPrefix?: string; } /** * Redis-backed replay cache. Uses `SET key 1 NX EX ` for atomic insert-if-absent — * a single round-trip whose semantics match RFC 9449 §11.1: exactly one concurrent caller * sees `OK` (return true), the rest get `null` (return false). * * The TTL is the smaller of `expiresAt - now` and the configured `ttl` ceiling, so the * entry is auto-removed by Redis once the proof's freshness window closes. `purge()` is * therefore a no-op returning 0. */ declare function redisStore(options: RedisStoreOptions): DPoPNonceStore; export { type RedisClientLike, type RedisStoreOptions, redisStore };