diff options
| author | fiatjaf <fiatjaf@gmail.com> | 2023-11-15 07:33:26 -0300 |
|---|---|---|
| committer | fiatjaf <fiatjaf@gmail.com> | 2023-11-15 07:33:26 -0300 |
| commit | 1bbd87c42fe6ca6caa7582fdb89a355b6dfc70f4 (patch) | |
| tree | a54af6b8c99ce67f5abf31c254b1dc6f23395b57 /51.md | |
| parent | da05b5d9150200cec5a498ac180b6391abeddd69 (diff) | |
distinction between lists and sets.
Diffstat (limited to '51.md')
| -rw-r--r-- | 51.md | 30 |
1 files changed, 21 insertions, 9 deletions
| @@ -14,19 +14,31 @@ Public items in a list are specified in the event `tags` array, while private it | |||
| 14 | 14 | ||
| 15 | The kinds `30000` and `30001` have been reserved for generic lists. These must be accompanied by a `d` tag identifying the list, but these are generally client-specific, except in the standard cases specified below. | 15 | The kinds `30000` and `30001` have been reserved for generic lists. These must be accompanied by a `d` tag identifying the list, but these are generally client-specific, except in the standard cases specified below. |
| 16 | 16 | ||
| 17 | ## Standard lists | 17 | ### Standard lists |
| 18 | 18 | ||
| 19 | | name | kind | "d" tag | description | expected tag items | | 19 | These are some standards that emerged in the wild: |
| 20 | | --- | --- | --- | --- | --- | | 20 | |
| 21 | | Mute list | 30000 | `"mute"` | things the user doesn't want to see in their feeds | `"p"` (pubkeys), `"t"` (hashtags) | | 21 | | name | kind | "d" tag | description | expected tag items | |
| 22 | | Bookmarks list | 30001 | `"bookmark"` | things the user intends to save for the future | `"e"` (kind:1 notes), `"a"` (kind:30023 articles) | | 22 | | --- | --- | --- | --- | --- | |
| 23 | | Pin list | 30001 | `"pin"` | events the user intends to showcase in their profile page | `"e"` (kind:1 notes) | | 23 | | Mute list | 30000 | `"mute"` | things the user doesn't want to see in their feeds | `"p"` (pubkeys), `"t"` (hashtags) | |
| 24 | | Communities list | 30001 | `"communities"` | [NIP-72](72.md) communities the user belongs to | `"a"` (kind:34550 community definitions) | | 24 | | Bookmarks list | 30001 | `"bookmark"` | things the user intends to save for the future | `"e"` (kind:1 notes), `"a"` (kind:30023 articles) | |
| 25 | | Relay sets | 30002 | (user-defined) | user-defined relay groups the user can easily pick and choose from during variadic operations | `"relay"` (relay URLs) | | 25 | | Pin list | 30001 | `"pin"` | events the user intends to showcase in their profile page | `"e"` (kind:1 notes) | |
| 26 | | Communities list | 30001 | `"communities"` | [NIP-72](72.md) communities the user belongs to | `"a"` (kind:34550 community definitions) | | ||
| 27 | |||
| 28 | ## Sets | ||
| 29 | |||
| 30 | Sets are lists with well-defined meaning and purpose and user-assigned `d` tags meant to be displayed in the UI. For example, _relay sets_ can be displayed in a dropdown UI to give users the option to switch to which relays they will publish an event or from which relays they will read the replies to an event; or _curation sets_ can be used by apps to showcase curations made by others tagged to different topics. | ||
| 31 | |||
| 32 | Aside from their main identifier, the `"d"` tag, sets can optionally have a `"title"`, an `"image"` and a `"description"` tag that can be used to enhance their UI. | ||
| 33 | |||
| 34 | | name | kind | description | expected tag items | | ||
| 35 | | --- | --- | --- | --- | | ||
| 36 | | Relay sets | 30002 | user-defined relay groups the user can easily pick and choose from during variadic operations | `"relay"` (relay URLs) | | ||
| 37 | | Article Curation sets | 30003 | groups of articles picked by users as interesting and/or belonging to the same category | `"a"` (kind:30023 articles) | | ||
| 26 | 38 | ||
| 27 | ## Examples | 39 | ## Examples |
| 28 | 40 | ||
| 29 | ### A _Mute list_ with some public items and some encrypted items | 41 | ### A _mute list_ with some public items and some encrypted items |
| 30 | 42 | ||
| 31 | ```json | 43 | ```json |
| 32 | { | 44 | { |