upleb.uk

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

summaryrefslogtreecommitdiff
path: root/B0.md
blob: 22ed9105bca13432d4137b702a6437e059d1afbd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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 

```jsonc
{
  "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](22.md).