Polling method for whisper filters. Returns new messages since the last call of this method.
Note: calling the shh_getMessages
method, will reset the buffer for this method, so that you won't receive duplicate messages.
Parameters
QUANTITY
- The filter id.
params: [
"0x7" // 7
]
Returns
Array
- Array of messages received since last poll:
hash
: DATA
, 32 Bytes (?) - The hash of the message.
from
: DATA
, 60 Bytes - The sender of the message, if a sender was specified.
to
: DATA
, 60 Bytes - The receiver of the message, if a receiver was specified.
expiry
: QUANTITY
- Integer of the time in seconds when this message should expire (?).
ttl
: QUANTITY
- Integer of the time the message should float in the system in seconds (?).
sent
: QUANTITY
- Integer of the unix timestamp when the message was sent.
topics
: Array of DATA
- Array of DATA topics the message contained.
payload
: DATA
- The payload of the message.
workProved
: QUANTITY
- Integer of the work this message required before it was send (?).
Get all messages matching a filter. Unlike shh_getFilterChanges
this returns all messages.
Parameters
QUANTITY
- The filter id.
params: [
"0x7" // 7
]
Returns
See shh_getFilterChanges
Checks if the client hold the private keys for a given identity.
Parameters
DATA
, 60 Bytes - The identity address to check.
params: [
"0x04f96a5e25610293e42a73908e93ccc8c4d4dc0edcfa9fa872f50cb214e08ebf61a03e245533f97284d442460f2998cd41858798ddfd4d661997d3940272b717b1"
]
Returns
Boolean
- returns true
if the client holds the privatekey for that identity, otherwise false
.
Creates filter to notify, when client receives whisper message matching the filter options.
Parameters
Object
- The filter options:
to
: DATA
, 60 Bytes - (optional) Identity of the receiver. When present it will try to decrypt any incoming message if the client holds the private key to this identity.
topics
: Array of DATA
- Array of DATA
topics which the incoming message's topics should match. You can use the following combinations:
[A, B] = A && B
[A, [B, C]] = A && (B || C)
[null, A, B] = ANYTHING && A && B
null
works as a wildcard
params: [{
"topics": ['0x12341234bf4b564f'],
"to": "0x04f96a5e25610293e42a73908e93ccc8c4d4dc0edcfa9fa872f50cb214e08ebf61a03e245533f97284d442460f2998cd41858798ddfd4d661997d3940272b717b1"
}]
Returns
QUANTITY
- The newly created filter.
(?)
Parameters
none
Returns
DATA
, 60 Bytes - the address of the new group. (?)
Creates new whisper identity in the client.
Parameters
none
Returns
DATA
, 60 Bytes - the address of the new identiy.
Sends a whisper message.
Parameters
Object
- The whisper post object:
from
: DATA
, 60 Bytes - (optional) The identity of the sender.
to
: DATA
, 60 Bytes - (optional) The identity of the receiver. When present whisper will encrypt the message so that only the receiver can decrypt it.
topics
: Array of DATA
- Array of DATA topics, for the receiver to identify messages.
payload
: DATA
- The payload of the message.
priority
: QUANTITY
- The integer of the priority in a rang from ... (?).
ttl
: QUANTITY
- integer of the time to live in seconds.
params: [{
from: "0x04f96a5e25610293e42a73908e93ccc8c4d4dc0edcfa9fa872f50cb214e08ebf61a03e245533f97284d442460f2998cd41858798ddfd4d661997d3940272b717b1",
to: "0x3e245533f97284d442460f2998cd41858798ddf04f96a5e25610293e42a73908e93ccc8c4d4dc0edcfa9fa872f50cb214e08ebf61a0d4d661997d3940272b717b1",
topics: ["0x776869737065722d636861742d636c69656e74", "0x4d5a695276454c39425154466b61693532"],
payload: "0x7b2274797065223a226d6",
priority: "0x64",
ttl: "0x64",
}]
Returns
Boolean
- returns true
if the message was send, otherwise false
.
Uninstalls a filter with given id. Should always be called when watch is no longer needed. Additonally Filters timeout when they aren't requested with shh_getFilterChanges for a period of time.
Parameters
QUANTITY
- The filter id.
params: [
"0x7" // 7
]
Returns
Boolean
- true
if the filter was successfully uninstalled, otherwise false
.
Returns the current whisper protocol version.
Parameters
none
Returns
String
- The current whisper protocol version
Generated using TypeDoc
(?)
Parameters
DATA
, 60 Bytes - The identity address to add to a group (?).Returns
Boolean
- returnstrue
if the identity was successfully added to the group, otherwisefalse
(?).