From 682e4c4ad79377bfb4d298e0f00242ed02a92ec4 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Fri, 11 Oct 2024 09:08:21 -0400 Subject: [PATCH 01/16] Adds service providers --- 85.md | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 85.md diff --git a/85.md b/85.md new file mode 100644 index 0000000000..4712c2dd42 --- /dev/null +++ b/85.md @@ -0,0 +1,54 @@ +NIP-85 +====== + +Trusted Assertions +------------------ + +`draft` `optional` + +Certain calculations in Nostr require access to the entire dataset of events and are impossible to do directly by Clients. This NIP allows the creation of services that can perform such calculations and output signed events for each result in a continuous basis. Each calculation types receives a separate event kind. Users can setup which service providers they trust to perform these calculations and Clients can load and display the results accordingly. + +Assertions are always addressable events with the `d` tag pointing to the subject of the assertion. + +| name | kind | `d` tag value | result tags | +| -------------------- | ----- | ------------- | ------------------------------------- | +| Follower Count | 30382 | target pubkey | `"followers"` (integer) | +| WebOfTrust Score | 30382 | target pubkey | `"wot"` (integer, normalized 0-100) | +| Zap Amount Received | 30382 | target pubkey | `"zap_amt_recd"` (integer, millisats) | +| Zap Amount Sent | 30382 | target pubkey | `"zap_amt_sent"` (integer, millisats) | +| Zap Number Received | 30382 | target pubkey | `"zap_num_recd"` (integer, millisats) | +| Zap Number Sent | 30382 | target pubkey | `"zap_num_sent"` (integer, millisats) | + +Example: + +```jsonc +{ + "kind": 30382, + "tags": [ + ["d", "e88a691e98d9987c964521dff60025f60700378a4879180dcbbb4a5027850411"], + ["wot", "89"], + ["zap_amt_sent", "1000000"], + ], + "content": "", + //... +} +``` + +## Declaring Trusted Service Providers + +Kind `10040` lists the user's authorized providers for each service. The service tag is followed by the `pubkey` of the service and the relay where the results are published. + +```jsonc +{ + "kind": 10040, + "tags": [ + ["wot", "818a39b5f164235f86254b12ca586efccc1f95e98b45cb1c91c71dc5d9486dda", "wss://relay.nostr.band"], + ["wot", "3d842afecd5e293f28b6627933704a3fb8ce153aa91d790ab11f6a752d44a42d", "wss://nostr.wine"], + ["zap_amt_sent", "818a39b5f164235f86254b12ca586efccc1f95e98b45cb1c91c71dc5d9486dda", "wss://relay.nostr.band"], + ], + "content": "", + //... +} +``` + +Clients should download this list, load and display assertions when appropriate. \ No newline at end of file From e666636859f76330bacaf91181253a5b57887348 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Fri, 11 Oct 2024 09:18:11 -0400 Subject: [PATCH 02/16] Adds service provider revenue model --- 85.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/85.md b/85.md index 4712c2dd42..f9e77eef8c 100644 --- a/85.md +++ b/85.md @@ -10,14 +10,14 @@ Certain calculations in Nostr require access to the entire dataset of events and Assertions are always addressable events with the `d` tag pointing to the subject of the assertion. -| name | kind | `d` tag value | result tags | -| -------------------- | ----- | ------------- | ------------------------------------- | -| Follower Count | 30382 | target pubkey | `"followers"` (integer) | -| WebOfTrust Score | 30382 | target pubkey | `"wot"` (integer, normalized 0-100) | -| Zap Amount Received | 30382 | target pubkey | `"zap_amt_recd"` (integer, millisats) | -| Zap Amount Sent | 30382 | target pubkey | `"zap_amt_sent"` (integer, millisats) | -| Zap Number Received | 30382 | target pubkey | `"zap_num_recd"` (integer, millisats) | -| Zap Number Sent | 30382 | target pubkey | `"zap_num_sent"` (integer, millisats) | +| name | kind | `d` tag value | result tags | +| -------------------- | ----- | ------------- | --------------------------------------- | +| Follower Count | 30382 | target pubkey | `"followers"` (integer) | +| WebOfTrust Score | 30382 | target pubkey | `"wot"` (integer, normalized 0-100) | +| Zap Amount Received | 30382 | target pubkey | `"zap_amt_recd"` (integer, millisats) | +| Zap Amount Sent | 30382 | target pubkey | `"zap_amt_sent"` (integer, millisats) | +| Zap Number Received | 30382 | target pubkey | `"zap_num_recd"` (integer, evt counter) | +| Zap Number Sent | 30382 | target pubkey | `"zap_num_sent"` (integer, evt counter) | Example: @@ -34,6 +34,8 @@ Example: } ``` +Service providers SHOULD update their results constantly and MAY limit access to their results by using paid relays. + ## Declaring Trusted Service Providers Kind `10040` lists the user's authorized providers for each service. The service tag is followed by the `pubkey` of the service and the relay where the results are published. From 9c38c8eb6dea6ad194daf57c21862e2305459163 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Fri, 11 Oct 2024 09:43:07 -0400 Subject: [PATCH 03/16] Fix typos --- 85.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/85.md b/85.md index f9e77eef8c..ec324b6dc7 100644 --- a/85.md +++ b/85.md @@ -6,9 +6,9 @@ Trusted Assertions `draft` `optional` -Certain calculations in Nostr require access to the entire dataset of events and are impossible to do directly by Clients. This NIP allows the creation of services that can perform such calculations and output signed events for each result in a continuous basis. Each calculation types receives a separate event kind. Users can setup which service providers they trust to perform these calculations and Clients can load and display the results accordingly. +Certain calculations in Nostr require access to the entire dataset of events and are impossible to do directly by Clients. This NIP allows the creation of services that can perform such calculations and output signed events for each result continuously. Each calculation type receives a separate event kind. Users can set up which service providers they trust to perform these calculations so that Clients can load and display the results accordingly. -Assertions are always addressable events with the `d` tag pointing to the subject of the assertion. +Assertions are always addressable events with the `d` tag pointing to the subject of the assertion. The following kinds and tags have been specified: | name | kind | `d` tag value | result tags | | -------------------- | ----- | ------------- | --------------------------------------- | @@ -34,7 +34,7 @@ Example: } ``` -Service providers SHOULD update their results constantly and MAY limit access to their results by using paid relays. +Service providers SHOULD update their results constantly and MAY limit access by using paid relays. ## Declaring Trusted Service Providers @@ -53,4 +53,4 @@ Kind `10040` lists the user's authorized providers for each service. The service } ``` -Clients should download this list, load and display assertions when appropriate. \ No newline at end of file +Clients should download this list, and load and display assertions when appropriate. From a95634d3526a790af3eac6c352d7448fe802aeb6 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Fri, 11 Oct 2024 10:14:21 -0400 Subject: [PATCH 04/16] Adds event-based results Co-authored-by: arthurfranca --- 85.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/85.md b/85.md index ec324b6dc7..a7c6471f0d 100644 --- a/85.md +++ b/85.md @@ -17,7 +17,13 @@ Assertions are always addressable events with the `d` tag pointing to the subjec | Zap Amount Received | 30382 | target pubkey | `"zap_amt_recd"` (integer, millisats) | | Zap Amount Sent | 30382 | target pubkey | `"zap_amt_sent"` (integer, millisats) | | Zap Number Received | 30382 | target pubkey | `"zap_num_recd"` (integer, evt counter) | -| Zap Number Sent | 30382 | target pubkey | `"zap_num_sent"` (integer, evt counter) | +| Zap Number Sent | 30382 | target pubkey | `"zap_num_sent"` (integer, evt counter) | +| Comment Count | 30383 | target event id | `"comments"` (integer) | +| Repost Count | 30383 | target event id | `"reposts"` (integer) | +| Reaction Count | 30383 | target event id | `"reactions"` (integer) | +| Comment Count | 30384 | target event address | `"comments"` (integer) | +| Repost Count | 30384 | target event address | `"reposts"` (integer) | +| Reaction Count | 30384 | target event address | `"reactions"` (integer) | Example: From ab673fb2ad22d4c64683271e3118dd4c828c3efe Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Fri, 11 Oct 2024 10:17:37 -0400 Subject: [PATCH 05/16] Reformats table --- 85.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/85.md b/85.md index a7c6471f0d..732613ae3f 100644 --- a/85.md +++ b/85.md @@ -10,20 +10,20 @@ Certain calculations in Nostr require access to the entire dataset of events and Assertions are always addressable events with the `d` tag pointing to the subject of the assertion. The following kinds and tags have been specified: -| name | kind | `d` tag value | result tags | -| -------------------- | ----- | ------------- | --------------------------------------- | -| Follower Count | 30382 | target pubkey | `"followers"` (integer) | -| WebOfTrust Score | 30382 | target pubkey | `"wot"` (integer, normalized 0-100) | -| Zap Amount Received | 30382 | target pubkey | `"zap_amt_recd"` (integer, millisats) | -| Zap Amount Sent | 30382 | target pubkey | `"zap_amt_sent"` (integer, millisats) | -| Zap Number Received | 30382 | target pubkey | `"zap_num_recd"` (integer, evt counter) | -| Zap Number Sent | 30382 | target pubkey | `"zap_num_sent"` (integer, evt counter) | -| Comment Count | 30383 | target event id | `"comments"` (integer) | -| Repost Count | 30383 | target event id | `"reposts"` (integer) | -| Reaction Count | 30383 | target event id | `"reactions"` (integer) | -| Comment Count | 30384 | target event address | `"comments"` (integer) | -| Repost Count | 30384 | target event address | `"reposts"` (integer) | -| Reaction Count | 30384 | target event address | `"reactions"` (integer) | +| name | kind | `d` tag value | result tags | +| --------------------- | ----- | ------------- | --------------------------------------- | +| Follower Count | 30382 | pubkey | `"followers"` (integer) | +| WebOfTrust Score | 30382 | pubkey | `"wot"` (integer, normalized 0-100) | +| Zap Amount Received | 30382 | pubkey | `"zap_amt_recd"` (integer, millisats) | +| Zap Amount Sent | 30382 | pubkey | `"zap_amt_sent"` (integer, millisats) | +| Zap Number Received | 30382 | pubkey | `"zap_num_recd"` (integer, evt counter) | +| Zap Number Sent | 30382 | pubkey | `"zap_num_sent"` (integer, evt counter) | +| Event Comment Count | 30383 | event id | `"comment_count"` (integer) | +| Event Repost Count | 30383 | event id | `"repost_count"` (integer) | +| Event Reaction Count | 30383 | event id | `"reaction_count"` (integer) | +| Address Comment Count | 30384 | event address | `"comment_count"` (integer) | +| Address Repost Count | 30384 | event address | `"repost_count"` (integer) | +| Address Reaction Count| 30384 | event address | `"reaction_count"` (integer) | Example: From c8663bb16bf3fd757889fec5cad0fea68059c4be Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Fri, 11 Oct 2024 10:22:52 -0400 Subject: [PATCH 06/16] Adds zap count and zap amount to event-based providers. --- 85.md | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/85.md b/85.md index 732613ae3f..c2cea6bda7 100644 --- a/85.md +++ b/85.md @@ -10,20 +10,24 @@ Certain calculations in Nostr require access to the entire dataset of events and Assertions are always addressable events with the `d` tag pointing to the subject of the assertion. The following kinds and tags have been specified: -| name | kind | `d` tag value | result tags | -| --------------------- | ----- | ------------- | --------------------------------------- | -| Follower Count | 30382 | pubkey | `"followers"` (integer) | -| WebOfTrust Score | 30382 | pubkey | `"wot"` (integer, normalized 0-100) | -| Zap Amount Received | 30382 | pubkey | `"zap_amt_recd"` (integer, millisats) | -| Zap Amount Sent | 30382 | pubkey | `"zap_amt_sent"` (integer, millisats) | -| Zap Number Received | 30382 | pubkey | `"zap_num_recd"` (integer, evt counter) | -| Zap Number Sent | 30382 | pubkey | `"zap_num_sent"` (integer, evt counter) | -| Event Comment Count | 30383 | event id | `"comment_count"` (integer) | -| Event Repost Count | 30383 | event id | `"repost_count"` (integer) | -| Event Reaction Count | 30383 | event id | `"reaction_count"` (integer) | -| Address Comment Count | 30384 | event address | `"comment_count"` (integer) | -| Address Repost Count | 30384 | event address | `"repost_count"` (integer) | -| Address Reaction Count| 30384 | event address | `"reaction_count"` (integer) | +| name | kind | `d` tag value | result tags | +| --------------------- | ----- | ------------- | ----------------------------------- | +| Follower Count | 30382 | pubkey | `"followers"` (int) | +| WebOfTrust Score | 30382 | pubkey | `"wot"` (int, normalized 0-100) | +| Zap Amount Received | 30382 | pubkey | `"zap_amt_recd"` (int, sats) | +| Zap Amount Sent | 30382 | pubkey | `"zap_amt_sent"` (int, sats) | +| Zap Number Received | 30382 | pubkey | `"zap_cnt_recd"` (int) | +| Zap Number Sent | 30382 | pubkey | `"zap_cnt_sent"` (int) | +| Event Comment Count | 30383 | event id | `"comment_cnt"` (int) | +| Event Repost Count | 30383 | event id | `"repost_cnt"` (int) | +| Event Reaction Count | 30383 | event id | `"reaction_cnt"` (int) | +| Event Zap Count | 30383 | event id | `"zap_cnt"` (int) | +| Event Zap Amount | 30383 | event id | `"zap_amount"` (int, sats) | +| Address Comment Count | 30384 | event address | `"comment_cnt"` (int) | +| Address Repost Count | 30384 | event address | `"repost_cnt"` (int) | +| Address Reaction Count| 30384 | event address | `"reaction_cnt"` (int) | +| Address Zap Count | 30384 | event address | `"zap_cnt"` (int) | +| Address Zap Amount | 30384 | event address | `"zap_amount"` (int, sats) | Example: From 6834c1bfc43916ccec429247949f7040ac776dae Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Fri, 11 Oct 2024 10:31:25 -0400 Subject: [PATCH 07/16] Adds quote counts --- 85.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/85.md b/85.md index c2cea6bda7..81815a6c65 100644 --- a/85.md +++ b/85.md @@ -19,11 +19,13 @@ Assertions are always addressable events with the `d` tag pointing to the subjec | Zap Number Received | 30382 | pubkey | `"zap_cnt_recd"` (int) | | Zap Number Sent | 30382 | pubkey | `"zap_cnt_sent"` (int) | | Event Comment Count | 30383 | event id | `"comment_cnt"` (int) | +| Event Quote Count | 30383 | event id | `"quote_cnt"` (int) | | Event Repost Count | 30383 | event id | `"repost_cnt"` (int) | | Event Reaction Count | 30383 | event id | `"reaction_cnt"` (int) | | Event Zap Count | 30383 | event id | `"zap_cnt"` (int) | | Event Zap Amount | 30383 | event id | `"zap_amount"` (int, sats) | | Address Comment Count | 30384 | event address | `"comment_cnt"` (int) | +| Address Quote Count | 30384 | event address | `"quote_cnt"` (int) | | Address Repost Count | 30384 | event address | `"repost_cnt"` (int) | | Address Reaction Count| 30384 | event address | `"reaction_cnt"` (int) | | Address Zap Count | 30384 | event address | `"zap_cnt"` (int) | From 14674d3a592c3fc31e4eaf0419781c282701fe8e Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Fri, 11 Oct 2024 10:53:32 -0400 Subject: [PATCH 08/16] Adds web of trust / page rank score for events and addresses --- 85.md | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/85.md b/85.md index 81815a6c65..a192fb9257 100644 --- a/85.md +++ b/85.md @@ -10,26 +10,28 @@ Certain calculations in Nostr require access to the entire dataset of events and Assertions are always addressable events with the `d` tag pointing to the subject of the assertion. The following kinds and tags have been specified: -| name | kind | `d` tag value | result tags | -| --------------------- | ----- | ------------- | ----------------------------------- | -| Follower Count | 30382 | pubkey | `"followers"` (int) | -| WebOfTrust Score | 30382 | pubkey | `"wot"` (int, normalized 0-100) | -| Zap Amount Received | 30382 | pubkey | `"zap_amt_recd"` (int, sats) | -| Zap Amount Sent | 30382 | pubkey | `"zap_amt_sent"` (int, sats) | -| Zap Number Received | 30382 | pubkey | `"zap_cnt_recd"` (int) | -| Zap Number Sent | 30382 | pubkey | `"zap_cnt_sent"` (int) | -| Event Comment Count | 30383 | event id | `"comment_cnt"` (int) | -| Event Quote Count | 30383 | event id | `"quote_cnt"` (int) | -| Event Repost Count | 30383 | event id | `"repost_cnt"` (int) | -| Event Reaction Count | 30383 | event id | `"reaction_cnt"` (int) | -| Event Zap Count | 30383 | event id | `"zap_cnt"` (int) | -| Event Zap Amount | 30383 | event id | `"zap_amount"` (int, sats) | -| Address Comment Count | 30384 | event address | `"comment_cnt"` (int) | -| Address Quote Count | 30384 | event address | `"quote_cnt"` (int) | -| Address Repost Count | 30384 | event address | `"repost_cnt"` (int) | -| Address Reaction Count| 30384 | event address | `"reaction_cnt"` (int) | -| Address Zap Count | 30384 | event address | `"zap_cnt"` (int) | -| Address Zap Amount | 30384 | event address | `"zap_amount"` (int, sats) | +| name | kind | `d` tag value | result tags | +| ----------------------- | ----- | ------------- | ----------------------------------- | +| Follower Count | 30382 | pubkey | `"followers"` (int) | +| WebOfTrust Score | 30382 | pubkey | `"wot"` (int, normalized 0-100) | +| Zap Amount Received | 30382 | pubkey | `"zap_amt_recd"` (int, sats) | +| Zap Amount Sent | 30382 | pubkey | `"zap_amt_sent"` (int, sats) | +| Zap Number Received | 30382 | pubkey | `"zap_cnt_recd"` (int) | +| Zap Number Sent | 30382 | pubkey | `"zap_cnt_sent"` (int) | +| Event Comment Count | 30383 | event id | `"comment_cnt"` (int) | +| Event Quote Count | 30383 | event id | `"quote_cnt"` (int) | +| Event Repost Count | 30383 | event id | `"repost_cnt"` (int) | +| Event Reaction Count | 30383 | event id | `"reaction_cnt"` (int) | +| Event Zap Count | 30383 | event id | `"zap_cnt"` (int) | +| Event Zap Amount | 30383 | event id | `"zap_amount"` (int, sats) | +| Event WebOfTrust Score | 30383 | event id | `"wot"` (int, normalized 0-100) | +| Address Comment Count | 30384 | event address | `"comment_cnt"` (int) | +| Address Quote Count | 30384 | event address | `"quote_cnt"` (int) | +| Address Repost Count | 30384 | event address | `"repost_cnt"` (int) | +| Address Reaction Count | 30384 | event address | `"reaction_cnt"` (int) | +| Address Zap Count | 30384 | event address | `"zap_cnt"` (int) | +| Address Zap Amount | 30384 | event address | `"zap_amount"` (int, sats) | +| Address WebOfTrust Score| 30383 | event id | `"wot"` (int, normalized 0-100) | Example: From 34a6e982410351d22cfa09c65fb40a9df39ffc2d Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Fri, 11 Oct 2024 11:49:15 -0400 Subject: [PATCH 09/16] improves description, grammar --- 85.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/85.md b/85.md index a192fb9257..1c364ef156 100644 --- a/85.md +++ b/85.md @@ -6,7 +6,7 @@ Trusted Assertions `draft` `optional` -Certain calculations in Nostr require access to the entire dataset of events and are impossible to do directly by Clients. This NIP allows the creation of services that can perform such calculations and output signed events for each result continuously. Each calculation type receives a separate event kind. Users can set up which service providers they trust to perform these calculations so that Clients can load and display the results accordingly. +Certain calculations in Nostr require access to a large volume of events, making it impractical to perform them directly on clients. This NIP allows service providers to handle such computations in real-time and generate signed events with the results. Each calculation type is assigned a distinct event kind and tag. Users can specify which service providers they trust, enabling clients to load and display the results based on those trusted sources. Assertions are always addressable events with the `d` tag pointing to the subject of the assertion. The following kinds and tags have been specified: @@ -31,7 +31,7 @@ Assertions are always addressable events with the `d` tag pointing to the subjec | Address Reaction Count | 30384 | event address | `"reaction_cnt"` (int) | | Address Zap Count | 30384 | event address | `"zap_cnt"` (int) | | Address Zap Amount | 30384 | event address | `"zap_amount"` (int, sats) | -| Address WebOfTrust Score| 30383 | event id | `"wot"` (int, normalized 0-100) | +| Address WebOfTrust Score| 30384 | event address | `"wot"` (int, normalized 0-100) | Example: From 4382476f284558c8de7f0aae9af4ce6722561969 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Fri, 11 Oct 2024 12:43:13 -0400 Subject: [PATCH 10/16] Adds more user-based stats --- 85.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/85.md b/85.md index 1c364ef156..d9537d858a 100644 --- a/85.md +++ b/85.md @@ -14,10 +14,21 @@ Assertions are always addressable events with the `d` tag pointing to the subjec | ----------------------- | ----- | ------------- | ----------------------------------- | | Follower Count | 30382 | pubkey | `"followers"` (int) | | WebOfTrust Score | 30382 | pubkey | `"wot"` (int, normalized 0-100) | +| First Post Time | 30382 | pubkey | `"first_created_at"` (int,timestamp)| +| Post Count | 30382 | pubkey | `"post_cnt"` (int, sats) | +| Reply Count | 30382 | pubkey | `"reply_cnt"` (int, sats) | +| Reactions Count | 30382 | pubkey | `"reactions_cnt"` (int, sats) | | Zap Amount Received | 30382 | pubkey | `"zap_amt_recd"` (int, sats) | | Zap Amount Sent | 30382 | pubkey | `"zap_amt_sent"` (int, sats) | | Zap Number Received | 30382 | pubkey | `"zap_cnt_recd"` (int) | | Zap Number Sent | 30382 | pubkey | `"zap_cnt_sent"` (int) | +| Avg Zap Amount/day recd | 30382 | pubkey | `"zap_avg_amt_day_recd"` (int, sats)| +| Avg Zap Amount/day sent | 30382 | pubkey | `"zap_avg_amt_day_sent"` (int, sats)| +| Reports Received | 30382 | pubkey | `"reports_cnt_recd"` (int) | +| Reports Sent | 30382 | pubkey | `"reports_cnt_sent"` (int) | +| Common Topics | 30382 | pubkey | `"t"` (string) | +| Generally active start | 30382 | pubkey | `"active_hours_start"` (0-24 UTC) | +| Generally active end | 30382 | pubkey | `"active_hours_end"` (0-24 UTC) | | Event Comment Count | 30383 | event id | `"comment_cnt"` (int) | | Event Quote Count | 30383 | event id | `"quote_cnt"` (int) | | Event Repost Count | 30383 | event id | `"repost_cnt"` (int) | From 6650aff771e820b51f65866487369734b2c8687b Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Mon, 14 Oct 2024 10:13:21 -0400 Subject: [PATCH 11/16] moves wot to rank --- 85.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/85.md b/85.md index d9537d858a..2c273ff069 100644 --- a/85.md +++ b/85.md @@ -6,14 +6,14 @@ Trusted Assertions `draft` `optional` -Certain calculations in Nostr require access to a large volume of events, making it impractical to perform them directly on clients. This NIP allows service providers to handle such computations in real-time and generate signed events with the results. Each calculation type is assigned a distinct event kind and tag. Users can specify which service providers they trust, enabling clients to load and display the results based on those trusted sources. +Certain calculations in Nostr require access to a large volume of events, making it impractical to perform them directly on clients. This NIP allows service providers to handle such computations in real time and generate signed events with the results. Each calculation type is assigned a distinct event kind and tag. Users can specify which service providers they trust, enabling clients to load and display the results based on those trusted sources. Assertions are always addressable events with the `d` tag pointing to the subject of the assertion. The following kinds and tags have been specified: | name | kind | `d` tag value | result tags | | ----------------------- | ----- | ------------- | ----------------------------------- | | Follower Count | 30382 | pubkey | `"followers"` (int) | -| WebOfTrust Score | 30382 | pubkey | `"wot"` (int, normalized 0-100) | +| User Rank | 30382 | pubkey | `"rank"` (int, normalized 0-100) | | First Post Time | 30382 | pubkey | `"first_created_at"` (int,timestamp)| | Post Count | 30382 | pubkey | `"post_cnt"` (int, sats) | | Reply Count | 30382 | pubkey | `"reply_cnt"` (int, sats) | @@ -35,14 +35,14 @@ Assertions are always addressable events with the `d` tag pointing to the subjec | Event Reaction Count | 30383 | event id | `"reaction_cnt"` (int) | | Event Zap Count | 30383 | event id | `"zap_cnt"` (int) | | Event Zap Amount | 30383 | event id | `"zap_amount"` (int, sats) | -| Event WebOfTrust Score | 30383 | event id | `"wot"` (int, normalized 0-100) | +| Event Rank | 30383 | event id | `"rank"` (int, normalized 0-100) | | Address Comment Count | 30384 | event address | `"comment_cnt"` (int) | | Address Quote Count | 30384 | event address | `"quote_cnt"` (int) | | Address Repost Count | 30384 | event address | `"repost_cnt"` (int) | | Address Reaction Count | 30384 | event address | `"reaction_cnt"` (int) | | Address Zap Count | 30384 | event address | `"zap_cnt"` (int) | | Address Zap Amount | 30384 | event address | `"zap_amount"` (int, sats) | -| Address WebOfTrust Score| 30384 | event address | `"wot"` (int, normalized 0-100) | +| Address Rank | 30384 | event address | `"rank"` (int, normalized 0-100) | Example: @@ -51,7 +51,7 @@ Example: "kind": 30382, "tags": [ ["d", "e88a691e98d9987c964521dff60025f60700378a4879180dcbbb4a5027850411"], - ["wot", "89"], + ["rank", "89"], ["zap_amt_sent", "1000000"], ], "content": "", @@ -69,8 +69,8 @@ Kind `10040` lists the user's authorized providers for each service. The service { "kind": 10040, "tags": [ - ["wot", "818a39b5f164235f86254b12ca586efccc1f95e98b45cb1c91c71dc5d9486dda", "wss://relay.nostr.band"], - ["wot", "3d842afecd5e293f28b6627933704a3fb8ce153aa91d790ab11f6a752d44a42d", "wss://nostr.wine"], + ["rank", "818a39b5f164235f86254b12ca586efccc1f95e98b45cb1c91c71dc5d9486dda", "wss://relay.nostr.band"], + ["rank", "3d842afecd5e293f28b6627933704a3fb8ce153aa91d790ab11f6a752d44a42d", "wss://nostr.wine"], ["zap_amt_sent", "818a39b5f164235f86254b12ca586efccc1f95e98b45cb1c91c71dc5d9486dda", "wss://relay.nostr.band"], ], "content": "", From 4b483c043ca3f421bf745325c387aa376dcff697 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Mon, 14 Oct 2024 10:37:39 -0400 Subject: [PATCH 12/16] Update 85.md - Adds relay hints for base events. - Adds private list options - Adds kind to the list-tag settings --- 85.md | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/85.md b/85.md index 2c273ff069..46d8449b0a 100644 --- a/85.md +++ b/85.md @@ -6,7 +6,7 @@ Trusted Assertions `draft` `optional` -Certain calculations in Nostr require access to a large volume of events, making it impractical to perform them directly on clients. This NIP allows service providers to handle such computations in real time and generate signed events with the results. Each calculation type is assigned a distinct event kind and tag. Users can specify which service providers they trust, enabling clients to load and display the results based on those trusted sources. +Certain calculations require access to a large volume of events, making it impossible to perform them directly on clients. This NIP allows service providers to handle such computations and generate signed events with results in real-time. Each calculation type is assigned an event kind and tag. Users can specify which service providers they trust, enabling clients to load and display the results based on those trusted sources. Assertions are always addressable events with the `d` tag pointing to the subject of the assertion. The following kinds and tags have been specified: @@ -51,6 +51,7 @@ Example: "kind": 30382, "tags": [ ["d", "e88a691e98d9987c964521dff60025f60700378a4879180dcbbb4a5027850411"], + ["p", "e88a691e98d9987c964521dff60025f60700378a4879180dcbbb4a5027850411", ""], // relay hints to find the user ["rank", "89"], ["zap_amt_sent", "1000000"], ], @@ -59,23 +60,26 @@ Example: } ``` -Service providers SHOULD update their results constantly and MAY limit access by using paid relays. +Service providers SHOULD update their results constantly and MAY limit access to the results by using paid relays. + +`p`, `e`, and `a` tags with the same value as the `d` tag can be used to add a relay hint with the home relay of that user or event. ## Declaring Trusted Service Providers -Kind `10040` lists the user's authorized providers for each service. The service tag is followed by the `pubkey` of the service and the relay where the results are published. +Kind `10040` lists the user's authorized providers for each service. The service tag is followed by the `pubkey` of the service and the relay where the results are published. Users can specify these publicly or privately, by JSON-stringifying and encrypting the tag list in the `.content` -```jsonc +```js { "kind": 10040, "tags": [ - ["rank", "818a39b5f164235f86254b12ca586efccc1f95e98b45cb1c91c71dc5d9486dda", "wss://relay.nostr.band"], - ["rank", "3d842afecd5e293f28b6627933704a3fb8ce153aa91d790ab11f6a752d44a42d", "wss://nostr.wine"], - ["zap_amt_sent", "818a39b5f164235f86254b12ca586efccc1f95e98b45cb1c91c71dc5d9486dda", "wss://relay.nostr.band"], + ["30382:rank", "4fd5e210530e4f6b2cb083795834bfe5108324f1ed9f00ab73b9e8fcfe5f12fe", "wss://nip85.nostr.band"], + ["30382:rank", "3d842afecd5e293f28b6627933704a3fb8ce153aa91d790ab11f6a752d44a42d", "wss://nostr.wine"], + ["30382:zap_amt_sent", "4fd5e210530e4f6b2cb083795834bfe5108324f1ed9f00ab73b9e8fcfe5f12fe", "wss://nip85.nostr.band"], ], - "content": "", + "content": nip44Encrypt(JSON.stringify([ + ["30383:rank", "4fd5e210530e4f6b2cb083795834bfe5108324f1ed9f00ab73b9e8fcfe5f12fe", "wss://nip85.nostr.band"], + ["30384:rank", "4fd5e210530e4f6b2cb083795834bfe5108324f1ed9f00ab73b9e8fcfe5f12fe", "wss://nip85.nostr.band"], + ]), //... } ``` - -Clients should download this list, and load and display assertions when appropriate. From 1ced632b45f603aca46a4741b54beea1b090388c Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Mon, 14 Oct 2024 10:39:08 -0400 Subject: [PATCH 13/16] Update 85.md explains kind:tag in the trusted service lists. --- 85.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/85.md b/85.md index 46d8449b0a..6181dca39f 100644 --- a/85.md +++ b/85.md @@ -66,7 +66,7 @@ Service providers SHOULD update their results constantly and MAY limit access to ## Declaring Trusted Service Providers -Kind `10040` lists the user's authorized providers for each service. The service tag is followed by the `pubkey` of the service and the relay where the results are published. Users can specify these publicly or privately, by JSON-stringifying and encrypting the tag list in the `.content` +Kind `10040` lists the user's authorized providers for each service. The service's `kind:tag` is followed by the `pubkey` of the service and the relay where the results are published. Users can specify these publicly or privately by JSON-stringifying and encrypting the tag list in the `.content` ```js { From 0d7831b4c4d6114af672361a66e9cf4ca09ccffe Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Tue, 16 Dec 2025 10:09:27 -0500 Subject: [PATCH 14/16] Improving the text - no other changes Updated the description of Trusted Assertions and their calculations, including changes to the event kinds and tags. Added examples and clarified the role of service providers in handling calculations. --- 85.md | 124 +++++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 79 insertions(+), 45 deletions(-) diff --git a/85.md b/85.md index 6181dca39f..831427181d 100644 --- a/85.md +++ b/85.md @@ -6,67 +6,91 @@ Trusted Assertions `draft` `optional` -Certain calculations require access to a large volume of events, making it impossible to perform them directly on clients. This NIP allows service providers to handle such computations and generate signed events with results in real-time. Each calculation type is assigned an event kind and tag. Users can specify which service providers they trust, enabling clients to load and display the results based on those trusted sources. - -Assertions are always addressable events with the `d` tag pointing to the subject of the assertion. The following kinds and tags have been specified: - -| name | kind | `d` tag value | result tags | -| ----------------------- | ----- | ------------- | ----------------------------------- | -| Follower Count | 30382 | pubkey | `"followers"` (int) | -| User Rank | 30382 | pubkey | `"rank"` (int, normalized 0-100) | -| First Post Time | 30382 | pubkey | `"first_created_at"` (int,timestamp)| -| Post Count | 30382 | pubkey | `"post_cnt"` (int, sats) | -| Reply Count | 30382 | pubkey | `"reply_cnt"` (int, sats) | -| Reactions Count | 30382 | pubkey | `"reactions_cnt"` (int, sats) | -| Zap Amount Received | 30382 | pubkey | `"zap_amt_recd"` (int, sats) | -| Zap Amount Sent | 30382 | pubkey | `"zap_amt_sent"` (int, sats) | -| Zap Number Received | 30382 | pubkey | `"zap_cnt_recd"` (int) | -| Zap Number Sent | 30382 | pubkey | `"zap_cnt_sent"` (int) | -| Avg Zap Amount/day recd | 30382 | pubkey | `"zap_avg_amt_day_recd"` (int, sats)| -| Avg Zap Amount/day sent | 30382 | pubkey | `"zap_avg_amt_day_sent"` (int, sats)| -| Reports Received | 30382 | pubkey | `"reports_cnt_recd"` (int) | -| Reports Sent | 30382 | pubkey | `"reports_cnt_sent"` (int) | -| Common Topics | 30382 | pubkey | `"t"` (string) | -| Generally active start | 30382 | pubkey | `"active_hours_start"` (0-24 UTC) | -| Generally active end | 30382 | pubkey | `"active_hours_end"` (0-24 UTC) | -| Event Comment Count | 30383 | event id | `"comment_cnt"` (int) | -| Event Quote Count | 30383 | event id | `"quote_cnt"` (int) | -| Event Repost Count | 30383 | event id | `"repost_cnt"` (int) | -| Event Reaction Count | 30383 | event id | `"reaction_cnt"` (int) | -| Event Zap Count | 30383 | event id | `"zap_cnt"` (int) | -| Event Zap Amount | 30383 | event id | `"zap_amount"` (int, sats) | -| Event Rank | 30383 | event id | `"rank"` (int, normalized 0-100) | -| Address Comment Count | 30384 | event address | `"comment_cnt"` (int) | -| Address Quote Count | 30384 | event address | `"quote_cnt"` (int) | -| Address Repost Count | 30384 | event address | `"repost_cnt"` (int) | -| Address Reaction Count | 30384 | event address | `"reaction_cnt"` (int) | -| Address Zap Count | 30384 | event address | `"zap_cnt"` (int) | -| Address Zap Amount | 30384 | event address | `"zap_amount"` (int, sats) | -| Address Rank | 30384 | event address | `"rank"` (int, normalized 0-100) | - -Example: +Certain Webs of Trust calculations require access to a large volume of events and/or computing power, making it virtually impossible to perform them directly on clients. This NIP allows users to offload such calculations to declared trusted service providers, and for these providers to publish signed "Trusted Assertion" events for the user client's consumption. + +## Assertion Events + +Trusted Assertions are always addressable (replaceable) events with the `d` tag pointing to the "subject" of the assertion. This NIP currently recognizes three distinct target "subjects" on which such calculations can be performed: *pubkeys*, *regular events*, and *addressable events*. Each subject type is mapped to an event kind: + +| Subject | Event Kind | `d` tag value | +| ------------------ | -------------- | ----------------- | +| User | 30382 | `` | +| Event | 30383 | `` | +| Addressable Event | 30384 | `` | + +Calculation results are saved in pre-defined tags whose syntax and semantics are agreed upon by providers and clients. + +Example of ranking a pubkey with a web of trust score of `89`: ```jsonc { "kind": 30382, "tags": [ - ["d", "e88a691e98d9987c964521dff60025f60700378a4879180dcbbb4a5027850411"], - ["p", "e88a691e98d9987c964521dff60025f60700378a4879180dcbbb4a5027850411", ""], // relay hints to find the user + ["d", "e88a691e98d9987c964521dff60025f60700378a4879180dcbbb4a5027850411"], // target user's public key ["rank", "89"], - ["zap_amt_sent", "1000000"], ], "content": "", //... } ``` -Service providers SHOULD update their results constantly and MAY limit access to the results by using paid relays. +## Kind 30382: Users as Subject: + +The following result types have been declared: + +| Result type | Tag name | Tag value format | +| ----------------------- | ---------------------- | ----------------- | +| Follower Count | `followers` | int | +| User Rank | `rank` | int, norm 0-100) | +| First Post Time | `first_created_at` | unix timestamp | +| Post Count | `post_cnt` | int, | +| Reply Count | `reply_cnt` | int | +| Reactions Count | `reactions_cnt` | int | +| Zap Amount Received | `zap_amt_recd` | int, sats | +| Zap Amount Sent | `zap_amt_sent` | int, sats | +| Zap Number Received | `zap_cnt_recd` | int | +| Zap Number Sent | `zap_cnt_sent` | int | +| Avg Zap Amount/day recd | `zap_avg_amt_day_recd` | int, sats | +| Avg Zap Amount/day sent | `zap_avg_amt_day_sent` | int, sats | +| Reports Received | `reports_cnt_recd` | int | +| Reports Sent | `reports_cnt_sent` | int | +| Common Topics | `t` | string | +| Generally active start | `active_hours_start` | int, 0-24, UTC | +| Generally active end | `active_hours_end` | int, 0-24, UTC | + +Each provider can offer their own ways to calculate such values. For instance, the Follower Count of one trust provider might remove the user's muted public keys while another provider keeps them. Users can then choose how they wants to see this information in their preferred client by picking a provider that aligns with their view. + +## Kind 30383: Events as Subject -`p`, `e`, and `a` tags with the same value as the `d` tag can be used to add a relay hint with the home relay of that user or event. +Providers can rate individual events with the following tags: + +| Result type | Tag name | Tag value format | +| ----------------------- | ---------------------- | ----------------- | +| Event Rank | `rank` | int, norm 0-100 | +| Event Comment Count | `comment_cnt` | int | +| Event Quote Count | `quote_cnt` | int | +| Event Repost Count | `repost_cnt` | int | +| Event Reaction Count | `reaction_cnt` | int | +| Event Zap Count | `zap_cnt` | int | +| Event Zap Amount | `zap_amount` | int, sats | + +## Kind 30384: Events as Subject + +Providers can rate all versions of addressable events using the following tags: + +| Result type | Tag name | Tag value format | +| ------------------------- | ---------------------- | ----------------- | +| Address Rank | `rank` | int, norm 0-100 | +| Address Comment Count | `comment_cnt` | int | +| Address Quote Count | `quote_cnt` | int | +| Address Repost Count | `repost_cnt` | int | +| Address Reaction Count | `reaction_cnt` | int | +| Address Zap Count | `zap_cnt` | int | +| Address Zap Amount | `zap_amount` | int, sats | ## Declaring Trusted Service Providers -Kind `10040` lists the user's authorized providers for each service. The service's `kind:tag` is followed by the `pubkey` of the service and the relay where the results are published. Users can specify these publicly or privately by JSON-stringifying and encrypting the tag list in the `.content` +Kind `10040` lists the user's authorized providers for each result. Each `kind:tag` is followed by the `pubkey` of the service and the relay where the results are published. Users can specify these publicly or privately by JSON-stringifying and encrypting the tag list in the `.content` using NIP-44. ```js { @@ -83,3 +107,13 @@ Kind `10040` lists the user's authorized providers for each service. The service //... } ``` + +If the provider offers several algorithms, or multiple points of view of an algorithm, the key listed in each tag SHOULD point to the key created for each algorithm or point of view. + +## Final Considerations + +Service providers SHOULD update Trusted Assertions as fast as new information arrives, but only if the contents of each event actually change to avoid re-downloading the same information. + +Service providers MAY limit access to the results by using paid relays. + +In TAs, `p`, `e`, and `a` tags with the same value as the `d` tag MAY be used to add a relay hint to the home relay of that user or event. From 912e75c983845f6a9f32e08778b1782d6ec95ca0 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Tue, 16 Dec 2025 21:19:41 -0500 Subject: [PATCH 15/16] Rename section from 'Events' to 'Addressables' --- 85.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/85.md b/85.md index 831427181d..1d768b88b3 100644 --- a/85.md +++ b/85.md @@ -74,7 +74,7 @@ Providers can rate individual events with the following tags: | Event Zap Count | `zap_cnt` | int | | Event Zap Amount | `zap_amount` | int, sats | -## Kind 30384: Events as Subject +## Kind 30384: Addressables as Subject Providers can rate all versions of addressable events using the following tags: From 41c64d7410440b20112600a8d4ac4e737d58ee2b Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Thu, 22 Jan 2026 10:51:22 -0500 Subject: [PATCH 16/16] Updating from nostrhub --- 85.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/85.md b/85.md index 1d768b88b3..c11ce5a4eb 100644 --- a/85.md +++ b/85.md @@ -17,6 +17,7 @@ Trusted Assertions are always addressable (replaceable) events with the `d` tag | User | 30382 | `` | | Event | 30383 | `` | | Addressable Event | 30384 | `` | +| NIP-73 Identifier | 30385 | `` | Calculation results are saved in pre-defined tags whose syntax and semantics are agreed upon by providers and clients. @@ -58,7 +59,7 @@ The following result types have been declared: | Generally active start | `active_hours_start` | int, 0-24, UTC | | Generally active end | `active_hours_end` | int, 0-24, UTC | -Each provider can offer their own ways to calculate such values. For instance, the Follower Count of one trust provider might remove the user's muted public keys while another provider keeps them. Users can then choose how they wants to see this information in their preferred client by picking a provider that aligns with their view. +Each provider can offer their own ways to calculate such values. For instance, the Follower Count of one trust provider might remove the user's muted public keys while another provider keeps them. Users can then choose how they want to see this information in their preferred client by picking a provider that aligns with their view. ## Kind 30383: Events as Subject @@ -88,6 +89,18 @@ Providers can rate all versions of addressable events using the following tags: | Address Zap Count | `zap_cnt` | int | | Address Zap Amount | `zap_amount` | int, sats | +## Kind 30385: External identifier as Subject + +Providers can rate books, locations, movies, websites, and hashtags using [NIP-73](73.md) identifiers. + +| Result type | Tag name | Tag value format | +| ----------------- | ---------------------- | ----------------- | +| Rank | `rank` | int, norm 0-100 | +| Comment Count | `comment_cnt` | int | +| Reaction Count | `reaction_cnt` | int | + +NIP-73 `k` tags should be added to the event as well. + ## Declaring Trusted Service Providers Kind `10040` lists the user's authorized providers for each result. Each `kind:tag` is followed by the `pubkey` of the service and the relay where the results are published. Users can specify these publicly or privately by JSON-stringifying and encrypting the tag list in the `.content` using NIP-44. @@ -108,7 +121,7 @@ Kind `10040` lists the user's authorized providers for each result. Each `kind:t } ``` -If the provider offers several algorithms, or multiple points of view of an algorithm, the key listed in each tag SHOULD point to the key created for each algorithm or point of view. +If the provider offers several algorithms or multiple points of view of an algorithm, the key listed in each tag SHOULD point to the key created for each algorithm or point of view. ## Final Considerations