Updated Whisper Push Notifications (markdown)

Victor Farazdagi 2017-04-11 19:27:50 +03:00
parent 04430b1045
commit 4012b2f486
1 changed files with 12 additions and 0 deletions

@ -168,6 +168,18 @@ var watchServerAckResponses = function (identity) {
### 2. Creating Chat session and registering device
So, at this point we have a client session key (`payload.key` passed into `createChatSession()` in previous code example), which we are ready to use it to create chat session.
Now, why do we have distinct client and chat keys? The reason is simple: client session key is cryptographic connection between client and Notification Service, it is to be known on host device only. However, in order to be able to trigger notification on each other, devices need to share some secret. That secret is chat session key. For a device it is enough to know chat session key, to be able to:
- register itself as notifications receiver
- trigger notifications on all the other registered devices
- all this in secure/dark way
Here is how you create chat session key might look like (remember we are still using `web3` object connected to `Device A` node):
```js
```
### 3. Sharing Chat session key, and allowing notifications