diff options
| -rw-r--r-- | 01.md | 6 | ||||
| -rw-r--r-- | README.md | 1 |
2 files changed, 5 insertions, 2 deletions
| @@ -82,12 +82,14 @@ Kinds specify how clients should interpret the meaning of each event and the oth | |||
| 82 | And also a convention for kind ranges that allow for easier experimentation and flexibility of relay implementation: | 82 | And also a convention for kind ranges that allow for easier experimentation and flexibility of relay implementation: |
| 83 | 83 | ||
| 84 | - for kind `n` such that `1000 <= n < 10000`, events are **regular**, which means they're all expected to be stored by relays. | 84 | - for kind `n` such that `1000 <= n < 10000`, events are **regular**, which means they're all expected to be stored by relays. |
| 85 | - for kind `n` such that `10000 <= n < 20000 || n == 0 || n == 3`, events are **replaceable**, which means that, for each combination of `pubkey` and `kind`, only the latest event is expected to (SHOULD) be stored by relays, older versions are expected to be discarded. | 85 | - for kind `n` such that `10000 <= n < 20000 || n == 0 || n == 3`, events are **replaceable**, which means that, for each combination of `pubkey` and `kind`, only the latest event MUST be stored by relays, older versions MAY be discarded. |
| 86 | - for kind `n` such that `20000 <= n < 30000`, events are **ephemeral**, which means they are not expected to be stored by relays. | 86 | - for kind `n` such that `20000 <= n < 30000`, events are **ephemeral**, which means they are not expected to be stored by relays. |
| 87 | - for kind `n` such that `30000 <= n < 40000`, events are **parameterized replaceable**, which means that, for each combination of `pubkey`, `kind` and the `d` tag's first value, only the latest event is expected to be stored by relays, older versions are expected to be discarded. | 87 | - for kind `n` such that `30000 <= n < 40000`, events are **parameterized replaceable**, which means that, for each combination of `pubkey`, `kind` and the `d` tag's first value, only the latest event MUST be stored by relays, older versions MAY be discarded. |
| 88 | 88 | ||
| 89 | In case of replaceable events with the same timestamp, the event with the lowest id (first in lexical order) should be retained, and the other discarded. | 89 | In case of replaceable events with the same timestamp, the event with the lowest id (first in lexical order) should be retained, and the other discarded. |
| 90 | 90 | ||
| 91 | When answering to `REQ` messages for replaceable events such as `{"kinds":[0],"authors":[<hex-key>]}`, even if the relay has more than one version stored, it SHOULD return just the latest one. | ||
| 92 | |||
| 91 | These are just conventions and relay implementations may differ. | 93 | These are just conventions and relay implementations may differ. |
| 92 | 94 | ||
| 93 | ## Communication between clients and relays | 95 | ## Communication between clients and relays |
| @@ -38,6 +38,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos | |||
| 38 | - [NIP-21: `nostr:` URI scheme](21.md) | 38 | - [NIP-21: `nostr:` URI scheme](21.md) |
| 39 | - [NIP-22: Event `created_at` Limits](22.md) | 39 | - [NIP-22: Event `created_at` Limits](22.md) |
| 40 | - [NIP-23: Long-form Content](23.md) | 40 | - [NIP-23: Long-form Content](23.md) |
| 41 | - [NIP-24: Extra metadata fields and tags](24.md) | ||
| 41 | - [NIP-25: Reactions](25.md) | 42 | - [NIP-25: Reactions](25.md) |
| 42 | - [NIP-26: Delegated Event Signing](26.md) | 43 | - [NIP-26: Delegated Event Signing](26.md) |
| 43 | - [NIP-27: Text Note References](27.md) | 44 | - [NIP-27: Text Note References](27.md) |