whisper: general cleanups, documentation

This commit is contained in:
Péter Szilágyi
2015-04-14 13:24:43 +03:00
parent 5205b2f19b
commit 59bff46505
4 changed files with 157 additions and 140 deletions

View File

@ -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 []Topic
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
}