diff options
Diffstat (limited to '85.md')
| -rw-r--r-- | 85.md | 36 |
1 files changed, 35 insertions, 1 deletions
| @@ -10,7 +10,7 @@ Certain Webs of Trust calculations require access to a large volume of events an | |||
| 10 | 10 | ||
| 11 | ## Assertion Events | 11 | ## Assertion Events |
| 12 | 12 | ||
| 13 | 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: | 13 | Trusted Assertions are always addressable (replaceable) events with the `d` tag pointing to the "subject" of the assertion. This NIP currently recognizes four distinct target "subjects" on which such calculations can be performed: *pubkeys*, *regular events*, *addressable events*, and *nip73 identifiers*. Each subject type is mapped to an event kind: |
| 14 | 14 | ||
| 15 | | Subject | Event Kind | `d` tag value | | 15 | | Subject | Event Kind | `d` tag value | |
| 16 | | ------------------ | -------------- | ----------------- | | 16 | | ------------------ | -------------- | ----------------- | |
| @@ -26,6 +26,7 @@ Example of ranking a pubkey with a web of trust score of `89`: | |||
| 26 | ```jsonc | 26 | ```jsonc |
| 27 | { | 27 | { |
| 28 | "kind": 30382, | 28 | "kind": 30382, |
| 29 | "pubkey": "<service pubkey>", | ||
| 29 | "tags": [ | 30 | "tags": [ |
| 30 | ["d", "e88a691e98d9987c964521dff60025f60700378a4879180dcbbb4a5027850411"], // target user's public key | 31 | ["d", "e88a691e98d9987c964521dff60025f60700378a4879180dcbbb4a5027850411"], // target user's public key |
| 31 | ["rank", "89"], | 32 | ["rank", "89"], |
| @@ -35,6 +36,8 @@ Example of ranking a pubkey with a web of trust score of `89`: | |||
| 35 | } | 36 | } |
| 36 | ``` | 37 | ``` |
| 37 | 38 | ||
| 39 | Service providers MUST use different service keys for distinct algorithms, including a key per user when the algorithm is personalized to that user's point of view or settings. | ||
| 40 | |||
| 38 | ## Kind 30382: Users as Subject: | 41 | ## Kind 30382: Users as Subject: |
| 39 | 42 | ||
| 40 | The following result types have been declared: | 43 | The following result types have been declared: |
| @@ -109,11 +112,17 @@ Kind `10040` lists the user's authorized providers for each result. Each `kind:t | |||
| 109 | { | 112 | { |
| 110 | "kind": 10040, | 113 | "kind": 10040, |
| 111 | "tags": [ | 114 | "tags": [ |
| 115 | ["<kind:tag>", "<service key>", "<relay hint>"], | ||
| 116 | |||
| 117 | // examples | ||
| 112 | ["30382:rank", "4fd5e210530e4f6b2cb083795834bfe5108324f1ed9f00ab73b9e8fcfe5f12fe", "wss://nip85.nostr.band"], | 118 | ["30382:rank", "4fd5e210530e4f6b2cb083795834bfe5108324f1ed9f00ab73b9e8fcfe5f12fe", "wss://nip85.nostr.band"], |
| 113 | ["30382:rank", "3d842afecd5e293f28b6627933704a3fb8ce153aa91d790ab11f6a752d44a42d", "wss://nostr.wine"], | 119 | ["30382:rank", "3d842afecd5e293f28b6627933704a3fb8ce153aa91d790ab11f6a752d44a42d", "wss://nostr.wine"], |
| 114 | ["30382:zap_amt_sent", "4fd5e210530e4f6b2cb083795834bfe5108324f1ed9f00ab73b9e8fcfe5f12fe", "wss://nip85.nostr.band"], | 120 | ["30382:zap_amt_sent", "4fd5e210530e4f6b2cb083795834bfe5108324f1ed9f00ab73b9e8fcfe5f12fe", "wss://nip85.nostr.band"], |
| 115 | ], | 121 | ], |
| 116 | "content": nip44Encrypt(JSON.stringify([ | 122 | "content": nip44Encrypt(JSON.stringify([ |
| 123 | ["<kind:tag>", "<service key>", "<relay hint>"], | ||
| 124 | |||
| 125 | // examples | ||
| 117 | ["30383:rank", "4fd5e210530e4f6b2cb083795834bfe5108324f1ed9f00ab73b9e8fcfe5f12fe", "wss://nip85.nostr.band"], | 126 | ["30383:rank", "4fd5e210530e4f6b2cb083795834bfe5108324f1ed9f00ab73b9e8fcfe5f12fe", "wss://nip85.nostr.band"], |
| 118 | ["30384:rank", "4fd5e210530e4f6b2cb083795834bfe5108324f1ed9f00ab73b9e8fcfe5f12fe", "wss://nip85.nostr.band"], | 127 | ["30384:rank", "4fd5e210530e4f6b2cb083795834bfe5108324f1ed9f00ab73b9e8fcfe5f12fe", "wss://nip85.nostr.band"], |
| 119 | ]), | 128 | ]), |
| @@ -130,3 +139,28 @@ Service providers SHOULD update Trusted Assertions as fast as new information ar | |||
| 130 | Service providers MAY limit access to the results by using paid relays. | 139 | Service providers MAY limit access to the results by using paid relays. |
| 131 | 140 | ||
| 132 | 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. | 141 | 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. |
| 142 | |||
| 143 | ## Appendix 1: Service provider discoverability | ||
| 144 | |||
| 145 | Service Providers SHOULD sign a kind `0` of each service key that explains who controls the key and what the current version of the algorithm is about. | ||
| 146 | |||
| 147 | ```jsonc | ||
| 148 | { | ||
| 149 | "kind": 0, | ||
| 150 | "pubkey": "<service pubkey>", | ||
| 151 | "tags": [], | ||
| 152 | "content": "{ | ||
| 153 | \"name\" = \"Vitor's Brainstormer\", | ||
| 154 | \"about\" = \"A Web of Trust algorithm from Vitor's point of view that considers Follows and Mutes, but no reports, and gives extra score points for anyone around Boston\", | ||
| 155 | \"picture\" = \"https://brainstorm.com/logo.png\", | ||
| 156 | \"website\" = \"https://brainstorm.com\" | ||
| 157 | }", | ||
| 158 | // other fields... | ||
| 159 | } | ||
| 160 | ``` | ||
| 161 | |||
| 162 | Clients wishing to offer a list of Service Providers to their users SHOULD: | ||
| 163 | 1. Download kind `10040` events of the user's follow list | ||
| 164 | 2. Connect to each of the listed relays and download the kind `0` of the respective service keys | ||
| 165 | 3. Parse the kind `0` and collect the `website` property | ||
| 166 | 4. Load the OpenGraph tags of that website and display them as clickable items | ||