2018-09-24 18:07:34 +00:00
|
|
|
// TODO: These types should be defined using protobuf, but protoc can only emit []byte instead of hexutil.Bytes,
|
|
|
|
// which causes issues when marshalong to JSON on the react side. Let's do that once the chat protocol is moved to the go repo.
|
|
|
|
|
|
|
|
package chat
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/ethereum/go-ethereum/common/hexutil"
|
|
|
|
)
|
|
|
|
|
|
|
|
// SendPublicMessageRPC represents the RPC payload for the SendPublicMessage RPC method
|
|
|
|
type SendPublicMessageRPC struct {
|
|
|
|
Sig string
|
|
|
|
Chat string
|
|
|
|
Payload hexutil.Bytes
|
|
|
|
}
|
|
|
|
|
|
|
|
// SendDirectMessageRPC represents the RPC payload for the SendDirectMessage RPC method
|
|
|
|
type SendDirectMessageRPC struct {
|
|
|
|
Sig string
|
2018-12-18 15:27:12 +00:00
|
|
|
Chat string
|
2018-09-24 18:07:34 +00:00
|
|
|
Payload hexutil.Bytes
|
|
|
|
PubKey hexutil.Bytes
|
2019-02-12 11:07:13 +00:00
|
|
|
DH bool
|
2018-09-24 18:07:34 +00:00
|
|
|
}
|