mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-22 08:25:53 -05:00
nip update to reach consensus with other nips
This commit is contained in:
parent
bfd2a0fc38
commit
34af61df41
24
94.md
24
94.md
|
@ -8,10 +8,14 @@ Also the goal is to create a base on the protocol for this bountsr "Filesharing
|
||||||
Nostr event
|
Nostr event
|
||||||
------------------
|
------------------
|
||||||
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:
|
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:
|
||||||
* `r` the url to download the file
|
* `url` the url to download the file
|
||||||
* `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)
|
* `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)
|
||||||
* `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
|
* `"aes-256-gcm"` (optional) key and nonce for AES-GCM encryption with tagSize always 128bits
|
||||||
* `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".
|
* `x` containing the SHA-256 hexencoded string of the file.
|
||||||
|
* `size` (optional) size of file in bytes
|
||||||
|
* `magnet` (optional) URI to magnet file
|
||||||
|
* `i` (optional) torrent infohash
|
||||||
|
* `blurhash`(optional) for cosmetic purposes
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
|
@ -20,10 +24,14 @@ This NIP specifies the use of the `1063` event type, having in `content` a descr
|
||||||
"created_at": <unix timestamp in seconds>,
|
"created_at": <unix timestamp in seconds>,
|
||||||
"kind": 1063,
|
"kind": 1063,
|
||||||
"tags": [
|
"tags": [
|
||||||
["r",<string with URI of file>],
|
["url",<string with URI of file>],
|
||||||
["decrypt",<algorithm>,<Decryption Params>],
|
["aes-256-gcm",<key>, <iv>],
|
||||||
["type", <MIME type>],
|
["m", <MIME type>],
|
||||||
["hash", "LKN]Rv%2Tw=w]~RBVZRi};RPxuwH", <"blurhash" or "sha256">]
|
["x",<Hash SHA-256>],
|
||||||
|
["size", <size of file in bytes>],
|
||||||
|
["magnet",<magnet URI> ],
|
||||||
|
["i",<torrent infohash>],
|
||||||
|
["blurhash", <value>]
|
||||||
],
|
],
|
||||||
"content": <description>,
|
"content": <description>,
|
||||||
"sig": <64-bytes hex of the signature of the sha256 hash of the serialized event data, which is the same as the "id" field>
|
"sig": <64-bytes hex of the signature of the sha256 hash of the serialized event data, which is the same as the "id" field>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user