upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/05.md
diff options
context:
space:
mode:
authorutxo <github@utxo.one>2024-03-21 10:15:02 -0400
committerutxo <github@utxo.one>2024-03-21 10:15:02 -0400
commit46a6bf331ae823dad079a9740f37d57e58b92358 (patch)
treebc6a4c503d15fdd54071a48baa07d1c28861885a /05.md
parentde71f998289a829ac4b2c0b0e601b02a2bf755b6 (diff)
Make relay attribute recommended in NIP-05
Diffstat (limited to '05.md')
-rw-r--r--05.md19
1 files changed, 10 insertions, 9 deletions
diff --git a/05.md b/05.md
index 6437550..a4b804c 100644
--- a/05.md
+++ b/05.md
@@ -1,8 +1,6 @@
1NIP-05 1# NIP-05
2======
3 2
4Mapping Nostr keys to DNS-based internet identifiers 3## Mapping Nostr keys to DNS-based internet identifiers
5----------------------------------------------------
6 4
7`final` `optional` 5`final` `optional`
8 6
@@ -33,9 +31,9 @@ It will make a GET request to `https://example.com/.well-known/nostr.json?name=b
33 "bob": "b0635d6a9851d3aed0cd6c495b282167acf761729078d975fc341b22650b07b9" 31 "bob": "b0635d6a9851d3aed0cd6c495b282167acf761729078d975fc341b22650b07b9"
34 } 32 }
35} 33}
36```` 34```
37 35
38or with the **optional** `"relays"` attribute: 36or with the **recommended** `"relays"` attribute:
39 37
40```json 38```json
41{ 39{
@@ -43,14 +41,17 @@ or with the **optional** `"relays"` attribute:
43 "bob": "b0635d6a9851d3aed0cd6c495b282167acf761729078d975fc341b22650b07b9" 41 "bob": "b0635d6a9851d3aed0cd6c495b282167acf761729078d975fc341b22650b07b9"
44 }, 42 },
45 "relays": { 43 "relays": {
46 "b0635d6a9851d3aed0cd6c495b282167acf761729078d975fc341b22650b07b9": [ "wss://relay.example.com", "wss://relay2.example.com" ] 44 "b0635d6a9851d3aed0cd6c495b282167acf761729078d975fc341b22650b07b9": [
45 "wss://relay.example.com",
46 "wss://relay2.example.com"
47 ]
47 } 48 }
48} 49}
49```` 50```
50 51
51If the pubkey matches the one given in `"names"` (as in the example above) that means the association is right and the `"nip05"` identifier is valid and can be displayed. 52If the pubkey matches the one given in `"names"` (as in the example above) that means the association is right and the `"nip05"` identifier is valid and can be displayed.
52 53
53The optional `"relays"` attribute may contain an object with public keys as properties and arrays of relay URLs as values. When present, that can be used to help clients learn in which relays the specific user may be found. Web servers which serve `/.well-known/nostr.json` files dynamically based on the query string SHOULD also serve the relays data for any name they serve in the same reply when that is available. 54The recommended `"relays"` attribute may contain an object with public keys as properties and arrays of relay URLs as values. When present, that can be used to help clients learn in which relays the specific user may be found. Web servers which serve `/.well-known/nostr.json` files dynamically based on the query string SHOULD also serve the relays data for any name they serve in the same reply when that is available.
54 55
55## Finding users from their NIP-05 identifier 56## Finding users from their NIP-05 identifier
56 57