upleb.uk

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

summaryrefslogtreecommitdiff
path: root/17.md
diff options
context:
space:
mode:
authorkehiy <kehiiiiya@gmail.com>2024-09-03 20:41:31 +0330
committerkehiy <kehiiiiya@gmail.com>2024-09-03 20:41:31 +0330
commite6552476aa2e5ca7256be572a9aa226ec8a022ee (patch)
tree46f14902bd2bfb85e5f3369ece456c46b697b1a2 /17.md
parentb4a2561df7325b8624bc5ffad154ec946ade2f1e (diff)
format(all): json formatting
Diffstat (limited to '17.md')
-rw-r--r--17.md10
1 files changed, 5 insertions, 5 deletions
diff --git a/17.md b/17.md
index d22dbde..4b96bce 100644
--- a/17.md
+++ b/17.md
@@ -12,18 +12,18 @@ This NIP defines an encrypted direct messaging scheme using [NIP-44](44.md) encr
12 12
13Kind `14` is a chat message. `p` tags identify one or more receivers of the message. 13Kind `14` is a chat message. `p` tags identify one or more receivers of the message.
14 14
15```js 15```jsonc
16{ 16{
17 "id": "<usual hash>", 17 "id": "<usual hash>",
18  "pubkey": "<sender-pubkey>", 18  "pubkey": "<sender-pubkey>",
19 "created_at": now(), 19 "created_at": "<current-time>",
20  "kind": 14, 20  "kind": 14,
21  "tags": [ 21  "tags": [
22    ["p", "<receiver-1-pubkey>", "<relay-url>"], 22    ["p", "<receiver-1-pubkey>", "<relay-url>"],
23    ["p", "<receiver-2-pubkey>", "<relay-url>"], 23    ["p", "<receiver-2-pubkey>", "<relay-url>"],
24    ["e", "<kind-14-id>", "<relay-url>", "reply"] // if this is a reply 24    ["e", "<kind-14-id>", "<relay-url>", "reply"] // if this is a reply
25 ["subject", "<conversation-title>"], 25 ["subject", "<conversation-title>"],
26    ... 26    // rest of tags...
27  ], 27  ],
28  "content": "<message-in-plain-text>", 28  "content": "<message-in-plain-text>",
29} 29}
@@ -86,7 +86,7 @@ Clients CAN offer disappearing messages by setting an `expiration` tag in the gi
86 86
87Kind `10050` indicates the user's preferred relays to receive DMs. The event MUST include a list of `relay` tags with relay URIs. 87Kind `10050` indicates the user's preferred relays to receive DMs. The event MUST include a list of `relay` tags with relay URIs.
88 88
89```js 89```jsonc
90{ 90{
91 "kind": 10050, 91 "kind": 10050,
92 "tags": [ 92 "tags": [
@@ -94,7 +94,7 @@ Kind `10050` indicates the user's preferred relays to receive DMs. The event MUS
94 ["relay", "wss://myrelay.nostr1.com"], 94 ["relay", "wss://myrelay.nostr1.com"],
95 ], 95 ],
96 "content": "", 96 "content": "",
97 //...other fields 97 // other fields...
98} 98}
99``` 99```
100 100