Compare commits

..

3 Commits

Author SHA1 Message Date
Kieran
d7cda6e8da Update 71.md 2025-01-29 10:26:59 +00:00
Kieran
75ede7616f Update 71.md 2025-01-29 10:26:41 +00:00
Kieran
2c8316307a Update 71.md 2025-01-29 10:22:08 +00:00
6 changed files with 37 additions and 29 deletions

2
01.md
View File

@@ -89,7 +89,7 @@ Kinds specify how clients should interpret the meaning of each event and the oth
This NIP defines one basic kind: This NIP defines one basic kind:
- `0`: **user metadata**: the `content` is set to a stringified JSON object `{name: <nickname or full name>, about: <short bio>, picture: <url of the image>}` describing the user who created the event. [Extra metadata fields](24.md#kind-0) may be set. A relay may delete older events once it gets a new one for the same pubkey. - `0`: **user metadata**: the `content` is set to a stringified JSON object `{name: <username>, about: <string>, picture: <url, string>}` describing the user who created the event. [Extra metadata fields](24.md#kind-0) may be set. A relay may delete older events once it gets a new one for the same pubkey.
And also a convention for kind ranges that allow for easier experimentation and flexibility of relay implementation: And also a convention for kind ranges that allow for easier experimentation and flexibility of relay implementation:

2
51.md
View File

@@ -50,7 +50,7 @@ Aside from their main identifier, the `"d"` tag, sets can optionally have a `"ti
| Relay sets | 30002 | user-defined relay groups the user can easily pick and choose from during various operations | `"relay"` (relay URLs) | | Relay sets | 30002 | user-defined relay groups the user can easily pick and choose from during various operations | `"relay"` (relay URLs) |
| Bookmark sets | 30003 | user-defined bookmarks categories , for when bookmarks must be in labeled separate groups | `"e"` (kind:1 notes), `"a"` (kind:30023 articles), `"t"` (hashtags), `"r"` (URLs) | | Bookmark sets | 30003 | user-defined bookmarks categories , for when bookmarks must be in labeled separate groups | `"e"` (kind:1 notes), `"a"` (kind:30023 articles), `"t"` (hashtags), `"r"` (URLs) |
| Curation sets | 30004 | groups of articles picked by users as interesting and/or belonging to the same category | `"a"` (kind:30023 articles), `"e"` (kind:1 notes) | | Curation sets | 30004 | groups of articles picked by users as interesting and/or belonging to the same category | `"a"` (kind:30023 articles), `"e"` (kind:1 notes) |
| Curation sets | 30005 | groups of videos picked by users as interesting and/or belonging to the same category | `"a"` (kind:21 videos) | | Curation sets | 30005 | groups of videos picked by users as interesting and/or belonging to the same category | `"a"` (kind:34235 videos) |
| Kind mute sets | 30007 | mute pubkeys by kinds<br>`"d"` tag MUST be the kind string | `"p"` (pubkeys) | | Kind mute sets | 30007 | mute pubkeys by kinds<br>`"d"` tag MUST be the kind string | `"p"` (pubkeys) |
| Interest sets | 30015 | interest topics represented by a bunch of "hashtags" | `"t"` (hashtags) | | Interest sets | 30015 | interest topics represented by a bunch of "hashtags" | `"t"` (hashtags) |
| Emoji sets | 30030 | categorized emoji groups | `"emoji"` (see [NIP-30](30.md)) | | Emoji sets | 30030 | categorized emoji groups | `"emoji"` (see [NIP-30](30.md)) |

6
60.md
View File

@@ -134,7 +134,7 @@ While the client is fetching (and perhaps validating) proofs it can use the opti
## Spending token ## Spending token
If Alice spends 4 sats from this token event If Alice spends 4 sats from this token event
```jsonc ```jsonconc
{ {
"kind": 7375, "kind": 7375,
"id": "event-id-1", "id": "event-id-1",
@@ -155,7 +155,7 @@ If Alice spends 4 sats from this token event
Her client: Her client:
* MUST roll over the unspent proofs: * MUST roll over the unspent proofs:
```jsonc ```jsonconc
{ {
"kind": 7375, "kind": 7375,
"id": "event-id-2", "id": "event-id-2",
@@ -176,7 +176,7 @@ Her client:
* MUST delete event `event-id-1` * MUST delete event `event-id-1`
* SHOULD add the `event-id-1` to the `del` array of deleted token-ids. * SHOULD add the `event-id-1` to the `del` array of deleted token-ids.
* SHOULD create a `kind:7376` event to record the spend * SHOULD create a `kind:7376` event to record the spend
```jsonc ```jsonconc
{ {
"kind": 7376, "kind": 7376,
"content": nip44_encrypt([ "content": nip44_encrypt([

6
68.md
View File

@@ -12,7 +12,7 @@ The idea is for this type of event to cater to Nostr clients resembling platform
## Picture Events ## Picture Events
Picture events contain a `title` tag and description in the `.content`. Picture events contain a `title` tag and description in the `.content`.
They may contain multiple images to be displayed as a single post. They may contain multiple images to be displayed as a single post.
@@ -81,7 +81,7 @@ They may contain multiple images to be displayed as a single post.
The `imeta` tag `annotate-user` places a user link in the specific position in the image. The `imeta` tag `annotate-user` places a user link in the specific position in the image.
Only the following media types are accepted: Only the following media types are accepted:
- `image/apng`: Animated Portable Network Graphics (APNG) - `image/apng`: Animated Portable Network Graphics (APNG)
- `image/avif`: AV1 Image File Format (AVIF) - `image/avif`: AV1 Image File Format (AVIF)
- `image/gif`: Graphics Interchange Format (GIF) - `image/gif`: Graphics Interchange Format (GIF)
@@ -89,4 +89,4 @@ Only the following media types are accepted:
- `image/png`: Portable Network Graphics (PNG) - `image/png`: Portable Network Graphics (PNG)
- `image/webp`: Web Picture format (WEBP) - `image/webp`: Web Picture format (WEBP)
Picture events might be used with [NIP-71](71.md)'s kind `22` to display short vertical videos in the same feed. Picture events might be used with [NIP-71](71.md)'s kind `34236` to display short vertical videos in the same feed.

42
71.md
View File

@@ -6,19 +6,17 @@ Video Events
`draft` `optional` `draft` `optional`
This specification defines _video_ events representing a dedicated post of externally hosted content. This specification defines video events representing a dedicated post of externally hosted content. These video events are _addressable_ and delete-requestable per [NIP-09](09.md).
Unlike a `kind:1` event with a video attached, video events are meant to contain all additional metadata concerning the subject media and to be surfaced in video-specific clients rather than general micro-blogging clients. The thought is for events of this kind to be referenced in a Netflix, YouTube, or TikTok like nostr client where the video itself is at the center of the experience. Unlike a `kind 1` event with a video attached, Video Events are meant to contain all additional metadata concerning the subject media and to be surfaced in video-specific clients rather than general micro-blogging clients. The thought is for events of this kind to be referenced in a Netflix, YouTube, or TikTok like nostr client where the video itself is at the center of the experience.
## Video Events ## Video Events
There are two types of video events represented by different kinds: _normal_ and _short_ video events. This is meant to allow clients to cater to each as the viewing experience for longer, mostly horizontal (landscape) videos is often different than that of short-form, mostly vertical (portrait), videos ("stories", "reels", "shorts" etc). There are two types of video events represented by different kinds: horizontal and vertical video events. This is meant to allow clients to cater to each as the viewing experience for horizontal (landscape) videos is often different than that of vertical (portrait) videos (Stories, Reels, Shorts, etc).
Nothing except cavaliership and common sense prevents a _short_ video from being long, or a _normal_ video from being vertical, and that may or may not be justified, it's mostly a stylistic qualitative difference, not a question of actual raw size.
#### Format #### Format
The format uses a _regular event_ kind `21` for _normal_ videos and `22` for _short_ videos. The format uses an _addressable event_ kind `34235` for horizontal videos and `34236` for vertical videos.
The `.content` of these events is a summary or description on the video content. The `.content` of these events is a summary or description on the video content.
@@ -26,10 +24,15 @@ The primary source of video information is the `imeta` tags which is defined in
Each `imeta` tag can be used to specify a variant of the video by the `dim` & `m` properties. Each `imeta` tag can be used to specify a variant of the video by the `dim` & `m` properties.
This NIP defines the following additional `imeta` properties aside form those listen in [NIP-92](92.md) & [NIP-94](94.md):
* `duration` (recommended) the duration of the video/audio in seconds (floating point number)
* `bitrate` (recommended) the average bitrate of the video/audio in bits/sec
Example: Example:
```json ```json
[ [
["imeta", ["imeta",
"dim 1920x1080", "dim 1920x1080",
"url https://myvideo.com/1080/12345.mp4", "url https://myvideo.com/1080/12345.mp4",
"x 3093509d1e0bc604ff60cb9286f4cd7c781553bc8991937befaacfdc28ec5cdc", "x 3093509d1e0bc604ff60cb9286f4cd7c781553bc8991937befaacfdc28ec5cdc",
@@ -39,8 +42,10 @@ Example:
"fallback https://myotherserver.com/1080/12345.mp4", "fallback https://myotherserver.com/1080/12345.mp4",
"fallback https://andanotherserver.com/1080/12345.mp4", "fallback https://andanotherserver.com/1080/12345.mp4",
"service nip96", "service nip96",
"bitrate 3000000",
"duration 29.223"
], ],
["imeta", ["imeta",
"dim 1280x720", "dim 1280x720",
"url https://myvideo.com/720/12345.mp4", "url https://myvideo.com/720/12345.mp4",
"x e1d4f808dae475ed32fb23ce52ef8ac82e3cc760702fca10d62d382d2da3697d", "x e1d4f808dae475ed32fb23ce52ef8ac82e3cc760702fca10d62d382d2da3697d",
@@ -50,8 +55,10 @@ Example:
"fallback https://myotherserver.com/720/12345.mp4", "fallback https://myotherserver.com/720/12345.mp4",
"fallback https://andanotherserver.com/720/12345.mp4", "fallback https://andanotherserver.com/720/12345.mp4",
"service nip96", "service nip96",
"bitrate 2000000",
"duration 29.24"
], ],
["imeta", ["imeta",
"dim 1280x720", "dim 1280x720",
"url https://myvideo.com/720/12345.m3u8", "url https://myvideo.com/720/12345.m3u8",
"x 704e720af2697f5d6a198ad377789d462054b6e8d790f8a3903afbc1e044014f", "x 704e720af2697f5d6a198ad377789d462054b6e8d790f8a3903afbc1e044014f",
@@ -61,6 +68,7 @@ Example:
"fallback https://myotherserver.com/720/12345.m3u8", "fallback https://myotherserver.com/720/12345.m3u8",
"fallback https://andanotherserver.com/720/12345.m3u8", "fallback https://andanotherserver.com/720/12345.m3u8",
"service nip96", "service nip96",
"duration 29.21"
], ],
] ]
``` ```
@@ -74,7 +82,6 @@ Additionally `service nip96` may be included to allow clients to search the auth
### Other tags: ### Other tags:
* `title` (required) title of the video * `title` (required) title of the video
* `published_at`, for the timestamp in unix seconds (stringified) of the first time the video was published * `published_at`, for the timestamp in unix seconds (stringified) of the first time the video was published
* `duration` (optional) video duration in seconds
* `text-track` (optional, repeated) link to WebVTT file for video, type of supplementary information (captions/subtitles/chapters/metadata), optional language code * `text-track` (optional, repeated) link to WebVTT file for video, type of supplementary information (captions/subtitles/chapters/metadata), optional language code
* `content-warning` (optional) warning about content of NSFW video * `content-warning` (optional) warning about content of NSFW video
* `alt` (optional) description for accessibility * `alt` (optional) description for accessibility
@@ -88,15 +95,17 @@ Additionally `service nip96` may be included to allow clients to search the auth
"id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>, "id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>,
"pubkey": <32-bytes lowercase hex-encoded public key of the event creator>, "pubkey": <32-bytes lowercase hex-encoded public key of the event creator>,
"created_at": <Unix timestamp in seconds>, "created_at": <Unix timestamp in seconds>,
"kind": 21 | 22, "kind": 34235 | 34236,
"content": "<summary / description of video>", "content": "<summary / description of video>",
"tags": [ "tags": [
["d", "<UUID>"],
["title", "<title of video>"], ["title", "<title of video>"],
["published_at", "<unix timestamp>"], ["published_at", "<unix timestamp>"],
["alt", <description>], ["alt", <description>],
// video Data // Video Data
["imeta", ["imeta",
"dim 1920x1080", "dim 1920x1080",
"url https://myvideo.com/1080/12345.mp4", "url https://myvideo.com/1080/12345.mp4",
"x 3093509d1e0bc604ff60cb9286f4cd7c781553bc8991937befaacfdc28ec5cdc", "x 3093509d1e0bc604ff60cb9286f4cd7c781553bc8991937befaacfdc28ec5cdc",
@@ -108,20 +117,19 @@ Additionally `service nip96` may be included to allow clients to search the auth
"service nip96", "service nip96",
], ],
["duration", <duration of video in seconds>],
["text-track", "<encoded `kind 6000` event>", "<recommended relay urls>"], ["text-track", "<encoded `kind 6000` event>", "<recommended relay urls>"],
["content-warning", "<reason>"], ["content-warning", "<reason>"],
["segment", <start>, <end>, "<title>", "<thumbnail URL>"], ["segment", <start>, <end>, "<title>", "<thumbnail URL>"],
// participants // Participants
["p", "<32-bytes hex of a pubkey>", "<optional recommended relay URL>"], ["p", "<32-bytes hex of a pubkey>", "<optional recommended relay URL>"],
["p", "<32-bytes hex of a pubkey>", "<optional recommended relay URL>"], ["p", "<32-bytes hex of a pubkey>", "<optional recommended relay URL>"],
// hashtags // Hashtags
["t", "<tag>"], ["t", "<tag>"],
["t", "<tag>"], ["t", "<tag>"],
// reference links // Reference links
["r", "<url>"], ["r", "<url>"],
["r", "<url>"] ["r", "<url>"]
] ]

View File

@@ -122,8 +122,6 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
| `16` | Generic Repost | [18](18.md) | | `16` | Generic Repost | [18](18.md) |
| `17` | Reaction to a website | [25](25.md) | | `17` | Reaction to a website | [25](25.md) |
| `20` | Picture | [68](68.md) | | `20` | Picture | [68](68.md) |
| `21` | Video Event | [71](71.md) |
| `22` | Short-form Portrait Video Event | [71](71.md) |
| `40` | Channel Creation | [28](28.md) | | `40` | Channel Creation | [28](28.md) |
| `41` | Channel Metadata | [28](28.md) | | `41` | Channel Metadata | [28](28.md) |
| `42` | Channel Message | [28](28.md) | | `42` | Channel Message | [28](28.md) |
@@ -229,8 +227,10 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
| `31924` | Calendar | [52](52.md) | | `31924` | Calendar | [52](52.md) |
| `31925` | Calendar Event RSVP | [52](52.md) | | `31925` | Calendar Event RSVP | [52](52.md) |
| `31989` | Handler recommendation | [89](89.md) | | `31989` | Handler recommendation | [89](89.md) |
| `31990` | Handler information | [89](89.md) | | | `31990` | Handler information | [89](89.md) |
| `32267` | Software Application | | | | `32267` | Software Application | |
| `34235` | Video Event | [71](71.md) |
| `34236` | Short-form Portrait Video Event | [71](71.md) |
| `34550` | Community Definition | [72](72.md) | | `34550` | Community Definition | [72](72.md) |
| `37375` | Cashu Wallet Event | [60](60.md) | | `37375` | Cashu Wallet Event | [60](60.md) |
| `38383` | Peer-to-peer Order events | [69](69.md) | | `38383` | Peer-to-peer Order events | [69](69.md) |