mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-25 09:45:51 -05:00
improves naming and formats
This commit is contained in:
parent
2c0b534ee1
commit
6231cbc063
16
01.md
16
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>` | `<relay URL, optional>]` | |
|
||||
| `p` | `<32-byte lowercase hex of a pubkey>` | `<relay URL, optional>]` | |
|
||||
| `a` | `<kind>:<32-byte lowercase hex of a pubkey>:` | `<relay URL, optional>]` | |
|
||||
| `a` | `<kind>:<32-byte lowercase hex of a pubkey>:<d-tag value>` | `<relay URL, optional>]` | |
|
||||
| Name | Value | Other Params |
|
||||
| ---- | ---------------------------------------------------------- | ------------------------ |
|
||||
| `e` | `<32-byte lowercase hex of an event id>` | `<relay URL, optional>]` |
|
||||
| `p` | `<32-byte lowercase hex of a pubkey>` | `<relay URL, optional>]` |
|
||||
| `a` | `<kind>:<32-byte lowercase hex of a pubkey>:` | `<relay URL, optional>]` |
|
||||
| `a` | `<kind>:<32-byte lowercase hex of a pubkey>:<d-tag value>` | `<relay URL, optional>]` |
|
||||
|
||||
# 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", <event_id>, <accepted:true|false>, <message>]`, used to indicate acceptance (true) or denial (false) of an `EVENT` message.
|
||||
* `["OK", <event_id>, <accepted:true|false>, <message>]`, 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`.
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user