Radix Relay
Hybrid mesh communications with Signal Protocol encryption
Loading...
Searching...
No Matches
radix_relay::nostr::protocol::ok Struct Reference

Nostr OK response message. More...

#include <protocol.hpp>

Inheritance diagram for radix_relay::nostr::protocol::ok:
radix_relay::nostr::events::incoming::ok

Static Public Member Functions

static auto deserialize (const std::string &json) -> std::optional< ok >
 Deserializes OK message from JSON.
 

Public Attributes

std::string event_id
 ID of the event this responds to.
 
bool accepted {}
 Whether the event was accepted.
 
std::string message
 Human-readable status message.
 

Detailed Description

Nostr OK response message.

Sent by relays to indicate acceptance/rejection of a submitted event.

Definition at line 148 of file protocol.hpp.

Member Function Documentation

◆ deserialize()

static auto radix_relay::nostr::protocol::ok::deserialize ( const std::string &  json) -> std::optional< ok >
static

Deserializes OK message from JSON.

Parameters
jsonJSON string in format ["OK", event_id, accepted, message]
Returns
Parsed ok or std::nullopt on failure

Member Data Documentation

◆ accepted

bool radix_relay::nostr::protocol::ok::accepted {}

Whether the event was accepted.

Definition at line 151 of file protocol.hpp.

◆ event_id

std::string radix_relay::nostr::protocol::ok::event_id

ID of the event this responds to.

Definition at line 150 of file protocol.hpp.

◆ message

std::string radix_relay::nostr::protocol::ok::message

Human-readable status message.

Definition at line 152 of file protocol.hpp.


The documentation for this struct was generated from the following file: