upleb.uk

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

summaryrefslogtreecommitdiff
path: root/A0.md
diff options
context:
space:
mode:
authorAlex Gleason <alex@alexgleason.me>2026-04-10 13:31:37 -0500
committerAlex Gleason <alex@alexgleason.me>2026-04-10 13:31:37 -0500
commit5e1e24766910fc07cb61a049aed2623987458ec2 (patch)
treeb7588f61fddf9374268d5cd6f4e3f2655d7c840a /A0.md
parentb8782df594b4e7e8f088869134908eed58be6078 (diff)
parent3465f540e3eaedccb5309711b502f0febf56b52f (diff)
Merge nip44-big-payloads into bigger-nip44bigger-nip44
Diffstat (limited to 'A0.md')
-rw-r--r--A0.md60
1 files changed, 60 insertions, 0 deletions
diff --git a/A0.md b/A0.md
new file mode 100644
index 0000000..884bf2a
--- /dev/null
+++ b/A0.md
@@ -0,0 +1,60 @@
1NIP-A0
2======
3
4Voice Messages
5-----------
6
7**Status:** Draft
8
9This NIP defines new events `kind: 1222` for root messages and `kind: 1244` for reply messages to be used for short voice messages, typically up to 60 seconds in length.
10
11## Specification
12
13### Event Kind `1222` and Kind `1244`
14
15The `kind: 1222` event is defined as follows:
16
17- `content`: MUST be a URL pointing directly to an audio file.
18 - The audio file SHOULD be in `audio/mp4` (.m4a) format using AAC or Opus encoding. Clients MAY support other common audio formats like `audio/ogg`, `audio/webm`, or `audio/mpeg` (mp3), but `audio/mp4` is recommended for broad compatibility and efficiency.
19 - The audio duration SHOULD be no longer than 60 seconds. Clients publishing `kind: 1222` events SHOULD enforce this limit or provide a clear warning to the user if exceeded.
20- `tags`:
21 - Tags MAY be included as per other NIPs (e.g., `t` for hashtags, `g` for geohash, etc.).
22
23 The `kind: 1244` event is defined as follows:
24
25- To be used for replies, `kind: 1244` events MUST follow the structure of `NIP-22`.
26- `content`: MUST be a URL pointing directly to an audio file.
27 - The audio file SHOULD be in `audio/mp4` (.m4a) format using AAC or Opus encoding. Clients MAY support other common audio formats like `audio/ogg`, `audio/webm`, or `audio/mpeg` (mp3), but `audio/mp4` is recommended for broad compatibility and efficiency.
28 - The audio duration SHOULD be no longer than 60 seconds. Clients publishing `kind: 1222` events SHOULD enforce this limit or provide a clear warning to the user if exceeded.
29- `tags`:
30 - Tags MAY be included as per other NIPs (e.g., `t` for hashtags, `g` for geohash, etc.).
31
32
33## Visual representation with `imeta` (NIP-92) tag (optional)
34
35The following imeta (NIP-92) tags MAY be included so clients can render a visual preview without having to download the audio file first:
36
37- `waveform`: amplitude values over time, space separated full integers, less than 100 values should be enough to render a nice visual
38- `duration`: audio length in seconds
39
40## Examples
41
42### Root Voice Message Example
43
44```json
45{
46 "content": "https://blossom.primal.net/5fe7df0e46ee6b14b5a8b8b92939e84e3ca5e3950eb630299742325d5ed9891b.mp4",
47 "created_at": 1752501052,
48 "id": "...",
49 "kind": 1222,
50 "pubkey": "...",
51 "sig": "...",
52 "tags": [
53 [
54 "imeta",
55 "url https://blossom.primal.net/5fe7df0e46ee6b14b5a8b8b92939e84e3ca5e3950eb630299742325d5ed9891b.mp4",
56 "waveform 0 7 35 8 100 100 49 8 4 16 8 10 7 2 20 10 100 100 100 100 100 100 15 100 100 100 25 60 5 4 3 1 0 100 100 15 100 29 88 0 33 11 39 100 100 19 4 100 42 35 5 0 1 5 0 0 11 38 100 94 17 11 44 58 5 100 100 100 55 14 72 100 100 57 6 1 14 2 16 100 100 40 16 100 100 6 32 14 13 41 36 16 14 6 3 0 1 2 1 6 0",
57 "duration 8"
58 ]
59 ]
60} \ No newline at end of file