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) ExtractIntoValidator(ctx context.Context, quorumHash crypto.QuorumHash) *types.Validator
- func (sc *SignerClient) GetFirstQuorumHash(_ctx context.Context) (crypto.QuorumHash, error)
- func (sc *SignerClient) GetHeight(_ctx context.Context, quorumHash crypto.QuorumHash) (int64, error)
- func (sc *SignerClient) GetPrivateKey(_ctx context.Context, _quorumHash crypto.QuorumHash) (crypto.PrivKey, error)
- func (sc *SignerClient) GetProTxHash(ctx context.Context) (crypto.ProTxHash, error)
- func (sc *SignerClient) GetPubKey(ctx context.Context, quorumHash crypto.QuorumHash) (crypto.PubKey, error)
- func (sc *SignerClient) GetThresholdPublicKey(ctx context.Context, quorumHash crypto.QuorumHash) (crypto.PubKey, error)
- func (sc *SignerClient) SignProposal(ctx context.Context, chainID string, quorumType btcjson.LLMQType, ...) (tmbytes.HexBytes, error)
- func (sc *SignerClient) SignVote(ctx context.Context, _chainID string, quorumType btcjson.LLMQType, ...) error
- func (sc *SignerClient) UpdatePrivateKey(_ctx context.Context, _privateKey crypto.PrivKey, ...)
- type SignerServer
- func (ss *SignerServer) GetProTxHash(ctx context.Context, _req *privvalproto.ProTxHashRequest) (*privvalproto.ProTxHashResponse, error)
- func (ss *SignerServer) GetPubKey(ctx context.Context, req *privvalproto.PubKeyRequest) (*privvalproto.PubKeyResponse, error)
- func (ss *SignerServer) GetThresholdPubKey(ctx context.Context, req *privvalproto.ThresholdPubKeyRequest) (*privvalproto.ThresholdPubKeyResponse, 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) ExtractIntoValidator ¶
func (sc *SignerClient) ExtractIntoValidator(ctx context.Context, quorumHash crypto.QuorumHash) *types.Validator
func (*SignerClient) GetFirstQuorumHash ¶
func (sc *SignerClient) GetFirstQuorumHash(_ctx context.Context) (crypto.QuorumHash, error)
func (*SignerClient) GetHeight ¶
func (sc *SignerClient) GetHeight(_ctx context.Context, quorumHash crypto.QuorumHash) (int64, error)
func (*SignerClient) GetPrivateKey ¶
func (sc *SignerClient) GetPrivateKey(_ctx context.Context, _quorumHash crypto.QuorumHash) (crypto.PrivKey, error)
func (*SignerClient) GetProTxHash ¶
func (*SignerClient) GetPubKey ¶
func (sc *SignerClient) GetPubKey(ctx context.Context, quorumHash crypto.QuorumHash) (crypto.PubKey, error)
GetPubKey retrieves a public key from a remote signer returns an error if client is not able to provide the key
func (*SignerClient) GetThresholdPublicKey ¶
func (sc *SignerClient) GetThresholdPublicKey(ctx context.Context, quorumHash crypto.QuorumHash) (crypto.PubKey, error)
func (*SignerClient) SignProposal ¶
func (sc *SignerClient) SignProposal( ctx context.Context, chainID string, quorumType btcjson.LLMQType, quorumHash crypto.QuorumHash, proposal *tmproto.Proposal, ) (tmbytes.HexBytes, error)
SignProposal requests a remote signer to sign a proposal
func (*SignerClient) SignVote ¶
func (sc *SignerClient) SignVote( ctx context.Context, _chainID string, quorumType btcjson.LLMQType, quorumHash crypto.QuorumHash, vote *tmproto.Vote, _logger log.Logger) error
SignVote requests a remote signer to sign a vote
func (*SignerClient) UpdatePrivateKey ¶
func (sc *SignerClient) UpdatePrivateKey( _ctx context.Context, _privateKey crypto.PrivKey, _quorumHash crypto.QuorumHash, _thresholdPublicKey crypto.PubKey, _height int64, )
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) GetProTxHash ¶
func (ss *SignerServer) GetProTxHash(ctx context.Context, _req *privvalproto.ProTxHashRequest) ( *privvalproto.ProTxHashResponse, error)
GetProTxHash receives a request for the proTxHash returns the proTxHash on success and error on failure
func (*SignerServer) GetPubKey ¶
func (ss *SignerServer) GetPubKey(ctx context.Context, req *privvalproto.PubKeyRequest) ( *privvalproto.PubKeyResponse, error)
GetPubKey receives a request for the pubkey returns the pubkey on success and error on failure
func (*SignerServer) GetThresholdPubKey ¶
func (ss *SignerServer) GetThresholdPubKey(ctx context.Context, req *privvalproto.ThresholdPubKeyRequest) ( *privvalproto.ThresholdPubKeyResponse, error)
GetThresholdPubKey receives a request for the threshold 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