mirror of
https://github.com/status-im/status-go.git
synced 2025-01-09 14:16:21 +00:00
40359f9c1b
* Adding wakunode module * Adding wakuv2 fleet files * Add waku fleets to update-fleet-config script * Adding config items for waku v2 * Conditionally start waku v2 node depending on config * Adapting common code to use go-waku * Setting log level to info * update dependencies * update fleet config to use WakuNodes instead of BootNodes * send and receive messages * use hash returned when publishing a message * add waku store protocol * trigger signal after receiving store messages * exclude linting rule SA1019 to check deprecated packages
27 lines
540 B
Go
27 lines
540 B
Go
package types
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"go.uber.org/zap"
|
|
|
|
enstypes "github.com/status-im/status-go/eth-node/types/ens"
|
|
)
|
|
|
|
// EnodeID is a unique identifier for each node.
|
|
type EnodeID [32]byte
|
|
|
|
// ID prints as a long hexadecimal number.
|
|
func (n EnodeID) String() string {
|
|
return fmt.Sprintf("%x", n[:])
|
|
}
|
|
|
|
type Node interface {
|
|
NewENSVerifier(logger *zap.Logger) enstypes.ENSVerifier
|
|
GetWaku(ctx interface{}) (Waku, error)
|
|
GetWakuV2(ctx interface{}) (Waku, error)
|
|
AddPeer(url string) error
|
|
RemovePeer(url string) error
|
|
PeersCount() int
|
|
}
|