2018-04-11 15:41:51 +00:00
|
|
|
Whisper API Extension
|
|
|
|
=====================
|
|
|
|
|
|
|
|
API
|
|
|
|
---
|
|
|
|
|
2018-05-02 12:14:08 +00:00
|
|
|
|
|
|
|
#### shhext_getNewFilterMessages
|
|
|
|
|
|
|
|
Accepts the same input as [`shh_getFilterMessages`](https://github.com/ethereum/wiki/wiki/JSON-RPC#shh_getFilterChanges).
|
|
|
|
|
|
|
|
##### Returns
|
|
|
|
|
|
|
|
Returns a list of whisper messages matching the specified filter. Filters out
|
|
|
|
the messages already confirmed received by [`shhext_confirmMessagesProcessed`](#shhextconfirmmessagesprocessed)
|
|
|
|
|
|
|
|
Deduplication is made using the whisper envelope content and topic only, so the
|
|
|
|
same content received in different whisper envelopes will be deduplicated.
|
|
|
|
|
|
|
|
|
|
|
|
#### shhext_confirmMessagesProcessed
|
|
|
|
|
|
|
|
Confirms whisper messages received and processed on the client side. These
|
|
|
|
messages won't appear anymore when [`shhext_getNewFilterMessages`](#shhextgetnewfiltermessages)
|
|
|
|
is called.
|
|
|
|
|
|
|
|
##### Parameters
|
|
|
|
|
|
|
|
Gets a list of whisper envelopes.
|
|
|
|
|
|
|
|
|
2018-04-11 15:41:51 +00:00
|
|
|
#### shhext_post
|
|
|
|
|
2018-05-02 12:14:08 +00:00
|
|
|
Accepts same input as [`shh_post`](https://github.com/ethereum/wiki/wiki/JSON-RPC#shh_post).
|
2018-04-11 15:41:51 +00:00
|
|
|
|
|
|
|
##### Returns
|
|
|
|
|
|
|
|
`DATA`, 32 Bytes - the envelope hash
|
|
|
|
|
2018-04-27 11:59:01 +00:00
|
|
|
#### shhext_requestMessages
|
|
|
|
|
|
|
|
Sends a request for historic messages to a mail server.
|
|
|
|
|
|
|
|
##### Parameters
|
|
|
|
|
|
|
|
1. `Object` - The message request object:
|
|
|
|
|
|
|
|
- `mailServerPeer`:`URL` - Mail servers' enode addess
|
|
|
|
- `from`:`QUANTITY` - (optional) Lower bound of time range as unix timestamp, default is 24 hours back from now
|
|
|
|
- `to`:`QUANTITY`- (optional) Upper bound of time range as unix timestamp, default is now
|
|
|
|
- `topic`:`DATA`, 4 Bytes - Regular whisper topic
|
2018-07-12 14:50:49 +00:00
|
|
|
- `symKeyID`:`DATA`- ID of a symmetric key to authenticate to mail server, derived from mail server password
|
2018-04-27 11:59:01 +00:00
|
|
|
|
|
|
|
##### Returns
|
|
|
|
|
|
|
|
`Boolean` - returns `true` if the request was send, otherwise `false`.
|
|
|
|
|
2018-04-11 15:41:51 +00:00
|
|
|
Signals
|
|
|
|
-------
|
|
|
|
|
2018-04-13 05:52:22 +00:00
|
|
|
Sends sent signal once per envelope.
|
2018-04-11 15:41:51 +00:00
|
|
|
|
|
|
|
```json
|
|
|
|
{
|
|
|
|
"type": "envelope.sent",
|
|
|
|
"event": {
|
|
|
|
"hash": "0xea0b93079ed32588628f1cabbbb5ed9e4d50b7571064c2962c3853972db67790"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
2018-04-13 05:52:22 +00:00
|
|
|
|
|
|
|
Sends expired signal if envelope dropped from whisper local queue before it was
|
|
|
|
sent to any peer on the network.
|
|
|
|
|
|
|
|
```json
|
|
|
|
{
|
|
|
|
"type": "envelope.expired",
|
|
|
|
"event": {
|
|
|
|
"hash": "0x754f4c12dccb14886f791abfeb77ffb86330d03d5a4ba6f37a8c21281988b69e"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|