|
Radix Relay
Hybrid mesh communications with Signal Protocol encryption
|
Nostr EVENT message wrapper. More...
#include <protocol.hpp>
Public Member Functions | |
| auto | serialize () const -> std::string |
| Serializes event to JSON string. | |
Static Public Member Functions | |
| static auto | from_event_data (const event_data &evt) -> event |
| Creates an event message from event_data. | |
| static auto | deserialize (const std::string &json) -> std::optional< event > |
| Deserializes event from JSON. | |
Public Attributes | |
| std::string | subscription_id |
| Subscription this event matches. | |
| event_data | data |
| The event itself. | |
Nostr EVENT message wrapper.
Wraps event_data with subscription ID for relay-to-client communication.
Definition at line 212 of file protocol.hpp.
|
static |
Deserializes event from JSON.
| json | JSON string |
|
static |
Creates an event message from event_data.
| evt | Event data to wrap |
Referenced by radix_relay::nostr::message_handler< Bridge >::handle(), radix_relay::nostr::message_handler< Bridge >::handle(), and radix_relay::nostr::message_handler< Bridge >::handle().
| auto radix_relay::nostr::protocol::event::serialize | ( | ) | const -> std::string |
Serializes event to JSON string.
| event_data radix_relay::nostr::protocol::event::data |
The event itself.
Definition at line 215 of file protocol.hpp.
| std::string radix_relay::nostr::protocol::event::subscription_id |
Subscription this event matches.
Definition at line 214 of file protocol.hpp.