NIP-B0: Fix URI scheme ambiguity (#2425)

Co-authored-by: fiatjaf <fiatjaf@gmail.com>
This commit is contained in:
alopatindev
2026-07-30 22:11:56 -03:00
committed by GitHub
co-authored by fiatjaf
parent 6d2979b3f5
commit 375160536f
+13 -6
View File
@@ -6,7 +6,7 @@ Web Bookmarking
`draft` `optional` `draft` `optional`
This NIP defines `kind:39701` for a URI as editable web bookmark which uses the HTTP scheme. This NIP defines `kind:39701` for a URI as editable web bookmark.
### Format ### Format
@@ -14,7 +14,7 @@ The format uses `kind:39701`.
The `.content` should be a detailed description of the web bookmark. It can be an empty string. 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://`. The `d` tag is just their URI. All characters before the hostname should be omitted if the scheme is `https`.
In this way web bookmarks events can be queried by the `d` tag by clients. In this way web bookmarks events can be queried by the `d` tag by clients.
@@ -26,7 +26,7 @@ Metadata fields can be added as tags to the event as necessary.
* `"published_at"`, for the timestamp in unix seconds (stringified) of the first time the bookmark was published * `"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 * `"title"`, title about bookmark and can be used as a attribute for the HTML link element
## Example event ## Examples
```yaml ```yaml
{ {
@@ -37,9 +37,9 @@ Metadata fields can be added as tags to the event as necessary.
"tags": [ "tags": [
// Required tags // Required tags
["d", "alice.blog/post"], ["d", "alice.blog/post"],
// Optional tags // Optional tags
["published_at", "1738863000"], ["published_at", "1738863000"],
["title", "Blog insights by Alice"], ["title", "Blog insights by Alice"],
["t", "post"], ["t", "post"],
["t", "insight"] ["t", "insight"]
], ],
@@ -48,6 +48,13 @@ Metadata fields can be added as tags to the event as necessary.
} }
``` ```
```yaml
{
...
"tags": [
["d", "http://alice.i2p/post"]
],
}
### Replies & Comments ### Replies & Comments
Replies to `kind 39701` MUST use `kind 1111` events as comments with [NIP-22](22.md). Replies to `kind:39701` MUST use `kind 1111` events as comments with [NIP-22](22.md).