aboutsummaryrefslogtreecommitdiffstats
path: root/whisper/filter.go
diff options
context:
space:
mode:
Diffstat (limited to 'whisper/filter.go')
-rw-r--r--whisper/filter.go11
1 files changed, 7 insertions, 4 deletions
diff --git a/whisper/filter.go b/whisper/filter.go
index b33f2c1a2..8fcc45afd 100644
--- a/whisper/filter.go
+++ b/whisper/filter.go
@@ -1,10 +1,13 @@
+// Contains the message filter for fine grained subscriptions.
+
package whisper
import "crypto/ecdsa"
+// Filter is used to subscribe to specific types of whisper messages.
type Filter struct {
- To *ecdsa.PublicKey
- From *ecdsa.PublicKey
- Topics [][]byte
- Fn func(*Message)
+ To *ecdsa.PublicKey // Recipient of the message
+ From *ecdsa.PublicKey // Sender of the message
+ Topics []Topic // Topics to watch messages on
+ Fn func(*Message) // Handler in case of a match
}