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