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:
authorVitor Pamplona <vitor@vitorpamplona.com>2025-03-13 09:23:35 -0400
committerGitHub <noreply@github.com>2025-03-13 10:23:35 -0300
commit0619f370bca3485bb9c5870bc2defa03c7c3d10e (patch)
treec8b7e3035af3424ea10d8336b0b39428df06e117 /17.md
parentbf699c9bc15e16d78a2bd805626e8813446e5d31 (diff)
NIP-17 Typos and grammar improvements (#1840)
Diffstat (limited to '17.md')
-rw-r--r--17.md14
1 files changed, 7 insertions, 7 deletions
diff --git a/17.md b/17.md
index 487d01e..4383308 100644
--- a/17.md
+++ b/17.md
@@ -57,7 +57,7 @@ Kind `14`s MUST never be signed. If it is signed, the message might leak to rela
57 ["file-type", "<file-mime-type>"], 57 ["file-type", "<file-mime-type>"],
58 ["encryption-algorithm", "<encryption-algorithm>"], 58 ["encryption-algorithm", "<encryption-algorithm>"],
59 ["decryption-key", "<decryption-key>"], 59 ["decryption-key", "<decryption-key>"],
60 ["decryptiion-nonce", "<decryption-nonce>"], 60 ["decryption-nonce", "<decryption-nonce>"],
61 ["x", "<the SHA-256 hexencoded string of the file>"], 61 ["x", "<the SHA-256 hexencoded string of the file>"],
62 // rest of tags... 62 // rest of tags...
63 ], 63 ],
@@ -74,16 +74,16 @@ Kind 15 is used for sending encrypted file event messages:
74- `content`: The URL of the file (`<file-url>`). 74- `content`: The URL of the file (`<file-url>`).
75- `x` containing the SHA-256 hexencoded string of the file. 75- `x` containing the SHA-256 hexencoded string of the file.
76- `size` (optional) size of file in bytes 76- `size` (optional) size of file in bytes
77- `dim` (optional) size of file in pixels in the form `<width>x<height>` 77- `dim` (optional) size of the file in pixels in the form `<width>x<height>`
78- `blurhash`(optional) the [blurhash](https://github.com/woltapp/blurhash) to show while the file is being loaded by the client 78- `blurhash`(optional) the [blurhash](https://github.com/woltapp/blurhash) to show while the client is loading the file
79- `thumb` (optional) url of thumbnail with same aspect ratio 79- `thumb` (optional) URL of thumbnail with same aspect ratio (encrypted with the same key, nonce)
80- `fallback` (optional) zero or more fallback file sources in case `url` fails 80- `fallback` (optional) zero or more fallback file sources in case `url` fails
81 81
82Just like kind 14, kind `15`s MUST never be signed. 82Just like kind 14, kind `15`s MUST never be signed.
83 83
84## Chat Rooms 84## Chat Rooms
85 85
86The set of `pubkey` + `p` tags defines a chat room. If a new `p` tag is added or a current one is removed, a new room is created with clean message history. 86The set of `pubkey` + `p` tags defines a chat room. If a new `p` tag is added or a current one is removed, a new room is created with a clean message history.
87 87
88Clients SHOULD render messages of the same room in a continuous thread. 88Clients SHOULD render messages of the same room in a continuous thread.
89 89
@@ -91,7 +91,7 @@ An optional `subject` tag defines the current name/topic of the conversation. An
91 91
92## Encrypting 92## Encrypting
93 93
94Following [NIP-59](59.md), the **unsigned** `kind:14` & `kind:15` chat message must be sealed (`kind:13`) and then gift-wrapped (`kind:1059`) to each receiver and the sender individually. 94Following [NIP-59](59.md), the **unsigned** `kind:14` & `kind:15` chat messages must be sealed (`kind:13`) and then gift-wrapped (`kind:1059`) to each receiver and the sender individually.
95 95
96```jsonc 96```jsonc
97{ 97{
@@ -173,7 +173,7 @@ The main limitation of this approach is having to send a separate encrypted even
173 173
174Clients implementing this NIP should by default only connect to the set of relays found in their `kind:10050` list. From that they should be able to load all messages both sent and received as well as get new live updates, making it for a very simple and lightweight implementation that should be fast. 174Clients implementing this NIP should by default only connect to the set of relays found in their `kind:10050` list. From that they should be able to load all messages both sent and received as well as get new live updates, making it for a very simple and lightweight implementation that should be fast.
175 175
176When sending a message to anyone, clients must then connect to the relays in the receiver's `kind:10050` and send the events there, but can disconnect right after unless more messages are expected to be sent (e.g. the chat tab is still selected). Clients should also send a copy of their outgoing messages to their own `kind:10050` relay set. 176When sending a message to anyone, clients must then connect to the relays in the receiver's `kind:10050` and send the events there but can disconnect right after unless more messages are expected to be sent (e.g. the chat tab is still selected). Clients should also send a copy of their outgoing messages to their own `kind:10050` relay set.
177 177
178## Examples 178## Examples
179 179