From 682e4c4ad79377bfb4d298e0f00242ed02a92ec4 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Fri, 11 Oct 2024 09:08:21 -0400 Subject: [PATCH 01/13] 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/13] 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/13] 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/13] 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/13] 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/13] 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/13] 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/13] 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/13] 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/13] 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/13] 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/13] 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/13] 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 {