nostr-websocket-utils

nostr-websocket-utils v0.3.0


nostr-websocket-utils / DifficultyCalculator

Interface: DifficultyCalculator

Dynamic difficulty calculator based on event type and content

Methods

calculateRequiredDifficulty()

calculateRequiredDifficulty(event): number

Calculates required difficulty for an event

Parameters

event

Record<string, unknown>

Event to check

Returns

number

Required number of leading zero bits

Defined in

nips/nip-13.ts:111