mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-25 01:35:52 -05:00
clarify wording
This commit is contained in:
parent
0f88df16ee
commit
b1d042ed9a
12
59.md
12
59.md
|
@ -31,7 +31,9 @@ Her client will create a request that contains pointers to a relay and event kin
|
|||
}
|
||||
```
|
||||
|
||||
The `content` is a random token which will be used to create a "conversation key" as follows: `sha256((token + bob_public_key)`
|
||||
The `content` is a random token which will be used to create a "conversation key" as follows:
|
||||
|
||||
`sha256(token + bob_public_key)`
|
||||
|
||||
Next, the client will generate an ephemeral private key and create a standard kind=4 DM, with the content being the jsonified request above:
|
||||
```json
|
||||
|
@ -58,7 +60,9 @@ Next, the client will generate an ephemeral private key and create a standard ki
|
|||
|
||||
Only the recipient metadata (Bob's pubkey) is revealed to the public, in this first message of the negotiation.
|
||||
|
||||
Bob's client will see a DM from an unknown contact, will decrypt and validate that the request is addressed to him (the "p" tag is his public key). The client should present Bob with a prompt, displaying the sender's information, the requested relay and kind. If the requested kind is an ephemeral event (as shown in this example), the client can indicate that the chat with Alice would (may?) not be saved on the relay.
|
||||
Bob's client will see a DM from an unknown contact, will decrypt and validate that the request is addressed to him (the "p" tag is his public key).
|
||||
|
||||
The client should present Bob with a prompt, displaying the Alice's information, the requested relay and kind. If the requested kind is an ephemeral event (as shown in this example), the client can indicate that the chat with Alice would (may?) not be saved on the relay.
|
||||
|
||||
If Bob accepts the request, his client would first create another ephemeral private key and repeat the process described above, with his own conversation request to Alice, pointed to a relay of his choosing:
|
||||
|
||||
|
@ -97,9 +101,9 @@ This event will be jsonified and addressed to the conversation key defined in Al
|
|||
}
|
||||
```
|
||||
|
||||
His client will send this event to `wss://relayalice.com`, where Alice's client will already be subscribed to events.
|
||||
His client will send this event to `wss://relayalice.com`, where Alice's client will already be subscribed to events addressed to `{"authors": ["0d4684b3d8ecd52a2c276e505e872059f5bc98bf79ca28cff0d1e4a625a9c8f7"], "kinds": [20004]}`.
|
||||
|
||||
After Alice's client validates the request and connects to `wss://relaybob.com`, the conversation can continue between the two ephemeral keys, with Bob sending events as pubkey `0d4684b3d8ecd52a2c276e505e872059f5bc98bf79ca28cff0d1e4a625a9c8f7` to `wss://relayalice.com`, and Alice sending replies as `a2ab458e92c7c2434062cf94036168fce5ca4236294b48b4911ee765e1448f1b` to `wss://relaybob.com`.
|
||||
After Alice's client validates the request and connects to `wss://relaybob.com`, the conversation can continue between the two conversation keys, with Bob sending events as pubkey `0d4684b3d8ecd52a2c276e505e872059f5bc98bf79ca28cff0d1e4a625a9c8f7` to `wss://relayalice.com`, and Alice sending replies as `a2ab458e92c7c2434062cf94036168fce5ca4236294b48b4911ee765e1448f1b` to `wss://relaybob.com`.
|
||||
|
||||
An example message from Alice to Bob (with content `Hello Bob!` looks like this:
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user