Search

Mapping Nostr keys to DNS-based internet identifiers
I've finally decided to get my hands dirty and look into Nostr.
I learned something interesting that I thought might be useful to others.
A domain can be used to validate user accounts. This is done in practice by creating a file called "nostr.json", populating it with a list of usernames and their public keys (in hex format), and making it reachable at https://{domain}/.well-known/nostr.json
For more detailed instructions, see: https://nostr.how/en/guides/get-verified
The syntax of the nostr.json file is:
undefined
{ "names": { "YOUR_NOSTR_NAME1": "YOUR_NOSTR_PUBLIC_KEY_HEX1", "YOUR_NOSTR_NAME2": "YOUR_NOSTR_PUBLIC_KEY_HEX2" } }
This file can be presented via nginx with a block such as this one:
undefined
location = /.well-known/nostr.json { alias /path/to/nostr.json; add_header Access-Control-Allow-Origin *; }
Here is the list of mander.xyz: https://mander.xyz/.well-known/nostr.json
And here is an example of a large list: https://nos