/** Optional context for share-aware deduplication. */
export interface ShareContext {
    /** Share group identifier (e.g., for XorIDA splitting). */
    readonly shareGroupId?: string;
    /** Share index within the group (0-based). */
    readonly shareIndex?: number;
}
/** Interface for nonce stores that prevent replay attacks. */
export interface NonceStore {
    /**
     * Check if a nonce is fresh and record it atomically.
     * With shareContext: allows same nonce with different shares (idempotent retries).
     * Without shareContext: blocks any nonce reuse (pure replay protection).
     * @returns true if nonce is new (accepted), false if duplicate (rejected).
     */
    check(nonce: string, senderDid: string, shareContext?: ShareContext): Promise<boolean>;
    /** Remove expired entries. Called automatically on interval. */
    cleanup(): void;
    /** Shut down the store and clear any timers. */
    dispose(): void;
}
/** Options for MemoryNonceStore. */
export interface MemoryNonceStoreOptions {
    /** TTL in milliseconds for nonce entries. Default: 10 minutes. */
    readonly ttlMs?: number;
    /** Cleanup interval in milliseconds. Default: 60 seconds. */
    readonly cleanupIntervalMs?: number;
}
/**
 * In-memory nonce store for development and single-process deployments.
 *
 * Stores nonces in a Map keyed by "senderDid:nonce:shareContext" with expiry timestamps.
 * Supports share-aware deduplication: same nonce + different shares = allowed (idempotent retry),
 * same nonce + same share = blocked (true replay).
 * Periodic cleanup removes expired entries to prevent unbounded growth.
 */
export declare class MemoryNonceStore implements NonceStore {
    private readonly seen;
    private readonly ttlMs;
    private readonly cleanupIntervalMs;
    private timer;
    constructor(opts?: MemoryNonceStoreOptions);
    /** Start cleanup timer on first use. */
    private ensureTimer;
    /** Build composite key: senderDid:nonce:shareGroupId:shareIndex */
    private buildKey;
    check(nonce: string, senderDid: string, shareContext?: ShareContext): Promise<boolean>;
    cleanup(): void;
    dispose(): void;
    /** Number of active (non-expired) entries. Useful for testing. */
    get size(): number;
}
