2019-07-17 22:25:42 +00:00
|
|
|
package whisper
|
|
|
|
|
|
|
|
import (
|
2019-11-23 17:57:05 +00:00
|
|
|
"github.com/status-im/status-go/eth-node/types"
|
2019-07-17 22:25:42 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type RequestOptions struct {
|
2019-11-23 17:57:05 +00:00
|
|
|
Topics []types.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-11-23 17:57:05 +00:00
|
|
|
func DefaultWhisperMessage() types.NewMessage {
|
|
|
|
msg := types.NewMessage{}
|
2019-07-17 22:25:42 +00:00
|
|
|
|
|
|
|
msg.TTL = 10
|
|
|
|
msg.PowTarget = 0.002
|
|
|
|
msg.PowTime = defaultPowTime
|
|
|
|
|
|
|
|
return msg
|
|
|
|
}
|