formatting

This commit is contained in:
Vitor Pamplona 2024-01-04 08:43:31 -05:00
parent 479561cb79
commit 3a06859967

16
01.md
View File

@ -93,15 +93,17 @@ The first element of the tag array is referred to as the tag _name_ and the seco
All single-letter (only English alphabet letters: a-z, A-Z) key tags are indexed by relays for faster queries.
This NIP defines the format of 3 standard tags: `e`, `p`, and `a`. `e`, `p` can be used to reference events and pubkeys respectivelly, and `a` references the latest version of a replaceable event, parameterized or not. Clients MAY `a`- and `e`-tag parameterized replaceables simultaneously.
This NIP defines the format of 3 standard tags: `e`, `p`, and `a`. `e`, `p` can be used to reference events and pubkeys respectivelly, and `a` references the latest version of a replaceable event. Clients MAY `a`- and `e`-tag parameterized replaceables simultaneously.
| 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>` |
| 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>` |
The `d`-tag is equivalent to empty string (`""`) when referencing non-parameterized but replaceable events.
# Relay Protocol
Nostr has two main components: Clients & Relays. Users run a client to fetch/subscribe to events from one or more Relays via WebSockets.
@ -157,7 +159,7 @@ The `ids`, `authors`, `#e`, and `#p` filter lists MUST contain exact 64-characte
The `since` and `until` properties are used to specify the time range of events returned in the subscription. An event matches the filter if `since <= created_at <= until` holds.
The `limit` property informs the maximum number of events to return, sorted by created_at desc. It operates over the previously-stored events and is ignored afterward.
The `limit` property informs the maximum number of events to return, sorted by `.created_at` desc. It operates over the previously-stored events and is ignored afterward.
### Subscription Responses
@ -167,8 +169,6 @@ Relays send 3 types of messages during a subscription:
* `["EOSE", <subscription_id>]`,
* `["CLOSED", <subscription_id>, <prefix>:<message>]`
All messages MUST be sent with the `subscription_id` initiated by the client (using the `REQ` message above).
The `EVENT` message is used to send events requested by clients.
`EOSE` indicates the _end of stored events_ and the beginning of events newly received in real-time.