Update 85.md

- Adds relay hints for base events. 
- Adds private list options
- Adds kind to the list-tag settings
This commit is contained in:
Vitor Pamplona 2024-10-14 10:37:39 -04:00 committed by GitHub
parent 6650aff771
commit 4b483c043c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

24
85.md
View File

@ -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", "<user-home-relay-url>"], // 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.