aboutsummaryrefslogtreecommitdiffstats
path: root/whisper/filter.go
blob: 8fcc45afd2b5ca2a33f8e7bbed0136c5bdc4c7d2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
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 // 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
}