From 1b521d019ae19373f8c663f99fc95407cac35714 Mon Sep 17 00:00:00 2001 From: Asai Toshiya Date: Thu, 23 Jan 2025 21:39:23 +0900 Subject: [PATCH 1/8] BREAKING.md: single quote -> back quote. --- BREAKING.md | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/BREAKING.md b/BREAKING.md index 77900d33..66f1a9f6 100644 --- a/BREAKING.md +++ b/BREAKING.md @@ -21,37 +21,37 @@ reverse chronological order. | 2024-07-23 | [0227a2cd](https://github.com/nostr-protocol/nips/commit/0227a2cd) | [01](01.md) | events should be sorted by id after created_at | | 2024-06-06 | [58e94b20](https://github.com/nostr-protocol/nips/commit/58e94b20) | [25](25.md) | [8073c848](https://github.com/nostr-protocol/nips/commit/8073c848) was reverted | | 2024-06-06 | [a6dfc7b5](https://github.com/nostr-protocol/nips/commit/a6dfc7b5) | [55](55.md) | NIP number was changed | -| 2024-05-25 | [5d1d1c17](https://github.com/nostr-protocol/nips/commit/5d1d1c17) | [71](71.md) | 'aes-256-gcm' tag was removed | +| 2024-05-25 | [5d1d1c17](https://github.com/nostr-protocol/nips/commit/5d1d1c17) | [71](71.md) | `aes-256-gcm` tag was removed | | 2024-05-07 | [8073c848](https://github.com/nostr-protocol/nips/commit/8073c848) | [25](25.md) | e-tags were changed to not include entire thread | -| 2024-04-30 | [bad88262](https://github.com/nostr-protocol/nips/commit/bad88262) | [34](34.md) | 'earliest-unique-commit' tag was removed (use 'r' tag instead) | +| 2024-04-30 | [bad88262](https://github.com/nostr-protocol/nips/commit/bad88262) | [34](34.md) | `earliest-unique-commit` tag was removed (use `r` tag instead) | | 2024-02-25 | [4a171cb0](https://github.com/nostr-protocol/nips/commit/4a171cb0) | [18](18.md) | quote repost should use `q` tag | | 2024-02-21 | [c6cd655c](https://github.com/nostr-protocol/nips/commit/c6cd655c) | [46](46.md) | Params were stringified | | 2024-02-16 | [cbec02ab](https://github.com/nostr-protocol/nips/commit/cbec02ab) | [49](49.md) | Password first normalized to NFKC | | 2024-02-15 | [afbb8dd0](https://github.com/nostr-protocol/nips/commit/afbb8dd0) | [39](39.md) | PGP identity was removed | | 2024-02-07 | [d3dad114](https://github.com/nostr-protocol/nips/commit/d3dad114) | [46](46.md) | Connection token format was changed | -| 2024-01-30 | [1a2b21b6](https://github.com/nostr-protocol/nips/commit/1a2b21b6) | [59](59.md) | 'p' tag became optional | +| 2024-01-30 | [1a2b21b6](https://github.com/nostr-protocol/nips/commit/1a2b21b6) | [59](59.md) | `p` tag became optional | | 2023-01-27 | [c2f34817](https://github.com/nostr-protocol/nips/commit/c2f34817) | [47](47.md) | optional expiration tag should be honored | | 2024-01-10 | [3d8652ea](https://github.com/nostr-protocol/nips/commit/3d8652ea) | [02](02.md), [51](51.md) | list entries should be chronological | -| 2023-12-30 | [29869821](https://github.com/nostr-protocol/nips/commit/29869821) | [52](52.md) | 'name' tag was removed (use 'title' tag instead) | -| 2023-12-27 | [17c67ef5](https://github.com/nostr-protocol/nips/commit/17c67ef5) | [94](94.md) | 'aes-256-gcm' tag was removed | -| 2023-12-03 | [0ba45895](https://github.com/nostr-protocol/nips/commit/0ba45895) | [01](01.md) | WebSocket status code `4000` was replaced by 'CLOSED' message | -| 2023-11-28 | [6de35f9e](https://github.com/nostr-protocol/nips/commit/6de35f9e) | [89](89.md) | 'client' tag value was changed | +| 2023-12-30 | [29869821](https://github.com/nostr-protocol/nips/commit/29869821) | [52](52.md) | `name` tag was removed (use `title` tag instead) | +| 2023-12-27 | [17c67ef5](https://github.com/nostr-protocol/nips/commit/17c67ef5) | [94](94.md) | `aes-256-gcm` tag was removed | +| 2023-12-03 | [0ba45895](https://github.com/nostr-protocol/nips/commit/0ba45895) | [01](01.md) | WebSocket status code `4000` was replaced by `CLOSED` message | +| 2023-11-28 | [6de35f9e](https://github.com/nostr-protocol/nips/commit/6de35f9e) | [89](89.md) | `client` tag value was changed | | 2023-11-20 | [7822a8b1](https://github.com/nostr-protocol/nips/commit/7822a8b1) | [51](51.md) | `kind: 30001` was deprecated | | 2023-11-20 | [7822a8b1](https://github.com/nostr-protocol/nips/commit/7822a8b1) | [51](51.md) | the meaning of `kind: 30000` was changed | -| 2023-11-11 | [cbdca1e9](https://github.com/nostr-protocol/nips/commit/cbdca1e9) | [84](84.md) | 'range' tag was removed | -| 2023-11-10 | [c945d8bd](https://github.com/nostr-protocol/nips/commit/c945d8bd) | [32](32.md) | 'l' tag annotations was removed | -| 2023-11-07 | [108b7f16](https://github.com/nostr-protocol/nips/commit/108b7f16) | [01](01.md) | 'OK' message must have 4 items | -| 2023-10-17 | [cf672b76](https://github.com/nostr-protocol/nips/commit/cf672b76) | [03](03.md) | 'block' tag was removed | -| 2023-09-29 | [7dc6385f](https://github.com/nostr-protocol/nips/commit/7dc6385f) | [57](57.md) | optional 'a' tag was included in `zap receipt` | -| 2023-08-21 | [89915e02](https://github.com/nostr-protocol/nips/commit/89915e02) | [11](11.md) | 'min_prefix' was removed | +| 2023-11-11 | [cbdca1e9](https://github.com/nostr-protocol/nips/commit/cbdca1e9) | [84](84.md) | `range` tag was removed | +| 2023-11-10 | [c945d8bd](https://github.com/nostr-protocol/nips/commit/c945d8bd) | [32](32.md) | `l` tag annotations was removed | +| 2023-11-07 | [108b7f16](https://github.com/nostr-protocol/nips/commit/108b7f16) | [01](01.md) | `OK` message must have 4 items | +| 2023-10-17 | [cf672b76](https://github.com/nostr-protocol/nips/commit/cf672b76) | [03](03.md) | `block` tag was removed | +| 2023-09-29 | [7dc6385f](https://github.com/nostr-protocol/nips/commit/7dc6385f) | [57](57.md) | optional `a` tag was included in `zap receipt` | +| 2023-08-21 | [89915e02](https://github.com/nostr-protocol/nips/commit/89915e02) | [11](11.md) | `min_prefix` was removed | | 2023-08-20 | [37c4375e](https://github.com/nostr-protocol/nips/commit/37c4375e) | [01](01.md) | replaceable events with same timestamp should be retained event with lowest id | -| 2023-08-15 | [88ee873c](https://github.com/nostr-protocol/nips/commit/88ee873c) | [15](15.md) | 'countries' tag was renamed to 'regions' | +| 2023-08-15 | [88ee873c](https://github.com/nostr-protocol/nips/commit/88ee873c) | [15](15.md) | `countries` tag was renamed to `regions` | | 2023-08-14 | [72bb8a12](https://github.com/nostr-protocol/nips/commit/72bb8a12) | [12](12.md), [16](16.md), [20](20.md), [33](33.md) | NIP-12, 16, 20 and 33 were merged into NIP-01 | | 2023-08-11 | [d87f8617](https://github.com/nostr-protocol/nips/commit/d87f8617) | [25](25.md) | empty `content` should be considered as "+" | -| 2023-08-01 | [5d63b157](https://github.com/nostr-protocol/nips/commit/5d63b157) | [57](57.md) | 'zap' tag was changed | +| 2023-08-01 | [5d63b157](https://github.com/nostr-protocol/nips/commit/5d63b157) | [57](57.md) | `zap` tag was changed | | 2023-07-15 | [d1814405](https://github.com/nostr-protocol/nips/commit/d1814405) | [01](01.md) | `since` and `until` filters should be `since <= created_at <= until` | | 2023-07-12 | [a1cd2bd8](https://github.com/nostr-protocol/nips/commit/a1cd2bd8) | [25](25.md) | custom emoji was supported | -| 2023-06-18 | [83cbd3e1](https://github.com/nostr-protocol/nips/commit/83cbd3e1) | [11](11.md) | 'image' was renamed to 'icon' | +| 2023-06-18 | [83cbd3e1](https://github.com/nostr-protocol/nips/commit/83cbd3e1) | [11](11.md) | `image` was renamed to `icon` | | 2023-04-13 | [bf0a0da6](https://github.com/nostr-protocol/nips/commit/bf0a0da6) | [15](15.md) | different NIP was re-added as NIP-15 | | 2023-04-09 | [fb5b7c73](https://github.com/nostr-protocol/nips/commit/fb5b7c73) | [15](15.md) | NIP-15 was merged into NIP-01 | | 2023-03-29 | [599e1313](https://github.com/nostr-protocol/nips/commit/599e1313) | [18](18.md) | NIP-18 was bring back | From a7f30b1eb232786263c5ff4ea7b9589c1ec3868f Mon Sep 17 00:00:00 2001 From: Asai Toshiya Date: Tue, 28 Jan 2025 12:33:53 +0900 Subject: [PATCH 2/8] add kind 32267 to list. (#1698) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 56fa597d..3f416a2c 100644 --- a/README.md +++ b/README.md @@ -228,6 +228,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos | `31925` | Calendar Event RSVP | [52](52.md) | | `31989` | Handler recommendation | [89](89.md) | | `31990` | Handler information | [89](89.md) | +| `32267` | Software Application | | | `34235` | Video Event | [71](71.md) | | `34236` | Short-form Portrait Video Event | [71](71.md) | | `34550` | Community Definition | [72](72.md) | From 70db801bb7fb258c10f4b2ec58056ef74df25549 Mon Sep 17 00:00:00 2001 From: Kieran Date: Tue, 28 Jan 2025 14:37:54 +0000 Subject: [PATCH 3/8] Update 92.md (#1721) --- 92.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/92.md b/92.md index b332d211..d6e9932c 100644 --- a/92.md +++ b/92.md @@ -6,10 +6,10 @@ Media Attachments Media attachments (images, videos, and other files) may be added to events by including a URL in the event content, along with a matching `imeta` tag. -`imeta` ("inline metadata") tags add information about media URLs in the event's content. Each `imeta` tag SHOULD match a URL in the event content. Clients may replace imeta URLs with rich previews. +`imeta` ("inline metadata") tags MAY add information about media URLs in the event's content. Each `imeta` tag SHOULD match a URL in the event content. Clients MAY replace imeta URLs with rich previews. The `imeta` tag is variadic, and each entry is a space-delimited key/value pair. -Each `imeta` tag MUST have a `url`, and at least one other field. `imeta` may include +Each `imeta` tag MUST have a `url`, and at least one other field. `imeta` MAY include any field specified by [NIP 94](./94.md). There SHOULD be only one `imeta` tag per URL. ## Example From 36c48ca128c963b78469855d0e48fa6c1097269b Mon Sep 17 00:00:00 2001 From: Pablo Fernandez Date: Tue, 28 Jan 2025 20:26:21 +0100 Subject: [PATCH 4/8] NIP-60: more consistent state transition (#1720) --- 60.md | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/60.md b/60.md index b2b0dd45..491bc479 100644 --- a/60.md +++ b/60.md @@ -57,7 +57,7 @@ Any tag, other than the `d` tag, can be [[NIP-44]] encrypted into the `.content` Due to addressable event being hard to delete, if a user wants to delete a wallet, they should empty the event and keep just the `d` identifier and add a `deleted` tag. ## Token Event -Token events are used to record the unspent proofs that come from the mint. +Token events are used to record unspent proofs. There can be multiple `kind:7375` events for the same mint, and multiple proofs inside each `kind:7375` event. @@ -73,7 +73,9 @@ There can be multiple `kind:7375` events for the same mint, and multiple proofs "secret": "z+zyxAVLRqN9lEjxuNPSyRJzEstbl69Jc1vtimvtkPg=", "C": "0241d98a8197ef238a192d47edf191a9de78b657308937b4f7dd0aa53beae72c46" } - ] + ], + // tokens that were destroyed in the creation of this token + "del": [ "token-id-1" ] }), "tags": [ [ "a", "37375::my-wallet" ] @@ -81,8 +83,11 @@ There can be multiple `kind:7375` events for the same mint, and multiple proofs } ``` -`.content` is a [[NIP-44]] encrypted payload storing the mint and the unencoded proofs. -* `a` an optional tag linking the token to a specific wallet. + * `a` an optional tag linking the token to a specific wallet. + * `.content` is a [[NIP-44]] encrypted payload: + * `mint`: The mint the proofs belong to. + * `proofs`: unecoded proofs + * `del`: token-ids that were destroyed by the creation of this token. This assists with state transitions. ### Spending proofs When one or more proofs of a token are spent, the token event should be [[NIP-09]]-deleted and, if some proofs are unspent from the same token event, a new token event should be created rolling over the unspent proofs and adding any change outputs to the new token event. @@ -96,7 +101,7 @@ Clients SHOULD publish `kind:7376` events to create a transaction history when t "content": nip44_encrypt([ [ "direction", "in" ], // in = received, out = sent [ "amount", "1", "sat" ], - [ "e", "", "", "created" ], + [ "e", "", "", "created" ], ]), "tags": [ [ "a", "37375::my-wallet" ], @@ -160,7 +165,8 @@ Her client: { "id": "1", "amount": 1 }, { "id": "2", "amount": 2 }, { "id": "4", "amount": 8 }, - ] + ], + "del": [ "event-id-1" ] }), "tags": [ [ "a", "37375::my-wallet" ] @@ -168,6 +174,7 @@ Her client: } ``` * MUST delete event `event-id-1` +* SHOULD add the `event-id-1` to the `del` array of deleted token-ids. * SHOULD create a `kind:7376` event to record the spend ```jsonconc { From 993c8a025eda25b1c87ece3605e5a5eae6d6a1e0 Mon Sep 17 00:00:00 2001 From: "P. Reis" Date: Tue, 28 Jan 2025 21:26:41 -0300 Subject: [PATCH 5/8] parameterized replaceable -> addressable (#1722) --- 60.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/60.md b/60.md index 491bc479..6f3929c5 100644 --- a/60.md +++ b/60.md @@ -39,7 +39,7 @@ This NIP doesn't deal with users' *receiving* money from someone else, it's just } ``` -The wallet event is a parameterized replaceable event `kind:37375`. +The wallet event is an addressable event `kind:37375`. Tags: * `d` - wallet ID. From 54b431e701c3e3b0eaa5bdd2093a3bb7830543dc Mon Sep 17 00:00:00 2001 From: "k." Date: Wed, 29 Jan 2025 13:45:18 +0330 Subject: [PATCH 6/8] Add x tag to NIP-56 (#1669) --- 56.md | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/56.md b/56.md index f7b1b1a9..dc6f0983 100644 --- a/56.md +++ b/56.md @@ -22,7 +22,7 @@ are reporting. If reporting a note, an `e` tag MUST also be included referencing the note id. -A `report type` string MUST be included as the 3rd entry to the `e` or `p` tag +A `report type` string MUST be included as the 3rd entry to the `e`, `p` or `x` tag being reported, which consists of the following report types: - `nudity` - depictions of nudity, porn, etc. @@ -33,7 +33,9 @@ being reported, which consists of the following report types: - `impersonation` - someone pretending to be someone else - `other` - for reports that don't fit in the above categories -Some report tags only make sense for profile reports, such as `impersonation` +Some report tags only make sense for profile reports, such as `impersonation`. + +- `x` tags SHOULD be info hash of a blob which is intended to be report. when the `x` tag is represented client MUST include an `e` tag which is the id of the event that contains the mentioned blob. also, additionally these events can contain a `server` tag to point to media servers which may contain the mentioned media. `l` and `L` tags MAY be also be used as defined in [NIP-32](32.md) to support further qualification and querying. @@ -45,7 +47,7 @@ Example events { "kind": 1984, "tags": [ - ["p", , "nudity"], + ["p", "", "nudity"], ["L", "social.nos.ontology"], ["l", "NS-nud", "social.nos.ontology"] ], @@ -58,8 +60,8 @@ Example events { "kind": 1984, "tags": [ - ["e", , "illegal"], - ["p", ] + ["e", "", "illegal"], + ["p", ""] ], "content": "He's insulting the king!", // other fields... @@ -70,13 +72,26 @@ Example events { "kind": 1984, "tags": [ - ["p", , "impersonation"] + ["p", "", "impersonation"] ], "content": "Profile is impersonating nostr:", // other fields... } ``` +```jsonc +{ + "kind": 1984, + "tags": [ + ["x", "", "malware"], + ["e", "", "malware"], + ["server", "https://you-may-find-the-blob-here.com/path-to-url.ext"] + ], + "content": "This file contains malware software in it.", + // other fields... +} +``` + Client behavior --------------- From 7370729472b5d8b54693e67d0f26b2dd1da84c07 Mon Sep 17 00:00:00 2001 From: "P. Reis" Date: Thu, 30 Jan 2025 10:45:35 -0300 Subject: [PATCH 7/8] NIP-60: jsonconc -> jsonc (#1727) --- 60.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/60.md b/60.md index 6f3929c5..81174124 100644 --- a/60.md +++ b/60.md @@ -134,7 +134,7 @@ While the client is fetching (and perhaps validating) proofs it can use the opti ## Spending token If Alice spends 4 sats from this token event -```jsonconc +```jsonc { "kind": 7375, "id": "event-id-1", @@ -155,7 +155,7 @@ If Alice spends 4 sats from this token event Her client: * MUST roll over the unspent proofs: -```jsonconc +```jsonc { "kind": 7375, "id": "event-id-2", @@ -176,7 +176,7 @@ Her client: * MUST delete event `event-id-1` * SHOULD add the `event-id-1` to the `del` array of deleted token-ids. * SHOULD create a `kind:7376` event to record the spend -```jsonconc +```jsonc { "kind": 7376, "content": nip44_encrypt([ From f440eac3dccefa5c0ec9d3964e1d08357fd31e09 Mon Sep 17 00:00:00 2001 From: daniele Date: Thu, 30 Jan 2025 22:49:06 +0100 Subject: [PATCH 8/8] Remove reference to 'username' and update descriptions in metadata (#1726) --- 01.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/01.md b/01.md index e515d811..9e25ca9b 100644 --- a/01.md +++ b/01.md @@ -89,7 +89,7 @@ Kinds specify how clients should interpret the meaning of each event and the oth This NIP defines one basic kind: -- `0`: **user metadata**: the `content` is set to a stringified JSON object `{name: , about: , picture: }` describing the user who created the event. [Extra metadata fields](24.md#kind-0) may be set. A relay may delete older events once it gets a new one for the same pubkey. +- `0`: **user metadata**: the `content` is set to a stringified JSON object `{name: , about: , picture: }` describing the user who created the event. [Extra metadata fields](24.md#kind-0) may be set. A relay may delete older events once it gets a new one for the same pubkey. And also a convention for kind ranges that allow for easier experimentation and flexibility of relay implementation: