upleb.uk

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

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Fernandez <p@f7z.io>2023-11-23 17:52:48 +0200
committerGitHub <noreply@github.com>2023-11-23 17:52:48 +0200
commit60256a62675a165c4d4fd9811a19a9cbf6a9e7fd (patch)
tree5c450154d373caafc37f324dd01e20338308c9d6
parent43d50ee42409252a1313928cd437d55fd7bf7bf4 (diff)
parent7822a8b12670312aff104ddc03066425882f739d (diff)
Merge branch 'master' into nip88
-rw-r--r--01.md4
-rw-r--r--02.md2
-rw-r--r--03.md4
-rw-r--r--04.md2
-rw-r--r--05.md2
-rw-r--r--06.md2
-rw-r--r--07.md2
-rw-r--r--08.md2
-rw-r--r--09.md2
-rw-r--r--10.md2
-rw-r--r--11.md167
-rw-r--r--12.md2
-rw-r--r--13.md8
-rw-r--r--14.md10
-rw-r--r--15.md205
-rw-r--r--16.md2
-rw-r--r--18.md2
-rw-r--r--19.md2
-rw-r--r--20.md2
-rw-r--r--21.md2
-rw-r--r--22.md2
-rw-r--r--23.md2
-rw-r--r--24.md4
-rw-r--r--25.md2
-rw-r--r--26.md2
-rw-r--r--27.md2
-rw-r--r--28.md48
-rw-r--r--30.md2
-rw-r--r--31.md2
-rw-r--r--32.md113
-rw-r--r--33.md2
-rw-r--r--36.md28
-rw-r--r--38.md2
-rw-r--r--39.md30
-rw-r--r--40.md26
-rw-r--r--42.md16
-rw-r--r--45.md23
-rw-r--r--46.md2
-rw-r--r--47.md2
-rw-r--r--48.md2
-rw-r--r--50.md2
-rw-r--r--51.md186
-rw-r--r--52.md2
-rw-r--r--53.md32
-rw-r--r--56.md3
-rw-r--r--57.md2
-rw-r--r--58.md2
-rw-r--r--65.md17
-rw-r--r--72.md50
-rw-r--r--75.md19
-rw-r--r--78.md2
-rw-r--r--84.md42
-rw-r--r--89.md97
-rw-r--r--90.md141
-rw-r--r--94.md9
-rw-r--r--98.md30
-rw-r--r--99.md8
-rw-r--r--README.md167
58 files changed, 851 insertions, 698 deletions
diff --git a/01.md b/01.md
index 183e0ba..dafea1d 100644
--- a/01.md
+++ b/01.md
@@ -4,7 +4,7 @@ NIP-01
4Basic protocol flow description 4Basic protocol flow description
5------------------------------- 5-------------------------------
6 6
7`draft` `mandatory` `author:fiatjaf` `author:distbit` `author:scsibug` `author:kukks` `author:jb55` `author:semisol` `author:cameri` `author:Giszmo` 7`draft` `mandatory`
8 8
9This NIP defines the basic protocol that should be implemented by everybody. New NIPs may add new optional (or mandatory) fields and messages and features to the structures and flows described here. 9This NIP defines the basic protocol that should be implemented by everybody. New NIPs may add new optional (or mandatory) fields and messages and features to the structures and flows described here.
10 10
@@ -150,7 +150,7 @@ Relays can send 4 types of messages, which must also be JSON arrays, according t
150This NIP defines no rules for how `NOTICE` messages should be sent or treated. 150This NIP defines no rules for how `NOTICE` messages should be sent or treated.
151 151
152- `EVENT` messages MUST be sent only with a subscription ID related to a subscription previously initiated by the client (using the `REQ` message above). 152- `EVENT` messages MUST be sent only with a subscription ID related to a subscription previously initiated by the client (using the `REQ` message above).
153- `OK` messages MUST be sent in response to `EVENT` messages received from clients, they must have the 3rd parameter set to `true` when an event has been accepted by the relay, `false` otherwise. The 4th parameter MAY be empty when the 3rd is `true`, otherwise it MUST be a string containing a machine-readable single-word prefix followed by a `:` and then a human-readable message. The standardized machine-readable prefixes are: `duplicate`, `pow`, `blocked`, `rate-limited`, `invalid`, and `error` for when none of that fits. Some examples: 153- `OK` messages MUST be sent in response to `EVENT` messages received from clients, they must have the 3rd parameter set to `true` when an event has been accepted by the relay, `false` otherwise. The 4th parameter MUST always be present, but MAY be an empty string when the 3rd is `true`, otherwise it MUST be a string formed by a machine-readable single-word prefix followed by a `:` and then a human-readable message. The standardized machine-readable prefixes are: `duplicate`, `pow`, `blocked`, `rate-limited`, `invalid`, and `error` for when none of that fits. Some examples:
154 154
155 * `["OK", "b1a649ebe8...", true, ""]` 155 * `["OK", "b1a649ebe8...", true, ""]`
156 * `["OK", "b1a649ebe8...", true, "pow: difficulty 25>=24"]` 156 * `["OK", "b1a649ebe8...", true, "pow: difficulty 25>=24"]`
diff --git a/02.md b/02.md
index 2f19908..0653d06 100644
--- a/02.md
+++ b/02.md
@@ -4,7 +4,7 @@ NIP-02
4Contact List and Petnames 4Contact List and Petnames
5------------------------- 5-------------------------
6 6
7`final` `optional` `author:fiatjaf` `author:arcbtc` 7`final` `optional`
8 8
9A special event with kind `3`, meaning "contact list" is defined as having a list of `p` tags, one for each of the followed/known profiles one is following. 9A special event with kind `3`, meaning "contact list" is defined as having a list of `p` tags, one for each of the followed/known profiles one is following.
10 10
diff --git a/03.md b/03.md
index 680cc8b..74e010c 100644
--- a/03.md
+++ b/03.md
@@ -4,7 +4,7 @@ NIP-03
4OpenTimestamps Attestations for Events 4OpenTimestamps Attestations for Events
5-------------------------------------- 5--------------------------------------
6 6
7`draft` `optional` `author:fiatjaf` `author:constant` 7`draft` `optional`
8 8
9This NIP defines an event with `kind:1040` that can contain an [OpenTimestamps](https://opentimestamps.org/) proof for any other event: 9This NIP defines an event with `kind:1040` that can contain an [OpenTimestamps](https://opentimestamps.org/) proof for any other event:
10 10
@@ -20,7 +20,7 @@ This NIP defines an event with `kind:1040` that can contain an [OpenTimestamps](
20``` 20```
21 21
22- The OpenTimestamps proof MUST prove the referenced `e` event id as its digest. 22- The OpenTimestamps proof MUST prove the referenced `e` event id as its digest.
23- The `content` MUST be the full content of an `.ots` file containing at least one Bitcoin attestation. This file SHOULD contain a **single** Bitcoin attestation and no reference to "pending" attestations since they are useless in this context. 23- The `content` MUST be the full content of an `.ots` file containing at least one Bitcoin attestation. This file SHOULD contain a **single** Bitcoin attestation (as not more than one valid attestation is necessary and less bytes is better than more) and no reference to "pending" attestations since they are useless in this context.
24 24
25### Example OpenTimestamps proof verification flow 25### Example OpenTimestamps proof verification flow
26 26
diff --git a/04.md b/04.md
index 6e45b74..bf6767b 100644
--- a/04.md
+++ b/04.md
@@ -4,7 +4,7 @@ NIP-04
4Encrypted Direct Message 4Encrypted Direct Message
5------------------------ 5------------------------
6 6
7`final` `optional` `author:arcbtc` 7`final` `optional`
8 8
9A special event with kind `4`, meaning "encrypted direct message". It is supposed to have the following attributes: 9A special event with kind `4`, meaning "encrypted direct message". It is supposed to have the following attributes:
10 10
diff --git a/05.md b/05.md
index 00d69af..6437550 100644
--- a/05.md
+++ b/05.md
@@ -4,7 +4,7 @@ NIP-05
4Mapping Nostr keys to DNS-based internet identifiers 4Mapping Nostr keys to DNS-based internet identifiers
5---------------------------------------------------- 5----------------------------------------------------
6 6
7`final` `optional` `author:fiatjaf` `author:mikedilger` 7`final` `optional`
8 8
9On events of kind `0` (`metadata`) one can specify the key `"nip05"` with an [internet identifier](https://datatracker.ietf.org/doc/html/rfc5322#section-3.4.1) (an email-like address) as the value. Although there is a link to a very liberal "internet identifier" specification above, NIP-05 assumes the `<local-part>` part will be restricted to the characters `a-z0-9-_.`, case-insensitive. 9On events of kind `0` (`metadata`) one can specify the key `"nip05"` with an [internet identifier](https://datatracker.ietf.org/doc/html/rfc5322#section-3.4.1) (an email-like address) as the value. Although there is a link to a very liberal "internet identifier" specification above, NIP-05 assumes the `<local-part>` part will be restricted to the characters `a-z0-9-_.`, case-insensitive.
10 10
diff --git a/06.md b/06.md
index a0b4a01..0e50254 100644
--- a/06.md
+++ b/06.md
@@ -4,7 +4,7 @@ NIP-06
4Basic key derivation from mnemonic seed phrase 4Basic key derivation from mnemonic seed phrase
5---------------------------------------------- 5----------------------------------------------
6 6
7`draft` `optional` `author:fiatjaf` 7`draft` `optional`
8 8
9[BIP39](https://bips.xyz/39) is used to generate mnemonic seed words and derive a binary seed from them. 9[BIP39](https://bips.xyz/39) is used to generate mnemonic seed words and derive a binary seed from them.
10 10
diff --git a/07.md b/07.md
index 51ddc16..01af6f4 100644
--- a/07.md
+++ b/07.md
@@ -4,7 +4,7 @@ NIP-07
4`window.nostr` capability for web browsers 4`window.nostr` capability for web browsers
5------------------------------------------ 5------------------------------------------
6 6
7`draft` `optional` `author:fiatjaf` 7`draft` `optional`
8 8
9The `window.nostr` object may be made available by web browsers or extensions and websites or web-apps may make use of it after checking its availability. 9The `window.nostr` object may be made available by web browsers or extensions and websites or web-apps may make use of it after checking its availability.
10 10
diff --git a/08.md b/08.md
index 6793e0b..f4f4341 100644
--- a/08.md
+++ b/08.md
@@ -6,7 +6,7 @@ NIP-08
6Handling Mentions 6Handling Mentions
7----------------- 7-----------------
8 8
9`final` `unrecommended` `optional` `author:fiatjaf` `author:scsibug` 9`final` `unrecommended` `optional`
10 10
11This document standardizes the treatment given by clients of inline mentions of other events and pubkeys inside the content of `text_note`s. 11This document standardizes the treatment given by clients of inline mentions of other events and pubkeys inside the content of `text_note`s.
12 12
diff --git a/09.md b/09.md
index 9dab90f..f92410f 100644
--- a/09.md
+++ b/09.md
@@ -4,7 +4,7 @@ NIP-09
4Event Deletion 4Event Deletion
5-------------- 5--------------
6 6
7`draft` `optional` `author:scsibug` 7`draft` `optional`
8 8
9A special event with kind `5`, meaning "deletion" is defined as having a list of one or more `e` tags, each referencing an event the author is requesting to be deleted. 9A special event with kind `5`, meaning "deletion" is defined as having a list of one or more `e` tags, each referencing an event the author is requesting to be deleted.
10 10
diff --git a/10.md b/10.md
index 9c79b4a..5b19fbd 100644
--- a/10.md
+++ b/10.md
@@ -5,7 +5,7 @@ NIP-10
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` `author:unclebobmartin` 8`draft` `optional`
9 9
10## Abstract 10## Abstract
11This NIP describes how to use "e" and "p" tags in text events, especially those that are replies to other text events. It helps clients thread the replies into a tree rooted at the original event. 11This NIP describes how to use "e" and "p" tags in text events, especially those that are replies to other text events. It helps clients thread the replies into a tree rooted at the original event.
diff --git a/11.md b/11.md
index deb6f19..615e796 100644
--- a/11.md
+++ b/11.md
@@ -4,7 +4,7 @@ NIP-11
4Relay Information Document 4Relay Information Document
5--------------------------- 5---------------------------
6 6
7`draft` `optional` `author:scsibug` `author:doc-hex` `author:cameri` 7`draft` `optional`
8 8
9Relays may provide server metadata to clients to inform them of capabilities, administrative contacts, and various server attributes. This is made available as a JSON document over HTTP, on the same URI as the relay's websocket. 9Relays may provide server metadata to clients to inform them of capabilities, administrative contacts, and various server attributes. This is made available as a JSON document over HTTP, on the same URI as the relay's websocket.
10 10
@@ -25,42 +25,42 @@ When a relay receives an HTTP(s) request with an `Accept` header of `application
25Any field may be omitted, and clients MUST ignore any additional fields they do not understand. Relays MUST accept CORS requests by sending `Access-Control-Allow-Origin`, `Access-Control-Allow-Headers`, and `Access-Control-Allow-Methods` headers. 25Any field may be omitted, and clients MUST ignore any additional fields they do not understand. Relays MUST accept CORS requests by sending `Access-Control-Allow-Origin`, `Access-Control-Allow-Headers`, and `Access-Control-Allow-Methods` headers.
26 26
27Field Descriptions 27Field Descriptions
28----------------- 28------------------
29 29
30### Name ### 30### Name
31 31
32A relay may select a `name` for use in client software. This is a string, and SHOULD be less than 30 characters to avoid client truncation. 32A relay may select a `name` for use in client software. This is a string, and SHOULD be less than 30 characters to avoid client truncation.
33 33
34### Description ### 34### Description
35 35
36Detailed plain-text information about the relay may be contained in the `description` string. It is recommended that this contain no markup, formatting or line breaks for word wrapping, and simply use double newline characters to separate paragraphs. There are no limitations on length. 36Detailed plain-text information about the relay may be contained in the `description` string. It is recommended that this contain no markup, formatting or line breaks for word wrapping, and simply use double newline characters to separate paragraphs. There are no limitations on length.
37 37
38### Pubkey ### 38### Pubkey
39 39
40An administrative contact may be listed with a `pubkey`, in the same format as Nostr events (32-byte hex for a `secp256k1` public key). If a contact is listed, this provides clients with a recommended address to send encrypted direct messages (See `NIP-04`) to a system administrator. Expected uses of this address are to report abuse or illegal content, file bug reports, or request other technical assistance. 40An administrative contact may be listed with a `pubkey`, in the same format as Nostr events (32-byte hex for a `secp256k1` public key). If a contact is listed, this provides clients with a recommended address to send encrypted direct messages (See `NIP-04`) to a system administrator. Expected uses of this address are to report abuse or illegal content, file bug reports, or request other technical assistance.
41 41
42Relay operators have no obligation to respond to direct messages. 42Relay operators have no obligation to respond to direct messages.
43 43
44### Contact ### 44### Contact
45 45
46An alternative contact may be listed under the `contact` field as well, with the same purpose as `pubkey`. Use of a Nostr public key and direct message SHOULD be preferred over this. Contents of this field SHOULD be a URI, using schemes such as `mailto` or `https` to provide users with a means of contact. 46An alternative contact may be listed under the `contact` field as well, with the same purpose as `pubkey`. Use of a Nostr public key and direct message SHOULD be preferred over this. Contents of this field SHOULD be a URI, using schemes such as `mailto` or `https` to provide users with a means of contact.
47 47
48### Supported NIPs ### 48### Supported NIPs
49 49
50As the Nostr protocol evolves, some functionality may only be available by relays that implement a specific `NIP`. This field is an array of the integer identifiers of `NIP`s that are implemented in the relay. Examples would include `1`, for `"NIP-01"` and `9`, for `"NIP-09"`. Client-side `NIPs` SHOULD NOT be advertised, and can be ignored by clients. 50As the Nostr protocol evolves, some functionality may only be available by relays that implement a specific `NIP`. This field is an array of the integer identifiers of `NIP`s that are implemented in the relay. Examples would include `1`, for `"NIP-01"` and `9`, for `"NIP-09"`. Client-side `NIPs` SHOULD NOT be advertised, and can be ignored by clients.
51 51
52### Software ### 52### Software
53 53
54The relay server implementation MAY be provided in the `software` attribute. If present, this MUST be a URL to the project's homepage. 54The relay server implementation MAY be provided in the `software` attribute. If present, this MUST be a URL to the project's homepage.
55 55
56### Version ### 56### Version
57 57
58The relay MAY choose to publish its software version as a string attribute. The string format is defined by the relay implementation. It is recommended this be a version number or commit identifier. 58The relay MAY choose to publish its software version as a string attribute. The string format is defined by the relay implementation. It is recommended this be a version number or commit identifier.
59 59
60Extra Fields 60Extra Fields
61----------------- 61------------
62 62
63### Server Limitations ### 63### Server Limitations
64 64
65These are limitations imposed by the relay on clients. Your client 65These 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
@@ -68,22 +68,22 @@ are rejected or fail immediately.
68 68
69```json 69```json
70{ 70{
71...
72 "limitation": { 71 "limitation": {
73 "max_message_length": 16384, 72 "max_message_length": 16384,
74 "max_subscriptions": 20, 73 "max_subscriptions": 20,
75 "max_filters": 100, 74 "max_filters": 100,
76 "max_limit": 5000, 75 "max_limit": 5000,
77 "max_subid_length": 100, 76 "max_subid_length": 100,
78 "max_event_tags": 100, 77 "max_event_tags": 100,
79 "max_content_length": 8196, 78 "max_content_length": 8196,
80 "min_pow_difficulty": 30, 79 "min_pow_difficulty": 30,
81 "auth_required": true, 80 "auth_required": true,
82 "payment_required": true, 81 "payment_required": true,
83 "created_at_lower_limit":31536000, 82 "restricted_writes": true,
84 "created_at_upper_limit":3, 83 "created_at_lower_limit": 31536000,
85 } 84 "created_at_upper_limit": 3
86... 85 },
86 ...
87} 87}
88``` 88```
89 89
@@ -125,11 +125,17 @@ Even if set to False, authentication may be required for specific actions.
125 125
126- `payment_required`: this relay requires payment before a new connection may perform any action. 126- `payment_required`: this relay requires payment before a new connection may perform any action.
127 127
128- `restricted_writes`: this relay requires some kind of condition to be fulfilled in order to
129accept events (not necessarily, but including `payment_required` and `min_pow_difficulty`).
130This should only be set to `true` when users are expected to know the relay policy before trying
131to write to it -- like belonging to a special pubkey-based whitelist or writing only events of
132a specific niche kind or content. Normal anti-spam heuristics, for example, do not qualify.
133
128- `created_at_lower_limit`: 'created_at' lower limit as defined in [NIP-22](22.md) 134- `created_at_lower_limit`: 'created_at' lower limit as defined in [NIP-22](22.md)
129 135
130- `created_at_upper_limit`: 'created_at' upper limit as defined in [NIP-22](22.md) 136- `created_at_upper_limit`: 'created_at' upper limit as defined in [NIP-22](22.md)
131 137
132### Event Retention ### 138### Event Retention
133 139
134There may be a cost associated with storing data forever, so relays 140There may be a cost associated with storing data forever, so relays
135may wish to state retention times. The values stated here are defaults 141may wish to state retention times. The values stated here are defaults
@@ -142,14 +148,12 @@ all, and preferably an error will be provided when those are received.
142 148
143```json 149```json
144{ 150{
145...
146 "retention": [ 151 "retention": [
147 { "kinds": [0, 1, [5, 7], [40, 49]], "time": 3600 }, 152 {"kinds": [0, 1, [5, 7], [40, 49]], "time": 3600},
148 { "kinds": [[40000, 49999]], "time": 100 }, 153 {"kinds": [[40000, 49999]], "time": 100},
149 { "kinds": [[30000, 39999]], "count": 1000 }, 154 {"kinds": [[30000, 39999]], "count": 1000},
150 { "time": 3600, "count": 10000 } 155 {"time": 3600, "count": 10000}
151 ] 156 ]
152...
153} 157}
154``` 158```
155 159
@@ -165,8 +169,7 @@ support their protocol quickly via a single HTTP fetch.
165 169
166There is no need to specify retention times for _ephemeral events_ since they are not retained. 170There is no need to specify retention times for _ephemeral events_ since they are not retained.
167 171
168 172### Content Limitations
169### Content Limitations ###
170 173
171Some relays may be governed by the arbitrary laws of a nation state. This 174Some relays may be governed by the arbitrary laws of a nation state. This
172may limit what content can be stored in cleartext on those relays. All 175may limit what content can be stored in cleartext on those relays. All
@@ -185,9 +188,8 @@ flexibility is up to the client software.
185 188
186```json 189```json
187{ 190{
188...
189 "relay_countries": [ "CA", "US" ], 191 "relay_countries": [ "CA", "US" ],
190... 192 ...
191} 193}
192``` 194```
193 195
@@ -199,7 +201,7 @@ country of the legal entities who own the relay, so it's very
199likely a number of countries are involved. 201likely a number of countries are involved.
200 202
201 203
202### Community Preferences ### 204### Community Preferences
203 205
204For public text notes at least, a relay may try to foster a 206For public text notes at least, a relay may try to foster a
205local community. This would encourage users to follow the global 207local community. This would encourage users to follow the global
@@ -208,11 +210,10 @@ To support this goal, relays MAY specify some of the following values.
208 210
209```json 211```json
210{ 212{
211... 213 "language_tags": ["en", "en-419"],
212 "language_tags": [ "en", "en-419" ], 214 "tags": ["sfw-only", "bitcoin-only", "anime"],
213 "tags": [ "sfw-only", "bitcoin-only", "anime" ],
214 "posting_policy": "https://example.com/posting-policy.html", 215 "posting_policy": "https://example.com/posting-policy.html",
215... 216 ...
216} 217}
217``` 218```
218 219
@@ -239,59 +240,75 @@ detail and legal terms. Use the `tags` field to signify limitations
239on content, or topics to be discussed, which could be machine 240on content, or topics to be discussed, which could be machine
240processed by appropriate client software. 241processed by appropriate client software.
241 242
242### Pay-To-Relay ### 243### Pay-to-Relay
243 244
244Relays that require payments may want to expose their fee schedules. 245Relays that require payments may want to expose their fee schedules.
245 246
246```json 247```json
247{ 248{
248...
249 "payments_url": "https://my-relay/payments", 249 "payments_url": "https://my-relay/payments",
250 "fees": { 250 "fees": {
251 "admission": [{ "amount": 1000000, "unit": "msats" }], 251 "admission": [{ "amount": 1000000, "unit": "msats" }],
252 "subscription": [{ "amount": 5000000, "unit": "msats", "period": 2592000 }], 252 "subscription": [{ "amount": 5000000, "unit": "msats", "period": 2592000 }],
253 "publication": [{ "kinds": [4], "amount": 100, "unit": "msats" }], 253 "publication": [{ "kinds": [4], "amount": 100, "unit": "msats" }],
254 }, 254 },
255... 255 ...
256} 256}
257``` 257```
258 258
259### Icon ### 259### Icon
260 260
261A URL pointing to an image to be used as an icon for the relay. Recommended to be squared in shape. 261A URL pointing to an image to be used as an icon for the relay. Recommended to be squared in shape.
262 262
263```json 263```json
264{ 264{
265...
266 "icon": "https://nostr.build/i/53866b44135a27d624e99c6165cabd76ac8f72797209700acb189fce75021f47.jpg", 265 "icon": "https://nostr.build/i/53866b44135a27d624e99c6165cabd76ac8f72797209700acb189fce75021f47.jpg",
267... 266 ...
268} 267}
269``` 268```
270 269
271### Examples ### 270### Examples
272As of 2 May 2023 the following `curl` command provided these results. 271
273 272As of 2 May 2023 the following command provided these results:
274 >curl -H "Accept: application/nostr+json" https://eden.nostr.land 273
275 274```
276 {"name":"eden.nostr.land", 275~> curl -H "Accept: application/nostr+json" https://eden.nostr.land | jq
277 "description":"Eden Nostr Land - Toronto 1-01", 276
278 "pubkey":"00000000827ffaa94bfea288c3dfce4422c794fbb96625b6b31e9049f729d700", 277{
279 "contact":"me@ricardocabral.io", 278 "description": "nostr.land family of relays (us-or-01)",
280 "supported_nips":[1,2,4,9,11,12,15,16,20,22,26,28,33,40], 279 "name": "nostr.land",
281 "supported_nip_extensions":["11a"], 280 "pubkey": "52b4a076bcbbbdc3a1aefa3735816cf74993b1b8db202b01c883c58be7fad8bd",
282 "software":"git+https://github.com/Cameri/nostream.git", 281 "software": "custom",
283 "version":"1.22.6", 282 "supported_nips": [
284 "limitation":{"max_message_length":1048576, 283 1,
285 "max_subscriptions":10, 284 2,
286 "max_filters":2500, 285 4,
287 "max_limit":5000, 286 9,
288 "max_subid_length":256, 287 11,
289 "max_event_tags":2500, 288 12,
290 "max_content_length":65536, 289 16,
291 "min_pow_difficulty":0, 290 20,
292 "auth_required":false, 291 22,
293 "payment_required":true}, 292 28,
294 "payments_url":"https://eden.nostr.land/invoices", 293 33,
295 "fees":{"admission":[{"amount":5000000,"unit":"msats"}], 294 40
296 "publication":[]}}, 295 ],
297 "icon": "https://nostr.build/i/53866b44135a27d624e99c6165cabd76ac8f72797209700acb189fce75021f47.jpg" 296 "version": "1.0.1",
297 "limitation": {
298 "payment_required": true,
299 "max_message_length": 65535,
300 "max_event_tags": 2000,
301 "max_subscriptions": 20,
302 "auth_required": false
303 },
304 "payments_url": "https://eden.nostr.land",
305 "fees": {
306 "subscription": [
307 {
308 "amount": 2500000,
309 "unit": "msats",
310 "period": 2592000
311 }
312 ]
313 },
314}
diff --git a/12.md b/12.md
index 9357977..bf0eda9 100644
--- a/12.md
+++ b/12.md
@@ -4,6 +4,6 @@ NIP-12
4Generic Tag Queries 4Generic Tag Queries
5------------------- 5-------------------
6 6
7`final` `mandatory` `author:scsibug` `author:fiatjaf` 7`final` `mandatory`
8 8
9Moved to [NIP-01](01.md). 9Moved to [NIP-01](01.md).
diff --git a/13.md b/13.md
index 0178733..53c4d1b 100644
--- a/13.md
+++ b/13.md
@@ -4,7 +4,7 @@ NIP-13
4Proof of Work 4Proof of Work
5------------- 5-------------
6 6
7`draft` `optional` `author:jb55` `author:cameri` 7`draft` `optional`
8 8
9This NIP defines a way to generate and interpret Proof of Work for nostr notes. Proof of Work (PoW) is a way to add a proof of computational work to a note. This is a bearer proof that all relays and clients can universally validate with a small amount of code. This proof can be used as a means of spam deterrence. 9This NIP defines a way to generate and interpret Proof of Work for nostr notes. Proof of Work (PoW) is a way to add a proof of computational work to a note. This is a bearer proof that all relays and clients can universally validate with a small amount of code. This proof can be used as a means of spam deterrence.
10 10
@@ -35,11 +35,7 @@ Example mined note
35 "created_at": 1651794653, 35 "created_at": 1651794653,
36 "kind": 1, 36 "kind": 1,
37 "tags": [ 37 "tags": [
38 [ 38 ["nonce", "776797", "21"]
39 "nonce",
40 "776797",
41 "21"
42 ]
43 ], 39 ],
44 "content": "It's just me mining my own business", 40 "content": "It's just me mining my own business",
45 "sig": "284622fc0a3f4f1303455d5175f7ba962a3300d136085b9566801bc2e0699de0c7e31e44c81fb40ad9049173742e904713c3594a1da0fc5d2382a25c11aba977" 41 "sig": "284622fc0a3f4f1303455d5175f7ba962a3300d136085b9566801bc2e0699de0c7e31e44c81fb40ad9049173742e904713c3594a1da0fc5d2382a25c11aba977"
diff --git a/14.md b/14.md
index 7384394..480c4c5 100644
--- a/14.md
+++ b/14.md
@@ -4,16 +4,18 @@ NIP-14
4Subject tag in Text events 4Subject tag in Text events
5-------------------------- 5--------------------------
6 6
7`draft` `optional` `author:unclebobmartin` 7`draft` `optional`
8 8
9This NIP defines the use of the "subject" tag in text (kind: 1) events. 9This NIP defines the use of the "subject" tag in text (kind: 1) events.
10(implemented in more-speech) 10(implemented in more-speech)
11 11
12`["subject": <string>]` 12```json
13["subject": <string>]
14```
13 15
14Browsers often display threaded lists of messages. The contents of the subject tag can be used in such lists, instead of the more ad hoc approach of using the first few words of the message. This is very similar to the way email browsers display lists of incoming emails by subject rather than by contents. 16Browsers often display threaded lists of messages. The contents of the subject tag can be used in such lists, instead of the more ad hoc approach of using the first few words of the message. This is very similar to the way email browsers display lists of incoming emails by subject rather than by contents.
15 17
16When replying to a message with a subject, clients SHOULD replicate the subject tag. Clients MAY adorn the subject to denote 18When replying to a message with a subject, clients SHOULD replicate the subject tag. Clients MAY adorn the subject to denote
17that it is a reply. e.g. by prepending "Re:". 19that it is a reply. e.g. by prepending "Re:".
18 20
19Subjects should generally be shorter than 80 chars. Long subjects will likely be trimmed by clients. 21Subjects should generally be shorter than 80 chars. Long subjects will likely be trimmed by clients.
diff --git a/15.md b/15.md
index 68d28ff..51b7792 100644
--- a/15.md
+++ b/15.md
@@ -1,14 +1,14 @@
1NIP-15 1NIP-15
2====== 2======
3 3
4Nostr Marketplace (for resilient marketplaces) 4Nostr Marketplace
5----------------------------------- 5-----------------
6 6
7`draft` `optional` `author:fiatjaf` `author:benarc` `author:motorina0` `author:talvasconcelos` 7`draft` `optional`
8 8
9> Based on https://github.com/lnbits/Diagon-Alley 9Based on https://github.com/lnbits/Diagon-Alley.
10 10
11> Implemented in [NostrMarket](https://github.com/lnbits/nostrmarket) and [Plebeian Market](https://github.com/PlebeianTech/plebeian-market) 11Implemented in [NostrMarket](https://github.com/lnbits/nostrmarket) and [Plebeian Market](https://github.com/PlebeianTech/plebeian-market).
12 12
13## Terms 13## Terms
14 14
@@ -35,29 +35,30 @@ The `merchant` admin software can be purely clientside, but for `convenience` an
35A merchant can publish these events: 35A merchant can publish these events:
36| Kind | | Description | 36| Kind | | Description |
37| --------- | ------------------ | --------------------------------------------------------------------------------------------------------------- | 37| --------- | ------------------ | --------------------------------------------------------------------------------------------------------------- |
38| `0 ` | `set_meta` | The merchant description (similar with any `nostr` public key). | 38| `0` | `set_meta` | The merchant description (similar with any `nostr` public key). |
39| `30017` | `set_stall` | Create or update a stall. | 39| `30017` | `set_stall` | Create or update a stall. |
40| `30018` | `set_product` | Create or update a product. | 40| `30018` | `set_product` | Create or update a product. |
41| `4 ` | `direct_message` | Communicate with the customer. The messages can be plain-text or JSON. | 41| `4` | `direct_message` | Communicate with the customer. The messages can be plain-text or JSON. |
42| `5 ` | `delete` | Delete a product or a stall. | 42| `5` | `delete` | Delete a product or a stall. |
43 43
44### Event `30017`: Create or update a stall. 44### Event `30017`: Create or update a stall.
45 45
46**Event Content**: 46**Event Content**
47
47```json 48```json
48{ 49{
49 "id": <String, UUID generated by the merchant. Sequential IDs (`0`, `1`, `2`...) are discouraged>, 50 "id": <string, id generated by the merchant. Sequential IDs (`0`, `1`, `2`...) are discouraged>,
50 "name": <String, stall name>, 51 "name": <string, stall name>,
51 "description": <String (optional), stall description>, 52 "description": <string (optional), stall description>,
52 "currency": <String, currency used>, 53 "currency": <string, currency used>,
53 "shipping": [ 54 "shipping": [
54 { 55 {
55 "id": <String, UUID of the shipping zone, generated by the merchant>, 56 "id": <string, id of the shipping zone, generated by the merchant>,
56 "name": <String (optional), zone name>, 57 "name": <string (optional), zone name>,
57 "cost": <float, base cost for shipping. The currency is defined at the stall level>, 58 "cost": <float, base cost for shipping. The currency is defined at the stall level>,
58 "regions": [<String, regions included in this zone>], 59 "regions": [<string, regions included in this zone>],
59 } 60 }
60 ] 61 ]
61} 62}
62``` 63```
63 64
@@ -70,34 +71,39 @@ Fields that are not self-explanatory:
70 - each shipping zone contains the base cost for orders made to that shipping zone, but a specific shipping cost per 71 - each shipping zone contains the base cost for orders made to that shipping zone, but a specific shipping cost per
71 product can also be specified if the shipping cost for that product is higher than what's specified by the base cost. 72 product can also be specified if the shipping cost for that product is higher than what's specified by the base cost.
72 73
73**Event Tags**: 74**Event Tags**
75
74```json 76```json
75 "tags": [["d", <String, id of stall]] 77{
78 "tags": [["d", <string, id of stall]],
79 ...
80}
76``` 81```
77 - 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`.
78 83
79### Event `30018`: Create or update a product 84### Event `30018`: Create or update a product
80 85
81**Event Content**: 86**Event Content**
87
82```json 88```json
83{ 89{
84 "id": <String, UUID generated by the merchant.Sequential IDs (`0`, `1`, `2`...) are discouraged>, 90 "id": <string, id generated by the merchant (sequential ids are discouraged)>,
85 "stall_id": <String, UUID of the stall to which this product belong to>, 91 "stall_id": <string, id of the stall to which this product belong to>,
86 "name": <String, product name>, 92 "name": <string, product name>,
87 "description": <String (optional), product description>, 93 "description": <string (optional), product description>,
88 "images": <[String], array of image URLs, optional>, 94 "images": <[string], array of image URLs, optional>,
89 "currency": <String, currency used>, 95 "currency": <string, currency used>,
90 "price": <float, cost of product>, 96 "price": <float, cost of product>,
91 "quantity": <int or null, available items>, 97 "quantity": <int or null, available items>,
92 "specs": [ 98 "specs": [
93 [<String, spec key>, <String, spec value>] 99 [<string, spec key>, <string, spec value>]
94 ], 100 ],
95 "shipping": [ 101 "shipping": [
96 { 102 {
97 "id": <String, UUID of the shipping zone. Must match one of the zones defined for the stall>, 103 "id": <string, id of the shipping zone (must match one of the zones defined for the stall)>,
98 "cost": <float, extra cost for shipping. The currency is defined at the stall level>, 104 "cost": <float, extra cost for shipping. The currency is defined at the stall level>,
99 } 105 }
100 ] 106 ]
101} 107}
102``` 108```
103 109
@@ -114,16 +120,18 @@ Fields that are not self-explanatory:
114 - the `id` should match the id of the shipping zone, as defined in the `shipping` field of the stall 120 - the `id` should match the id of the shipping zone, as defined in the `shipping` field of the stall
115 - to calculate the total cost of shipping for an order, the user will choose a shipping option during checkout, and then the client must consider this costs: 121 - to calculate the total cost of shipping for an order, the user will choose a shipping option during checkout, and then the client must consider this costs:
116 - the `base cost from the stall` for the chosen shipping option 122 - the `base cost from the stall` for the chosen shipping option
117 - the result of multiplying the product units by the `shipping costs specified in the product`, if any. 123 - the result of multiplying the product units by the `shipping costs specified in the product`, if any.
124
125**Event Tags**
118 126
119**Event Tags**:
120```json 127```json
121 "tags": [ 128 "tags": [
122 ["d", <String, id of product], 129 ["d", <string, id of product],
123 ["t", <String (optional), product category], 130 ["t", <string (optional), product category],
124 ["t", <String (optional), product category], 131 ["t", <string (optional), product category],
125 ... 132 ...
126 ] 133 ],
134 ...
127``` 135```
128 136
129 - the `d` tag is required, its value MUST be the same as the product `id`. 137 - the `d` tag is required, its value MUST be the same as the product `id`.
@@ -147,23 +155,23 @@ The below json goes in content of [NIP04](https://github.com/nostr-protocol/nips
147 155
148```json 156```json
149{ 157{
150 "id": <String, UUID generated by the customer>, 158 "id": <string, id generated by the customer>,
151 "type": 0, 159 "type": 0,
152 "name": <String (optional), ???>, 160 "name": <string (optional), ???>,
153 "address": <String (optional), for physical goods an address should be provided> 161 "address": <string (optional), for physical goods an address should be provided>
154 "message": "<String (optional), message for merchant>, 162 "message": "<string (optional), message for merchant>,
155 "contact": { 163 "contact": {
156 "nostr": <32-bytes hex of a pubkey>, 164 "nostr": <32-bytes hex of a pubkey>,
157 "phone": <String (optional), if the customer wants to be contacted by phone>, 165 "phone": <string (optional), if the customer wants to be contacted by phone>,
158 "email": <String (optional), if the customer wants to be contacted by email>, 166 "email": <string (optional), if the customer wants to be contacted by email>,
159 }, 167 },
160 "items": [ 168 "items": [
161 { 169 {
162 "product_id": <String, UUID of the product>, 170 "product_id": <string, id of the product>,
163 "quantity": <int, how many products the customer is ordering> 171 "quantity": <int, how many products the customer is ordering>
164 } 172 }
165 ], 173 ],
166 "shipping_id": <String, UUID of the shipping zone> 174 "shipping_id": <string, id of the shipping zone>
167} 175}
168 176
169``` 177```
@@ -186,23 +194,23 @@ The below json goes in `content` of [NIP04](https://github.com/nostr-protocol/ni
186 194
187```json 195```json
188{ 196{
189 "id": <String, UUID of the order>, 197 "id": <string, id of the order>,
190 "type": 1, 198 "type": 1,
191 "message": <String, message to customer, optional>, 199 "message": <string, message to customer, optional>,
192 "payment_options": [ 200 "payment_options": [
193 { 201 {
194 "type": <String, option type>, 202 "type": <string, option type>,
195 "link": <String, url, btc address, ln invoice, etc> 203 "link": <string, url, btc address, ln invoice, etc>
196 }, 204 },
197 { 205 {
198 "type": <String, option type>, 206 "type": <string, option type>,
199 "link": <String, url, btc address, ln invoice, etc> 207 "link": <string, url, btc address, ln invoice, etc>
200 }, 208 },
201 { 209 {
202 "type": <String, option type>, 210 "type": <string, option type>,
203 "link": <String, url, btc address, ln invoice, etc> 211 "link": <string, url, btc address, ln invoice, etc>
204 } 212 }
205 ] 213 ]
206} 214}
207``` 215```
208 216
@@ -214,11 +222,11 @@ The below json goes in `content` of [NIP04](https://github.com/nostr-protocol/ni
214 222
215```json 223```json
216{ 224{
217 "id": <String, UUID of the order>, 225 "id": <string, id of the order>,
218 "type": 2, 226 "type": 2,
219 "message": <String, message to customer>, 227 "message": <string, message to customer>,
220 "paid": <Bool, true/false has received payment>, 228 "paid": <bool: has received payment>,
221 "shipped": <Bool, true/false has been shipped>, 229 "shipped": <bool: has been shipped>,
222} 230}
223``` 231```
224## Customize Marketplace 232## Customize Marketplace
@@ -226,19 +234,20 @@ Create a customized user experience using the `naddr` from [NIP-19](https://gith
226 234
227### Event `30019`: Create or update marketplace UI/UX 235### Event `30019`: Create or update marketplace UI/UX
228 236
229**Event Content**: 237**Event Content**
238
230```json 239```json
231{ 240{
232 "name": <String (optional), market name>, 241 "name": <string (optional), market name>,
233 "about": <String (optional), market description>, 242 "about": <string (optional), market description>,
234 "ui": { 243 "ui": {
235 "picture": <String (optional), market logo image URL>, 244 "picture": <string (optional), market logo image URL>,
236 "banner": <String (optional), market logo banner URL>, 245 "banner": <string (optional), market logo banner URL>,
237 "theme": <String (optional), market theme>, 246 "theme": <string (optional), market theme>,
238 "darkMode": <Bool, true/false> 247 "darkMode": <bool, true/false>
239 }, 248 },
240 "merchants": <[String] (optional), array of pubkeys>, 249 "merchants": [array of pubkeys (optional)],
241 ... 250 ...
242} 251}
243``` 252```
244 253
diff --git a/16.md b/16.md
index 78ec708..0032083 100644
--- a/16.md
+++ b/16.md
@@ -4,6 +4,6 @@ NIP-16
4Event Treatment 4Event Treatment
5--------------- 5---------------
6 6
7`final` `mandatory` `author:Semisol` 7`final` `mandatory`
8 8
9Moved to [NIP-01](01.md). 9Moved to [NIP-01](01.md).
diff --git a/18.md b/18.md
index 75c4100..ba96c89 100644
--- a/18.md
+++ b/18.md
@@ -4,7 +4,7 @@ NIP-18
4Reposts 4Reposts
5------- 5-------
6 6
7`draft` `optional` `author:jb55` `author:fiatjaf` `author:arthurfranca` 7`draft` `optional`
8 8
9A repost is a `kind 6` event that is used to signal to followers 9A repost is a `kind 6` event that is used to signal to followers
10that a `kind 1` text note is worth reading. 10that a `kind 1` text note is worth reading.
diff --git a/19.md b/19.md
index cd989e2..ef80887 100644
--- a/19.md
+++ b/19.md
@@ -4,7 +4,7 @@ NIP-19
4bech32-encoded entities 4bech32-encoded entities
5----------------------- 5-----------------------
6 6
7`draft` `optional` `author:jb55` `author:fiatjaf` `author:Semisol` 7`draft` `optional`
8 8
9This NIP standardizes bech32-formatted strings that can be used to display keys, ids and other information in clients. These formats are not meant to be used anywhere in the core protocol, they are only meant for displaying to users, copy-pasting, sharing, rendering QR codes and inputting data. 9This NIP standardizes bech32-formatted strings that can be used to display keys, ids and other information in clients. These formats are not meant to be used anywhere in the core protocol, they are only meant for displaying to users, copy-pasting, sharing, rendering QR codes and inputting data.
10 10
diff --git a/20.md b/20.md
index ec6127a..6feed6a 100644
--- a/20.md
+++ b/20.md
@@ -4,6 +4,6 @@ NIP-20
4Command Results 4Command Results
5--------------- 5---------------
6 6
7`final` `mandatory` `author:jb55` 7`final` `mandatory`
8 8
9Moved to [NIP-01](01.md). 9Moved to [NIP-01](01.md).
diff --git a/21.md b/21.md
index 6246eb4..6ed141a 100644
--- a/21.md
+++ b/21.md
@@ -4,7 +4,7 @@ NIP-21
4`nostr:` URI scheme 4`nostr:` URI scheme
5------------------- 5-------------------
6 6
7`draft` `optional` `author:fiatjaf` 7`draft` `optional`
8 8
9This NIP standardizes the usage of a common URI scheme for maximum interoperability and openness in the network. 9This NIP standardizes the usage of a common URI scheme for maximum interoperability and openness in the network.
10 10
diff --git a/22.md b/22.md
index f595ebf..06af493 100644
--- a/22.md
+++ b/22.md
@@ -4,7 +4,7 @@ NIP-22
4Event `created_at` Limits 4Event `created_at` Limits
5------------------------- 5-------------------------
6 6
7`draft` `optional` `author:jeffthibault` `author:Giszmo` 7`draft` `optional`
8 8
9Relays may define both upper and lower limits within which they will consider an event's `created_at` to be acceptable. Both the upper and lower limits MUST be unix timestamps in seconds as defined in [NIP-01](01.md). 9Relays may define both upper and lower limits within which they will consider an event's `created_at` to be acceptable. Both the upper and lower limits MUST be unix timestamps in seconds as defined in [NIP-01](01.md).
10 10
diff --git a/23.md b/23.md
index 76c0a69..382df83 100644
--- a/23.md
+++ b/23.md
@@ -4,7 +4,7 @@ NIP-23
4Long-form Content 4Long-form Content
5----------------- 5-----------------
6 6
7`draft` `optional` `author:fiatjaf` 7`draft` `optional`
8 8
9This NIP defines `kind:30023` (a _parameterized replaceable event_) for long-form text content, generally referred to as "articles" or "blog posts". `kind:30024` has the same structure as `kind:30023` and is used to save long form drafts. 9This NIP defines `kind:30023` (a _parameterized replaceable event_) for long-form text content, generally referred to as "articles" or "blog posts". `kind:30024` has the same structure as `kind:30023` and is used to save long form drafts.
10 10
diff --git a/24.md b/24.md
index dee9daa..f830b68 100644
--- a/24.md
+++ b/24.md
@@ -4,7 +4,7 @@ NIP-24
4Extra metadata fields and tags 4Extra metadata fields and tags
5------------------------------ 5------------------------------
6 6
7`draft` `optional` `author:fiatjaf` 7`draft` `optional`
8 8
9This NIP defines extra optional fields added to events. 9This NIP defines extra optional fields added to events.
10 10
@@ -13,7 +13,7 @@ kind 0
13 13
14These are extra fields not specified in NIP-01 that may be present in the stringified JSON of metadata events: 14These are extra fields not specified in NIP-01 that may be present in the stringified JSON of metadata events:
15 15
16 - `display_name`: a bigger name with richer characters than `name`. Implementations should fallback to `name` when this is not available. 16 - `display_name`: an alternative, bigger name with richer characters than `name`. `name` should always be set regardless of the presence of `display_name` in the metadata.
17 - `website`: a web URL related in any way to the event author. 17 - `website`: a web URL related in any way to the event author.
18 - `banner`: an URL to a wide (~1024x768) picture to be optionally displayed in the background of a profile screen. 18 - `banner`: an URL to a wide (~1024x768) picture to be optionally displayed in the background of a profile screen.
19 19
diff --git a/25.md b/25.md
index 7b29140..3b4aa59 100644
--- a/25.md
+++ b/25.md
@@ -5,7 +5,7 @@ NIP-25
5Reactions 5Reactions
6--------- 6---------
7 7
8`draft` `optional` `author:jb55` 8`draft` `optional`
9 9
10A reaction is a `kind 7` event that is used to react to other events. 10A reaction is a `kind 7` event that is used to react to other events.
11 11
diff --git a/26.md b/26.md
index 59cf807..86c46e1 100644
--- a/26.md
+++ b/26.md
@@ -4,7 +4,7 @@ NIP-26
4Delegated Event Signing 4Delegated Event Signing
5----- 5-----
6 6
7`draft` `optional` `author:markharding` `author:minds` 7`draft` `optional`
8 8
9This NIP defines how events can be delegated so that they can be signed by other keypairs. 9This NIP defines how events can be delegated so that they can be signed by other keypairs.
10 10
diff --git a/27.md b/27.md
index 6d76120..efd2c12 100644
--- a/27.md
+++ b/27.md
@@ -4,7 +4,7 @@ NIP-27
4Text Note References 4Text Note References
5-------------------- 5--------------------
6 6
7`draft` `optional` `author:arthurfranca` `author:hodlbod` `author:fiatjaf` 7`draft` `optional`
8 8
9This document standardizes the treatment given by clients of inline references of other events and profiles inside the `.content` of any event that has readable text in its `.content` (such as kinds 1 and 30023). 9This document standardizes the treatment given by clients of inline references of other events and profiles inside the `.content` of any event that has readable text in its `.content` (such as kinds 1 and 30023).
10 10
diff --git a/28.md b/28.md
index 62ab398..2dcf800 100644
--- a/28.md
+++ b/28.md
@@ -5,7 +5,7 @@ NIP-28
5Public Chat 5Public Chat
6----------- 6-----------
7 7
8`draft` `optional` `author:ChristopherDavid` `author:fiatjaf` `author:jb55` `author:Cameri` 8`draft` `optional`
9 9
10This NIP defines new event kinds for public chat channels, channel messages, and basic client-side moderation. 10This NIP defines new event kinds for public chat channels, channel messages, and basic client-side moderation.
11 11
@@ -27,8 +27,8 @@ In the channel creation `content` field, Client SHOULD include basic channel met
27 27
28```json 28```json
29{ 29{
30 "content": "{\"name\": \"Demo Channel\", \"about\": \"A test channel.\", \"picture\": \"https://placekitten.com/200/200\"}", 30 "content": "{\"name\": \"Demo Channel\", \"about\": \"A test channel.\", \"picture\": \"https://placekitten.com/200/200\"}",
31 ... 31 ...
32} 32}
33``` 33```
34 34
@@ -37,7 +37,7 @@ In the channel creation `content` field, Client SHOULD include basic channel met
37 37
38Update a channel's public metadata. 38Update a channel's public metadata.
39 39
40Clients and relays SHOULD handle kind 41 events similar to kind 33 replaceable events, where the information is used to update the metadata, without modifying the event id for the channel. Only the most recent kind 41 is needed to be stored. 40Clients and relays SHOULD handle kind 41 events similar to kind 33 replaceable events, where the information is used to update the metadata, without modifying the event id for the channel.Only the most recent kind 41 is needed to be stored.
41 41
42Clients SHOULD ignore kind 41s from pubkeys other than the kind 40 pubkey. 42Clients SHOULD ignore kind 41s from pubkeys other than the kind 40 pubkey.
43 43
@@ -53,9 +53,9 @@ Clients SHOULD use [NIP-10](10.md) marked "e" tags to recommend a relay.
53 53
54```json 54```json
55{ 55{
56 "content": "{\"name\": \"Updated Demo Channel\", \"about\": \"Updating a test channel.\", \"picture\": \"https://placekitten.com/201/201\"}", 56 "content": "{\"name\": \"Updated Demo Channel\", \"about\": \"Updating a test channel.\", \"picture\": \"https://placekitten.com/201/201\"}",
57 "tags": [["e", <channel_create_event_id>, <relay-url>]], 57 "tags": [["e", <channel_create_event_id>, <relay-url>]],
58 ... 58 ...
59} 59}
60``` 60```
61 61
@@ -72,9 +72,9 @@ Root message:
72 72
73```json 73```json
74{ 74{
75 "content": <string>, 75 "content": <string>,
76 "tags": [["e", <kind_40_event_id>, <relay-url>, "root"]], 76 "tags": [["e", <kind_40_event_id>, <relay-url>, "root"]],
77 ... 77 ...
78} 78}
79``` 79```
80 80
@@ -82,14 +82,14 @@ Reply to another message:
82 82
83```json 83```json
84{ 84{
85 "content": <string>, 85 "content": <string>,
86 "tags": [ 86 "tags": [
87 ["e", <kind_40_event_id>, <relay-url>, "root"], 87 ["e", <kind_40_event_id>, <relay-url>, "root"],
88 ["e", <kind_42_event_id>, <relay-url>, "reply"], 88 ["e", <kind_42_event_id>, <relay-url>, "reply"],
89 ["p", <pubkey>, <relay-url>], 89 ["p", <pubkey>, <relay-url>],
90 ... 90 ...
91 ], 91 ],
92 ... 92 ...
93} 93}
94``` 94```
95 95
@@ -108,9 +108,9 @@ Clients MAY hide event 42s for other users other than the user who sent the even
108 108
109```json 109```json
110{ 110{
111 "content": "{\"reason\": \"Dick pic\"}", 111 "content": "{\"reason\": \"Dick pic\"}",
112 "tags": [["e", <kind_42_event_id>]], 112 "tags": [["e", <kind_42_event_id>]],
113 ... 113 ...
114} 114}
115``` 115```
116 116
@@ -126,9 +126,9 @@ Clients MAY hide event 42s for users other than the user who sent the event 44.
126 126
127```json 127```json
128{ 128{
129 "content": "{\"reason\": \"Posting dick pics\"}", 129 "content": "{\"reason\": \"Posting dick pics\"}",
130 "tags": [["p", <pubkey>]], 130 "tags": [["p", <pubkey>]],
131 ... 131 ...
132} 132}
133``` 133```
134 134
diff --git a/30.md b/30.md
index ffc5aeb..5a6f84d 100644
--- a/30.md
+++ b/30.md
@@ -4,7 +4,7 @@ NIP-30
4Custom Emoji 4Custom Emoji
5------------ 5------------
6 6
7`draft` `optional` `author:alexgleason` 7`draft` `optional`
8 8
9Custom emoji may be added to **kind 0** and **kind 1** events by including one or more `"emoji"` tags, in the form: 9Custom emoji may be added to **kind 0** and **kind 1** events by including one or more `"emoji"` tags, in the form:
10 10
diff --git a/31.md b/31.md
index e77ae34..ee92052 100644
--- a/31.md
+++ b/31.md
@@ -4,7 +4,7 @@ NIP-31
4Dealing with unknown event kinds 4Dealing with unknown event kinds
5-------------------------------- 5--------------------------------
6 6
7`draft` `optional` `author:pablof7z` `author:fiatjaf` 7`draft` `optional`
8 8
9When creating a new custom event kind that is part of a custom protocol and isn't meant to be read as text (like `kind:1`), clients should use an `alt` tag to write a short human-readable plaintext summary of what that event is about. 9When creating a new custom event kind that is part of a custom protocol and isn't meant to be read as text (like `kind:1`), clients should use an `alt` tag to write a short human-readable plaintext summary of what that event is about.
10 10
diff --git a/32.md b/32.md
index ddd364a..be4e872 100644
--- a/32.md
+++ b/32.md
@@ -4,52 +4,40 @@ NIP-32
4Labeling 4Labeling
5--------- 5---------
6 6
7`draft` `optional` `author:staab` `author:gruruya` `author:s3x-jay` 7`draft` `optional`
8 8
9A label is a `kind 1985` event that is used to label other entities. This supports a number of use cases, from distributed moderation and content recommendations to reviews and ratings. 9A label is a `kind 1985` event that is used to label other entities. This supports a number of use cases,
10including distributed moderation, collection management, license assignment, and content classification.
10 11
11Label Target 12This NIP introduces two new tags:
12----
13 13
14The label event MUST include one or more tags representing the object or objects being 14- `L` denotes a label namespace
15labeled: `e`, `p`, `a`, `r`, or `t` tags. This allows for labeling of events, people, relays, 15- `l` denotes a label
16or topics respectively. As with NIP-01, a relay hint SHOULD be included when using `e` and
17`p` tags.
18 16
19Label Tag 17Label Namespace Tag
20---- 18----
21 19
22This NIP introduces a new tag `l` which denotes a label, and a new `L` tag which denotes a label namespace. 20An `L` tag can be any string, but publishers SHOULD ensure they are unambiguous by using a well-defined namespace
23A label MUST include a mark matching an `L` tag. `L` tags refer to a tag type within nostr, or a nomenclature 21(such as an ISO standard) or reverse domain name notation.
24external to nostr defined either formally or by convention. Any string can be a namespace, but publishers SHOULD
25ensure they are unambiguous by using a well-defined namespace (such as an ISO standard) or reverse domain name notation.
26 22
27Namespaces starting with `#` indicate that the label target should be associated with the label's value. 23`L` tags are REQUIRED in order to support searching by namespace rather than by a specific tag. The special `ugc`
28This is a way of attaching standard nostr tags to events, pubkeys, relays, urls, etc. 24("user generated content") namespace MAY be used when the label content is provided by an end user.
29
30Some examples:
31
32- `["l", "footstr", "#t"]` - the publisher thinks the given entity should have the `footstr` topic applied.
33- `["l", "<pubkey>", "#p"]` - the publisher thinks the given entity is related to `<pubkey>`
34- `["l", "IT-MI", "ISO-3166-2"]` - Milano, Italy using ISO 3166-2.
35- `["l", "VI-hum", "com.example.ontology"]` - Violence toward a human being as defined by ontology.example.com.
36 25
37`L` tags containing the label namespaces MUST be included in order to support searching by 26`L` tags starting with `#` indicate that the label target should be associated with the label's value.
38namespace rather than by a specific tag. The special `ugc` ("user generated content") namespace 27This is a way of attaching standard nostr tags to events, pubkeys, relays, urls, etc.
39MAY be used when the label content is provided by an end user.
40 28
41`l` and `L` tags MAY be added to other event kinds to support self-reporting. For events 29Label Tag
42with a kind other than 1985, labels refer to the event itself. 30----
43 31
44Label Annotations 32An `l` tag's value can be any string. `l` tags MUST include a `mark` matching an `L` tag value in the same event.
45-----
46 33
47A label tag MAY include a 4th positional element detailing extra metadata about the label in question. This string 34Label Target
48should be a json-encoded object. Any key MAY be used, but the following are recommended: 35----
49 36
50- `quality` may have a value of 0 to 1. This allows for an absolute, granular scale that can be represented in any way (5 stars, color scale, etc). 37The label event MUST include one or more tags representing the object or objects being
51- `confidence` may have a value of 0 to 1. This indicates the certainty which the author has about their rating. 38labeled: `e`, `p`, `a`, `r`, or `t` tags. This allows for labeling of events, people, relays,
52- `context` may be an array of urls (including NIP-21 urls) indicating other context that should be considered when interpreting labels. 39or topics respectively. As with NIP-01, a relay hint SHOULD be included when using `e` and
40`p` tags.
53 41
54Content 42Content
55------- 43-------
@@ -57,6 +45,12 @@ Content
57Labels should be short, meaningful strings. Longer discussions, such as for a review, or an 45Labels should be short, meaningful strings. Longer discussions, such as for a review, or an
58explanation of why something was labeled the way it was, should go in the event's `content` field. 46explanation of why something was labeled the way it was, should go in the event's `content` field.
59 47
48Self-Reporting
49-------
50
51`l` and `L` tags MAY be added to other event kinds to support self-reporting. For events
52with a kind other than 1985, labels refer to the event itself.
53
60Example events 54Example events
61-------------- 55--------------
62 56
@@ -71,36 +65,64 @@ A suggestion that multiple pubkeys be associated with the `permies` topic.
71 ["p", <pubkey1>, <relay_url>], 65 ["p", <pubkey1>, <relay_url>],
72 ["p", <pubkey2>, <relay_url>] 66 ["p", <pubkey2>, <relay_url>]
73 ], 67 ],
74 "content": "",
75 ... 68 ...
76} 69}
77``` 70```
78 71
79A review of a relay. 72A report flagging violence toward a human being as defined by ontology.example.com.
80 73
81```json 74```json
82{ 75{
83 "kind": 1985, 76 "kind": 1985,
84 "tags": [ 77 "tags": [
85 ["L", "com.example.ontology"], 78 ["L", "com.example.ontology"],
86 ["l", "relay/review", "com.example.ontology", "{\"quality\": 0.1}"], 79 ["l", "VI-hum", "com.example.ontology"],
87 ["r", <relay_url>] 80 ["p", <pubkey1>, <relay_url>],
81 ["p", <pubkey2>, <relay_url>]
82 ],
83 ...
84}
85```
86
87A moderation suggestion for a chat event.
88
89```json
90{
91 "kind": 1985,
92 "tags": [
93 ["L", "nip28.moderation"],
94 ["l", "approve", "nip28.moderation"],
95 ["e", <kind40_event_id>, <relay_url>]
88 ], 96 ],
89 "content": "This relay is full of mean people.",
90 ... 97 ...
91} 98}
92``` 99```
93 100
94Publishers can self-label by adding `l` tags to their own non-1985 events. 101Assignment of a license to an event.
102
103```json
104{
105 "kind": 1985,
106 "tags": [
107 ["L", "license"],
108 ["l", "MIT", "license"],
109 ["e", <event_id>, <relay_url>]
110 ],
111 ...
112}
113```
114
115Publishers can self-label by adding `l` tags to their own non-1985 events. In this case, the kind 1 event's author
116is labeling their note as being related to Milan, Italy using ISO 3166-2.
95 117
96```json 118```json
97{ 119{
98 "kind": 1, 120 "kind": 1,
99 "tags": [ 121 "tags": [
100 ["L", "com.example.ontology"], 122 ["L", "ISO-3166-2"],
101 ["l", "IL-frd", "com.example.ontology"] 123 ["l", "IT-MI", "ISO-3166-2"]
102 ], 124 ],
103 "content": "Send me 100 sats and I'll send you 200 back", 125 "content": "It's beautiful here in Milan!",
104 ... 126 ...
105} 127}
106``` 128```
@@ -124,3 +146,8 @@ Vocabularies MAY choose to fully qualify all labels within a namespace (for exam
124formal vocabularies that should not be confused with another namespace when querying 146formal vocabularies that should not be confused with another namespace when querying
125without an `L` tag. For these vocabularies, all labels SHOULD include the namespace 147without an `L` tag. For these vocabularies, all labels SHOULD include the namespace
126(rather than mixing qualified and unqualified labels). 148(rather than mixing qualified and unqualified labels).
149
150A good heuristic for whether a use case fits this NIP is whether labels would ever be unique.
151For example, many events might be labeled with a particular place, topic, or pubkey, but labels
152with specific values like "John Doe" or "3.18743" are not labels, they are values, and should
153be handled in some other way.
diff --git a/33.md b/33.md
index 1e7a9fc..337a1f9 100644
--- a/33.md
+++ b/33.md
@@ -4,6 +4,6 @@ NIP-33
4Parameterized Replaceable Events 4Parameterized Replaceable Events
5-------------------------------- 5--------------------------------
6 6
7`final` `mandatory` `author:Semisol` `author:Kukks` `author:Cameri` `author:Giszmo` 7`final` `mandatory`
8 8
9Moved to [NIP-01](01.md). 9Moved to [NIP-01](01.md).
diff --git a/36.md b/36.md
index 6d1cf63..b10262c 100644
--- a/36.md
+++ b/36.md
@@ -4,7 +4,7 @@ NIP-36
4Sensitive Content / Content Warning 4Sensitive Content / Content Warning
5----------------------------------- 5-----------------------------------
6 6
7`draft` `optional` `author:fernandolguevara` 7`draft` `optional`
8 8
9The `content-warning` tag enables users to specify if the event's content needs to be approved by readers to be shown. 9The `content-warning` tag enables users to specify if the event's content needs to be approved by readers to be shown.
10Clients can hide the content until the user acts on it. 10Clients can hide the content until the user acts on it.
@@ -24,18 +24,18 @@ options:
24 24
25```json 25```json
26{ 26{
27 "pubkey": "<pub-key>", 27 "pubkey": "<pub-key>",
28 "created_at": 1000000000, 28 "created_at": 1000000000,
29 "kind": 1, 29 "kind": 1,
30 "tags": [ 30 "tags": [
31 ["t", "hastag"], 31 ["t", "hastag"],
32 ["L", "content-warning"], 32 ["L", "content-warning"],
33 ["l", "reason", "content-warning"], 33 ["l", "reason", "content-warning"],
34 ["L", "social.nos.ontology"], 34 ["L", "social.nos.ontology"],
35 ["l", "NS-nud", "social.nos.ontology"], 35 ["l", "NS-nud", "social.nos.ontology"],
36 ["content-warning", "reason"] /* reason is optional */ 36 ["content-warning", "<optional reason>"]
37 ], 37 ],
38 "content": "sensitive content with #hastag\n", 38 "content": "sensitive content with #hastag\n",
39 "id": "<event-id>" 39 "id": "<event-id>"
40} 40}
41``` 41```
diff --git a/38.md b/38.md
index f1eddcd..911d5b1 100644
--- a/38.md
+++ b/38.md
@@ -5,7 +5,7 @@ NIP-38
5User Statuses 5User Statuses
6-------------- 6--------------
7 7
8`draft` `optional` `author:jb55` 8`draft` `optional`
9 9
10## Abstract 10## Abstract
11 11
diff --git a/39.md b/39.md
index b84603c..c819e43 100644
--- a/39.md
+++ b/39.md
@@ -4,7 +4,7 @@ NIP-39
4External Identities in Profiles 4External Identities in Profiles
5------------------------------- 5-------------------------------
6 6
7`draft` `optional` `author:pseudozach` `author:Semisol` 7`draft` `optional`
8 8
9## Abstract 9## Abstract
10 10
@@ -15,15 +15,13 @@ Nostr protocol users may have other online identities such as usernames, profile
15A new optional `i` tag is introduced for `kind 0` metadata event contents in addition to name, about, picture fields as included in [NIP-01](https://github.com/nostr-protocol/nips/blob/master/01.md): 15A new optional `i` tag is introduced for `kind 0` metadata event contents in addition to name, about, picture fields as included in [NIP-01](https://github.com/nostr-protocol/nips/blob/master/01.md):
16```json 16```json
17{ 17{
18 "id": <id>, 18 "tags": [
19 "pubkey": <pubkey>, 19 ["i", "github:semisol", "9721ce4ee4fceb91c9711ca2a6c9a5ab"],
20 ... 20 ["i", "twitter:semisol_public", "1619358434134196225"],
21 "tags": [ 21 ["i", "mastodon:bitcoinhackers.org/@semisol", "109775066355589974"]
22 ["i", "github:semisol", "9721ce4ee4fceb91c9711ca2a6c9a5ab"], 22 ["i", "telegram:1087295469", "nostrdirectory/770"]
23 ["i", "twitter:semisol_public", "1619358434134196225"], 23 ],
24 ["i", "mastodon:bitcoinhackers.org/@semisol", "109775066355589974"] 24 ...
25 ["i", "telegram:1087295469", "nostrdirectory/770"]
26 ]
27} 25}
28``` 26```
29 27
@@ -31,9 +29,9 @@ An `i` tag will have two parameters, which are defined as the following:
311. `platform:identity`: This is the platform name (for example `github`) and the identity on that platform (for example `semisol`) joined together with `:`. 291. `platform:identity`: This is the platform name (for example `github`) and the identity on that platform (for example `semisol`) joined together with `:`.
322. `proof`: String or object that points to the proof of owning this identity. 302. `proof`: String or object that points to the proof of owning this identity.
33 31
34Clients SHOULD process any `i` tags with more than 2 values for future extensibility. 32Clients SHOULD process any `i` tags with more than 2 values for future extensibility.
35Identity provider names SHOULD only include `a-z`, `0-9` and the characters `._-/` and MUST NOT include `:`. 33Identity provider names SHOULD only include `a-z`, `0-9` and the characters `._-/` and MUST NOT include `:`.
36Identity names SHOULD be normalized if possible by replacing uppercase letters with lowercase letters, and if there are multiple aliases for an entity the primary one should be used. 34Identity names SHOULD be normalized if possible by replacing uppercase letters with lowercase letters, and if there are multiple aliases for an entity the primary one should be used.
37 35
38## Claim types 36## Claim types
39 37
@@ -41,14 +39,14 @@ Identity names SHOULD be normalized if possible by replacing uppercase letters w
41 39
42Identity: A GitHub username. 40Identity: A GitHub username.
43 41
44Proof: A GitHub Gist ID. This Gist should be created by `<identity>` with a single file that has the text `Verifying that I control the following Nostr public key: <npub encoded public key>`. 42Proof: A GitHub Gist ID. This Gist should be created by `<identity>` with a single file that has the text `Verifying that I control the following Nostr public key: <npub encoded public key>`.
45This can be located at `https://gist.github.com/<identity>/<proof>`. 43This can be located at `https://gist.github.com/<identity>/<proof>`.
46 44
47### `twitter` 45### `twitter`
48 46
49Identity: A Twitter username. 47Identity: A Twitter username.
50 48
51Proof: A Tweet ID. The tweet should be posted by `<identity>` and have the text `Verifying my account on nostr My Public Key: "<npub encoded public key>"`. 49Proof: A Tweet ID. The tweet should be posted by `<identity>` and have the text `Verifying my account on nostr My Public Key: "<npub encoded public key>"`.
52This can be located at `https://twitter.com/<identity>/status/<proof>`. 50This can be located at `https://twitter.com/<identity>/status/<proof>`.
53 51
54### `mastodon` 52### `mastodon`
@@ -62,5 +60,5 @@ This can be located at `https://<identity>/<proof>`.
62 60
63Identity: A Telegram user ID. 61Identity: A Telegram user ID.
64 62
65Proof: A string in the format `<ref>/<id>` which points to a message published in the public channel or group with name `<ref>` and message ID `<id>`. This message should be sent by user ID `<identity>` and have the text `Verifying that I control the following Nostr public key: "<npub encoded public key>"`. 63Proof: A string in the format `<ref>/<id>` which points to a message published in the public channel or group with name `<ref>` and message ID `<id>`. This message should be sent by user ID `<identity>` and have the text `Verifying that I control the following Nostr public key: "<npub encoded public key>"`.
66This can be located at `https://t.me/<proof>`. 64This can be located at `https://t.me/<proof>`.
diff --git a/40.md b/40.md
index 32680db..909747f 100644
--- a/40.md
+++ b/40.md
@@ -2,9 +2,9 @@ NIP-40
2====== 2======
3 3
4Expiration Timestamp 4Expiration Timestamp
5----------------------------------- 5--------------------
6 6
7`draft` `optional` `author:0xtlt` 7`draft` `optional`
8 8
9The `expiration` tag enables users to specify a unix timestamp at which the message SHOULD be considered expired (by relays and clients) and SHOULD be deleted by relays. 9The `expiration` tag enables users to specify a unix timestamp at which the message SHOULD be considered expired (by relays and clients) and SHOULD be deleted by relays.
10 10
@@ -20,14 +20,14 @@ values:
20 20
21```json 21```json
22{ 22{
23 "pubkey": "<pub-key>", 23 "pubkey": "<pub-key>",
24 "created_at": 1000000000, 24 "created_at": 1000000000,
25 "kind": 1, 25 "kind": 1,
26 "tags": [ 26 "tags": [
27 ["expiration", "1600000000"] 27 ["expiration", "1600000000"]
28 ], 28 ],
29 "content": "This message will expire at the specified timestamp and be deleted by relays.\n", 29 "content": "This message will expire at the specified timestamp and be deleted by relays.\n",
30 "id": "<event-id>" 30 "id": "<event-id>"
31} 31}
32``` 32```
33 33
@@ -43,9 +43,9 @@ Clients SHOULD ignore events that have expired.
43Relay Behavior 43Relay Behavior
44-------------- 44--------------
45 45
46Relays MAY NOT delete expired messages immediately on expiration and MAY persist them indefinitely. 46Relays MAY NOT delete expired messages immediately on expiration and MAY persist them indefinitely.
47Relays SHOULD NOT send expired events to clients, even if they are stored. 47Relays SHOULD NOT send expired events to clients, even if they are stored.
48Relays SHOULD drop any events that are published to them if they are expired. 48Relays SHOULD drop any events that are published to them if they are expired.
49An expiration timestamp does not affect storage of ephemeral events. 49An expiration timestamp does not affect storage of ephemeral events.
50 50
51Suggested Use Cases 51Suggested Use Cases
diff --git a/42.md b/42.md
index 9b0c45b..e380e89 100644
--- a/42.md
+++ b/42.md
@@ -4,7 +4,7 @@ NIP-42
4Authentication of clients to relays 4Authentication of clients to relays
5----------------------------------- 5-----------------------------------
6 6
7`draft` `optional` `author:Semisol` `author:fiatjaf` 7`draft` `optional`
8 8
9This NIP defines a way for clients to authenticate to relays by signing an ephemeral event. 9This NIP defines a way for clients to authenticate to relays by signing an ephemeral event.
10 10
@@ -24,13 +24,13 @@ A relay may want to require clients to authenticate to access restricted resourc
24This NIP defines a new message, `AUTH`, which relays can send when they support authentication and clients can send to relays when they want 24This NIP defines a new message, `AUTH`, which relays can send when they support authentication and clients can send to relays when they want
25to authenticate. When sent by relays, the message is of the following form: 25to authenticate. When sent by relays, the message is of the following form:
26 26
27``` 27```json
28["AUTH", <challenge-string>] 28["AUTH", <challenge-string>]
29``` 29```
30 30
31And, when sent by clients, of the following form: 31And, when sent by clients, of the following form:
32 32
33``` 33```json
34["AUTH", <signed-event-json>] 34["AUTH", <signed-event-json>]
35``` 35```
36 36
@@ -41,16 +41,12 @@ Relays MUST exclude `kind: 22242` events from being broadcasted to any client.
41 41
42```json 42```json
43{ 43{
44 "id": "...",
45 "pubkey": "...",
46 "created_at": 1669695536,
47 "kind": 22242, 44 "kind": 22242,
48 "tags": [ 45 "tags": [
49 ["relay", "wss://relay.example.com/"], 46 ["relay", "wss://relay.example.com/"],
50 ["challenge", "challengestringhere"] 47 ["challenge", "challengestringhere"]
51 ], 48 ],
52 "content": "", 49 ...
53 "sig": "..."
54} 50}
55``` 51```
56 52
@@ -67,13 +63,13 @@ is expected to last for the duration of the WebSocket connection.
67Upon receiving a message from an unauthenticated user it can't fulfill without authentication, a relay may choose to notify the client. For 63Upon receiving a message from an unauthenticated user it can't fulfill without authentication, a relay may choose to notify the client. For
68that it can use a `NOTICE` or `OK` message with a standard prefix `"restricted: "` that is readable both by humans and machines, for example: 64that it can use a `NOTICE` or `OK` message with a standard prefix `"restricted: "` that is readable both by humans and machines, for example:
69 65
70``` 66```json
71["NOTICE", "restricted: we can't serve DMs to unauthenticated users, does your client implement NIP-42?"] 67["NOTICE", "restricted: we can't serve DMs to unauthenticated users, does your client implement NIP-42?"]
72``` 68```
73 69
74or it can return an `OK` message noting the reason an event was not written using the same prefix: 70or it can return an `OK` message noting the reason an event was not written using the same prefix:
75 71
76``` 72```json
77["OK", <event-id>, false, "restricted: we do not accept events from unauthenticated users, please sign up at https://example.com/"] 73["OK", <event-id>, false, "restricted: we do not accept events from unauthenticated users, please sign up at https://example.com/"]
78``` 74```
79 75
diff --git a/45.md b/45.md
index 7b11950..998b952 100644
--- a/45.md
+++ b/45.md
@@ -4,7 +4,7 @@ NIP-45
4Event Counts 4Event Counts
5-------------- 5--------------
6 6
7`draft` `optional` `author:staab` 7`draft` `optional`
8 8
9Relays may support the verb `COUNT`, which provides a mechanism for obtaining event counts. 9Relays may support the verb `COUNT`, which provides a mechanism for obtaining event counts.
10 10
@@ -16,29 +16,36 @@ Some queries a client may want to execute against connected relays are prohibiti
16 16
17This NIP defines the verb `COUNT`, which accepts a subscription id and filters as specified in [NIP 01](01.md) for the verb `REQ`. Multiple filters are OR'd together and aggregated into a single count result. 17This NIP defines the verb `COUNT`, which accepts a subscription id and filters as specified in [NIP 01](01.md) for the verb `REQ`. Multiple filters are OR'd together and aggregated into a single count result.
18 18
19``` 19```json
20["COUNT", <subscription_id>, <filters JSON>...] 20["COUNT", <subscription_id>, <filters JSON>...]
21``` 21```
22 22
23Counts are returned using a `COUNT` response in the form `{"count": <integer>}`. Relays may use probabilistic counts to reduce compute requirements. 23Counts are returned using a `COUNT` response in the form `{"count": <integer>}`. Relays may use probabilistic counts to reduce compute requirements.
24In case a relay uses probabilistic counts, it MAY indicate it in the response with `approximate` key i.e. `{"count": <integer>, "approximate": <true|false>}`. 24In case a relay uses probabilistic counts, it MAY indicate it in the response with `approximate` key i.e. `{"count": <integer>, "approximate": <true|false>}`.
25 25
26``` 26```json
27["COUNT", <subscription_id>, {"count": <integer>}] 27["COUNT", <subscription_id>, {"count": <integer>}]
28``` 28```
29 29
30Examples: 30## Examples:
31 31
32``` 32### Followers count
33# Followers count 33
34```json
34["COUNT", <subscription_id>, {"kinds": [3], "#p": [<pubkey>]}] 35["COUNT", <subscription_id>, {"kinds": [3], "#p": [<pubkey>]}]
35["COUNT", <subscription_id>, {"count": 238}] 36["COUNT", <subscription_id>, {"count": 238}]
37```
36 38
37# Count posts and reactions 39### Count posts and reactions
40
41```json
38["COUNT", <subscription_id>, {"kinds": [1, 7], "authors": [<pubkey>]}] 42["COUNT", <subscription_id>, {"kinds": [1, 7], "authors": [<pubkey>]}]
39["COUNT", <subscription_id>, {"count": 5}] 43["COUNT", <subscription_id>, {"count": 5}]
44```
40 45
41# Count posts approximately 46### Count posts approximately
47
48```
42["COUNT", <subscription_id>, {"kinds": [1]}] 49["COUNT", <subscription_id>, {"kinds": [1]}]
43["COUNT", <subscription_id>, {"count": 93412452, "approximate": true}] 50["COUNT", <subscription_id>, {"count": 93412452, "approximate": true}]
44``` 51```
diff --git a/46.md b/46.md
index 90fa1a0..5318541 100644
--- a/46.md
+++ b/46.md
@@ -4,7 +4,7 @@ NIP-46
4Nostr Connect 4Nostr Connect
5------------------------ 5------------------------
6 6
7`draft` `optional` `author:tiero` `author:giowe` `author:vforvalerio87` 7`draft` `optional`
8 8
9## Rationale 9## Rationale
10 10
diff --git a/47.md b/47.md
index b6a4f2b..d4b7c1f 100644
--- a/47.md
+++ b/47.md
@@ -4,7 +4,7 @@ NIP-47
4Nostr Wallet Connect 4Nostr Wallet Connect
5-------------------- 5--------------------
6 6
7`draft` `optional` `author:kiwiidb` `author:bumi` `author:semisol` `author:vitorpamplona` 7`draft` `optional`
8 8
9## Rationale 9## Rationale
10 10
diff --git a/48.md b/48.md
index 8f22781..2f03e00 100644
--- a/48.md
+++ b/48.md
@@ -4,7 +4,7 @@ NIP-48
4Proxy Tags 4Proxy Tags
5---------- 5----------
6 6
7`draft` `optional` `author:alexgleason` 7`draft` `optional`
8 8
9Nostr events bridged from other protocols such as ActivityPub can link back to the source object by including a `"proxy"` tag, in the form: 9Nostr events bridged from other protocols such as ActivityPub can link back to the source object by including a `"proxy"` tag, in the form:
10 10
diff --git a/50.md b/50.md
index 5bda355..2bdf1ff 100644
--- a/50.md
+++ b/50.md
@@ -4,7 +4,7 @@ NIP-50
4Search Capability 4Search Capability
5----------------- 5-----------------
6 6
7`draft` `optional` `author:brugeman` `author:mikedilger` `author:fiatjaf` 7`draft` `optional`
8 8
9## Abstract 9## Abstract
10 10
diff --git a/51.md b/51.md
index cbd6be1..f5a9a74 100644
--- a/51.md
+++ b/51.md
@@ -4,145 +4,109 @@ NIP-51
4Lists 4Lists
5----- 5-----
6 6
7`draft` `optional` `author:fiatjaf` `author:arcbtc` `author:monlovesmango` `author:eskema` `author:gzuuus` 7`draft` `optional`
8 8
9A "list" event is defined as having a list of public and/or private tags. Public tags will be listed in the event `tags`. Private tags will be encrypted in the event `content`. Encryption for private tags will use [NIP-04 - Encrypted Direct Message](04.md) encryption, using the list author's private and public key for the shared secret. A distinct event kind should be used for each list type created. 9This NIP defines lists of things that users can create. Lists can contain references to anything, and these references can be **public** or **private**.
10 10
11If a list should only be defined once per user (like the "mute" list) the list is declared as a _replaceable event_. These lists may be referred to as "replaceable lists". Otherwise, the list is a _parameterized replaceable event_ and the list name will be used as the `d` tag. These lists may be referred to as "parameterized replaceable lists". 11Public items in a list are specified in the event `tags` array, while private items are specified in a JSON array that mimics the structure of the event `tags` array, but stringified and encrypted using the same scheme from [NIP-04](04.md) (the shared key is computed using the author's public and private key) and stored in the `.content`.
12 12
13## Replaceable List Event Example 13## Types of lists
14 14
15Lets say a user wants to create a 'Mute' list and has keys: 15## Standard lists
16```
17priv: fb505c65d4df950f5d28c9e4d285ee12ffaf315deef1fc24e3c7cd1e7e35f2b1
18pub: b1a5c93edcc8d586566fde53a20bdb50049a97b15483cb763854e57016e0fa3d
19```
20The user wants to publicly include these users:
21 16
22```json 17Standard lists use non-parameterized replaceable events, meaning users may only have a single list of each kind. They have special meaning and clients may rely on them to augment a user's profile or browsing experience.
23["p", "3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d"],
24["p", "32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245"]
25```
26and privately include these users (below is the JSON that would be encrypted and placed in the event content):
27 18
28```json 19For example, _mute lists_ can contain the public keys of spammers and bad actors users don't want to see in their feeds or receive annoying notifications from.
29[
30 ["p", "9ec7a778167afb1d30c4833de9322da0c08ba71a69e1911d5578d3144bb56437"],
31 ["p", "8c0da4862130283ff9e67d889df264177a508974e2feb96de139804ea66d6168"]
32]
33```
34 20
35Then the user would create a 'Mute' list event like below: 21| name | kind | description | expected tag items |
22| --- | --- | --- | --- |
23| Mute list | 10000 | things the user doesn't want to see in their feeds | `"p"` (pubkeys), `"t"` (hashtags), `"word"` (lowercase string), `"e"` (threads) |
24| Pinned notes | 10001 | events the user intends to showcase in their profile page | `"e"` (kind:1 notes) |
25| Bookmarks | 10003 | uncategorized, "global" list of things a user wants to save | `"e"` (kind:1 notes), `"a"` (kind:30023 articles), `"t"` (hashtags), `"r" (URLs)` |
26| Communities | 10004 | [NIP-72](72.md) communities the user belongs to | `"a"` (kind:34550 community definitions) |
27| Public chats | 10005 | [NIP-28](28.md) chat channels the user is in | `"e"` (kind:40 channel definitions) |
28| Blocked relays | 10006 | relays clients should never connect to | `"relay"` (relay URLs) |
29| Search relays | 10007 | relays clients should use when performing search queries | `"relay"` (relay URLs) |
30| Interests | 10015 | topics a user may be interested in and pointers | `"t"` (hashtags) and `"a" (kind:30015 interest set)` |
31| Emojis | 10030 | user preferred emojis and pointers to emoji sets | `"emoji"` (see [NIP-30](30.md)) and `"a"` (kind:30030 emoji set) |
36 32
37```json 33## Sets
38{
39 "kind": 10000,
40 "tags": [
41 ["p", "3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d"],
42 ["p", "32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245"],
43 ],
44 "content": "VezuSvWak++ASjFMRqBPWS3mK5pZ0vRLL325iuIL4S+r8n9z+DuMau5vMElz1tGC/UqCDmbzE2kwplafaFo/FnIZMdEj4pdxgptyBV1ifZpH3TEF6OMjEtqbYRRqnxgIXsuOSXaerWgpi0pm+raHQPseoELQI/SZ1cvtFqEUCXdXpa5AYaSd+quEuthAEw7V1jP+5TDRCEC8jiLosBVhCtaPpLcrm8HydMYJ2XB6Ixs=?iv=/rtV49RFm0XyFEwG62Eo9A==",
45 ...other fields
46}
47```
48 34
35Sets are lists with well-defined meaning that can enhance the functionality and the UI of clients that rely on them. Unlike standard lists, users are expected to have more than one set of each kind, therefore each of them must be assigned a different `"d"` identifier.
49 36
50## Parameterized Replaceable List Event Example 37For example, _relay sets_ can be displayed in a dropdown UI to give users the option to switch to which relays they will publish an event or from which relays they will read the replies to an event; _curation sets_ can be used by apps to showcase curations made by others tagged to different topics.
51 38
52Lets say a user wants to create a 'Categorized People' list of `nostr` people and has keys: 39Aside from their main identifier, the `"d"` tag, sets can optionally have a `"title"`, an `"image"` and a `"description"` tags that can be used to enhance their UI.
53```
54priv: fb505c65d4df950f5d28c9e4d285ee12ffaf315deef1fc24e3c7cd1e7e35f2b1
55pub: b1a5c93edcc8d586566fde53a20bdb50049a97b15483cb763854e57016e0fa3d
56```
57The user wants to publicly include these users:
58 40
59```json 41| name | kind | description | expected tag items |
60["p", "3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d"], 42| --- | --- | --- | --- |
61["p", "32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245"] 43| Follow sets | 30000 | categorized groups of users a client may choose to check out in different circumstances | `"p"` (pubkeys) |
62``` 44| Relay sets | 30002 | user-defined relay groups the user can easily pick and choose from during various operations | `"relay"` (relay URLs) |
63and privately include these users (below is the JSON that would be encrypted and placed in the event content): 45| Bookmark sets | 30003 | user-defined bookmarks categories , for when bookmarks must be in labeled separate groups | `"e"` (kind:1 notes), `"a"` (kind:30023 articles), `"t"` (hashtags), `"r" (URLs)` |
46| Curation sets | 30004 | groups of articles picked by users as interesting and/or belonging to the same category | `"a"` (kind:30023 articles), `"e"` (kind:1 notes) |
47| Interest sets | 30015 | interest topics represented by a bunch of "hashtags" | `"t"` (hashtags) |
48| Emoji sets | 30030 | categorized emoji groups | `"emoji"` (see [NIP-30](30.md)) |
64 49
65```json 50## Deprecated standard lists
66[ 51
67 ["p", "9ec7a778167afb1d30c4833de9322da0c08ba71a69e1911d5578d3144bb56437"], 52Some clients have used these lists in the past, but they should work on transitioning to the [standard formats](#standard-lists) above.
68 ["p", "8c0da4862130283ff9e67d889df264177a508974e2feb96de139804ea66d6168"] 53
69] 54| kind | "d" tag | use instead |
70``` 55| --- | --- | --- |
56| 30000 | `"mute"` | kind 10000 _mute list_ |
57| 30001 | `"pin"` | kind 10001 _pin list_ |
58| 30001 | `"bookmark"` | kind 10003 _bookmarks list_ |
59| 30001 | `"communities"` | kind 10004 _communities list_ |
71 60
72Then the user would create a 'Categorized People' list event like below: 61## Examples
62
63### A _mute list_ with some public items and some encrypted items
73 64
74```json 65```json
75{ 66{
76 "kind": 30000, 67 "id": "a92a316b75e44cfdc19986c634049158d4206fcc0b7b9c7ccbcdabe28beebcd0",
68 "pubkey": "854043ae8f1f97430ca8c1f1a090bdde6488bd5115c7a45307a2a212750ae4cb",
69 "created_at": 1699597889,
70 "kind": 10000,
77 "tags": [ 71 "tags": [
78 ["d", "nostr"], 72 ["p", "07caba282f76441955b695551c3c5c742e5b9202a3784780f8086fdcdc1da3a9"],
79 ["p", "3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d"], 73 ["p", "a55c15f5e41d5aebd236eca5e0142789c5385703f1a7485aa4b38d94fd18dcc4"]
80 ["p", "32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245"],
81 ], 74 ],
82 "content": "VezuSvWak++ASjFMRqBPWS3mK5pZ0vRLL325iuIL4S+r8n9z+DuMau5vMElz1tGC/UqCDmbzE2kwplafaFo/FnIZMdEj4pdxgptyBV1ifZpH3TEF6OMjEtqbYRRqnxgIXsuOSXaerWgpi0pm+raHQPseoELQI/SZ1cvtFqEUCXdXpa5AYaSd+quEuthAEw7V1jP+5TDRCEC8jiLosBVhCtaPpLcrm8HydMYJ2XB6Ixs=?iv=/rtV49RFm0XyFEwG62Eo9A==", 75 "content": "TJob1dQrf2ndsmdbeGU+05HT5GMnBSx3fx8QdDY/g3NvCa7klfzgaQCmRZuo1d3WQjHDOjzSY1+MgTK5WjewFFumCcOZniWtOMSga9tJk1ky00tLoUUzyLnb1v9x95h/iT/KpkICJyAwUZ+LoJBUzLrK52wNTMt8M5jSLvCkRx8C0BmEwA/00pjOp4eRndy19H4WUUehhjfV2/VV/k4hMAjJ7Bb5Hp9xdmzmCLX9+64+MyeIQQjQAHPj8dkSsRahP7KS3MgMpjaF8nL48Bg5suZMxJayXGVp3BLtgRZx5z5nOk9xyrYk+71e2tnP9IDvSMkiSe76BcMct+m7kGVrRcavDI4n62goNNh25IpghT+a1OjjkpXt9me5wmaL7fxffV1pchdm+A7KJKIUU3kLC7QbUifF22EucRA9xiEyxETusNludBXN24O3llTbOy4vYFsq35BeZl4v1Cse7n2htZicVkItMz3wjzj1q1I1VqbnorNXFgllkRZn4/YXfTG/RMnoK/bDogRapOV+XToZ+IvsN0BqwKSUDx+ydKpci6htDRF2WDRkU+VQMqwM0CoLzy2H6A2cqyMMMD9SLRRzBg==?iv=S3rFeFr1gsYqmQA7bNnNTQ==",
83 ...other fields 76 "sig": "1173822c53261f8cffe7efbf43ba4a97a9198b3e402c2a1df130f42a8985a2d0d3430f4de350db184141e45ca844ab4e5364ea80f11d720e36357e1853dba6ca"
84} 77}
85``` 78```
86 79
87Lets say a user wants to create a 'Categorized Bookmarks' list of `bookmarks` and has keys: 80### A _curation set_ of articles and notes about yaks
88```
89priv: fb505c65d4df950f5d28c9e4d285ee12ffaf315deef1fc24e3c7cd1e7e35f2b1
90pub: b1a5c93edcc8d586566fde53a20bdb50049a97b15483cb763854e57016e0fa3d
91```
92The user wants to publicly include these bookmarks:
93
94```json
95["e", "5c83da77af1dec6d7289834998ad7aafbd9e2191396d75ec3cc27f5a77226f36", "wss://nostr.example.com"],
96["a", "30023:f7234bd4c1394dda46d09f35bd384dd30cc552ad5541990f98844fb06676e9ca:abcd", "wss://nostr.example.com"],
97["r", "https://github.com/nostr-protocol/nostr", "Nostr repository"],
98```
99and privately include these bookmarks (below is the JSON that would be encrypted and placed in the event content):
100 81
101```json
102[
103 ["r", "https://my-private.bookmark", "My private bookmark"],
104 ["a", "30001:f7234bd4c1394dda46d09f35bd384dd30cc552ad5541990f98844fb06676e9ca:abcd", "wss://nostr.example.com"],
105]
106``` 82```
107
108Then the user would create a 'Categorized Bookmarks' list event like below:
109
110```json
111{ 83{
112 "kind": 30001, 84 "id": "567b41fc9060c758c4216fe5f8d3df7c57daad7ae757fa4606f0c39d4dd220ef",
85 "pubkey": "d6dc95542e18b8b7aec2f14610f55c335abebec76f3db9e58c254661d0593a0c",
86 "created_at": 1695327657,
87 "kind": 30004,
113 "tags": [ 88 "tags": [
114 ["d", "bookmarks"], 89 ["d", "jvdy9i4"],
115 ["e", "5c83da77af1dec6d7289834998ad7aafbd9e2191396d75ec3cc27f5a77226f36", "wss://nostr.example.com"], 90 ["name", "Yaks"],
116 ["a", "30023:f7234bd4c1394dda46d09f35bd384dd30cc552ad5541990f98844fb06676e9ca:abcd", "wss://nostr.example.com"], 91 ["picture", "https://cdn.britannica.com/40/188540-050-9AC748DE/Yak-Himalayas-Nepal.jpg"],
117 ["r", "https://github.com/nostr-protocol/nostr", "Nostr repository"], 92 ["about", "The domestic yak, also known as the Tartary ox, grunting ox, or hairy cattle, is a species of long-haired domesticated cattle found throughout the Himalayan region of the Indian subcontinent, the Tibetan Plateau, Gilgit-Baltistan, Tajikistan and as far north as Mongolia and Siberia."],
93 ["a", "30023:26dc95542e18b8b7aec2f14610f55c335abebec76f3db9e58c254661d0593a0c:95ODQzw3ajNoZ8SyMDOzQ"],
94 ["a", "30023:54af95542e18b8b7aec2f14610f55c335abebec76f3db9e58c254661d0593a0c:1-MYP8dAhramH9J5gJWKx"],
95 ["a", "30023:f8fe95542e18b8b7aec2f14610f55c335abebec76f3db9e58c254661d0593a0c:D2Tbd38bGrFvU0bIbvSMt"],
96 ["e", "d78ba0d5dce22bfff9db0a9e996c9ef27e2c91051de0c4e1da340e0326b4941e"]
118 ], 97 ],
119 "content": "y3AyaLJfnmYr9x9Od9o4aYrmL9+Ynmsim5y2ONrU0urOTq+V81CyAthQ2mUOWE9xwGgrizhY7ILdQwWhy6FK0sA33GHtC0egUJw1zIdknPe7BZjznD570yk/8RXYgGyDKdexME+RMYykrnYFxq1+y/h00kmJg4u+Gpn+ZjmVhNYxl9b+TiBOAXG9UxnK/H0AmUqDpcldn6+j1/AiStwYZhD1UZ3jzDIk2qcCDy7MlGnYhSP+kNmG+2b0T/D1L0Z7?iv=PGJJfPE84gacAh7T0e6duQ==", 98 "content": "",
120 ...other fields 99 "sig": "a9a4e2192eede77e6c9d24ddfab95ba3ff7c03fbd07ad011fff245abea431fb4d3787c2d04aad001cb039cb8de91d83ce30e9a94f82ac3c5a2372aa1294a96bd"
121} 100}
122``` 101```
123 102
124## List Event Kinds 103## Encryption process pseudocode
125 104
126| kind | list type | 105```scala
127| ------ | ----------------------- | 106val private_items = [
128| 10000 | Mute | 107 ["p", "07caba282f76441955b695551c3c5c742e5b9202a3784780f8086fdcdc1da3a9"],
129| 10001 | Pin | 108 ["a", "a55c15f5e41d5aebd236eca5e0142789c5385703f1a7485aa4b38d94fd18dcc4"],
130| 30000 | Categorized People | 109]
131| 30001 | Categorized Bookmarks | 110val base64blob = nip04.encrypt(json.encode_to_string(private_items))
132 111event.content = base64blob
133 112```
134### Mute List
135
136An event with kind `10000` is defined as a replaceable list event for listing content a user wants to mute. Any standardized tag can be included in a Mute List.
137
138### Pin List
139
140An event with kind `10001` is defined as a replaceable list event for listing content a user wants to pin. Any standardized tag can be included in a Pin List.
141
142### Categorized People List
143
144An event with kind `30000` is defined as a parameterized replaceable list event for categorizing people. The 'd' parameter for this event holds the category name of the list. The tags included in these lists MUST follow the format of kind 3 events as defined in [NIP-02 - Contact List and Petnames](02.md).
145
146### Categorized Bookmarks List
147
148An event of kind `30001` is defined as a parameterized replaceable list event for categorizing bookmarks. The 'd' parameter for this event holds the category name of the list. The bookmark lists may contain metadata tags such as 'title', 'image', 'summary' as defined in [NIP-23 - Long-form Content](23.md). Any standardized tag can be included in a Categorized Bookmark List. \ No newline at end of file
diff --git a/52.md b/52.md
index 6950744..15cc8fc 100644
--- a/52.md
+++ b/52.md
@@ -4,7 +4,7 @@ NIP-52
4Calendar Events 4Calendar Events
5--------------- 5---------------
6 6
7`draft` `optional` `author:tyiu` 7`draft` `optional`
8 8
9This specification defines calendar events representing an occurrence at a specific moment or between moments. These calendar events are _parameterized replaceable_ and deletable per [NIP-09](09.md). 9This specification defines calendar events representing an occurrence at a specific moment or between moments. These calendar events are _parameterized replaceable_ and deletable per [NIP-09](09.md).
10 10
diff --git a/53.md b/53.md
index b3d416b..d3cc0af 100644
--- a/53.md
+++ b/53.md
@@ -4,19 +4,19 @@ NIP-53
4Live Activities 4Live Activities
5--------------- 5---------------
6 6
7`draft` `optional` `author:vitorpamplona` `author:v0l` 7`draft` `optional`
8
9## Abstract
10 8
11Service providers want to offer live activities to the Nostr network in such a way that participants can easily logged and queried by clients. This NIP describes a general framework to advertise the involvement of pubkeys in such live activities. 9Service providers want to offer live activities to the Nostr network in such a way that participants can easily logged and queried by clients. This NIP describes a general framework to advertise the involvement of pubkeys in such live activities.
12 10
13# Live Event 11## Concepts
12
13### Live Event
14 14
15A special event with `kind:30311` "Live Event" is defined as a _parameterized replaceable event_ of public `p` tags. Each `p` tag SHOULD have a **displayable** marker name for the current role (e.g. `Host`, `Speaker`, `Participant`) of the user in the event and the relay information MAY be empty. This event will be constantly updated as participants join and leave the activity. 15A special event with `kind:30311` "Live Event" is defined as a _parameterized replaceable event_ of public `p` tags. Each `p` tag SHOULD have a **displayable** marker name for the current role (e.g. `Host`, `Speaker`, `Participant`) of the user in the event and the relay information MAY be empty. This event will be constantly updated as participants join and leave the activity.
16 16
17For example: 17For example:
18 18
19```js 19```json
20{ 20{
21 "kind": 30311, 21 "kind": 30311,
22 "tags": [ 22 "tags": [
@@ -38,7 +38,7 @@ For example:
38 ["relays", "wss://one.com", "wss://two.com", ...] 38 ["relays", "wss://one.com", "wss://two.com", ...]
39 ], 39 ],
40 "content": "", 40 "content": "",
41 ...other fields 41 ...
42} 42}
43``` 43```
44 44
@@ -52,7 +52,7 @@ Live Activity management clients are expected to constantly update `kind:30311`
52 52
53The activity MUST be linked to using the [NIP-19](19.md) `naddr` code along with the `a` tag. 53The activity MUST be linked to using the [NIP-19](19.md) `naddr` code along with the `a` tag.
54 54
55## Proof of Agreement to Participate 55### Proof of Agreement to Participate
56 56
57Event owners can add proof as the 5th term in each `p` tag to clarify the participant's agreement in joining the event. The proof is a signed SHA256 of the complete `a` Tag of the event (`kind:pubkey:dTag`) by each `p`'s private key, encoded in hex. 57Event owners can add proof as the 5th term in each `p` tag to clarify the participant's agreement in joining the event. The proof is a signed SHA256 of the complete `a` Tag of the event (`kind:pubkey:dTag`) by each `p`'s private key, encoded in hex.
58 58
@@ -60,30 +60,28 @@ Clients MAY only display participants if the proof is available or MAY display p
60 60
61This feature is important to avoid malicious event owners adding large account holders to the event, without their knowledge, to lure their followers into the malicious owner's trap. 61This feature is important to avoid malicious event owners adding large account holders to the event, without their knowledge, to lure their followers into the malicious owner's trap.
62 62
63# Live Chat Message 63### Live Chat Message
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```js 67```json
68{ 68{
69 "id": "<32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>",
70 "pubkey": "<32-bytes lowercase hex-encoded public key of the event creator>",
71 "created_at": "<Unix timestamp in seconds>",
72 "kind": 1311, 69 "kind": 1311,
73 "tags": [ 70 "tags": [
74 ["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"],
75 ], 72 ],
76 "content": "Zaps to live streams is beautiful." 73 "content": "Zaps to live streams is beautiful.",
74 ...
77} 75}
78``` 76```
79 77
80# Use Cases 78## Use Cases
81 79
82Common use cases include meeting rooms/workshops, watch-together activities, or event spaces, such as [live.snort.social](https://live.snort.social) and [nostrnests.com](https://nostrnests.com). 80Common use cases include meeting rooms/workshops, watch-together activities, or event spaces, such as [live.snort.social](https://live.snort.social) and [nostrnests.com](https://nostrnests.com).
83 81
84# Example 82## Example
85 83
86Live Streaming 84### Live Streaming
87 85
88```json 86```json
89{ 87{
@@ -107,7 +105,7 @@ Live Streaming
107} 105}
108``` 106```
109 107
110Live Streaming chat message 108### Live Streaming chat message
111 109
112```json 110```json
113{ 111{
diff --git a/56.md b/56.md
index 259118d..a2861e3 100644
--- a/56.md
+++ b/56.md
@@ -1,11 +1,10 @@
1
2NIP-56 1NIP-56
3====== 2======
4 3
5Reporting 4Reporting
6--------- 5---------
7 6
8`draft` `optional` `author:jb55` 7`draft` `optional`
9 8
10A report is a `kind 1984` note that is used to report other notes for spam, 9A report is a `kind 1984` note that is used to report other notes for spam,
11illegal and explicit content. 10illegal and explicit content.
diff --git a/57.md b/57.md
index 849c869..2b2c97b 100644
--- a/57.md
+++ b/57.md
@@ -4,7 +4,7 @@ NIP-57
4Lightning Zaps 4Lightning Zaps
5-------------- 5--------------
6 6
7`draft` `optional` `author:jb55` `author:kieran` 7`draft` `optional`
8 8
9This NIP defines two new event types for recording lightning payments between users. `9734` is a `zap request`, representing a payer's request to a recipient's lightning wallet for an invoice. `9735` is a `zap receipt`, representing the confirmation by the recipient's lightning wallet that the invoice issued in response to a `zap request` has been paid. 9This NIP defines two new event types for recording lightning payments between users. `9734` is a `zap request`, representing a payer's request to a recipient's lightning wallet for an invoice. `9735` is a `zap receipt`, representing the confirmation by the recipient's lightning wallet that the invoice issued in response to a `zap request` has been paid.
10 10
diff --git a/58.md b/58.md
index ccabc7b..9725c82 100644
--- a/58.md
+++ b/58.md
@@ -4,7 +4,7 @@ NIP-58
4Badges 4Badges
5------ 5------
6 6
7`draft` `optional` `author:cameri` 7`draft` `optional`
8 8
9Three special events are used to define, award and display badges in 9Three special events are used to define, award and display badges in
10user profiles: 10user profiles:
diff --git a/65.md b/65.md
index b676029..4a6f5a1 100644
--- a/65.md
+++ b/65.md
@@ -4,11 +4,11 @@ NIP-65
4Relay List Metadata 4Relay List Metadata
5------------------- 5-------------------
6 6
7`draft` `optional` `author:mikedilger` `author:vitorpamplona` 7`draft` `optional`
8 8
9Defines a replaceable event using `kind:10002` to advertise preferred relays for discovering a user's content and receiving fresh content from others. 9Defines a replaceable event using `kind:10002` to advertise preferred relays for discovering a user's content and receiving fresh content from others.
10 10
11The event MUST include a list of `r` tags with relay URIs and a `read` or `write` marker. If the marker is omitted, the relay is used for both purposes. 11The event MUST include a list of `r` tags with relay URIs and a `read` or `write` marker. Relays marked as `read` / `write` are called READ / WRITE relays, respectively. If the marker is omitted, the relay is used for both purposes.
12 12
13The `.content` is not used. 13The `.content` is not used.
14 14
@@ -23,26 +23,27 @@ The `.content` is not used.
23 ], 23 ],
24 "content": "", 24 "content": "",
25 ...other fields 25 ...other fields
26}
26``` 27```
27 28
28This NIP doesn't fully replace relay lists that are designed to configure a client's usage of relays (such as `kind:3` style relay lists). Clients MAY use other relay lists in situations where a `kind:10002` relay list cannot be found. 29This NIP doesn't fully replace relay lists that are designed to configure a client's usage of relays (such as `kind:3` style relay lists). Clients MAY use other relay lists in situations where a `kind:10002` relay list cannot be found.
29 30
30## When to Use Read and Write 31## When to Use Read and Write Relays
31 32
32When seeking events **from** a user, Clients SHOULD use the WRITE relays of the user's `kind:10002` 33When seeking events **from** a user, Clients SHOULD use the WRITE relays of the user's `kind:10002`.
33 34
34When seeking events **about** a user, where the user was tagged, Clients SHOULD use the READ relays of the user's `kind:10002` 35When seeking events **about** a user, where the user was tagged, Clients SHOULD use the READ relays of the user's `kind:10002`.
35 36
36When broadcasting an event, Clients SHOULD: 37When broadcasting an event, Clients SHOULD:
37 38
38- Broadcast the event to the WRITE relays of the author 39- Broadcast the event to the WRITE relays of the author
39- Broadcast the event all READ relays of each tagged user. 40- Broadcast the event all READ relays of each tagged user
40 41
41## Motivation 42## Motivation
42 43
43The old model of using a fixed relay list per user centralizes in large relay operators: 44The old model of using a fixed relay list per user centralizes in large relay operators:
44 45
45 - Most users submit their posts to the same highly popular relays, aiming to achieve greater visibility among a broader audience. 46 - Most users submit their posts to the same highly popular relays, aiming to achieve greater visibility among a broader audience
46 - Many users are pulling events from a large number of relays in order to get more data at the expense of duplication 47 - Many users are pulling events from a large number of relays in order to get more data at the expense of duplication
47 - Events are being copied between relays, oftentimes to many different relays 48 - Events are being copied between relays, oftentimes to many different relays
48 49
@@ -52,7 +53,7 @@ This NIP allows Clients to connect directly with the most up-to-date relay set f
52 53
531. Clients SHOULD guide users to keep `kind:10002` lists small (2-4 relays). 541. Clients SHOULD guide users to keep `kind:10002` lists small (2-4 relays).
54 55
552. Clients SHOULD spread an author's `kind:10002` events to as many relays as viable. 562. Clients SHOULD spread an author's `kind:10002` event to as many relays as viable.
56 57
573. `kind:10002` events should primarily be used to advertise the user's preferred relays to others. A user's own client may use other heuristics for selecting relays for fetching data. 583. `kind:10002` events should primarily be used to advertise the user's preferred relays to others. A user's own client may use other heuristics for selecting relays for fetching data.
58 59
diff --git a/72.md b/72.md
index 599a4c4..c0fffff 100644
--- a/72.md
+++ b/72.md
@@ -4,22 +4,20 @@ NIP-72
4Moderated Communities (Reddit Style) 4Moderated Communities (Reddit Style)
5------------------------------------ 5------------------------------------
6 6
7`draft` `optional` `author:vitorpamplona` `author:arthurfranca` 7`draft` `optional`
8 8
9The goal of this NIP is to create moderator-approved public communities around a topic. It defines the replaceable event `kind:34550` to define the community and the current list of moderators/administrators. Users that want to post into the community, simply tag any Nostr event with the community's `a` tag. Moderators issue an approval event `kind:4550` that links the community with the new post. 9The goal of this NIP is to create moderator-approved public communities around a topic. It defines the replaceable event `kind:34550` to define the community and the current list of moderators/administrators. Users that want to post into the community, simply tag any Nostr event with the community's `a` tag. Moderators issue an approval event `kind:4550` that links the community with the new post.
10 10
11# Community Definition 11# Community Definition
12 12
13`Kind:34550` SHOULD include any field that helps define the community and the set of moderators. `relay` tags MAY be used to describe the preferred relay to download requests and approvals. 13`kind:34550` SHOULD include any field that helps define the community and the set of moderators. `relay` tags MAY be used to describe the preferred relay to download requests and approvals.
14 14
15```json 15```json
16{ 16{
17 "id": "<32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>",
18 "pubkey": "<32-bytes lowercase hex-encoded public key of the event creator>",
19 "created_at": <Unix timestamp in seconds>, 17 "created_at": <Unix timestamp in seconds>,
20 "kind": 34550, 18 "kind": 34550,
21 "tags": [ 19 "tags": [
22 ["d", "<Community name>"], 20 ["d", "<community-d-identifier>"],
23 ["description", "<Community description>"], 21 ["description", "<Community description>"],
24 ["image", "<Community image url>", "<Width>x<Height>"], 22 ["image", "<Community image url>", "<Width>x<Height>"],
25 23
@@ -35,24 +33,23 @@ The goal of this NIP is to create moderator-approved public communities around a
35 ["relay", "<relay where to send and receive requests>", "requests"], 33 ["relay", "<relay where to send and receive requests>", "requests"],
36 ["relay", "<relay where to send and receive approvals>", "approvals"], 34 ["relay", "<relay where to send and receive approvals>", "approvals"],
37 ["relay", "<relay where to post requests to and fetch approvals from>"] 35 ["relay", "<relay where to post requests to and fetch approvals from>"]
38 ] 36 ],
37 ...
39} 38}
40``` 39```
41 40
42# New Post Request 41# New Post Request
43 42
44Any Nostr event can be a post request. Clients MUST add the community's `a` tag to the new post event in order to be presented for the moderator's approval. 43Any Nostr event can be submitted to a community by anyone for approval. Clients MUST add the community's `a` tag to the new post event in order to be presented for the moderator's approval.
45 44
46```json 45```json
47{ 46{
48 "id": "<32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>",
49 "pubkey": "<32-bytes lowercase hex-encoded public key of the event creator>",
50 "created_at": <Unix timestamp in seconds>,
51 "kind": 1, 47 "kind": 1,
52 "tags": [ 48 "tags": [
53 ["a", "34550:<Community event author pubkey>:<d-identifier of the community>", "<Optional relay url>"], 49 ["a", "34550:<community event author pubkey>:<community-d-identifier>", "<optional-relay-url>"],
54 ], 50 ],
55 "content": "<My content>" 51 "content": "hello world",
52 ...
56} 53}
57``` 54```
58 55
@@ -64,17 +61,16 @@ The post-approval event MUST include `a` tags of the communities the moderator i
64 61
65```json 62```json
66{ 63{
67 "id": "<32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>",
68 "pubkey": "<32-bytes lowercase hex-encoded public key of the event creator>", 64 "pubkey": "<32-bytes lowercase hex-encoded public key of the event creator>",
69 "created_at": <Unix timestamp in seconds>,
70 "kind": 4550, 65 "kind": 4550,
71 "tags": [ 66 "tags": [
72 ["a", "34550:<Community event author pubkey>:<d-identifier of the community>", "<Optional relay url>"], 67 ["a", "34550:<event-author-pubkey>:<community-d-identifier>", "<optional-relay-url>"],
73 ["e", "<Post Request ID>", "<Optional relay url>"], 68 ["e", "<post-id>", "<optional-relay-url>"],
74 ["p", "<Post Request Author ID>", "<Optional relay url>"], 69 ["p", "<port-author-pubkey>", "<optional-relay-url>"],
75 ["k", "<New Post Request kind>"], 70 ["k", "<post-request-kind>"]
76 ], 71 ],
77 "content": "<New Post Request JSON>" 72 "content": "<the full approved event, JSON-encoded>",
73 ...
78} 74}
79``` 75```
80 76
@@ -90,12 +86,16 @@ Community clients SHOULD display posts that have been approved by at least 1 mod
90 86
91The following filter displays the approved posts. 87The following filter displays the approved posts.
92 88
93```js 89```json
94{ 90[
95 "authors": ["<Author pubkey>", "<Moderator1 pubkey>", "<Moderator2 pubkey>", "<Moderator3 pubkey>", ...], 91 "REQ",
96 "kinds": [4550], 92 "_",
97 "#a": ["34550:<Community event author pubkey>:<d-identifier of the community>"], 93 {
98} 94 "authors": ["<owner-pubkey>", "<moderator1-pubkey>", "<moderator2-pubkey>", "<moderator3-pubkey>", ...],
95 "kinds": [4550],
96 "#a": ["34550:<Community event author pubkey>:<d-identifier of the community>"],
97 }
98]
99``` 99```
100 100
101Clients MAY hide approvals by blocked moderators at the user's request. 101Clients MAY hide approvals by blocked moderators at the user's request.
diff --git a/75.md b/75.md
index 6c8cb7b..f3cf5d0 100644
--- a/75.md
+++ b/75.md
@@ -1,8 +1,10 @@
1# NIP-75 1NIP-75
2======
2 3
3## Zap Goals 4Zap Goals
5---------
4 6
5`draft` `optional` `author:verbiricha` 7`draft` `optional`
6 8
7This NIP defines an event for creating fundraising goals. Users can contribute funds towards the goal by zapping the goal event. 9This NIP defines an event for creating fundraising goals. Users can contribute funds towards the goal by zapping the goal event.
8 10
@@ -27,7 +29,7 @@ Example event:
27 ["amount", "210000"], 29 ["amount", "210000"],
28 ], 30 ],
29 "content": "Nostrasia travel expenses", 31 "content": "Nostrasia travel expenses",
30 ...other fields 32 ...
31``` 33```
32 34
33The following tags are OPTIONAL. 35The following tags are OPTIONAL.
@@ -43,7 +45,8 @@ The following tags are OPTIONAL.
43 ["closed_at", "<unix timestamp in seconds>"], 45 ["closed_at", "<unix timestamp in seconds>"],
44 ], 46 ],
45 "content": "Nostrasia travel expenses", 47 "content": "Nostrasia travel expenses",
46 ...other fields 48 ...
49}
47``` 50```
48 51
49The goal MAY include an `r` or `a` tag linking to a URL or parameterized replaceable event. 52The goal MAY include an `r` or `a` tag linking to a URL or parameterized replaceable event.
@@ -54,12 +57,14 @@ Parameterized replaceable events can link to a goal by using a `goal` tag specif
54 57
55```json 58```json
56{ 59{
57 "kind": 3XXXX, 60 ...
61 "kind": 3xxxx,
58 "tags": [ 62 "tags": [
59 ... 63 ...
60 ["goal", "<event id>", "<Relay URL (optional)>"], 64 ["goal", "<event id>", "<Relay URL (optional)>"],
61 ], 65 ],
62 ...other fields 66 ...
67}
63``` 68```
64 69
65## Client behavior 70## Client behavior
diff --git a/78.md b/78.md
index 10ff535..0f2fada 100644
--- a/78.md
+++ b/78.md
@@ -4,7 +4,7 @@ NIP-78
4Arbitrary custom app data 4Arbitrary custom app data
5------------------------- 5-------------------------
6 6
7`draft` `optional` `author:sandwich` `author:fiatjaf` 7`draft` `optional`
8 8
9The goal of this NIP is to enable [remoteStorage](https://remotestorage.io/)-like capabilities for custom applications that do not care about interoperability. 9The goal of this NIP is to enable [remoteStorage](https://remotestorage.io/)-like capabilities for custom applications that do not care about interoperability.
10 10
diff --git a/84.md b/84.md
new file mode 100644
index 0000000..d5f54d4
--- /dev/null
+++ b/84.md
@@ -0,0 +1,42 @@
1NIP-84
2======
3
4Highlights
5----------
6
7`draft` `optional`
8
9This NIP defines `kind:9802`, a "highlight" event, to signal content a user finds valuable.
10
11## Format
12The `.content` of these events is the highlighted portion of the text.
13
14`.content` might be empty for highlights of non-text based media (e.g. NIP-94 audio/video).
15
16### References
17Events SHOULD tag the source of the highlight, whether nostr-native or not.
18`a` or `e` tags should be used for nostr events and `r` tags for URLs.
19
20When tagging a URL, clients generating these events SHOULD do a best effort of cleaning the URL from trackers
21or obvious non-useful information from the query string.
22
23### Attribution
24Clients MAY include one or more `p` tags, tagging the original authors of the material being highlighted; this is particularly
25useful when highlighting non-nostr content for which the client might be able to get a nostr pubkey somehow
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.
28
29```json
30{
31 "tags": [
32 ["p", "<pubkey-hex>", "<relay-url>", "author"],
33 ["p", "<pubkey-hex>", "<relay-url>", "author"],
34 ["p", "<pubkey-hex>", "<relay-url>", "editor"]
35 ],
36 ...
37}
38```
39
40### Context
41Clients MAY include a `context` tag, useful when the highlight is a subset of a paragraph and displaying the
42surrounding content might be beneficial to give context to the highlight.
diff --git a/89.md b/89.md
index 4503ecf..be3d075 100644
--- a/89.md
+++ b/89.md
@@ -4,15 +4,17 @@ NIP-89
4Recommended Application Handlers 4Recommended Application Handlers
5-------------------------------- 5--------------------------------
6 6
7`draft` `optional` `author:pablof7z` 7`draft` `optional`
8 8
9This NIP describes `kind:31989` and `kind:31990`: a way to discover applications that can handle unknown event-kinds. 9This NIP describes `kind:31989` and `kind:31990`: a way to discover applications that can handle unknown event-kinds.
10 10
11## Rationale 11## Rationale
12
12Nostr's discoverability and transparent event interaction is one of its most interesting/novel mechanics. 13Nostr's discoverability and transparent event interaction is one of its most interesting/novel mechanics.
13This NIP provides a simple way for clients to discover applications that handle events of a specific kind to ensure smooth cross-client and cross-kind interactions. 14This NIP provides a simple way for clients to discover applications that handle events of a specific kind to ensure smooth cross-client and cross-kind interactions.
14 15
15### Parties involved 16### Parties involved
17
16There are three actors to this workflow: 18There are three actors to this workflow:
17 19
18* application that handles a specific event kind (note that an application doesn't necessarily need to be a distinct entity and it could just be the same pubkey as user A) 20* application that handles a specific event kind (note that an application doesn't necessarily need to be a distinct entity and it could just be the same pubkey as user A)
@@ -22,18 +24,18 @@ There are three actors to this workflow:
22* user B, who seeks a recommendation for an app that handles a specific event kind 24* user B, who seeks a recommendation for an app that handles a specific event kind
23 * Queries for `kind:31989` and, based on results, queries for `kind:31990` 25 * Queries for `kind:31989` and, based on results, queries for `kind:31990`
24 26
25# Events 27## Events
26 28
27## Recommendation event 29### Recommendation event
28```json 30```json
29{ 31{
30 "kind": 31989, 32 "kind": 31989,
31 "pubkey": <recommender-user-pubkey>, 33 "pubkey": <recommender-user-pubkey>,
32 "tags": [ 34 "tags": [
33 [ "d", <supported-event-kind> ], 35 ["d", <supported-event-kind>],
34 [ "a", "31990:app1-pubkey:<d-identifier>", "wss://relay1", "ios" ], 36 ["a", "31990:app1-pubkey:<d-identifier>", "wss://relay1", "ios"],
35 [ "a", "31990:app2-pubkey:<d-identifier>", "wss://relay2", "web" ] 37 ["a", "31990:app2-pubkey:<d-identifier>", "wss://relay2", "web"]
36 ] 38 ]
37} 39}
38``` 40```
39 41
@@ -47,70 +49,83 @@ The third value of the tag SHOULD be the platform where this recommendation migh
47## Handler information 49## Handler information
48```json 50```json
49{ 51{
50 "kind": 31990, 52 "kind": 31990,
51 "pubkey": <pubkey>, 53 "pubkey": "<application-pubkey>",
52 "content": "<optional-kind:0-style-metadata>", 54 "content": "<optional-kind:0-style-metadata>",
53 "tags": [ 55 "tags": [
54 [ "d", <random-id> ], 56 ["d", <random-id>],
55 [ "k", <supported-event-kind> ], 57 ["k", <supported-event-kind>],
56 [ "web", "https://..../a/<bech32>", "nevent" ], 58 ["web", "https://..../a/<bech32>", "nevent"],
57 [ "web", "https://..../p/<bech32>", "nprofile" ], 59 ["web", "https://..../p/<bech32>", "nprofile"],
58 [ "web", "https://..../e/<bech32>" ], 60 ["web", "https://..../e/<bech32>"],
59 [ "ios", ".../<bech32>" ] 61 ["ios", ".../<bech32>"]
60 ] 62 ]
61} 63}
62``` 64```
63 65
64* `content` is an optional `metadata`-like stringified JSON object, as described in NIP-01. This content is useful when the pubkey creating the `kind:31990` is not an application. If `content` is empty, the `kind:0` of the pubkey should be used to display application information (e.g. name, picture, web, LUD16, etc.) 66* `content` is an optional `metadata`-like stringified JSON object, as described in NIP-01. This content is useful when the pubkey creating the `kind:31990` is not an application. If `content` is empty, the `kind:0` of the pubkey should be used to display application information (e.g. name, picture, web, LUD16, etc.)
65
66* `k` tags' value is the event kind that is supported by this `kind:31990`. 67* `k` tags' value is the event kind that is supported by this `kind:31990`.
67Using a `k` tag(s) (instead of having the kind onf the NIP-33 `d` tag) provides: 68Using a `k` tag(s) (instead of having the kind onf the NIP-33 `d` tag) provides:
68 * Multiple `k` tags can exist in the same event if the application supports more than one event kind and their handler URLs are the same. 69 * Multiple `k` tags can exist in the same event if the application supports more than one event kind and their handler URLs are the same.
69 * The same pubkey can have multiple events with different apps that handle the same event kind. 70 * The same pubkey can have multiple events with different apps that handle the same event kind.
70
71* `bech32` in a URL MUST be replaced by clients with the NIP-19-encoded entity that should be loaded by the application. 71* `bech32` in a URL MUST be replaced by clients with the NIP-19-encoded entity that should be loaded by the application.
72 72
73Multiple tags might be registered by the app, following NIP-19 nomenclature as the second value of the array. 73Multiple tags might be registered by the app, following NIP-19 nomenclature as the second value of the array.
74 74
75A tag without a second value in the array SHOULD be considered a generic handler for any NIP-19 entity that is not handled by a different tag. 75A tag without a second value in the array SHOULD be considered a generic handler for any NIP-19 entity that is not handled by a different tag.
76 76
77# User flow 77## Client tag
78When publishing events, clients MAY include a `client` tag in the same format as the recommendation event's `a` tags. This has privacy implications for users, so clients SHOULD allow users to opt-out of using this tag.
79
80```json
81{
82 "kind": 1,
83 "tags": [
84 ["client", "31990:app1-pubkey:<d-identifier>", "wss://relay1", "ios"]
85 ]
86 ...
87}
88```
89
90## User flow
78A user A who uses a non-`kind:1`-centric nostr app could choose to announce/recommend a certain kind-handler application. 91A user A who uses a non-`kind:1`-centric nostr app could choose to announce/recommend a certain kind-handler application.
79 92
80When user B sees an unknown event kind, e.g. in a social-media centric nostr client, the client would allow user B to interact with the unknown-kind event (e.g. tapping on it). 93When user B sees an unknown event kind, e.g. in a social-media centric nostr client, the client would allow user B to interact with the unknown-kind event (e.g. tapping on it).
81 94
82The client MIGHT query for the user's and the user's follows handler. 95The client MIGHT query for the user's and the user's follows handler.
83 96
84# Example 97## Example
85 98
86## User A recommends a `kind:31337`-handler 99### User A recommends a `kind:31337`-handler
87User 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. 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.
88 101
89```json 102```json
90{ 103{
91 "kind": 31989, 104 "kind": 31989,
92 "tags": [ 105 "tags": [
93 [ "d", "31337" ], 106 ["d", "31337"],
94 [ "a", "31990:1743058db7078661b94aaf4286429d97ee5257d14a86d6bfa54cb0482b876fb0:abcd", <relay-url>, "web" ] 107 ["a", "31990:1743058db7078661b94aaf4286429d97ee5257d14a86d6bfa54cb0482b876fb0:abcd", <relay-url>, "web"]
95 ] 108 ],
109 ...
96} 110}
97``` 111```
98 112
99## User B interacts with a `kind:31337`-handler 113### User B interacts with a `kind:31337`-handler
100User B might see in their timeline an event referring to a `kind:31337` event 114User B might see in their timeline an event referring to a `kind:31337` event (e.g. a `kind:1` tagging a `kind:31337`).
101(e.g. a `kind:1` tagging a `kind:31337`).
102 115
103User B's client, not knowing how to handle a `kind:31337` might display the event 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`:
104using its `alt` tag (as described in NIP-31). When the user clicks on the event,
105the application queries for a handler for this `kind`:
106 117
107`["REQ", <id>, '[{ "kinds": [31989], "#d": ["31337"], 'authors': [<user>, <users-contact-list>] }]']` 118```json
119["REQ", <id>, '[{ "kinds": [31989], "#d": ["31337"], 'authors': [<user>, <users-contact-list>] }]']
120```
108 121
109User B, who follows User A, sees that `kind:31989` event and fetches the `a`-tagged event for the app and handler information. 122User B, who follows User A, sees that `kind:31989` event and fetches the `a`-tagged event for the app and handler information.
110 123
111User B's client sees the application's `kind:31990` which includes the information to redirect the user to the relevant URL with the desired entity replaced in the URL. 124User B's client sees the application's `kind:31990` which includes the information to redirect the user to the relevant URL with the desired entity replaced in the URL.
112 125
113## Alternative query bypassing `kind:31989` 126### Alternative query bypassing `kind:31989`
114Alternatively, users might choose to query directly for `kind:31990` for an event kind. Clients SHOULD be careful doing this and use spam-prevention mechanisms to avoid directing users to malicious handlers. 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.
115 128
116`["REQ", <id>, '[{ "kinds": [31990], "#k": [<desired-event-kind>], 'authors': [...] }]']` \ No newline at end of file 129```json
130["REQ", <id>, '[{ "kinds": [31990], "#k": [<desired-event-kind>], 'authors': [...] }]']
131```
diff --git a/90.md b/90.md
index 163dbd0..6017c98 100644
--- a/90.md
+++ b/90.md
@@ -4,7 +4,7 @@ NIP-90
4Data Vending Machine 4Data Vending Machine
5-------------------- 5--------------------
6 6
7`draft` `optional` `author:pablof7z` `author:dontbelievethehype` 7`draft` `optional`
8 8
9This NIP defines the interaction between customers and Service Providers for performing on-demand computation. 9This NIP defines the interaction between customers and Service Providers for performing on-demand computation.
10 10
@@ -13,11 +13,11 @@ Money in, data out.
13## Kinds 13## Kinds
14This NIP reserves the range `5000-7000` for data vending machine use. 14This NIP reserves the range `5000-7000` for data vending machine use.
15 15
16| Kind | Description | 16| Kind | Description |
17| ---- | ----------- | 17| ---- | ----------- |
18| 5000-5999 | Job request kinds | 18| 5000-5999 | Job request kinds |
19| 6000-6999 | Job result | 19| 6000-6999 | Job result |
20| 7000 | Job feedback | 20| 7000 | Job feedback |
21 21
22Job results always use a kind number that is `1000` higher than the job request kind. (e.g. request: `kind:5001` gets a result: `kind:6001`). 22Job results always use a kind number that is `1000` higher than the job request kind. (e.g. request: `kind:5001` gets a result: `kind:6001`).
23 23
@@ -67,22 +67,54 @@ All tags are optional.
67* `relays`: List of relays where Service Providers SHOULD publish responses to 67* `relays`: List of relays where Service Providers SHOULD publish responses to
68* `p`: Service Providers the customer is interested in. Other SPs MIGHT still choose to process the job 68* `p`: Service Providers the customer is interested in. Other SPs MIGHT still choose to process the job
69 69
70## Encrypted Params
71
72If the user wants to keep the input parameters a secret, they can encrypt the `i` and `param` tags with the service provider's 'p' tag and add it to the content field. Add a tag `encrypted` as tags. Encryption for private tags will use [NIP-04 - Encrypted Direct Message encryption](https://github.com/nostr-protocol/nips/blob/master/04.md), using the user's private and service provider's public key for the shared secret
73
74```json
75[
76 ["i", "what is the capital of France? ", "text"],
77 ["param", "model", "LLaMA-2"],
78 ["param", "max_tokens", "512"],
79 ["param", "temperature", "0.5"],
80 ["param", "top-k", "50"],
81 ["param", "top-p", "0.7"],
82 ["param", "frequency_penalty", "1"]
83]
84
85```
86
87This param data will be encrypted and added to the `content` field and `p` tag should be present
88
89```json
90{
91 "content": "BE2Y4xvS6HIY7TozIgbEl3sAHkdZoXyLRRkZv4fLPh3R7LtviLKAJM5qpkC7D6VtMbgIt4iNcMpLtpo...",
92 "tags": [
93 ["p", "04f74530a6ede6b24731b976b8e78fb449ea61f40ff10e3d869a3030c4edc91f"],
94 ["encrypted"]
95 ],
96 ...
97}
98```
99
100
70## Job result (`kind:6000-6999`) 101## Job result (`kind:6000-6999`)
71 102
72Service 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.
73 104
74```json 105```json
75{ 106{
76 "pubkey": "<service-provider pubkey>", 107 "pubkey": "<service-provider pubkey>",
77 "content": "<payload>", 108 "content": "<payload>",
78 "kind": 6xxx, 109 "kind": 6xxx,
79 "tags": [ 110 "tags": [
80 [ "request", "<job-request>" ], 111 ["request", "<job-request>"],
81 [ "e", "<job-request-id>", "<relay-hint>" ], 112 ["e", "<job-request-id>", "<relay-hint>"],
82 [ "i", "<input-data>" ], 113 ["i", "<input-data>"],
83 [ "p", "<customer's-pubkey>" ], 114 ["p", "<customer's-pubkey>"],
84 [ "amount", "requested-payment-amount", "<optional-bolt11>" ] 115 ["amount", "requested-payment-amount", "<optional-bolt11>"]
85 ] 116 ],
117 ...
86} 118}
87``` 119```
88 120
@@ -90,19 +122,42 @@ Service providers publish job results, providing the output of the job result. T
90* `amount`: millisats that the Service Provider is requesting to be paid. An optional third value can be a bolt11 invoice. 122* `amount`: millisats that the Service Provider is requesting to be paid. An optional third value can be a bolt11 invoice.
91* `i`: The original input(s) specified in the request. 123* `i`: The original input(s) specified in the request.
92 124
125## Encrypted Output
126
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`
129
130```json
131{
132 "pubkey": "<service-provider pubkey>",
133 "content": "<encrypted payload>",
134 "kind": 6xxx,
135 "tags": [
136 ["request", "<job-request>"],
137 ["e", "<job-request-id>", "<relay-hint>"],
138 ["p", "<customer's-pubkey>"],
139 ["amount", "requested-payment-amount", "<optional-bolt11>"],
140 ["encrypted"]
141 ],
142 ...
143}
144```
145
93## Job feedback 146## Job feedback
147
94Service providers can give feedback about a job back to the customer. 148Service providers can give feedback about a job back to the customer.
95 149
96```json 150```json
97{ 151{
98 "kind": 7000, 152 "kind": 7000,
99 "content": "<empty-or-payload>", 153 "content": "<empty-or-payload>",
100 "tags": [ 154 "tags": [
101 [ "status", "<status>", "<extra-info>" ], 155 ["status", "<status>", "<extra-info>"],
102 [ "amount", "requested-payment-amount", "<bolt11>" ], 156 ["amount", "requested-payment-amount", "<bolt11>"],
103 [ "e", "<job-request-id>", "<relay-hint>" ], 157 ["e", "<job-request-id>", "<relay-hint>"],
104 [ "p", "<customer's-pubkey>" ], 158 ["p", "<customer's-pubkey>"],
105 ] 159 ],
160 ...
106} 161}
107``` 162```
108 163
@@ -110,20 +165,23 @@ Service providers can give feedback about a job back to the customer.
110* `amount` tag: as defined in the [Job Result](#job-result) section. 165* `amount` tag: as defined in the [Job Result](#job-result) section.
111* `status` tag: Service Providers SHOULD indicate what this feedback status refers to. [Appendix 1](#appendix-1-job-feedback-status) defines status. Extra human-readable information can be added as an extra argument. 166* `status` tag: Service Providers SHOULD indicate what this feedback status refers to. [Appendix 1](#appendix-1-job-feedback-status) defines status. Extra human-readable information can be added as an extra argument.
112 167
168* NOTE: If the input params requires input to be encrypted, then `content` field will have encrypted payload with `p` tag as key.
169
113### Job feedback status 170### Job feedback status
114 171
115| status | description | 172| status | description |
116|--------|-------------| 173| -------- | ------------- |
117| `payment-required` | Service Provider requires payment before continuing. | 174| `payment-required` | Service Provider requires payment before continuing. |
118| `processing` | Service Provider is processing the job. | 175| `processing` | Service Provider is processing the job. |
119| `error` | Service Provider was unable to process the job. | 176| `error` | Service Provider was unable to process the job. |
120| `success` | Service Provider successfully processed the job. | 177| `success` | Service Provider successfully processed the job. |
121| `partial` | Service Provider partially processed the job. The `.content` might include a sample of the partial results. | 178| `partial` | Service Provider partially processed the job. The `.content` might include a sample of the partial results. |
122 179
123Any job feedback event MIGHT include results in the `.content` field, as described in the [Job Result](#job-result) section. This is useful for service providers to provide a sample of the results that have been processed so far. 180Any job feedback event MIGHT include results in the `.content` field, as described in the [Job Result](#job-result) section. This is useful for service providers to provide a sample of the results that have been processed so far.
124 181
125 182
126# Protocol Flow 183# Protocol Flow
184
127* Customer publishes a job request (e.g. `kind:5000` speech-to-text). 185* Customer publishes a job request (e.g. `kind:5000` speech-to-text).
128* Service Providers MAY submit `kind:7000` job-feedback events (e.g. `payment-required`, `processing`, `error`, etc.). 186* Service Providers MAY submit `kind:7000` job-feedback events (e.g. `payment-required`, `processing`, `error`, etc.).
129* Upon completion, the service provider publishes the result of the job with a `kind:6000` job-result event. 187* Upon completion, the service provider publishes the result of the job with a `kind:6000` job-result event.
@@ -153,18 +211,19 @@ This gives a higher level of flexibility to service providers (which sophisticat
153# Appendix 2: Service provider discoverability 211# Appendix 2: Service provider discoverability
154Service 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:
155 213
156```json 214```js
157{ 215{
158 "kind": 31990, 216 "kind": 31990,
159 "pubkey": "<pubkey>", 217 "pubkey": "<pubkey>",
160 "content": "{ 218 "content": "{
161 \"name\": \"Translating DVM\", 219 \"name\": \"Translating DVM\",
162 \"about\": \"I'm a DVM specialized in translating Bitcoin content.\" 220 \"about\": \"I'm a DVM specialized in translating Bitcoin content.\"
163 }", 221 }",
164 "tags": [ 222 "tags": [
165 [ "k", "5005" ], // e.g. translation 223 ["k", "5005"], // e.g. translation
166 [ "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"
167 ] 225 ],
226 ...
168} 227}
169``` 228```
170 229
diff --git a/94.md b/94.md
index c5e0f18..95b6a3b 100644
--- a/94.md
+++ b/94.md
@@ -4,7 +4,7 @@ NIP-94
4File Metadata 4File Metadata
5------------- 5-------------
6 6
7`draft` `optional` `author:frbitten` `author:kieran` `author:lovvtide` `author:fiatjaf` `author:staab` 7`draft` `optional`
8 8
9The purpose of this NIP is to allow an organization and classification of shared files. So that relays can filter and organize in any way that is of interest. With that, multiple types of filesharing clients can be created. NIP-94 support is not expected to be implemented by "social" clients that deal with kind:1 notes or by longform clients that deal with kind:30023 articles. 9The purpose of this NIP is to allow an organization and classification of shared files. So that relays can filter and organize in any way that is of interest. With that, multiple types of filesharing clients can be created. NIP-94 support is not expected to be implemented by "social" clients that deal with kind:1 notes or by longform clients that deal with kind:30023 articles.
10 10
@@ -28,9 +28,6 @@ This NIP specifies the use of the `1063` event type, having in `content` a descr
28 28
29```json 29```json
30{ 30{
31 "id": <32-bytes lowercase hex-encoded sha256 of the the serialized event data>,
32 "pubkey": <32-bytes lowercase hex-encoded public key of the event creator>,
33 "created_at": <unix timestamp in seconds>,
34 "kind": 1063, 31 "kind": 1063,
35 "tags": [ 32 "tags": [
36 ["url",<string with URI of file>], 33 ["url",<string with URI of file>],
@@ -47,8 +44,8 @@ This NIP specifies the use of the `1063` event type, having in `content` a descr
47 ["summary", <excerpt>], 44 ["summary", <excerpt>],
48 ["alt", <description>] 45 ["alt", <description>]
49 ], 46 ],
50 "content": <caption>, 47 "content": "<caption>",
51 "sig": <64-bytes hex of the signature of the sha256 hash of the serialized event data, which is the same as the "id" field> 48 ...
52} 49}
53``` 50```
54 51
diff --git a/98.md b/98.md
index c8cba0f..ca52304 100644
--- a/98.md
+++ b/98.md
@@ -2,9 +2,9 @@ NIP-98
2====== 2======
3 3
4HTTP Auth 4HTTP Auth
5------------------------- 5---------
6 6
7`draft` `optional` `author:kieran` `author:melvincarvalho` 7`draft` `optional`
8 8
9This NIP defines an ephemeral event used to authorize requests to HTTP servers using nostr events. 9This NIP defines an ephemeral event used to authorize requests to HTTP servers using nostr events.
10 10
@@ -24,22 +24,16 @@ The following tags MUST be included.
24Example event: 24Example event:
25```json 25```json
26{ 26{
27 "id": "fe964e758903360f28d8424d092da8494ed207cba823110be3a57dfe4b578734", 27 "id": "fe964e758903360f28d8424d092da8494ed207cba823110be3a57dfe4b578734",
28 "pubkey": "63fe6318dc58583cfe16810f86dd09e18bfd76aabc24a0081ce2856f330504ed", 28 "pubkey": "63fe6318dc58583cfe16810f86dd09e18bfd76aabc24a0081ce2856f330504ed",
29 "content": "", 29 "content": "",
30 "kind": 27235, 30 "kind": 27235,
31 "created_at": 1682327852, 31 "created_at": 1682327852,
32 "tags": [ 32 "tags": [
33 [ 33 ["u", "https://api.snort.social/api/v1/n5sp/list"],
34 "u", 34 ["method", "GET"]
35 "https://api.snort.social/api/v1/n5sp/list" 35 ],
36 ], 36 "sig": "5ed9d8ec958bc854f997bdc24ac337d005af372324747efe4a00e24f4c30437ff4dd8308684bed467d9d6be3e5a517bb43b1732cc7d33949a3aaf86705c22184"
37 [
38 "method",
39 "GET"
40 ]
41 ],
42 "sig": "5ed9d8ec958bc854f997bdc24ac337d005af372324747efe4a00e24f4c30437ff4dd8308684bed467d9d6be3e5a517bb43b1732cc7d33949a3aaf86705c22184"
43} 37}
44``` 38```
45 39
diff --git a/99.md b/99.md
index 274e5af..e65920c 100644
--- a/99.md
+++ b/99.md
@@ -1,8 +1,10 @@
1# NIP-99 1NIP-99
2======
2 3
3## Classified Listings 4Classified Listings
5-------------------
4 6
5`draft` `optional` `author:erskingardner` 7`draft` `optional`
6 8
7This NIP defines `kind:30402`: a parameterized replaceable event to describe classified listings that list any arbitrary product, service, or other thing for sale or offer and includes enough structured metadata to make them useful. 9This NIP defines `kind:30402`: a parameterized replaceable event to describe classified listings that list any arbitrary product, service, or other thing for sale or offer and includes enough structured metadata to make them useful.
8 10
diff --git a/README.md b/README.md
index 86af5de..bf58538 100644
--- a/README.md
+++ b/README.md
@@ -1,18 +1,20 @@
1# NIPs 1# NIPs
2 2
3NIPs stand for **Nostr Implementation Possibilities**. 3NIPs stand for **Nostr Implementation Possibilities**.
4
4They exist to document what may be implemented by [Nostr](https://github.com/nostr-protocol/nostr)-compatible _relay_ and _client_ software. 5They exist to document what may be implemented by [Nostr](https://github.com/nostr-protocol/nostr)-compatible _relay_ and _client_ software.
5 6
6--- 7---
7 8
8- [List](#list) 9- [List](#list)
9- [Event Kinds](#event-kinds) 10- [Event Kinds](#event-kinds)
10 - [Event Kind Ranges](#event-kind-ranges)
11- [Message Types](#message-types) 11- [Message Types](#message-types)
12 - [Client to Relay](#client-to-relay) 12 - [Client to Relay](#client-to-relay)
13 - [Relay to Client](#relay-to-client) 13 - [Relay to Client](#relay-to-client)
14- [Standardized Tags](#standardized-tags) 14- [Standardized Tags](#standardized-tags)
15- [Criteria for acceptance of NIPs](#criteria-for-acceptance-of-nips) 15- [Criteria for acceptance of NIPs](#criteria-for-acceptance-of-nips)
16- [Is this repository a centralizing factor?](#is-this-repository-a-centralizing-factor)
17- [How this repository works](#how-this-repository-works)
16- [License](#license) 18- [License](#license)
17 19
18--- 20---
@@ -66,6 +68,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
66- [NIP-72: Moderated Communities](72.md) 68- [NIP-72: Moderated Communities](72.md)
67- [NIP-75: Zap Goals](75.md) 69- [NIP-75: Zap Goals](75.md)
68- [NIP-78: Application-specific data](78.md) 70- [NIP-78: Application-specific data](78.md)
71- [NIP-84: Highlights](84.md)
69- [NIP-89: Recommended Application Handlers](89.md) 72- [NIP-89: Recommended Application Handlers](89.md)
70- [NIP-90: Data Vending Machines](90.md) 73- [NIP-90: Data Vending Machines](90.md)
71- [NIP-94: File Metadata](94.md) 74- [NIP-94: File Metadata](94.md)
@@ -73,66 +76,83 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
73- [NIP-99: Classified Listings](99.md) 76- [NIP-99: Classified Listings](99.md)
74 77
75## Event Kinds 78## Event Kinds
79| kind | description | NIP |
80| ------------- | -------------------------- | ----------- |
81| `0` | Metadata | [1](01.md) |
82| `1` | Short Text Note | [1](01.md) |
83| `2` | Recommend Relay | |
84| `3` | Contacts | [2](02.md) |
85| `4` | Encrypted Direct Messages | [4](04.md) |
86| `5` | Event Deletion | [9](09.md) |
87| `6` | Repost | [18](18.md) |
88| `7` | Reaction | [25](25.md) |
89| `8` | Badge Award | [58](58.md) |
90| `16` | Generic Repost | [18](18.md) |
91| `40` | Channel Creation | [28](28.md) |
92| `41` | Channel Metadata | [28](28.md) |
93| `42` | Channel Message | [28](28.md) |
94| `43` | Channel Hide Message | [28](28.md) |
95| `44` | Channel Mute User | [28](28.md) |
96| `1063` | File Metadata | [94](94.md) |
97| `1311` | Live Chat Message | [53](53.md) |
98| `1040` | OpenTimestamps | [03](03.md) |
99| `1971` | Problem Tracker | [nostrocket-1971][nostrocket-1971] |
100| `1984` | Reporting | [56](56.md) |
101| `1985` | Label | [32](32.md) |
102| `4550` | Community Post Approval | [72](72.md) |
103| `5000`-`5999` | Job Request | [90](90.md) |
104| `6000`-`6999` | Job Result | [90](90.md) |
105| `7000` | Job Feedback | [90](90.md) |
106| `7001` | Subscription Start | [88](88.md) |
107| `7002` | Subscription Stop | [88](88.md) |
108| `9041` | Zap Goal | [75](75.md) |
109| `9734` | Zap Request | [57](57.md) |
110| `9735` | Zap | [57](57.md) |
111| `9802` | Highlights | [84](84.md) |
112| `10000` | Mute list | [51](51.md) |
113| `10001` | Pin list | [51](51.md) |
114| `10002` | Relay List Metadata | [65](65.md) |
115| `10003` | Bookmark list | [51](51.md) |
116| `10004` | Communities list | [51](51.md) |
117| `10005` | Public chats list | [51](51.md) |
118| `10006` | Blocked relays list | [51](51.md) |
119| `10007` | Search relays list | [51](51.md) |
120| `10015` | Interests list | [51](51.md) |
121| `10030` | User emoji list | [51](51.md) |
122| `13194` | Wallet Info | [47](47.md) |
123| `22242` | Client Authentication | [42](42.md) |
124| `23194` | Wallet Request | [47](47.md) |
125| `23195` | Wallet Response | [47](47.md) |
126| `24133` | Nostr Connect | [46](46.md) |
127| `27235` | HTTP Auth | [98](98.md) |
128| `30000` | Follow sets | [51](51.md) |
129| `30001` | Generic lists | [51](51.md) |
130| `30002` | Relay sets | [51](51.md) |
131| `30003` | Bookmark sets | [51](51.md) |
132| `30004` | Curation sets | [51](51.md) |
133| `30008` | Profile Badges | [58](58.md) |
134| `30009` | Badge Definition | [58](58.md) |
135| `30015` | Interest sets | [51](51.md) |
136| `30030` | Emoji sets | [51](51.md) |
137| `30017` | Create or update a stall | [15](15.md) |
138| `30018` | Create or update a product | [15](15.md) |
139| `30023` | Long-form Content | [23](23.md) |
140| `30024` | Draft Long-form Content | [23](23.md) |
141| `30078` | Application-specific Data | [78](78.md) |
142| `30311` | Live Event | [53](53.md) |
143| `30315` | User Statuses | [38](38.md) |
144| `30402` | Classified Listing | [99](99.md) |
145| `30403` | Draft Classified Listing | [99](99.md) |
146| `31922` | Date-Based Calendar Event | [52](52.md) |
147| `31923` | Time-Based Calendar Event | [52](52.md) |
148| `31924` | Calendar | [52](52.md) |
149| `31925` | Calendar Event RSVP | [52](52.md) |
150| `31989` | Handler recommendation | [89](89.md) |
151| `31990` | Handler information | [89](89.md) |
152| `34550` | Community Definition | [72](72.md) |
153| `37001` | Subscription Tier | [88](88.md) |
76 154
77| kind | description | NIP | 155[nostrocket-1971]: https://github.com/nostrocket/NIPS/blob/main/Problems.md
78| ------- | -------------------------- | ----------- |
79| `0` | Metadata | [1](01.md) |
80| `1` | Short Text Note | [1](01.md) |
81| `2` | Recommend Relay | |
82| `3` | Contacts | [2](02.md) |
83| `4` | Encrypted Direct Messages | [4](04.md) |
84| `5` | Event Deletion | [9](09.md) |
85| `6` | Repost | [18](18.md) |
86| `7` | Reaction | [25](25.md) |
87| `8` | Badge Award | [58](58.md) |
88| `16` | Generic Repost | [18](18.md) |
89| `40` | Channel Creation | [28](28.md) |
90| `41` | Channel Metadata | [28](28.md) |
91| `42` | Channel Message | [28](28.md) |
92| `43` | Channel Hide Message | [28](28.md) |
93| `44` | Channel Mute User | [28](28.md) |
94| `1063` | File Metadata | [94](94.md) |
95| `1311` | Live Chat Message | [53](53.md) |
96| `1040` | OpenTimestamps | [03](03.md) |
97| `1984` | Reporting | [56](56.md) |
98| `1985` | Label | [32](32.md) |
99| `4550` | Community Post Approval | [72](72.md) |
100| `7000` | Job Feedback | [90](90.md) |
101| `7001` | Subscription Start | [88](88.md) |
102| `7002` | Subscription Stop | [88](88.md) |
103| `9041` | Zap Goal | [75](75.md) |
104| `9734` | Zap Request | [57](57.md) |
105| `9735` | Zap | [57](57.md) |
106| `10000` | Mute List | [51](51.md) |
107| `10001` | Pin List | [51](51.md) |
108| `10002` | Relay List Metadata | [65](65.md) |
109| `13194` | Wallet Info | [47](47.md) |
110| `22242` | Client Authentication | [42](42.md) |
111| `23194` | Wallet Request | [47](47.md) |
112| `23195` | Wallet Response | [47](47.md) |
113| `24133` | Nostr Connect | [46](46.md) |
114| `27235` | HTTP Auth | [98](98.md) |
115| `30000` | Categorized People List | [51](51.md) |
116| `30001` | Categorized Bookmark List | [51](51.md) |
117| `30008` | Profile Badges | [58](58.md) |
118| `30009` | Badge Definition | [58](58.md) |
119| `30017` | Create or update a stall | [15](15.md) |
120| `30018` | Create or update a product | [15](15.md) |
121| `30023` | Long-form Content | [23](23.md) |
122| `30024` | Draft Long-form Content | [23](23.md) |
123| `30078` | Application-specific Data | [78](78.md) |
124| `30311` | Live Event | [53](53.md) |
125| `30315` | User Statuses | [38](38.md) |
126| `30402` | Classified Listing | [99](99.md) |
127| `30403` | Draft Classified Listing | [99](99.md) |
128| `31922` | Date-Based Calendar Event | [52](52.md) |
129| `31923` | Time-Based Calendar Event | [52](52.md) |
130| `31924` | Calendar | [52](52.md) |
131| `31925` | Calendar Event RSVP | [52](52.md) |
132| `31989` | Handler recommendation | [89](89.md) |
133| `31990` | Handler information | [89](89.md) |
134| `34550` | Community Definition | [72](72.md) |
135| `37001` | Subscription Tier | [88](88.md) |
136 156
137## Message types 157## Message types
138 158
@@ -211,21 +231,26 @@ Please update these lists when proposing NIPs introducing new event kinds.
2114. There should be no more than one way of doing the same thing. 2314. There should be no more than one way of doing the same thing.
2125. Other rules will be made up when necessary. 2325. Other rules will be made up when necessary.
213 233
214## Mailing Lists 234## Is this repository a centralizing factor?
235
236To promote interoperability, we standards that everybody can follow, and we need them to define a **single way of doing each thing** without ever hurting **backwards-compatibility**, and for that purpose there is no way around getting everybody to agree on the same thing and keep a centralized index of these standards. However the fact that such index exists doesn't hurt the decentralization of Nostr. _At any point the central index can be challenged if it is failing to fulfill the needs of the protocol_ and it can migrate to other places and be maintained by other people.
237
238It can even fork into multiple and then some clients would go one way, others would go another way, and some clients would adhere to both competing standards. This would hurt the simplicity, openness and interoperability of Nostr a little, but everything would still work in the short term.
215 239
216The nostr ecosystem is getting large with many different organizations, relays 240There is a list of notable Nostr software developers who have commit access to this repository, but that exists mostly for practical reasons, as by the nature of the thing we're dealing with the repository owner can revoke membership and rewrite history as they want -- and if these actions are unjustified or perceived as bad or evil the community must react.
217and clients. Following the nips repo on github is becoming more difficult and
218noisy. To coordinate on protocol development outside of github, there are
219mailing lists where you can work on NIPs before submitting them here:
220 241
221* [w3c nostr community group][w3-nostr] - [public-nostr@w3.org][mailto-w3] - requires signup 242## How this repository works
222* [nostr-protocol google group][nostr-google-group] - [nostr-protocol@googlegroups.com][mailto-google] - no signup required
223 243
224[w3-nostr]: https://www.w3.org/community/nostr/ 244Standards may emerge in two ways: the first way is that someone starts doing something, then others copy it; the second way is that someone has an idea of a new standard that could benefit multiple clients and the protocol in general without breaking **backwards-compatibility** and the principle of having **a single way of doing things**, then they write that idea and submit it to this repository, other interested parties read it and give their feedback, then once most people reasonably agree we codify that in a NIP which client and relay developers that are interested in the feature can proceed to implement.
225[mailto-w3]: mailto:public-nostr@w3.org 245
226[nostr-google-group]: https://groups.google.com/g/nostr-protocol 246These two ways of standardizing things are supported by this repository. Although the second is preferred, an effort will be made to codify standards emerged outside this repository into NIPs that can be later referenced and easily understood and implemented by others -- but obviously as in any human system discretion may be applied when standards are considered harmful.
227[mailto-google]: mailto:nostr-protocol@googlegroups.com
228 247
229## License 248## License
230 249
231All NIPs are public domain. 250All NIPs are public domain.
251
252## Contributors
253
254<a align="center" href="https://github.com/nostr-protocol/nips/graphs/contributors">
255 <img src="https://contrib.rocks/image?repo=nostr-protocol/nips" />
256</a>