upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Fernandez <p@f7z.io>2023-08-24 23:57:11 +0300
committerGitHub <noreply@github.com>2023-08-24 23:57:11 +0300
commit76f5857f88a6263820c698484f64fac27bed3462 (patch)
tree2871ca5e3463c2f4690a61251f771c6cb565b697
parentc6b6eea96a85aa6c9b5ce579685214fea3de0282 (diff)
parent7143bfccf7470e209c0048050f104a27901b9ebd (diff)
Merge pull request #723 from gzuuus/master
Nip 51 extended kind 30001
-rw-r--r--51.md42
-rw-r--r--README.md2
2 files changed, 41 insertions, 3 deletions
diff --git a/51.md b/51.md
index b7229aa..cbd6be1 100644
--- a/51.md
+++ b/51.md
@@ -4,7 +4,7 @@ NIP-51
4Lists 4Lists
5----- 5-----
6 6
7`draft` `optional` `author:fiatjaf` `author:arcbtc` `author:monlovesmango` `author:eskema` 7`draft` `optional` `author:fiatjaf` `author:arcbtc` `author:monlovesmango` `author:eskema` `author:gzuuus`
8 8
9A "list" event is defined as having a list of public and/or private tags. Public tags will be listed in the event `tags`. Private tags will be encrypted in the event `content`. Encryption for private tags will use [NIP-04 - Encrypted Direct Message](04.md) encryption, using the list author's private and public key for the shared secret. A distinct event kind should be used for each list type created. 9A "list" event is defined as having a list of public and/or private tags. Public tags will be listed in the event `tags`. Private tags will be encrypted in the event `content`. Encryption for private tags will use [NIP-04 - Encrypted Direct Message](04.md) encryption, using the list author's private and public key for the shared secret. A distinct event kind should be used for each list type created.
10 10
@@ -84,6 +84,43 @@ Then the user would create a 'Categorized People' list event like below:
84} 84}
85``` 85```
86 86
87Lets say a user wants to create a 'Categorized Bookmarks' list of `bookmarks` and has keys:
88```
89priv: fb505c65d4df950f5d28c9e4d285ee12ffaf315deef1fc24e3c7cd1e7e35f2b1
90pub: b1a5c93edcc8d586566fde53a20bdb50049a97b15483cb763854e57016e0fa3d
91```
92The user wants to publicly include these bookmarks:
93
94```json
95["e", "5c83da77af1dec6d7289834998ad7aafbd9e2191396d75ec3cc27f5a77226f36", "wss://nostr.example.com"],
96["a", "30023:f7234bd4c1394dda46d09f35bd384dd30cc552ad5541990f98844fb06676e9ca:abcd", "wss://nostr.example.com"],
97["r", "https://github.com/nostr-protocol/nostr", "Nostr repository"],
98```
99and privately include these bookmarks (below is the JSON that would be encrypted and placed in the event content):
100
101```json
102[
103 ["r", "https://my-private.bookmark", "My private bookmark"],
104 ["a", "30001:f7234bd4c1394dda46d09f35bd384dd30cc552ad5541990f98844fb06676e9ca:abcd", "wss://nostr.example.com"],
105]
106```
107
108Then the user would create a 'Categorized Bookmarks' list event like below:
109
110```json
111{
112 "kind": 30001,
113 "tags": [
114 ["d", "bookmarks"],
115 ["e", "5c83da77af1dec6d7289834998ad7aafbd9e2191396d75ec3cc27f5a77226f36", "wss://nostr.example.com"],
116 ["a", "30023:f7234bd4c1394dda46d09f35bd384dd30cc552ad5541990f98844fb06676e9ca:abcd", "wss://nostr.example.com"],
117 ["r", "https://github.com/nostr-protocol/nostr", "Nostr repository"],
118 ],
119 "content": "y3AyaLJfnmYr9x9Od9o4aYrmL9+Ynmsim5y2ONrU0urOTq+V81CyAthQ2mUOWE9xwGgrizhY7ILdQwWhy6FK0sA33GHtC0egUJw1zIdknPe7BZjznD570yk/8RXYgGyDKdexME+RMYykrnYFxq1+y/h00kmJg4u+Gpn+ZjmVhNYxl9b+TiBOAXG9UxnK/H0AmUqDpcldn6+j1/AiStwYZhD1UZ3jzDIk2qcCDy7MlGnYhSP+kNmG+2b0T/D1L0Z7?iv=PGJJfPE84gacAh7T0e6duQ==",
120 ...other fields
121}
122```
123
87## List Event Kinds 124## List Event Kinds
88 125
89| kind | list type | 126| kind | list type |
@@ -93,6 +130,7 @@ Then the user would create a 'Categorized People' list event like below:
93| 30000 | Categorized People | 130| 30000 | Categorized People |
94| 30001 | Categorized Bookmarks | 131| 30001 | Categorized Bookmarks |
95 132
133
96### Mute List 134### Mute List
97 135
98An event with kind `10000` is defined as a replaceable list event for listing content a user wants to mute. Any standardized tag can be included in a Mute List. 136An event with kind `10000` is defined as a replaceable list event for listing content a user wants to mute. Any standardized tag can be included in a Mute List.
@@ -107,4 +145,4 @@ An event with kind `30000` is defined as a parameterized replaceable list event
107 145
108### Categorized Bookmarks List 146### Categorized Bookmarks List
109 147
110An event with kind `30001` is defined as a parameterized replaceable list event for categorizing bookmarks. The 'd' parameter for this event holds the category name of the list. Any standardized tag can be included in a Categorized Bookmarks List. 148An event of kind `30001` is defined as a parameterized replaceable list event for categorizing bookmarks. The 'd' parameter for this event holds the category name of the list. The bookmark lists may contain metadata tags such as 'title', 'image', 'summary' as defined in [NIP-23 - Long-form Content](23.md). Any standardized tag can be included in a Categorized Bookmark List. \ No newline at end of file
diff --git a/README.md b/README.md
index 72eb2a4..f8b77df 100644
--- a/README.md
+++ b/README.md
@@ -163,7 +163,7 @@ Please update these lists when proposing NIPs introducing new event kinds.
163| `k` | kind number (string) | -- | [18](18.md), [72](72.md) | 163| `k` | kind number (string) | -- | [18](18.md), [72](72.md) |
164| `l` | label, label namespace | annotations | [32](32.md) | 164| `l` | label, label namespace | annotations | [32](32.md) |
165| `L` | label namespace | -- | [32](32.md) | 165| `L` | label namespace | -- | [32](32.md) |
166| `r` | a reference (URL, etc) | -- | | 166| `r` | a reference (URL, etc) | petname | |
167| `r` | relay url | marker | [65](65.md) | 167| `r` | relay url | marker | [65](65.md) |
168| `t` | hashtag | -- | | 168| `t` | hashtag | -- | |
169| `amount` | millisatoshis, stringified | -- | [57](57.md) | 169| `amount` | millisatoshis, stringified | -- | [57](57.md) |