Versions in this module Expand all Collapse all v1 v1.8.0 Jan 15, 2019 Changes in this version + const DefaultPoW + const DefaultTTL + func NewFilterTopics(data ...[][]byte) [][]Topic + func NewFilterTopicsFlat(data ...[]byte) [][]Topic + func NewFilterTopicsFromStrings(data ...[]string) [][]Topic + func NewFilterTopicsFromStringsFlat(data ...string) [][]Topic + type Envelope struct + Data []byte + Expiry uint32 + Nonce uint32 + TTL uint32 + Topics []Topic + func NewEnvelope(ttl time.Duration, topics []Topic, msg *Message) *Envelope + func (self *Envelope) DecodeRLP(s *rlp.Stream) error + func (self *Envelope) Hash() common.Hash + func (self *Envelope) Open(key *ecdsa.PrivateKey) (msg *Message, err error) + func (self *Envelope) Seal(pow time.Duration) + type Filter struct + Fn func(msg *Message) + From *ecdsa.PublicKey + To *ecdsa.PublicKey + Topics [][]Topic + type Message struct + Flags byte + Hash common.Hash + Payload []byte + Sent time.Time + Signature []byte + TTL time.Duration + To *ecdsa.PublicKey + func NewMessage(payload []byte) *Message + func (self *Message) Recover() *ecdsa.PublicKey + func (self *Message) Wrap(pow time.Duration, options Options) (*Envelope, error) + type MessageEvent struct + From *ecdsa.PublicKey + Message *Message + To *ecdsa.PrivateKey + type NewFilterArgs struct + From string + To string + Topics [][][]byte + func (args *NewFilterArgs) UnmarshalJSON(b []byte) (err error) + type Options struct + From *ecdsa.PrivateKey + TTL time.Duration + To *ecdsa.PublicKey + Topics []Topic + type PostArgs struct + From string + Payload string + Priority int64 + TTL int64 + To string + Topics [][]byte + func (args *PostArgs) UnmarshalJSON(data []byte) (err error) + type PublicWhisperAPI struct + func NewPublicWhisperAPI(w *Whisper) *PublicWhisperAPI + func (s *PublicWhisperAPI) GetFilterChanges(filterId hexutil.Uint) []WhisperMessage + func (s *PublicWhisperAPI) GetMessages(filterId hexutil.Uint) []WhisperMessage + func (s *PublicWhisperAPI) HasIdentity(identity string) (bool, error) + func (s *PublicWhisperAPI) NewFilter(args NewFilterArgs) (hexutil.Uint, error) + func (s *PublicWhisperAPI) NewIdentity() (string, error) + func (s *PublicWhisperAPI) Post(args PostArgs) (bool, error) + func (s *PublicWhisperAPI) UninstallFilter(filterId hexutil.Uint) bool + func (s *PublicWhisperAPI) Version() (hexutil.Uint, error) + type Topic [4]byte + func NewTopic(data []byte) Topic + func NewTopicFromString(data string) Topic + func NewTopics(data ...[]byte) []Topic + func NewTopicsFromStrings(data ...string) []Topic + func (self *Topic) String() string + type Whisper struct + func New() *Whisper + func (s *Whisper) APIs() []rpc.API + func (self *Whisper) GetIdentity(key *ecdsa.PublicKey) *ecdsa.PrivateKey + func (self *Whisper) HasIdentity(key *ecdsa.PublicKey) bool + func (self *Whisper) Messages(id int) []*Message + func (self *Whisper) NewIdentity() *ecdsa.PrivateKey + func (self *Whisper) Protocols() []p2p.Protocol + func (self *Whisper) Send(envelope *Envelope) error + func (self *Whisper) Start(*p2p.Server) error + func (self *Whisper) Stop() error + func (self *Whisper) Unwatch(id int) + func (self *Whisper) Version() uint + func (self *Whisper) Watch(options Filter) int + type WhisperMessage struct + From string + Hash string + Payload string + Sent int64 + TTL int64 + To string + func NewWhisperMessage(message *Message) WhisperMessage