Update 704.md

This commit is contained in:
Vlad Stan 2023-04-10 17:12:24 +03:00 committed by GitHub
parent 8d1fc60a9a
commit 3d24dda059
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

7
704.md
View File

@ -88,6 +88,8 @@ If `Alice` wants to signal `Bob` that she is ready to use this NIP (for more pri
} }
``` ```
> **Note**: `Alice` must use the "init" (`dmpk/0/0`) public key for signing the event so that there is no visible interaction between her and `Bob`
If `Bob` supports this NIP then he must: If `Bob` supports this NIP then he must:
- subscribe to "init" events for him: - subscribe to "init" events for him:
```json ```json
@ -96,7 +98,8 @@ If `Bob` supports this NIP then he must:
"#p": [<32-bytes lowercase hex-encoded public key of Bob>] "#p": [<32-bytes lowercase hex-encoded public key of Bob>]
} }
``` ```
- when an event is received, descrypt the content, verify the `shared_secret_hash` against `Alice's` public key - when an event is received, decrypt the content, verify the `shared_secret_hash` against `Alice's` public key
- decide if it wants to communicate with `Alice`. If yes it should publish its own `kind:35709` for `Alice` - decide if it wants to communicate with `Alice`. If yes, it should publish its own `kind:35709` for `Alice`
Alice must also listen for `"kind": 35709` to her.
After both `Alice` and `Bob` have published the `kind: 35709` event, they can start to publish and listen to events using the `one-use-only` keys. After both `Alice` and `Bob` have published the `kind: 35709` event, they can start to publish and listen to events using the `one-use-only` keys.