From 4364872d70ef2a5467353df8a255668b75ad3397 Mon Sep 17 00:00:00 2001 From: Sebastix Date: Thu, 20 Mar 2025 10:04:58 +0100 Subject: [PATCH] adding more info / requirements for using kind 39700 for web bookmarks --- b0.md | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/b0.md b/b0.md index 5ff88b0f..7ac957fc 100644 --- a/b0.md +++ b/b0.md @@ -6,16 +6,41 @@ Web Bookmarking `draft` `optional` -This NIP defines `kind:39701` as website bookmarks. +This NIP defines `kind:39700` (an _addressable event_) for a URI as a web bookmark which uses the HTTP (Hypertext transfer protocol) scheme. +These web bookmark events are _addressable_ and deletable per [NIP-09](09.md). + +### Editability + +Web bookmarks are meant to be editable, so they should include a `d` tag with an identifier for the article. Clients should take care to only publish and read these events from relays that implement that. If they don't do that they should also take care to hide old versions of the same article they may receive. + +### Format + +The format uses an _addressable event_ of `kind:39700`. + +The `.content` of these events should be a detailed description of the web bookmark. It is required but can be an empty string. + +The `d` tag is required. + +In this way web bookmarks events can be queried by the `d` tag by clients, which is just their URL without the scheme, which is always and everywhere assumed to be `https://` or `http://`. + +The querystring and the hash must be removed entirely, unless their requirement is explicitly stated either by the user or by some hardcoded list of URLs that rely on querystrings for basic routing provided by the client (I've searched the internet extensively and could only find 3 websites that do this: YouTube, Hacker News and a random guy's sad old blog). + +For the date of the last update the `.created_at` field should be used, for "tags"/"hashtags" (i.e. topics about which the event might be of relevance) the `t` tag should be used. + +Other metadata fields can be added as tags to the event as necessary. + +## Example event ```jsonc { - "kind": 39701, + "kind": 39700, "id": "d7a92714f81d0f712e715556aee69ea6da6bfb287e6baf794a095d301d603ec7", "pubkey": "2729620da105979b22acfdfe9585274a78c282869b493abfa4120d3af2061298", "created_at": 1738869705, "tags": [ + // Required tags ["d", "alice.blog/post"], + // Optional tags ["t", "post"], ["t", "insight"] ], @@ -24,8 +49,6 @@ This NIP defines `kind:39701` as website bookmarks. } ``` -Bookmarks can be queried by the `d` tag, which is just their URL without the scheme, which is always and everywhere assumed to be `https://`. +### Replies & Comments -The querystring and the hash must be removed entirely, unless their requirement is explicitly stated either by the user or by some hardcoded list of URLs that rely on querystrings for basic routing provided by the client (I've searched the internet extensively and could only find 3 websites that do this: YouTube, Hacker News and a random guy's sad old blog). - -Bookmarks can be commented on with [NIP-22](22.md). +Replies to `kind 39700` MUST use `kind 1111` events as comments with [NIP-22](22.md).