nostr-websocket-utils / NostrWSClientEvents
Events emitted by the NostrWSClient
connect: () =>
void
Emitted when the client connects to the relay
void
disconnect: () =>
void
Emitted when the client disconnects from the relay
void
reconnect: () =>
void
Emitted when the client reconnects to the relay
void
message: (
message
) =>Promise
<void
>
Emitted when a message is received from the relay
The received message
Promise
<void
>
error: (
error
) =>void
Emitted when an error occurs
Error
The error that occurred
void
close: () =>
void
void
optional
stateChange: (state
) =>void
void
optional
heartbeat: () =>void
void