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-8

NIP-08 provides a standard for handling mentions within Nostr text_notes, including the process of identifying mentions, adding them to tags, and displaying them with appropriate context augmentation.

NIP-08 standardizes the treatment of inline mentions of other events and pubkeys within the content of text_notes for Nostr clients. To implement tagged mentions, clients must:

  1. Display an autocomplete component (or something similar) when users start typing a special key (e.g., "@") or press a button to include a mention.

  2. Upon identifying a mention (e.g., pubkey 27866e9d854c78ae625b867eefdfa9580434bc3e675be08d2acb526610d96fbe), the client must add the pubkey to the .tags with the tag p, and replace its textual reference in .content with #[index], where "index" is the 0-based index of the related tag in the tags array.

The same process applies to mentioning event IDs.

When a client receives a text_note event with such #[index] mentions in its .content, it can:

  1. Perform a search-and-replace using the actual contents from the .tags array with the actual pubkey or event ID mentioned.

  2. Implement any desired context augmentation (e.g., linking to the pubkey or showing a preview of the mentioned event contents).

If #[index] has an index outside the range of the tags array or points to a tag that is not an e or p tag (or a tag otherwise declared to support this notation), the client must not perform the replacement or augmentation and display it as normal text.

PreviousNIP-7NextNIP-9

Last updated 2 years ago