banner
Hoodrh

Hoodrh

人文、产品、加密探索(非正式研究)
medium
twitter
substack
hoodrh.top

Decentralized protocol Nostr- series 004

Because I couldn't find a detailed article on the Nostr protocol network in the Chinese community, I am preparing to write a series of articles myself. This is the fourth article in this series, which will discuss the configuration method and NIP standard for the Nip-05 domain in the Nostr network.

In the second article, we talked about how beginners can use social applications in the Nostr network. In order to allow everyone to use it first and experience the atmosphere of the Nostr network in practical operations, and also reduce the entry barrier, we only briefly mentioned NIP-05 (personal homepage information settings). Today, we will specifically discuss what NIP-05 is and how to set it up, and also provide a brief introduction to the NIP standard.

NIP-05#

What is NIP-05?#

In simple terms, NIP-05 is an ID name that is easier to recognize than a public key set for each user.

We know that in the Nostr network, the ID of each user is a long string of irregular text, which is the public key. If I want to find user A in the Nostr network, I have to search for A's public key to find them. However, the public key is too long, inconvenient to save and propagate, and also difficult for humans to identify. Therefore, a solution appeared-to bind a more human-readable name to the public key.

In more professional terms, NIP-05 allows Nostr users to map their public keys to DNS-based internet identifiers. The verification mechanism is similar to Google's requirement to use DNS records to verify ownership of a domain. The main benefit of verification is that it allows Nostr users to be identified by human-readable names instead of long and hard-to-remember public keys. This allows verified Nostr users to easily share their identities with others.

NIP-05 Configuration Method#

To have a NIP-05 domain name, we can obtain it in two ways.

  1. In the application, find the NIP-05 setting box (usually located on the edit page of the personal homepage), and then purchase the domain name provided by the official (if not purchased).

  2. If you have your own domain name, you can verify it and bind it to the Nostr network. The following mainly introduces this method.

For example, my domain name is www.hoodrh.top, and my personal website is built using Hexo. So I will add "well-known/**" under the "_config.yml" file of Hexo's "include" section, and then create a folder named "well-known" in the "source" folder (the official says to create ".well-known", but the dot file on Mac system is reserved for the system), and then create a "nostr.json" file in the "well-known" folder. The content of the JS file is:

{
  "names": {
    "hoodrh": // Your own Nostr network username
"npub1e9euzeaeyten7926t2ecmuxkv3l55vefz48jdlsqgcjzwnvykfusmj820c" // Your public key ID
  }
}

Save the file and upload it to Hexo. Then I will get the NIP-05 address: [email protected], which is "username@your own domain name".

image

Can NIP-05 be not set?#

Of course, if you don't have your own domain name and don't want to buy one, there is no need to set it at all. Currently, the purpose of setting NIP-05 is to display an authenticated identifier. Basically, daily operations such as following friends can be achieved by copying the public key. I believe that with the enhancement of various application-side search technologies, it will also be possible to support searching for users by username. (I want the purple badge certification ✅!

NIP Standard#

What is the NIP standard?#

NIP is a series of protocol interface standards that uniformly define the interface elements and details for various common functions, which helps establish channels between different applications on the entire network, so that the content sent by a user can be recognized and disseminated among all applications on the Nostr network.

Detailed Classification Introduction of NIP#

Here is a brief introduction to the Nostr functions supported by different NIP standards. For more technical details, please refer to here.

  1. NIP-01 - Basic protocol process description, used for communication between clients and relays. It involves the exchange of events, which are objects that contain various information such as unique IDs, timestamps, and labels.

  2. NIP-02 - Contact list and nickname.

  3. NIP-03 - OpenTimestamps proof of events [not planned].

  4. NIP-04 - Encrypted private messages.

  5. NIP-05 - Mapping Nostr keys to DNS-based internet identifiers.

  6. NIP-06 - Deriving basic keys from mnemonic seed phrases.

  7. NIP-07 - window.nostr functionality for network browsers [not applicable].

  8. NIP-08 - Handling mentions.

  9. NIP-09 - Event deletion [partial].

  10. NIP-10 - Convention for using e and p tags in text events by clients.

  11. NIP-11 - Relay information file.

  12. NIP-12 - General tag queries.

  13. NIP-13 - Proof of work.

  14. NIP-14 - Subject tags in text events.

  15. NIP-15 - Storage event end notification.

  16. NIP-16 - Event processing.

  17. NIP-19 - bech32 encoded entities.

  18. NIP-20 - Command results.

  19. NIP-21 - nostr: URL scheme.

  20. NIP-22 - Event created_at limitation.

  21. NIP-25 - Reactions.

  22. NIP-26 - Delegated event signatures.

  23. NIP-28 - Public chat.

  24. NIP-33 - Parameterized replaceable events.

  25. NIP-36 - Sensitive content.

  26. NIP-40 - Expiration timestamps.

  27. NIP-42 - Client-to-relay authentication.

  28. NIP-50 - Keyword filters.

  29. NIP-56 - Reports.

  30. NIP-65 - Relay list metadata.

Alright, that's it for today. See you tomorrow. Have fun in the Nostr network.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.