github.com/status-im/status-go@v1.1.0/protocol/transport/filter.go (about) 1 package transport 2 3 import "github.com/status-im/status-go/eth-node/types" 4 5 // TODO: revise fields encoding/decoding. Some are encoded using hexutil and some using encoding/hex. 6 type Filter struct { 7 // ChatID is the identifier of the chat 8 ChatID string `json:"chatId"` 9 // FilterID the whisper filter id generated 10 FilterID string `json:"filterId"` 11 // SymKeyID is the symmetric key id used for symmetric filters 12 SymKeyID string `json:"symKeyId"` 13 // OneToOne tells us if we need to use asymmetric encryption for this chat 14 OneToOne bool `json:"oneToOne"` 15 // Identity is the public key of the other recipient for non-public filters. 16 // It's encoded using encoding/hex. 17 Identity string `json:"identity"` 18 // PubsubTopic is the waku2 pubsub topic 19 PubsubTopic string `json:"pubsubTopic"` 20 // ContentTopic is the waku topic 21 ContentTopic types.TopicType `json:"topic"` 22 // Discovery is whether this is a discovery topic 23 Discovery bool `json:"discovery"` 24 // Negotiated tells us whether is a negotiated topic 25 Negotiated bool `json:"negotiated"` 26 // Listen is whether we are actually listening for messages on this chat, or the filter is only created in order to be able to post on the topic 27 Listen bool `json:"listen"` 28 // Ephemeral indicates that this is an ephemeral filter 29 Ephemeral bool `json:"ephemeral"` 30 // Priority 31 Priority uint64 32 } 33 34 func (c *Filter) IsPublic() bool { 35 return !c.OneToOne 36 }