/** Per-sender rate limiter for incoming XMTP messages. * * Tracks timestamps of recent messages per sender and rejects messages * that exceed the configured rate. Stale entries are cleaned up on a * configurable interval. */ export declare class RateLimiter { private readonly _limits; private readonly _maxPerMinute; /** M-6: Maximum number of tracked senders to prevent unbounded memory growth */ private readonly _maxSenders; private _cleanupInterval; /** @param maxPerMinute Maximum messages per sender per minute (default 10) * @param maxSenders Maximum tracked sender entries before eviction (default 10_000) */ constructor(maxPerMinute?: number, maxSenders?: number); /** Check whether a sender is within their rate limit. * * Records the current timestamp if allowed. * * @param sender - Sender identifier (typically an address) * @returns `true` if the message is within the limit, `false` if rate-limited */ checkLimit(sender: string): boolean; /** Get remaining message quota for a sender within the current minute window */ getRemainingQuota(sender: string): number; /** Purge expired entries from all senders */ private _cleanup; /** Stop the cleanup timer and clear all state */ destroy(): void; } //# sourceMappingURL=rate-limiter.d.ts.map