From 473f651b3e714c92bfd236cf5972a7d594aec703 Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Thu, 24 Apr 2025 13:53:56 -0300 Subject: uppercase B7 and B0. --- B0.md | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ B7.md | 41 +++++++++++++++++++++++++++++++++++++++++ b0.md | 61 ------------------------------------------------------------- b7.md | 41 ----------------------------------------- 4 files changed, 102 insertions(+), 102 deletions(-) create mode 100644 B0.md create mode 100644 B7.md delete mode 100644 b0.md delete mode 100644 b7.md diff --git a/B0.md b/B0.md new file mode 100644 index 0000000..0dcefa7 --- /dev/null +++ b/B0.md @@ -0,0 +1,61 @@ +NIP-B0 +====== + +Web Bookmarking +--------------- + +`draft` `optional` + +This NIP defines `kind:39701` (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 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. + +### Format + +The format uses an _addressable event_ of `kind:39701`. + +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. + +### Metadata + +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. + +* `"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). diff --git a/B7.md b/B7.md new file mode 100644 index 0000000..0e0fd34 --- /dev/null +++ b/B7.md @@ -0,0 +1,41 @@ +NIP-B7 +====== + +Blossom media +------------- + +`draft` `optional` + +This NIP specifies how Nostr clients can use [Blossom][] for handling media. + +Blossom is a set of standards (called BUDs) for dealing with servers that store files addressable by their SHA-256 sums. Nostr clients may make use of all the BUDs for allowing users to upload files, manage their own files and so on, but most importantly Nostr clients SHOULD make use of [BUD-03][] to fetch `kind:10063` lists of servers for each user: + +```json +{ + "id": "e4bee088334cb5d38cff1616e964369c37b6081be997962ab289d6c671975d71", + "pubkey": "781208004e09102d7da3b7345e64fd193cd1bc3fce8fdae6008d77f9cabcd036", + "content": "", + "kind": 10063, + "created_at": 1708774162, + "tags": [ + ["server", "https://blossom.self.hosted"], + ["server", "https://cdn.blossom.cloud"] + ], + "sig": "cc5efa74f59e80622c77cacf4dd62076bcb7581b45e9acff471e7963a1f4d8b3406adab5ee1ac9673487480e57d20e523428e60ffcc7e7a904ac882cfccfc653" +} +``` + +Whenever a Nostr client finds a URL in an event published by a given user and that URL ends a 64-character hex string (with or without an ending file extension) and that URL is not available anymore, that means that string is likely a representation of a sha256 and that the user may have a `kind:10063` list of Blossom servers published. + +Given that, the client SHOULD look into the `kind:10063` list for other Blossom servers and lookup for the same 64-character hex string in them, by just using the hex string as a path (optionally with the file extension at the end), producing a URL like `https://blossom.self.hosted/.png`. + +When downloading such files Nostr clients SHOULD verify that the sha256-hash of its contents matches the 64-character hex string. + +More information can be found at [BUD-03][]. + +### More complex interactions + +Clients may use other facilities exposed by Blossom servers (for example, for checking if a file exists in a Blossom server, instead of actually downloading it) which are better documented in the [BUDs][Blossom]. + +[Blossom]: https://github.com/hzrd149/blossom +[BUD-03]: https://github.com/hzrd149/blossom/blob/master/buds/03.md diff --git a/b0.md b/b0.md deleted file mode 100644 index 0dcefa7..0000000 --- a/b0.md +++ /dev/null @@ -1,61 +0,0 @@ -NIP-B0 -====== - -Web Bookmarking ---------------- - -`draft` `optional` - -This NIP defines `kind:39701` (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 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. - -### Format - -The format uses an _addressable event_ of `kind:39701`. - -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. - -### Metadata - -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. - -* `"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). diff --git a/b7.md b/b7.md deleted file mode 100644 index 0e0fd34..0000000 --- a/b7.md +++ /dev/null @@ -1,41 +0,0 @@ -NIP-B7 -====== - -Blossom media -------------- - -`draft` `optional` - -This NIP specifies how Nostr clients can use [Blossom][] for handling media. - -Blossom is a set of standards (called BUDs) for dealing with servers that store files addressable by their SHA-256 sums. Nostr clients may make use of all the BUDs for allowing users to upload files, manage their own files and so on, but most importantly Nostr clients SHOULD make use of [BUD-03][] to fetch `kind:10063` lists of servers for each user: - -```json -{ - "id": "e4bee088334cb5d38cff1616e964369c37b6081be997962ab289d6c671975d71", - "pubkey": "781208004e09102d7da3b7345e64fd193cd1bc3fce8fdae6008d77f9cabcd036", - "content": "", - "kind": 10063, - "created_at": 1708774162, - "tags": [ - ["server", "https://blossom.self.hosted"], - ["server", "https://cdn.blossom.cloud"] - ], - "sig": "cc5efa74f59e80622c77cacf4dd62076bcb7581b45e9acff471e7963a1f4d8b3406adab5ee1ac9673487480e57d20e523428e60ffcc7e7a904ac882cfccfc653" -} -``` - -Whenever a Nostr client finds a URL in an event published by a given user and that URL ends a 64-character hex string (with or without an ending file extension) and that URL is not available anymore, that means that string is likely a representation of a sha256 and that the user may have a `kind:10063` list of Blossom servers published. - -Given that, the client SHOULD look into the `kind:10063` list for other Blossom servers and lookup for the same 64-character hex string in them, by just using the hex string as a path (optionally with the file extension at the end), producing a URL like `https://blossom.self.hosted/.png`. - -When downloading such files Nostr clients SHOULD verify that the sha256-hash of its contents matches the 64-character hex string. - -More information can be found at [BUD-03][]. - -### More complex interactions - -Clients may use other facilities exposed by Blossom servers (for example, for checking if a file exists in a Blossom server, instead of actually downloading it) which are better documented in the [BUDs][Blossom]. - -[Blossom]: https://github.com/hzrd149/blossom -[BUD-03]: https://github.com/hzrd149/blossom/blob/master/buds/03.md -- cgit v1.2.3