mirror of
https://github.com/nostr-protocol/nips.git
synced 2026-07-22 07:48:25 +00:00
add "n" tag with sender encryption key to seal.
This commit is contained in:
7
17.md
7
17.md
@@ -37,7 +37,10 @@ Following [NIP-59](59.md), the **unsigned** chat messages must be sealed (`kind:
|
||||
"pubkey": senderIdentityKey.public,
|
||||
"created_at": randomTimeUpTo2DaysInThePast,
|
||||
"kind": 13, // seal
|
||||
"tags": [], // no tags
|
||||
"tags": [
|
||||
// when senderEncryptionKey != senderIdentityKey (see below)
|
||||
["n", senderEncryptionKey.public]
|
||||
],
|
||||
"content": nip44.encrypt(
|
||||
unsignedMessageRumor,
|
||||
nip44.compute_conversation_key(senderEncryptionKey.private, receiverEncryptionKey.public)
|
||||
@@ -79,6 +82,8 @@ The existence of this event shows that the receiver wants to receive messages en
|
||||
|
||||
When sending, `p`-tagging the receiver should still use their _identity key_; and when receiving messages the receiver should still assume the `"author"` field of the seal event contains the _identity key_.
|
||||
|
||||
An `n` tag set to `senderEncryptionKey.public` MUST be added to the seal event when the _encryption key_ is different from the _identity key_.
|
||||
|
||||
## Publishing
|
||||
|
||||
Kind `10050` indicates the user's preferred relays to receive DMs. The event MUST include a list of `relay` tags with relay URIs.
|
||||
|
||||
Reference in New Issue
Block a user