From 67cf855c8448c78010cd0d3ed8f19ddfeb1d2606 Mon Sep 17 00:00:00 2001 From: arthurfranca Date: Tue, 12 Sep 2023 09:50:25 -0300 Subject: [PATCH 1/7] Add tags to nip94 --- 94.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/94.md b/94.md index c1b322a2..e34a576d 100644 --- a/94.md +++ b/94.md @@ -21,6 +21,8 @@ This NIP specifies the use of the `1063` event type, having in `content` a descr * `magnet` (optional) URI to magnet file * `i` (optional) torrent infohash * `blurhash`(optional) the [blurhash](https://github.com/woltapp/blurhash) to show while the file is being loaded by the client +* `preview` (optional) shorter file variant such as thumbnail, blurred image or text excerpt +* `caption` (optional) loose description not meant for accessibility ```json { @@ -37,7 +39,9 @@ This NIP specifies the use of the `1063` event type, having in `content` a descr ["dim", ], ["magnet", ], ["i",], - ["blurhash", ] + ["blurhash", ], + ["preview", , ], + ["caption", ] ], "content": , "sig": <64-bytes hex of the signature of the sha256 hash of the serialized event data, which is the same as the "id" field> From de15edb04a7b6dc36bc6d5eaba26fb49e54b300e Mon Sep 17 00:00:00 2001 From: arthurfranca Date: Tue, 12 Sep 2023 10:49:21 -0300 Subject: [PATCH 2/7] Invert caption and alt --- 94.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/94.md b/94.md index e34a576d..8e47c27d 100644 --- a/94.md +++ b/94.md @@ -22,7 +22,7 @@ This NIP specifies the use of the `1063` event type, having in `content` a descr * `i` (optional) torrent infohash * `blurhash`(optional) the [blurhash](https://github.com/woltapp/blurhash) to show while the file is being loaded by the client * `preview` (optional) shorter file variant such as thumbnail, blurred image or text excerpt -* `caption` (optional) loose description not meant for accessibility +* `alt` (optional) description for accessibility ```json { @@ -41,9 +41,9 @@ This NIP specifies the use of the `1063` event type, having in `content` a descr ["i",], ["blurhash", ], ["preview", , ], - ["caption", ] + ["alt", ] ], - "content": , + "content": , "sig": <64-bytes hex of the signature of the sha256 hash of the serialized event data, which is the same as the "id" field> } ``` From 30c799b00148c687b693331cd169c9ed20b93515 Mon Sep 17 00:00:00 2001 From: arthurfranca Date: Tue, 12 Sep 2023 11:58:34 -0300 Subject: [PATCH 3/7] Expand preview into other tags --- 94.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/94.md b/94.md index 8e47c27d..c5e0f182 100644 --- a/94.md +++ b/94.md @@ -21,7 +21,9 @@ This NIP specifies the use of the `1063` event type, having in `content` a descr * `magnet` (optional) URI to magnet file * `i` (optional) torrent infohash * `blurhash`(optional) the [blurhash](https://github.com/woltapp/blurhash) to show while the file is being loaded by the client -* `preview` (optional) shorter file variant such as thumbnail, blurred image or text excerpt +* `thumb` (optional) url of thumbnail with same aspect ratio +* `image` (optional) url of preview image with same dimensions +* `summary` (optional) text excerpt * `alt` (optional) description for accessibility ```json @@ -40,7 +42,9 @@ This NIP specifies the use of the `1063` event type, having in `content` a descr ["magnet", ], ["i",], ["blurhash", ], - ["preview", , ], + ["thumb", ], + ["image", ], + ["summary", ], ["alt", ] ], "content": , From cf764ee7e5922167d944752678d2d8ab10314d3d Mon Sep 17 00:00:00 2001 From: arthurfranca Date: Thu, 14 Sep 2023 12:04:02 -0300 Subject: [PATCH 4/7] Add xx tag --- 94.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/94.md b/94.md index c5e0f182..b512af4c 100644 --- a/94.md +++ b/94.md @@ -15,7 +15,8 @@ This NIP specifies the use of the `1063` event type, having in `content` a descr * `url` the url to download the file * `m` a string indicating the data type of the file. The [MIME types](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types) format must be used, and they should be lowercase. * `"aes-256-gcm"` (optional) key and nonce for AES-GCM encryption with tagSize always 128bits -* `x` containing the SHA-256 hexencoded string of the file. +* `x` containing the SHA-256 hexencoded string of the **original** file before any server transformations +* `xx` containing the SHA-256 hexencoded string of the **transformed** file after any server transformations * `size` (optional) size of file in bytes * `dim` (optional) size of file in pixels in the form `x` * `magnet` (optional) URI to magnet file @@ -37,6 +38,7 @@ This NIP specifies the use of the `1063` event type, having in `content` a descr ["aes-256-gcm",, ], ["m", ], ["x",], + ["xx",], ["size", ], ["dim", ], ["magnet", ], From cc1e73b1866ab2b7da860dcbb982eaa87a9f44ea Mon Sep 17 00:00:00 2001 From: arthurfranca Date: Wed, 27 Sep 2023 12:20:41 -0300 Subject: [PATCH 5/7] Revert x and xx tags --- 94.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/94.md b/94.md index b512af4c..ed9b68c9 100644 --- a/94.md +++ b/94.md @@ -15,8 +15,8 @@ This NIP specifies the use of the `1063` event type, having in `content` a descr * `url` the url to download the file * `m` a string indicating the data type of the file. The [MIME types](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types) format must be used, and they should be lowercase. * `"aes-256-gcm"` (optional) key and nonce for AES-GCM encryption with tagSize always 128bits -* `x` containing the SHA-256 hexencoded string of the **original** file before any server transformations -* `xx` containing the SHA-256 hexencoded string of the **transformed** file after any server transformations +* `x` containing the SHA-256 hexencoded string of the **transformed** file after any server transformations +* `xx` containing the SHA-256 hexencoded string of the **original** file before any server transformations * `size` (optional) size of file in bytes * `dim` (optional) size of file in pixels in the form `x` * `magnet` (optional) URI to magnet file From 3e2765b774e985f17cf8eead360f78dee0bf5fc4 Mon Sep 17 00:00:00 2001 From: arthurfranca Date: Wed, 27 Sep 2023 12:23:38 -0300 Subject: [PATCH 6/7] Rename xx to ox --- 94.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/94.md b/94.md index ed9b68c9..77944a04 100644 --- a/94.md +++ b/94.md @@ -16,7 +16,7 @@ This NIP specifies the use of the `1063` event type, having in `content` a descr * `m` a string indicating the data type of the file. The [MIME types](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types) format must be used, and they should be lowercase. * `"aes-256-gcm"` (optional) key and nonce for AES-GCM encryption with tagSize always 128bits * `x` containing the SHA-256 hexencoded string of the **transformed** file after any server transformations -* `xx` containing the SHA-256 hexencoded string of the **original** file before any server transformations +* `ox` containing the SHA-256 hexencoded string of the **original** file before any server transformations * `size` (optional) size of file in bytes * `dim` (optional) size of file in pixels in the form `x` * `magnet` (optional) URI to magnet file @@ -38,7 +38,7 @@ This NIP specifies the use of the `1063` event type, having in `content` a descr ["aes-256-gcm",, ], ["m", ], ["x",], - ["xx",], + ["ox",], ["size", ], ["dim", ], ["magnet", ], From 4b2cd78defb1564bdc534c01f7f0f6cd230077f8 Mon Sep 17 00:00:00 2001 From: arthurfranca Date: Wed, 27 Sep 2023 12:59:33 -0300 Subject: [PATCH 7/7] Remove ox tag --- 94.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/94.md b/94.md index 77944a04..c5e0f182 100644 --- a/94.md +++ b/94.md @@ -15,8 +15,7 @@ This NIP specifies the use of the `1063` event type, having in `content` a descr * `url` the url to download the file * `m` a string indicating the data type of the file. The [MIME types](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types) format must be used, and they should be lowercase. * `"aes-256-gcm"` (optional) key and nonce for AES-GCM encryption with tagSize always 128bits -* `x` containing the SHA-256 hexencoded string of the **transformed** file after any server transformations -* `ox` containing the SHA-256 hexencoded string of the **original** file before any server transformations +* `x` containing the SHA-256 hexencoded string of the file. * `size` (optional) size of file in bytes * `dim` (optional) size of file in pixels in the form `x` * `magnet` (optional) URI to magnet file @@ -38,7 +37,6 @@ This NIP specifies the use of the `1063` event type, having in `content` a descr ["aes-256-gcm",, ], ["m", ], ["x",], - ["ox",], ["size", ], ["dim", ], ["magnet", ],