nips/B0.md

1.6 KiB

NIP-B0

Web Bookmarking

draft optional

This NIP defines kind:39701 for a URI as editable web bookmark which uses the HTTP scheme.

Format

The format uses kind:39701.

The .content should be a detailed description of the web bookmark. It can be an empty string.

The d tag is just their URL without the scheme, which is always and everywhere assumed to be https:// or http://.

In this way web bookmarks events can be queried by the d tag by clients.

Metadata

Metadata fields can be added as tags to the event as necessary.

  • "t", for "tags"/"hashtags" (i.e. topics about which the event might be of relevance)
  • "published_at", for the timestamp in unix seconds (stringified) of the first time the bookmark was published
  • "title", title about bookmark and can be used as a attribute for the HTML link element

Example event

{
  "kind": 39701,
  "id": "d7a92714f81d0f712e715556aee69ea6da6bfb287e6baf794a095d301d603ec7",
  "pubkey": "2729620da105979b22acfdfe9585274a78c282869b493abfa4120d3af2061298",
  "created_at": 1738869705,
  "tags": [
    // Required tags
    ["d", "alice.blog/post"],
    // Optional tags    
    ["published_at", "1738863000"],
    ["title", "Blog insights by Alice"],  
    ["t", "post"],
    ["t", "insight"]
  ],
  "content": "A marvelous insight by Alice about the nature of blogs and posts.",
  "sig": "36d34e6448fe0223e9999361c39c492a208bc423d2fcdfc2a3404e04df7c22dc65bbbd62dbe8a4373c62e4d29aac285b5aa4bb9b4b8053bd6207a8b45fbd0c98"
}

Replies & Comments

Replies to kind 39701 MUST use kind 1111 events as comments with NIP-22.