2019-07-17 22:25:42 +00:00
|
|
|
package whisper
|
|
|
|
|
|
|
|
import (
|
2019-11-21 16:19:22 +00:00
|
|
|
whispertypes "github.com/status-im/status-go/protocol/transport/whisper/types"
|
2019-07-17 22:25:42 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type RequestOptions struct {
|
2019-10-09 14:22:53 +00:00
|
|
|
Topics []whispertypes.TopicType
|
2019-07-17 22:25:42 +00:00
|
|
|
Password string
|
|
|
|
Limit int
|
|
|
|
From int64 // in seconds
|
|
|
|
To int64 // in seconds
|
|
|
|
}
|
|
|
|
|
|
|
|
const (
|
|
|
|
defaultPowTime = 1
|
|
|
|
)
|
|
|
|
|
2019-10-09 14:22:53 +00:00
|
|
|
func DefaultWhisperMessage() whispertypes.NewMessage {
|
|
|
|
msg := whispertypes.NewMessage{}
|
2019-07-17 22:25:42 +00:00
|
|
|
|
|
|
|
msg.TTL = 10
|
|
|
|
msg.PowTarget = 0.002
|
|
|
|
msg.PowTime = defaultPowTime
|
|
|
|
|
|
|
|
return msg
|
|
|
|
}
|