doc: add note

This commit is contained in:
Vlad Stan 2023-04-10 13:31:18 +03:00 committed by GitHub
parent 65a44195fb
commit 6843912797
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

8
704.md
View File

@ -64,10 +64,12 @@ If `Alice` wants to signal `Bob` that she is ready to use this NIP (for more pri
```json ```json
{ {
"key": <the direct message parent key>, "key": <the direct message parent key>,
"send_index": <integer (optional), ...>, "send_index": <integer (optional), the index of the last key used to sign an event>,
"receive_index": <integer (optional), ...>, "receive_index": <integer (optional), the index of the last key an event was received to>,
} }
``` ```
> **Note** `send_index` and `receive_index` are optional, but they help the client a lot in knowing what the state is. Alternatively (when an account is retored) the client would have to scan the public keys until unused ones are found.
- publish a `Parameterized Replaceable Event` ([NIP-33](https://github.com/nostr-protocol/nips/blob/master/33.md)) having: - publish a `Parameterized Replaceable Event` ([NIP-33](https://github.com/nostr-protocol/nips/blob/master/33.md)) having:
```json ```json
@ -83,4 +85,4 @@ If `Alice` wants to signal `Bob` that she is ready to use this NIP (for more pri
> **Note** the reason for using `sha256(shared_secret)` for the `d` tag is so that outside observers do not even know that `Alice` and `Bob` have started to communicate. Any other value for the `d` tag would reveal that the message is intended for `Bob.` > **Note** the reason for using `sha256(shared_secret)` for the `d` tag is so that outside observers do not even know that `Alice` and `Bob` have started to communicate. Any other value for the `d` tag would reveal that the message is intended for `Bob.`
After both `Alice` and `Bob` have both published the `kind: 35709` event, they can start to publish and listen to events using the `one-use-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-keys`.