package
10.9.0+incompatible
Repository: https://github.com/status-im/status-go.git
Documentation: pkg.go.dev

# README

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 from 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"
  }
}

# Packages

No description provided by the author

# Functions

MakeMessagesRequestPayload makes a specific payload for MailServer to request historic messages.
No description provided by the author
NewContext creates Context with all required fields.
NewContextKey returns new ContextKey instance.
No description provided by the author
No description provided by the author
NewPublicAPI returns instance of the public API.
NewRequestsRegistry creates instance of the RequestsRegistry and returns pointer to it.
No description provided by the author
TopicsToBloom squashes all topics into a single bloom filter.
No description provided by the author

# Constants

DefaultRequestsDelay will be used in RequestsRegistry if no other was provided.
MailServerRequestSent is set when p2p request is sent to the mailserver.
NotRegistered returned if asked hash wasn't registered in the tracker.

# Variables

ErrInvalidMailServerPeer is returned when it fails to parse enode from params.
ErrInvalidPublicKey is returned when public key can't be extracted from MailServer's nodeID.
ErrInvalidSymKeyID is returned when it fails to get a symmetric key.
ErrPFSNotEnabled is returned when an endpoint PFS only is called but PFS is disabled.

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Context provides access to request-scoped values.
ContextKey is a type used for keys in ext Context.
EnvelopeSignalHandler sends signals when envelope is sent or expired.
No description provided by the author
No description provided by the author
MailRequestMonitor is responsible for monitoring history request to mailservers.
No description provided by the author
MessagesRequest is a RequestMessages() request payload.
MessagesResponse is a response for requestMessages2 method.
MessengerSignalsHandler sends signals on messenger events.
No description provided by the author
PublicAPI extends whisper public API.
PublisherSignalHandler sends signals on protocol events.
RequestsRegistry keeps map for all requests with timestamp when they were made.
RetryConfig specifies configuration for retries with timeout and max amount of retries.
SendDirectMessageRPC represents the RPC payload for the SendDirectMessage RPC method.
SendPublicMessageRPC represents the RPC payload for the SendPublicMessage RPC method.
Service is a service that provides some additional API to whisper-based protocols like Whisper or Waku.
No description provided by the author
No description provided by the author

# Interfaces

EnvelopeEventsHandler used for two different event types.

# Type aliases

EnvelopeState in local tracker.
TimeSource is a type used for current time.