diff options
| author | Pablo Fernandez <p@f7z.io> | 2023-10-15 21:30:42 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-15 21:30:42 +0300 |
| commit | a482f47ae4c36d38062cd0fd3ee6235e57691673 (patch) | |
| tree | a16f57208cd3c3ef74237dafcef277f16d70e688 /94.md | |
| parent | d9400e1e7b08225aedb6c78b522c5ad07b5198b4 (diff) | |
| parent | 202e18f2b256646148805880ed58731c1c8b2b9b (diff) | |
Merge branch 'master' into vending-machine
Diffstat (limited to '94.md')
| -rw-r--r-- | 94.md | 14 |
1 files changed, 11 insertions, 3 deletions
| @@ -13,7 +13,7 @@ The purpose of this NIP is to allow an organization and classification of shared | |||
| 13 | This NIP specifies the use of the `1063` event type, having in `content` a description of the file content, and a list of tags described below: | 13 | This NIP specifies the use of the `1063` event type, having in `content` a description of the file content, and a list of tags described below: |
| 14 | 14 | ||
| 15 | * `url` the url to download the file | 15 | * `url` the url to download the file |
| 16 | * `m` a string indicating the data type of the file. The MIME types format must be used (https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types) | 16 | * `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. |
| 17 | * `"aes-256-gcm"` (optional) key and nonce for AES-GCM encryption with tagSize always 128bits | 17 | * `"aes-256-gcm"` (optional) key and nonce for AES-GCM encryption with tagSize always 128bits |
| 18 | * `x` containing the SHA-256 hexencoded string of the file. | 18 | * `x` containing the SHA-256 hexencoded string of the file. |
| 19 | * `size` (optional) size of file in bytes | 19 | * `size` (optional) size of file in bytes |
| @@ -21,6 +21,10 @@ This NIP specifies the use of the `1063` event type, having in `content` a descr | |||
| 21 | * `magnet` (optional) URI to magnet file | 21 | * `magnet` (optional) URI to magnet file |
| 22 | * `i` (optional) torrent infohash | 22 | * `i` (optional) torrent infohash |
| 23 | * `blurhash`(optional) the [blurhash](https://github.com/woltapp/blurhash) to show while the file is being loaded by the client | 23 | * `blurhash`(optional) the [blurhash](https://github.com/woltapp/blurhash) to show while the file is being loaded by the client |
| 24 | * `thumb` (optional) url of thumbnail with same aspect ratio | ||
| 25 | * `image` (optional) url of preview image with same dimensions | ||
| 26 | * `summary` (optional) text excerpt | ||
| 27 | * `alt` (optional) description for accessibility | ||
| 24 | 28 | ||
| 25 | ```json | 29 | ```json |
| 26 | { | 30 | { |
| @@ -37,9 +41,13 @@ This NIP specifies the use of the `1063` event type, having in `content` a descr | |||
| 37 | ["dim", <size of file in pixels>], | 41 | ["dim", <size of file in pixels>], |
| 38 | ["magnet",<magnet URI> ], | 42 | ["magnet",<magnet URI> ], |
| 39 | ["i",<torrent infohash>], | 43 | ["i",<torrent infohash>], |
| 40 | ["blurhash", <value>] | 44 | ["blurhash", <value>], |
| 45 | ["thumb", <string with thumbnail URI>], | ||
| 46 | ["image", <string with preview URI>], | ||
| 47 | ["summary", <excerpt>], | ||
| 48 | ["alt", <description>] | ||
| 41 | ], | 49 | ], |
| 42 | "content": <description>, | 50 | "content": <caption>, |
| 43 | "sig": <64-bytes hex of the signature of the sha256 hash of the serialized event data, which is the same as the "id" field> | 51 | "sig": <64-bytes hex of the signature of the sha256 hash of the serialized event data, which is the same as the "id" field> |
| 44 | } | 52 | } |
| 45 | ``` | 53 | ``` |