Expand description
Wire messages exchanged over a relay WebSocket.
Per NIP-01, every Nostr message is a JSON array whose first element is the command name and whose subsequent elements depend on the command. This module models the two message families:
client::ClientMessage— sent from a client to a relay,relay::RelayMessage— sent from a relay to a client.
SubscriptionId is the opaque identifier shared by REQ, EVENT,
EOSE, CLOSE, and CLOSED to correlate subscriptions.
Re-exports§
pub use self::client::ClientMessage;pub use self::client::ClientMessageError;pub use self::relay::MachineReadablePrefix;pub use self::relay::MachineReadablePrefixError;pub use self::relay::RelayMessage;pub use self::relay::RelayMessageError;pub use self::subscription_id::SubscriptionId;pub use self::subscription_id::SubscriptionIdError;
Modules§
- client
- Messages a client sends to a relay.
- relay
- Messages a relay sends to a client.
- subscription_
id - Opaque subscription identifier.