status-go/services/shhext
Andrea Franz 1bc63df5f2
validate query range on requestMessages API (#1060)
2018-06-26 10:41:03 +02:00
..
dedup Fix issues reported by lint. Part of #1017 2018-06-14 13:52:51 +02:00
README.md Deduplicator: add API to confirm received messages. 2018-05-10 15:28:48 +02:00
api.go validate query range on requestMessages API (#1060) 2018-06-26 10:41:03 +02:00
api_test.go RequestHistoricMessages response (#1009) 2018-06-15 17:12:31 +02:00
debug.go New debug_postSync endpoint (#1046) 2018-06-25 15:27:17 +02:00
service.go New debug_postSync endpoint (#1046) 2018-06-25 15:27:17 +02:00
service_test.go validate query range on requestMessages API (#1060) 2018-06-26 10:41:03 +02:00
signal.go RequestHistoricMessages response (#1009) 2018-06-15 17:12:31 +02:00

README.md

Whisper API Extension

API

shhext_getNewFilterMessages

Accepts the same input as shh_getFilterMessages.

Returns

Returns a list of whisper messages matching the specified filter. Filters out the messages already confirmed received by shhext_confirmMessagesProcessed

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 is called.

Parameters

Gets a list of whisper envelopes.

shhext_post

Accepts same input as shh_post.

Returns

DATA, 32 Bytes - the envelope hash

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
  • symKeyID:DATA- ID of a symmetric key to authenticate to mail server, derived form mail server password
Returns

Boolean - returns true if the request was send, otherwise false.

Signals

Sends sent signal once per envelope.

{
  "type": "envelope.sent",
  "event": {
    "hash": "0xea0b93079ed32588628f1cabbbb5ed9e4d50b7571064c2962c3853972db67790"
  }
}

Sends expired signal if envelope dropped from whisper local queue before it was sent to any peer on the network.

{
  "type": "envelope.expired",
  "event": {
    "hash": "0x754f4c12dccb14886f791abfeb77ffb86330d03d5a4ba6f37a8c21281988b69e"
  }
}