ceremonyclient/node/p2p/pubsub.go

23 lines
692 B
Go
Raw Normal View History

2023-09-03 23:47:09 +00:00
package p2p
import (
"source.quilibrium.com/quilibrium/monorepo/go-libp2p-blossomsub/pb"
"source.quilibrium.com/quilibrium/monorepo/node/protobufs"
2023-09-03 23:47:09 +00:00
)
type PubSub interface {
PublishToBitmask(bitmask []byte, data []byte) error
2024-08-08 05:41:46 +00:00
Publish(address []byte, data []byte) error
Subscribe(bitmask []byte, handler func(message *pb.Message) error) error
2023-09-03 23:47:09 +00:00
Unsubscribe(bitmask []byte, raw bool)
GetPeerID() []byte
2023-09-25 02:43:35 +00:00
GetBitmaskPeers() map[string][]string
2023-09-10 23:29:17 +00:00
GetPeerstoreCount() int
GetNetworkPeersCount() int
GetNetworkInfo() *protobufs.NetworkInfoResponse
2023-11-01 03:45:20 +00:00
SignMessage(msg []byte) ([]byte, error)
GetPublicKey() []byte
GetPeerScore(peerId []byte) int64
SetPeerScore(peerId []byte, score int64)
2023-09-03 23:47:09 +00:00
}