Documentation ¶
Index ¶
- func DefaultDialOptions(extraOpts ...grpc.DialOption) []grpc.DialOption
- func GenerateTLS(certPath, keyPath, ca string, log log.Logger) grpc.DialOption
- type SignerClient
- func (sc *SignerClient) Close() error
- func (sc *SignerClient) GetPubKey(ctx context.Context) (crypto.PubKey, error)
- func (sc *SignerClient) SignProposal(ctx context.Context, chainID string, proposal *tmproto.Proposal) error
- func (sc *SignerClient) SignVote(ctx context.Context, chainID string, vote *tmproto.Vote) error
- type SignerServer
- func (ss *SignerServer) GetPubKey(ctx context.Context, req *privvalproto.PubKeyRequest) (*privvalproto.PubKeyResponse, error)
- func (ss *SignerServer) SignProposal(ctx context.Context, req *privvalproto.SignProposalRequest) (*privvalproto.SignedProposalResponse, error)
- func (ss *SignerServer) SignVote(ctx context.Context, req *privvalproto.SignVoteRequest) (*privvalproto.SignedVoteResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultDialOptions ¶
func DefaultDialOptions( extraOpts ...grpc.DialOption, ) []grpc.DialOption
DefaultDialOptions constructs a list of grpc dial options
func GenerateTLS ¶
func GenerateTLS(certPath, keyPath, ca string, log log.Logger) grpc.DialOption
Types ¶
type SignerClient ¶
type SignerClient struct {
// contains filtered or unexported fields
}
SignerClient implements PrivValidator. Handles remote validator connections that provide signing services
func DialRemoteSigner ¶
func DialRemoteSigner( ctx context.Context, cfg *config.PrivValidatorConfig, chainID string, logger log.Logger, usePrometheus bool, ) (*SignerClient, error)
DialRemoteSigner is a generalized function to dial the gRPC server.
func NewSignerClient ¶
func NewSignerClient(conn *grpc.ClientConn, chainID string, log log.Logger) (*SignerClient, error)
NewSignerClient returns an instance of SignerClient. it will start the endpoint (if not already started)
func (*SignerClient) Close ¶
func (sc *SignerClient) Close() error
Close closes the underlying connection
func (*SignerClient) GetPubKey ¶
GetPubKey retrieves a public key from a remote signer returns an error if client is not able to provide the key
func (*SignerClient) SignProposal ¶
func (sc *SignerClient) SignProposal(ctx context.Context, chainID string, proposal *tmproto.Proposal) error
SignProposal requests a remote signer to sign a proposal
type SignerServer ¶
type SignerServer struct {
// contains filtered or unexported fields
}
SignerServer implements PrivValidatorAPIServer 9generated via protobuf services) Handles remote validator connections that provide signing services
func NewSignerServer ¶
func NewSignerServer(logger log.Logger, chainID string, privVal types.PrivValidator) *SignerServer
func (*SignerServer) GetPubKey ¶
func (ss *SignerServer) GetPubKey(ctx context.Context, req *privvalproto.PubKeyRequest) ( *privvalproto.PubKeyResponse, error)
PubKey receives a request for the pubkey returns the pubkey on success and error on failure
func (*SignerServer) SignProposal ¶
func (ss *SignerServer) SignProposal(ctx context.Context, req *privvalproto.SignProposalRequest) (*privvalproto.SignedProposalResponse, error)
SignProposal receives a proposal sign requests, attempts to sign it returns SignedProposalResponse on success and error on failure
func (*SignerServer) SignVote ¶
func (ss *SignerServer) SignVote(ctx context.Context, req *privvalproto.SignVoteRequest) (*privvalproto.SignedVoteResponse, error)
SignVote receives a vote sign requests, attempts to sign it returns SignedVoteResponse on success and error on failure