diff options
| author | Lyle Pratt <lylepratt@gmail.com> | 2022-12-29 17:38:14 -0600 |
|---|---|---|
| committer | fiatjaf <fiatjaf@gmail.com> | 2022-12-29 20:52:54 -0300 |
| commit | a37a27afb905b71c1beda7c5a9ec12938d8b8a87 (patch) | |
| tree | 88732f3404fe43f5a111a3a2c4d08691c41c96fa /05.md | |
| parent | d41834fa5169d15ffd1519a773ee495c6076ecd3 (diff) | |
Make it clear that NIP-05 Keys should be in Hex
There has been some confusion about whether npub keys are supported by this spec. According to @fiatjaf only Hex keys are supported. https://twitter.com/fiatjaf/status/1608606752987316224?s=20&t=6fJLD3077byuoTm96kva1g
Diffstat (limited to '05.md')
| -rw-r--r-- | 05.md | 6 |
1 files changed, 5 insertions, 1 deletions
| @@ -10,7 +10,7 @@ On events of kind `0` (`set_metadata`) one can specify the key `"nip05"` with an | |||
| 10 | 10 | ||
| 11 | Upon seeing that, the client splits the identifier into `<local-part>` and `<domain>` and use these values to make a GET request to `https://<domain>/.well-known/nostr.json?name=<local-part>`. | 11 | Upon seeing that, the client splits the identifier into `<local-part>` and `<domain>` and use these values to make a GET request to `https://<domain>/.well-known/nostr.json?name=<local-part>`. |
| 12 | 12 | ||
| 13 | The result should be a JSON document object with a key `"names"` that should then be a mapping of names to public keys. If the public key for the given `<name>` matches the `pubkey` from the `set_metadata` event, the client then concludes that the given pubkey can indeed be referenced by its identifier. | 13 | The result should be a JSON document object with a key `"names"` that should then be a mapping of names to hex formatted public keys. If the public key for the given `<name>` matches the `pubkey` from the `set_metadata` event, the client then concludes that the given pubkey can indeed be referenced by its identifier. |
| 14 | 14 | ||
| 15 | ### Example | 15 | ### Example |
| 16 | 16 | ||
| @@ -47,6 +47,10 @@ A client may implement support for finding users' public keys from _internet ide | |||
| 47 | 47 | ||
| 48 | For example, if after finding that `bob@bob.com` has the public key `abc...def`, the user clicks a button to follow that profile, the client must keep a primary reference to `abc...def`, not `bob@bob.com`. If, for any reason, the address `https://bob.com/.well-known/nostr.json?name=bob` starts returning the public key `1d2...e3f` at any time in the future, the client must not replace `abc...def` in his list of followed profiles for the user (but it should stop displaying "bob@bob.com" for that user, as that will have become an invalid `"nip05"` property). | 48 | For example, if after finding that `bob@bob.com` has the public key `abc...def`, the user clicks a button to follow that profile, the client must keep a primary reference to `abc...def`, not `bob@bob.com`. If, for any reason, the address `https://bob.com/.well-known/nostr.json?name=bob` starts returning the public key `1d2...e3f` at any time in the future, the client must not replace `abc...def` in his list of followed profiles for the user (but it should stop displaying "bob@bob.com" for that user, as that will have become an invalid `"nip05"` property). |
| 49 | 49 | ||
| 50 | ### Public keys must be in Hex format | ||
| 51 | |||
| 52 | Keys must be returned in Hex format. Keys returned in npub format are not supported by this spec. | ||
| 53 | |||
| 50 | ### User Discovery implementation suggestion | 54 | ### User Discovery implementation suggestion |
| 51 | 55 | ||
| 52 | A client can also use this to allow users to search other profiles. If a client has a search box or something like that, a user may be able to type "bob@example.com" there and the client would recognize that and do the proper queries to obtain a pubkey and suggest that to the user. | 56 | A client can also use this to allow users to search other profiles. If a client has a search box or something like that, a user may be able to type "bob@example.com" there and the client would recognize that and do the proper queries to obtain a pubkey and suggest that to the user. |