mirror of
https://github.com/status-im/status-go.git
synced 2025-02-15 08:17:28 +00:00
- some minor progress to add nwaku in status-go - nwaku.go: GetNumConnectedPeers controls when passed pubsub is empty - waku_test.go: adapt TestWakuV2Store - add missing shard.go - feat_: build nwaku with nix and use build tags to choose between go-waku and nwaku (#5896) - chore_: update nwaku - nwaku bump (#5911) - bump: nwaku - chore: add USE_NWAKU env flag - fix: build libwaku only if needed - feat: testing discovery and dialing with nwaku integration (#5940) - message publisher and sent verifier (#5966) - storenode requestor for missing message retrieval and result iterator impl (#5971) - uncomment code that would allow status-go/go-waku to compile and libwaku test to run (#5986) - supporting peer exchange with nwaku (#5983) - store queries - ping - ping storenodes using AddrInfo (#6004) - dial, drop and retrieve connected peers (#6013) - integrate on-demand DNS discovery and implement discoverAndConnectPeers (#6017) - extract libwaku calls into WakuNode struct (#6027) - async nwaku - remove nwaku process loop - receive messages via relay (#6185) - extract timeout from context - use correct port field, get free ports and uncomment some functions (#6200) - enable filter/lightpush/px and setup rate limits - add protected topics
54 lines
1.4 KiB
Go
54 lines
1.4 KiB
Go
package protocol
|
|
|
|
import (
|
|
"crypto/ecdsa"
|
|
|
|
"github.com/libp2p/go-libp2p/core/peer"
|
|
"github.com/multiformats/go-multiaddr"
|
|
|
|
"github.com/ethereum/go-ethereum/p2p/enode"
|
|
|
|
"github.com/status-im/status-go/eth-node/types"
|
|
)
|
|
|
|
func (m *Messenger) AddRelayPeer(address multiaddr.Multiaddr) (peer.ID, error) {
|
|
return m.transport.AddRelayPeer(address)
|
|
}
|
|
|
|
func (m *Messenger) DialPeer(address multiaddr.Multiaddr) error {
|
|
return m.transport.DialPeer(address)
|
|
}
|
|
|
|
func (m *Messenger) DialPeerByID(peerID peer.ID) error {
|
|
return m.transport.DialPeerByID(peerID)
|
|
}
|
|
|
|
func (m *Messenger) DropPeer(peerID peer.ID) error {
|
|
return m.transport.DropPeer(peerID)
|
|
}
|
|
|
|
func (m *Messenger) Peers() types.PeerStats {
|
|
return m.transport.Peers()
|
|
}
|
|
|
|
func (m *Messenger) RelayPeersByTopic(topic string) (*types.PeerList, error) {
|
|
return m.transport.RelayPeersByTopic(topic)
|
|
}
|
|
|
|
func (m *Messenger) ListenAddresses() ([]multiaddr.Multiaddr, error) {
|
|
return m.transport.ListenAddresses()
|
|
}
|
|
|
|
func (m *Messenger) ENR() (*enode.Node, error) {
|
|
return m.transport.ENR()
|
|
}
|
|
|
|
// Subscribe to a pubsub topic, passing an optional public key if the pubsub topic is protected
|
|
func (m *Messenger) SubscribeToPubsubTopic(topic string, optPublicKey *ecdsa.PublicKey) error {
|
|
return m.transport.SubscribeToPubsubTopic(topic, optPublicKey)
|
|
}
|
|
|
|
func (m *Messenger) StorePubsubTopicKey(topic string, privKey *ecdsa.PrivateKey) error {
|
|
return m.transport.StorePubsubTopicKey(topic, privKey)
|
|
}
|