diff options
| author | Michael Dilger <mike@optcomp.nz> | 2022-11-19 19:28:47 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-19 11:28:47 -0800 |
| commit | 631e9760bfa6ab44804a8ca28ca913dfacdbb5cc (patch) | |
| tree | 5b5d1810420bc7061b768693ae248466f14fee99 | |
| parent | c274c65856afb00c05796c87ed2b3f6ab4704f09 (diff) | |
NIP-35 User Discovery (#73)
* Draft NIP for user discovery
* Renumber to NIP-35
* spelling fix
* Add to README
* fix quote
* and colon
| -rw-r--r-- | 35.md | 41 | ||||
| -rw-r--r-- | README.md | 1 |
2 files changed, 42 insertions, 0 deletions
| @@ -0,0 +1,41 @@ | |||
| 1 | |||
| 2 | NIP-35 | ||
| 3 | ====== | ||
| 4 | |||
| 5 | User Discovery | ||
| 6 | -------------- | ||
| 7 | |||
| 8 | `draft` `optional` `author:mikedilger` | ||
| 9 | |||
| 10 | This NIP extends NIP-05 to facilitate a mechanism of user discovery that provides both public key information and relay information. | ||
| 11 | |||
| 12 | This 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 | |||
| 14 | With 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 | |||
| 18 | NIP-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 | |||
| 28 | This 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 | |||
| 41 | The `relays` key contains an object with public keys as properties and arrays of relays as values. | ||
| @@ -22,6 +22,7 @@ NIPs stand for **Nostr Implementation Possibilities**. They exist to document wh | |||
| 22 | - [NIP-22: Event created_at Limits](22.md) | 22 | - [NIP-22: Event created_at Limits](22.md) |
| 23 | - [NIP-25: Reactions](25.md) | 23 | - [NIP-25: Reactions](25.md) |
| 24 | - [NIP-28: Public Chat](28.md) | 24 | - [NIP-28: Public Chat](28.md) |
| 25 | - [NIP-35: User Discovery](35.md) | ||
| 25 | 26 | ||
| 26 | ## Event Kinds | 27 | ## Event Kinds |
| 27 | 28 | ||