From 4ae75015e13f1f22d8c010d7e2930688c47bd86b Mon Sep 17 00:00:00 2001 From: limina1 <131614677+limina1@users.noreply.github.com> Date: Fri, 22 Nov 2024 15:14:11 -0500 Subject: [PATCH 01/22] Create 62.md --- 62.md | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 62.md diff --git a/62.md b/62.md new file mode 100644 index 00000000..30e61ca6 --- /dev/null +++ b/62.md @@ -0,0 +1,104 @@ +NIP-62 +====== + +Collections +---------- + +`draft` `optional` + +This NIP defines the minimum specification for collections - ordered, optionally-hierarchical assemblies of nostr events. Collections provide a standard way to organize and present related content, similar to how books organize chapters or journals organize articles. + +## Event Kinds + +This NIP defines two primary event kinds: + +- `30040`: Collection Index +- `30041`: Collection Section + +## kind 30040: Collection Index + +A collection index defines the structure and metadata of a collection. It serves as a table of contents that references the actual content sections. + +### Requirements + +- The `content` field MUST be empty +- MUST include a `title` tag containing the full title of the collection +- MUST be uniquely identifiable by the combination of: + - `d` tag + - `pubkey` + - `kind` (30040) +- MUST include `e` tags listing the events in desired display order + - Referenced events SHOULD be kind 30041 sections or nested kind 30040 indices + - Additional event kinds MAY be supported +- For derivative works: + - MUST include a `p` tag identifying the original author + - MUST include an `E` tag referencing the original event immediately after the `p` tag + +### Example Index + +```json +{ + "id": "", + "pubkey": "", + "created_at": 1725087283, + "kind": 30040, + "tags": [ + ["d", "aesop's-fables-by-aesop"], + ["title", "Aesop's Fables"], + ["author", "Aesop"], + ["i", "isbn:9780765382030"], + ["t", "fables", "classical", "literature"], + ["published_on", "2003-05-03"], + ["published_by", "public domain"], + ["image", "https://imageserver.com/piclink.jpg"], + ["summary", "Collection of selected fables from the ancient Greek philosopher, known as Aesop."], + ["e", "", "", ""], + ["e", "", "", ""], + ["p", ""], + ["E", "", "", ""] + ], + "sig": "" +} +``` + +## 30041: Collection Section + +Sections (also known as zettels, episodes, or chapters) contain the actual content that makes up a collection. + +### Requirements + +- MUST include a `d` tag +- MUST include a `title` tag describing the section (e.g., "Introduction", "Chapter 1", etc.) +- The `content` field: + - MUST contain text meant for display to the end user + - MAY contain AsciiDoc markup + - MAY contain wikilinks (denoted by double brackets) + +### Example Section + +```json +{ + "id": "", + "pubkey": "8ae74c618a4713f32129...", + "created_at": 1708083476, + "kind": 30041, + "tags": [ + ["title", "The Farmer and The Snake"], + ["d", "aesop's-fables-by-aesop-the-farmer-and-the-snake"], + ["wikilink", "fables", "ad9dad8c4006d781d94ae001884b6987caa2a6852f3f43a571ca6838d0ced3af", "wss://thecitadel.nostr1.com"] + ], + "content": "== The Farmer and The Snake\nA [[fable]], by Aesop.\nONE WINTER a Farmer found a Snake stiff and frozen with cold. He had compassion on it, and taking it up, placed it in his bosom. The Snake was quickly revived by the warmth, and resuming its natural instincts, bit its benefactor, inflicting on him a mortal wound. 'Oh,' cried the Farmer with his last breath, 'I am rightly served for pitying a scoundrel.'\nThe greatest kindness will not bind the ungrateful.", + "sig": "49cab8c75fb35cec71d07258..." +} +``` + +## Extensions + +Collections are flexible and can be extended for different types of content. Examples include: + +- Books +- Academic journals +- Course materials +- Documentation + +Additional tags relevant to the specific content type MAY be included in both index and section events. From 4c5b62febaf41e0baf06eab06f18ff7dff957a2b Mon Sep 17 00:00:00 2001 From: limina1 <131614677+limina1@users.noreply.github.com> Date: Fri, 22 Nov 2024 15:26:45 -0500 Subject: [PATCH 02/22] Update 62.md --- 62.md | 1 - 1 file changed, 1 deletion(-) diff --git a/62.md b/62.md index 30e61ca6..72f219a4 100644 --- a/62.md +++ b/62.md @@ -26,7 +26,6 @@ A collection index defines the structure and metadata of a collection. It serves - MUST be uniquely identifiable by the combination of: - `d` tag - `pubkey` - - `kind` (30040) - MUST include `e` tags listing the events in desired display order - Referenced events SHOULD be kind 30041 sections or nested kind 30040 indices - Additional event kinds MAY be supported From 9662559ba8953636efe2e1431137e9c9204bf81d Mon Sep 17 00:00:00 2001 From: limina1 <131614677+limina1@users.noreply.github.com> Date: Fri, 22 Nov 2024 16:14:06 -0500 Subject: [PATCH 03/22] fix typos 62.md --- 62.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/62.md b/62.md index 72f219a4..4e5c435b 100644 --- a/62.md +++ b/62.md @@ -26,6 +26,7 @@ A collection index defines the structure and metadata of a collection. It serves - MUST be uniquely identifiable by the combination of: - `d` tag - `pubkey` + - `kind` - MUST include `e` tags listing the events in desired display order - Referenced events SHOULD be kind 30041 sections or nested kind 30040 indices - Additional event kinds MAY be supported @@ -84,7 +85,7 @@ Sections (also known as zettels, episodes, or chapters) contain the actual conte "tags": [ ["title", "The Farmer and The Snake"], ["d", "aesop's-fables-by-aesop-the-farmer-and-the-snake"], - ["wikilink", "fables", "ad9dad8c4006d781d94ae001884b6987caa2a6852f3f43a571ca6838d0ced3af", "wss://thecitadel.nostr1.com"] + ["wikilink", "fable", "ad9dad8c4006d781d94ae001884b6987caa2a6852f3f43a571ca6838d0ced3af", "wss://thecitadel.nostr1.com"] ], "content": "== The Farmer and The Snake\nA [[fable]], by Aesop.\nONE WINTER a Farmer found a Snake stiff and frozen with cold. He had compassion on it, and taking it up, placed it in his bosom. The Snake was quickly revived by the warmth, and resuming its natural instincts, bit its benefactor, inflicting on him a mortal wound. 'Oh,' cried the Farmer with his last breath, 'I am rightly served for pitying a scoundrel.'\nThe greatest kindness will not bind the ungrateful.", "sig": "49cab8c75fb35cec71d07258..." From 855b39dbc8da4292cdf7530eaefeff538055fe8d Mon Sep 17 00:00:00 2001 From: limina1 <131614677+limina1@users.noreply.github.com> Date: Fri, 22 Nov 2024 19:23:48 -0500 Subject: [PATCH 04/22] Change naming from collections to curated publications 62.md --- 62.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/62.md b/62.md index 4e5c435b..bf5578f2 100644 --- a/62.md +++ b/62.md @@ -1,23 +1,23 @@ NIP-62 ====== -Collections +Curated Publication ---------- `draft` `optional` -This NIP defines the minimum specification for collections - ordered, optionally-hierarchical assemblies of nostr events. Collections provide a standard way to organize and present related content, similar to how books organize chapters or journals organize articles. +This NIP defines the minimum specification for curated publication - ordered, optionally-hierarchical assemblies of nostr events. Collections provide a standard way to organize and present related content, similar to how books organize chapters or journals organize articles. ## Event Kinds This NIP defines two primary event kinds: -- `30040`: Collection Index -- `30041`: Collection Section +- `30040`: Publication Index +- `30041`: Publication Content -## kind 30040: Collection Index +## kind 30040: Publication Index -A collection index defines the structure and metadata of a collection. It serves as a table of contents that references the actual content sections. +A publication index defines the structure and metadata of a collection. It serves as a table of contents that references the actual content sections. ### Requirements @@ -61,9 +61,9 @@ A collection index defines the structure and metadata of a collection. It serves } ``` -## 30041: Collection Section +## 30041: Publication Content -Sections (also known as zettels, episodes, or chapters) contain the actual content that makes up a collection. +Also known as sections, zettels, episodes, or chapters contain the actual content that makes up a collection. ### Requirements From 4c60810324c30e5960b821157a52ac1583f1163b Mon Sep 17 00:00:00 2001 From: limina1 <131614677+limina1@users.noreply.github.com> Date: Fri, 22 Nov 2024 19:44:08 -0500 Subject: [PATCH 05/22] fix tag format 62.md --- 62.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/62.md b/62.md index bf5578f2..47a80d6a 100644 --- a/62.md +++ b/62.md @@ -47,7 +47,9 @@ A publication index defines the structure and metadata of a collection. It serve ["title", "Aesop's Fables"], ["author", "Aesop"], ["i", "isbn:9780765382030"], - ["t", "fables", "classical", "literature"], + ["t", "fables"], + ["t", "classical"], + ["t", "literature"], ["published_on", "2003-05-03"], ["published_by", "public domain"], ["image", "https://imageserver.com/piclink.jpg"], From 9c191379358f04d2fdb1d9f3ae98e9988429bbb6 Mon Sep 17 00:00:00 2001 From: limina1 <131614677+limina1@users.noreply.github.com> Date: Tue, 26 Nov 2024 20:07:24 -0500 Subject: [PATCH 06/22] include option of `a` and `e` tags --- 62.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/62.md b/62.md index 47a80d6a..bdbdfe69 100644 --- a/62.md +++ b/62.md @@ -27,7 +27,8 @@ A publication index defines the structure and metadata of a collection. It serve - `d` tag - `pubkey` - `kind` -- MUST include `e` tags listing the events in desired display order +- MUST include `a` tags or `e` tags, listing the events in desired display order. + - `a` tags automatically will update with edits, while`e` tags will lock entry to a specific version. See [standardized tags](https://github.com/limina1/nips/tree/master?tab=readme-ov-file#standardized-tags) - Referenced events SHOULD be kind 30041 sections or nested kind 30040 indices - Additional event kinds MAY be supported - For derivative works: From 2111dd011437a215c379dc8311b6ed4cd90c4ee1 Mon Sep 17 00:00:00 2001 From: limina1 <131614677+limina1@users.noreply.github.com> Date: Wed, 27 Nov 2024 15:19:39 -0500 Subject: [PATCH 07/22] add `a` tag description security model tag specifies how events should be updated --- 62.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/62.md b/62.md index bdbdfe69..586cfac6 100644 --- a/62.md +++ b/62.md @@ -27,10 +27,14 @@ A publication index defines the structure and metadata of a collection. It serve - `d` tag - `pubkey` - `kind` -- MUST include `a` tags or `e` tags, listing the events in desired display order. - - `a` tags automatically will update with edits, while`e` tags will lock entry to a specific version. See [standardized tags](https://github.com/limina1/nips/tree/master?tab=readme-ov-file#standardized-tags) +- MUST include `a` tags listing the events in desired display order. + - Format: `["a", "kind:pubkey:dtag", "relay hint", "event id"]` + - Optional event ID field enables version tracking while maintaining updateable references - Referenced events SHOULD be kind 30041 sections or nested kind 30040 indices - Additional event kinds MAY be supported +- MUST include a `auto-update` tag specifying update behavior: + - Format: `["auto-update", ""]` + - Controls whether clients should automatically update to newer versions - For derivative works: - MUST include a `p` tag identifying the original author - MUST include an `E` tag referencing the original event immediately after the `p` tag @@ -55,8 +59,9 @@ A publication index defines the structure and metadata of a collection. It serve ["published_by", "public domain"], ["image", "https://imageserver.com/piclink.jpg"], ["summary", "Collection of selected fables from the ancient Greek philosopher, known as Aesop."], - ["e", "", "", ""], - ["e", "", "", ""], + ["a", "", "", ""], + ["a", "", "", ""], + ["auto-update", ""], ["p", ""], ["E", "", "", ""] ], From 1c393c92a8b7d9429fd7b415f10ae07765f5687f Mon Sep 17 00:00:00 2001 From: limina1 <131614677+limina1@users.noreply.github.com> Date: Wed, 27 Nov 2024 15:43:43 -0500 Subject: [PATCH 08/22] Update 62.md --- 62.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/62.md b/62.md index 586cfac6..fc9cc723 100644 --- a/62.md +++ b/62.md @@ -32,7 +32,7 @@ A publication index defines the structure and metadata of a collection. It serve - Optional event ID field enables version tracking while maintaining updateable references - Referenced events SHOULD be kind 30041 sections or nested kind 30040 indices - Additional event kinds MAY be supported -- MUST include a `auto-update` tag specifying update behavior: +- MUST include an `auto-update` tag specifying update behavior: - Format: `["auto-update", ""]` - Controls whether clients should automatically update to newer versions - For derivative works: From a359589f54a87019c0122f023fa80806b8d2cab9 Mon Sep 17 00:00:00 2001 From: limina1 <131614677+limina1@users.noreply.github.com> Date: Thu, 28 Nov 2024 10:56:07 -0500 Subject: [PATCH 09/22] Update 62.md Co-authored-by: arthurfranca --- 62.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/62.md b/62.md index fc9cc723..65f27c66 100644 --- a/62.md +++ b/62.md @@ -28,7 +28,7 @@ A publication index defines the structure and metadata of a collection. It serve - `pubkey` - `kind` - MUST include `a` tags listing the events in desired display order. - - Format: `["a", "kind:pubkey:dtag", "relay hint", "event id"]` + - Format: `["a", "", "", ""]` - Optional event ID field enables version tracking while maintaining updateable references - Referenced events SHOULD be kind 30041 sections or nested kind 30040 indices - Additional event kinds MAY be supported From 0f64626cb5cf6197ba5389381ac553a6700eb16a Mon Sep 17 00:00:00 2001 From: limina1 <131614677+limina1@users.noreply.github.com> Date: Thu, 28 Nov 2024 10:58:11 -0500 Subject: [PATCH 10/22] Apply suggestions from code review Co-authored-by: arthurfranca --- 62.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/62.md b/62.md index 65f27c66..e8281277 100644 --- a/62.md +++ b/62.md @@ -55,12 +55,12 @@ A publication index defines the structure and metadata of a collection. It serve ["t", "fables"], ["t", "classical"], ["t", "literature"], - ["published_on", "2003-05-03"], + ["published_on", "2003-05-13"], ["published_by", "public domain"], ["image", "https://imageserver.com/piclink.jpg"], ["summary", "Collection of selected fables from the ancient Greek philosopher, known as Aesop."], - ["a", "", "", ""], - ["a", "", "", ""], + ["a", "", "", ""], + ["a", "", "", ""], ["auto-update", ""], ["p", ""], ["E", "", "", ""] From 190a860f2782891e02effd7b146399f971f15634 Mon Sep 17 00:00:00 2001 From: limina1 <131614677+limina1@users.noreply.github.com> Date: Thu, 28 Nov 2024 11:00:45 -0500 Subject: [PATCH 11/22] Update 62.md Co-authored-by: arthurfranca --- 62.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/62.md b/62.md index e8281277..f7a5f395 100644 --- a/62.md +++ b/62.md @@ -93,7 +93,7 @@ Also known as sections, zettels, episodes, or chapters contain the actual conten "tags": [ ["title", "The Farmer and The Snake"], ["d", "aesop's-fables-by-aesop-the-farmer-and-the-snake"], - ["wikilink", "fable", "ad9dad8c4006d781d94ae001884b6987caa2a6852f3f43a571ca6838d0ced3af", "wss://thecitadel.nostr1.com"] + ["wikilink", "fable", "", "wss://thecitadel.nostr1.com", ""] ], "content": "== The Farmer and The Snake\nA [[fable]], by Aesop.\nONE WINTER a Farmer found a Snake stiff and frozen with cold. He had compassion on it, and taking it up, placed it in his bosom. The Snake was quickly revived by the warmth, and resuming its natural instincts, bit its benefactor, inflicting on him a mortal wound. 'Oh,' cried the Farmer with his last breath, 'I am rightly served for pitying a scoundrel.'\nThe greatest kindness will not bind the ungrateful.", "sig": "49cab8c75fb35cec71d07258..." From c96a0b1f5aa887f7a914a50881bbfa38b483f7c5 Mon Sep 17 00:00:00 2001 From: limina1 <131614677+limina1@users.noreply.github.com> Date: Thu, 28 Nov 2024 14:13:47 -0500 Subject: [PATCH 12/22] Update 62.md --- 62.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/62.md b/62.md index f7a5f395..6d74ba02 100644 --- a/62.md +++ b/62.md @@ -63,7 +63,7 @@ A publication index defines the structure and metadata of a collection. It serve ["a", "", "", ""], ["auto-update", ""], ["p", ""], - ["E", "", "", ""] + ["A", "", "", ""] ], "sig": "" } From a83542b658c01bbe96da05410d73f973f53ae298 Mon Sep 17 00:00:00 2001 From: limina1 <131614677+limina1@users.noreply.github.com> Date: Thu, 30 Jan 2025 02:05:04 -0500 Subject: [PATCH 13/22] Update 62.md Co-authored-by: dluvian <133484344+dluvian@users.noreply.github.com> --- 62.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/62.md b/62.md index 6d74ba02..f7a5f395 100644 --- a/62.md +++ b/62.md @@ -63,7 +63,7 @@ A publication index defines the structure and metadata of a collection. It serve ["a", "", "", ""], ["auto-update", ""], ["p", ""], - ["A", "", "", ""] + ["E", "", "", ""] ], "sig": "" } From 40de29cd6f367eaa384b9f2dd09347587c94aaaf Mon Sep 17 00:00:00 2001 From: limina1 Date: Sat, 1 Feb 2025 13:38:02 -0500 Subject: [PATCH 14/22] extend 56.md --- 56.md | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) diff --git a/56.md b/56.md index f7b1b1a9..d05e0163 100644 --- a/56.md +++ b/56.md @@ -91,3 +91,91 @@ Relay behavior It is not recommended that relays perform automatic moderation using reports, as they can be easily gamed. Admins could use reports from trusted moderators to takedown illegal or explicit content if the relay does not allow such things. + +Domain Protection and Link Safety +======================================= + +This extension to NIP-56 defines standards for domain protection and link safety in Nostr clients. + +Motivation +---------- +To protect users from potentially malicious links and unwanted content while maintaining the decentralized nature of Nostr. + +Specification +------------ + +### Domain List Event + +A kind `10099` replaceable event for storing user domain preferences: + +```jsonc +{ + "kind": 10099, + "content": "", + "tags": [ + ["d", "domain_lists"], // identifier + ["white", "nostr.build"], + ["white", "void.cat"], + ["black", "malicious-site.net"], + ["black", "scam-domain.com"] + ["unknown", "ask"] // Options: "load" | "block" | "ask" + ] +} +``` + +### Report Event Extension + +Extend kind `1984` events to include domain reporting: + +```jsonc +{ + "kind": 1984, + "tags": [ + ["u", "https://malicious-site.net", "malware"], + ["L", "security.domain.safety"], + ["l", "NS-mal", "security.domain.safety"] + ], + "content": "Domain distributes malware", +} +``` + +Additional Report Types +---------------------- +Add the following report types for domains: +- `ip_grab` - Sites attempting to collect IP addresses +- `redirect` - Unexpected redirects to other domains +- `nsfw_content` - Adult or explicit content +- `phishing` - Fraudulent sites imitating legitimate services + +Client Implementation +-------------------- + +### Domain List Management +1. Clients MUST store user domain preferences in kind `10099` events +2. Clients SHOULD provide UI for managing white/blacklisted domains +3. Clients MAY implement an "ask" list for domains requiring user approval + +### Link Processing +1. Clients MUST check all links against user domain lists +2. For whitelisted domains: + - Load content automatically + - Display domain safety indicator +3. For blacklisted domains: + - Display link as plain text only + - Show warning about blocked status + - Provide override option with clear warning +4. For unknown domains: + - Display link with neutral indicator + - Optionally require user confirmation before loading + - Provide quick actions to add to white/blacklist + +### Report Aggregation +1. Clients SHOULD track domain report counts from followed users +2. Clients MAY use report thresholds to suggest domain blocking +3. Clients SHOULD cache domain reports for performance + +Relay Behavior +------------- +1. Relays SHOULD accept and store kind `10099` events +2. Relays MAY maintain aggregated domain report statistics +3. Relays MUST NOT automatically block domains based on reports From e87020a11a6ed6e1ef4383b1b9156fd728884cae Mon Sep 17 00:00:00 2001 From: limina1 <131614677+limina1@users.noreply.github.com> Date: Fri, 7 Feb 2025 19:08:18 -0500 Subject: [PATCH 15/22] Delete 56.md --- 56.md | 181 ---------------------------------------------------------- 1 file changed, 181 deletions(-) delete mode 100644 56.md diff --git a/56.md b/56.md deleted file mode 100644 index d05e0163..00000000 --- a/56.md +++ /dev/null @@ -1,181 +0,0 @@ -NIP-56 -====== - -Reporting ---------- - -`optional` - -A report is a `kind 1984` event that signals to users and relays that -some referenced content is objectionable. The definition of objectionable is -obviously subjective and all agents on the network (users, apps, relays, etc.) -may consume and take action on them as they see fit. - -The `content` MAY contain additional information submitted by the entity -reporting the content. - -Tags ----- - -The report event MUST include a `p` tag referencing the pubkey of the user you -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 -being reported, which consists of the following report types: - -- `nudity` - depictions of nudity, porn, etc. -- `malware` - virus, trojan horse, worm, robot, spyware, adware, back door, ransomware, rootkit, kidnapper, etc. -- `profanity` - profanity, hateful speech, etc. -- `illegal` - something which may be illegal in some jurisdiction -- `spam` - spam -- `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` - -`l` and `L` tags MAY be also be used as defined in [NIP-32](32.md) to support -further qualification and querying. - -Example events --------------- - -```jsonc -{ - "kind": 1984, - "tags": [ - ["p", , "nudity"], - ["L", "social.nos.ontology"], - ["l", "NS-nud", "social.nos.ontology"] - ], - "content": "", - // other fields... -} -``` - -```jsonc -{ - "kind": 1984, - "tags": [ - ["e", , "illegal"], - ["p", ] - ], - "content": "He's insulting the king!", - // other fields... -} -``` - -```jsonc -{ - "kind": 1984, - "tags": [ - ["p", , "impersonation"] - ], - "content": "Profile is impersonating nostr:", - // other fields... -} -``` - -Client behavior ---------------- - -Clients can use reports from friends to make moderation decisions if they -choose to. For instance, if 3+ of your friends report a profile for `nudity`, -clients can have an option to automatically blur photos from said account. - - -Relay behavior --------------- - -It is not recommended that relays perform automatic moderation using reports, -as they can be easily gamed. Admins could use reports from trusted moderators to -takedown illegal or explicit content if the relay does not allow such things. - -Domain Protection and Link Safety -======================================= - -This extension to NIP-56 defines standards for domain protection and link safety in Nostr clients. - -Motivation ----------- -To protect users from potentially malicious links and unwanted content while maintaining the decentralized nature of Nostr. - -Specification ------------- - -### Domain List Event - -A kind `10099` replaceable event for storing user domain preferences: - -```jsonc -{ - "kind": 10099, - "content": "", - "tags": [ - ["d", "domain_lists"], // identifier - ["white", "nostr.build"], - ["white", "void.cat"], - ["black", "malicious-site.net"], - ["black", "scam-domain.com"] - ["unknown", "ask"] // Options: "load" | "block" | "ask" - ] -} -``` - -### Report Event Extension - -Extend kind `1984` events to include domain reporting: - -```jsonc -{ - "kind": 1984, - "tags": [ - ["u", "https://malicious-site.net", "malware"], - ["L", "security.domain.safety"], - ["l", "NS-mal", "security.domain.safety"] - ], - "content": "Domain distributes malware", -} -``` - -Additional Report Types ----------------------- -Add the following report types for domains: -- `ip_grab` - Sites attempting to collect IP addresses -- `redirect` - Unexpected redirects to other domains -- `nsfw_content` - Adult or explicit content -- `phishing` - Fraudulent sites imitating legitimate services - -Client Implementation --------------------- - -### Domain List Management -1. Clients MUST store user domain preferences in kind `10099` events -2. Clients SHOULD provide UI for managing white/blacklisted domains -3. Clients MAY implement an "ask" list for domains requiring user approval - -### Link Processing -1. Clients MUST check all links against user domain lists -2. For whitelisted domains: - - Load content automatically - - Display domain safety indicator -3. For blacklisted domains: - - Display link as plain text only - - Show warning about blocked status - - Provide override option with clear warning -4. For unknown domains: - - Display link with neutral indicator - - Optionally require user confirmation before loading - - Provide quick actions to add to white/blacklist - -### Report Aggregation -1. Clients SHOULD track domain report counts from followed users -2. Clients MAY use report thresholds to suggest domain blocking -3. Clients SHOULD cache domain reports for performance - -Relay Behavior -------------- -1. Relays SHOULD accept and store kind `10099` events -2. Relays MAY maintain aggregated domain report statistics -3. Relays MUST NOT automatically block domains based on reports From 6c7e756f92d5eae3303597c727d7b4b1d652748d Mon Sep 17 00:00:00 2001 From: limina1 <131614677+limina1@users.noreply.github.com> Date: Tue, 11 Feb 2025 11:01:19 -0500 Subject: [PATCH 16/22] Create 56.md --- 56.md | 181 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 181 insertions(+) create mode 100644 56.md diff --git a/56.md b/56.md new file mode 100644 index 00000000..d05e0163 --- /dev/null +++ b/56.md @@ -0,0 +1,181 @@ +NIP-56 +====== + +Reporting +--------- + +`optional` + +A report is a `kind 1984` event that signals to users and relays that +some referenced content is objectionable. The definition of objectionable is +obviously subjective and all agents on the network (users, apps, relays, etc.) +may consume and take action on them as they see fit. + +The `content` MAY contain additional information submitted by the entity +reporting the content. + +Tags +---- + +The report event MUST include a `p` tag referencing the pubkey of the user you +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 +being reported, which consists of the following report types: + +- `nudity` - depictions of nudity, porn, etc. +- `malware` - virus, trojan horse, worm, robot, spyware, adware, back door, ransomware, rootkit, kidnapper, etc. +- `profanity` - profanity, hateful speech, etc. +- `illegal` - something which may be illegal in some jurisdiction +- `spam` - spam +- `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` + +`l` and `L` tags MAY be also be used as defined in [NIP-32](32.md) to support +further qualification and querying. + +Example events +-------------- + +```jsonc +{ + "kind": 1984, + "tags": [ + ["p", , "nudity"], + ["L", "social.nos.ontology"], + ["l", "NS-nud", "social.nos.ontology"] + ], + "content": "", + // other fields... +} +``` + +```jsonc +{ + "kind": 1984, + "tags": [ + ["e", , "illegal"], + ["p", ] + ], + "content": "He's insulting the king!", + // other fields... +} +``` + +```jsonc +{ + "kind": 1984, + "tags": [ + ["p", , "impersonation"] + ], + "content": "Profile is impersonating nostr:", + // other fields... +} +``` + +Client behavior +--------------- + +Clients can use reports from friends to make moderation decisions if they +choose to. For instance, if 3+ of your friends report a profile for `nudity`, +clients can have an option to automatically blur photos from said account. + + +Relay behavior +-------------- + +It is not recommended that relays perform automatic moderation using reports, +as they can be easily gamed. Admins could use reports from trusted moderators to +takedown illegal or explicit content if the relay does not allow such things. + +Domain Protection and Link Safety +======================================= + +This extension to NIP-56 defines standards for domain protection and link safety in Nostr clients. + +Motivation +---------- +To protect users from potentially malicious links and unwanted content while maintaining the decentralized nature of Nostr. + +Specification +------------ + +### Domain List Event + +A kind `10099` replaceable event for storing user domain preferences: + +```jsonc +{ + "kind": 10099, + "content": "", + "tags": [ + ["d", "domain_lists"], // identifier + ["white", "nostr.build"], + ["white", "void.cat"], + ["black", "malicious-site.net"], + ["black", "scam-domain.com"] + ["unknown", "ask"] // Options: "load" | "block" | "ask" + ] +} +``` + +### Report Event Extension + +Extend kind `1984` events to include domain reporting: + +```jsonc +{ + "kind": 1984, + "tags": [ + ["u", "https://malicious-site.net", "malware"], + ["L", "security.domain.safety"], + ["l", "NS-mal", "security.domain.safety"] + ], + "content": "Domain distributes malware", +} +``` + +Additional Report Types +---------------------- +Add the following report types for domains: +- `ip_grab` - Sites attempting to collect IP addresses +- `redirect` - Unexpected redirects to other domains +- `nsfw_content` - Adult or explicit content +- `phishing` - Fraudulent sites imitating legitimate services + +Client Implementation +-------------------- + +### Domain List Management +1. Clients MUST store user domain preferences in kind `10099` events +2. Clients SHOULD provide UI for managing white/blacklisted domains +3. Clients MAY implement an "ask" list for domains requiring user approval + +### Link Processing +1. Clients MUST check all links against user domain lists +2. For whitelisted domains: + - Load content automatically + - Display domain safety indicator +3. For blacklisted domains: + - Display link as plain text only + - Show warning about blocked status + - Provide override option with clear warning +4. For unknown domains: + - Display link with neutral indicator + - Optionally require user confirmation before loading + - Provide quick actions to add to white/blacklist + +### Report Aggregation +1. Clients SHOULD track domain report counts from followed users +2. Clients MAY use report thresholds to suggest domain blocking +3. Clients SHOULD cache domain reports for performance + +Relay Behavior +------------- +1. Relays SHOULD accept and store kind `10099` events +2. Relays MAY maintain aggregated domain report statistics +3. Relays MUST NOT automatically block domains based on reports From 2ef90cda50470fc895274e7858aa9b65684c92ae Mon Sep 17 00:00:00 2001 From: limina1 <131614677+limina1@users.noreply.github.com> Date: Wed, 12 Feb 2025 18:18:15 -0500 Subject: [PATCH 17/22] Delete 62.md --- 62.md | 112 ---------------------------------------------------------- 1 file changed, 112 deletions(-) delete mode 100644 62.md diff --git a/62.md b/62.md deleted file mode 100644 index f7a5f395..00000000 --- a/62.md +++ /dev/null @@ -1,112 +0,0 @@ -NIP-62 -====== - -Curated Publication ----------- - -`draft` `optional` - -This NIP defines the minimum specification for curated publication - ordered, optionally-hierarchical assemblies of nostr events. Collections provide a standard way to organize and present related content, similar to how books organize chapters or journals organize articles. - -## Event Kinds - -This NIP defines two primary event kinds: - -- `30040`: Publication Index -- `30041`: Publication Content - -## kind 30040: Publication Index - -A publication index defines the structure and metadata of a collection. It serves as a table of contents that references the actual content sections. - -### Requirements - -- The `content` field MUST be empty -- MUST include a `title` tag containing the full title of the collection -- MUST be uniquely identifiable by the combination of: - - `d` tag - - `pubkey` - - `kind` -- MUST include `a` tags listing the events in desired display order. - - Format: `["a", "", "", ""]` - - Optional event ID field enables version tracking while maintaining updateable references - - Referenced events SHOULD be kind 30041 sections or nested kind 30040 indices - - Additional event kinds MAY be supported -- MUST include an `auto-update` tag specifying update behavior: - - Format: `["auto-update", ""]` - - Controls whether clients should automatically update to newer versions -- For derivative works: - - MUST include a `p` tag identifying the original author - - MUST include an `E` tag referencing the original event immediately after the `p` tag - -### Example Index - -```json -{ - "id": "", - "pubkey": "", - "created_at": 1725087283, - "kind": 30040, - "tags": [ - ["d", "aesop's-fables-by-aesop"], - ["title", "Aesop's Fables"], - ["author", "Aesop"], - ["i", "isbn:9780765382030"], - ["t", "fables"], - ["t", "classical"], - ["t", "literature"], - ["published_on", "2003-05-13"], - ["published_by", "public domain"], - ["image", "https://imageserver.com/piclink.jpg"], - ["summary", "Collection of selected fables from the ancient Greek philosopher, known as Aesop."], - ["a", "", "", ""], - ["a", "", "", ""], - ["auto-update", ""], - ["p", ""], - ["E", "", "", ""] - ], - "sig": "" -} -``` - -## 30041: Publication Content - -Also known as sections, zettels, episodes, or chapters contain the actual content that makes up a collection. - -### Requirements - -- MUST include a `d` tag -- MUST include a `title` tag describing the section (e.g., "Introduction", "Chapter 1", etc.) -- The `content` field: - - MUST contain text meant for display to the end user - - MAY contain AsciiDoc markup - - MAY contain wikilinks (denoted by double brackets) - -### Example Section - -```json -{ - "id": "", - "pubkey": "8ae74c618a4713f32129...", - "created_at": 1708083476, - "kind": 30041, - "tags": [ - ["title", "The Farmer and The Snake"], - ["d", "aesop's-fables-by-aesop-the-farmer-and-the-snake"], - ["wikilink", "fable", "", "wss://thecitadel.nostr1.com", ""] - ], - "content": "== The Farmer and The Snake\nA [[fable]], by Aesop.\nONE WINTER a Farmer found a Snake stiff and frozen with cold. He had compassion on it, and taking it up, placed it in his bosom. The Snake was quickly revived by the warmth, and resuming its natural instincts, bit its benefactor, inflicting on him a mortal wound. 'Oh,' cried the Farmer with his last breath, 'I am rightly served for pitying a scoundrel.'\nThe greatest kindness will not bind the ungrateful.", - "sig": "49cab8c75fb35cec71d07258..." -} -``` - -## Extensions - -Collections are flexible and can be extended for different types of content. Examples include: - -- Books -- Academic journals -- Course materials -- Documentation - -Additional tags relevant to the specific content type MAY be included in both index and section events. From 2222e5a85c0c8c5531b08ee14b139279b0ec8fe8 Mon Sep 17 00:00:00 2001 From: limina1 <131614677+limina1@users.noreply.github.com> Date: Wed, 12 Feb 2025 18:21:09 -0500 Subject: [PATCH 18/22] Update 56.md --- 56.md | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/56.md b/56.md index cb47b17a..1486cdd0 100644 --- a/56.md +++ b/56.md @@ -110,14 +110,9 @@ takedown illegal or explicit content if the relay does not allow such things. Domain Protection and Link Safety ======================================= -This extension to NIP-56 defines standards for domain protection and link safety in Nostr clients. - -Motivation ----------- -To protect users from potentially malicious links and unwanted content while maintaining the decentralized nature of Nostr. - +This extension to NIP-56 defines standards for domain protection and link safety in Nostr clients. It aims to help clients protect users from unknown, potentially malicious links while also enabling users to make informed decisions should they want to modify client defaults. Specification ------------- + ### Domain List Event @@ -167,8 +162,9 @@ Client Implementation ### Domain List Management 1. Clients MUST store user domain preferences in kind `10099` events -2. Clients SHOULD provide UI for managing white/blacklisted domains -3. Clients MAY implement an "ask" list for domains requiring user approval +2. Clients SHOULD NOT show posts containing links tagged as `black` in the user's feed +3. Clients SHOULD provide UI for managing white/blacklisted domains +4. Clients MAY implement an "ask" list for domains requiring user approval ### Link Processing 1. Clients MUST check all links against user domain lists @@ -193,4 +189,4 @@ Relay Behavior ------------- 1. Relays SHOULD accept and store kind `10099` events 2. Relays MAY maintain aggregated domain report statistics -3. Relays MUST NOT automatically block domains based on reports +3. Relays MUST NOT automatically block notes with blacklisted domains based on reports From 339f2f5425351cb039d38888063c2daa3c848978 Mon Sep 17 00:00:00 2001 From: limina1 <131614677+limina1@users.noreply.github.com> Date: Mon, 17 Feb 2025 21:12:18 -0500 Subject: [PATCH 19/22] Update 56.md --- 56.md | 84 ----------------------------------------------------------- 1 file changed, 84 deletions(-) diff --git a/56.md b/56.md index 1486cdd0..dc6f0983 100644 --- a/56.md +++ b/56.md @@ -106,87 +106,3 @@ Relay behavior It is not recommended that relays perform automatic moderation using reports, as they can be easily gamed. Admins could use reports from trusted moderators to takedown illegal or explicit content if the relay does not allow such things. - -Domain Protection and Link Safety -======================================= - -This extension to NIP-56 defines standards for domain protection and link safety in Nostr clients. It aims to help clients protect users from unknown, potentially malicious links while also enabling users to make informed decisions should they want to modify client defaults. -Specification - - -### Domain List Event - -A kind `10099` replaceable event for storing user domain preferences: - -```jsonc -{ - "kind": 10099, - "content": "", - "tags": [ - ["d", "domain_lists"], // identifier - ["white", "nostr.build"], - ["white", "void.cat"], - ["black", "malicious-site.net"], - ["black", "scam-domain.com"] - ["unknown", "ask"] // Options: "load" | "block" | "ask" - ] -} -``` - -### Report Event Extension - -Extend kind `1984` events to include domain reporting: - -```jsonc -{ - "kind": 1984, - "tags": [ - ["u", "https://malicious-site.net", "malware"], - ["L", "security.domain.safety"], - ["l", "NS-mal", "security.domain.safety"] - ], - "content": "Domain distributes malware", -} -``` - -Additional Report Types ----------------------- -Add the following report types for domains: -- `ip_grab` - Sites attempting to collect IP addresses -- `redirect` - Unexpected redirects to other domains -- `nsfw_content` - Adult or explicit content -- `phishing` - Fraudulent sites imitating legitimate services - -Client Implementation --------------------- - -### Domain List Management -1. Clients MUST store user domain preferences in kind `10099` events -2. Clients SHOULD NOT show posts containing links tagged as `black` in the user's feed -3. Clients SHOULD provide UI for managing white/blacklisted domains -4. Clients MAY implement an "ask" list for domains requiring user approval - -### Link Processing -1. Clients MUST check all links against user domain lists -2. For whitelisted domains: - - Load content automatically - - Display domain safety indicator -3. For blacklisted domains: - - Display link as plain text only - - Show warning about blocked status - - Provide override option with clear warning -4. For unknown domains: - - Display link with neutral indicator - - Optionally require user confirmation before loading - - Provide quick actions to add to white/blacklist - -### Report Aggregation -1. Clients SHOULD track domain report counts from followed users -2. Clients MAY use report thresholds to suggest domain blocking -3. Clients SHOULD cache domain reports for performance - -Relay Behavior -------------- -1. Relays SHOULD accept and store kind `10099` events -2. Relays MAY maintain aggregated domain report statistics -3. Relays MUST NOT automatically block notes with blacklisted domains based on reports From 921e79ec73aca8f08d68864cd84bf6788bc73d97 Mon Sep 17 00:00:00 2001 From: limina1 <131614677+limina1@users.noreply.github.com> Date: Mon, 17 Feb 2025 21:32:57 -0500 Subject: [PATCH 20/22] Add link safety 51.md --- 51.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/51.md b/51.md index 87744c72..16952bd3 100644 --- a/51.md +++ b/51.md @@ -151,6 +151,49 @@ Some clients have used these lists in the past, but they should work on transiti } ``` +### Link Safety + +A kind `10099` replaceable event for storing user domain preferences. If a client automatically loads content links, these provide settings to the user to change their preferences. Aggregating kind `10099` from other users can be useful in informing users should they change the default settings. + +```jsonc +{ + "kind": 10099, + "content": "", + "tags": [ + ["d", "domain_lists"], // identifier + ["white", "nostr.build"], + ["white", "void.cat"], + ["black", "malicious-site.net"], + ["black", "scam-domain.com"] + ["unknown", "ask"] // Options: "load" | "block" | "ask" + ] +} +``` + +### Report Event Extension + +Extend kind `1984` events to include domain reporting: + +```jsonc +{ + "kind": 1984, + "tags": [ + ["u", "https://malicious-site.net", "malware"], + ["L", "security.domain.safety"], + ["l", "NS-mal", "security.domain.safety"] + ], + "content": "Domain distributes malware", +} +``` + +Example Report Types +---------------------- +Add the following report types for domains: +- `ip_grab` - Sites attempting to collect IP addresses +- `redirect` - Unexpected redirects to other domains +- `nsfw_content` - Adult or explicit content +- `phishing` - Fraudulent sites imitating legitimate services + ## Encryption process pseudocode ```scala From 9fc96d8aab076f518048e5ac2d927de74fcb3576 Mon Sep 17 00:00:00 2001 From: limina1 <131614677+limina1@users.noreply.github.com> Date: Mon, 17 Feb 2025 21:39:17 -0500 Subject: [PATCH 21/22] change phrasing 51.md --- 51.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/51.md b/51.md index 16952bd3..fdea932e 100644 --- a/51.md +++ b/51.md @@ -153,7 +153,7 @@ Some clients have used these lists in the past, but they should work on transiti ### Link Safety -A kind `10099` replaceable event for storing user domain preferences. If a client automatically loads content links, these provide settings to the user to change their preferences. Aggregating kind `10099` from other users can be useful in informing users should they change the default settings. +A kind `10099` replaceable event for storing user domain preferences. ```jsonc { From e70e4916aef058542edea76a3b723d17c721e70c Mon Sep 17 00:00:00 2001 From: limina1 <131614677+limina1@users.noreply.github.com> Date: Thu, 27 Feb 2025 15:29:54 -0500 Subject: [PATCH 22/22] Update 51.md --- 51.md | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/51.md b/51.md index fdea932e..2108891c 100644 --- a/51.md +++ b/51.md @@ -170,30 +170,6 @@ A kind `10099` replaceable event for storing user domain preferences. } ``` -### Report Event Extension - -Extend kind `1984` events to include domain reporting: - -```jsonc -{ - "kind": 1984, - "tags": [ - ["u", "https://malicious-site.net", "malware"], - ["L", "security.domain.safety"], - ["l", "NS-mal", "security.domain.safety"] - ], - "content": "Domain distributes malware", -} -``` - -Example Report Types ----------------------- -Add the following report types for domains: -- `ip_grab` - Sites attempting to collect IP addresses -- `redirect` - Unexpected redirects to other domains -- `nsfw_content` - Adult or explicit content -- `phishing` - Fraudulent sites imitating legitimate services - ## Encryption process pseudocode ```scala