upleb.uk

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

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--02.md4
-rw-r--r--05.md4
-rw-r--r--09.md6
-rw-r--r--10.md6
-rw-r--r--11.md32
-rw-r--r--13.md47
-rw-r--r--15.md19
-rw-r--r--17.md10
-rw-r--r--25.md8
-rw-r--r--26.md2
-rw-r--r--28.md26
-rw-r--r--29.md28
-rw-r--r--30.md16
-rw-r--r--32.md28
-rw-r--r--34.md7
-rw-r--r--35.md4
-rw-r--r--38.md6
-rw-r--r--39.md5
-rw-r--r--42.md8
-rw-r--r--44.md4
-rw-r--r--45.md2
-rw-r--r--46.md8
-rw-r--r--47.md10
-rw-r--r--50.md4
-rw-r--r--51.md2
-rw-r--r--53.md10
-rw-r--r--54.md28
-rw-r--r--55.md6
-rw-r--r--56.md12
-rw-r--r--57.md2
-rw-r--r--58.md12
-rw-r--r--59.md4
-rw-r--r--64.md14
-rw-r--r--65.md4
-rw-r--r--71.md4
-rw-r--r--72.md6
-rw-r--r--73.md2
-rw-r--r--75.md20
-rw-r--r--84.md4
-rw-r--r--89.md22
-rw-r--r--90.md26
-rw-r--r--94.md4
-rw-r--r--96.md59
-rw-r--r--99.md2
-rw-r--r--README.md14
45 files changed, 299 insertions, 252 deletions
diff --git a/02.md b/02.md
index 4029b22..8354bf0 100644
--- a/02.md
+++ b/02.md
@@ -14,7 +14,7 @@ The `.content` is not used.
14 14
15For example: 15For example:
16 16
17```json 17```jsonc
18{ 18{
19 "kind": 3, 19 "kind": 3,
20 "tags": [ 20 "tags": [
@@ -23,7 +23,7 @@ For example:
23 ["p", "612ae..e610f", "ws://carolrelay.com/ws", "carol"] 23 ["p", "612ae..e610f", "ws://carolrelay.com/ws", "carol"]
24 ], 24 ],
25 "content": "", 25 "content": "",
26 ...other fields 26 // other fields...
27} 27}
28``` 28```
29 29
diff --git a/05.md b/05.md
index eeca551..ca6da7b 100644
--- a/05.md
+++ b/05.md
@@ -16,12 +16,12 @@ The result should be a JSON document object with a key `"names"` that should the
16 16
17If a client sees an event like this: 17If a client sees an event like this:
18 18
19```json 19```jsonc
20{ 20{
21 "pubkey": "b0635d6a9851d3aed0cd6c495b282167acf761729078d975fc341b22650b07b9", 21 "pubkey": "b0635d6a9851d3aed0cd6c495b282167acf761729078d975fc341b22650b07b9",
22 "kind": 0, 22 "kind": 0,
23 "content": "{\"name\": \"bob\", \"nip05\": \"bob@example.com\"}" 23 "content": "{\"name\": \"bob\", \"nip05\": \"bob@example.com\"}"
24 ... 24 // other fields...
25} 25}
26``` 26```
27 27
diff --git a/09.md b/09.md
index e1be542..23ffeab 100644
--- a/09.md
+++ b/09.md
@@ -2,7 +2,7 @@ NIP-09
2====== 2======
3 3
4Event Deletion Request 4Event Deletion Request
5-------------- 5----------------------
6 6
7`draft` `optional` 7`draft` `optional`
8 8
@@ -12,7 +12,7 @@ The event's `content` field MAY contain a text note describing the reason for th
12 12
13For example: 13For example:
14 14
15``` 15```jsonc
16{ 16{
17 "kind": 5, 17 "kind": 5,
18 "pubkey": <32-bytes hex-encoded public key of the event creator>, 18 "pubkey": <32-bytes hex-encoded public key of the event creator>,
@@ -24,7 +24,7 @@ For example:
24 ["k", "30023"] 24 ["k", "30023"]
25 ], 25 ],
26 "content": "these posts were published by accident", 26 "content": "these posts were published by accident",
27 ...other fields 27 // other fields...
28} 28}
29``` 29```
30 30
diff --git a/10.md b/10.md
index dfd4cb9..94db4fa 100644
--- a/10.md
+++ b/10.md
@@ -2,8 +2,8 @@ NIP-10
2====== 2======
3 3
4 4
5On "e" and "p" tags in Text Events (kind 1). 5On "e" and "p" tags in Text Events (kind 1)
6-------------------------------------------- 6-------------------------------------------
7 7
8`draft` `optional` 8`draft` `optional`
9 9
@@ -43,7 +43,7 @@ They are citing from this event. `root-id` and `reply-id` are as above.
43Where: 43Where:
44 44
45 * `<event-id>` is the id of the event being referenced. 45 * `<event-id>` is the id of the event being referenced.
46 * `<relay-url>` is the URL of a recommended relay associated with the reference. Clients SHOULD add a valid `<relay-URL>` field, but may instead leave it as `""`. 46 * `<relay-url>` is the URL of a recommended relay associated with the reference. Clients SHOULD add a valid `<relay-url>` field, but may instead leave it as `""`.
47 * `<marker>` is optional and if present is one of `"reply"`, `"root"`, or `"mention"`. 47 * `<marker>` is optional and if present is one of `"reply"`, `"root"`, or `"mention"`.
48 * `<pubkey>` is optional, SHOULD be the pubkey of the author of the referenced event 48 * `<pubkey>` is optional, SHOULD be the pubkey of the author of the referenced event
49 49
diff --git a/11.md b/11.md
index a50038a..0ca5870 100644
--- a/11.md
+++ b/11.md
@@ -2,7 +2,7 @@ NIP-11
2====== 2======
3 3
4Relay Information Document 4Relay Information Document
5--------------------------- 5--------------------------
6 6
7`draft` `optional` 7`draft` `optional`
8 8
@@ -66,7 +66,7 @@ These are limitations imposed by the relay on clients. Your client
66should expect that requests which exceed these *practical* limitations 66should expect that requests which exceed these *practical* limitations
67are rejected or fail immediately. 67are rejected or fail immediately.
68 68
69```json 69```jsonc
70{ 70{
71 "limitation": { 71 "limitation": {
72 "max_message_length": 16384, 72 "max_message_length": 16384,
@@ -83,7 +83,7 @@ are rejected or fail immediately.
83 "created_at_lower_limit": 31536000, 83 "created_at_lower_limit": 31536000,
84 "created_at_upper_limit": 3 84 "created_at_upper_limit": 3
85 }, 85 },
86 ... 86 // other fields...
87} 87}
88``` 88```
89 89
@@ -146,14 +146,15 @@ Retention times are given in seconds, with `null` indicating infinity.
146If zero is provided, this means the event will not be stored at 146If zero is provided, this means the event will not be stored at
147all, and preferably an error will be provided when those are received. 147all, and preferably an error will be provided when those are received.
148 148
149```json 149```jsonc
150{ 150{
151 "retention": [ 151 "retention": [
152 {"kinds": [0, 1, [5, 7], [40, 49]], "time": 3600}, 152 {"kinds": [0, 1, [5, 7], [40, 49]], "time": 3600},
153 {"kinds": [[40000, 49999]], "time": 100}, 153 {"kinds": [[40000, 49999]], "time": 100},
154 {"kinds": [[30000, 39999]], "count": 1000}, 154 {"kinds": [[30000, 39999]], "count": 1000},
155 {"time": 3600, "count": 10000} 155 {"time": 3600, "count": 10000}
156 ] 156 ],
157 // other fields...
157} 158}
158``` 159```
159 160
@@ -172,7 +173,7 @@ There is no need to specify retention times for _ephemeral events_ since they ar
172### Content Limitations 173### Content Limitations
173 174
174Some relays may be governed by the arbitrary laws of a nation state. This 175Some relays may be governed by the arbitrary laws of a nation state. This
175may limit what content can be stored in cleartext on those relays. All 176may limit what content can be stored in clear-text on those relays. All
176clients are encouraged to use encryption to work around this limitation. 177clients are encouraged to use encryption to work around this limitation.
177 178
178It is not possible to describe the limitations of each country's laws 179It is not possible to describe the limitations of each country's laws
@@ -183,13 +184,13 @@ countries' laws might end up being enforced on them, and then
183indirectly on their users' content. 184indirectly on their users' content.
184 185
185Users should be able to avoid relays in countries they don't like, 186Users should be able to avoid relays in countries they don't like,
186and/or select relays in more favourable zones. Exposing this 187and/or select relays in more favorable zones. Exposing this
187flexibility is up to the client software. 188flexibility is up to the client software.
188 189
189```json 190```jsonc
190{ 191{
191 "relay_countries": [ "CA", "US" ], 192 "relay_countries": [ "CA", "US" ],
192 ... 193 // other fields...
193} 194}
194``` 195```
195 196
@@ -208,12 +209,12 @@ local community. This would encourage users to follow the global
208feed on that relay, in addition to their usual individual follows. 209feed on that relay, in addition to their usual individual follows.
209To support this goal, relays MAY specify some of the following values. 210To support this goal, relays MAY specify some of the following values.
210 211
211```json 212```jsonc
212{ 213{
213 "language_tags": ["en", "en-419"], 214 "language_tags": ["en", "en-419"],
214 "tags": ["sfw-only", "bitcoin-only", "anime"], 215 "tags": ["sfw-only", "bitcoin-only", "anime"],
215 "posting_policy": "https://example.com/posting-policy.html", 216 "posting_policy": "https://example.com/posting-policy.html",
216 ... 217 // other fields...
217} 218}
218``` 219```
219 220
@@ -260,10 +261,10 @@ Relays that require payments may want to expose their fee schedules.
260 261
261A URL pointing to an image to be used as an icon for the relay. Recommended to be squared in shape. 262A URL pointing to an image to be used as an icon for the relay. Recommended to be squared in shape.
262 263
263```json 264```jsonc
264{ 265{
265 "icon": "https://nostr.build/i/53866b44135a27d624e99c6165cabd76ac8f72797209700acb189fce75021f47.jpg", 266 "icon": "https://nostr.build/i/53866b44135a27d624e99c6165cabd76ac8f72797209700acb189fce75021f47.jpg",
266 ... 267 // other fields...
267} 268}
268``` 269```
269 270
@@ -271,9 +272,11 @@ A URL pointing to an image to be used as an icon for the relay. Recommended to b
271 272
272As of 2 May 2023 the following command provided these results: 273As of 2 May 2023 the following command provided these results:
273 274
275```bash
276$ curl -H "Accept: application/nostr+json" https://eden.nostr.land | jq
274``` 277```
275~> curl -H "Accept: application/nostr+json" https://eden.nostr.land | jq
276 278
279```json
277{ 280{
278 "description": "nostr.land family of relays (us-or-01)", 281 "description": "nostr.land family of relays (us-or-01)",
279 "name": "nostr.land", 282 "name": "nostr.land",
@@ -312,3 +315,4 @@ As of 2 May 2023 the following command provided these results:
312 ] 315 ]
313 }, 316 },
314} 317}
318```
diff --git a/13.md b/13.md
index 0900d2d..cf5b1ac 100644
--- a/13.md
+++ b/13.md
@@ -48,37 +48,30 @@ Validating
48Here is some reference C code for calculating the difficulty (aka number of leading zero bits) in a nostr event id: 48Here is some reference C code for calculating the difficulty (aka number of leading zero bits) in a nostr event id:
49 49
50```c 50```c
51#include <stdio.h> 51int zero_bits(unsigned char b)
52#include <stdlib.h> 52{
53#include <string.h> 53 int n = 0;
54
55int countLeadingZeroes(const char *hex) {
56 int count = 0;
57
58 for (int i = 0; i < strlen(hex); i++) {
59 int nibble = (int)strtol((char[]){hex[i], '\0'}, NULL, 16);
60 if (nibble == 0) {
61 count += 4;
62 } else {
63 count += __builtin_clz(nibble) - 28;
64 break;
65 }
66 }
67 54
68 return count; 55 if (b == 0)
69} 56 return 8;
70 57
71int main(int argc, char *argv[]) { 58 while (b >>= 1)
72 if (argc != 2) { 59 n++;
73 fprintf(stderr, "Usage: %s <hex_string>\n", argv[0]);
74 return 1;
75 }
76 60
77 const char *hex_string = argv[1]; 61 return 7-n;
78 int result = countLeadingZeroes(hex_string); 62}
79 printf("Leading zeroes in hex string %s: %d\n", hex_string, result);
80 63
81 return 0; 64/* find the number of leading zero bits in a hash */
65int count_leading_zero_bits(unsigned char *hash)
66{
67 int bits, total, i;
68 for (i = 0, total = 0; i < 32; i++) {
69 bits = zero_bits(hash[i]);
70 total += bits;
71 if (bits != 8)
72 break;
73 }
74 return total;
82} 75}
83``` 76```
84 77
diff --git a/15.md b/15.md
index 2a4e2c2..b55b444 100644
--- a/15.md
+++ b/15.md
@@ -73,10 +73,10 @@ Fields that are not self-explanatory:
73 73
74**Event Tags** 74**Event Tags**
75 75
76```json 76```jsonc
77{ 77{
78 "tags": [["d", <string, id of stall]], 78 "tags": [["d", <string, id of stall]],
79 ... 79 // other fields...
80} 80}
81``` 81```
82 - the `d` tag is required, its value MUST be the same as the stall `id`. 82 - the `d` tag is required, its value MUST be the same as the stall `id`.
@@ -124,12 +124,12 @@ Fields that are not self-explanatory:
124 124
125**Event Tags** 125**Event Tags**
126 126
127```json 127```jsonc
128 "tags": [ 128 "tags": [
129 ["d", <string, id of product], 129 ["d", <string, id of product],
130 ["t", <string (optional), product category], 130 ["t", <string (optional), product category],
131 ["t", <string (optional), product category], 131 ["t", <string (optional), product category],
132 ... 132 // other fields...
133 ], 133 ],
134 ... 134 ...
135``` 135```
@@ -158,7 +158,7 @@ The below JSON goes in content of [NIP-04](04.md).
158 "type": 0, 158 "type": 0,
159 "name": <string (optional), ???>, 159 "name": <string (optional), ???>,
160 "address": <string (optional), for physical goods an address should be provided>, 160 "address": <string (optional), for physical goods an address should be provided>,
161 "message": "<string (optional), message for merchant>, 161 "message": <string (optional), message for merchant>,
162 "contact": { 162 "contact": {
163 "nostr": <32-bytes hex of a pubkey>, 163 "nostr": <32-bytes hex of a pubkey>,
164 "phone": <string (optional), if the customer wants to be contacted by phone>, 164 "phone": <string (optional), if the customer wants to be contacted by phone>,
@@ -237,7 +237,7 @@ Create a customized user experience using the `naddr` from [NIP-19](19.md#sharea
237 237
238**Event Content** 238**Event Content**
239 239
240```json 240```jsonc
241{ 241{
242 "name": <string (optional), market name>, 242 "name": <string (optional), market name>,
243 "about": <string (optional), market description>, 243 "about": <string (optional), market description>,
@@ -248,7 +248,7 @@ Create a customized user experience using the `naddr` from [NIP-19](19.md#sharea
248 "darkMode": <bool, true/false> 248 "darkMode": <bool, true/false>
249 }, 249 },
250 "merchants": [array of pubkeys (optional)], 250 "merchants": [array of pubkeys (optional)],
251 ... 251 // other fields...
252} 252}
253``` 253```
254 254
@@ -290,10 +290,11 @@ This event leverages naddr to enable comprehensive customization and sharing of
290 290
291### Event `1021`: Bid 291### Event `1021`: Bid
292 292
293```json 293```jsonc
294{ 294{
295 "content": <int, amount of sats>, 295 "content": <int, amount of sats>,
296 "tags": [["e", <event ID of the auction to bid on>]], 296 "tags": [["e", <event ID of the auction to bid on>]],
297 // other fields...
297} 298}
298``` 299```
299 300
@@ -335,4 +336,4 @@ Customer support is handled over whatever communication method was specified. If
335 336
336## Additional 337## Additional
337 338
338Standard data models can be found <a href="https://raw.githubusercontent.com/lnbits/nostrmarket/main/models.py">here</a> 339Standard data models can be found [here](https://raw.githubusercontent.com/lnbits/nostrmarket/main/models.py)
diff --git a/17.md b/17.md
index d22dbde..4b96bce 100644
--- a/17.md
+++ b/17.md
@@ -12,18 +12,18 @@ This NIP defines an encrypted direct messaging scheme using [NIP-44](44.md) encr
12 12
13Kind `14` is a chat message. `p` tags identify one or more receivers of the message. 13Kind `14` is a chat message. `p` tags identify one or more receivers of the message.
14 14
15```js 15```jsonc
16{ 16{
17 "id": "<usual hash>", 17 "id": "<usual hash>",
18  "pubkey": "<sender-pubkey>", 18  "pubkey": "<sender-pubkey>",
19 "created_at": now(), 19 "created_at": "<current-time>",
20  "kind": 14, 20  "kind": 14,
21  "tags": [ 21  "tags": [
22    ["p", "<receiver-1-pubkey>", "<relay-url>"], 22    ["p", "<receiver-1-pubkey>", "<relay-url>"],
23    ["p", "<receiver-2-pubkey>", "<relay-url>"], 23    ["p", "<receiver-2-pubkey>", "<relay-url>"],
24    ["e", "<kind-14-id>", "<relay-url>", "reply"] // if this is a reply 24    ["e", "<kind-14-id>", "<relay-url>", "reply"] // if this is a reply
25 ["subject", "<conversation-title>"], 25 ["subject", "<conversation-title>"],
26    ... 26    // rest of tags...
27  ], 27  ],
28  "content": "<message-in-plain-text>", 28  "content": "<message-in-plain-text>",
29} 29}
@@ -86,7 +86,7 @@ Clients CAN offer disappearing messages by setting an `expiration` tag in the gi
86 86
87Kind `10050` indicates the user's preferred relays to receive DMs. The event MUST include a list of `relay` tags with relay URIs. 87Kind `10050` indicates the user's preferred relays to receive DMs. The event MUST include a list of `relay` tags with relay URIs.
88 88
89```js 89```jsonc
90{ 90{
91 "kind": 10050, 91 "kind": 10050,
92 "tags": [ 92 "tags": [
@@ -94,7 +94,7 @@ Kind `10050` indicates the user's preferred relays to receive DMs. The event MUS
94 ["relay", "wss://myrelay.nostr1.com"], 94 ["relay", "wss://myrelay.nostr1.com"],
95 ], 95 ],
96 "content": "", 96 "content": "",
97 //...other fields 97 // other fields...
98} 98}
99``` 99```
100 100
diff --git a/25.md b/25.md
index f038603..671c55f 100644
--- a/25.md
+++ b/25.md
@@ -57,14 +57,14 @@ Reactions to a website
57 57
58If the target of the reaction is a website, the reaction MUST be a `kind 17` event and MUST include an `r` tag with the website's URL. 58If the target of the reaction is a website, the reaction MUST be a `kind 17` event and MUST include an `r` tag with the website's URL.
59 59
60```json 60```jsonc
61{ 61{
62 "kind": 17, 62 "kind": 17,
63 "content": "⭐", 63 "content": "⭐",
64 "tags": [ 64 "tags": [
65 ["r", "https://example.com/"] 65 ["r", "https://example.com/"]
66 ], 66 ],
67 ...other fields 67 // other fields...
68} 68}
69``` 69```
70 70
@@ -79,14 +79,14 @@ The client may specify a custom emoji ([NIP-30](30.md)) `:shortcode:` in the
79reaction content. The client should refer to the emoji tag and render the 79reaction content. The client should refer to the emoji tag and render the
80content as an emoji if shortcode is specified. 80content as an emoji if shortcode is specified.
81 81
82```json 82```jsonc
83{ 83{
84 "kind": 7, 84 "kind": 7,
85 "content": ":soapbox:", 85 "content": ":soapbox:",
86 "tags": [ 86 "tags": [
87 ["emoji", "soapbox", "https://gleasonator.com/emoji/Gleasonator/soapbox.png"] 87 ["emoji", "soapbox", "https://gleasonator.com/emoji/Gleasonator/soapbox.png"]
88 ], 88 ],
89 ...other fields 89 // other fields...
90} 90}
91``` 91```
92 92
diff --git a/26.md b/26.md
index 86c46e1..445dd54 100644
--- a/26.md
+++ b/26.md
@@ -2,7 +2,7 @@ NIP-26
2======= 2=======
3 3
4Delegated Event Signing 4Delegated Event Signing
5----- 5-----------------------
6 6
7`draft` `optional` 7`draft` `optional`
8 8
diff --git a/28.md b/28.md
index 1632088..73c76b2 100644
--- a/28.md
+++ b/28.md
@@ -25,10 +25,10 @@ Create a public chat channel.
25 25
26In the channel creation `content` field, Client SHOULD include basic channel metadata (`name`, `about`, `picture` and `relays` as specified in kind 41). 26In the channel creation `content` field, Client SHOULD include basic channel metadata (`name`, `about`, `picture` and `relays` as specified in kind 41).
27 27
28```json 28```jsonc
29{ 29{
30 "content": "{\"name\": \"Demo Channel\", \"about\": \"A test channel.\", \"picture\": \"https://placekitten.com/200/200\", \"relays\": [\"wss://nos.lol\", \"wss://nostr.mom\"]}", 30 "content": "{\"name\": \"Demo Channel\", \"about\": \"A test channel.\", \"picture\": \"https://placekitten.com/200/200\", \"relays\": [\"wss://nos.lol\", \"wss://nostr.mom\"]}",
31 ... 31 // other fields...
32} 32}
33``` 33```
34 34
@@ -52,11 +52,11 @@ Clients MAY add additional metadata fields.
52 52
53Clients SHOULD use [NIP-10](10.md) marked "e" tags to recommend a relay. 53Clients SHOULD use [NIP-10](10.md) marked "e" tags to recommend a relay.
54 54
55```json 55```jsonc
56{ 56{
57 "content": "{\"name\": \"Updated Demo Channel\", \"about\": \"Updating a test channel.\", \"picture\": \"https://placekitten.com/201/201\", \"relays\": [\"wss://nos.lol\", \"wss://nostr.mom\"]}", 57 "content": "{\"name\": \"Updated Demo Channel\", \"about\": \"Updating a test channel.\", \"picture\": \"https://placekitten.com/201/201\", \"relays\": [\"wss://nos.lol\", \"wss://nostr.mom\"]}",
58 "tags": [["e", <channel_create_event_id>, <relay-url>]], 58 "tags": [["e", <channel_create_event_id>, <relay-url>]],
59 ... 59 // other fields...
60} 60}
61``` 61```
62 62
@@ -71,26 +71,26 @@ Clients SHOULD append [NIP-10](10.md) "p" tags to replies.
71 71
72Root message: 72Root message:
73 73
74```json 74```jsonc
75{ 75{
76 "content": <string>, 76 "content": <string>,
77 "tags": [["e", <kind_40_event_id>, <relay-url>, "root"]], 77 "tags": [["e", <kind_40_event_id>, <relay-url>, "root"]],
78 ... 78 // other fields...
79} 79}
80``` 80```
81 81
82Reply to another message: 82Reply to another message:
83 83
84```json 84```jsonc
85{ 85{
86 "content": <string>, 86 "content": <string>,
87 "tags": [ 87 "tags": [
88 ["e", <kind_40_event_id>, <relay-url>, "root"], 88 ["e", <kind_40_event_id>, <relay-url>, "root"],
89 ["e", <kind_42_event_id>, <relay-url>, "reply"], 89 ["e", <kind_42_event_id>, <relay-url>, "reply"],
90 ["p", <pubkey>, <relay-url>], 90 ["p", <pubkey>, <relay-url>],
91 ... 91 // rest of tags...
92 ], 92 ],
93 ... 93 // other fields...
94} 94}
95``` 95```
96 96
@@ -107,11 +107,11 @@ Clients MAY hide event 42s for other users other than the user who sent the even
107 107
108(For example, if three users 'hide' an event giving a reason that includes the word 'pornography', a Nostr client that is an iOS app may choose to hide that message for all iOS clients.) 108(For example, if three users 'hide' an event giving a reason that includes the word 'pornography', a Nostr client that is an iOS app may choose to hide that message for all iOS clients.)
109 109
110```json 110```jsonc
111{ 111{
112 "content": "{\"reason\": \"Dick pic\"}", 112 "content": "{\"reason\": \"Dick pic\"}",
113 "tags": [["e", <kind_42_event_id>]], 113 "tags": [["e", <kind_42_event_id>]],
114 ... 114 // other fields...
115} 115}
116``` 116```
117 117
@@ -125,11 +125,11 @@ Clients SHOULD hide event 42s shown to a given user, if there is an event 44 fro
125 125
126Clients MAY hide event 42s for users other than the user who sent the event 44. 126Clients MAY hide event 42s for users other than the user who sent the event 44.
127 127
128```json 128```jsonc
129{ 129{
130 "content": "{\"reason\": \"Posting dick pics\"}", 130 "content": "{\"reason\": \"Posting dick pics\"}",
131 "tags": [["p", <pubkey>]], 131 "tags": [["p", <pubkey>]],
132 ... 132 // other fields...
133} 133}
134``` 134```
135 135
diff --git a/29.md b/29.md
index f867268..6232f8b 100644
--- a/29.md
+++ b/29.md
@@ -42,14 +42,14 @@ Relays should prevent late publication (messages published now with a timestamp
42 42
43This is the basic unit of a "microblog" root text note sent to a group. 43This is the basic unit of a "microblog" root text note sent to a group.
44 44
45```js 45```jsonc
46 "kind": 11, 46 "kind": 11,
47 "content": "hello my friends lovers of pizza", 47 "content": "hello my friends lovers of pizza",
48 "tags": [ 48 "tags": [
49 ["h", "<group-id>"], 49 ["h", "<group-id>"],
50 ["previous", "<event-id-first-chars>", "<event-id-first-chars>", ...] 50 ["previous", "<event-id-first-chars>", "<event-id-first-chars>", /*...*/]
51 ] 51 ]
52 ... 52 // other fields...
53``` 53```
54 54
55- *threaded text reply* (`kind:12`) 55- *threaded text reply* (`kind:12`)
@@ -63,14 +63,14 @@ This is the basic unit of a "microblog" reply note sent to a group. It's the sam
63 63
64This is the basic unit of a _chat message_ sent to a group. 64This is the basic unit of a _chat message_ sent to a group.
65 65
66```js 66```jsonc
67 "kind": 9, 67 "kind": 9,
68 "content": "hello my friends lovers of pizza", 68 "content": "hello my friends lovers of pizza",
69 "tags": [ 69 "tags": [
70 ["h", "<group-id>"], 70 ["h", "<group-id>"],
71 ["previous", "<event-id-first-chars>", "<event-id-first-chars>", ...] 71 ["previous", "<event-id-first-chars>", "<event-id-first-chars>", /*...*/]
72 ] 72 ]
73 ... 73 // other fields...
74``` 74```
75 75
76- *chat message threaded reply* (`kind:10`) 76- *chat message threaded reply* (`kind:10`)
@@ -83,7 +83,7 @@ Similar to `kind:12`, this is the basic unit of a chat message sent to a group.
83 83
84Any user can send one of these events to the relay in order to be automatically or manually added to the group. If the group is `open` the relay will automatically issue a `kind:9000` in response adding this user. Otherwise group admins may choose to query for these requests and act upon them. 84Any user can send one of these events to the relay in order to be automatically or manually added to the group. If the group is `open` the relay will automatically issue a `kind:9000` in response adding this user. Otherwise group admins may choose to query for these requests and act upon them.
85 85
86```js 86```json
87{ 87{
88 "kind": 9021, 88 "kind": 9021,
89 "content": "optional reason", 89 "content": "optional reason",
@@ -97,7 +97,7 @@ Any user can send one of these events to the relay in order to be automatically
97 97
98Any user can send one of these events to the relay in order to be automatically removed from the group. The relay will automatically issue a `kind:9001` in response removing this user. 98Any user can send one of these events to the relay in order to be automatically removed from the group. The relay will automatically issue a `kind:9001` in response removing this user.
99 99
100```js 100```json
101{ 101{
102 "kind": 9022, 102 "kind": 9022,
103 "content": "optional reason", 103 "content": "optional reason",
@@ -111,13 +111,13 @@ Any user can send one of these events to the relay in order to be automatically
111 111
112Clients can send these events to a relay in order to accomplish a moderation action. Relays must check if the pubkey sending the event is capable of performing the given action. The relay may discard the event after taking action or keep it as a moderation log. 112Clients can send these events to a relay in order to accomplish a moderation action. Relays must check if the pubkey sending the event is capable of performing the given action. The relay may discard the event after taking action or keep it as a moderation log.
113 113
114```js 114```json
115{ 115{
116 "kind": 90xx, 116 "kind": 90xx,
117 "content": "optional reason", 117 "content": "optional reason",
118 "tags": [ 118 "tags": [
119 ["h", "<group-id>"], 119 ["h", "<group-id>"],
120 ["previous", ...] 120 ["previous", /*...*/]
121 ] 121 ]
122} 122}
123``` 123```
@@ -142,7 +142,7 @@ This event defines the metadata for the group -- basically how clients should di
142 142
143If the group is forked and hosted in multiple relays, there will be multiple versions of this event in each different relay and so on. 143If the group is forked and hosted in multiple relays, there will be multiple versions of this event in each different relay and so on.
144 144
145```js 145```jsonc
146{ 146{
147 "kind": 39000, 147 "kind": 39000,
148 "content": "", 148 "content": "",
@@ -154,7 +154,7 @@ If the group is forked and hosted in multiple relays, there will be multiple ver
154 ["public"], // or ["private"] 154 ["public"], // or ["private"]
155 ["open"] // or ["closed"] 155 ["open"] // or ["closed"]
156 ] 156 ]
157 ... 157 // other fields...
158} 158}
159``` 159```
160 160
@@ -177,7 +177,7 @@ The list of capabilities, as defined by this NIP, for now, is the following:
177- `edit-group-status` 177- `edit-group-status`
178- `delete-group` 178- `delete-group`
179 179
180```js 180```json
181{ 181{
182 "kind": 39001, 182 "kind": 39001,
183 "content": "list of admins for the pizza lovers group", 183 "content": "list of admins for the pizza lovers group",
@@ -186,7 +186,7 @@ The list of capabilities, as defined by this NIP, for now, is the following:
186 ["p", "<pubkey1-as-hex>", "ceo", "add-user", "edit-metadata", "delete-event", "remove-user"], 186 ["p", "<pubkey1-as-hex>", "ceo", "add-user", "edit-metadata", "delete-event", "remove-user"],
187 ["p", "<pubkey2-as-hex>", "secretary", "add-user", "delete-event"] 187 ["p", "<pubkey2-as-hex>", "secretary", "add-user", "delete-event"]
188 ] 188 ]
189 ... 189 // other fields...
190} 190}
191``` 191```
192 192
diff --git a/30.md b/30.md
index c2f8bb0..54a8b37 100644
--- a/30.md
+++ b/30.md
@@ -54,3 +54,19 @@ In kind 1 events, the `content` should be emojified.
54 "created_at": 1682630000 54 "created_at": 1682630000
55} 55}
56``` 56```
57
58### Kind 7 events
59
60In kind 7 events, the `content` should be emojified.
61
62```json
63{
64 "kind": 7,
65 "content": ":dezh:",
66 "tags": [
67 ["emoji", "dezh", "https://raw.githubusercontent.com/dezh-tech/brand-assets/main/dezh/logo/black-normal.svg"]
68 ],
69 "pubkey": "79c2cae114ea28a981e7559b4fe7854a473521a8d22a66bbab9fa248eb820ff6",
70 "created_at": 1682630000
71}
72```
diff --git a/32.md b/32.md
index 92d18eb..66f0283 100644
--- a/32.md
+++ b/32.md
@@ -2,7 +2,7 @@ NIP-32
2====== 2======
3 3
4Labeling 4Labeling
5--------- 5--------
6 6
7`draft` `optional` 7`draft` `optional`
8 8
@@ -57,7 +57,7 @@ Example events
57 57
58A suggestion that multiple pubkeys be associated with the `permies` topic. 58A suggestion that multiple pubkeys be associated with the `permies` topic.
59 59
60```json 60```jsonc
61{ 61{
62 "kind": 1985, 62 "kind": 1985,
63 "tags": [ 63 "tags": [
@@ -66,13 +66,13 @@ A suggestion that multiple pubkeys be associated with the `permies` topic.
66 ["p", <pubkey1>, <relay_url>], 66 ["p", <pubkey1>, <relay_url>],
67 ["p", <pubkey2>, <relay_url>] 67 ["p", <pubkey2>, <relay_url>]
68 ], 68 ],
69 ... 69 // other fields...
70} 70}
71``` 71```
72 72
73A report flagging violence toward a human being as defined by ontology.example.com. 73A report flagging violence toward a human being as defined by ontology.example.com.
74 74
75```json 75```jsonc
76{ 76{
77 "kind": 1985, 77 "kind": 1985,
78 "tags": [ 78 "tags": [
@@ -81,13 +81,13 @@ A report flagging violence toward a human being as defined by ontology.example.c
81 ["p", <pubkey1>, <relay_url>], 81 ["p", <pubkey1>, <relay_url>],
82 ["p", <pubkey2>, <relay_url>] 82 ["p", <pubkey2>, <relay_url>]
83 ], 83 ],
84 ... 84 // other fields...
85} 85}
86``` 86```
87 87
88A moderation suggestion for a chat event. 88A moderation suggestion for a chat event.
89 89
90```json 90```jsonc
91{ 91{
92 "kind": 1985, 92 "kind": 1985,
93 "tags": [ 93 "tags": [
@@ -95,13 +95,13 @@ A moderation suggestion for a chat event.
95 ["l", "approve", "nip28.moderation"], 95 ["l", "approve", "nip28.moderation"],
96 ["e", <kind40_event_id>, <relay_url>] 96 ["e", <kind40_event_id>, <relay_url>]
97 ], 97 ],
98 ... 98 // other fields...
99} 99}
100``` 100```
101 101
102Assignment of a license to an event. 102Assignment of a license to an event.
103 103
104```json 104```jsonc
105{ 105{
106 "kind": 1985, 106 "kind": 1985,
107 "tags": [ 107 "tags": [
@@ -109,14 +109,14 @@ Assignment of a license to an event.
109 ["l", "MIT", "license"], 109 ["l", "MIT", "license"],
110 ["e", <event_id>, <relay_url>] 110 ["e", <event_id>, <relay_url>]
111 ], 111 ],
112 ... 112 // other fields...
113} 113}
114``` 114```
115 115
116Publishers can self-label by adding `l` tags to their own non-1985 events. In this case, the kind 1 event's author 116Publishers can self-label by adding `l` tags to their own non-1985 events. In this case, the kind 1 event's author
117is labeling their note as being related to Milan, Italy using ISO 3166-2. 117is labeling their note as being related to Milan, Italy using ISO 3166-2.
118 118
119```json 119```jsonc
120{ 120{
121 "kind": 1, 121 "kind": 1,
122 "tags": [ 122 "tags": [
@@ -124,13 +124,13 @@ is labeling their note as being related to Milan, Italy using ISO 3166-2.
124 ["l", "IT-MI", "ISO-3166-2"] 124 ["l", "IT-MI", "ISO-3166-2"]
125 ], 125 ],
126 "content": "It's beautiful here in Milan!", 126 "content": "It's beautiful here in Milan!",
127 ... 127 // other fields...
128} 128}
129``` 129```
130 130
131Author is labeling their note language as English using ISO-639-1. 131Author is labeling their note language as English using ISO-639-1.
132 132
133```json 133```jsonc
134{ 134{
135 "kind": 1, 135 "kind": 1,
136 "tags": [ 136 "tags": [
@@ -138,7 +138,7 @@ Author is labeling their note language as English using ISO-639-1.
138 ["l", "en", "ISO-639-1"] 138 ["l", "en", "ISO-639-1"]
139 ], 139 ],
140 "content": "English text", 140 "content": "English text",
141 ... 141 // other fields...
142} 142}
143``` 143```
144 144
@@ -169,7 +169,7 @@ be handled in some other way.
169 169
170 170
171Appendix: Known Ontologies 171Appendix: Known Ontologies
172------------------------- 172--------------------------
173 173
174Below is a non-exhaustive list of ontologies currently in widespread use. 174Below is a non-exhaustive list of ontologies currently in widespread use.
175 175
diff --git a/34.md b/34.md
index 69f460b..9363aeb 100644
--- a/34.md
+++ b/34.md
@@ -106,7 +106,7 @@ The first patch in a series MAY be a cover letter in the format produced by `git
106 106
107Issues are Markdown text that is just human-readable conversational threads related to the repository: bug reports, feature requests, questions or comments of any kind. Like patches, these SHOULD be sent to the relays specified in that repository's announcement event's `"relays"` tag. 107Issues are Markdown text that is just human-readable conversational threads related to the repository: bug reports, feature requests, questions or comments of any kind. Like patches, these SHOULD be sent to the relays specified in that repository's announcement event's `"relays"` tag.
108 108
109```jsonc 109```json
110{ 110{
111 "kind": 1621, 111 "kind": 1621,
112 "content": "<markdown text>", 112 "content": "<markdown text>",
@@ -132,8 +132,9 @@ Replies are also Markdown text. The difference is that they MUST be issued as re
132 // other "e" and "p" tags should be applied here when necessary, following the threading rules of NIP-10 132 // other "e" and "p" tags should be applied here when necessary, following the threading rules of NIP-10
133 ["p", "<patch-author-pubkey-hex>", "", "mention"], 133 ["p", "<patch-author-pubkey-hex>", "", "mention"],
134 ["e", "<previous-reply-id-hex>", "", "reply"], 134 ["e", "<previous-reply-id-hex>", "", "reply"],
135 // ... 135 // rest of tags...
136 ] 136 ],
137 // other fields...
137} 138}
138``` 139```
139 140
diff --git a/35.md b/35.md
index 04cfb46..3891f6f 100644
--- a/35.md
+++ b/35.md
@@ -2,7 +2,7 @@ NIP-35
2====== 2======
3 3
4Torrents 4Torrents
5----------- 5--------
6 6
7`draft` `optional` 7`draft` `optional`
8 8
@@ -37,7 +37,7 @@ A second level prefix should be included where the database supports multiple me
37 37
38In some cases the url mapping isnt direct, mapping the url in general is out of scope for this NIP, the section above is only a guide so that implementers have enough information to succsesfully map the url if they wish. 38In some cases the url mapping isnt direct, mapping the url in general is out of scope for this NIP, the section above is only a guide so that implementers have enough information to succsesfully map the url if they wish.
39 39
40```jsonc 40```json
41{ 41{
42 "kind": 2003, 42 "kind": 2003,
43 "content": "<long-description-pre-formatted>", 43 "content": "<long-description-pre-formatted>",
diff --git a/38.md b/38.md
index d841d76..8b22b2a 100644
--- a/38.md
+++ b/38.md
@@ -3,7 +3,7 @@ NIP-38
3====== 3======
4 4
5User Statuses 5User Statuses
6-------------- 6-------------
7 7
8`draft` `optional` 8`draft` `optional`
9 9
@@ -17,7 +17,7 @@ A special event with `kind:30315` "User Status" is defined as an *optionally exp
17 17
18For example: 18For example:
19 19
20```js 20```json
21{ 21{
22 "kind": 30315, 22 "kind": 30315,
23 "content": "Sign up for nostrasia!", 23 "content": "Sign up for nostrasia!",
@@ -26,7 +26,9 @@ For example:
26 ["r", "https://nostr.world"] 26 ["r", "https://nostr.world"]
27 ], 27 ],
28} 28}
29```
29 30
31```json
30{ 32{
31 "kind": 30315, 33 "kind": 30315,
32 "content": "Intergalatic - Beastie Boys", 34 "content": "Intergalatic - Beastie Boys",
diff --git a/39.md b/39.md
index b7c3b9c..3777ac5 100644
--- a/39.md
+++ b/39.md
@@ -13,7 +13,8 @@ Nostr protocol users may have other online identities such as usernames, profile
13## `i` tag on a metadata event 13## `i` tag on a metadata event
14 14
15A new optional `i` tag is introduced for `kind 0` metadata event defined in [NIP-01](01.md): 15A new optional `i` tag is introduced for `kind 0` metadata event defined in [NIP-01](01.md):
16```json 16
17```jsonc
17{ 18{
18 "id": <id>, 19 "id": <id>,
19 "pubkey": <pubkey>, 20 "pubkey": <pubkey>,
@@ -23,7 +24,7 @@ A new optional `i` tag is introduced for `kind 0` metadata event defined in [NIP
23 ["i", "mastodon:bitcoinhackers.org/@semisol", "109775066355589974"] 24 ["i", "mastodon:bitcoinhackers.org/@semisol", "109775066355589974"]
24 ["i", "telegram:1087295469", "nostrdirectory/770"] 25 ["i", "telegram:1087295469", "nostrdirectory/770"]
25 ], 26 ],
26 ... 27 // other fields...
27} 28}
28``` 29```
29 30
diff --git a/42.md b/42.md
index 8c70de4..fdc5d10 100644
--- a/42.md
+++ b/42.md
@@ -22,13 +22,13 @@ A relay may want to require clients to authenticate to access restricted resourc
22 22
23This NIP defines a new message, `AUTH`, which relays CAN send when they support authentication and clients can send to relays when they want to authenticate. When sent by relays the message has the following form: 23This NIP defines a new message, `AUTH`, which relays CAN send when they support authentication and clients can send to relays when they want to authenticate. When sent by relays the message has the following form:
24 24
25```json 25```
26["AUTH", <challenge-string>] 26["AUTH", <challenge-string>]
27``` 27```
28 28
29And, when sent by clients, the following form: 29And, when sent by clients, the following form:
30 30
31```json 31```
32["AUTH", <signed-event-json>] 32["AUTH", <signed-event-json>]
33``` 33```
34 34
@@ -38,14 +38,14 @@ And, when sent by clients, the following form:
38 38
39The signed event is an ephemeral event not meant to be published or queried, it must be of `kind: 22242` and it should have at least two tags, one for the relay URL and one for the challenge string as received from the relay. Relays MUST exclude `kind: 22242` events from being broadcasted to any client. `created_at` should be the current time. Example: 39The signed event is an ephemeral event not meant to be published or queried, it must be of `kind: 22242` and it should have at least two tags, one for the relay URL and one for the challenge string as received from the relay. Relays MUST exclude `kind: 22242` events from being broadcasted to any client. `created_at` should be the current time. Example:
40 40
41```json 41```jsonc
42{ 42{
43 "kind": 22242, 43 "kind": 22242,
44 "tags": [ 44 "tags": [
45 ["relay", "wss://relay.example.com/"], 45 ["relay", "wss://relay.example.com/"],
46 ["challenge", "challengestringhere"] 46 ["challenge", "challengestringhere"]
47 ], 47 ],
48 ... 48 // other fields...
49} 49}
50``` 50```
51 51
diff --git a/44.md b/44.md
index f3071ea..8f781b8 100644
--- a/44.md
+++ b/44.md
@@ -1,5 +1,5 @@
1NIP-44 1NIP-44
2===== 2======
3 3
4Encrypted Payloads (Versioned) 4Encrypted Payloads (Versioned)
5------------------------------ 5------------------------------
@@ -142,6 +142,8 @@ validation rules, refer to BIP-340.
142 The operation produces a shared point, and we encode the shared point's 32-byte x coordinate, using method 142 The operation produces a shared point, and we encode the shared point's 32-byte x coordinate, using method
143 `bytes(P)` from BIP340. Private and public keys must be validated as per BIP340: pubkey must be a valid, 143 `bytes(P)` from BIP340. Private and public keys must be validated as per BIP340: pubkey must be a valid,
144 on-curve point, and private key must be a scalar in range `[1, secp256k1_order - 1]`. 144 on-curve point, and private key must be a scalar in range `[1, secp256k1_order - 1]`.
145 NIP44 doesn't do hashing of the output: keep this in mind, because some libraries hash it using sha256.
146 As an example, in libsecp256k1, unhashed version is available in `secp256k1_ec_pubkey_tweak_mul`
145- Operators 147- Operators
146 - `x[i:j]`, where `x` is a byte array and `i, j <= 0` returns a `(j - i)`-byte array with a copy of the 148 - `x[i:j]`, where `x` is a byte array and `i, j <= 0` returns a `(j - i)`-byte array with a copy of the
147 `i`-th byte (inclusive) to the `j`-th byte (exclusive) of `x`. 149 `i`-th byte (inclusive) to the `j`-th byte (exclusive) of `x`.
diff --git a/45.md b/45.md
index 6b25396..219368e 100644
--- a/45.md
+++ b/45.md
@@ -2,7 +2,7 @@ NIP-45
2====== 2======
3 3
4Event Counts 4Event Counts
5-------------- 5------------
6 6
7`draft` `optional` 7`draft` `optional`
8 8
diff --git a/46.md b/46.md
index 57fd2b0..e1675b0 100644
--- a/46.md
+++ b/46.md
@@ -1,4 +1,8 @@
1# NIP-46 - Nostr Remote Signing 1NIP-46
2======
3
4Nostr Remote Signing
5--------------------
2 6
3## Rationale 7## Rationale
4 8
@@ -90,7 +94,7 @@ nostrconnect://<local-keypair-pubkey>?relay=<wss://relay-to-connect-on>&metadata
90 94
91## Request Events `kind: 24133` 95## Request Events `kind: 24133`
92 96
93```json 97```jsonc
94{ 98{
95 "id": <id>, 99 "id": <id>,
96 "kind": 24133, 100 "kind": 24133,
diff --git a/47.md b/47.md
index e4e432c..a19230f 100644
--- a/47.md
+++ b/47.md
@@ -173,7 +173,7 @@ Request:
173 "amount": 123, // invoice amount in msats, required 173 "amount": 123, // invoice amount in msats, required
174 "pubkey": "03...", // payee pubkey, required 174 "pubkey": "03...", // payee pubkey, required
175 "preimage": "0123456789abcdef...", // preimage of the payment, optional 175 "preimage": "0123456789abcdef...", // preimage of the payment, optional
176 "tlv_records: [ // tlv records, optional 176 "tlv_records": [ // tlv records, optional
177 { 177 {
178 "type": 5482373484, // tlv type 178 "type": 5482373484, // tlv type
179 "value": "0123456789abcdef" // hex encoded tlv value 179 "value": "0123456789abcdef" // hex encoded tlv value
@@ -208,7 +208,7 @@ Request:
208 "method": "multi_pay_keysend", 208 "method": "multi_pay_keysend",
209 "params": { 209 "params": {
210 "keysends": [ 210 "keysends": [
211 {"id": "4c5b24a351", pubkey": "03...", "amount": 123}, 211 {"id": "4c5b24a351", "pubkey": "03...", "amount": 123},
212 {"id": "3da52c32a1", "pubkey": "02...", "amount": 567, "preimage": "abc123..", "tlv_records": [{"type": 696969, "value": "77616c5f6872444873305242454d353736"}]}, 212 {"id": "3da52c32a1", "pubkey": "02...", "amount": 567, "preimage": "abc123..", "tlv_records": [{"type": 696969, "value": "77616c5f6872444873305242454d353736"}]},
213 ], 213 ],
214 } 214 }
@@ -358,8 +358,7 @@ Request:
358```jsonc 358```jsonc
359{ 359{
360 "method": "get_balance", 360 "method": "get_balance",
361 "params": { 361 "params": {}
362 }
363} 362}
364``` 363```
365 364
@@ -379,8 +378,7 @@ Request:
379```jsonc 378```jsonc
380{ 379{
381 "method": "get_info", 380 "method": "get_info",
382 "params": { 381 "params": {}
383 }
384} 382}
385``` 383```
386 384
diff --git a/50.md b/50.md
index 2a31cb1..9eea1f8 100644
--- a/50.md
+++ b/50.md
@@ -15,9 +15,9 @@ extensible framework for performing such queries.
15## `search` filter field 15## `search` filter field
16 16
17A new `search` field is introduced for `REQ` messages from clients: 17A new `search` field is introduced for `REQ` messages from clients:
18```json 18```jsonc
19{ 19{
20 ... 20 // other fields on filter object...
21 "search": <string> 21 "search": <string>
22} 22}
23``` 23```
diff --git a/51.md b/51.md
index f7a468e..3792d7f 100644
--- a/51.md
+++ b/51.md
@@ -111,7 +111,7 @@ Some clients have used these lists in the past, but they should work on transiti
111 111
112### A _release artifact set_ of an Example App 112### A _release artifact set_ of an Example App
113 113
114```json 114```jsonc
115{ 115{
116 "id": "567b41fc9060c758c4216fe5f8d3df7c57daad7ae757fa4606f0c39d4dd220ef", 116 "id": "567b41fc9060c758c4216fe5f8d3df7c57daad7ae757fa4606f0c39d4dd220ef",
117 "pubkey": "d6dc95542e18b8b7aec2f14610f55c335abebec76f3db9e58c254661d0593a0c", 117 "pubkey": "d6dc95542e18b8b7aec2f14610f55c335abebec76f3db9e58c254661d0593a0c",
diff --git a/53.md b/53.md
index 15bdbc9..ee12fef 100644
--- a/53.md
+++ b/53.md
@@ -16,7 +16,7 @@ A special event with `kind:30311` "Live Event" is defined as an _addressable eve
16 16
17For example: 17For example:
18 18
19```json 19```jsonc
20{ 20{
21 "kind": 30311, 21 "kind": 30311,
22 "tags": [ 22 "tags": [
@@ -35,10 +35,10 @@ For example:
35 ["p", "91cf9..4e5ca", "wss://provider1.com/", "Host", "<proof>"], 35 ["p", "91cf9..4e5ca", "wss://provider1.com/", "Host", "<proof>"],
36 ["p", "14aeb..8dad4", "wss://provider2.com/nostr", "Speaker"], 36 ["p", "14aeb..8dad4", "wss://provider2.com/nostr", "Speaker"],
37 ["p", "612ae..e610f", "ws://provider3.com/ws", "Participant"], 37 ["p", "612ae..e610f", "ws://provider3.com/ws", "Participant"],
38 ["relays", "wss://one.com", "wss://two.com", ...] 38 ["relays", "wss://one.com", "wss://two.com", /*...*/]
39 ], 39 ],
40 "content": "", 40 "content": "",
41 ... 41 // other fields...
42} 42}
43``` 43```
44 44
@@ -64,14 +64,14 @@ This feature is important to avoid malicious event owners adding large account h
64 64
65Event `kind:1311` is live chat's channel message. Clients MUST include the `a` tag of the activity with a `root` marker. Other Kind-1 tags such as `reply` and `mention` can also be used. 65Event `kind:1311` is live chat's channel message. Clients MUST include the `a` tag of the activity with a `root` marker. Other Kind-1 tags such as `reply` and `mention` can also be used.
66 66
67```json 67```jsonc
68{ 68{
69 "kind": 1311, 69 "kind": 1311,
70 "tags": [ 70 "tags": [
71 ["a", "30311:<Community event author pubkey>:<d-identifier of the community>", "<Optional relay url>", "root"], 71 ["a", "30311:<Community event author pubkey>:<d-identifier of the community>", "<Optional relay url>", "root"],
72 ], 72 ],
73 "content": "Zaps to live streams is beautiful.", 73 "content": "Zaps to live streams is beautiful.",
74 ... 74 // other fields...
75} 75}
76``` 76```
77 77
diff --git a/54.md b/54.md
index cf22544..3a02150 100644
--- a/54.md
+++ b/54.md
@@ -6,12 +6,12 @@ Wiki
6 6
7`draft` `optional` 7`draft` `optional`
8 8
9This NIP defines `kind:30818` (an _addressable event_) for long-form text content similar to [NIP-23](23.md), but with one important difference: articles are meant to be descriptions, or encyclopedia entries, of particular subjects, and it's expected that multiple people will write articles about the exact same subjects, with either small variations or completely independent content. 9This NIP defines `kind:30818` (an _addressable event_) for descriptions (or encyclopedia entries) of particular subjects, and it's expected that multiple people will write articles about the exact same subjects, with either small variations or completely independent content.
10 10
11Articles are identified by lowercase, normalized ascii `d` tags. 11Articles are identified by lowercase, normalized ascii `d` tags.
12 12
13### Articles 13### Articles
14```jsonc 14```json
15{ 15{
16 "content": "A wiki is a hypertext publication collaboratively edited and managed by its own audience.", 16 "content": "A wiki is a hypertext publication collaboratively edited and managed by its own audience.",
17 "tags": [ 17 "tags": [
@@ -26,21 +26,25 @@ Articles are identified by lowercase, normalized ascii `d` tags.
26- Any non-letter character MUST be converted to a `-`. 26- Any non-letter character MUST be converted to a `-`.
27- All letters MUST be converted to lowercase. 27- All letters MUST be converted to lowercase.
28 28
29### Content rules 29### Content
30 30
31The content should be Asciidoc, following the same rules as of [NIP-23](23.md), although it takes some extra (optional) metadata tags: 31The `content` should be Asciidoc with two extra functionalities: **wikilinks** and **nostr:...** links.
32 32
33 - `title`: for when the display title should be different from the `d` tag. 33Unlike normal Asciidoc links `http://example.com[]` that link to external webpages, wikilinks `[[]]` link to other articles in the wiki. In this case, the wiki is the entirety of Nostr. Clicking on a wikilink should cause the client to ask relays for events with `d` tags equal to the target of that wikilink.
34 - `summary`: for display in lists.
35 - `a` and `e`: for referencing the original event a wiki article was forked from.
36
37One extra functionality is added: **wikilinks**. Unlike normal Asciidoc links `[]()` that link to webpages, wikilinks `[[]]` link to other articles in the wiki. In this case, the wiki is the entirety of Nostr. Clicking on a wikilink should cause the client to ask relays for events with `d` tags equal to the target of that wikilink.
38 34
39Wikilinks can take these two forms: 35Wikilinks can take these two forms:
40 36
41 1. `[[Target Page]]` -- in this case it will link to the page `target-page` (according to `d` tag normalization rules above) and be displayed as `Target Page`; 37 1. `[[Target Page]]` -- in this case it will link to the page `target-page` (according to `d` tag normalization rules above) and be displayed as `Target Page`;
42 2. `[[target page|see this]]` -- in this case it will link to the page `target-page`, but will be displayed as `see this`. 38 2. `[[target page|see this]]` -- in this case it will link to the page `target-page`, but will be displayed as `see this`.
43 39
40`nostr:...` links, as per [NIP-21](21.md), should link to profiles or arbitrary Nostr events. Although it is not recommended to link to specific versions of articles -- instead the _wikilink_ syntax should be preferred, since it should be left to the reader and their client to decide what version of any given article they want to read.
41
42### Optional extra tags
43
44 - `title`: for when the display title should be different from the `d` tag.
45 - `summary`: for display in lists.
46 - `a` and `e`: for referencing the original event a wiki article was forked from.
47
44### Merge Requests 48### Merge Requests
45 49
46Event `kind:818` represents a request to merge from a forked article into the source. It is directed to a pubkey and references the original article and the modified event. 50Event `kind:818` represents a request to merge from a forked article into the source. It is directed to a pubkey and references the original article and the modified event.
@@ -96,13 +100,13 @@ Asciidoc has a strict spec, multiple implementations in many languages, and supp
96# Appendix 1: Merge requests 100# Appendix 1: Merge requests
97Users can request other users to get their entries merged into someone else's entry by creating a `kind:818` event. 101Users can request other users to get their entries merged into someone else's entry by creating a `kind:818` event.
98 102
99```jsonc 103```json
100{ 104{
101 "content": "I added information about how to make hot ice-creams", 105 "content": "I added information about how to make hot ice-creams",
102 "kind": 818, 106 "kind": 818,
103 "tags": [ 107 "tags": [
104 [ "a", "30818:<destination-pubkey>:hot-ice-creams", "<relay-url>" ], 108 [ "a", "30818:<destination-pubkey>:hot-ice-creams", "<relay-url>" ],
105 [ "e", "<version-against-which-the-modification-was-made>", "<relay-url>' ], 109 [ "e", "<version-against-which-the-modification-was-made>", "<relay-url>" ],
106 [ "p", "<destination-pubkey>" ], 110 [ "p", "<destination-pubkey>" ],
107 [ "e", "<version-to-be-merged>", "<relay-url>", "source" ] 111 [ "e", "<version-to-be-merged>", "<relay-url>", "source" ]
108 ] 112 ]
@@ -114,4 +118,4 @@ Users can request other users to get their entries merged into someone else's en
114`e` tag: optional version of the article in which this modifications is based 118`e` tag: optional version of the article in which this modifications is based
115`e` tag with `source` marker: the ID of the event that should be merged. This event id MUST be of a `kind:30818` as defined in this NIP. 119`e` tag with `source` marker: the ID of the event that should be merged. This event id MUST be of a `kind:30818` as defined in this NIP.
116 120
117The destination-pubkey (the pubkey being requested to merge something into their article can create [[NIP-25]] reactions that tag the `kind:818` event with `+` or `-` 121The destination-pubkey is the pubkey being requested to merge something into their article can create [[NIP-25]] reactions that tag the `kind:818` event with `+` or `-`
diff --git a/55.md b/55.md
index 4565e8c..c0ee957 100644
--- a/55.md
+++ b/55.md
@@ -1,6 +1,8 @@
1# NIP-55 1NIP-55
2======
2 3
3## Android Signer Application 4Android Signer Application
5--------------------------
4 6
5`draft` `optional` 7`draft` `optional`
6 8
diff --git a/56.md b/56.md
index fc8d898..f7b1b1a 100644
--- a/56.md
+++ b/56.md
@@ -41,7 +41,7 @@ further qualification and querying.
41Example events 41Example events
42-------------- 42--------------
43 43
44```json 44```jsonc
45{ 45{
46 "kind": 1984, 46 "kind": 1984,
47 "tags": [ 47 "tags": [
@@ -50,9 +50,11 @@ Example events
50 ["l", "NS-nud", "social.nos.ontology"] 50 ["l", "NS-nud", "social.nos.ontology"]
51 ], 51 ],
52 "content": "", 52 "content": "",
53 ... 53 // other fields...
54} 54}
55```
55 56
57```jsonc
56{ 58{
57 "kind": 1984, 59 "kind": 1984,
58 "tags": [ 60 "tags": [
@@ -60,16 +62,18 @@ Example events
60 ["p", <pubkey>] 62 ["p", <pubkey>]
61 ], 63 ],
62 "content": "He's insulting the king!", 64 "content": "He's insulting the king!",
63 ... 65 // other fields...
64} 66}
67```
65 68
69```jsonc
66{ 70{
67 "kind": 1984, 71 "kind": 1984,
68 "tags": [ 72 "tags": [
69 ["p", <impersonator pubkey>, "impersonation"] 73 ["p", <impersonator pubkey>, "impersonation"]
70 ], 74 ],
71 "content": "Profile is impersonating nostr:<victim bech32 pubkey>", 75 "content": "Profile is impersonating nostr:<victim bech32 pubkey>",
72 ... 76 // other fields...
73} 77}
74``` 78```
75 79
diff --git a/57.md b/57.md
index 1c0b314..b533811 100644
--- a/57.md
+++ b/57.md
@@ -171,7 +171,7 @@ A client can retrieve `zap receipt`s on events and pubkeys using a NIP-01 filter
171 171
172When an event includes one or more `zap` tags, clients wishing to zap it SHOULD calculate the lnurl pay request based on the tags value instead of the event author's profile field. The tag's second argument is the `hex` string of the receiver's pub key and the third argument is the relay to download the receiver's metadata (Kind-0). An optional fourth parameter specifies the weight (a generalization of a percentage) assigned to the respective receiver. Clients should parse all weights, calculate a sum, and then a percentage to each receiver. If weights are not present, CLIENTS should equally divide the zap amount to all receivers. If weights are only partially present, receivers without a weight should not be zapped (`weight = 0`). 172When an event includes one or more `zap` tags, clients wishing to zap it SHOULD calculate the lnurl pay request based on the tags value instead of the event author's profile field. The tag's second argument is the `hex` string of the receiver's pub key and the third argument is the relay to download the receiver's metadata (Kind-0). An optional fourth parameter specifies the weight (a generalization of a percentage) assigned to the respective receiver. Clients should parse all weights, calculate a sum, and then a percentage to each receiver. If weights are not present, CLIENTS should equally divide the zap amount to all receivers. If weights are only partially present, receivers without a weight should not be zapped (`weight = 0`).
173 173
174```js 174```jsonc
175{ 175{
176 "tags": [ 176 "tags": [
177 [ "zap", "82341f882b6eabcd2ba7f1ef90aad961cf074af15b9ef44a09f9d2a8fbfbe6a2", "wss://nostr.oxtr.dev", "1" ], // 25% 177 [ "zap", "82341f882b6eabcd2ba7f1ef90aad961cf074af15b9ef44a09f9d2a8fbfbe6a2", "wss://nostr.oxtr.dev", "1" ], // 25%
diff --git a/58.md b/58.md
index 438574b..b6324f4 100644
--- a/58.md
+++ b/58.md
@@ -74,7 +74,7 @@ Clients SHOULD attempt to render the most appropriate badge thumbnail according
74 74
75### Example of a Badge Definition event 75### Example of a Badge Definition event
76 76
77```json 77```jsonc
78{ 78{
79 "pubkey": "alice", 79 "pubkey": "alice",
80 "kind": 30009, 80 "kind": 30009,
@@ -85,13 +85,13 @@ Clients SHOULD attempt to render the most appropriate badge thumbnail according
85 ["image", "https://nostr.academy/awards/bravery.png", "1024x1024"], 85 ["image", "https://nostr.academy/awards/bravery.png", "1024x1024"],
86 ["thumb", "https://nostr.academy/awards/bravery_256x256.png", "256x256"] 86 ["thumb", "https://nostr.academy/awards/bravery_256x256.png", "256x256"]
87 ], 87 ],
88 ... 88 // other fields...
89} 89}
90``` 90```
91 91
92### Example of Badge Award event 92### Example of Badge Award event
93 93
94```json 94```jsonc
95{ 95{
96 "id": "<badge award event id>", 96 "id": "<badge award event id>",
97 "kind": 8, 97 "kind": 8,
@@ -101,14 +101,14 @@ Clients SHOULD attempt to render the most appropriate badge thumbnail according
101 ["p", "bob", "wss://relay"], 101 ["p", "bob", "wss://relay"],
102 ["p", "charlie", "wss://relay"] 102 ["p", "charlie", "wss://relay"]
103 ], 103 ],
104 ... 104 // other fields...
105} 105}
106``` 106```
107 107
108### Example of a Profile Badges event 108### Example of a Profile Badges event
109 109
110Honorable Bob The Brave: 110Honorable Bob The Brave:
111```json 111```jsonc
112{ 112{
113 "kind": 30008, 113 "kind": 30008,
114 "pubkey": "bob", 114 "pubkey": "bob",
@@ -119,6 +119,6 @@ Honorable Bob The Brave:
119 ["a", "30009:alice:honor"], 119 ["a", "30009:alice:honor"],
120 ["e", "<honor badge award event id>", "wss://nostr.academy"] 120 ["e", "<honor badge award event id>", "wss://nostr.academy"]
121 ], 121 ],
122 ... 122 // other fields...
123} 123}
124``` 124```
diff --git a/59.md b/59.md
index 4dc857f..a4fc99d 100644
--- a/59.md
+++ b/59.md
@@ -41,7 +41,7 @@ A `seal` is a `kind:13` event that wraps a `rumor` with the sender's regular key
41to a receiver's pubkey but there is no `p` tag pointing to the receiver. There is no way to know who the rumor is for 41to a receiver's pubkey but there is no `p` tag pointing to the receiver. There is no way to know who the rumor is for
42without the receiver's or the sender's private key. The only public information in this event is who is signing it. 42without the receiver's or the sender's private key. The only public information in this event is who is signing it.
43 43
44```js 44```json
45{ 45{
46 "id": "<id>", 46 "id": "<id>",
47 "pubkey": "<real author's pubkey>", 47 "pubkey": "<real author's pubkey>",
@@ -60,7 +60,7 @@ Tags MUST must always be empty in a `kind:13`. The inner event MUST always be un
60A `gift wrap` event is a `kind:1059` event that wraps any other event. `tags` SHOULD include any information 60A `gift wrap` event is a `kind:1059` event that wraps any other event. `tags` SHOULD include any information
61needed to route the event to its intended recipient, including the recipient's `p` tag or [NIP-13](13.md) proof of work. 61needed to route the event to its intended recipient, including the recipient's `p` tag or [NIP-13](13.md) proof of work.
62 62
63```js 63```json
64{ 64{
65 "id": "<id>", 65 "id": "<id>",
66 "pubkey": "<random, one-time-use pubkey>", 66 "pubkey": "<random, one-time-use pubkey>",
diff --git a/64.md b/64.md
index 6d8d373..616c5d6 100644
--- a/64.md
+++ b/64.md
@@ -2,7 +2,7 @@ NIP-64
2====== 2======
3 3
4Chess (Portable Game Notation) 4Chess (Portable Game Notation)
5----- 5------------------------------
6 6
7`draft` `optional` 7`draft` `optional`
8 8
@@ -16,23 +16,23 @@ The `.content` of these notes is a string representing a [PGN-database][pgn_form
16 16
17### Notes 17### Notes
18 18
19```json 19```jsonc
20{ 20{
21 "kind": 64, 21 "kind": 64,
22 "content": "1. e4 *", 22 "content": "1. e4 *",
23 ... 23 // other fields...
24} 24}
25``` 25```
26 26
27```json 27```jsonc
28{ 28{
29 "kind": 64, 29 "kind": 64,
30 "tags": [ 30 "tags": [
31 ["alt", "Fischer vs. Spassky in Belgrade on 1992-11-04 (F/S Return Match, Round 29)"], 31 ["alt", "Fischer vs. Spassky in Belgrade on 1992-11-04 (F/S Return Match, Round 29)"],
32 ... 32 // rest of tags...
33 ], 33 ],
34 "content": "[Event \"F/S Return Match\"]\n[Site \"Belgrade, Serbia JUG\"]\n[Date \"1992.11.04\"]\n[Round \"29\"]\n[White \"Fischer, Robert J.\"]\n[Black \"Spassky, Boris V.\"]\n[Result \"1/2-1/2\"]\n\n1. e4 e5 2. Nf3 Nc6 3. Bb5 {This opening is called the Ruy Lopez.} 3... a6\n4. Ba4 Nf6 5. O-O Be7 6. Re1 b5 7. Bb3 d6 8. c3 O-O 9. h3 Nb8 10. d4 Nbd7\n11. c4 c6 12. cxb5 axb5 13. Nc3 Bb7 14. Bg5 b4 15. Nb1 h6 16. Bh4 c5 17. dxe5\nNxe4 18. Bxe7 Qxe7 19. exd6 Qf6 20. Nbd2 Nxd6 21. Nc4 Nxc4 22. Bxc4 Nb6\n23. Ne5 Rae8 24. Bxf7+ Rxf7 25. Nxf7 Rxe1+ 26. Qxe1 Kxf7 27. Qe3 Qg5 28. Qxg5\nhxg5 29. b3 Ke6 30. a3 Kd6 31. axb4 cxb4 32. Ra5 Nd5 33. f3 Bc8 34. Kf2 Bf5\n35. Ra7 g6 36. Ra6+ Kc5 37. Ke1 Nf4 38. g3 Nxh3 39. Kd2 Kb5 40. Rd6 Kc5 41. Ra6\nNf2 42. g4 Bd3 43. Re6 1/2-1/2" 34 "content": "[Event \"F/S Return Match\"]\n[Site \"Belgrade, Serbia JUG\"]\n[Date \"1992.11.04\"]\n[Round \"29\"]\n[White \"Fischer, Robert J.\"]\n[Black \"Spassky, Boris V.\"]\n[Result \"1/2-1/2\"]\n\n1. e4 e5 2. Nf3 Nc6 3. Bb5 {This opening is called the Ruy Lopez.} 3... a6\n4. Ba4 Nf6 5. O-O Be7 6. Re1 b5 7. Bb3 d6 8. c3 O-O 9. h3 Nb8 10. d4 Nbd7\n11. c4 c6 12. cxb5 axb5 13. Nc3 Bb7 14. Bg5 b4 15. Nb1 h6 16. Bh4 c5 17. dxe5\nNxe4 18. Bxe7 Qxe7 19. exd6 Qf6 20. Nbd2 Nxd6 21. Nc4 Nxc4 22. Bxc4 Nb6\n23. Ne5 Rae8 24. Bxf7+ Rxf7 25. Nxf7 Rxe1+ 26. Qxe1 Kxf7 27. Qe3 Qg5 28. Qxg5\nhxg5 29. b3 Ke6 30. a3 Kd6 31. axb4 cxb4 32. Ra5 Nd5 33. f3 Bc8 34. Kf2 Bf5\n35. Ra7 g6 36. Ra6+ Kc5 37. Ke1 Nf4 38. g3 Nxh3 39. Kd2 Kb5 40. Rd6 Kc5 41. Ra6\nNf2 42. g4 Bd3 43. Re6 1/2-1/2",
35 ... 35 // other fields...
36} 36}
37``` 37```
38 38
diff --git a/65.md b/65.md
index c3efa1d..df06de0 100644
--- a/65.md
+++ b/65.md
@@ -12,7 +12,7 @@ The event MUST include a list of `r` tags with relay URIs and a `read` or `write
12 12
13The `.content` is not used. 13The `.content` is not used.
14 14
15```json 15```jsonc
16{ 16{
17 "kind": 10002, 17 "kind": 10002,
18 "tags": [ 18 "tags": [
@@ -22,7 +22,7 @@ The `.content` is not used.
22 ["r", "wss://nostr-relay.example.com", "read"] 22 ["r", "wss://nostr-relay.example.com", "read"]
23 ], 23 ],
24 "content": "", 24 "content": "",
25 ...other fields 25 // other fields...
26} 26}
27``` 27```
28 28
diff --git a/71.md b/71.md
index be1587c..5cf3b36 100644
--- a/71.md
+++ b/71.md
@@ -2,7 +2,7 @@ NIP-71
2====== 2======
3 3
4Video Events 4Video Events
5--------------- 5------------
6 6
7`draft` `optional` 7`draft` `optional`
8 8
@@ -42,7 +42,7 @@ The list of tags are as follows:
42* `p` (optional, repeated) 32-bytes hex pubkey of a participant in the video, optional recommended relay URL 42* `p` (optional, repeated) 32-bytes hex pubkey of a participant in the video, optional recommended relay URL
43* `r` (optional, repeated) references / links to web pages 43* `r` (optional, repeated) references / links to web pages
44 44
45```json 45```jsonc
46{ 46{
47 "id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>, 47 "id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>,
48 "pubkey": <32-bytes lowercase hex-encoded public key of the event creator>, 48 "pubkey": <32-bytes lowercase hex-encoded public key of the event creator>,
diff --git a/72.md b/72.md
index b2f523b..582410a 100644
--- a/72.md
+++ b/72.md
@@ -35,7 +35,7 @@ The goal of this NIP is to enable public communities. It defines the replaceable
35 ["relay", "<relay where to send and receive approvals>", "approvals"], 35 ["relay", "<relay where to send and receive approvals>", "approvals"],
36 ["relay", "<relay where to post requests to and fetch approvals from>"] 36 ["relay", "<relay where to post requests to and fetch approvals from>"]
37 ], 37 ],
38 ... 38 // other fields...
39} 39}
40``` 40```
41 41
@@ -50,7 +50,7 @@ Any Nostr event can be posted to a community. Clients MUST add one or more commu
50 ["a", "34550:<community event author pubkey>:<community-d-identifier>", "<optional-relay-url>"], 50 ["a", "34550:<community event author pubkey>:<community-d-identifier>", "<optional-relay-url>"],
51 ], 51 ],
52 "content": "hello world", 52 "content": "hello world",
53 // ... 53 // other fields...
54} 54}
55``` 55```
56 56
@@ -75,7 +75,7 @@ Moderators MAY request deletion of their approval of a post at any time using [N
75 ["k", "<post-request-kind>"] 75 ["k", "<post-request-kind>"]
76 ], 76 ],
77 "content": "<the full approved event, JSON-encoded>", 77 "content": "<the full approved event, JSON-encoded>",
78 // ... 78 // other fields...
79} 79}
80``` 80```
81 81
diff --git a/73.md b/73.md
index 12228d3..d50ab22 100644
--- a/73.md
+++ b/73.md
@@ -2,7 +2,7 @@ NIP-73
2====== 2======
3 3
4External Content IDs 4External Content IDs
5------------------------- 5--------------------
6 6
7`draft` `optional` 7`draft` `optional`
8 8
diff --git a/75.md b/75.md
index a6f2bff..885c391 100644
--- a/75.md
+++ b/75.md
@@ -21,15 +21,16 @@ The following tags are defined as REQUIRED.
21 21
22Example event: 22Example event:
23 23
24```json 24```jsonc
25{ 25{
26 "kind": 9041, 26 "kind": 9041,
27 "tags": [ 27 "tags": [
28 ["relays", "wss://alicerelay.example.com", "wss://bobrelay.example.com", ...], 28 ["relays", "wss://alicerelay.example.com", "wss://bobrelay.example.com", /*...*/],
29 ["amount", "210000"], 29 ["amount", "210000"],
30 ], 30 ],
31 "content": "Nostrasia travel expenses", 31 "content": "Nostrasia travel expenses",
32 ... 32 // other fields...
33}
33``` 34```
34 35
35The following tags are OPTIONAL. 36The following tags are OPTIONAL.
@@ -38,18 +39,18 @@ The following tags are OPTIONAL.
38- `image` - an image for the goal 39- `image` - an image for the goal
39- `summary` - a brief description 40- `summary` - a brief description
40 41
41```json 42```jsonc
42{ 43{
43 "kind": 9041, 44 "kind": 9041,
44 "tags": [ 45 "tags": [
45 ["relays", "wss://alicerelay.example.com", "wss://bobrelay.example.com", ...], 46 ["relays", "wss://alicerelay.example.com", "wss://bobrelay.example.com", /*...*/],
46 ["amount", "210000"], 47 ["amount", "210000"],
47 ["closed_at", "<unix timestamp in seconds>"], 48 ["closed_at", "<unix timestamp in seconds>"],
48 ["image", "<image URL>"], 49 ["image", "<image URL>"],
49 ["summary", "<description of the goal>"], 50 ["summary", "<description of the goal>"],
50 ], 51 ],
51 "content": "Nostrasia travel expenses", 52 "content": "Nostrasia travel expenses",
52 ... 53 // other fields...
53} 54}
54``` 55```
55 56
@@ -59,15 +60,14 @@ The goal MAY include multiple beneficiary pubkeys by specifying [`zap` tags](57.
59 60
60Addressable events can link to a goal by using a `goal` tag specifying the event id and an optional relay hint. 61Addressable events can link to a goal by using a `goal` tag specifying the event id and an optional relay hint.
61 62
62```json 63```jsonc
63{ 64{
64 ...
65 "kind": 3xxxx, 65 "kind": 3xxxx,
66 "tags": [ 66 "tags": [
67 ...
68 ["goal", "<event id>", "<Relay URL (optional)>"], 67 ["goal", "<event id>", "<Relay URL (optional)>"],
68 // rest of tags...
69 ], 69 ],
70 ... 70 // other fields...
71} 71}
72``` 72```
73 73
diff --git a/84.md b/84.md
index d5f54d4..e3063c2 100644
--- a/84.md
+++ b/84.md
@@ -26,14 +26,14 @@ useful when highlighting non-nostr content for which the client might be able to
26(e.g. prompting the user or reading a `<meta name="nostr:nprofile1..." />` tag on the document). A role MAY be included as the 26(e.g. prompting the user or reading a `<meta name="nostr:nprofile1..." />` tag on the document). A role MAY be included as the
27last value of the tag. 27last value of the tag.
28 28
29```json 29```jsonc
30{ 30{
31 "tags": [ 31 "tags": [
32 ["p", "<pubkey-hex>", "<relay-url>", "author"], 32 ["p", "<pubkey-hex>", "<relay-url>", "author"],
33 ["p", "<pubkey-hex>", "<relay-url>", "author"], 33 ["p", "<pubkey-hex>", "<relay-url>", "author"],
34 ["p", "<pubkey-hex>", "<relay-url>", "editor"] 34 ["p", "<pubkey-hex>", "<relay-url>", "editor"]
35 ], 35 ],
36 ... 36 // other fields...
37} 37}
38``` 38```
39 39
diff --git a/89.md b/89.md
index 54aa30b..24aa3c5 100644
--- a/89.md
+++ b/89.md
@@ -27,7 +27,7 @@ There are three actors to this workflow:
27## Events 27## Events
28 28
29### Recommendation event 29### Recommendation event
30```json 30```jsonc
31{ 31{
32 "kind": 31989, 32 "kind": 31989,
33 "pubkey": <recommender-user-pubkey>, 33 "pubkey": <recommender-user-pubkey>,
@@ -35,7 +35,8 @@ There are three actors to this workflow:
35 ["d", <supported-event-kind>], 35 ["d", <supported-event-kind>],
36 ["a", "31990:app1-pubkey:<d-identifier>", "wss://relay1", "ios"], 36 ["a", "31990:app1-pubkey:<d-identifier>", "wss://relay1", "ios"],
37 ["a", "31990:app2-pubkey:<d-identifier>", "wss://relay2", "web"] 37 ["a", "31990:app2-pubkey:<d-identifier>", "wss://relay2", "web"]
38 ] 38 ],
39 // other fields...
39} 40}
40``` 41```
41 42
@@ -47,7 +48,7 @@ The second value of the tag SHOULD be a relay hint.
47The third value of the tag SHOULD be the platform where this recommendation might apply. 48The third value of the tag SHOULD be the platform where this recommendation might apply.
48 49
49## Handler information 50## Handler information
50```json 51```jsonc
51{ 52{
52 "kind": 31990, 53 "kind": 31990,
53 "pubkey": "<application-pubkey>", 54 "pubkey": "<application-pubkey>",
@@ -59,7 +60,8 @@ The third value of the tag SHOULD be the platform where this recommendation migh
59 ["web", "https://..../p/<bech32>", "nprofile"], 60 ["web", "https://..../p/<bech32>", "nprofile"],
60 ["web", "https://..../e/<bech32>"], 61 ["web", "https://..../e/<bech32>"],
61 ["ios", ".../<bech32>"] 62 ["ios", ".../<bech32>"]
62 ] 63 ],
64 // other fields...
63} 65}
64``` 66```
65 67
@@ -77,13 +79,13 @@ A tag without a second value in the array SHOULD be considered a generic handler
77# Client tag 79# Client tag
78When publishing events, clients MAY include a `client` tag. Identifying the client that published the note. This tag is a tuple of `name`, `address` identifying a handler event and, a relay `hint` for finding the handler event. This has privacy implications for users, so clients SHOULD allow users to opt-out of using this tag. 80When publishing events, clients MAY include a `client` tag. Identifying the client that published the note. This tag is a tuple of `name`, `address` identifying a handler event and, a relay `hint` for finding the handler event. This has privacy implications for users, so clients SHOULD allow users to opt-out of using this tag.
79 81
80```json 82```jsonc
81{ 83{
82 "kind": 1, 84 "kind": 1,
83 "tags": [ 85 "tags": [
84 ["client", "My Client", "31990:app1-pubkey:<d-identifier>", "wss://relay1"] 86 ["client", "My Client", "31990:app1-pubkey:<d-identifier>", "wss://relay1"]
85 ] 87 ]
86 ... 88 // other fields...
87} 89}
88``` 90```
89 91
@@ -99,14 +101,14 @@ The client MIGHT query for the user's and the user's follows handler.
99### User A recommends a `kind:31337`-handler 101### User A recommends a `kind:31337`-handler
100User A might be a user of Zapstr, a `kind:31337`-centric client (tracks). Using Zapstr, user A publishes an event recommending Zapstr as a `kind:31337`-handler. 102User A might be a user of Zapstr, a `kind:31337`-centric client (tracks). Using Zapstr, user A publishes an event recommending Zapstr as a `kind:31337`-handler.
101 103
102```json 104```jsonc
103{ 105{
104 "kind": 31989, 106 "kind": 31989,
105 "tags": [ 107 "tags": [
106 ["d", "31337"], 108 ["d", "31337"],
107 ["a", "31990:1743058db7078661b94aaf4286429d97ee5257d14a86d6bfa54cb0482b876fb0:abcd", <relay-url>, "web"] 109 ["a", "31990:1743058db7078661b94aaf4286429d97ee5257d14a86d6bfa54cb0482b876fb0:abcd", <relay-url>, "web"]
108 ], 110 ],
109 ... 111 // other fields...
110} 112}
111``` 113```
112 114
@@ -115,7 +117,7 @@ User B might see in their timeline an event referring to a `kind:31337` event (e
115 117
116User B's client, not knowing how to handle a `kind:31337` might display the event using its `alt` tag (as described in NIP-31). When the user clicks on the event, the application queries for a handler for this `kind`: 118User B's client, not knowing how to handle a `kind:31337` might display the event using its `alt` tag (as described in NIP-31). When the user clicks on the event, the application queries for a handler for this `kind`:
117 119
118```json 120```
119["REQ", <id>, { "kinds": [31989], "#d": ["31337"], "authors": [<user>, <users-contact-list>] }] 121["REQ", <id>, { "kinds": [31989], "#d": ["31337"], "authors": [<user>, <users-contact-list>] }]
120``` 122```
121 123
@@ -126,6 +128,6 @@ User B's client sees the application's `kind:31990` which includes the informati
126### Alternative query bypassing `kind:31989` 128### Alternative query bypassing `kind:31989`
127Alternatively, users might choose to query directly for `kind:31990` for an event kind. Clients SHOULD be careful doing this and use spam-prevention mechanisms or querying high-quality restricted relays to avoid directing users to malicious handlers. 129Alternatively, users might choose to query directly for `kind:31990` for an event kind. Clients SHOULD be careful doing this and use spam-prevention mechanisms or querying high-quality restricted relays to avoid directing users to malicious handlers.
128 130
129```json 131```
130["REQ", <id>, { "kinds": [31990], "#k": [<desired-event-kind>], "authors": [...] }] 132["REQ", <id>, { "kinds": [31990], "#k": [<desired-event-kind>], "authors": [...] }]
131``` 133```
diff --git a/90.md b/90.md
index 5a15ebb..696ebd5 100644
--- a/90.md
+++ b/90.md
@@ -36,7 +36,7 @@ There are two actors in the workflow described in this NIP:
36## Job request (`kind:5000-5999`) 36## Job request (`kind:5000-5999`)
37A request to process data, published by a customer. This event signals that a customer is interested in receiving the result of some kind of compute. 37A request to process data, published by a customer. This event signals that a customer is interested in receiving the result of some kind of compute.
38 38
39```json 39```jsonc
40{ 40{
41 "kind": 5xxx, // kind in 5000-5999 range 41 "kind": 5xxx, // kind in 5000-5999 range
42 "content": "", 42 "content": "",
@@ -46,7 +46,8 @@ A request to process data, published by a customer. This event signals that a cu
46 [ "relays", "wss://..." ], 46 [ "relays", "wss://..." ],
47 [ "bid", "<msat-amount>" ], 47 [ "bid", "<msat-amount>" ],
48 [ "t", "bitcoin" ] 48 [ "t", "bitcoin" ]
49 ] 49 ],
50 // other fields...
50} 51}
51``` 52```
52 53
@@ -81,19 +82,18 @@ If the user wants to keep the input parameters a secret, they can encrypt the `i
81 ["param", "top-p", "0.7"], 82 ["param", "top-p", "0.7"],
82 ["param", "frequency_penalty", "1"] 83 ["param", "frequency_penalty", "1"]
83] 84]
84
85``` 85```
86 86
87This param data will be encrypted and added to the `content` field and `p` tag should be present 87This param data will be encrypted and added to the `content` field and `p` tag should be present
88 88
89```json 89```jsonc
90{ 90{
91 "content": "BE2Y4xvS6HIY7TozIgbEl3sAHkdZoXyLRRkZv4fLPh3R7LtviLKAJM5qpkC7D6VtMbgIt4iNcMpLtpo...", 91 "content": "BE2Y4xvS6HIY7TozIgbEl3sAHkdZoXyLRRkZv4fLPh3R7LtviLKAJM5qpkC7D6VtMbgIt4iNcMpLtpo...",
92 "tags": [ 92 "tags": [
93 ["p", "04f74530a6ede6b24731b976b8e78fb449ea61f40ff10e3d869a3030c4edc91f"], 93 ["p", "04f74530a6ede6b24731b976b8e78fb449ea61f40ff10e3d869a3030c4edc91f"],
94 ["encrypted"] 94 ["encrypted"]
95 ], 95 ],
96 ... 96 // other fields...
97} 97}
98``` 98```
99 99
@@ -102,7 +102,7 @@ This param data will be encrypted and added to the `content` field and `p` tag s
102 102
103Service providers publish job results, providing the output of the job result. They should tag the original job request event id as well as the customer's pubkey. 103Service providers publish job results, providing the output of the job result. They should tag the original job request event id as well as the customer's pubkey.
104 104
105```json 105```jsonc
106{ 106{
107 "pubkey": "<service-provider pubkey>", 107 "pubkey": "<service-provider pubkey>",
108 "content": "<payload>", 108 "content": "<payload>",
@@ -114,7 +114,7 @@ Service providers publish job results, providing the output of the job result. T
114 ["p", "<customer's-pubkey>"], 114 ["p", "<customer's-pubkey>"],
115 ["amount", "requested-payment-amount", "<optional-bolt11>"] 115 ["amount", "requested-payment-amount", "<optional-bolt11>"]
116 ], 116 ],
117 ... 117 // other fields...
118} 118}
119``` 119```
120 120
@@ -127,7 +127,7 @@ Service providers publish job results, providing the output of the job result. T
127If the request has encrypted params, then output should be encrypted and placed in `content` field. If the output is encrypted, then avoid including `i` tag with input-data as clear text. 127If the request has encrypted params, then output should be encrypted and placed in `content` field. If the output is encrypted, then avoid including `i` tag with input-data as clear text.
128Add a tag encrypted to mark the output content as `encrypted` 128Add a tag encrypted to mark the output content as `encrypted`
129 129
130```json 130```jsonc
131{ 131{
132 "pubkey": "<service-provider pubkey>", 132 "pubkey": "<service-provider pubkey>",
133 "content": "<encrypted payload>", 133 "content": "<encrypted payload>",
@@ -139,7 +139,7 @@ Add a tag encrypted to mark the output content as `encrypted`
139 ["amount", "requested-payment-amount", "<optional-bolt11>"], 139 ["amount", "requested-payment-amount", "<optional-bolt11>"],
140 ["encrypted"] 140 ["encrypted"]
141 ], 141 ],
142 ... 142 // other fields...
143} 143}
144``` 144```
145 145
@@ -147,7 +147,7 @@ Add a tag encrypted to mark the output content as `encrypted`
147 147
148Service providers can give feedback about a job back to the customer. 148Service providers can give feedback about a job back to the customer.
149 149
150```json 150```jsonc
151{ 151{
152 "kind": 7000, 152 "kind": 7000,
153 "content": "<empty-or-payload>", 153 "content": "<empty-or-payload>",
@@ -157,7 +157,7 @@ Service providers can give feedback about a job back to the customer.
157 ["e", "<job-request-id>", "<relay-hint>"], 157 ["e", "<job-request-id>", "<relay-hint>"],
158 ["p", "<customer's-pubkey>"], 158 ["p", "<customer's-pubkey>"],
159 ], 159 ],
160 ... 160 // other fields...
161} 161}
162``` 162```
163 163
@@ -211,7 +211,7 @@ This gives a higher level of flexibility to service providers (which sophisticat
211# Appendix 2: Service provider discoverability 211# Appendix 2: Service provider discoverability
212Service Providers MAY use NIP-89 announcements to advertise their support for job kinds: 212Service Providers MAY use NIP-89 announcements to advertise their support for job kinds:
213 213
214```js 214```jsonc
215{ 215{
216 "kind": 31990, 216 "kind": 31990,
217 "pubkey": "<pubkey>", 217 "pubkey": "<pubkey>",
@@ -223,7 +223,7 @@ Service Providers MAY use NIP-89 announcements to advertise their support for jo
223 ["k", "5005"], // e.g. translation 223 ["k", "5005"], // e.g. translation
224 ["t", "bitcoin"] // e.g. optionally advertises it specializes in bitcoin audio transcription that won't confuse "Drivechains" with "Ridechains" 224 ["t", "bitcoin"] // e.g. optionally advertises it specializes in bitcoin audio transcription that won't confuse "Drivechains" with "Ridechains"
225 ], 225 ],
226 ... 226 // other fields...
227} 227}
228``` 228```
229 229
diff --git a/94.md b/94.md
index e35dfa1..a057cb2 100644
--- a/94.md
+++ b/94.md
@@ -27,7 +27,7 @@ This NIP specifies the use of the `1063` event type, having in `content` a descr
27* `alt` (optional) description for accessibility 27* `alt` (optional) description for accessibility
28* `fallback` (optional) zero or more fallback file sources in case `url` fails 28* `fallback` (optional) zero or more fallback file sources in case `url` fails
29 29
30```json 30```jsonc
31{ 31{
32 "kind": 1063, 32 "kind": 1063,
33 "tags": [ 33 "tags": [
@@ -46,7 +46,7 @@ This NIP specifies the use of the `1063` event type, having in `content` a descr
46 ["alt", <description>] 46 ["alt", <description>]
47 ], 47 ],
48 "content": "<caption>", 48 "content": "<caption>",
49 ... 49 // other fields...
50} 50}
51``` 51```
52 52
diff --git a/96.md b/96.md
index be70999..4e9ce16 100644
--- a/96.md
+++ b/96.md
@@ -1,6 +1,8 @@
1# NIP-96 1NIP-96
2======
2 3
3## HTTP File Storage Integration 4HTTP File Storage Integration
5-----------------------------
4 6
5`draft` `optional` 7`draft` `optional`
6 8
@@ -17,7 +19,7 @@ will not have to learn anything about nostr relays.
17 19
18File storage servers wishing to be accessible by nostr users should opt-in by making available an https route at `/.well-known/nostr/nip96.json` with `api_url`: 20File storage servers wishing to be accessible by nostr users should opt-in by making available an https route at `/.well-known/nostr/nip96.json` with `api_url`:
19 21
20```js 22```jsonc
21{ 23{
22 // Required 24 // Required
23 // File upload and deletion are served from this url 25 // File upload and deletion are served from this url
@@ -57,7 +59,7 @@ File storage servers wishing to be accessible by nostr users should opt-in by ma
57 "file_expiration": [14, 90], 59 "file_expiration": [14, 90],
58 "media_transformations": { 60 "media_transformations": {
59 "image": [ 61 "image": [
60 'resizing' 62 "resizing"
61 ] 63 ]
62 } 64 }
63 } 65 }
@@ -125,14 +127,14 @@ The `server` MUST link the user's `pubkey` string as the owner of the file so to
125 127
126The upload response is a json object as follows: 128The upload response is a json object as follows:
127 129
128```js 130```jsonc
129{ 131{
130 // "success" if successful or "error" if not 132 // "success" if successful or "error" if not
131 status: "success", 133 "status": "success",
132 // Free text success, failure or info message 134 // Free text success, failure or info message
133 message: "Upload successful.", 135 "message": "Upload successful.",
134 // Optional. See "Delayed Processing" section 136 // Optional. See "Delayed Processing" section
135 processing_url: "...", 137 "processing_url": "...",
136 // This uses the NIP-94 event format but DO NOT need 138 // This uses the NIP-94 event format but DO NOT need
137 // to fill some fields like "id", "pubkey", "created_at" and "sig" 139 // to fill some fields like "id", "pubkey", "created_at" and "sig"
138 // 140 //
@@ -141,9 +143,9 @@ The upload response is a json object as follows:
141 // and, optionally, all file metadata the server wants to make available 143 // and, optionally, all file metadata the server wants to make available
142 // 144 //
143 // nip94_event field is absent if unsuccessful upload 145 // nip94_event field is absent if unsuccessful upload
144 nip94_event: { 146 "nip94_event2": {
145 // Required tags: "url" and "ox" 147 // Required tags: "url" and "ox"
146 tags: [ 148 "tags": [
147 // Can be same from /.well-known/nostr/nip96.json's "download_url" field 149 // Can be same from /.well-known/nostr/nip96.json's "download_url" field
148 // (or "api_url" field if "download_url" is absent or empty) with appended 150 // (or "api_url" field if "download_url" is absent or empty) with appended
149 // original file hash. 151 // original file hash.
@@ -164,12 +166,12 @@ The upload response is a json object as follows:
164 // The server can but does not need to store this value. 166 // The server can but does not need to store this value.
165 ["x", "543244319525d9d08dd69cb716a18158a249b7b3b3ec4bbde5435543acb34443"], 167 ["x", "543244319525d9d08dd69cb716a18158a249b7b3b3ec4bbde5435543acb34443"],
166 // Optional. Recommended for helping clients to easily know file type before downloading it. 168 // Optional. Recommended for helping clients to easily know file type before downloading it.
167 ["m", "image/png"] 169 ["m", "image/png"],
168 // Optional. Recommended for helping clients to reserve an adequate UI space to show the file before downloading it. 170 // Optional. Recommended for helping clients to reserve an adequate UI space to show the file before downloading it.
169 ["dim", "800x600"] 171 ["dim", "800x600"]
170 // ... other optional NIP-94 tags 172 // ... other optional NIP-94 tags
171 ], 173 ],
172 content: "" 174 "content": ""
173 }, 175 },
174 // ... other custom fields (please consider adding them to this NIP or to NIP-94 tags) 176 // ... other custom fields (please consider adding them to this NIP or to NIP-94 tags)
175} 177}
@@ -200,12 +202,12 @@ the file processing is done.
200 202
201If the processing isn't done, the server should reply at the `processing_url` url with **200 OK** and the following JSON: 203If the processing isn't done, the server should reply at the `processing_url` url with **200 OK** and the following JSON:
202 204
203``` 205```jsonc
204{ 206{
205 // It should be "processing". If "error" it would mean the processing failed. 207 // It should be "processing". If "error" it would mean the processing failed.
206 status: "processing", 208 "status": "processing",
207 message: "Processing. Please check again later for updated status.", 209 "message": "Processing. Please check again later for updated status.",
208 percentage: 15 // Processing percentage. An integer between 0 and 100. 210 "percentage": 15 // Processing percentage. An integer between 0 and 100.
209} 211}
210``` 212```
211 213
@@ -268,10 +270,10 @@ in the same file hash).
268 270
269The successful response is a 200 OK one with just basic JSON fields: 271The successful response is a 200 OK one with just basic JSON fields:
270 272
271``` 273```json
272{ 274{
273 status: "success", 275 "status": "success",
274 message: "File deleted." 276 "message": "File deleted."
275} 277}
276``` 278```
277 279
@@ -285,7 +287,7 @@ Returns a list of files linked to the authenticated users pubkey.
285 287
286Example Response: 288Example Response:
287 289
288```js 290```jsonc
289{ 291{
290 "count": 1, // server page size, eg. max(1, min(server_max_page_size, arg_count)) 292 "count": 1, // server page size, eg. max(1, min(server_max_page_size, arg_count))
291 "total": 1, // total number of files 293 "total": 1, // total number of files
@@ -293,17 +295,16 @@ Example Response:
293 "files": [ 295 "files": [
294 { 296 {
295 "tags": [ 297 "tags": [
296 ["ox": "719171db19525d9d08dd69cb716a18158a249b7b3b3ec4bbdec5698dca104b7b"], 298 ["ox", "719171db19525d9d08dd69cb716a18158a249b7b3b3ec4bbdec5698dca104b7b"],
297 ["x": "5d2899290e0e69bcd809949ee516a4a1597205390878f780c098707a7f18e3df"], 299 ["x", "5d2899290e0e69bcd809949ee516a4a1597205390878f780c098707a7f18e3df"],
298 ["size", "123456"], 300 ["size", "123456"],
299 ["alt", "a meme that makes you laugh"], 301 ["alt", "a meme that makes you laugh"],
300 ["expiration", "1715691139"], 302 ["expiration", "1715691139"],
301 // ...other metadata 303 // ...other metadata
302 ] 304 ],
303 "content": "haha funny meme", // caption 305 "content": "haha funny meme", // caption
304 "created_at": 1715691130 // upload timestamp 306 "created_at": 1715691130 // upload timestamp
305 }, 307 }
306 ...
307 ] 308 ]
308} 309}
309``` 310```
@@ -322,14 +323,14 @@ Note: HTTP File Storage Server developers may skip this section. This is meant f
322A File Server Preference event is a kind 10096 replaceable event meant to select one or more servers the user wants 323A File Server Preference event is a kind 10096 replaceable event meant to select one or more servers the user wants
323to upload files to. Servers are listed as `server` tags: 324to upload files to. Servers are listed as `server` tags:
324 325
325```js 326```json
326{ 327{.
327 // ...
328 "kind": 10096, 328 "kind": 10096,
329 "content": "", 329 "content": "",
330 "tags": [ 330 "tags": [
331 ["server", "https://file.server.one"], 331 ["server", "https://file.server.one"],
332 ["server", "https://file.server.two"] 332 ["server", "https://file.server.two"]
333 ] 333 ],
334 // other fields...
334} 335}
335``` 336```
diff --git a/99.md b/99.md
index b1b7ce9..e2ffc3b 100644
--- a/99.md
+++ b/99.md
@@ -54,7 +54,7 @@ Other standard tags that might be useful.
54 54
55## Example Event 55## Example Event
56 56
57```json 57```jsonc
58{ 58{
59 "kind": 30402, 59 "kind": 30402,
60 "created_at": 1675642635, 60 "created_at": 1675642635,
diff --git a/README.md b/README.md
index 80b8dcf..b22f1a3 100644
--- a/README.md
+++ b/README.md
@@ -131,6 +131,8 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
131| `1971` | Problem Tracker | [nostrocket][nostrocket] | 131| `1971` | Problem Tracker | [nostrocket][nostrocket] |
132| `1984` | Reporting | [56](56.md) | 132| `1984` | Reporting | [56](56.md) |
133| `1985` | Label | [32](32.md) | 133| `1985` | Label | [32](32.md) |
134| `1986` | Relay reviews | |
135| `1987` | AI Embeddings / Vector lists | [NKBIP-02] |
134| `2003` | Torrent | [35](35.md) | 136| `2003` | Torrent | [35](35.md) |
135| `2004` | Torrent Comment | [35](35.md) | 137| `2004` | Torrent Comment | [35](35.md) |
136| `2022` | Coinjoin Pool | [joinstr][joinstr] | 138| `2022` | Coinjoin Pool | [joinstr][joinstr] |
@@ -140,6 +142,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
140| `7000` | Job Feedback | [90](90.md) | 142| `7000` | Job Feedback | [90](90.md) |
141| `9000`-`9030` | Group Control Events | [29](29.md) | 143| `9000`-`9030` | Group Control Events | [29](29.md) |
142| `9041` | Zap Goal | [75](75.md) | 144| `9041` | Zap Goal | [75](75.md) |
145| `9467` | Tidal login | [Tidal-nostr] |
143| `9734` | Zap Request | [57](57.md) | 146| `9734` | Zap Request | [57](57.md) |
144| `9735` | Zap | [57](57.md) | 147| `9735` | Zap | [57](57.md) |
145| `9802` | Highlights | [84](84.md) | 148| `9802` | Highlights | [84](84.md) |
@@ -155,6 +158,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
155| `10015` | Interests list | [51](51.md) | 158| `10015` | Interests list | [51](51.md) |
156| `10030` | User emoji list | [51](51.md) | 159| `10030` | User emoji list | [51](51.md) |
157| `10050` | Relay list to receive DMs | [51](51.md), [17](17.md) | 160| `10050` | Relay list to receive DMs | [51](51.md), [17](17.md) |
161| `10063` | User server list | [blossom] |
158| `10096` | File storage server list | [96](96.md) | 162| `10096` | File storage server list | [96](96.md) |
159| `13194` | Wallet Info | [47](47.md) | 163| `13194` | Wallet Info | [47](47.md) |
160| `21000` | Lightning Pub RPC | [Lightning.Pub][lnpub] | 164| `21000` | Lightning Pub RPC | [Lightning.Pub][lnpub] |
@@ -162,6 +166,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
162| `23194` | Wallet Request | [47](47.md) | 166| `23194` | Wallet Request | [47](47.md) |
163| `23195` | Wallet Response | [47](47.md) | 167| `23195` | Wallet Response | [47](47.md) |
164| `24133` | Nostr Connect | [46](46.md) | 168| `24133` | Nostr Connect | [46](46.md) |
169| `24242` | Blobs stored on mediaservers | [blossom] |
165| `27235` | HTTP Auth | [98](98.md) | 170| `27235` | HTTP Auth | [98](98.md) |
166| `30000` | Follow sets | [51](51.md) | 171| `30000` | Follow sets | [51](51.md) |
167| `30001` | Generic lists | [51](51.md) | 172| `30001` | Generic lists | [51](51.md) |
@@ -169,6 +174,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
169| `30003` | Bookmark sets | [51](51.md) | 174| `30003` | Bookmark sets | [51](51.md) |
170| `30004` | Curation sets | [51](51.md) | 175| `30004` | Curation sets | [51](51.md) |
171| `30005` | Video sets | [51](51.md) | 176| `30005` | Video sets | [51](51.md) |
177| `30007` | Kind mute sets | [51](51.md) |
172| `30008` | Profile Badges | [58](58.md) | 178| `30008` | Profile Badges | [58](58.md) |
173| `30009` | Badge Definition | [58](58.md) | 179| `30009` | Badge Definition | [58](58.md) |
174| `30015` | Interest sets | [51](51.md) | 180| `30015` | Interest sets | [51](51.md) |
@@ -179,6 +185,8 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
179| `30023` | Long-form Content | [23](23.md) | 185| `30023` | Long-form Content | [23](23.md) |
180| `30024` | Draft Long-form Content | [23](23.md) | 186| `30024` | Draft Long-form Content | [23](23.md) |
181| `30030` | Emoji sets | [51](51.md) | 187| `30030` | Emoji sets | [51](51.md) |
188| `30040` | Modular Article Header | [NKBIP-01] |
189| `30041` | Modular Article Content | [NKBIP-01] |
182| `30063` | Release artifact sets | [51](51.md) | 190| `30063` | Release artifact sets | [51](51.md) |
183| `30078` | Application-specific Data | [78](78.md) | 191| `30078` | Application-specific Data | [78](78.md) |
184| `30311` | Live Event | [53](53.md) | 192| `30311` | Live Event | [53](53.md) |
@@ -202,10 +210,14 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
202| `34550` | Community Definition | [72](72.md) | 210| `34550` | Community Definition | [72](72.md) |
203| `39000-9` | Group metadata events | [29](29.md) | 211| `39000-9` | Group metadata events | [29](29.md) |
204 212
205[NUD: Custom Feeds]: https://wikifreedia.xyz/cip-01/97c70a44366a6535c1 213[NUD: Custom Feeds]: https://wikifreedia.xyz/cip-01/
206[nostrocket]: https://github.com/nostrocket/NIPS/blob/main/Problems.md 214[nostrocket]: https://github.com/nostrocket/NIPS/blob/main/Problems.md
207[lnpub]: https://github.com/shocknet/Lightning.Pub/blob/master/proto/autogenerated/client.md 215[lnpub]: https://github.com/shocknet/Lightning.Pub/blob/master/proto/autogenerated/client.md
208[joinstr]: https://gitlab.com/1440000bytes/joinstr/-/blob/main/NIP.md 216[joinstr]: https://gitlab.com/1440000bytes/joinstr/-/blob/main/NIP.md
217[NKBIP-01]: https://wikistr.com/nkbip-01
218[NKBIP-02]: https://wikistr.com/nkbip-02
219[Blossom]: https://wikistr.com/blossom
220[Tidal-nostr]: https://wikistr.com/tidal-nostr
209 221
210## Message types 222## Message types
211 223