nostr-websocket-utils

nostr-websocket-utils v0.3.0


nostr-websocket-utils / createTimeValidator

Function: createTimeValidator()

createTimeValidator(logger, futureLimitSeconds, pastLimitSeconds): TimeValidator

Creates a time validator

Parameters

logger

Logger

Logger instance

futureLimitSeconds

number = DEFAULT_TIME_LIMITS.FUTURE_LIMIT

Future time limit in seconds

pastLimitSeconds

number = DEFAULT_TIME_LIMITS.PAST_LIMIT

Past time limit in seconds

Returns

TimeValidator

Time validator

Defined in

nips/nip-22.ts:57