nips/85.md

71 lines
3.6 KiB
Markdown

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 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. 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) |
| 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:
```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.