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