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:
Diffstat (limited to '94.md')
-rw-r--r--94.md24
1 files changed, 16 insertions, 8 deletions
diff --git a/94.md b/94.md
index 78c7056..5c12565 100644
--- a/94.md
+++ b/94.md
@@ -8,10 +8,14 @@ Also the goal is to create a base on the protocol for this bountsr "Filesharing
8Nostr event 8Nostr event
9------------------ 9------------------
10This 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: 10This 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:
11* `r` the url to download the file 11* `url` the url to download the file
12* `type` 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) 12* `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)
13* `decrypt` (optional) If the file is encrypted, you must indicate in the first value the algorithm used to encrypt the file and in the second value the parameters that allow the decryption of the file 13* `"aes-256-gcm"` (optional) key and nonce for AES-GCM encryption with tagSize always 128bits
14* `hash` containing the SHA-256 hexencoded string of the file or the BlurHash string (for images). The third array value is the lowercase chosen algorithm name: "sha256" or "blurhash". 14* `x` containing the SHA-256 hexencoded string of the file.
15* `size` (optional) size of file in bytes
16* `magnet` (optional) URI to magnet file
17* `i` (optional) torrent infohash
18* `blurhash`(optional) for cosmetic purposes
15 19
16```json 20```json
17{ 21{
@@ -20,10 +24,14 @@ This NIP specifies the use of the `1063` event type, having in `content` a descr
20 "created_at": <unix timestamp in seconds>, 24 "created_at": <unix timestamp in seconds>,
21 "kind": 1063, 25 "kind": 1063,
22 "tags": [ 26 "tags": [
23 ["r",<string with URI of file>], 27 ["url",<string with URI of file>],
24 ["decrypt",<algorithm>,<Decryption Params>], 28 ["aes-256-gcm",<key>, <iv>],
25 ["type", <MIME type>], 29 ["m", <MIME type>],
26 ["hash", "LKN]Rv%2Tw=w]~RBVZRi};RPxuwH", <"blurhash" or "sha256">] 30 ["x",<Hash SHA-256>],
31 ["size", <size of file in bytes>],
32 ["magnet",<magnet URI> ],
33 ["i",<torrent infohash>],
34 ["blurhash", <value>]
27 ], 35 ],
28 "content": <description>, 36 "content": <description>,
29 "sig": <64-bytes hex of the signature of the sha256 hash of the serialized event data, which is the same as the "id" field> 37 "sig": <64-bytes hex of the signature of the sha256 hash of the serialized event data, which is the same as the "id" field>