upleb.uk

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

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfiatjaf <fiatjaf@gmail.com>2023-01-04 10:34:24 -0300
committerfiatjaf <fiatjaf@gmail.com>2023-01-04 10:34:24 -0300
commit8c3c42171503fd07e24bb8681fc01419974a2ac0 (patch)
tree22a9eee9f2023d83b594fb5b691c516ec667097b
parent4472f9bbd951db084d1ce460b8b00d7de0c5e154 (diff)
merge NIP-35 into NIP-05.
-rw-r--r--05.md21
-rw-r--r--35.md43
-rw-r--r--README.md1
3 files changed, 18 insertions, 47 deletions
diff --git a/05.md b/05.md
index b489b4b..437c637 100644
--- a/05.md
+++ b/05.md
@@ -4,7 +4,7 @@ NIP-05
4Mapping Nostr keys to DNS-based internet identifiers 4Mapping Nostr keys to DNS-based internet identifiers
5---------------------------------------------------- 5----------------------------------------------------
6 6
7`final` `optional` `author:fiatjaf` 7`final` `optional` `author:fiatjaf` `author:mikedilger`
8 8
9On events of kind `0` (`set_metadata`) one can specify the key `"nip05"` with an [internet identifier](https://datatracker.ietf.org/doc/html/rfc5322#section-3.4.1) (an email-like address) as the value. Although there is a link to a very liberal "internet identifier" specification above, NIP-05 assumes the `<local-part>` part will be restricted to the characters `a-z0-9-_.`, case insensitive. 9On events of kind `0` (`set_metadata`) one can specify the key `"nip05"` with an [internet identifier](https://datatracker.ietf.org/doc/html/rfc5322#section-3.4.1) (an email-like address) as the value. Although there is a link to a very liberal "internet identifier" specification above, NIP-05 assumes the `<local-part>` part will be restricted to the characters `a-z0-9-_.`, case insensitive.
10 10
@@ -33,9 +33,24 @@ It will make a GET request to `https://example.com/.well-known/nostr.json?name=b
33 "bob": "b0635d6a9851d3aed0cd6c495b282167acf761729078d975fc341b22650b07b9" 33 "bob": "b0635d6a9851d3aed0cd6c495b282167acf761729078d975fc341b22650b07b9"
34 } 34 }
35} 35}
36``` 36````
37
38or with the **optional** `"relays"` attribute:
39
40```json
41{
42 "names": {
43 "bob": "b0635d6a9851d3aed0cd6c495b282167acf761729078d975fc341b22650b07b9"
44 },
45 "relays": {
46 "b0635d6a9851d3aed0cd6c495b282167acf761729078d975fc341b22650b07b9": [ "wss://relay.example.com", "wss://relay2.example.com" ]
47 }
48}
49````
50
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.
37 52
38That will mean everything is alright. 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 a that 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.
39 54
40## Finding users from their NIP-05 identifier 55## Finding users from their NIP-05 identifier
41 56
diff --git a/35.md b/35.md
deleted file mode 100644
index dec9478..0000000
--- a/35.md
+++ /dev/null
@@ -1,43 +0,0 @@
1
2NIP-35
3======
4
5User Discovery
6--------------
7
8`draft` `optional` `author:mikedilger`
9
10This NIP extends NIP-05 to facilitate a mechanism of user discovery that provides both public key information and relay information.
11
12This NIP does not modify any data or events within the nostr protocol. It only extends the contents of `https://<domain>/.well-known/nostr.json?name=<local-part>` return values with additional relay information.
13
14With this NIP implemented, clients may then attempt to discover users via email-like addresses (see NIP-05) and potentially find what relays they post to along with their public key.
15
16### nostr.json contents
17
18NIP-05 specifies a `nostr.json` file with contents like this (refer to NIP-05):
19
20```json
21{
22 "names": {
23 "bob": "b0635d6a9851d3aed0cd6c495b282167acf761729078d975fc341b22650b07b9"
24 }
25}
26```
27
28This NIP proposes an optional additional key like this:
29
30````
31{
32 "names": {
33 "bob": "b0635d6a9851d3aed0cd6c495b282167acf761729078d975fc341b22650b07b9"
34 },
35 "relays": {
36 "b0635d6a9851d3aed0cd6c495b282167acf761729078d975fc341b22650b07b9": [ "wss://relay.example.com", "wss://relay2.example.com" ]
37 }
38}
39````
40
41The `relays` key contains an object with public keys as properties and arrays of relays as values.
42
43Web servers which serve nostr.json files dynamically responding to the query string SHOULD also serve the relays data for any name they serve in the same reply.
diff --git a/README.md b/README.md
index fa5896b..10bb5ef 100644
--- a/README.md
+++ b/README.md
@@ -26,7 +26,6 @@ NIPs stand for **Nostr Implementation Possibilities**. They exist to document wh
26- [NIP-26: Delegated Event Signing](26.md) 26- [NIP-26: Delegated Event Signing](26.md)
27- [NIP-28: Public Chat](28.md) 27- [NIP-28: Public Chat](28.md)
28- [NIP-33: Parameterized Replaceable Events](33.md) 28- [NIP-33: Parameterized Replaceable Events](33.md)
29- [NIP-35: User Discovery](35.md)
30- [NIP-36: Sensitive Content](36.md) 29- [NIP-36: Sensitive Content](36.md)
31- [NIP-40: Expiration Timestamp](40.md) 30- [NIP-40: Expiration Timestamp](40.md)
32 31