diff options
Diffstat (limited to '51.md')
| -rw-r--r-- | 51.md | 61 |
1 files changed, 46 insertions, 15 deletions
| @@ -10,25 +10,30 @@ This NIP defines lists of things that users can create. Lists can contain refere | |||
| 10 | 10 | ||
| 11 | Public items in a list are specified in the event `tags` array, while private items are specified in a JSON array that mimics the structure of the event `tags` array, but stringified and encrypted using the same scheme from [NIP-04](04.md) (the shared key is computed using the author's public and private key) and stored in the `.content`. | 11 | Public items in a list are specified in the event `tags` array, while private items are specified in a JSON array that mimics the structure of the event `tags` array, but stringified and encrypted using the same scheme from [NIP-04](04.md) (the shared key is computed using the author's public and private key) and stored in the `.content`. |
| 12 | 12 | ||
| 13 | When new items are added to an existing list, clients SHOULD append them to the end of the list, so they are stored in chronological order. | ||
| 14 | |||
| 13 | ## Types of lists | 15 | ## Types of lists |
| 14 | 16 | ||
| 15 | ## Standard lists | 17 | ## Standard lists |
| 16 | 18 | ||
| 17 | Standard lists use non-parameterized replaceable events, meaning users may only have a single list of each kind. They have special meaning and clients may rely on them to augment a user's profile or browsing experience. | 19 | Standard lists use non-parameterized replaceable events, meaning users may only have a single list of each kind. They have special meaning and clients may rely on them to augment a user's profile or browsing experience. |
| 18 | 20 | ||
| 19 | For example, _mute lists_ can contain the public keys of spammers and bad actors users don't want to see in their feeds or receive annoying notifications from. | 21 | For example, _mute list_ can contain the public keys of spammers and bad actors users don't want to see in their feeds or receive annoying notifications from. |
| 20 | 22 | ||
| 21 | | name | kind | description | expected tag items | | 23 | | name | kind | description | expected tag items | |
| 22 | | --- | --- | --- | --- | | 24 | | --- | --- | --- | --- | |
| 23 | | Mute list | 10000 | things the user doesn't want to see in their feeds | `"p"` (pubkeys), `"t"` (hashtags), `"word"` (lowercase string), `"e"` (threads) | | 25 | | Mute list | 10000 | things the user doesn't want to see in their feeds | `"p"` (pubkeys), `"t"` (hashtags), `"word"` (lowercase string), `"e"` (threads) | |
| 24 | | Pinned notes | 10001 | events the user intends to showcase in their profile page | `"e"` (kind:1 notes) | | 26 | | Pinned notes | 10001 | events the user intends to showcase in their profile page | `"e"` (kind:1 notes) | |
| 25 | | Bookmarks | 10003 | uncategorized, "global" list of things a user wants to save | `"e"` (kind:1 notes), `"a"` (kind:30023 articles), `"t"` (hashtags), `"r" (URLs)` | | 27 | | Bookmarks | 10003 | uncategorized, "global" list of things a user wants to save | `"e"` (kind:1 notes), `"a"` (kind:30023 articles), `"t"` (hashtags), `"r"` (URLs) | |
| 26 | | Communities | 10004 | [NIP-72](72.md) communities the user belongs to | `"a"` (kind:34550 community definitions) | | 28 | | Communities | 10004 | [NIP-72](72.md) communities the user belongs to | `"a"` (kind:34550 community definitions) | |
| 27 | | Public chats | 10005 | [NIP-28](28.md) chat channels the user is in | `"e"` (kind:40 channel definitions) | | 29 | | Public chats | 10005 | [NIP-28](28.md) chat channels the user is in | `"e"` (kind:40 channel definitions) | |
| 28 | | Blocked relays | 10006 | relays clients should never connect to | `"relay"` (relay URLs) | | 30 | | Blocked relays | 10006 | relays clients should never connect to | `"relay"` (relay URLs) | |
| 29 | | Search relays | 10007 | relays clients should use when performing search queries | `"relay"` (relay URLs) | | 31 | | Search relays | 10007 | relays clients should use when performing search queries | `"relay"` (relay URLs) | |
| 30 | | Interests | 10015 | topics a user may be interested in and pointers | `"t"` (hashtags) and `"a" (kind:30015 interest set)` | | 32 | | Simple groups | 10009 | [NIP-29](29.md) groups the user is in | `"group"` ([NIP-29](29.md) group ids + mandatory relay URL) | |
| 31 | | Emojis | 10030 | user preferred emojis and pointers to emoji sets | `"emoji"` (see [NIP-30](30.md)) and `"a"` (kind:30030 emoji set) | | 33 | | Interests | 10015 | topics a user may be interested in and pointers | `"t"` (hashtags) and `"a"` (kind:30015 interest set) | |
| 34 | | Emojis | 10030 | user preferred emojis and pointers to emoji sets | `"emoji"` (see [NIP-30](30.md)) and `"a"` (kind:30030 emoji set) | | ||
| 35 | | Good wiki authors | 10101 | [NIP-54](54.md) user recommended wiki authors | `"p"` (pubkeys) | | ||
| 36 | | Good wiki relays | 10102 | [NIP-54](54.md) relays deemed to only host useful articles | `"relay"` (relay URLs) | | ||
| 32 | 37 | ||
| 33 | ## Sets | 38 | ## Sets |
| 34 | 39 | ||
| @@ -42,10 +47,12 @@ Aside from their main identifier, the `"d"` tag, sets can optionally have a `"ti | |||
| 42 | | --- | --- | --- | --- | | 47 | | --- | --- | --- | --- | |
| 43 | | Follow sets | 30000 | categorized groups of users a client may choose to check out in different circumstances | `"p"` (pubkeys) | | 48 | | Follow sets | 30000 | categorized groups of users a client may choose to check out in different circumstances | `"p"` (pubkeys) | |
| 44 | | Relay sets | 30002 | user-defined relay groups the user can easily pick and choose from during various operations | `"relay"` (relay URLs) | | 49 | | Relay sets | 30002 | user-defined relay groups the user can easily pick and choose from during various operations | `"relay"` (relay URLs) | |
| 45 | | Bookmark sets | 30003 | user-defined bookmarks categories , for when bookmarks must be in labeled separate groups | `"e"` (kind:1 notes), `"a"` (kind:30023 articles), `"t"` (hashtags), `"r" (URLs)` | | 50 | | Bookmark sets | 30003 | user-defined bookmarks categories , for when bookmarks must be in labeled separate groups | `"e"` (kind:1 notes), `"a"` (kind:30023 articles), `"t"` (hashtags), `"r"` (URLs) | |
| 46 | | Curation sets | 30004 | groups of articles picked by users as interesting and/or belonging to the same category | `"a"` (kind:30023 articles), `"e"` (kind:1 notes) | | 51 | | Curation sets | 30004 | groups of articles picked by users as interesting and/or belonging to the same category | `"a"` (kind:30023 articles), `"e"` (kind:1 notes) | |
| 52 | | Curation sets | 30005 | groups of videos picked by users as interesting and/or belonging to the same category | `"a"` (kind:34235 videos) | | ||
| 47 | | Interest sets | 30015 | interest topics represented by a bunch of "hashtags" | `"t"` (hashtags) | | 53 | | Interest sets | 30015 | interest topics represented by a bunch of "hashtags" | `"t"` (hashtags) | |
| 48 | | Emoji sets | 30030 | categorized emoji groups | `"emoji"` (see [NIP-30](30.md)) | | 54 | | Emoji sets | 30030 | categorized emoji groups | `"emoji"` (see [NIP-30](30.md)) | |
| 55 | | Release artifact sets | 30063 | groups of files of a software release | `"e"` (kind:1063 [file metadata](94.md) events), `"i"` (application identifier, typically reverse domain notation), `"version"` | | ||
| 49 | 56 | ||
| 50 | ## Deprecated standard lists | 57 | ## Deprecated standard lists |
| 51 | 58 | ||
| @@ -79,7 +86,7 @@ Some clients have used these lists in the past, but they should work on transiti | |||
| 79 | 86 | ||
| 80 | ### A _curation set_ of articles and notes about yaks | 87 | ### A _curation set_ of articles and notes about yaks |
| 81 | 88 | ||
| 82 | ``` | 89 | ```json |
| 83 | { | 90 | { |
| 84 | "id": "567b41fc9060c758c4216fe5f8d3df7c57daad7ae757fa4606f0c39d4dd220ef", | 91 | "id": "567b41fc9060c758c4216fe5f8d3df7c57daad7ae757fa4606f0c39d4dd220ef", |
| 85 | "pubkey": "d6dc95542e18b8b7aec2f14610f55c335abebec76f3db9e58c254661d0593a0c", | 92 | "pubkey": "d6dc95542e18b8b7aec2f14610f55c335abebec76f3db9e58c254661d0593a0c", |
| @@ -100,6 +107,30 @@ Some clients have used these lists in the past, but they should work on transiti | |||
| 100 | } | 107 | } |
| 101 | ``` | 108 | ``` |
| 102 | 109 | ||
| 110 | ### A _release artifact set_ of an Example App | ||
| 111 | |||
| 112 | ```json | ||
| 113 | { | ||
| 114 | "id": "567b41fc9060c758c4216fe5f8d3df7c57daad7ae757fa4606f0c39d4dd220ef", | ||
| 115 | "pubkey": "d6dc95542e18b8b7aec2f14610f55c335abebec76f3db9e58c254661d0593a0c", | ||
| 116 | "created_at": 1695327657, | ||
| 117 | "kind": 30063, | ||
| 118 | "tags": [ | ||
| 119 | ["d", "ak8dy3v7"], | ||
| 120 | ["i", "com.example.app"], | ||
| 121 | ["version", "0.0.1"], | ||
| 122 | ["title", "Example App"], | ||
| 123 | ["image", "http://cdn.site/p/com.example.app/icon.png"], | ||
| 124 | ["e", "d78ba0d5dce22bfff9db0a9e996c9ef27e2c91051de0c4e1da340e0326b4941e"], // Windows exe | ||
| 125 | ["e", "f27e2c91051de0c4e1da0d5dce22bfff9db0a9340e0326b4941ed78bae996c9e"], // MacOS dmg | ||
| 126 | ["e", "9d24ddfab95ba3ff7c03fbd07ad011fff245abea431fb4d3787c2d04aad02332"], // Linux AppImage | ||
| 127 | ["e", "340e0326b340e0326b4941ed78ba340e0326b4941ed78ba340e0326b49ed78ba"] // PWA | ||
| 128 | ], | ||
| 129 | "content": "Example App is a decentralized marketplace for apps", | ||
| 130 | "sig": "a9a4e2192eede77e6c9d24ddfab95ba3ff7c03fbd07ad011fff245abea431fb4d3787c2d04aad001cb039cb8de91d83ce30e9a94f82ac3c5a2372aa1294a96bd" | ||
| 131 | } | ||
| 132 | ``` | ||
| 133 | |||
| 103 | ## Encryption process pseudocode | 134 | ## Encryption process pseudocode |
| 104 | 135 | ||
| 105 | ```scala | 136 | ```scala |