Documentation ¶
Index ¶
- func GetGethWakuFrom(m types.Waku) *waku.Waku
- func GetGethWakuV2From(m types.Waku) *wakuv2.Waku
- func GetWakuFilterFrom(f types.Filter) *wakucommon.Filter
- func GetWakuV2FilterFrom(f types.Filter) *wakucommon.Filter
- func NewGethPublicWakuAPIWrapper(api *waku.PublicWakuAPI) types.PublicWakuAPI
- func NewGethPublicWakuV2APIWrapper(api *wakuv2.PublicWakuAPI) types.PublicWakuAPI
- func NewGethSubscriptionWrapper(subscription event.Subscription) types.Subscription
- func NewGethWakuV2Wrapper(w *wakuv2.Waku) types.Waku
- func NewGethWakuWrapper(w *waku.Waku) types.Waku
- func NewNodeBridge(stack *node.Node, waku1 *waku.Waku, waku2 *wakuv2.Waku) types.Node
- func NewWakuEnvelope(e *waku.Envelope) types.Envelope
- func NewWakuEnvelopeErrorWrapper(envelopeError *waku.EnvelopeError) *types.EnvelopeError
- func NewWakuEnvelopeEventWrapper(envelopeEvent *wakucommon.EnvelopeEvent) *types.EnvelopeEvent
- func NewWakuFilterWrapper(f *wakucommon.Filter, id string) types.Filter
- func NewWakuMailServerResponseWrapper(mailServerResponse *waku.MailServerResponse) *types.MailServerResponse
- func NewWakuV2EnvelopeErrorWrapper(envelopeError *wakuv2.EnvelopeError) *types.EnvelopeError
- func NewWakuV2EnvelopeEventWrapper(envelopeEvent *wakuv2common.EnvelopeEvent) *types.EnvelopeEvent
- func NewWakuV2FilterWrapper(f *wakucommon.Filter, id string) types.Filter
- func WrapKeyStore(keystore *keystore.KeyStore) types.KeyStore
- type GethPublicWakuAPIWrapper
- func (w *GethPublicWakuAPIWrapper) AddPrivateKey(ctx context.Context, privateKey types.HexBytes) (string, error)
- func (w *GethPublicWakuAPIWrapper) BloomFilter() []byte
- func (w *GethPublicWakuAPIWrapper) DeleteKeyPair(ctx context.Context, key string) (bool, error)
- func (w *GethPublicWakuAPIWrapper) GenerateSymKeyFromPassword(ctx context.Context, passwd string) (string, error)
- func (w *GethPublicWakuAPIWrapper) GetFilterMessages(id string) ([]*types.Message, error)
- func (w *GethPublicWakuAPIWrapper) NewMessageFilter(req types.Criteria) (string, error)
- func (w *GethPublicWakuAPIWrapper) Post(ctx context.Context, req types.NewMessage) ([]byte, error)
- type GethWakuWrapper
- func (w *GethWakuWrapper) AddKeyPair(key *ecdsa.PrivateKey) (string, error)
- func (w *GethWakuWrapper) AddRelayPeer(address string) (peer.ID, error)
- func (w *GethWakuWrapper) AddStorePeer(address string) (peer.ID, error)
- func (w *GethWakuWrapper) AddSymKeyDirect(key []byte) (string, error)
- func (w *GethWakuWrapper) AddSymKeyFromPassword(password string) (string, error)
- func (w *GethWakuWrapper) BloomFilter() []byte
- func (w *GethWakuWrapper) ClearEnvelopesCache()
- func (w *GethWakuWrapper) ConfirmMessageDelivered(hashes []common.Hash)
- func (w *GethWakuWrapper) ConnectionChanged(_ connection.State)
- func (w *GethWakuWrapper) DeleteKeyPair(keyID string) bool
- func (w *GethWakuWrapper) DeleteSymKey(id string) bool
- func (w *GethWakuWrapper) DialPeer(address string) error
- func (w *GethWakuWrapper) DialPeerByID(peerID string) error
- func (w *GethWakuWrapper) DropPeer(peerID string) error
- func (w *GethWakuWrapper) ENR() (string, error)
- func (w *GethWakuWrapper) GetCurrentTime() time.Time
- func (w *GethWakuWrapper) GetFilter(id string) types.Filter
- func (w *GethWakuWrapper) GetPrivateKey(id string) (*ecdsa.PrivateKey, error)
- func (w *GethWakuWrapper) GetStats() types.StatsSummary
- func (w *GethWakuWrapper) GetSymKey(id string) ([]byte, error)
- func (w *GethWakuWrapper) ListenAddresses() ([]string, error)
- func (w *GethWakuWrapper) MarkP2PMessageAsProcessed(hash common.Hash)
- func (w *GethWakuWrapper) MaxMessageSize() uint32
- func (w *GethWakuWrapper) MinPow() float64
- func (w *GethWakuWrapper) PeerCount() int
- func (w *GethWakuWrapper) PeerID() peer.ID
- func (w *GethWakuWrapper) Peers() map[string]types.WakuV2Peer
- func (w *GethWakuWrapper) ProcessingP2PMessages() bool
- func (w *GethWakuWrapper) PublicWakuAPI() types.PublicWakuAPI
- func (w *GethWakuWrapper) RelayPeersByTopic(topic string) (*types.PeerList, error)
- func (w *GethWakuWrapper) RemovePubsubTopicKey(topic string) error
- func (w *GethWakuWrapper) RequestHistoricMessagesWithTimeout(peerID []byte, envelope types.Envelope, timeout time.Duration) error
- func (w *GethWakuWrapper) RequestStoreMessages(ctx context.Context, peerID []byte, r types.MessagesRequest, ...) (types.StoreRequestCursor, int, error)
- func (w *GethWakuWrapper) RetrievePubsubTopicKey(topic string) (*ecdsa.PrivateKey, error)
- func (w *GethWakuWrapper) SendMessagesRequest(peerID []byte, r types.MessagesRequest) error
- func (w *GethWakuWrapper) SetCriteriaForMissingMessageVerification(peerID peer.ID, pubsubTopic string, contentTopics []string) error
- func (w *GethWakuWrapper) SetStorePeerID(peerID peer.ID)
- func (w *GethWakuWrapper) StartDiscV5() error
- func (w *GethWakuWrapper) StopDiscV5() error
- func (w *GethWakuWrapper) StorePubsubTopicKey(topic string, privKey *ecdsa.PrivateKey) error
- func (w *GethWakuWrapper) Subscribe(opts *types.SubscriptionOptions) (string, error)
- func (w *GethWakuWrapper) SubscribeEnvelopeEvents(eventsProxy chan<- types.EnvelopeEvent) types.Subscription
- func (w *GethWakuWrapper) SubscribeToConnStatusChanges() (*types.ConnStatusSubscription, error)
- func (w *GethWakuWrapper) SubscribeToPubsubTopic(topic string, optPublicKey *ecdsa.PublicKey) error
- func (w *GethWakuWrapper) Unsubscribe(ctx context.Context, id string) error
- func (w *GethWakuWrapper) UnsubscribeFromPubsubTopic(topic string) error
- func (w *GethWakuWrapper) UnsubscribeMany(ids []string) error
- func (w *GethWakuWrapper) Version() uint
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetGethWakuFrom ¶
GetGethWhisperFrom retrieves the underlying whisper Whisper struct from a wrapped Whisper interface
func GetGethWakuV2From ¶ added in v0.80.2
GetGethWhisperFrom retrieves the underlying whisper Whisper struct from a wrapped Whisper interface
func GetWakuFilterFrom ¶
func GetWakuFilterFrom(f types.Filter) *wakucommon.Filter
GetWakuFilterFrom retrieves the underlying whisper Filter struct from a wrapped Filter interface
func GetWakuV2FilterFrom ¶ added in v0.80.2
func GetWakuV2FilterFrom(f types.Filter) *wakucommon.Filter
GetWakuFilterFrom retrieves the underlying whisper Filter struct from a wrapped Filter interface
func NewGethPublicWakuAPIWrapper ¶
func NewGethPublicWakuAPIWrapper(api *waku.PublicWakuAPI) types.PublicWakuAPI
NewGethPublicWakuAPIWrapper returns an object that wraps Geth's PublicWakuAPI in a types interface
func NewGethPublicWakuV2APIWrapper ¶ added in v0.80.2
func NewGethPublicWakuV2APIWrapper(api *wakuv2.PublicWakuAPI) types.PublicWakuAPI
NewGethPublicWakuAPIWrapper returns an object that wraps Geth's PublicWakuAPI in a types interface
func NewGethSubscriptionWrapper ¶
func NewGethSubscriptionWrapper(subscription event.Subscription) types.Subscription
NewGethSubscriptionWrapper returns an object that wraps Geth's Subscription in a types interface
func NewGethWakuV2Wrapper ¶ added in v0.80.2
NewGethWakuWrapper returns an object that wraps Geth's Waku in a types interface
func NewGethWakuWrapper ¶
NewGethWakuWrapper returns an object that wraps Geth's Waku in a types interface
func NewNodeBridge ¶
func NewWakuEnvelope ¶
NewWakuEnvelope returns an object that wraps Geth's Waku Envelope in a types interface.
func NewWakuEnvelopeErrorWrapper ¶
func NewWakuEnvelopeErrorWrapper(envelopeError *waku.EnvelopeError) *types.EnvelopeError
NewWakuEnvelopeErrorWrapper returns a types.EnvelopeError object that mimics Geth's EnvelopeError
func NewWakuEnvelopeEventWrapper ¶
func NewWakuEnvelopeEventWrapper(envelopeEvent *wakucommon.EnvelopeEvent) *types.EnvelopeEvent
NewWakuEnvelopeEventWrapper returns a types.EnvelopeEvent object that mimics Geth's EnvelopeEvent
func NewWakuFilterWrapper ¶
func NewWakuFilterWrapper(f *wakucommon.Filter, id string) types.Filter
NewWakuFilterWrapper returns an object that wraps Geth's Filter in a types interface
func NewWakuMailServerResponseWrapper ¶
func NewWakuMailServerResponseWrapper(mailServerResponse *waku.MailServerResponse) *types.MailServerResponse
NewWakuMailServerResponseWrapper returns a types.MailServerResponse object that mimics Geth's MailServerResponse
func NewWakuV2EnvelopeErrorWrapper ¶ added in v0.80.2
func NewWakuV2EnvelopeErrorWrapper(envelopeError *wakuv2.EnvelopeError) *types.EnvelopeError
NewWakuEnvelopeErrorWrapper returns a types.EnvelopeError object that mimics Geth's EnvelopeError
func NewWakuV2EnvelopeEventWrapper ¶ added in v0.80.2
func NewWakuV2EnvelopeEventWrapper(envelopeEvent *wakuv2common.EnvelopeEvent) *types.EnvelopeEvent
NewWakuV2EnvelopeEventWrapper returns a types.EnvelopeEvent object that mimics Geth's EnvelopeEvent
func NewWakuV2FilterWrapper ¶ added in v0.80.2
func NewWakuV2FilterWrapper(f *wakucommon.Filter, id string) types.Filter
NewWakuFilterWrapper returns an object that wraps Geth's Filter in a types interface
Types ¶
type GethPublicWakuAPIWrapper ¶ added in v0.174.5
type GethPublicWakuAPIWrapper struct {
// contains filtered or unexported fields
}
func (*GethPublicWakuAPIWrapper) AddPrivateKey ¶ added in v0.174.5
func (w *GethPublicWakuAPIWrapper) AddPrivateKey(ctx context.Context, privateKey types.HexBytes) (string, error)
AddPrivateKey imports the given private key.
func (*GethPublicWakuAPIWrapper) BloomFilter ¶ added in v0.174.5
func (w *GethPublicWakuAPIWrapper) BloomFilter() []byte
func (*GethPublicWakuAPIWrapper) DeleteKeyPair ¶ added in v0.174.5
DeleteKeyPair removes the key with the given key if it exists.
func (*GethPublicWakuAPIWrapper) GenerateSymKeyFromPassword ¶ added in v0.174.5
func (w *GethPublicWakuAPIWrapper) GenerateSymKeyFromPassword(ctx context.Context, passwd string) (string, error)
GenerateSymKeyFromPassword derives a key from the given password, stores it, and returns its ID.
func (*GethPublicWakuAPIWrapper) GetFilterMessages ¶ added in v0.174.5
func (w *GethPublicWakuAPIWrapper) GetFilterMessages(id string) ([]*types.Message, error)
GetFilterMessages returns the messages that match the filter criteria and are received between the last poll and now.
func (*GethPublicWakuAPIWrapper) NewMessageFilter ¶ added in v0.174.5
func (w *GethPublicWakuAPIWrapper) NewMessageFilter(req types.Criteria) (string, error)
NewMessageFilter creates a new filter that can be used to poll for (new) messages that satisfy the given criteria.
func (*GethPublicWakuAPIWrapper) Post ¶ added in v0.174.5
func (w *GethPublicWakuAPIWrapper) Post(ctx context.Context, req types.NewMessage) ([]byte, error)
Post posts a message on the network. returns the hash of the message in case of success.
type GethWakuWrapper ¶ added in v0.174.5
type GethWakuWrapper struct {
// contains filtered or unexported fields
}
func (*GethWakuWrapper) AddKeyPair ¶ added in v0.174.5
func (w *GethWakuWrapper) AddKeyPair(key *ecdsa.PrivateKey) (string, error)
AddKeyPair imports a asymmetric private key and returns a deterministic identifier.
func (*GethWakuWrapper) AddRelayPeer ¶ added in v0.174.5
func (w *GethWakuWrapper) AddRelayPeer(address string) (peer.ID, error)
AddRelayPeer function only added for compatibility with waku V2
func (*GethWakuWrapper) AddStorePeer ¶ added in v0.174.5
func (w *GethWakuWrapper) AddStorePeer(address string) (peer.ID, error)
PeerCount function only added for compatibility with waku V2
func (*GethWakuWrapper) AddSymKeyDirect ¶ added in v0.174.5
func (w *GethWakuWrapper) AddSymKeyDirect(key []byte) (string, error)
func (*GethWakuWrapper) AddSymKeyFromPassword ¶ added in v0.174.5
func (w *GethWakuWrapper) AddSymKeyFromPassword(password string) (string, error)
func (*GethWakuWrapper) BloomFilter ¶ added in v0.174.5
func (w *GethWakuWrapper) BloomFilter() []byte
BloomFilter returns the aggregated bloom filter for all the topics of interest. The nodes are required to send only messages that match the advertised bloom filter. If a message does not match the bloom, it will tantamount to spam, and the peer will be disconnected.
func (*GethWakuWrapper) ClearEnvelopesCache ¶ added in v0.174.5
func (w *GethWakuWrapper) ClearEnvelopesCache()
func (*GethWakuWrapper) ConfirmMessageDelivered ¶ added in v0.180.30
func (w *GethWakuWrapper) ConfirmMessageDelivered(hashes []common.Hash)
func (*GethWakuWrapper) ConnectionChanged ¶ added in v0.174.5
func (w *GethWakuWrapper) ConnectionChanged(_ connection.State)
func (*GethWakuWrapper) DeleteKeyPair ¶ added in v0.174.5
func (w *GethWakuWrapper) DeleteKeyPair(keyID string) bool
DeleteKeyPair deletes the key with the specified ID if it exists.
func (*GethWakuWrapper) DeleteSymKey ¶ added in v0.174.5
func (w *GethWakuWrapper) DeleteSymKey(id string) bool
func (*GethWakuWrapper) DialPeer ¶ added in v0.174.5
func (w *GethWakuWrapper) DialPeer(address string) error
DialPeer function only added for compatibility with waku V2
func (*GethWakuWrapper) DialPeerByID ¶ added in v0.174.5
func (w *GethWakuWrapper) DialPeerByID(peerID string) error
DialPeerByID function only added for compatibility with waku V2
func (*GethWakuWrapper) DropPeer ¶ added in v0.174.5
func (w *GethWakuWrapper) DropPeer(peerID string) error
PeerCount function only added for compatibility with waku V2
func (*GethWakuWrapper) ENR ¶ added in v0.180.31
func (w *GethWakuWrapper) ENR() (string, error)
ENR function only added for compatibility with waku V2
func (*GethWakuWrapper) GetCurrentTime ¶ added in v0.174.5
func (w *GethWakuWrapper) GetCurrentTime() time.Time
GetCurrentTime returns current time.
func (*GethWakuWrapper) GetFilter ¶ added in v0.174.5
func (w *GethWakuWrapper) GetFilter(id string) types.Filter
func (*GethWakuWrapper) GetPrivateKey ¶ added in v0.174.5
func (w *GethWakuWrapper) GetPrivateKey(id string) (*ecdsa.PrivateKey, error)
func (*GethWakuWrapper) GetStats ¶ added in v0.174.5
func (w *GethWakuWrapper) GetStats() types.StatsSummary
func (*GethWakuWrapper) GetSymKey ¶ added in v0.174.5
func (w *GethWakuWrapper) GetSymKey(id string) ([]byte, error)
func (*GethWakuWrapper) ListenAddresses ¶ added in v0.174.5
func (w *GethWakuWrapper) ListenAddresses() ([]string, error)
ListenAddresses function only added for compatibility with waku V2
func (*GethWakuWrapper) MarkP2PMessageAsProcessed ¶ added in v0.174.5
func (w *GethWakuWrapper) MarkP2PMessageAsProcessed(hash common.Hash)
func (*GethWakuWrapper) MaxMessageSize ¶ added in v0.174.5
func (w *GethWakuWrapper) MaxMessageSize() uint32
MaxMessageSize returns the MaxMessageSize set
func (*GethWakuWrapper) MinPow ¶ added in v0.174.5
func (w *GethWakuWrapper) MinPow() float64
MinPow returns the PoW value required by this node.
func (*GethWakuWrapper) PeerCount ¶ added in v0.174.5
func (w *GethWakuWrapper) PeerCount() int
Added for compatibility with waku V2
func (*GethWakuWrapper) PeerID ¶ added in v0.182.41
func (w *GethWakuWrapper) PeerID() peer.ID
func (*GethWakuWrapper) Peers ¶ added in v0.174.5
func (w *GethWakuWrapper) Peers() map[string]types.WakuV2Peer
Peers function only added for compatibility with waku V2
func (*GethWakuWrapper) ProcessingP2PMessages ¶ added in v0.174.5
func (w *GethWakuWrapper) ProcessingP2PMessages() bool
func (*GethWakuWrapper) PublicWakuAPI ¶ added in v0.174.5
func (w *GethWakuWrapper) PublicWakuAPI() types.PublicWakuAPI
func (*GethWakuWrapper) RelayPeersByTopic ¶ added in v0.182.35
func (w *GethWakuWrapper) RelayPeersByTopic(topic string) (*types.PeerList, error)
func (*GethWakuWrapper) RemovePubsubTopicKey ¶ added in v0.174.5
func (w *GethWakuWrapper) RemovePubsubTopicKey(topic string) error
func (*GethWakuWrapper) RequestHistoricMessagesWithTimeout ¶ added in v0.174.5
func (w *GethWakuWrapper) RequestHistoricMessagesWithTimeout(peerID []byte, envelope types.Envelope, timeout time.Duration) error
RequestHistoricMessages sends a message with p2pRequestCode to a specific peer, which is known to implement MailServer interface, and is supposed to process this request and respond with a number of peer-to-peer messages (possibly expired), which are not supposed to be forwarded any further. The whisper protocol is agnostic of the format and contents of envelope.
func (*GethWakuWrapper) RequestStoreMessages ¶ added in v0.174.5
func (w *GethWakuWrapper) RequestStoreMessages(ctx context.Context, peerID []byte, r types.MessagesRequest, processEnvelopes bool) (types.StoreRequestCursor, int, error)
func (*GethWakuWrapper) RetrievePubsubTopicKey ¶ added in v0.174.5
func (w *GethWakuWrapper) RetrievePubsubTopicKey(topic string) (*ecdsa.PrivateKey, error)
func (*GethWakuWrapper) SendMessagesRequest ¶ added in v0.174.5
func (w *GethWakuWrapper) SendMessagesRequest(peerID []byte, r types.MessagesRequest) error
func (*GethWakuWrapper) SetCriteriaForMissingMessageVerification ¶ added in v0.181.31
func (*GethWakuWrapper) SetStorePeerID ¶ added in v0.180.30
func (w *GethWakuWrapper) SetStorePeerID(peerID peer.ID)
func (*GethWakuWrapper) StartDiscV5 ¶ added in v0.174.5
func (w *GethWakuWrapper) StartDiscV5() error
Added for compatibility with waku V2
func (*GethWakuWrapper) StopDiscV5 ¶ added in v0.174.5
func (w *GethWakuWrapper) StopDiscV5() error
Added for compatibility with waku V2
func (*GethWakuWrapper) StorePubsubTopicKey ¶ added in v0.174.5
func (w *GethWakuWrapper) StorePubsubTopicKey(topic string, privKey *ecdsa.PrivateKey) error
func (*GethWakuWrapper) Subscribe ¶ added in v0.174.5
func (w *GethWakuWrapper) Subscribe(opts *types.SubscriptionOptions) (string, error)
func (*GethWakuWrapper) SubscribeEnvelopeEvents ¶ added in v0.174.5
func (w *GethWakuWrapper) SubscribeEnvelopeEvents(eventsProxy chan<- types.EnvelopeEvent) types.Subscription
func (*GethWakuWrapper) SubscribeToConnStatusChanges ¶ added in v0.174.5
func (w *GethWakuWrapper) SubscribeToConnStatusChanges() (*types.ConnStatusSubscription, error)
func (*GethWakuWrapper) SubscribeToPubsubTopic ¶ added in v0.174.5
func (w *GethWakuWrapper) SubscribeToPubsubTopic(topic string, optPublicKey *ecdsa.PublicKey) error
SubscribeToPubsubTopic function only added for compatibility with waku V2
func (*GethWakuWrapper) Unsubscribe ¶ added in v0.174.5
func (w *GethWakuWrapper) Unsubscribe(ctx context.Context, id string) error
func (*GethWakuWrapper) UnsubscribeFromPubsubTopic ¶ added in v0.174.5
func (w *GethWakuWrapper) UnsubscribeFromPubsubTopic(topic string) error
func (*GethWakuWrapper) UnsubscribeMany ¶ added in v0.174.5
func (w *GethWakuWrapper) UnsubscribeMany(ids []string) error
func (*GethWakuWrapper) Version ¶ added in v0.174.5
func (w *GethWakuWrapper) Version() uint