Stacks + Nostr
  • Introduction: Stacks + Nostr
  • SIP and NIP Summaries
    • SIP Summaries
      • SIP-000: The Stacks Improvement Proposal Process
      • SIP-001: Burn Election
      • SIP-002: The Clarity Smart Contract Language
      • SIP-003: Stacks P2P Network
      • SIP-004: Cryptographic Commitment to Materialized Views
      • SIP-005: Blocks, Transactions, and Accounts 👀
      • SIP-006: Clarity Cost Execution Assessment
      • SIP-007: Stacking Consensus
      • SIP-008: Clarity Parsing and Analysis Cost Assessment
      • SIP-009: Standard Trait Definition for Non-Fungible Tokens
      • SIP-010: Standard Trait Definition for Fungible Tokens
      • SIP-012: Burn Height Selection for a Network Upgrade to Introduce New Cost-Limits
      • SIP-013: Standard Trait Definition for Semi-Fungible Tokens
      • SIP-015: Stacks Upgrade of Proof-of-Transfer and Clarity
      • SIP-016: Metadata for Tokens
      • SIP-018: Signed Structured Data
      • SIP-020: Bitwise Operations in Clarity
    • NIP Summaries
      • NIP-1
      • NIP-2
      • NIP-3
      • NIP-4 👀
      • NIP-5 👀
      • NIP-6 👀
      • NIP-7
      • NIP-8
      • NIP-9
      • NIP-10
      • NIP-11
  • Feature Unlocks
    • Decentralized Identity Verification
    • Censorship-Resistant Social Networking
    • Secure Asset Management
    • Private Voting and Governance
    • Decentralized Notifications
    • Trustless Collaboration
  • Related Tech 👀
    • BNS
    • sBTC
  • Experimental Design and Methodology
  • Results and Discussion
  • Conclusion
  • Additional Research
    • ZKP
    • Indistinguishability Obfuscation from Well-Founded Assumptions
  • SIP-xx Draft
  • Disclaimer:
Powered by GitBook
On this page
  1. SIP and NIP Summaries
  2. NIP Summaries

NIP-5 👀

NIP-5 defines a way to map NOSTR keys to DNS-based internet identifiers, enabling clients to associate email-like identifiers with public keys and enabling user discovery.

NIP-5 provides a standard for associating Nostr keys with DNS-based internet identifiers, making it easier for users to discover and identify others on the network. In events with kind 0 (set_metadata), users can include a key "nip05" with an email-like address as its value, such as "bob@example.com".

Upon seeing this event, clients perform the following steps:

  1. Split the identifier into <local-part> and <domain>.

  2. Make a GET request to https://<domain>/.well-known/nostr.json?name=<local-part>.

The response should be a JSON object containing a "names" key, mapping names to hex-formatted public keys:

{ "names": { "bob": "b0635d6a9851d3aed0cd6c495b282167acf761729078d975fc341b22650b07b9" } }

An optional "relays" attribute can also be included, providing an object with public keys as properties and arrays of relay URLs as values. This helps clients learn about relays where a user may be found:

{ "names": { "bob": "b0635d6a9851d3aed0cd6c495b282167acf761729078d975fc341b22650b07b9" }, "relays": { "b0635d6a9851d3aed0cd6c495b282167acf761729078d975fc341b22650b07b9": [ "wss://relay.example.com", "wss://relay2.example.com" ] } }

If the public key from the response matches the one in the set_metadata event, clients consider the "nip05" identifier as valid and can display it.

Clients can also reverse the process to find users' public keys from their NIP-5 internet identifiers. They fetch the well-known URL, obtain the user's public key, and check for a matching "nip05" in the kind 0 event.

PreviousNIP-4 👀NextNIP-6 👀

Last updated 2 years ago