github.com/evdatsion/aphelion-dpos-bft@v0.32.1/privval/messages.go (about) 1 package privval 2 3 import ( 4 amino "github.com/evdatsion/go-amino" 5 "github.com/evdatsion/aphelion-dpos-bft/crypto" 6 "github.com/evdatsion/aphelion-dpos-bft/types" 7 ) 8 9 // RemoteSignerMsg is sent between SignerServiceEndpoint and the SignerServiceEndpoint client. 10 type RemoteSignerMsg interface{} 11 12 func RegisterRemoteSignerMsg(cdc *amino.Codec) { 13 cdc.RegisterInterface((*RemoteSignerMsg)(nil), nil) 14 cdc.RegisterConcrete(&PubKeyRequest{}, "tendermint/remotesigner/PubKeyRequest", nil) 15 cdc.RegisterConcrete(&PubKeyResponse{}, "tendermint/remotesigner/PubKeyResponse", nil) 16 cdc.RegisterConcrete(&SignVoteRequest{}, "tendermint/remotesigner/SignVoteRequest", nil) 17 cdc.RegisterConcrete(&SignedVoteResponse{}, "tendermint/remotesigner/SignedVoteResponse", nil) 18 cdc.RegisterConcrete(&SignProposalRequest{}, "tendermint/remotesigner/SignProposalRequest", nil) 19 cdc.RegisterConcrete(&SignedProposalResponse{}, "tendermint/remotesigner/SignedProposalResponse", nil) 20 cdc.RegisterConcrete(&PingRequest{}, "tendermint/remotesigner/PingRequest", nil) 21 cdc.RegisterConcrete(&PingResponse{}, "tendermint/remotesigner/PingResponse", nil) 22 } 23 24 // PubKeyRequest requests the consensus public key from the remote signer. 25 type PubKeyRequest struct{} 26 27 // PubKeyResponse is a PrivValidatorSocket message containing the public key. 28 type PubKeyResponse struct { 29 PubKey crypto.PubKey 30 Error *RemoteSignerError 31 } 32 33 // SignVoteRequest is a PrivValidatorSocket message containing a vote. 34 type SignVoteRequest struct { 35 Vote *types.Vote 36 } 37 38 // SignedVoteResponse is a PrivValidatorSocket message containing a signed vote along with a potenial error message. 39 type SignedVoteResponse struct { 40 Vote *types.Vote 41 Error *RemoteSignerError 42 } 43 44 // SignProposalRequest is a PrivValidatorSocket message containing a Proposal. 45 type SignProposalRequest struct { 46 Proposal *types.Proposal 47 } 48 49 // SignedProposalResponse is a PrivValidatorSocket message containing a proposal response 50 type SignedProposalResponse struct { 51 Proposal *types.Proposal 52 Error *RemoteSignerError 53 } 54 55 // PingRequest is a PrivValidatorSocket message to keep the connection alive. 56 type PingRequest struct { 57 } 58 59 // PingRequest is a PrivValidatorSocket response to keep the connection alive. 60 type PingResponse struct { 61 }