Adam Babik dbaf622e12
Refactor messaging (#1510)
This change flattens messaging/chat package. It also removes dependency between multidevice and chat/protobuf packages.

The Publisher interface was also changed a bit to support more native types.

Version got bumped to 0.29.0-beta.3.
2019-07-03 21:13:11 +02:00

25 lines
718 B
Go

// 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 shhext
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
Chat string
Payload hexutil.Bytes
PubKey hexutil.Bytes
DH bool
}