nostr-websocket-utils

nostr-websocket-utils v0.3.0


nostr-websocket-utils / NostrWSServerEvents

Interface: NostrWSServerEvents

Events emitted by the NostrWSServer

Properties

connection()

connection: (client) => void

Emitted when a client connects

Parameters

client

ExtendedWebSocket

The connected client

Returns

void

Defined in

types/index.ts:142


message()

message: (message, client) => void

Emitted when a message is received from a client

Parameters

message

NostrWSMessage

The received message

client

ExtendedWebSocket

The client that sent the message

Returns

void

Defined in

types/index.ts:149


error()

error: (error) => void

Emitted when an error occurs

Parameters

error

Error

The error that occurred

Returns

void

Defined in

types/index.ts:155