Type Alias nostr_types::RelayMessage

source ·
pub type RelayMessage = RelayMessageV5;
Expand description

A message from a relay to a client

Aliased Type§

enum RelayMessage {
    Auth(String),
    Closed(SubscriptionId, String),
    Eose(SubscriptionId),
    Event(SubscriptionId, Box<EventV3>),
    Notice(String),
    Notify(String),
    Ok(Id, bool, String),
}

Variants§

§

Auth(String)

Used to send authentication challenges

§

Closed(SubscriptionId, String)

Used to indicate that a subscription was ended on the server side Every ClientMessage::Req may trigger a RelayMessage::Closed response The last parameter may have a colon-terminated machine-readable prefix of: duplicate, pow, blocked, rate-limited, invalid, auth-required, restricted, or error

§

Eose(SubscriptionId)

End of subscribed events notification

§

Event(SubscriptionId, Box<EventV3>)

An event matching a subscription

§

Notice(String)

A human readable notice for errors and other information

§

Notify(String)

A human readable notice for the end user

§

Ok(Id, bool, String)

Used to notify clients if an event was successuful Every ClientMessage::Event will trigger a RelayMessage::OK response The last parameter may have a colon-terminated machine-readable prefix of: duplicate, pow, blocked, rate-limited, invalid, auth-required, restricted or error