From b8f2e14e6dc6b688605e55c86e68ac17b53338f0 Mon Sep 17 00:00:00 2001 From: Vivek Ganesan Date: Thu, 11 May 2023 20:39:40 +0530 Subject: [PATCH 01/43] Add user experience recommendation about NIP-07 Invoking NIP-07 methods as a part of page-load event listener creates intermittent issues due to race conditions between the browser's extension script and the client's page scripts. --- 07.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/07.md b/07.md index 3b7a1d29..0fe81217 100644 --- a/07.md +++ b/07.md @@ -22,6 +22,11 @@ async window.nostr.nip04.encrypt(pubkey, plaintext): string // returns ciphertex async window.nostr.nip04.decrypt(pubkey, ciphertext): string // takes ciphertext and iv as specified in nip-04 ``` +### User experience recommendation +Due to the way browsers load the extensions, it may take some time for `window.nostr` object will be fully ready to accept requests. Hence, it is a good idea to run the first `window.nostr` interaction on a user action on the web page (like a button click), and not during the page load. + +Calling the `window.nostr` based methods during the page load runs the risk of intermittent issues due to race conditions between the client page's script and the extension's script + ### Implementation - [horse](https://github.com/fiatjaf/horse) (Chrome and derivatives) From 9bf8bb0054f236533c8bc04f6a2966970c7d5bd9 Mon Sep 17 00:00:00 2001 From: Vivek Ganesan Date: Tue, 16 May 2023 04:05:24 +0530 Subject: [PATCH 02/43] Update 07.md Implemented review inputs --- 07.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/07.md b/07.md index 0fe81217..b350d0c0 100644 --- a/07.md +++ b/07.md @@ -22,8 +22,8 @@ async window.nostr.nip04.encrypt(pubkey, plaintext): string // returns ciphertex async window.nostr.nip04.decrypt(pubkey, ciphertext): string // takes ciphertext and iv as specified in nip-04 ``` -### User experience recommendation -Due to the way browsers load the extensions, it may take some time for `window.nostr` object will be fully ready to accept requests. Hence, it is a good idea to run the first `window.nostr` interaction on a user action on the web page (like a button click), and not during the page load. +### Recommendation to Implementers +When `window.nostr` is injected by a browser extension, it may not be fully available until a certain point in the page's lifecycle. Hence, it is a good idea to invoke the first `window.nostr` based functionality after a user-action on the web page (like a button click), and not during the page load. Calling the `window.nostr` based methods during the page load runs the risk of intermittent issues due to race conditions between the client page's script and the extension's script From 46a81d9c25874aac0af4b26fa6641bcca9a70053 Mon Sep 17 00:00:00 2001 From: Sandwich <299465+dskvr@users.noreply.github.com> Date: Tue, 19 Dec 2023 13:31:13 +0100 Subject: [PATCH 03/43] Clarify summarization language The initial language is misleading as it is not clear the tags are to be used on any event outside of the kind it defines until the bottom of the NIP. --- 32.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/32.md b/32.md index be4e8724..60e108e7 100644 --- a/32.md +++ b/32.md @@ -6,8 +6,7 @@ Labeling `draft` `optional` -A label is a `kind 1985` event that is used to label other entities. This supports a number of use cases, -including distributed moderation, collection management, license assignment, and content classification. +A label uses two new indexable tags to label events. Additionally, it adds a new event kind, `kind 1985`, that is used to label other entities. This supports a number of use cases, including distributed moderation, collection management, license assignment, and content classification. This NIP introduces two new tags: From 81fd5deff652fe0c70a8b654d947fe05aa0a1f72 Mon Sep 17 00:00:00 2001 From: Sandwich <299465+dskvr@users.noreply.github.com> Date: Wed, 27 Dec 2023 13:24:20 +0100 Subject: [PATCH 04/43] Update language --- 32.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/32.md b/32.md index 60e108e7..eafb06ff 100644 --- a/32.md +++ b/32.md @@ -6,7 +6,7 @@ Labeling `draft` `optional` -A label uses two new indexable tags to label events. Additionally, it adds a new event kind, `kind 1985`, that is used to label other entities. This supports a number of use cases, including distributed moderation, collection management, license assignment, and content classification. +This NIP defines two new indexable tags to label events and a new event kind (kind:1985) to attach those labels to existing events. This supports several use cases, including distributed moderation, collection management, license assignment, and content classification. This NIP introduces two new tags: From c3fbda5ee0002629791d6e29a721e03e6b06f605 Mon Sep 17 00:00:00 2001 From: Sandwich <299465+dskvr@users.noreply.github.com> Date: Wed, 27 Dec 2023 13:25:02 +0100 Subject: [PATCH 05/43] Remove redundant language --- 32.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/32.md b/32.md index eafb06ff..e4f6aa28 100644 --- a/32.md +++ b/32.md @@ -8,7 +8,7 @@ Labeling This NIP defines two new indexable tags to label events and a new event kind (kind:1985) to attach those labels to existing events. This supports several use cases, including distributed moderation, collection management, license assignment, and content classification. -This NIP introduces two new tags: +New Tags: - `L` denotes a label namespace - `l` denotes a label From 71061e9e83cbd06b775c8e27eab38dc831f078a3 Mon Sep 17 00:00:00 2001 From: Sandwich <299465+dskvr@users.noreply.github.com> Date: Fri, 29 Dec 2023 21:03:53 +0100 Subject: [PATCH 06/43] Commit suggestion Co-authored-by: hodlbod --- 32.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/32.md b/32.md index e4f6aa28..bff3b801 100644 --- a/32.md +++ b/32.md @@ -6,7 +6,7 @@ Labeling `draft` `optional` -This NIP defines two new indexable tags to label events and a new event kind (kind:1985) to attach those labels to existing events. This supports several use cases, including distributed moderation, collection management, license assignment, and content classification. +This NIP defines two new indexable tags to label events and a new event kind (`kind:1985`) to attach those labels to existing events. This supports several use cases, including distributed moderation, collection management, license assignment, and content classification. New Tags: From f549b66f67dffea317efbe192631503dfdac2e9d Mon Sep 17 00:00:00 2001 From: Jon Staab Date: Thu, 26 Oct 2023 10:06:29 -0700 Subject: [PATCH 07/43] Deprecate nip 45 --- 45.md | 2 ++ README.md | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/45.md b/45.md index 780dfb6b..56d0f101 100644 --- a/45.md +++ b/45.md @@ -1,3 +1,5 @@ +> __Warning__ `unrecommended`: deprecated + NIP-45 ====== diff --git a/README.md b/README.md index 10b1dfb7..0862723d 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos - [NIP-40: Expiration Timestamp](40.md) - [NIP-42: Authentication of clients to relays](42.md) - [NIP-44: Versioned Encryption](44.md) -- [NIP-45: Counting results](45.md) +- [NIP-45: Counting results](45.md) --- **unrecommended**: deprecated - [NIP-46: Nostr Connect](46.md) - [NIP-47: Wallet Connect](47.md) - [NIP-48: Proxy Tags](48.md) From 280eb498e0ac56b8f9356c1b7a88cc8b31579801 Mon Sep 17 00:00:00 2001 From: Oscar Merry Date: Fri, 19 Apr 2024 14:30:45 +0100 Subject: [PATCH 08/43] Draft External Content IDs --- 24.md | 1 + XX.md | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 XX.md diff --git a/24.md b/24.md index 449101af..a17b334c 100644 --- a/24.md +++ b/24.md @@ -40,4 +40,5 @@ tags These tags may be present in multiple event kinds. Whenever a different meaning is not specified by some more specific NIP, they have the following meanings: - `r`: a web URL the event is referring to in some way + - `i`: an external id the event is referring to in some way - see [NIP-XX](XX.md) - `title`: title of the event diff --git a/XX.md b/XX.md new file mode 100644 index 00000000..8751d947 --- /dev/null +++ b/XX.md @@ -0,0 +1,31 @@ +NIP-XX +====== + +External Content IDs +------------------------- + +`draft` `optional` + +There are certain established global content identifiers that would be useful to reference in nostr events so that clients can query all events assosiated with these ids. + +- Book [ISBNs](https://en.wikipedia.org/wiki/ISBN) +- Podcast [GUIDs](https://podcastnamespace.org/tag/guid) +- Movie [EIDRs](https://www.eidr.org) + +Since the `i` tag is already used for similar references in kind-0 metadata events it makes sense to use it for these content ids as well. + + +## Supported IDs + +### Books: + +- Book ISBN: `["i", "book:isbn:123"]` + +### Podcasts: + +- Podcast Feed GUID: `["i", "podcast:guid:123"]` +- Podcast Item GUID: `["i", "podcast:item:guid:123"]` + +### Movies: + +- Movie EIDR: `["i", "movie:eidr:123"]` \ No newline at end of file From b7bb46ac038bc5411f55bfa7646259da203c13c3 Mon Sep 17 00:00:00 2001 From: Oscar Merry Date: Thu, 9 May 2024 12:27:43 +0100 Subject: [PATCH 09/43] Use ISANs for Movies, Include Actual Examples --- XX.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/XX.md b/XX.md index 8751d947..eebaeedb 100644 --- a/XX.md +++ b/XX.md @@ -10,7 +10,7 @@ There are certain established global content identifiers that would be useful to - Book [ISBNs](https://en.wikipedia.org/wiki/ISBN) - Podcast [GUIDs](https://podcastnamespace.org/tag/guid) -- Movie [EIDRs](https://www.eidr.org) +- Movie [ISANs](https://en.wikipedia.org/wiki/International_Standard_Audiovisual_Number) Since the `i` tag is already used for similar references in kind-0 metadata events it makes sense to use it for these content ids as well. @@ -19,13 +19,17 @@ Since the `i` tag is already used for similar references in kind-0 metadata even ### Books: -- Book ISBN: `["i", "book:isbn:123"]` +- Book ISBN: `["i", "book:isbn:9780765382030"]` - https://isbnsearch.org/isbn/9780765382030 + +Book ISBNs MUST be referenced _**without hyphens**_ as many book search APIs return the ISBNs without hyphens. Removing hypens from ISBNs is trivial, whereas adding the hyphens back in is non-trivial requiring a library. ### Podcasts: -- Podcast Feed GUID: `["i", "podcast:guid:123"]` -- Podcast Item GUID: `["i", "podcast:item:guid:123"]` +- Podcast RSS Feed GUID: `["i", "podcast:guid:c90e609a-df1e-596a-bd5e-57bcc8aad6cc"]` - https://podcastindex.org/podcast/c90e609a-df1e-596a-bd5e-57bcc8aad6cc +- Podcast RSS Item GUID: `["i", "podcast:item:guid:d98d189b-dc7b-45b1-8720-d4b98690f31f"]` ### Movies: -- Movie EIDR: `["i", "movie:eidr:123"]` \ No newline at end of file +- Movie ISAN: `["i", "movie:isan:0000-0000-401A-0000-7"]` - https://web.isan.org/public/en/isan/0000-0000-401A-0000-7 + +Movie ISANs SHOULD be referenced _**without the version part**_ as the versions / edits of movies are not relevant. More info on ISAN parts here - https://support.isan.org/hc/en-us/articles/360002783131-Records-relations-and-hierarchies-in-the-ISAN-Registry \ No newline at end of file From d33b223c6afe2be3d197d2cdb4686961a6fb2b29 Mon Sep 17 00:00:00 2001 From: Oscar Merry Date: Thu, 16 May 2024 20:44:45 +0100 Subject: [PATCH 10/43] Remove Media Type Prefix --- XX.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/XX.md b/XX.md index eebaeedb..4b51c67f 100644 --- a/XX.md +++ b/XX.md @@ -19,7 +19,7 @@ Since the `i` tag is already used for similar references in kind-0 metadata even ### Books: -- Book ISBN: `["i", "book:isbn:9780765382030"]` - https://isbnsearch.org/isbn/9780765382030 +- Book ISBN: `["i", "isbn:9780765382030"]` - https://isbnsearch.org/isbn/9780765382030 Book ISBNs MUST be referenced _**without hyphens**_ as many book search APIs return the ISBNs without hyphens. Removing hypens from ISBNs is trivial, whereas adding the hyphens back in is non-trivial requiring a library. @@ -30,6 +30,6 @@ Book ISBNs MUST be referenced _**without hyphens**_ as many book search APIs ret ### Movies: -- Movie ISAN: `["i", "movie:isan:0000-0000-401A-0000-7"]` - https://web.isan.org/public/en/isan/0000-0000-401A-0000-7 +- Movie ISAN: `["i", "isan:0000-0000-401A-0000-7"]` - https://web.isan.org/public/en/isan/0000-0000-401A-0000-7 Movie ISANs SHOULD be referenced _**without the version part**_ as the versions / edits of movies are not relevant. More info on ISAN parts here - https://support.isan.org/hc/en-us/articles/360002783131-Records-relations-and-hierarchies-in-the-ISAN-Registry \ No newline at end of file From 0ff2fa3212ca66e3f7177da431084d4fde9386cd Mon Sep 17 00:00:00 2001 From: Jon Staab Date: Mon, 8 Jan 2024 09:53:23 -0800 Subject: [PATCH 11/43] Add title to NIP 72, mention cross-posting and clarify moderation options --- 72.md | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/72.md b/72.md index 4bafce06..968a9eda 100644 --- a/72.md +++ b/72.md @@ -10,7 +10,7 @@ The goal of this NIP is to create moderator-approved public communities around a # Community Definition -`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. +`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. A community definition event's `d` tag MAY double as its name, but if a `name` tag is provided, it SHOULD be displayed instead of the `d` tag. ```jsonc { @@ -18,6 +18,7 @@ The goal of this NIP is to create moderator-approved public communities around a "kind": 34550, "tags": [ ["d", ""], + ["name", ""], ["description", ""], ["image", "", "x"], @@ -38,9 +39,9 @@ The goal of this NIP is to create moderator-approved public communities around a } ``` -# New Post Request +# Community Posts -Any 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. +Any Nostr event can be posted to a community. Clients MUST add one or more community `a` tags, each with a recommended relay. ```jsonc { @@ -53,11 +54,13 @@ Any Nostr event can be submitted to a community by anyone for approval. Clients } ``` -Community management clients MAY filter all mentions to a given `kind:34550` event and request moderators to approve each submission. Moderators MAY delete his/her approval of a post at any time using event deletions (See [NIP-09](09.md)). +# Moderation -# Post Approval by moderators +An approval event MUST include one or more community `a` tags, an `e` or `a` tag pointing to the post, and the `p` tag of the author of the post (for approval notifications). `a` tag prefixes can be used to disambiguate between community and replaceable event pointers (community `a` tags always begin with `34550`). -The post-approval event MUST include `a` tags of the communities the moderator is posting into (one or more), the `e` tag of the post and `p` tag of the author of the post (for approval notifications). The event SHOULD also include the stringified `post request` event inside the `.content` ([NIP-18-style](18.md)) and a `k` tag with the original post's event kind to allow filtering of approved posts by kind. +The event SHOULD also include the JSON-stringified `post request` event inside the `.content`, and a `k` tag with the original post's event kind to allow filtering of approved posts by kind. + +Moderators MAY delete their approval of a post at any time using NIP 09 event deletions. ```jsonc { @@ -76,13 +79,21 @@ The post-approval event MUST include `a` tags of the communities the moderator i It's recommended that multiple moderators approve posts to avoid deleting them from the community when a moderator is removed from the owner's list. In case the full list of moderators must be rotated, the new moderator set must sign new approvals for posts in the past or the community will restart. The owner can also periodically copy and re-sign of each moderator's approval events to make sure posts don't disappear with moderators. -Post Approvals of replaceable events can be created in three ways: (i) by tagging the replaceable event as an `e` tag if moderators want to approve each individual change to the repleceable event; (ii) by tagging the replaceable event as an `a` tag if the moderator authorizes the replaceable event author to make changes without additional approvals and (iii) by tagging the replaceable event with both its `e` and `a` tag which empowers clients to display the original and updated versions of the event, with appropriate remarks in the UI. Since relays are instructed to delete old versions of a replaceable event, the `.content` of an `e`-approval MUST have the specific version of the event or Clients might not be able to find that version of the content anywhere. +Approvals of replaceable events can be created in three ways: -Clients SHOULD evaluate any non-`34550:*` `a` tag as posts to be included in all `34550:*` `a` tags. +1. By tagging the replaceable event as an `e` tag if moderators want to approve each individual change to the replaceable event +2. By tagging the replaceable event as an `a` tag if the moderator authorizes the replaceable event author to make changes without additional approvals and +3. By tagging the replaceable event with both its `e` and `a` tag which empowers clients to display the original and updated versions of the event, with appropriate remarks in the UI. + +Since relays are instructed to delete old versions of a replaceable event, the `content` of an approval using an `e` tag MUST have the specific version of the event or clients might not be able to find that version of the content anywhere. + +# Cross-posting + +Clients MAY support cross-posting between communities by posting a NIP 18 `kind 6` or `kind 16` repost to one or more communities using `a` tags as described above. The `content` of the repost MUST be the original event, not the approval event. # Displaying -Community clients SHOULD display posts that have been approved by at least 1 moderator or by the community owner. +Clients SHOULD display posts that have been approved by at least 1 moderator or by the community owner. Clients MAY disregard moderation and fetch community posts directly. The following filter displays the approved posts. From 42932deb0a9265de0b668e3f34a418177c1b8d2f Mon Sep 17 00:00:00 2001 From: Jon Staab Date: Mon, 5 Feb 2024 09:26:14 -0800 Subject: [PATCH 12/43] Do more to clarify moderation --- 72.md | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/72.md b/72.md index 968a9eda..cb1db227 100644 --- a/72.md +++ b/72.md @@ -6,7 +6,7 @@ Moderated Communities (Reddit Style) `draft` `optional` -The 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. +The goal of this NIP is to enable public communities. 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 may issue an approval event `kind:4550`. # Community Definition @@ -39,7 +39,7 @@ The goal of this NIP is to create moderator-approved public communities around a } ``` -# Community Posts +# Posting to a community Any Nostr event can be posted to a community. Clients MUST add one or more community `a` tags, each with a recommended relay. @@ -56,6 +56,8 @@ Any Nostr event can be posted to a community. Clients MUST add one or more commu # Moderation +Anyone may issue an approval event to express their opinion that a post is appropriate for a community. Clients MAY choose which approval events to honor, but SHOULD at least use ones published by the group's defined moderators. + An approval event MUST include one or more community `a` tags, an `e` or `a` tag pointing to the post, and the `p` tag of the author of the post (for approval notifications). `a` tag prefixes can be used to disambiguate between community and replaceable event pointers (community `a` tags always begin with `34550`). The event SHOULD also include the JSON-stringified `post request` event inside the `.content`, and a `k` tag with the original post's event kind to allow filtering of approved posts by kind. @@ -90,23 +92,3 @@ Since relays are instructed to delete old versions of a replaceable event, the ` # Cross-posting Clients MAY support cross-posting between communities by posting a NIP 18 `kind 6` or `kind 16` repost to one or more communities using `a` tags as described above. The `content` of the repost MUST be the original event, not the approval event. - -# Displaying - -Clients SHOULD display posts that have been approved by at least 1 moderator or by the community owner. Clients MAY disregard moderation and fetch community posts directly. - -The following filter displays the approved posts. - -```json -[ - "REQ", - "_", - { - "authors": ["", "", "", "", ...], - "kinds": [4550], - "#a": ["34550::"], - } -] -``` - -Clients MAY hide approvals by blocked moderators at the user's request. From 1dc8d1857172d74e81097f34f1f5c58bcc29ac51 Mon Sep 17 00:00:00 2001 From: Jon Staab Date: Thu, 30 May 2024 12:24:58 -0700 Subject: [PATCH 13/43] Fix conflicts --- 72.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/72.md b/72.md index cb1db227..d19b80b4 100644 --- a/72.md +++ b/72.md @@ -89,6 +89,8 @@ Approvals of replaceable events can be created in three ways: Since relays are instructed to delete old versions of a replaceable event, the `content` of an approval using an `e` tag MUST have the specific version of the event or clients might not be able to find that version of the content anywhere. +Clients SHOULD evaluate any non-`34550:*` `a` tag as posts to be approved for all `34550:*` `a` tags. + # Cross-posting Clients MAY support cross-posting between communities by posting a NIP 18 `kind 6` or `kind 16` repost to one or more communities using `a` tags as described above. The `content` of the repost MUST be the original event, not the approval event. From 13b830d228b122b29f9d96a3bf10601406ddd646 Mon Sep 17 00:00:00 2001 From: Oscar Merry Date: Mon, 17 Jun 2024 13:45:06 +0100 Subject: [PATCH 14/43] Add Optional URL Hints --- XX.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/XX.md b/XX.md index 4b51c67f..636629d9 100644 --- a/XX.md +++ b/XX.md @@ -32,4 +32,16 @@ Book ISBNs MUST be referenced _**without hyphens**_ as many book search APIs ret - Movie ISAN: `["i", "isan:0000-0000-401A-0000-7"]` - https://web.isan.org/public/en/isan/0000-0000-401A-0000-7 -Movie ISANs SHOULD be referenced _**without the version part**_ as the versions / edits of movies are not relevant. More info on ISAN parts here - https://support.isan.org/hc/en-us/articles/360002783131-Records-relations-and-hierarchies-in-the-ISAN-Registry \ No newline at end of file +Movie ISANs SHOULD be referenced _**without the version part**_ as the versions / edits of movies are not relevant. More info on ISAN parts here - https://support.isan.org/hc/en-us/articles/360002783131-Records-relations-and-hierarchies-in-the-ISAN-Registry + +--- + +### Optional URL Hints + +Each `i` tag MAY have a url hint as the second argument to redirect people to a website if the client isn't opinionated about how to interpret the id: + +`["i", "podcast:item:guid:d98d189b-dc7b-45b1-8720-d4b98690f31f", https://fountain.fm/episode/z1y9TMQRuqXl2awyrQxg]` + +`["i", "isan:0000-0000-401A-0000-7", https://www.imdb.com/title/tt0120737]` + + From dedc22e1ea792796cfb0f0445d72afd13c4166ee Mon Sep 17 00:00:00 2001 From: Shusui MOYATANI Date: Mon, 15 Jul 2024 10:53:20 +0900 Subject: [PATCH 15/43] NIP-39: clarify that i tag should be in tags --- 39.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/39.md b/39.md index c819e43b..f5ebe351 100644 --- a/39.md +++ b/39.md @@ -12,9 +12,11 @@ Nostr protocol users may have other online identities such as usernames, profile ## `i` tag on a metadata event -A 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): +A new optional `i` tag is introduced for `kind 0` metadata event defined in [NIP-01](https://github.com/nostr-protocol/nips/blob/master/01.md): ```json { + "id": , + "pubkey": , "tags": [ ["i", "github:semisol", "9721ce4ee4fceb91c9711ca2a6c9a5ab"], ["i", "twitter:semisol_public", "1619358434134196225"], From 68c9e484ea1fdfa48e7a62da4a1e0b1e4a29a937 Mon Sep 17 00:00:00 2001 From: Vivek Ganesan Date: Mon, 15 Jul 2024 20:41:56 +0530 Subject: [PATCH 16/43] add suggestion to extension authors Wrote a note to extension authors --- 07.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/07.md b/07.md index b350d0c0..d733d010 100644 --- a/07.md +++ b/07.md @@ -22,10 +22,9 @@ async window.nostr.nip04.encrypt(pubkey, plaintext): string // returns ciphertex async window.nostr.nip04.decrypt(pubkey, ciphertext): string // takes ciphertext and iv as specified in nip-04 ``` -### Recommendation to Implementers -When `window.nostr` is injected by a browser extension, it may not be fully available until a certain point in the page's lifecycle. Hence, it is a good idea to invoke the first `window.nostr` based functionality after a user-action on the web page (like a button click), and not during the page load. +### Recommendation to Extension Authors +To make sure that the `window.nostr` is available to nostr clients on page load, the authors who create Chromium and Firefox extensions should load their scripts by specifying `"run_at": "document_end"` in the extension's manifest. -Calling the `window.nostr` based methods during the page load runs the risk of intermittent issues due to race conditions between the client page's script and the extension's script ### Implementation From 9c54549f1842245b842d8a66f3bade744da24189 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 18 Jul 2024 22:16:45 -0500 Subject: [PATCH 17/43] NIP-01: sort events by id after created_at --- 01.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/01.md b/01.md index c7d7273f..1da6e837 100644 --- a/01.md +++ b/01.md @@ -143,7 +143,7 @@ All conditions of a filter that are specified must match for an event for it to A `REQ` message may contain multiple filters. In this case, events that match any of the filters are to be returned, i.e., multiple filters are to be interpreted as `||` conditions. -The `limit` property of a filter is only valid for the initial query and MUST be ignored afterwards. When `limit: n` is present it is assumed that the events returned in the initial query will be the last `n` events ordered by the `created_at`. It is safe to return less events than `limit` specifies, but it is expected that relays do not return (much) more events than requested so clients don't get unnecessarily overwhelmed by data. +The `limit` property of a filter is only valid for the initial query and MUST be ignored afterwards. When `limit: n` is present it is assumed that the events returned in the initial query will be the last `n` events ordered by the `created_at`. Newer events should appear first, and in the case of ties the event with the lowest id (first in lexical order) should be first. It is safe to return less events than `limit` specifies, but it is expected that relays do not return (much) more events than requested so clients don't get unnecessarily overwhelmed by data. ### From relay to client: sending events and notices From 2e85b89bcbc2b6dea07d988c3b4e4372614f254d Mon Sep 17 00:00:00 2001 From: Alexander Lopatin Date: Sun, 21 Jul 2024 02:05:46 +0800 Subject: [PATCH 18/43] Fix #1377: NIP-46: It's not obvious to the end-user that optional secrets are not temporary --- 46.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/46.md b/46.md index 15281162..fac06eee 100644 --- a/46.md +++ b/46.md @@ -28,7 +28,7 @@ The remote signer would provide a connection token in the form: bunker://?relay=&relay=&secret= ``` -This token is pasted into the client by the user and the client then uses the details to connect to the remote signer via the specified relay(s). +This token is pasted into the client by the user and the client then uses the details to connect to the remote signer via the specified relay(s). Optional secret can be used for single successfully established connection only, remote signer SHOULD ignore new attempts to establish connection with old secret key. ### Direct connection initiated by the client From 8b5c9d8cf20899d6189f05d1d2f9f520677ce12b Mon Sep 17 00:00:00 2001 From: Alexander Lopatin Date: Sat, 20 Jul 2024 21:19:05 +0300 Subject: [PATCH 19/43] Update 46.md Co-authored-by: Alex Gleason --- 46.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/46.md b/46.md index fac06eee..114c377d 100644 --- a/46.md +++ b/46.md @@ -28,7 +28,7 @@ The remote signer would provide a connection token in the form: bunker://?relay=&relay=&secret= ``` -This token is pasted into the client by the user and the client then uses the details to connect to the remote signer via the specified relay(s). Optional secret can be used for single successfully established connection only, remote signer SHOULD ignore new attempts to establish connection with old secret key. +This token is pasted into the client by the user and the client then uses the details to connect to the remote signer via the specified relay(s). Optional secret can be used for single successfully established connection only, remote signer SHOULD ignore new attempts to establish connection with old optional secret. ### Direct connection initiated by the client From 96e3f767de285e780d5d84d6f6553070c519fd5e Mon Sep 17 00:00:00 2001 From: "@RandyMcMillan" Date: Sat, 20 Jul 2024 15:39:38 -0400 Subject: [PATCH 20/43] 99.md:use relative links --- 99.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/99.md b/99.md index 93550d87..89482871 100644 --- a/99.md +++ b/99.md @@ -8,9 +8,9 @@ Classified Listings This 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. -The category of classifieds includes a very broad range of physical goods, services, work opportunities, rentals, free giveaways, personals, etc. and is distinct from the more strictly structured marketplaces defined in [NIP-15](https://github.com/nostr-protocol/nips/blob/master/15.md) that often sell many units of specific products through very specific channels. +The category of classifieds includes a very broad range of physical goods, services, work opportunities, rentals, free giveaways, personals, etc. and is distinct from the more strictly structured marketplaces defined in [NIP-15](15.md) that often sell many units of specific products through very specific channels. -The structure of these events is very similar to [NIP-23](https://github.com/nostr-protocol/nips/blob/master/23.md) long-form content events. +The structure of these events is very similar to [NIP-23](23.md) long-form content events. ### Draft / Inactive Listings @@ -26,8 +26,8 @@ The `.pubkey` field of these events are treated as the party creating the listin ### Metadata -- For "tags"/"hashtags" (i.e. categories or keywords of relevance for the listing) the `"t"` event tag should be used, as per [NIP-12](https://github.com/nostr-protocol/nips/blob/master/12.md). -- For images, whether included in the markdown content or not, clients SHOULD use `image` tags as described in [NIP-58](https://github.com/nostr-protocol/nips/blob/master/58.md). This allows clients to display images in carousel format more easily. +- For "tags"/"hashtags" (i.e. categories or keywords of relevance for the listing) the `"t"` event tag should be used, as per [NIP-12](12.md). +- For images, whether included in the markdown content or not, clients SHOULD use `image` tags as described in [NIP-58](58.md). This allows clients to display images in carousel format more easily. The following tags, used for structured metadata, are standardized and SHOULD be included. Other tags may be added as necessary. From 3451f5a0c86f3ddcd3cbbbd3f534c606bbc60885 Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Mon, 22 Jul 2024 22:55:51 +0900 Subject: [PATCH 21/43] fix typos --- 34.md | 2 +- 96.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/34.md b/34.md index fcc2cece..52e23b50 100644 --- a/34.md +++ b/34.md @@ -53,7 +53,7 @@ The first patch revision in a patch revision SHOULD include a NIP-10 `e` `reply` ["p", ""], ["p", ""], // optionally send the patch to another user to bring it to their attention - ["t", "root"], // ommited for additional patches in a series + ["t", "root"], // omitted for additional patches in a series // for the first patch in a revision ["t", "root-revision"], diff --git a/96.md b/96.md index 2f253516..be709991 100644 --- a/96.md +++ b/96.md @@ -301,7 +301,7 @@ Example Response: // ...other metadata ] "content": "haha funny meme", // caption - "created_at": 1715691130 // upload timestmap + "created_at": 1715691130 // upload timestamp }, ... ] From d8339163704adfe2d277690cfe4c3863940fba35 Mon Sep 17 00:00:00 2001 From: Alexander Lopatin Date: Thu, 25 Jul 2024 02:57:48 +0800 Subject: [PATCH 22/43] NIP-32: Language example --- 32.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/32.md b/32.md index 79f59370..ee71ae95 100644 --- a/32.md +++ b/32.md @@ -129,6 +129,20 @@ is labeling their note as being related to Milan, Italy using ISO 3166-2. } ``` +Author is labelling their note language as English using ISO-639-1. + +```json +{ + "kind": 1, + "tags": [ + ["L", "ISO-639-1"], + ["l", "en", "ISO-639-1"] + ], + "content": "English text", + ... +} +``` + Other Notes ----------- From c7f4f68d03376c14a6813f9a04346ea1712503cc Mon Sep 17 00:00:00 2001 From: Alexander Lopatin Date: Wed, 24 Jul 2024 22:14:06 +0300 Subject: [PATCH 23/43] Update 32.md Co-authored-by: Alex Gleason --- 32.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/32.md b/32.md index ee71ae95..ed46513f 100644 --- a/32.md +++ b/32.md @@ -129,7 +129,7 @@ is labeling their note as being related to Milan, Italy using ISO 3166-2. } ``` -Author is labelling their note language as English using ISO-639-1. +Author is labeling their note language as English using ISO-639-1. ```json { From 6021b07e26b990fd2bd7f715da839d380812a588 Mon Sep 17 00:00:00 2001 From: Asai Toshiya Date: Thu, 25 Jul 2024 09:00:10 +0900 Subject: [PATCH 24/43] BREAKING.md: add NIP-01 change --- BREAKING.md | 1 + 1 file changed, 1 insertion(+) diff --git a/BREAKING.md b/BREAKING.md index c8255cdc..610764db 100644 --- a/BREAKING.md +++ b/BREAKING.md @@ -5,6 +5,7 @@ reverse chronological order. | Date | Commit | NIP | Change | | ----------- | --------- | -------- | ------ | +| 2024-07-23 | [0227a2cd](https://github.com/nostr-protocol/nips/commit/0227a2cd) | [NIP-01](01.md) | events should be sorted by id after created_at | | 2024-06-06 | [58e94b20](https://github.com/nostr-protocol/nips/commit/58e94b20) | [NIP-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) | [NIP-55](55.md) | NIP number was changed | | 2024-05-25 | [5d1d1c17](https://github.com/nostr-protocol/nips/commit/5d1d1c17) | [NIP-71](71.md) | 'aes-256-gcm' tag was removed | From ecee40df17929abdf187bb49952cc40ed1a6702a Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Tue, 23 Jul 2024 20:59:50 -0300 Subject: [PATCH 25/43] nip19: deprecate `nrelay` --- 19.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/19.md b/19.md index ef808870..cce9e641 100644 --- a/19.md +++ b/19.md @@ -34,8 +34,8 @@ These are the possible bech32 prefixes with `TLV`: - `nprofile`: a nostr profile - `nevent`: a nostr event - - `nrelay`: a nostr relay - `naddr`: a nostr _replaceable event_ coordinate + - `nrelay`: a nostr relay (deprecated) These possible standardized `TLV` types are indicated here: @@ -43,7 +43,6 @@ These possible standardized `TLV` types are indicated here: - depends on the bech32 prefix: - for `nprofile` it will be the 32 bytes of the profile public key - for `nevent` it will be the 32 bytes of the event id - - for `nrelay`, this is the relay URL - for `naddr`, it is the identifier (the `"d"` tag) of the event being referenced. For non-parameterized replaceable events, use an empty string. - `1`: `relay` - for `nprofile`, `nevent` and `naddr`, _optionally_, a relay in which the entity (profile or event) is more likely to be found, encoded as ascii From 6826f5a52cac1215d9f0b8c4158500861cbbcfa8 Mon Sep 17 00:00:00 2001 From: Asai Toshiya Date: Fri, 26 Jul 2024 08:47:20 +0900 Subject: [PATCH 26/43] BREAKING.md: add NIP-19 change --- BREAKING.md | 1 + 1 file changed, 1 insertion(+) diff --git a/BREAKING.md b/BREAKING.md index 610764db..dab94ed9 100644 --- a/BREAKING.md +++ b/BREAKING.md @@ -5,6 +5,7 @@ reverse chronological order. | Date | Commit | NIP | Change | | ----------- | --------- | -------- | ------ | +| 2024-07-26 | [ecee40df](https://github.com/nostr-protocol/nips/commit/ecee40df) | [NIP-19](19.md) | `nrelay` was deprecated | | 2024-07-23 | [0227a2cd](https://github.com/nostr-protocol/nips/commit/0227a2cd) | [NIP-01](01.md) | events should be sorted by id after created_at | | 2024-06-06 | [58e94b20](https://github.com/nostr-protocol/nips/commit/58e94b20) | [NIP-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) | [NIP-55](55.md) | NIP number was changed | From a5228e59c91d14f7b6bbc30851882d7d394f66bd Mon Sep 17 00:00:00 2001 From: "@RandyMcMillan" Date: Sun, 28 Jul 2024 14:18:32 -0400 Subject: [PATCH 27/43] 39.md: use relative link to 01.md --- 39.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/39.md b/39.md index f5ebe351..b7c3b9c6 100644 --- a/39.md +++ b/39.md @@ -12,7 +12,7 @@ Nostr protocol users may have other online identities such as usernames, profile ## `i` tag on a metadata event -A new optional `i` tag is introduced for `kind 0` metadata event defined in [NIP-01](https://github.com/nostr-protocol/nips/blob/master/01.md): +A new optional `i` tag is introduced for `kind 0` metadata event defined in [NIP-01](01.md): ```json { "id": , From b8fe261ce4ff33142ce6ea71126969dfce0f7d7e Mon Sep 17 00:00:00 2001 From: randymcmillan Date: Sun, 28 Jul 2024 15:08:13 -0400 Subject: [PATCH 28/43] 15.md:use relative links --- 15.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/15.md b/15.md index 55814fb5..6daa8019 100644 --- a/15.md +++ b/15.md @@ -6,7 +6,7 @@ Nostr Marketplace `draft` `optional` -Based on https://github.com/lnbits/Diagon-Alley. +Based on [Diagon-Alley](https://github.com/lnbits/Diagon-Alley). Implemented in [NostrMarket](https://github.com/lnbits/nostrmarket) and [Plebeian Market](https://github.com/PlebeianTech/plebeian-market). @@ -139,7 +139,7 @@ Fields that are not self-explanatory: ## Checkout events -All checkout events are sent as JSON strings using ([NIP-04](https://github.com/nostr-protocol/nips/blob/master/04.md)). +All checkout events are sent as JSON strings using [NIP-04](04.md). The `merchant` and the `customer` can exchange JSON messages that represent different actions. Each `JSON` message `MUST` have a `type` field indicating the what the JSON represents. Possible types: @@ -150,7 +150,7 @@ The `merchant` and the `customer` can exchange JSON messages that represent diff | 2 | Merchant | Order Status Update | ### Step 1: `customer` order (event) -The below JSON goes in content of [NIP-04](https://github.com/nostr-protocol/nips/blob/master/04.md). +The below JSON goes in content of [NIP-04](04.md). ```json { @@ -182,7 +182,7 @@ _Open_: is `contact.nostr` required? Sent back from the merchant for payment. Any payment option is valid that the merchant can check. -The below JSON goes in `content` of [NIP-04](https://github.com/nostr-protocol/nips/blob/master/04.md). +The below JSON goes in `content` of [NIP-04](04.md). `payment_options`/`type` include: @@ -217,7 +217,7 @@ The below JSON goes in `content` of [NIP-04](https://github.com/nostr-protocol/n Once payment has been received and processed. -The below JSON goes in `content` of [NIP-04](https://github.com/nostr-protocol/nips/blob/master/04.md). +The below JSON goes in `content` of [NIP-04](04.md). ```json { @@ -231,7 +231,7 @@ The below JSON goes in `content` of [NIP-04](https://github.com/nostr-protocol/n ## Customize Marketplace -Create a customized user experience using the `naddr` from [NIP-19](https://github.com/nostr-protocol/nips/blob/master/19.md#shareable-identifiers-with-extra-metadata). The use of `naddr` enables easy sharing of marketplace events while incorporating a rich set of metadata. This metadata can include relays, merchant profiles, and more. Subsequently, it allows merchants to be grouped into a market, empowering the market creator to configure the marketplace's user interface and user experience, and share that marketplace. This customization can encompass elements such as market name, description, logo, banner, themes, and even color schemes, offering a tailored and unique marketplace experience. +Create a customized user experience using the `naddr` from [NIP-19](19.md#shareable-identifiers-with-extra-metadata). The use of `naddr` enables easy sharing of marketplace events while incorporating a rich set of metadata. This metadata can include relays, merchant profiles, and more. Subsequently, it allows merchants to be grouped into a market, empowering the market creator to configure the marketplace's user interface and user experience, and share that marketplace. This customization can encompass elements such as market name, description, logo, banner, themes, and even color schemes, offering a tailored and unique marketplace experience. ### Event `30019`: Create or update marketplace UI/UX @@ -331,7 +331,7 @@ Another thing that can happen is - if bids happen very close to the end date of ## Customer support events -Customer support is handled over whatever communication method was specified. If communicating via nostr, NIP-04 is used https://github.com/nostr-protocol/nips/blob/master/04.md. +Customer support is handled over whatever communication method was specified. If communicating via nostr, [NIP-04](04.md) is used. ## Additional From 6c89e929ba445235e45ab2bb970c012827cf35b1 Mon Sep 17 00:00:00 2001 From: randymcmillan Date: Sun, 28 Jul 2024 15:19:39 -0400 Subject: [PATCH 29/43] 46.mk:use relative links --- 46.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/46.md b/46.md index 114c377d..57fd2b01 100644 --- a/46.md +++ b/46.md @@ -101,7 +101,7 @@ nostrconnect://?relay=&metadata } ``` -The `content` field is a JSON-RPC-like message that is [NIP-04](https://github.com/nostr-protocol/nips/blob/master/04.md) encrypted and has the following structure: +The `content` field is a JSON-RPC-like message that is [NIP-04](04.md) encrypted and has the following structure: ```json { @@ -148,7 +148,7 @@ The `connect` method may be provided with `optional_requested_permissions` for u } ``` -The `content` field is a JSON-RPC-like message that is [NIP-04](https://github.com/nostr-protocol/nips/blob/master/04.md) encrypted and has the following structure: +The `content` field is a JSON-RPC-like message that is [NIP-04](04.md) encrypted and has the following structure: ```json { @@ -224,4 +224,4 @@ Coming soon... ## References -- [NIP-04 - Encryption](https://github.com/nostr-protocol/nips/blob/master/04.md) +- [NIP-04 - Encryption](04.md) From b47c50fa6e95300d537cc06df6755dc2691e3213 Mon Sep 17 00:00:00 2001 From: randymcmillan Date: Sun, 28 Jul 2024 15:23:28 -0400 Subject: [PATCH 30/43] 47.md:use relative link --- 47.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/47.md b/47.md index 983d2c95..e4e432ca 100644 --- a/47.md +++ b/47.md @@ -38,7 +38,7 @@ a plaintext string with the supported commands, space-separated, eg. `pay_invoic Both the request and response events SHOULD contain one `p` tag, containing the public key of the **wallet service** if this is a request, and the public key of the **user** if this is a response. The response event SHOULD contain an `e` tag with the id of the request event it is responding to. Optionally, a request can have an `expiration` tag that has a unix timestamp in seconds. If the request is received after this timestamp, it should be ignored. -The content of requests and responses is encrypted with [NIP04](https://github.com/nostr-protocol/nips/blob/master/04.md), and is a JSON-RPCish object with a semi-fixed structure: +The content of requests and responses is encrypted with [NIP04](04.md), and is a JSON-RPCish object with a semi-fixed structure: Request: ```jsonc From 6d348b572e0f98b0a49ea6024da07e82917ace58 Mon Sep 17 00:00:00 2001 From: randymcmillan Date: Sun, 28 Jul 2024 15:27:29 -0400 Subject: [PATCH 31/43] 70.md:use relative link --- 70.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/70.md b/70.md index 219e6a4f..043d5fbf 100644 --- a/70.md +++ b/70.md @@ -12,7 +12,7 @@ A protected event is an event that can only be published to relays by its author The default behavior of a relay MUST be to reject any event that contains `["-"]`. -Relays that want to accept such events MUST first require that the client perform the [NIP-42](https://github.com/nostr-protocol/nips/blob/master/42.md) `AUTH` flow and then check if the authenticated client has the same pubkey as the event being published and only accept the event in that case. +Relays that want to accept such events MUST first require that the client perform the [NIP-42](42.md) `AUTH` flow and then check if the authenticated client has the same pubkey as the event being published and only accept the event in that case. ## The tag From 0c1dfa966195d789dfa0c7f46544a2e653cc6ca3 Mon Sep 17 00:00:00 2001 From: randymcmillan Date: Sun, 28 Jul 2024 15:36:31 -0400 Subject: [PATCH 32/43] 21.md:use relative link --- 21.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/21.md b/21.md index 6ed141a8..988485dd 100644 --- a/21.md +++ b/21.md @@ -10,7 +10,7 @@ This NIP standardizes the usage of a common URI scheme for maximum interoperabil The scheme is `nostr:`. -The identifiers that come after are expected to be the same as those defined in [NIP-19](https://github.com/nostr-protocol/nips/blob/master/19.md) (except `nsec`). +The identifiers that come after are expected to be the same as those defined in [NIP-19](19.md) (except `nsec`). ## Examples From 985fd30cd98451d1311d28bf4d596d70e0c7fd6d Mon Sep 17 00:00:00 2001 From: Jon Staab Date: Mon, 29 Jul 2024 07:38:29 -0700 Subject: [PATCH 33/43] Add k tag to deletions --- 09.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/09.md b/09.md index 5e79ac23..b6aa72c7 100644 --- a/09.md +++ b/09.md @@ -6,9 +6,7 @@ Event Deletion `draft` `optional` -A 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. - -Each tag entry must contain an "e" event id and/or `a` tags intended for deletion. +A special event with kind `5`, meaning "deletion" is defined as having a list of one or more `e` or `a` tags, each referencing an event the author is requesting to be deleted. Deletion requests SHOULD include a `k` tag for the kind of each event being deleted. The event's `content` field MAY contain a text note describing the reason for the deletion. @@ -21,7 +19,9 @@ For example: "tags": [ ["e", "dcd59..464a2"], ["e", "968c5..ad7a4"], - ["a", "::"] + ["a", "::"], + ["k", "1"], + ["k", "30023"] ], "content": "these posts were published by accident", ...other fields From e73e77735d0ab08ca133077b389f980e5b2363b3 Mon Sep 17 00:00:00 2001 From: hodlbod Date: Wed, 31 Jul 2024 08:53:17 -0700 Subject: [PATCH 34/43] Revert "Remove NIP 45 COUNT" --- 45.md | 2 -- README.md | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/45.md b/45.md index 56d0f101..780dfb6b 100644 --- a/45.md +++ b/45.md @@ -1,5 +1,3 @@ -> __Warning__ `unrecommended`: deprecated - NIP-45 ====== diff --git a/README.md b/README.md index a12df706..dd2e812a 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos - [NIP-40: Expiration Timestamp](40.md) - [NIP-42: Authentication of clients to relays](42.md) - [NIP-44: Versioned Encryption](44.md) -- [NIP-45: Counting results](45.md) --- **unrecommended**: deprecated +- [NIP-45: Counting results](45.md) - [NIP-46: Nostr Connect](46.md) - [NIP-47: Wallet Connect](47.md) - [NIP-48: Proxy Tags](48.md) From c7b4b1b6da2284298f9cb813b515b897bf46368b Mon Sep 17 00:00:00 2001 From: Asai Toshiya Date: Thu, 1 Aug 2024 07:33:30 +0900 Subject: [PATCH 35/43] BREAKING.md: add NIP-45 changes --- BREAKING.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/BREAKING.md b/BREAKING.md index dab94ed9..cac35454 100644 --- a/BREAKING.md +++ b/BREAKING.md @@ -5,6 +5,8 @@ reverse chronological order. | Date | Commit | NIP | Change | | ----------- | --------- | -------- | ------ | +| 2024-07-31 | [3ea2f1a4](https://github.com/nostr-protocol/nips/commit/3ea2f1a4) | [NIP-45](45.md) | [444ad28d](https://github.com/nostr-protocol/nips/commit/444ad28d) was reverted | +| 2024-07-30 | [444ad28d](https://github.com/nostr-protocol/nips/commit/444ad28d) | [NIP-45](45.md) | NIP-45 was deprecated | | 2024-07-26 | [ecee40df](https://github.com/nostr-protocol/nips/commit/ecee40df) | [NIP-19](19.md) | `nrelay` was deprecated | | 2024-07-23 | [0227a2cd](https://github.com/nostr-protocol/nips/commit/0227a2cd) | [NIP-01](01.md) | events should be sorted by id after created_at | | 2024-06-06 | [58e94b20](https://github.com/nostr-protocol/nips/commit/58e94b20) | [NIP-25](25.md) | [8073c848](https://github.com/nostr-protocol/nips/commit/8073c848) was reverted | From 788ffb03a001eb1e26444472ee9211ff51d16baa Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Tue, 21 May 2024 15:29:22 +0100 Subject: [PATCH 36/43] nip34: add refs to repo event so that the event can be used as a source of truth for the state of refs such as branches and tags this could be useful as: 1. a way to reduce trust in git server(s) so they no longer act as a source of truth. a nip34 git remote-helper could proxy requests to git servers and only pull updates when they match the state listed in the repo event. 2. a form of authorisation for nip34 git server implementations such as song 3. a way of enabling experimentation with other protocols for hosting and accessing git data. eg a blossom git remote helper --- 34.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/34.md b/34.md index 52e23b50..4989803d 100644 --- a/34.md +++ b/34.md @@ -35,6 +35,36 @@ The `r` tag annotated with the `"euc"` marker should be the commit ID of the ear Except `d`, all tags are optional. +## Repository state announcements + +An optional source of truth for the state of branches and tags in a repository. + +```jsonc +{ + "kind": 30618, + "content": "", + "tags": [ + ["d", ""], // matches the identifier in the coresponding repository announcement + ["refs//",""] + ["HEAD", "ref: refs/heads/"] + ] +} +``` + +The `refs` tag may appear multiple times, or none. + +If no `refs` tags are present, the author is no longer tracking repository state using this event. This approach enables the author to restart tracking state at a later time unlike [NIP-09](09.md) deletion. + +The `refs` tag can be optionally extended to enable clients to identify how many commits ahead a ref is: + +```jsonc +{ + "tags": [ + ["refs//", "", "", "", ...], + ] +} +``` + ## Patches Patches can be sent by anyone to any repository. Patches to a specific repository SHOULD be sent to the relays specified in that repository's announcement event's `"relays"` tag. Patch events SHOULD include an `a` tag pointing to that repository's announcement address. From 8e5083b28f9716939efbdde576ed21a99b2fed2a Mon Sep 17 00:00:00 2001 From: Asai Toshiya Date: Sat, 3 Aug 2024 08:47:59 +0900 Subject: [PATCH 37/43] Update readme (#1408) * README: add kind 30618 repository state announcements * README: add NIP-72 link to `name` tag * README: use reference link for NUD: Custom Feeds * Format kinds table --- README.md | 216 +++++++++++++++++++++++++++--------------------------- 1 file changed, 109 insertions(+), 107 deletions(-) diff --git a/README.md b/README.md index dd2e812a..515f2a27 100644 --- a/README.md +++ b/README.md @@ -89,112 +89,114 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos - [NIP-99: Classified Listings](99.md) ## Event Kinds -| kind | description | NIP | -| ------------- | -------------------------- | ------------------------ | -| `0` | User Metadata | [01](01.md) | -| `1` | Short Text Note | [01](01.md) | -| `2` | Recommend Relay | 01 (deprecated) | -| `3` | Follows | [02](02.md) | -| `4` | Encrypted Direct Messages | [04](04.md) | -| `5` | Event Deletion | [09](09.md) | -| `6` | Repost | [18](18.md) | -| `7` | Reaction | [25](25.md) | -| `8` | Badge Award | [58](58.md) | -| `9` | Group Chat Message | [29](29.md) | -| `10` | Group Chat Threaded Reply | [29](29.md) | -| `11` | Group Thread | [29](29.md) | -| `12` | Group Thread Reply | [29](29.md) | -| `13` | Seal | [59](59.md) | -| `14` | Direct Message | [17](17.md) | -| `16` | Generic Repost | [18](18.md) | -| `40` | Channel Creation | [28](28.md) | -| `41` | Channel Metadata | [28](28.md) | -| `42` | Channel Message | [28](28.md) | -| `43` | Channel Hide Message | [28](28.md) | -| `44` | Channel Mute User | [28](28.md) | -| `818` | Merge Requests | [54](54.md) | -| `1021` | Bid | [15](15.md) | -| `1022` | Bid confirmation | [15](15.md) | -| `1040` | OpenTimestamps | [03](03.md) | -| `1059` | Gift Wrap | [59](59.md) | -| `1063` | File Metadata | [94](94.md) | -| `1311` | Live Chat Message | [53](53.md) | -| `1617` | Patches | [34](34.md) | -| `1621` | Issues | [34](34.md) | -| `1622` | Replies | [34](34.md) | -| `1630`-`1633` | Status | [34](34.md) | -| `1971` | Problem Tracker | [nostrocket][nostrocket] | -| `1984` | Reporting | [56](56.md) | -| `1985` | Label | [32](32.md) | -| `2003` | Torrent | [35](35.md) | -| `2004` | Torrent Comment | [35](35.md) | -| `2022` | Coinjoin Pool | [joinstr][joinstr] | -| `4550` | Community Post Approval | [72](72.md) | -| `5000`-`5999` | Job Request | [90](90.md) | -| `6000`-`6999` | Job Result | [90](90.md) | -| `7000` | Job Feedback | [90](90.md) | -| `9000`-`9030` | Group Control Events | [29](29.md) | -| `9041` | Zap Goal | [75](75.md) | -| `9734` | Zap Request | [57](57.md) | -| `9735` | Zap | [57](57.md) | -| `9802` | Highlights | [84](84.md) | -| `10000` | Mute list | [51](51.md) | -| `10001` | Pin list | [51](51.md) | -| `10002` | Relay List Metadata | [65](65.md) | -| `10003` | Bookmark list | [51](51.md) | -| `10004` | Communities list | [51](51.md) | -| `10005` | Public chats list | [51](51.md) | -| `10006` | Blocked relays list | [51](51.md) | -| `10007` | Search relays list | [51](51.md) | -| `10009` | User groups | [51](51.md), [29](29.md) | -| `10015` | Interests list | [51](51.md) | -| `10030` | User emoji list | [51](51.md) | -| `10050` | Relay list to receive DMs | [17](17.md) | -| `10096` | File storage server list | [96](96.md) | -| `13194` | Wallet Info | [47](47.md) | -| `21000` | Lightning Pub RPC | [Lightning.Pub][lnpub] | -| `22242` | Client Authentication | [42](42.md) | -| `23194` | Wallet Request | [47](47.md) | -| `23195` | Wallet Response | [47](47.md) | -| `24133` | Nostr Connect | [46](46.md) | -| `27235` | HTTP Auth | [98](98.md) | -| `30000` | Follow sets | [51](51.md) | -| `30001` | Generic lists | [51](51.md) | -| `30002` | Relay sets | [51](51.md) | -| `30003` | Bookmark sets | [51](51.md) | -| `30004` | Curation sets | [51](51.md) | -| `30005` | Video sets | [51](51.md) | -| `30008` | Profile Badges | [58](58.md) | -| `30009` | Badge Definition | [58](58.md) | -| `30015` | Interest sets | [51](51.md) | -| `30017` | Create or update a stall | [15](15.md) | -| `30018` | Create or update a product | [15](15.md) | -| `30019` | Marketplace UI/UX | [15](15.md) | -| `30020` | Product sold as an auction | [15](15.md) | -| `30023` | Long-form Content | [23](23.md) | -| `30024` | Draft Long-form Content | [23](23.md) | -| `30030` | Emoji sets | [51](51.md) | -| `30063` | Release artifact sets | [51](51.md) | -| `30078` | Application-specific Data | [78](78.md) | -| `30311` | Live Event | [53](53.md) | -| `30315` | User Statuses | [38](38.md) | -| `30402` | Classified Listing | [99](99.md) | -| `30403` | Draft Classified Listing | [99](99.md) | -| `30617` | Repository announcements | [34](34.md) | -| `30818` | Wiki article | [54](54.md) | -| `30819` | Redirects | [54](54.md) | -| `31890` | Feed | [NUD: Custom Feeds](https://wikifreedia.xyz/cip-01/97c70a44366a6535c1) | -| `31922` | Date-Based Calendar Event | [52](52.md) | -| `31923` | Time-Based Calendar Event | [52](52.md) | -| `31924` | Calendar | [52](52.md) | -| `31925` | Calendar Event RSVP | [52](52.md) | -| `31989` | Handler recommendation | [89](89.md) | -| `31990` | Handler information | [89](89.md) | -| `34235` | Video Event | [71](71.md) | -| `34236` | Short-form Portrait Video Event | [71](71.md) | -| `34237` | Video View Event | [71](71.md) | -| `34550` | Community Definition | [72](72.md) | -| `39000-9` | Group metadata events | [29](29.md) | + +| kind | description | NIP | +| ------------- | ------------------------------- | -------------------------------------- | +| `0` | User Metadata | [01](01.md) | +| `1` | Short Text Note | [01](01.md) | +| `2` | Recommend Relay | 01 (deprecated) | +| `3` | Follows | [02](02.md) | +| `4` | Encrypted Direct Messages | [04](04.md) | +| `5` | Event Deletion | [09](09.md) | +| `6` | Repost | [18](18.md) | +| `7` | Reaction | [25](25.md) | +| `8` | Badge Award | [58](58.md) | +| `9` | Group Chat Message | [29](29.md) | +| `10` | Group Chat Threaded Reply | [29](29.md) | +| `11` | Group Thread | [29](29.md) | +| `12` | Group Thread Reply | [29](29.md) | +| `13` | Seal | [59](59.md) | +| `14` | Direct Message | [17](17.md) | +| `16` | Generic Repost | [18](18.md) | +| `40` | Channel Creation | [28](28.md) | +| `41` | Channel Metadata | [28](28.md) | +| `42` | Channel Message | [28](28.md) | +| `43` | Channel Hide Message | [28](28.md) | +| `44` | Channel Mute User | [28](28.md) | +| `818` | Merge Requests | [54](54.md) | +| `1021` | Bid | [15](15.md) | +| `1022` | Bid confirmation | [15](15.md) | +| `1040` | OpenTimestamps | [03](03.md) | +| `1059` | Gift Wrap | [59](59.md) | +| `1063` | File Metadata | [94](94.md) | +| `1311` | Live Chat Message | [53](53.md) | +| `1617` | Patches | [34](34.md) | +| `1621` | Issues | [34](34.md) | +| `1622` | Replies | [34](34.md) | +| `1630`-`1633` | Status | [34](34.md) | +| `1971` | Problem Tracker | [nostrocket][nostrocket] | +| `1984` | Reporting | [56](56.md) | +| `1985` | Label | [32](32.md) | +| `2003` | Torrent | [35](35.md) | +| `2004` | Torrent Comment | [35](35.md) | +| `2022` | Coinjoin Pool | [joinstr][joinstr] | +| `4550` | Community Post Approval | [72](72.md) | +| `5000`-`5999` | Job Request | [90](90.md) | +| `6000`-`6999` | Job Result | [90](90.md) | +| `7000` | Job Feedback | [90](90.md) | +| `9000`-`9030` | Group Control Events | [29](29.md) | +| `9041` | Zap Goal | [75](75.md) | +| `9734` | Zap Request | [57](57.md) | +| `9735` | Zap | [57](57.md) | +| `9802` | Highlights | [84](84.md) | +| `10000` | Mute list | [51](51.md) | +| `10001` | Pin list | [51](51.md) | +| `10002` | Relay List Metadata | [65](65.md) | +| `10003` | Bookmark list | [51](51.md) | +| `10004` | Communities list | [51](51.md) | +| `10005` | Public chats list | [51](51.md) | +| `10006` | Blocked relays list | [51](51.md) | +| `10007` | Search relays list | [51](51.md) | +| `10009` | User groups | [51](51.md), [29](29.md) | +| `10015` | Interests list | [51](51.md) | +| `10030` | User emoji list | [51](51.md) | +| `10050` | Relay list to receive DMs | [17](17.md) | +| `10096` | File storage server list | [96](96.md) | +| `13194` | Wallet Info | [47](47.md) | +| `21000` | Lightning Pub RPC | [Lightning.Pub][lnpub] | +| `22242` | Client Authentication | [42](42.md) | +| `23194` | Wallet Request | [47](47.md) | +| `23195` | Wallet Response | [47](47.md) | +| `24133` | Nostr Connect | [46](46.md) | +| `27235` | HTTP Auth | [98](98.md) | +| `30000` | Follow sets | [51](51.md) | +| `30001` | Generic lists | [51](51.md) | +| `30002` | Relay sets | [51](51.md) | +| `30003` | Bookmark sets | [51](51.md) | +| `30004` | Curation sets | [51](51.md) | +| `30005` | Video sets | [51](51.md) | +| `30008` | Profile Badges | [58](58.md) | +| `30009` | Badge Definition | [58](58.md) | +| `30015` | Interest sets | [51](51.md) | +| `30017` | Create or update a stall | [15](15.md) | +| `30018` | Create or update a product | [15](15.md) | +| `30019` | Marketplace UI/UX | [15](15.md) | +| `30020` | Product sold as an auction | [15](15.md) | +| `30023` | Long-form Content | [23](23.md) | +| `30024` | Draft Long-form Content | [23](23.md) | +| `30030` | Emoji sets | [51](51.md) | +| `30063` | Release artifact sets | [51](51.md) | +| `30078` | Application-specific Data | [78](78.md) | +| `30311` | Live Event | [53](53.md) | +| `30315` | User Statuses | [38](38.md) | +| `30402` | Classified Listing | [99](99.md) | +| `30403` | Draft Classified Listing | [99](99.md) | +| `30617` | Repository announcements | [34](34.md) | +| `30618` | Repository state announcements | [34](34.md) | +| `30818` | Wiki article | [54](54.md) | +| `30819` | Redirects | [54](54.md) | +| `31890` | Feed | [NUD: Custom Feeds][NUD: Custom Feeds] | +| `31922` | Date-Based Calendar Event | [52](52.md) | +| `31923` | Time-Based Calendar Event | [52](52.md) | +| `31924` | Calendar | [52](52.md) | +| `31925` | Calendar Event RSVP | [52](52.md) | +| `31989` | Handler recommendation | [89](89.md) | +| `31990` | Handler information | [89](89.md) | +| `34235` | Video Event | [71](71.md) | +| `34236` | Short-form Portrait Video Event | [71](71.md) | +| `34237` | Video View Event | [71](71.md) | +| `34550` | Community Definition | [72](72.md) | +| `39000-9` | Group metadata events | [29](29.md) | [NUD: Custom Feeds]: https://wikifreedia.xyz/cip-01/97c70a44366a6535c1 [nostrocket]: https://github.com/nostrocket/NIPS/blob/main/Problems.md @@ -262,7 +264,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos | `imeta` | inline metadata | -- | [92](92.md) | | `lnurl` | `bech32` encoded `lnurl` | -- | [57](57.md) | | `location` | location string | -- | [52](52.md), [99](99.md) | -| `name` | name | -- | [34](34.md), [58](58.md) | +| `name` | name | -- | [34](34.md), [58](58.md), [72](72.md) | | `nonce` | random | difficulty | [13](13.md) | | `preimage` | hash of `bolt11` invoice | -- | [57](57.md) | | `price` | price | currency, frequency | [99](99.md) | From 428a4779d7c4f4c2ff53815e8958e7cf99d69d26 Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Mon, 5 Aug 2024 10:43:24 -0300 Subject: [PATCH 38/43] nip51: add kind 10050 (from NIP-17). --- 51.md | 1 + README.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/51.md b/51.md index fb40b26e..65bc4848 100644 --- a/51.md +++ b/51.md @@ -32,6 +32,7 @@ For example, _mute list_ can contain the public keys of spammers and bad actors | Simple groups | 10009 | [NIP-29](29.md) groups the user is in | `"group"` ([NIP-29](29.md) group ids + mandatory relay URL) | | Interests | 10015 | topics a user may be interested in and pointers | `"t"` (hashtags) and `"a"` (kind:30015 interest set) | | Emojis | 10030 | user preferred emojis and pointers to emoji sets | `"emoji"` (see [NIP-30](30.md)) and `"a"` (kind:30030 emoji set) | +| DM relays | 10050 | Where to receive [NIP-17](17.md) direct messages | `"relay"` (see [NIP-17](17.md)) | | Good wiki authors | 10101 | [NIP-54](54.md) user recommended wiki authors | `"p"` (pubkeys) | | Good wiki relays | 10102 | [NIP-54](54.md) relays deemed to only host useful articles | `"relay"` (relay URLs) | diff --git a/README.md b/README.md index 515f2a27..550888a8 100644 --- a/README.md +++ b/README.md @@ -150,7 +150,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos | `10009` | User groups | [51](51.md), [29](29.md) | | `10015` | Interests list | [51](51.md) | | `10030` | User emoji list | [51](51.md) | -| `10050` | Relay list to receive DMs | [17](17.md) | +| `10050` | Relay list to receive DMs | [51](51.md), [17](17.md) | | `10096` | File storage server list | [96](96.md) | | `13194` | Wallet Info | [47](47.md) | | `21000` | Lightning Pub RPC | [Lightning.Pub][lnpub] | From 14c3310039cf7ac8140e6e27f5a7c47ec8f47a30 Mon Sep 17 00:00:00 2001 From: Oscar Merry Date: Mon, 5 Aug 2024 23:16:49 +0100 Subject: [PATCH 39/43] Add Podcast Publisher GUID --- XX.md | 1 + 1 file changed, 1 insertion(+) diff --git a/XX.md b/XX.md index 636629d9..e7ee5f57 100644 --- a/XX.md +++ b/XX.md @@ -27,6 +27,7 @@ Book ISBNs MUST be referenced _**without hyphens**_ as many book search APIs ret - Podcast RSS Feed GUID: `["i", "podcast:guid:c90e609a-df1e-596a-bd5e-57bcc8aad6cc"]` - https://podcastindex.org/podcast/c90e609a-df1e-596a-bd5e-57bcc8aad6cc - Podcast RSS Item GUID: `["i", "podcast:item:guid:d98d189b-dc7b-45b1-8720-d4b98690f31f"]` +- Podcast RSS Publisher GUID: `["i", "podcast:publisher:guid:18bcbf10-6701-4ffb-b255-bc057390d738"]` ### Movies: From 4d9eb32dc9062868d0d61c15456935dad39364de Mon Sep 17 00:00:00 2001 From: Oscar Merry Date: Mon, 5 Aug 2024 23:51:04 +0100 Subject: [PATCH 40/43] Use NIP-73 --- 24.md | 2 +- XX.md => 73.md | 2 +- README.md | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) rename XX.md => 73.md (99%) diff --git a/24.md b/24.md index 8710af69..ef4196bd 100644 --- a/24.md +++ b/24.md @@ -40,5 +40,5 @@ tags These tags may be present in multiple event kinds. Whenever a different meaning is not specified by some more specific NIP, they have the following meanings: - `r`: a web URL the event is referring to in some way - - `i`: an external id the event is referring to in some way - see [NIP-XX](XX.md) + - `i`: an external id the event is referring to in some way - see [NIP-73](73.md) - `title`: name of [NIP-51](51.md) sets, [NIP-52](52.md) calendar event, [NIP-53](53.md) live event or [NIP-99](99.md) listing diff --git a/XX.md b/73.md similarity index 99% rename from XX.md rename to 73.md index e7ee5f57..12228d36 100644 --- a/XX.md +++ b/73.md @@ -1,4 +1,4 @@ -NIP-XX +NIP-73 ====== External Content IDs diff --git a/README.md b/README.md index 550888a8..6c83ba88 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos - [NIP-70: Protected Events](70.md) - [NIP-71: Video Events](71.md) - [NIP-72: Moderated Communities](72.md) +- [NIP-73: External Content IDs](73.md) - [NIP-75: Zap Goals](75.md) - [NIP-78: Application-specific data](78.md) - [NIP-84: Highlights](84.md) @@ -238,7 +239,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos | `-` | -- | -- | [70](70.md) | | `g` | geohash | -- | [52](52.md) | | `h` | group id | -- | [29](29.md) | -| `i` | identity | proof | [39](39.md) | +| `i` | external identity | proof, url hint | [39](39.md), [73](73.md) | | `k` | kind number (string) | -- | [18](18.md), [25](25.md), [72](72.md) | | `l` | label, label namespace | -- | [32](32.md) | | `L` | label namespace | -- | [32](32.md) | From 5277ee76bed157e2aecd6ac004995d7257773cd3 Mon Sep 17 00:00:00 2001 From: haorendashu <385321165@qq.com> Date: Tue, 6 Aug 2024 21:03:40 +0800 Subject: [PATCH 41/43] remove nip45 code block type remove nip45 code block type and then code will not highlight error. --- 45.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/45.md b/45.md index 780dfb6b..6b253960 100644 --- a/45.md +++ b/45.md @@ -16,14 +16,14 @@ Some queries a client may want to execute against connected relays are prohibiti This 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. -```json +``` ["COUNT", , ...] ``` Counts are returned using a `COUNT` response in the form `{"count": }`. Relays may use probabilistic counts to reduce compute requirements. In case a relay uses probabilistic counts, it MAY indicate it in the response with `approximate` key i.e. `{"count": , "approximate": }`. -```json +``` ["COUNT", , {"count": }] ``` @@ -33,14 +33,14 @@ Whenever the relay decides to refuse to fulfill the `COUNT` request, it MUST ret ### Followers count -```json +``` ["COUNT", , {"kinds": [3], "#p": []}] ["COUNT", , {"count": 238}] ``` ### Count posts and reactions -```json +``` ["COUNT", , {"kinds": [1, 7], "authors": []}] ["COUNT", , {"count": 5}] ``` From 6de688f4594aa2c22b348669bdca6a503a6bf568 Mon Sep 17 00:00:00 2001 From: Vic <88121568+vicariousdrama@users.noreply.github.com> Date: Wed, 7 Aug 2024 08:45:21 +0000 Subject: [PATCH 42/43] Add used fields to Calendar Time Event in NIP-52 (#1137) * Add used fields to Calendar Time Event in NIP-52 Cornychat.com relies on a `t` tag of `audiospace` for filtering. Flockstr.com relies on optional and previously undocumented `audio` and `image` tags for rendering. * Update 52.md * Change tag for `about` to `summary` --- 52.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/52.md b/52.md index f35d9040..97873ef0 100644 --- a/52.md +++ b/52.md @@ -90,9 +90,12 @@ The list of tags are as follows: * `end` (optional) exclusive end Unix timestamp in seconds. If omitted, the calendar event ends instantaneously. * `start_tzid` (optional) time zone of the start timestamp, as defined by the IANA Time Zone Database. e.g., `America/Costa_Rica` * `end_tzid` (optional) time zone of the end timestamp, as defined by the IANA Time Zone Database. e.g., `America/Costa_Rica`. If omitted and `start_tzid` is provided, the time zone of the end timestamp is the same as the start timestamp. +* `summary` (optional) brief description of the calendar event +* `image` (optional) url of an image to use for the event * `location` (optional, repeated) location of the calendar event. e.g. address, GPS coordinates, meeting room name, link to video call * `g` (optional) [geohash](https://en.wikipedia.org/wiki/Geohash) to associate calendar event with a searchable physical location * `p` (optional, repeated) 32-bytes hex pubkey of a participant, optional recommended relay URL, and participant's role in the meeting +* `l` (optional, repeated) label to categorize calendar event. e.g. `audiospace` to denote a scheduled event from a live audio space implementation such as cornychat.com * `t` (optional, repeated) hashtag to categorize calendar event * `r` (optional, repeated) references / links to web pages, documents, video calls, recorded videos, etc. @@ -110,6 +113,8 @@ The following tags are deprecated: ["d", ""], ["title", ""], + ["summary", "<brief description of the calendar event>"], + ["image", "<string with image URI>"], // Timestamps ["start", "<Unix timestamp in seconds>"], @@ -126,6 +131,10 @@ The following tags are deprecated: ["p", "<32-bytes hex of a pubkey>", "<optional recommended relay URL>", "<role>"], ["p", "<32-bytes hex of a pubkey>", "<optional recommended relay URL>", "<role>"], + // Labels (example using com.cornychat namespace denoting the event as an audiospace) + ["L", "com.cornychat"], + ["l", "audiospace", "com.cornychat"], + // Hashtags ["t", "<tag>"], ["t", "<tag>"], From 744bce8fcae0aca07b936b6662db635c8b4253dd Mon Sep 17 00:00:00 2001 From: Don <496156+nikolat@users.noreply.github.com> Date: Fri, 9 Aug 2024 00:36:08 +0900 Subject: [PATCH 43/43] NIP-25: reactions to a website (#1381) * NIP-25: reactions to a website * add note about URL normalization --------- Co-authored-by: fiatjaf_ <fiatjaf@gmail.com> --- 25.md | 20 ++++++++++++++++++++ README.md | 3 ++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/25.md b/25.md index 17c203e1..f0386034 100644 --- a/25.md +++ b/25.md @@ -52,6 +52,26 @@ func make_like_event(pubkey: String, privkey: String, liked: NostrEvent) -> Nost } ``` +Reactions to a website +--------------------- + +If the target of the reaction is a website, the reaction MUST be a `kind 17` event and MUST include an `r` tag with the website's URL. + +```json +{ + "kind": 17, + "content": "⭐", + "tags": [ + ["r", "https://example.com/"] + ], + ...other fields +} +``` + +URLs SHOULD be [normalized](https://datatracker.ietf.org/doc/html/rfc3986#section-6), so that reactions to the same website are not omitted from queries. +A fragment MAY be attached to the URL, to react to a section of the page. +It should be noted that a URL with a fragment is not considered to be the same URL as the original. + Custom Emoji Reaction --------------------- diff --git a/README.md b/README.md index 6c83ba88..d6840fcd 100644 --- a/README.md +++ b/README.md @@ -109,6 +109,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos | `13` | Seal | [59](59.md) | | `14` | Direct Message | [17](17.md) | | `16` | Generic Repost | [18](18.md) | +| `17` | Reaction to a website | [25](25.md) | | `40` | Channel Creation | [28](28.md) | | `41` | Channel Metadata | [28](28.md) | | `42` | Channel Message | [28](28.md) | @@ -245,7 +246,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos | `L` | label namespace | -- | [32](32.md) | | `m` | MIME type | -- | [94](94.md) | | `q` | event id (hex) | relay URL | [18](18.md) | -| `r` | a reference (URL, etc) | petname | [24](24.md) | +| `r` | a reference (URL, etc) | -- | [24](24.md), [25](25.md) | | `r` | relay url | marker | [65](65.md) | | `t` | hashtag | -- | | | `alt` | summary | -- | [31](31.md) |