upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/b0.md
diff options
context:
space:
mode:
authorSebastian Hagens <info@sebastix.nl>2025-04-24 18:52:29 +0200
committerGitHub <noreply@github.com>2025-04-24 13:52:29 -0300
commit121258a611f43b24e62b00dffb1f2b9bcebfbb3f (patch)
treef5f40fd20801bd2377ed63ee5e43296f90bdfd9f /b0.md
parent5a371a5b92f497a59ce23eb320a2d5c1cca29eb4 (diff)
adding more info / requirements for using kind 39701 for web bookmarks (NIP-B0) (#1849)
Co-authored-by: fiatjaf <fiatjaf@gmail.com>
Diffstat (limited to 'b0.md')
-rw-r--r--b0.md61
1 files changed, 61 insertions, 0 deletions
diff --git a/b0.md b/b0.md
new file mode 100644
index 0000000..0dcefa7
--- /dev/null
+++ b/b0.md
@@ -0,0 +1,61 @@
1NIP-B0
2======
3
4Web Bookmarking
5---------------
6
7`draft` `optional`
8
9This NIP defines `kind:39701` (an _addressable event_) for a URI as a web bookmark which uses the HTTP (Hypertext transfer protocol) scheme.
10These web bookmark events are _addressable_ and deletable per [NIP-09](09.md).
11
12### Editability
13
14Web bookmarks are meant to be editable, so they should include a `d` tag with an identifier for the bookmark. 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 bookmark they may receive.
15
16### Format
17
18The format uses an _addressable event_ of `kind:39701`.
19
20The `.content` of these events should be a detailed description of the web bookmark. It is required but can be an empty string.
21
22The `d` tag is required.
23
24In 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://`.
25
26The 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.
27
28### Metadata
29
30For 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.
31
32Other metadata fields can be added as tags to the event as necessary.
33
34* `"published_at"`, for the timestamp in unix seconds (stringified) of the first time the bookmark was published
35* `"title"`, title about bookmark and can be used as a attribute for the HTML link element
36
37## Example event
38
39```jsonc
40{
41 "kind": 39701,
42 "id": "d7a92714f81d0f712e715556aee69ea6da6bfb287e6baf794a095d301d603ec7",
43 "pubkey": "2729620da105979b22acfdfe9585274a78c282869b493abfa4120d3af2061298",
44 "created_at": 1738869705,
45 "tags": [
46 // Required tags
47 ["d", "alice.blog/post"],
48 // Optional tags
49 ["published_at", "1738863000"],
50 ["title", "Blog insights by Alice"],
51 ["t", "post"],
52 ["t", "insight"]
53 ],
54 "content": "A marvelous insight by Alice about the nature of blogs and posts.",
55 "sig": "36d34e6448fe0223e9999361c39c492a208bc423d2fcdfc2a3404e04df7c22dc65bbbd62dbe8a4373c62e4d29aac285b5aa4bb9b4b8053bd6207a8b45fbd0c98"
56}
57```
58
59### Replies & Comments
60
61Replies to `kind 39701` MUST use `kind 1111` events as comments with [NIP-22](22.md).