diff options
| author | Vitor Pamplona <vitor@vitorpamplona.com> | 2024-11-14 16:53:33 -0500 |
|---|---|---|
| committer | fiatjaf_ <fiatjaf@gmail.com> | 2024-11-15 00:19:06 -0300 |
| commit | eca0a83d097e274bc1c4b416315b5f2e924f7e02 (patch) | |
| tree | 88ecf97fad49151d1275dbee45b05e514ad3499a /10.md | |
| parent | 8f112857a256f2a6af943a28d45f30b363d1627a (diff) | |
Moves deprecated stuff to the bottom
Diffstat (limited to '10.md')
| -rw-r--r-- | 10.md | 57 |
1 files changed, 30 insertions, 27 deletions
| @@ -10,33 +10,6 @@ On "e" and "p" tags in Text Events (kind 1) | |||
| 10 | ## Abstract | 10 | ## Abstract |
| 11 | This NIP describes how to use "e" and "p" tags in text events, especially those that are replies to other text events. It helps clients thread the replies into a tree rooted at the original event. | 11 | This NIP describes how to use "e" and "p" tags in text events, especially those that are replies to other text events. It helps clients thread the replies into a tree rooted at the original event. |
| 12 | 12 | ||
| 13 | ## Positional "e" tags (DEPRECATED) | ||
| 14 | >This scheme is in common use; but should be considered deprecated. | ||
| 15 | |||
| 16 | `["e", <event-id>, <relay-url>]` as per NIP-01. | ||
| 17 | |||
| 18 | Where: | ||
| 19 | |||
| 20 | * `<event-id>` is the id of the event being referenced. | ||
| 21 | * `<relay-url>` is the URL of a recommended relay associated with the reference. Many clients treat this field as optional. | ||
| 22 | |||
| 23 | **The positions of the "e" tags within the event denote specific meanings as follows**: | ||
| 24 | |||
| 25 | * No "e" tag: <br> | ||
| 26 | This event is not a reply to, nor does it refer to, any other event. | ||
| 27 | |||
| 28 | * One "e" tag: <br> | ||
| 29 | `["e", <id>]`: The id of the event to which this event is a reply. | ||
| 30 | |||
| 31 | * Two "e" tags: `["e", <root-id>]`, `["e", <reply-id>]` <br> | ||
| 32 | `<root-id>` is the id of the event at the root of the reply chain. `<reply-id>` is the id of the article to which this event is a reply. | ||
| 33 | |||
| 34 | * Many "e" tags: `["e", <root-id>]` `["e", <mention-id>]`, ..., `["e", <reply-id>]`<br> | ||
| 35 | There may be any number of `<mention-ids>`. These are the ids of events which may, or may not be in the reply chain. | ||
| 36 | They are citing from this event. `root-id` and `reply-id` are as above. | ||
| 37 | |||
| 38 | >This scheme is deprecated because it creates ambiguities that are difficult, or impossible to resolve when an event references another but is not a reply. | ||
| 39 | |||
| 40 | ## Marked "e" tags (PREFERRED) | 13 | ## Marked "e" tags (PREFERRED) |
| 41 | `["e", <event-id>, <relay-url>, <marker>, <pubkey>]` | 14 | `["e", <event-id>, <relay-url>, <marker>, <pubkey>]` |
| 42 | 15 | ||
| @@ -62,3 +35,33 @@ When replying to a text event E the reply event's "p" tags should contain all of | |||
| 62 | 35 | ||
| 63 | Example: Given a text event authored by `a1` with "p" tags [`p1`, `p2`, `p3`] then the "p" tags of the reply should be [`a1`, `p1`, `p2`, `p3`] | 36 | Example: Given a text event authored by `a1` with "p" tags [`p1`, `p2`, `p3`] then the "p" tags of the reply should be [`a1`, `p1`, `p2`, `p3`] |
| 64 | in no particular order. | 37 | in no particular order. |
| 38 | |||
| 39 | ## Deprecated Positional "e" tags | ||
| 40 | |||
| 41 | This scheme is not in common use anymore and is here just to keep backward compatibility with older events on the network. | ||
| 42 | |||
| 43 | Positional `e` tags are deprecated because they create ambiguities that are difficult, or impossible to resolve when an event references another but is not a reply. | ||
| 44 | |||
| 45 | They use simple `e` tags without any marker. | ||
| 46 | |||
| 47 | `["e", <event-id>, <relay-url>]` as per NIP-01. | ||
| 48 | |||
| 49 | Where: | ||
| 50 | |||
| 51 | * `<event-id>` is the id of the event being referenced. | ||
| 52 | * `<relay-url>` is the URL of a recommended relay associated with the reference. Many clients treat this field as optional. | ||
| 53 | |||
| 54 | **The positions of the "e" tags within the event denote specific meanings as follows**: | ||
| 55 | |||
| 56 | * No "e" tag: <br> | ||
| 57 | This event is not a reply to, nor does it refer to, any other event. | ||
| 58 | |||
| 59 | * One "e" tag: <br> | ||
| 60 | `["e", <id>]`: The id of the event to which this event is a reply. | ||
| 61 | |||
| 62 | * Two "e" tags: `["e", <root-id>]`, `["e", <reply-id>]` <br> | ||
| 63 | `<root-id>` is the id of the event at the root of the reply chain. `<reply-id>` is the id of the article to which this event is a reply. | ||
| 64 | |||
| 65 | * Many "e" tags: `["e", <root-id>]` `["e", <mention-id>]`, ..., `["e", <reply-id>]`<br> | ||
| 66 | There may be any number of `<mention-ids>`. These are the ids of events which may, or may not be in the reply chain. | ||
| 67 | They are citing from this event. `root-id` and `reply-id` are as above. \ No newline at end of file | ||