Versions in this module Expand all Collapse all v0 v0.32.0 Sep 13, 2023 Changes in this version + var ErrConnectionTimeout = EndpointTimeoutError + var ErrDialRetryMax = errors.New("dialed maximum retries") + var ErrNoConnection = errors.New("endpoint is not connected") + var ErrReadTimeout = errors.New("endpoint read timed out") + var ErrUnexpectedResponse = errors.New("empty response") + var ErrWriteTimeout = errors.New("endpoint write timed out") + func GetFreeLocalhostAddrPort() string + func IsConnTimeout(err error) bool + func RegisterRemoteSignerMsg(cdc *amino.Codec) + type EndpointTimeoutError struct + func (e EndpointTimeoutError) Error() string + func (e EndpointTimeoutError) Temporary() bool + func (e EndpointTimeoutError) Timeout() bool + type FilePV struct + Key FilePVKey + LastSignState FilePVLastSignState + func GenFilePV(keyFilePath, stateFilePath string) *FilePV + func LoadFilePV(keyFilePath, stateFilePath string) *FilePV + func LoadFilePVEmptyState(keyFilePath, stateFilePath string) *FilePV + func LoadOrGenFilePV(keyFilePath, stateFilePath string) *FilePV + func (pv *FilePV) GetAddress() types.Address + func (pv *FilePV) GetPubKey() (crypto.PubKey, error) + func (pv *FilePV) Reset() + func (pv *FilePV) Save() + func (pv *FilePV) SignProposal(chainID string, proposal *types.Proposal) error + func (pv *FilePV) SignVote(chainID string, vote *types.Vote) error + func (pv *FilePV) String() string + type FilePVKey struct + Address types.Address + PrivKey crypto.PrivKey + PubKey crypto.PubKey + func (pvKey FilePVKey) Save() + type FilePVLastSignState struct + Height int64 + Round int + SignBytes tmbytes.HexBytes + Signature []byte + Step int8 + func (lss *FilePVLastSignState) CheckHRS(height int64, round int, step int8) (bool, error) + func (lss *FilePVLastSignState) Save() + type FilePVLean struct + KeyFilepath string + Keys []FilePVKey + LastSignStates []FilePVLastSignState + StateFilepath string + func GenFilePVLean(keyFilePath, stateFilePath string) *FilePVLean + func GenFilePVsLean(keyFilePath, stateFilePath string, numOfKeys uint) *FilePVLean + func LoadFilePVLean(keyFilePath, stateFilePath string) *FilePVLean + func LoadOrGenFilePVLean(keyFilePath, stateFilePath string) *FilePVLean + func (pv *FilePVLean) GetPubKeys() ([]crypto.PubKey, error) + func (pv *FilePVLean) GetPublicKeyIndexFromList(pubKey crypto.PubKey) (int, error) + func (pv *FilePVLean) SaveLastSignState() + func (pv *FilePVLean) SignProposal(chainID string, proposal *types.Proposal, key crypto.PubKey) error + func (pv *FilePVLean) SignVote(chainID string, vote *types.Vote, key crypto.PubKey) error + func (pv *FilePVLean) String() string + type PingRequest struct + type PingResponse struct + type PrivateKeyFile struct + PrivateKey string + type PubKeyRequest struct + type PubKeyResponse struct + Error *RemoteSignerError + PubKey crypto.PubKey + type RemoteSignerError struct + Code int + Description string + func (e *RemoteSignerError) Error() string + type RetrySignerClient struct + func NewRetrySignerClient(sc *SignerClient, retries int, timeout time.Duration) *RetrySignerClient + func (sc *RetrySignerClient) Close() error + func (sc *RetrySignerClient) GetPubKey() (crypto.PubKey, error) + func (sc *RetrySignerClient) IsConnected() bool + func (sc *RetrySignerClient) Ping() error + func (sc *RetrySignerClient) SignProposal(chainID string, proposal *types.Proposal) error + func (sc *RetrySignerClient) SignVote(chainID string, vote *types.Vote) error + func (sc *RetrySignerClient) WaitForConnection(maxWait time.Duration) error + type SignProposalRequest struct + Proposal *types.Proposal + type SignVoteRequest struct + Vote *types.Vote + type SignedProposalResponse struct + Error *RemoteSignerError + Proposal *types.Proposal + type SignedVoteResponse struct + Error *RemoteSignerError + Vote *types.Vote + type SignerClient struct + func NewSignerClient(endpoint *SignerListenerEndpoint) (*SignerClient, error) + func (sc *SignerClient) Close() error + func (sc *SignerClient) GetPubKey() (crypto.PubKey, error) + func (sc *SignerClient) IsConnected() bool + func (sc *SignerClient) Ping() error + func (sc *SignerClient) SignProposal(chainID string, proposal *types.Proposal) error + func (sc *SignerClient) SignVote(chainID string, vote *types.Vote) error + func (sc *SignerClient) WaitForConnection(maxWait time.Duration) error + type SignerDialerEndpoint struct + func NewSignerDialerEndpoint(logger log.Logger, dialer SocketDialer) *SignerDialerEndpoint + func (se *SignerDialerEndpoint) Close() error + func (se *SignerDialerEndpoint) DropConnection() + func (se *SignerDialerEndpoint) GetAvailableConnection(connectionAvailableCh chan net.Conn) bool + func (se *SignerDialerEndpoint) IsConnected() bool + func (se *SignerDialerEndpoint) ReadMessage() (msg SignerMessage, err error) + func (se *SignerDialerEndpoint) SetConnection(newConnection net.Conn) + func (se *SignerDialerEndpoint) WaitConnection(connectionAvailableCh chan net.Conn, maxWait time.Duration) error + func (se *SignerDialerEndpoint) WriteMessage(msg SignerMessage) (err error) + type SignerListenerEndpoint struct + func NewSignerListener(listenAddr string, logger log.Logger) (*SignerListenerEndpoint, error) + func NewSignerListenerEndpoint(logger log.Logger, listener net.Listener) *SignerListenerEndpoint + func (se *SignerListenerEndpoint) Close() error + func (se *SignerListenerEndpoint) DropConnection() + func (se *SignerListenerEndpoint) GetAvailableConnection(connectionAvailableCh chan net.Conn) bool + func (se *SignerListenerEndpoint) IsConnected() bool + func (se *SignerListenerEndpoint) ReadMessage() (msg SignerMessage, err error) + func (se *SignerListenerEndpoint) SetConnection(newConnection net.Conn) + func (se *SignerListenerEndpoint) WaitConnection(connectionAvailableCh chan net.Conn, maxWait time.Duration) error + func (se *SignerListenerEndpoint) WriteMessage(msg SignerMessage) (err error) + func (sl *SignerListenerEndpoint) OnStart() error + func (sl *SignerListenerEndpoint) OnStop() + func (sl *SignerListenerEndpoint) SendRequest(request SignerMessage) (SignerMessage, error) + func (sl *SignerListenerEndpoint) WaitForConnection(maxWait time.Duration) error + type SignerMessage interface + func DefaultValidationRequestHandler(privVal types.PrivValidator, req SignerMessage, chainID string) (SignerMessage, error) + type SignerServer struct + func NewSignerServer(endpoint *SignerDialerEndpoint, chainID string, privVal types.PrivValidator) *SignerServer + func (ss *SignerServer) OnStart() error + func (ss *SignerServer) OnStop() + func (ss *SignerServer) SetRequestHandler(validationRequestHandler ValidationRequestHandlerFunc) + type SignerServiceEndpointOption func(*SignerDialerEndpoint) + func SignerDialerEndpointConnRetries(retries int) SignerServiceEndpointOption + func SignerDialerEndpointRetryWaitInterval(interval time.Duration) SignerServiceEndpointOption + func SignerDialerEndpointTimeoutReadWrite(timeout time.Duration) SignerServiceEndpointOption + type SignerValidatorEndpointOption func(*SignerListenerEndpoint) + type SocketDialer func() (net.Conn, error) + func DialTCPFn(addr string, timeoutReadWrite time.Duration, privKey crypto.PrivKey) SocketDialer + func DialUnixFn(addr string) SocketDialer + type TCPListener struct + func NewTCPListener(ln net.Listener, secretConnKey ed25519.PrivKeyEd25519) *TCPListener + func (ln *TCPListener) Accept() (net.Conn, error) + type TCPListenerOption func(*TCPListener) + func TCPListenerTimeoutAccept(timeout time.Duration) TCPListenerOption + func TCPListenerTimeoutReadWrite(timeout time.Duration) TCPListenerOption + type UnixListener struct + func NewUnixListener(ln net.Listener) *UnixListener + func (ln *UnixListener) Accept() (net.Conn, error) + type UnixListenerOption func(*UnixListener) + func UnixListenerTimeoutAccept(timeout time.Duration) UnixListenerOption + func UnixListenerTimeoutReadWrite(timeout time.Duration) UnixListenerOption + type ValidationRequestHandlerFunc func(privVal types.PrivValidator, requestMessage SignerMessage, chainID string) (SignerMessage, error)