nostr-websocket-utils

nostr-websocket-utils v0.3.0


nostr-websocket-utils / createPowRateLimiter

Function: createPowRateLimiter()

createPowRateLimiter(windowSeconds, maxDifficulty): PowRateLimiter

Creates a default PoW rate limiter

Parameters

windowSeconds

number = 3600

Time window for rate limiting

maxDifficulty

number = 100

Maximum cumulative difficulty per window

Returns

PowRateLimiter

Rate limiter

Defined in

nips/nip-13.ts:171