mirror of https://github.com/status-im/specs.git
fill in Whisper extensions
This commit is contained in:
parent
0a49d1f17e
commit
b6522cad1e
|
@ -18,7 +18,9 @@
|
|||
- [One-to-one topic](#one-to-one-topic)
|
||||
- [Group chat topic](#group-chat-topic)
|
||||
- [Message encryption](#message-encryption)
|
||||
- [Whisper V6 extensions (or Status Whisper Node)](#whisper-v6-extensions-or-status-whisper-node)
|
||||
- [Whisper V6 extensions](#whisper-v6-extensions)
|
||||
- [Request historic messages](#request-historic-messages)
|
||||
- [shhext_requestMessages](#shhextrequestmessages)
|
||||
|
||||
## Abstract
|
||||
|
||||
|
@ -173,8 +175,29 @@ Public and group messages are encrypted using symmetric encryption and the key i
|
|||
|
||||
One-to-one messages are encrypted using asymmetric encryption.
|
||||
|
||||
## Whisper V6 extensions (or Status Whisper Node)
|
||||
## Whisper V6 extensions
|
||||
|
||||
TOODO
|
||||
### Request historic messages
|
||||
|
||||
<!--TODO: provide a list of required JSON-RPC methods, if any -->
|
||||
Sends a request for historic messages to a Mailserver. The Mailserver node MUST be a direct peer and MUST be marked a trusted (using `shh_markTrustedPeer`).
|
||||
|
||||
The request does not wait for the response. It marely sends a peer-to-peer message to the Mailserver and it's up to Mailserver to process it and start sending historic messages.
|
||||
|
||||
The drawback of this approach is that it is impossible to tell which historic messages are the result of which request.
|
||||
|
||||
It's recommended to return messages from newest to oldest. To move further back in time, use `cursor` and `limit`.
|
||||
|
||||
#### shhext_requestMessages
|
||||
|
||||
**Parameters**:
|
||||
1. Object - The message request object:
|
||||
* `mailServerPeer` - `String`: Mailserver's enode address.
|
||||
* `from` - `Number` (optional): Lower bound of time range as unix timestamp, default is 24 hours back from now.
|
||||
* `to` - `Number` (optional): Upper bound of time range as unix timestamp, default is now.
|
||||
* `limit` - `Number` (optional): Limit the number of messages sent back, default is no limit.
|
||||
* `cursor` - `String` (optional): Used for paginated requests.
|
||||
* `topics` - `Array`: hex-encoded message topics.
|
||||
* `symKeyID` - `String`: an ID of a symmetric key to authenticate to Mailserver, derived from Mailserver password.
|
||||
|
||||
**Returns**:
|
||||
`Boolean` - returns `true` if the request was sent.
|
||||
|
|
Loading…
Reference in New Issue