Documentation
¶
Index ¶
- Constants
- Variables
- func CreateMailServerEvent(nodeID enode.ID, payload []byte) (*common.EnvelopeEvent, error)
- func CreateMailServerRequestCompletedPayload(requestID, lastEnvelopeHash gethcommon.Hash, cursor []byte) []byte
- func CreateMailServerRequestFailedPayload(requestID gethcommon.Hash, err error) []byte
- func FormatPeerStats(wakuNode *node.WakuNode) map[string]types.WakuV2Peer
- type BandwidthTelemetryClient
- type Config
- type Criteria
- type ErrorSendingEnvelope
- type FilterManager
- type ITelemetryClient
- type Info
- type MailServer
- type MailServerResponse
- type Message
- type NewMessage
- 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 PublishMethod
- type SentEnvelope
- type SubDetails
- type TopicInterest
- type Waku
- func (w *Waku) APIs() []rpc.API
- func (w *Waku) AddKeyPair(key *ecdsa.PrivateKey) (string, error)
- func (w *Waku) AddRelayPeer(address string) (peer.ID, error)
- func (w *Waku) AddStorePeer(address string) (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 string) error
- func (w *Waku) DialPeerByID(peerID string) error
- func (w *Waku) DropPeer(peerID string) error
- func (w *Waku) ENR() (string, error)
- func (w *Waku) FetchHistory(missingHistoryRequest TopicInterest)
- 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) ListenAddresses() []string
- func (w *Waku) MarkP2PMessageAsProcessed(hash gethcommon.Hash)
- func (w *Waku) MaxMessageSize() uint32
- func (w *Waku) NewKeyPair() (string, 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() map[string]types.WakuV2Peer
- func (w *Waku) Peerstore() peerstore.Peerstore
- func (w *Waku) ProcessingP2PMessages() bool
- func (w *Waku) Protocols() []p2p.Protocol
- func (w *Waku) Query(ctx context.Context, peerID peer.ID, query legacy_store.Query, ...) (*storepb.Index, int, 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) ([]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() legacy_store.Store
- 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, KeepAliveInterval: 10, DiscoveryLimit: 20, MinPeersForRelay: 1, MinPeersForFilter: 2, AutoUpdate: false, }
Functions ¶
func CreateMailServerEvent ¶
CreateMailServerEvent returns EnvelopeEvent with correct data if payload corresponds to any of the know mailserver events: * request completed successfully * request failed If the payload is unknown/unparseable, it returns `nil`
func CreateMailServerRequestCompletedPayload ¶
func CreateMailServerRequestCompletedPayload(requestID, lastEnvelopeHash gethcommon.Hash, cursor []byte) []byte
CreateMailServerRequestCompletedPayload creates a payload representing a successful request to mailserver
func CreateMailServerRequestFailedPayload ¶
func CreateMailServerRequestFailedPayload(requestID gethcommon.Hash, err error) []byte
CreateMailServerRequestFailedPayload creates a payload representing a failed request to a mailserver
func FormatPeerStats ¶ added in v0.88.4
func FormatPeerStats(wakuNode *node.WakuNode) map[string]types.WakuV2Peer
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(relayStats metrics.Stats, storeStats 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"` KeepAliveInterval int `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"` Rendezvous bool `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 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"` UseShardAsDefaultTopic bool `toml:",omitempty"` ClusterID uint16 `toml:",omitempty"` EnableConfirmations bool `toml:",omitempty"` // Enable sending message confirmations SkipPublishToTopic bool `toml:",omitempty"` // Used in testing }
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 FilterManager ¶ added in v0.167.6
type ITelemetryClient ¶ added in v0.171.11
type ITelemetryClient interface { PushReceivedEnvelope(receivedEnvelope *protocol.Envelope) PushSentEnvelope(sentEnvelope SentEnvelope) PushErrorSendingEnvelope(errorSendingEnvelope ErrorSendingEnvelope) }
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 MailServer ¶
type MailServer interface { Archive(env *common.Envelope) DeliverMail(peerID []byte, request *common.Envelope) // DEPRECATED; use Deliver() Deliver(peerID []byte, request common.MessagesRequest) }
MailServer represents a mail server, capable of archiving the old messages for subsequent delivery to the peers. Any implementation must ensure that both functions are thread-safe. Also, they must return ASAP. DeliverMail should use p2pMessageCode for delivery, in order to bypass the expiry checks.
type MailServerResponse ¶
type MailServerResponse struct { LastEnvelopeHash gethcommon.Hash Cursor []byte Error error }
MailServerResponse is the response payload sent by the mailserver.
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"` }
NewMessage represents a new waku message that is posted through the RPC.
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 PublishMethod ¶ added in v0.180.31
type PublishMethod int
const ( LightPush PublishMethod = iota Relay )
func (PublishMethod) String ¶ added in v0.180.31
func (pm PublishMethod) String() string
type SentEnvelope ¶ added in v0.180.31
type SentEnvelope struct { Envelope *protocol.Envelope PublishMethod PublishMethod }
type SubDetails ¶ added in v0.180.31
type SubDetails struct {
// contains filtered or unexported fields
}
type TopicInterest ¶ added in v0.181.31
type TopicInterest struct {
// contains filtered or unexported fields
}
func (TopicInterest) Equals ¶ added in v0.181.31
func (p TopicInterest) Equals(other TopicInterest) bool
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) DialPeerByID ¶ added in v0.88.4
func (*Waku) FetchHistory ¶ added in v0.181.31
func (w *Waku) FetchHistory(missingHistoryRequest TopicInterest)
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) ListenAddresses ¶ added in v0.115.4
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) 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) OnNewEnvelopes ¶
func (*Waku) ProcessingP2PMessages ¶ added in v0.91.13
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) StoreNode ¶ added in v0.176.7
func (w *Waku) StoreNode() legacy_store.Store
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.