From 46a6bf331ae823dad079a9740f37d57e58b92358 Mon Sep 17 00:00:00 2001 From: utxo Date: Thu, 21 Mar 2024 10:15:02 -0400 Subject: [PATCH] Make relay attribute recommended in NIP-05 --- 05.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/05.md b/05.md index 64375506..a4b804cc 100644 --- a/05.md +++ b/05.md @@ -1,8 +1,6 @@ -NIP-05 -====== +# NIP-05 -Mapping Nostr keys to DNS-based internet identifiers ----------------------------------------------------- +## Mapping Nostr keys to DNS-based internet identifiers `final` `optional` @@ -33,9 +31,9 @@ It will make a GET request to `https://example.com/.well-known/nostr.json?name=b "bob": "b0635d6a9851d3aed0cd6c495b282167acf761729078d975fc341b22650b07b9" } } -```` +``` -or with the **optional** `"relays"` attribute: +or with the **recommended** `"relays"` attribute: ```json { @@ -43,14 +41,17 @@ or with the **optional** `"relays"` attribute: "bob": "b0635d6a9851d3aed0cd6c495b282167acf761729078d975fc341b22650b07b9" }, "relays": { - "b0635d6a9851d3aed0cd6c495b282167acf761729078d975fc341b22650b07b9": [ "wss://relay.example.com", "wss://relay2.example.com" ] + "b0635d6a9851d3aed0cd6c495b282167acf761729078d975fc341b22650b07b9": [ + "wss://relay.example.com", + "wss://relay2.example.com" + ] } } -```` +``` If 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. -The 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. +The 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. ## Finding users from their NIP-05 identifier