github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/tm2/pkg/bft/privval/messages.go (about)

     1  package privval
     2  
     3  import (
     4  	"github.com/gnolang/gno/tm2/pkg/bft/types"
     5  	"github.com/gnolang/gno/tm2/pkg/crypto"
     6  )
     7  
     8  // SignerMessage is sent between Signer Clients and Servers.
     9  type SignerMessage interface{}
    10  
    11  // TODO: Add ChainIDRequest
    12  
    13  // PubKeyRequest requests the consensus public key from the remote signer.
    14  type PubKeyRequest struct{}
    15  
    16  // PubKeyResponse is a response message containing the public key.
    17  type PubKeyResponse struct {
    18  	PubKey crypto.PubKey
    19  	Error  *RemoteSignerError
    20  }
    21  
    22  // SignVoteRequest is a request to sign a vote
    23  type SignVoteRequest struct {
    24  	Vote *types.Vote
    25  }
    26  
    27  // SignedVoteResponse is a response containing a signed vote or an error
    28  type SignedVoteResponse struct {
    29  	Vote  *types.Vote
    30  	Error *RemoteSignerError
    31  }
    32  
    33  // SignProposalRequest is a request to sign a proposal
    34  type SignProposalRequest struct {
    35  	Proposal *types.Proposal
    36  }
    37  
    38  // SignedProposalResponse is response containing a signed proposal or an error
    39  type SignedProposalResponse struct {
    40  	Proposal *types.Proposal
    41  	Error    *RemoteSignerError
    42  }
    43  
    44  // PingRequest is a request to confirm that the connection is alive.
    45  type PingRequest struct{}
    46  
    47  // PingResponse is a response to confirm that the connection is alive.
    48  type PingResponse struct{}