upleb.uk

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

summaryrefslogtreecommitdiff
path: root/53.md
diff options
context:
space:
mode:
Diffstat (limited to '53.md')
-rw-r--r--53.md51
1 files changed, 24 insertions, 27 deletions
diff --git a/53.md b/53.md
index c5f2704..fad2622 100644
--- a/53.md
+++ b/53.md
@@ -4,19 +4,19 @@ NIP-53
4Live Activities 4Live Activities
5--------------- 5---------------
6 6
7`draft` `optional` `author:vitorpamplona` `author:v0l` 7`draft` `optional`
8 8
9## Abstract 9Service providers want to offer live activities to the Nostr network in such a way that participants can easily log and query by clients. This NIP describes a general framework to advertise the involvement of pubkeys in such live activities.
10 10
11Service providers want to offer live activities to the Nostr network in such a way that participants can easily logged and queried by clients. This NIP describes a general framework to advertise the involvement of pubkeys in such live activities. 11## Concepts
12 12
13# Live Event 13### Live Event
14 14
15A special event with `kind:30311` "Live Event" is defined as a [NIP-33: Parameterized Replaceable Events](33.md) of public `p` tags. Each `p` tag SHOULD have a **displayable** marker name for the current role (e.g. `Host`, `Speaker`, `Participant`) of the user in the event and the relay information MAY be empty. This event will be constantly updated as participants join and leave the activity. 15A special event with `kind:30311` "Live Event" is defined as a _parameterized replaceable event_ of public `p` tags. Each `p` tag SHOULD have a **displayable** marker name for the current role (e.g. `Host`, `Speaker`, `Participant`) of the user in the event and the relay information MAY be empty. This event will be constantly updated as participants join and leave the activity.
16 16
17For example: 17For example:
18 18
19```js 19```json
20{ 20{
21 "kind": 30311, 21 "kind": 30311,
22 "tags": [ 22 "tags": [
@@ -38,52 +38,50 @@ For example:
38 ["relays", "wss://one.com", "wss://two.com", ...] 38 ["relays", "wss://one.com", "wss://two.com", ...]
39 ], 39 ],
40 "content": "", 40 "content": "",
41 ...other fields 41 ...
42} 42}
43``` 43```
44 44
45A distinct `d` tag should be used for each activity. All other tags are optional. 45A distinct `d` tag should be used for each activity. All other tags are optional.
46 46
47Providers SHOULD keep the participant list small (e.g. under 1000 users) and, when limits are reached, Providers SHOULD select which participants get named in the event. Clients should not expect a comprehensive list. Once the activity ends, the event can be deleted or updated to summarize the activity and provide async content (e.g. recording of the event). 47Providers SHOULD keep the participant list small (e.g. under 1000 users) and, when limits are reached, Providers SHOULD select which participants get named in the event. Clients should not expect a comprehensive list. Once the activity ends, the event can be deleted or updated to summarize the activity and provide async content (e.g. recording of the event).
48 48
49Clients are expected to subscribe to `kind:30311` events in general or for given follow lists and statuses. Clients MAY display participants' roles in activities as well as access points to join the activity. 49Clients are expected to subscribe to `kind:30311` events in general or for given follow lists and statuses. Clients MAY display participants' roles in activities as well as access points to join the activity.
50 50
51Live Activity management clients are expected to constantly update `kind:30311` during the event. Clients MAY choose to consider `status=live` events after 1hr without any update as `ended`. The `starts` and `ends` timestamp SHOULD be updated when the status changes to and from `live` 51Live Activity management clients are expected to constantly update `kind:30311` during the event. Clients MAY choose to consider `status=live` events after 1hr without any update as `ended`. The `starts` and `ends` timestamp SHOULD be updated when the status changes to and from `live`
52 52
53The activity MUST be linked to using the NIP-19 naddr code along with the "a" tag (see [NIP-33](33.md) and [NIP-19](19.md)). 53The activity MUST be linked to using the [NIP-19](19.md) `naddr` code along with the `a` tag.
54 54
55## Proof of Agreement to Participate 55### Proof of Agreement to Participate
56 56
57Event owners can add proof as the 5th term in each `p` tag to clarify the participant's agreement in joining the event. The proof is a signed SHA256 of the complete `a` Tag of the event (`kind:pubkey:dTag`) by each `p`'s private key, encoded in hex. 57Event owners can add proof as the 5th term in each `p` tag to clarify the participant's agreement in joining the event. The proof is a signed SHA256 of the complete `a` Tag of the event (`kind:pubkey:dTag`) by each `p`'s private key, encoded in hex.
58 58
59Clients MAY only display participants if the proof is available or MAY display participants as "invited" if the proof is not available. 59Clients MAY only display participants if the proof is available or MAY display participants as "invited" if the proof is not available.
60 60
61This feature is important to avoid malicious event owners adding large account holders to the event, without their knowledge, to lure their followers into the malicious owner's trap. 61This feature is important to avoid malicious event owners adding large account holders to the event, without their knowledge, to lure their followers into the malicious owner's trap.
62 62
63# Live Chat Message 63### Live Chat Message
64 64
65Event `kind:1311` is live chat's channel message. Clients MUST include the `a` tag of the activity with a `root` marker. Other Kind-1 tags such as `reply` and `mention` can also be used. 65Event `kind:1311` is live chat's channel message. Clients MUST include the `a` tag of the activity with a `root` marker. Other Kind-1 tags such as `reply` and `mention` can also be used.
66 66
67```js 67```json
68{ 68{
69 "id": "<32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>",
70 "pubkey": "<32-bytes lowercase hex-encoded public key of the event creator>",
71 "created_at": "<Unix timestamp in seconds>",
72 "kind": 1311, 69 "kind": 1311,
73 "tags": [ 70 "tags": [
74 ["a", "30311:<Community event author pubkey>:<d-identifier of the community>", "<Optional relay url>", "root"], 71 ["a", "30311:<Community event author pubkey>:<d-identifier of the community>", "<Optional relay url>", "root"],
75 ], 72 ],
76 "content": "Zaps to live streams is beautiful." 73 "content": "Zaps to live streams is beautiful.",
77} 74 ...
75}
78``` 76```
79 77
80# Use Cases 78## Use Cases
81 79
82Common use cases include meeting rooms/workshops, watch-together activities, or event spaces, such as [live.snort.social](https://live.snort.social) and [nostrnests.com](https://nostrnests.com). 80Common use cases include meeting rooms/workshops, watch-together activities, or event spaces, such as [live.snort.social](https://live.snort.social) and [nostrnests.com](https://nostrnests.com).
83 81
84# Example 82## Example
85 83
86Live Streaming 84### Live Streaming
87 85
88```json 86```json
89{ 87{
@@ -96,7 +94,7 @@ Live Streaming
96 ["title", "Adult Swim Metalocalypse"], 94 ["title", "Adult Swim Metalocalypse"],
97 ["summary", "Live stream from IPTV-ORG collection"], 95 ["summary", "Live stream from IPTV-ORG collection"],
98 ["streaming", "https://adultswim-vodlive.cdn.turner.com/live/metalocalypse/stream.m3u8"], 96 ["streaming", "https://adultswim-vodlive.cdn.turner.com/live/metalocalypse/stream.m3u8"],
99 ["starts", "1687182672"] 97 ["starts", "1687182672"],
100 ["status", "live"], 98 ["status", "live"],
101 ["t", "animation"], 99 ["t", "animation"],
102 ["t", "iptv"], 100 ["t", "iptv"],
@@ -107,12 +105,12 @@ Live Streaming
107} 105}
108``` 106```
109 107
110Live Streaming chat message 108### Live Streaming chat message
111 109
112```json 110```json
113{ 111{
114 "id": "97aa81798ee6c5637f7b21a411f89e10244e195aa91cb341bf49f718e36c8188", 112 "id": "97aa81798ee6c5637f7b21a411f89e10244e195aa91cb341bf49f718e36c8188",
115 "pubkey": "3f770d65d3a764a9c5cb503ae123e62ec7598ad035d836e2a810f3877a745b24", 113 "pubkey": "3f770d65d3a764a9c5cb503ae123e62ec7598ad035d836e2a810f3877a745b24",
116 "created_at": 1687286726, 114 "created_at": 1687286726,
117 "kind": 1311, 115 "kind": 1311,
118 "tags": [ 116 "tags": [
@@ -122,4 +120,3 @@ Live Streaming chat message
122 "sig": "997f62ddfc0827c121043074d50cfce7a528e978c575722748629a4137c45b75bdbc84170bedc723ef0a5a4c3daebf1fef2e93f5e2ddb98e5d685d022c30b622" 120 "sig": "997f62ddfc0827c121043074d50cfce7a528e978c575722748629a4137c45b75bdbc84170bedc723ef0a5a4c3daebf1fef2e93f5e2ddb98e5d685d022c30b622"
123} 121}
124```` 122````
125