nostr-websocket-utils

nostr-websocket-utils v0.3.16


nostr-websocket-utils / TimeSyncManager

Interface: TimeSyncManager

Defined in: nips/nip-22.ts:140

Time synchronization manager interface

Methods

startSync()

startSync(wsUrl): void

Defined in: nips/nip-22.ts:145

Starts time synchronization

Parameters

wsUrl

string

WebSocket URL for time sync

Returns

void


stopSync()

stopSync(): void

Defined in: nips/nip-22.ts:150

Stops time synchronization

Returns

void


getCurrentTime()

getCurrentTime(): number

Defined in: nips/nip-22.ts:156

Gets current synchronized time

Returns

number

Current timestamp


validateEvent()

validateEvent(event): TimeValidationResult

Defined in: nips/nip-22.ts:163

Validates event timing

Parameters

event

NostrWSMessage

Event to validate

Returns

TimeValidationResult

Validation result