-
Notifications
You must be signed in to change notification settings - Fork 632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trusted Assertions #1534
Open
vitorpamplona
wants to merge
13
commits into
nostr-protocol:master
Choose a base branch
from
vitorpamplona:user-summaries
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Trusted Assertions #1534
Changes from 10 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
682e4c4
Adds service providers
vitorpamplona e666636
Adds service provider revenue model
vitorpamplona 9c38c8e
Fix typos
vitorpamplona a95634d
Adds event-based results
vitorpamplona ab673fb
Reformats table
vitorpamplona c8663bb
Adds zap count and zap amount to event-based providers.
vitorpamplona 6834c1b
Adds quote counts
vitorpamplona 14674d3
Adds web of trust / page rank score for events and addresses
vitorpamplona 34a6e98
improves description, grammar
vitorpamplona 4382476
Adds more user-based stats
vitorpamplona 6650aff
moves wot to rank
vitorpamplona 4b483c0
Update 85.md
vitorpamplona 1ced632
Update 85.md
vitorpamplona File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
NIP-85 | ||
====== | ||
|
||
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. | ||
|
||
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) | | ||
| 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 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| 30384 | event address | `"wot"` (int, normalized 0-100) | | ||
|
||
Example: | ||
|
||
```jsonc | ||
{ | ||
"kind": 30382, | ||
"tags": [ | ||
["d", "e88a691e98d9987c964521dff60025f60700378a4879180dcbbb4a5027850411"], | ||
["wot", "89"], | ||
["zap_amt_sent", "1000000"], | ||
], | ||
"content": "", | ||
//... | ||
} | ||
``` | ||
|
||
Service providers SHOULD update their results constantly and MAY limit access 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. | ||
|
||
```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, and load and display assertions when appropriate. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
["delegation", "4fd5e210530e4f6b2cb083795834bfe5108324f1ed9f00ab73b9e8fcfe5f12fe"], // publish this assertion on 'behalf' of another pubkey ... as for 'relative' ranks of user and content