Documentation ¶
Index ¶
- Constants
- Variables
- func FormatPeerConnFailures(wakuNode *node.WakuNode) map[string]int
- func FormatPeerStats(wakuNode *node.WakuNode) types.PeerStats
- type BandwidthTelemetryClient
- type Config
- type Criteria
- type ErrorSendingEnvelope
- type ITelemetryClient
- type Info
- type Message
- type NewMessage
- type NwakuInfo
- type PublicWakuAPI
- func (api *PublicWakuAPI) AddPrivateKey(ctx context.Context, privateKey hexutil.Bytes) (string, error)
- func (api *PublicWakuAPI) AddSymKey(ctx context.Context, key hexutil.Bytes) (string, error)
- func (api *PublicWakuAPI) BloomFilter() []byte
- func (api *PublicWakuAPI) DeleteKeyPair(ctx context.Context, key string) (bool, error)
- func (api *PublicWakuAPI) DeleteMessageFilter(id string) (bool, error)
- func (api *PublicWakuAPI) DeleteSymKey(ctx context.Context, id string) bool
- func (api *PublicWakuAPI) GenerateSymKeyFromPassword(ctx context.Context, passwd string) (string, error)
- func (api *PublicWakuAPI) GetFilterMessages(id string) ([]*Message, error)
- func (api *PublicWakuAPI) GetPrivateKey(ctx context.Context, id string) (hexutil.Bytes, error)
- func (api *PublicWakuAPI) GetPublicKey(ctx context.Context, id string) (hexutil.Bytes, error)
- func (api *PublicWakuAPI) GetSymKey(ctx context.Context, id string) (hexutil.Bytes, error)
- func (api *PublicWakuAPI) HasKeyPair(ctx context.Context, id string) bool
- func (api *PublicWakuAPI) HasSymKey(ctx context.Context, id string) bool
- func (api *PublicWakuAPI) Info(ctx context.Context) Info
- func (api *PublicWakuAPI) Messages(ctx context.Context, crit Criteria) (*rpc.Subscription, error)
- func (api *PublicWakuAPI) NewKeyPair(ctx context.Context) (string, error)
- func (api *PublicWakuAPI) NewMessageFilter(req Criteria) (string, error)
- func (api *PublicWakuAPI) NewSymKey(ctx context.Context) (string, error)
- func (api *PublicWakuAPI) Post(ctx context.Context, req NewMessage) (hexutil.Bytes, error)
- func (api *PublicWakuAPI) UninstallFilter(ctx context.Context, id string)
- func (api *PublicWakuAPI) Unsubscribe(ctx context.Context, id string)
- type SentEnvelope
- type Waku
- func (w *Waku) APIs() []rpc.API
- func (w *Waku) AddKeyPair(key *ecdsa.PrivateKey) (string, error)
- func (w *Waku) AddRelayPeer(address multiaddr.Multiaddr) (peer.ID, error)
- func (w *Waku) AddStorePeer(address multiaddr.Multiaddr) (peer.ID, error)
- func (w *Waku) AddSymKey(id string, key []byte) (string, error)
- func (w *Waku) AddSymKeyDirect(key []byte) (string, error)
- func (w *Waku) AddSymKeyFromPassword(password string) (string, error)
- func (w *Waku) Clean() error
- func (w *Waku) ClearEnvelopesCache()
- func (w *Waku) ConfirmMessageDelivered(hashes []gethcommon.Hash)
- func (w *Waku) ConnectionChanged(state connection.State)
- func (w *Waku) CurrentTime() time.Time
- func (w *Waku) DeleteKeyPair(key string) bool
- func (w *Waku) DeleteKeyPairs() error
- func (w *Waku) DeleteSymKey(id string) bool
- func (w *Waku) DialPeer(address multiaddr.Multiaddr) error
- func (w *Waku) DialPeerByID(peerID peer.ID) error
- func (w *Waku) DropPeer(peerID peer.ID) error
- func (w *Waku) ENR() (*enode.Node, error)
- func (w *Waku) GenerateSymKey() (string, error)
- func (w *Waku) GetEnvelope(hash gethcommon.Hash) *common.ReceivedMessage
- func (w *Waku) GetFilter(id string) *common.Filter
- func (w *Waku) GetNodeENRString() (string, error)
- func (w *Waku) GetPrivateKey(id string) (*ecdsa.PrivateKey, error)
- func (w *Waku) GetPubsubTopic(topic string) string
- func (w *Waku) GetStats() types.StatsSummary
- func (w *Waku) GetSymKey(id string) ([]byte, error)
- func (w *Waku) HasKeyPair(id string) bool
- func (w *Waku) HasSymKey(id string) bool
- func (w *Waku) IsEnvelopeCached(hash gethcommon.Hash) bool
- func (w *Waku) LegacyStoreNode() legacy_store.Store
- func (w *Waku) ListenAddresses() []multiaddr.Multiaddr
- func (w *Waku) MarkP2PMessageAsProcessed(hash gethcommon.Hash)
- func (w *Waku) MaxMessageSize() uint32
- func (w *Waku) MessageExists(mh pb.MessageHash) (bool, error)
- func (w *Waku) NewKeyPair() (string, error)
- func (w *Waku) OnNewEnvelope(env *protocol.Envelope) error
- func (w *Waku) OnNewEnvelopes(envelope *protocol.Envelope, msgType common.MessageType, ...) error
- func (w *Waku) PeerCount() int
- func (w *Waku) PeerID() peer.ID
- func (w *Waku) Peers() types.PeerStats
- func (w *Waku) Peerstore() peerstore.Peerstore
- func (w *Waku) PingPeer(ctx context.Context, peerID peer.ID) (time.Duration, error)
- func (w *Waku) ProcessingP2PMessages() bool
- func (w *Waku) Protocols() []p2p.Protocol
- func (w *Waku) Query(ctx context.Context, peerID peer.ID, query store.FilterCriteria, cursor []byte, ...) ([]byte, int, error)
- func (w *Waku) RelayPeersByTopic(topic string) (*types.PeerList, error)
- func (w *Waku) RemovePubsubTopicKey(topic string) error
- func (w *Waku) RetrievePubsubTopicKey(topic string) (*ecdsa.PrivateKey, error)
- func (w *Waku) SelectKeyPair(key *ecdsa.PrivateKey) error
- func (w *Waku) Send(pubsubTopic string, msg *pb.WakuMessage, priority *int) ([]byte, error)
- func (w *Waku) SendEnvelopeEvent(event common.EnvelopeEvent) int
- func (w *Waku) SetStatusTelemetryClient(client ITelemetryClient)
- func (w *Waku) SetStorePeerID(peerID peer.ID)
- func (w *Waku) SetTopicsToVerifyForMissingMessages(peerID peer.ID, pubsubTopic string, contentTopics []string)
- func (w *Waku) SkipPublishToTopic(value bool)
- func (w *Waku) Start() error
- func (w *Waku) StartDiscV5() error
- func (w *Waku) Stop() error
- func (w *Waku) StopDiscV5() error
- func (w *Waku) StoreNode() *store.WakuStore
- func (w *Waku) StorePubsubTopicKey(topic string, privKey *ecdsa.PrivateKey) error
- func (w *Waku) Subscribe(f *common.Filter) (string, error)
- func (w *Waku) SubscribeEnvelopeEvents(events chan<- common.EnvelopeEvent) event.Subscription
- func (w *Waku) SubscribeToConnStatusChanges() *types.ConnStatusSubscription
- func (w *Waku) SubscribeToPubsubTopic(topic string, pubkey *ecdsa.PublicKey) error
- func (w *Waku) Trace(evt *pubsub_pb.TraceEvent)
- func (w *Waku) Unsubscribe(ctx context.Context, id string) error
- func (w *Waku) UnsubscribeFromPubsubTopic(topic string) error
- func (w *Waku) UnsubscribeMany(ids []string) error
Constants ¶
const ( Version = uint64(2) // Peer version number VersionStr = "2" // The same, as a string Name = "waku" // Nickname of the protocol )
Waku protocol parameters
Variables ¶
var ( ErrSymAsym = errors.New("specify either a symmetric or an asymmetric key") ErrInvalidSymmetricKey = errors.New("invalid symmetric key") ErrInvalidPublicKey = errors.New("invalid public key") ErrInvalidSigningPubKey = errors.New("invalid signing public key") ErrTooLowPoW = errors.New("message rejected, PoW too low") ErrNoTopics = errors.New("missing topic(s)") )
List of errors
var ( ErrBadLightClientConfig = errors.New("either peer exchange server or discv5 must be disabled, and the peer exchange client must be enabled") ErrBadFullNodeConfig = errors.New("peer exchange server and discv5 must be enabled, and the peer exchange client must be disabled") )
var DefaultConfig = Config{ MaxMessageSize: common.DefaultMaxMessageSize, Host: "0.0.0.0", Port: 0, DiscoveryLimit: 20, MinPeersForRelay: 1, MinPeersForFilter: 2, AutoUpdate: false, }
Functions ¶
func FormatPeerConnFailures ¶ added in v0.182.41
Types ¶
type BandwidthTelemetryClient ¶ added in v0.128.0
type BandwidthTelemetryClient struct {
// contains filtered or unexported fields
}
func NewBandwidthTelemetryClient ¶ added in v0.128.0
func NewBandwidthTelemetryClient(logger *zap.Logger, serverURL string) *BandwidthTelemetryClient
func (*BandwidthTelemetryClient) PushProtocolStats ¶ added in v0.128.0
func (c *BandwidthTelemetryClient) PushProtocolStats(stats map[protocol.ID]metrics.Stats)
type Config ¶
type Config struct { MaxMessageSize uint32 `toml:",omitempty"` // Maximal message length allowed by the waku node Host string `toml:",omitempty"` Port int `toml:",omitempty"` EnablePeerExchangeServer bool `toml:",omitempty"` // PeerExchange server makes sense only when discv5 is running locally as it will have a cache of peers that it can respond to in case a PeerExchange request comes from the PeerExchangeClient EnablePeerExchangeClient bool `toml:",omitempty"` MinPeersForRelay int `toml:",omitempty"` // Indicates the minimum number of peers required for using Relay Protocol MinPeersForFilter int `toml:",omitempty"` // Indicates the minimum number of peers required for using Filter Protocol LightClient bool `toml:",omitempty"` // Indicates if the node is a light client WakuNodes []string `toml:",omitempty"` DiscV5BootstrapNodes []string `toml:",omitempty"` Nameserver string `toml:",omitempty"` // Optional nameserver to use for dns discovery Resolver ethdisc.Resolver `toml:",omitempty"` // Optional resolver to use for dns discovery EnableDiscV5 bool `toml:",omitempty"` // Indicates whether discv5 is enabled or not DiscoveryLimit int `toml:",omitempty"` // Indicates the number of nodes to discover with peer exchange client AutoUpdate bool `toml:",omitempty"` UDPPort int `toml:",omitempty"` EnableStore bool `toml:",omitempty"` StoreCapacity int `toml:",omitempty"` StoreSeconds int `toml:",omitempty"` TelemetryServerURL string `toml:",omitempty"` TelemetrySendPeriodMs int `toml:",omitempty"` // Number of milliseconds to wait between sending requests to telemetry service TelemetryPeerCountSendPeriod int `toml:",omitempty"` // Number of milliseconds to wait between checking peer count DefaultShardPubsubTopic string `toml:",omitempty"` // Pubsub topic to be used by default for messages that do not have a topic assigned (depending whether sharding is used or not) DefaultShardedPubsubTopics []string `toml:", omitempty"` ClusterID uint16 `toml:",omitempty"` EnableConfirmations bool `toml:",omitempty"` // Enable sending message confirmations SkipPublishToTopic bool `toml:",omitempty"` // Used in testing EnableMissingMessageVerification bool `toml:",omitempty"` EnableStoreConfirmationForMessagesSent bool `toml:",omitempty"` //Flag that enables checking with store node for sent message confimration UseThrottledPublish bool `toml:",omitempty"` // Flag that indicates whether a rate limited priority queue will be used to send messages or not }
Config represents the configuration state of a waku node.
type Criteria ¶
type Criteria struct { SymKeyID string `json:"symKeyID"` PrivateKeyID string `json:"privateKeyID"` Sig []byte `json:"sig"` PubsubTopic string `json:"pubsubTopic"` ContentTopics []common.TopicType `json:"topics"` }
Criteria holds various filter options for inbound messages.
type ErrorSendingEnvelope ¶ added in v0.181.32
type ErrorSendingEnvelope struct { Error error SentEnvelope SentEnvelope }
type ITelemetryClient ¶ added in v0.171.11
type ITelemetryClient interface { SetDeviceType(deviceType string) PushReceivedEnvelope(ctx context.Context, receivedEnvelope *protocol.Envelope) PushSentEnvelope(ctx context.Context, sentEnvelope SentEnvelope) PushErrorSendingEnvelope(ctx context.Context, errorSendingEnvelope ErrorSendingEnvelope) PushPeerCount(ctx context.Context, peerCount int) PushPeerConnFailures(ctx context.Context, peerConnFailures map[string]int) PushMessageCheckSuccess(ctx context.Context, messageHash string) PushMessageCheckFailure(ctx context.Context, messageHash string) PushPeerCountByShard(ctx context.Context, peerCountByShard map[uint16]uint) PushPeerCountByOrigin(ctx context.Context, peerCountByOrigin map[wps.Origin]uint) }
type Info ¶
type Info struct { Messages int `json:"messages"` // Number of floating messages. MaxMessageSize uint32 `json:"maxMessageSize"` // Maximum accepted message size }
Info contains diagnostic information.
type Message ¶
type Message struct { Sig []byte `json:"sig,omitempty"` Timestamp uint32 `json:"timestamp"` PubsubTopic string `json:"pubsubTopic"` ContentTopic common.TopicType `json:"topic"` Payload []byte `json:"payload"` Padding []byte `json:"padding"` Hash []byte `json:"hash"` Dst []byte `json:"recipientPublicKey,omitempty"` }
Message is the RPC representation of a waku message.
func ToWakuMessage ¶
func ToWakuMessage(message *common.ReceivedMessage) *Message
ToWakuMessage converts an internal message into an API version.
type NewMessage ¶
type NewMessage struct { SymKeyID string `json:"symKeyID"` PublicKey []byte `json:"pubKey"` Sig string `json:"sig"` PubsubTopic string `json:"pubsubTopic"` ContentTopic common.TopicType `json:"topic"` Payload []byte `json:"payload"` Padding []byte `json:"padding"` TargetPeer string `json:"targetPeer"` Ephemeral bool `json:"ephemeral"` Priority *int `json:"priority"` }
NewMessage represents a new waku message that is posted through the RPC.
type NwakuInfo ¶ added in v0.184.44
type PublicWakuAPI ¶
type PublicWakuAPI struct {
// contains filtered or unexported fields
}
PublicWakuAPI provides the waku RPC service that can be use publicly without security implications.
func NewPublicWakuAPI ¶
func NewPublicWakuAPI(w *Waku) *PublicWakuAPI
NewPublicWakuAPI create a new RPC waku service.
func (*PublicWakuAPI) AddPrivateKey ¶
func (api *PublicWakuAPI) AddPrivateKey(ctx context.Context, privateKey hexutil.Bytes) (string, error)
AddPrivateKey imports the given private key.
func (*PublicWakuAPI) AddSymKey ¶
AddSymKey import a symmetric key. It returns an ID that can be used to refer to the key. Can be used encrypting and decrypting messages where the key is known to both parties.
func (*PublicWakuAPI) BloomFilter ¶ added in v0.85.0
func (api *PublicWakuAPI) BloomFilter() []byte
func (*PublicWakuAPI) DeleteKeyPair ¶
DeleteKeyPair removes the key with the given key if it exists.
func (*PublicWakuAPI) DeleteMessageFilter ¶
func (api *PublicWakuAPI) DeleteMessageFilter(id string) (bool, error)
DeleteMessageFilter deletes a filter.
func (*PublicWakuAPI) DeleteSymKey ¶
func (api *PublicWakuAPI) DeleteSymKey(ctx context.Context, id string) bool
DeleteSymKey deletes the symmetric key that is associated with the given id.
func (*PublicWakuAPI) GenerateSymKeyFromPassword ¶
func (api *PublicWakuAPI) GenerateSymKeyFromPassword(ctx context.Context, passwd string) (string, error)
GenerateSymKeyFromPassword derive a key from the given password, stores it, and returns its ID.
func (*PublicWakuAPI) GetFilterMessages ¶
func (api *PublicWakuAPI) GetFilterMessages(id string) ([]*Message, error)
GetFilterMessages returns the messages that match the filter criteria and are received between the last poll and now.
func (*PublicWakuAPI) GetPrivateKey ¶
GetPrivateKey returns the private key associated with the given key. The key is the hex encoded representation of a key in the form specified in section 4.3.6 of ANSI X9.62.
func (*PublicWakuAPI) GetPublicKey ¶
GetPublicKey returns the public key associated with the given key. The key is the hex encoded representation of a key in the form specified in section 4.3.6 of ANSI X9.62.
func (*PublicWakuAPI) HasKeyPair ¶
func (api *PublicWakuAPI) HasKeyPair(ctx context.Context, id string) bool
HasKeyPair returns an indication if the node has a key pair that is associated with the given id.
func (*PublicWakuAPI) HasSymKey ¶
func (api *PublicWakuAPI) HasSymKey(ctx context.Context, id string) bool
HasSymKey returns an indication if the node has a symmetric key associated with the given key.
func (*PublicWakuAPI) Info ¶
func (api *PublicWakuAPI) Info(ctx context.Context) Info
Info returns diagnostic information about the waku node.
func (*PublicWakuAPI) Messages ¶
func (api *PublicWakuAPI) Messages(ctx context.Context, crit Criteria) (*rpc.Subscription, error)
Messages set up a subscription that fires events when messages arrive that match the given set of criteria.
func (*PublicWakuAPI) NewKeyPair ¶
func (api *PublicWakuAPI) NewKeyPair(ctx context.Context) (string, error)
NewKeyPair generates a new public and private key pair for message decryption and encryption. It returns an ID that can be used to refer to the keypair.
func (*PublicWakuAPI) NewMessageFilter ¶
func (api *PublicWakuAPI) NewMessageFilter(req Criteria) (string, error)
NewMessageFilter creates a new filter that can be used to poll for (new) messages that satisfy the given criteria.
func (*PublicWakuAPI) NewSymKey ¶
func (api *PublicWakuAPI) NewSymKey(ctx context.Context) (string, error)
NewSymKey generate a random symmetric key. It returns an ID that can be used to refer to the key. Can be used encrypting and decrypting messages where the key is known to both parties.
func (*PublicWakuAPI) Post ¶
func (api *PublicWakuAPI) Post(ctx context.Context, req NewMessage) (hexutil.Bytes, error)
Post posts a message on the Waku network. returns the hash of the message in case of success.
func (*PublicWakuAPI) UninstallFilter ¶
func (api *PublicWakuAPI) UninstallFilter(ctx context.Context, id string)
UninstallFilter is alias for Unsubscribe
func (*PublicWakuAPI) Unsubscribe ¶
func (api *PublicWakuAPI) Unsubscribe(ctx context.Context, id string)
Unsubscribe disables and removes an existing filter.
type SentEnvelope ¶ added in v0.180.31
type SentEnvelope struct { Envelope *protocol.Envelope PublishMethod publish.PublishMethod }
type Waku ¶
type Waku struct {
// contains filtered or unexported fields
}
Waku represents a dark communication interface through the Ethereum network, using its very own P2P communication layer.
func New ¶
func New(nodeKey *ecdsa.PrivateKey, fleet string, cfg *Config, logger *zap.Logger, appDB *sql.DB, ts *timesource.NTPTimeSource, onHistoricMessagesRequestFailed func([]byte, peer.ID, error), onPeerStats func(types.ConnStatus)) (*Waku, error)
New creates a WakuV2 client ready to communicate through the LibP2P network.
func (*Waku) AddKeyPair ¶
func (w *Waku) AddKeyPair(key *ecdsa.PrivateKey) (string, error)
AddKeyPair imports a asymmetric private key and returns it identifier.
func (*Waku) AddRelayPeer ¶ added in v0.88.4
func (*Waku) AddStorePeer ¶ added in v0.88.4
func (*Waku) AddSymKeyDirect ¶
AddSymKeyDirect stores the key, and returns its id.
func (*Waku) AddSymKeyFromPassword ¶
AddSymKeyFromPassword generates the key from password, stores it, and returns its id.
func (*Waku) ClearEnvelopesCache ¶ added in v0.172.11
func (w *Waku) ClearEnvelopesCache()
func (*Waku) ConfirmMessageDelivered ¶ added in v0.180.30
func (w *Waku) ConfirmMessageDelivered(hashes []gethcommon.Hash)
func (*Waku) ConnectionChanged ¶ added in v0.117.1
func (w *Waku) ConnectionChanged(state connection.State)
func (*Waku) DeleteKeyPair ¶
DeleteKeyPair deletes the specified key if it exists.
func (*Waku) DeleteKeyPairs ¶
DeleteKeyPairs removes all cryptographic identities known to the node
func (*Waku) DeleteSymKey ¶
DeleteSymKey deletes the key associated with the name string if it exists.
func (*Waku) GenerateSymKey ¶
GenerateSymKey generates a random symmetric key and stores it under id, which is then returned. Will be used in the future for session key exchange.
func (*Waku) GetEnvelope ¶
func (w *Waku) GetEnvelope(hash gethcommon.Hash) *common.ReceivedMessage
GetEnvelope retrieves an envelope from the message queue by its hash. It returns nil if the envelope can not be found.
func (*Waku) GetNodeENRString ¶ added in v0.179.12
func (*Waku) GetPrivateKey ¶
func (w *Waku) GetPrivateKey(id string) (*ecdsa.PrivateKey, error)
GetPrivateKey retrieves the private key of the specified identity.
func (*Waku) GetPubsubTopic ¶ added in v0.179.28
func (*Waku) GetStats ¶ added in v0.83.8
func (w *Waku) GetStats() types.StatsSummary
func (*Waku) HasKeyPair ¶
HasKeyPair checks if the waku node is configured with the private key of the specified public pair.
func (*Waku) HasSymKey ¶
HasSymKey returns true if there is a key associated with the given id. Otherwise returns false.
func (*Waku) IsEnvelopeCached ¶
func (w *Waku) IsEnvelopeCached(hash gethcommon.Hash) bool
isEnvelopeCached checks if envelope with specific hash has already been received and cached.
func (*Waku) LegacyStoreNode ¶ added in v0.182.41
func (w *Waku) LegacyStoreNode() legacy_store.Store
func (*Waku) ListenAddresses ¶ added in v0.115.4
func (w *Waku) ListenAddresses() []multiaddr.Multiaddr
func (*Waku) MarkP2PMessageAsProcessed ¶ added in v0.91.13
func (w *Waku) MarkP2PMessageAsProcessed(hash gethcommon.Hash)
func (*Waku) MaxMessageSize ¶
MaxMessageSize returns the maximum accepted message size.
func (*Waku) MessageExists ¶ added in v0.182.41
func (w *Waku) MessageExists(mh pb.MessageHash) (bool, error)
func (*Waku) NewKeyPair ¶
NewKeyPair generates a new cryptographic identity for the client, and injects it into the known identities for message decryption. Returns ID of the new key pair.
func (*Waku) OnNewEnvelope ¶ added in v0.182.41
OnNewEnvelope is an interface from Waku FilterManager API that gets invoked when any new message is received by Filter.
func (*Waku) OnNewEnvelopes ¶
func (*Waku) ProcessingP2PMessages ¶ added in v0.91.13
func (*Waku) RelayPeersByTopic ¶ added in v0.182.35
func (*Waku) RemovePubsubTopicKey ¶ added in v0.172.11
func (*Waku) RetrievePubsubTopicKey ¶ added in v0.170.0
func (w *Waku) RetrievePubsubTopicKey(topic string) (*ecdsa.PrivateKey, error)
func (*Waku) SelectKeyPair ¶
func (w *Waku) SelectKeyPair(key *ecdsa.PrivateKey) error
SelectKeyPair adds cryptographic identity, and makes sure that it is the only private key known to the node.
func (*Waku) Send ¶
Send injects a message into the waku send queue, to be distributed in the network in the coming cycles.
func (*Waku) SendEnvelopeEvent ¶
func (w *Waku) SendEnvelopeEvent(event common.EnvelopeEvent) int
func (*Waku) SetStatusTelemetryClient ¶ added in v0.171.11
func (w *Waku) SetStatusTelemetryClient(client ITelemetryClient)
func (*Waku) SetStorePeerID ¶ added in v0.180.30
func (*Waku) SetTopicsToVerifyForMissingMessages ¶ added in v0.181.31
func (*Waku) SkipPublishToTopic ¶ added in v0.171.25
func (*Waku) Start ¶
Start implements node.Service, starting the background data propagation thread of the Waku protocol.
func (*Waku) StartDiscV5 ¶ added in v0.91.8
func (*Waku) Stop ¶
Stop implements node.Service, stopping the background data propagation thread of the Waku protocol.
func (*Waku) StopDiscV5 ¶ added in v0.91.8
func (*Waku) StorePubsubTopicKey ¶ added in v0.166.1
func (w *Waku) StorePubsubTopicKey(topic string, privKey *ecdsa.PrivateKey) error
func (*Waku) Subscribe ¶
Subscribe installs a new message handler used for filtering, decrypting and subsequent storing of incoming messages.
func (*Waku) SubscribeEnvelopeEvents ¶
func (w *Waku) SubscribeEnvelopeEvents(events chan<- common.EnvelopeEvent) event.Subscription
SubscribeEnvelopeEvents subscribes to envelopes feed. In order to prevent blocking waku producers events must be amply buffered.
func (*Waku) SubscribeToConnStatusChanges ¶ added in v0.93.2
func (w *Waku) SubscribeToConnStatusChanges() *types.ConnStatusSubscription
func (*Waku) SubscribeToPubsubTopic ¶ added in v0.166.1
func (*Waku) Trace ¶ added in v0.174.5
func (w *Waku) Trace(evt *pubsub_pb.TraceEvent)
Trace implements EventTracer interface. We use custom logging, because we want to base58-encode the peerIDs. And also make the messageIDs readable.
func (*Waku) Unsubscribe ¶
Unsubscribe removes an installed message handler.
func (*Waku) UnsubscribeFromPubsubTopic ¶ added in v0.172.11
func (*Waku) UnsubscribeMany ¶
Unsubscribe removes an installed message handler.