Update 112.md

This commit is contained in:
earonesty 2023-06-07 05:56:35 -07:00 committed by GitHub
parent c2da954e50
commit d1f3ce5c9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

10
112.md
View File

@ -30,14 +30,18 @@ It reserves 8 event kinds (1059, 400-406) for immediate use.
## Kind 1059: Encrypted Gift Wrap
For all encrypted group chat messages, the client first generates a kind 4XX message, as below.
For all encrypted group events, the client first generates the approrpiate kind 4XX message, as below, and signs it with the user's identity key.
Then they generate a new public/private keypair, and uses this to sign and encrypt the message.
Then they generate a new public/private keypair, and uses this to sign new kind 1059 message.
The `content` is [NIP-44](https://github.com/nostr-protocol/nips/pull/574) encrypted JSON string with the temporary key, this is the inner event.
The `content` of that message is a [NIP-44](https://github.com/nostr-protocol/nips/pull/574) encrypted JSON string.
The content is encrypted using the public key of the destination (the chat room public key, or the invitee public key.
All events called "wrapped-kind XX" refer to these kind 1059 gift wrapped events.
For more information on gift-wrapping, see: https://github.com/nostr-protocol/nips/pull/468
## Wrapped Kind 400: Create Encrypted channel
Create a Encrypted event channel.