From 6231cbc063f4522e93ba917aba5e2f5f06e20467 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Wed, 3 Jan 2024 12:12:20 -0500 Subject: [PATCH] improves naming and formats --- 01.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/01.md b/01.md index 0c85099..55adb8d 100644 --- a/01.md +++ b/01.md @@ -87,12 +87,12 @@ All single-letter (only English alphabet letters: a-z, A-Z) key tags are indexed This NIP defines the format of 3 standard tags: `e`, `p`, and `a`. `e`, `p` can be used to reference events and pubkeys, and `a` references the latest version of a replaceable event, parameterized or not. -| Name | Value | Other Params | Description | -| ---- | ---------------------------------------------------------- | ------------------------ | ----------------------------------------- | -| `e` | `<32-byte lowercase hex of an event id>` | `]` | | -| `p` | `<32-byte lowercase hex of a pubkey>` | `]` | | -| `a` | `:<32-byte lowercase hex of a pubkey>:` | `]` | | -| `a` | `:<32-byte lowercase hex of a pubkey>:` | `]` | | +| Name | Value | Other Params | +| ---- | ---------------------------------------------------------- | ------------------------ | +| `e` | `<32-byte lowercase hex of an event id>` | `]` | +| `p` | `<32-byte lowercase hex of a pubkey>` | `]` | +| `a` | `:<32-byte lowercase hex of a pubkey>:` | `]` | +| `a` | `:<32-byte lowercase hex of a pubkey>:` | `]` | # Relay Protocol @@ -150,7 +150,7 @@ All messages MUST be sent with the subscription_id initiated by the client (usin `CLOSED` messages MUST be sent in response to a `REQ` when the relay refuses to fulfill it. It can also be sent when a relay decides to kill a subscription on its side before a client has disconnected or sent a `CLOSE`. The message MUST be a string formed by a machine-readable single-word prefix followed by a `:` and then a human-readable message. -## Broadcasting an Event +## Publishing To send an event to the Relay, Clients send a broadcast message in the format: @@ -158,7 +158,7 @@ To send an event to the Relay, Clients send a broadcast message in the format: Relays reply with an ACK message in the format of: - * `["OK", , , ]`, used to indicate acceptance (true) or denial (false) of an `EVENT` message. + * `["OK", , , ]`, used to indicate acceptance (true) or denial (false) of an `EVENT`. `OK` messages MUST be sent in response to `EVENT` messages received from clients, they must have the 3rd parameter set to `true` when an event has been accepted by the relay, `false` otherwise. The 4th parameter MUST always be present, but MAY be an empty string when the 3rd is `true`.