nostr-websocket-utils

nostr-websocket-utils v0.3.0


nostr-websocket-utils / TimeValidator

Interface: TimeValidator

Time validator interface

Methods

validateTime()

validateTime(timestamp): TimeValidationResult

Validates event timestamp

Parameters

timestamp

number

Event timestamp

Returns

TimeValidationResult

Validation result

Defined in

nips/nip-22.ts:35


updateTimeOffset()

updateTimeOffset(serverTime): void

Updates server time offset

Parameters

serverTime

number

Server timestamp

Returns

void

Defined in

nips/nip-22.ts:41


getCurrentTime()

getCurrentTime(): number

Gets current adjusted timestamp

Returns

number

Adjusted timestamp

Defined in

nips/nip-22.ts:47