mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-22 16:35:52 -05:00
reword NIP-94 to remove confusion.
This commit is contained in:
parent
bf8f8e2708
commit
5d0cbcbebf
36
94.md
36
94.md
|
@ -1,13 +1,17 @@
|
||||||
NIP-94 - File Header
|
NIP-94
|
||||||
======
|
======
|
||||||
`draft` `optional` `author:frbitten`
|
|
||||||
|
|
||||||
The 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.
|
File Metadata
|
||||||
Also the goal is to create a base on the protocol for this bountsr "Filesharing App" (https://bountsr.org/p2p-filesharing/) to be implemented.
|
-------------
|
||||||
|
|
||||||
|
`draft` `optional` `author:frbitten` `author:kieran` `author:lovvtide` `author:fiatjaf`
|
||||||
|
|
||||||
|
The 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.
|
||||||
|
|
||||||
|
## Event format
|
||||||
|
|
||||||
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:
|
||||||
|
|
||||||
* `url` the url to download the file
|
* `url` the url to download the file
|
||||||
* `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)
|
* `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)
|
||||||
* `"aes-256-gcm"` (optional) key and nonce for AES-GCM encryption with tagSize always 128bits
|
* `"aes-256-gcm"` (optional) key and nonce for AES-GCM encryption with tagSize always 128bits
|
||||||
|
@ -15,7 +19,7 @@ This NIP specifies the use of the `1063` event type, having in `content` a descr
|
||||||
* `size` (optional) size of file in bytes
|
* `size` (optional) size of file in bytes
|
||||||
* `magnet` (optional) URI to magnet file
|
* `magnet` (optional) URI to magnet file
|
||||||
* `i` (optional) torrent infohash
|
* `i` (optional) torrent infohash
|
||||||
* `blurhash`(optional) the [blurhash](https://github.com/woltapp/blurhash) to show while the file is being loaded by the client
|
* `blurhash`(optional) the [blurhash](https://github.com/woltapp/blurhash) to show while the file is being loaded by the client
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
|
@ -38,20 +42,8 @@ This NIP specifies the use of the `1063` event type, having in `content` a descr
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Client Behavior
|
## Suggested use cases
|
||||||
---------------
|
|
||||||
The client can use this event as they see fit. Either showing events in the same feed as kind 1 events or creating a specific feed for file listings.
|
|
||||||
|
|
||||||
It allows the app to create image galleries (memes, animations) that can be reused countless times in different notes. As it exists in whatsapp, telegram, etc.
|
* A relay for indexing shared files. For example, to promote torrents.
|
||||||
|
* A pinterest-like client where people can share their portfolio and inspire others.
|
||||||
Example: <https://ibb.co/Fnj5TMg>
|
|
||||||
|
|
||||||
To do this, just select the image from the gallery (events NIP-94) and include the URL of the selected image
|
|
||||||
|
|
||||||
|
|
||||||
Suggested Use Cases
|
|
||||||
-------------------
|
|
||||||
* A relay for indexing shared files. For example to promote torrents
|
|
||||||
* A Pinterest-like relay and app where people can share their portfolio and inspire others.
|
|
||||||
* A simple way to distribute configurations and software updates.
|
* A simple way to distribute configurations and software updates.
|
||||||
* Specialized relays can provide collections of emojis, memes and animated gifs to be used in notes.
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/fia
|
||||||
- [NIP-58: Badges](58.md)
|
- [NIP-58: Badges](58.md)
|
||||||
- [NIP-65: Relay List Metadata](65.md)
|
- [NIP-65: Relay List Metadata](65.md)
|
||||||
- [NIP-78: Application-specific data](78.md)
|
- [NIP-78: Application-specific data](78.md)
|
||||||
- [NIP-94: File Header](94.md)
|
- [NIP-94: File Metadata](94.md)
|
||||||
|
|
||||||
## Event Kinds
|
## Event Kinds
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user