upleb.uk

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

summaryrefslogtreecommitdiff
path: root/94.md
diff options
context:
space:
mode:
authorSemisol <45574030+Semisol@users.noreply.github.com>2023-11-19 01:45:41 +0100
committerGitHub <noreply@github.com>2023-11-19 01:45:41 +0100
commitda19c078ab892b578a5c35968443205c9e8ac27f (patch)
tree17a9f4f3105acdae234d3bc67e42571aed261fa2 /94.md
parent4d709d1804de45bab3739ce814d4b0c0b211c273 (diff)
parent5dcfe85306434f21ecb1e7a47edd92b2e3e64f9a (diff)
Merge branch 'master' into clarify-json-serialization
Diffstat (limited to '94.md')
-rw-r--r--94.md21
1 files changed, 13 insertions, 8 deletions
diff --git a/94.md b/94.md
index 24dd346..95b6a3b 100644
--- a/94.md
+++ b/94.md
@@ -4,7 +4,7 @@ NIP-94
4File Metadata 4File Metadata
5------------- 5-------------
6 6
7`draft` `optional` `author:frbitten` `author:kieran` `author:lovvtide` `author:fiatjaf` `author:staab` 7`draft` `optional`
8 8
9The purpose of this NIP is to allow an organization and classification of shared files. So that relays can filter and organize in any way that is of interest. With that, multiple types of filesharing clients can be created. NIP-94 support is not expected to be implemented by "social" clients that deal with kind:1 notes or by longform clients that deal with kind:30023 articles. 9The purpose of this NIP is to allow an organization and classification of shared files. So that relays can filter and organize in any way that is of interest. With that, multiple types of filesharing clients can be created. NIP-94 support is not expected to be implemented by "social" clients that deal with kind:1 notes or by longform clients that deal with kind:30023 articles.
10 10
@@ -13,7 +13,7 @@ The purpose of this NIP is to allow an organization and classification of shared
13This 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: 13This 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,12 +21,13 @@ 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{
27 "id": <32-bytes lowercase hex-encoded sha256 of the the serialized event data>,
28 "pubkey": <32-bytes lowercase hex-encoded public key of the event creator>,
29 "created_at": <unix timestamp in seconds>,
30 "kind": 1063, 31 "kind": 1063,
31 "tags": [ 32 "tags": [
32 ["url",<string with URI of file>], 33 ["url",<string with URI of file>],
@@ -37,10 +38,14 @@ This NIP specifies the use of the `1063` event type, having in `content` a descr
37 ["dim", <size of file in pixels>], 38 ["dim", <size of file in pixels>],
38 ["magnet",<magnet URI> ], 39 ["magnet",<magnet URI> ],
39 ["i",<torrent infohash>], 40 ["i",<torrent infohash>],
40 ["blurhash", <value>] 41 ["blurhash", <value>],
42 ["thumb", <string with thumbnail URI>],
43 ["image", <string with preview URI>],
44 ["summary", <excerpt>],
45 ["alt", <description>]
41 ], 46 ],
42 "content": <description>, 47 "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> 48 ...
44} 49}
45``` 50```
46 51