2015-04-14 10:24:43 +00:00
|
|
|
// Contains the message filter for fine grained subscriptions.
|
|
|
|
|
2014-12-12 21:23:42 +00:00
|
|
|
package whisper
|
|
|
|
|
|
|
|
import "crypto/ecdsa"
|
|
|
|
|
2015-04-14 10:24:43 +00:00
|
|
|
// Filter is used to subscribe to specific types of whisper messages.
|
2014-12-12 21:23:42 +00:00
|
|
|
type Filter struct {
|
2015-04-14 10:24:43 +00:00
|
|
|
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
|
2014-12-12 21:23:42 +00:00
|
|
|
}
|