Documentation ¶
Index ¶
- func CreateAuthToken(walletDirPath, validatorWebAddr string) error
- type Config
- type Server
- func (s *Server) BackupAccounts(ctx context.Context, req *pb.BackupAccountsRequest) (*pb.BackupAccountsResponse, error)
- func (s *Server) CreateWallet(ctx context.Context, req *pb.CreateWalletRequest) (*pb.CreateWalletResponse, error)
- func (s *Server) DeleteFeeRecipientByPubkey(ctx context.Context, req *ethpbservice.PubkeyRequest) (*empty.Empty, error)
- func (s *Server) DeleteGasLimit(ctx context.Context, req *ethpbservice.DeleteGasLimitRequest) (*empty.Empty, error)
- func (s *Server) DeleteKeystores(ctx context.Context, req *ethpbservice.DeleteKeystoresRequest) (*ethpbservice.DeleteKeystoresResponse, error)
- func (s *Server) DeleteRemoteKeys(ctx context.Context, req *ethpbservice.DeleteRemoteKeysRequest) (*ethpbservice.DeleteRemoteKeysResponse, error)
- func (s *Server) ExportSlashingProtection(ctx context.Context, _ *empty.Empty) (*pb.ExportSlashingProtectionResponse, error)
- func (s *Server) GetBeaconNodeConnection(ctx context.Context, _ *emptypb.Empty) (*validatorpb.NodeConnectionResponse, error)
- func (s *Server) GetBeaconStatus(ctx context.Context, _ *empty.Empty) (*validatorpb.BeaconStatusResponse, error)
- func (s *Server) GetGasLimit(_ context.Context, req *ethpbservice.PubkeyRequest) (*ethpbservice.GetGasLimitResponse, error)
- func (*Server) GetLogsEndpoints(_ context.Context, _ *emptypb.Empty) (*validatorpb.LogsEndpointResponse, error)
- func (s *Server) GetPeers(ctx context.Context, _ *empty.Empty) (*ethpb.Peers, error)
- func (s *Server) GetValidatorBalances(ctx context.Context, req *ethpb.ListValidatorBalancesRequest) (*ethpb.ValidatorBalances, error)
- func (s *Server) GetValidatorParticipation(ctx context.Context, req *ethpb.GetValidatorParticipationRequest) (*ethpb.ValidatorParticipationResponse, error)
- func (s *Server) GetValidatorPerformance(ctx context.Context, req *ethpb.ValidatorPerformanceRequest) (*ethpb.ValidatorPerformanceResponse, error)
- func (s *Server) GetValidatorQueue(ctx context.Context, _ *empty.Empty) (*ethpb.ValidatorQueue, error)
- func (s *Server) GetValidators(ctx context.Context, req *ethpb.ListValidatorsRequest) (*ethpb.Validators, error)
- func (s *Server) GetVersion(ctx context.Context, _ *emptypb.Empty) (*validatorpb.VersionResponse, error)
- func (s *Server) ImportKeystores(ctx context.Context, req *ethpbservice.ImportKeystoresRequest) (*ethpbservice.ImportKeystoresResponse, error)
- func (s *Server) ImportRemoteKeys(ctx context.Context, req *ethpbservice.ImportRemoteKeysRequest) (*ethpbservice.ImportRemoteKeysResponse, error)
- func (s *Server) ImportSlashingProtection(ctx context.Context, req *pb.ImportSlashingProtectionRequest) (*emptypb.Empty, error)
- func (s *Server) Initialize(_ context.Context, _ *emptypb.Empty) (*pb.InitializeAuthResponse, error)
- func (s *Server) JWTInterceptor() grpc.UnaryServerInterceptor
- func (s *Server) ListAccounts(ctx context.Context, req *pb.ListAccountsRequest) (*pb.ListAccountsResponse, error)
- func (s *Server) ListFeeRecipientByPubkey(ctx context.Context, req *ethpbservice.PubkeyRequest) (*ethpbservice.GetFeeRecipientByPubkeyResponse, error)
- func (s *Server) ListKeystores(ctx context.Context, _ *empty.Empty) (*ethpbservice.ListKeystoresResponse, error)
- func (s *Server) ListRemoteKeys(ctx context.Context, _ *empty.Empty) (*ethpbservice.ListRemoteKeysResponse, error)
- func (s *Server) RecoverWallet(ctx context.Context, req *pb.RecoverWalletRequest) (*pb.CreateWalletResponse, error)
- func (s *Server) SetFeeRecipientByPubkey(ctx context.Context, req *ethpbservice.SetFeeRecipientByPubkeyRequest) (*empty.Empty, error)
- func (s *Server) SetGasLimit(ctx context.Context, req *ethpbservice.SetGasLimitRequest) (*empty.Empty, error)
- func (s *Server) Start()
- func (s *Server) Status() error
- func (s *Server) Stop() error
- func (s *Server) StreamBeaconLogs(req *emptypb.Empty, stream validatorpb.Health_StreamBeaconLogsServer) error
- func (s *Server) StreamValidatorLogs(_ *emptypb.Empty, stream validatorpb.Health_StreamValidatorLogsServer) error
- func (*Server) ValidateKeystores(_ context.Context, req *pb.ValidateKeystoresRequest) (*emptypb.Empty, error)
- func (s *Server) VoluntaryExit(ctx context.Context, req *pb.VoluntaryExitRequest) (*pb.VoluntaryExitResponse, error)
- func (s *Server) WalletConfig(_ context.Context, _ *empty.Empty) (*pb.WalletResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAuthToken ¶
CreateAuthToken generates a new jwt key, token and writes them to a file in the specified directory. Also, it logs out a prepared URL for the user to navigate to and authenticate with the Prysm web interface. DEPRECATED: associated to Initialize Web UI API
Types ¶
type Config ¶
type Config struct { ValidatorGatewayHost string ValidatorGatewayPort int ValidatorMonitoringHost string ValidatorMonitoringPort int BeaconClientEndpoint string ClientMaxCallRecvMsgSize int ClientGrpcRetries uint ClientGrpcRetryDelay time.Duration ClientGrpcHeaders []string ClientWithCert string Host string Port string CertFlag string KeyFlag string ValDB db.Database WalletDir string ValidatorService *client.ValidatorService SyncChecker client.SyncChecker GenesisFetcher client.GenesisFetcher WalletInitializedFeed *event.Feed NodeGatewayEndpoint string Wallet *wallet.Wallet }
Config options for the gRPC server.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server defining a gRPC server for the remote signer API.
func (*Server) BackupAccounts ¶
func (s *Server) BackupAccounts( ctx context.Context, req *pb.BackupAccountsRequest, ) (*pb.BackupAccountsResponse, error)
BackupAccounts creates a zip file containing EIP-2335 keystores for the user's specified public keys by encrypting them with the specified password. DEPRECATED: Prysm Web UI and associated endpoints will be fully removed in a future hard fork.
func (*Server) CreateWallet ¶
func (s *Server) CreateWallet(ctx context.Context, req *pb.CreateWalletRequest) (*pb.CreateWalletResponse, error)
CreateWallet via an API request, allowing a user to save a new imported wallet via RPC. DEPRECATE: Prysm Web UI and associated endpoints will be fully removed in a future hard fork.
func (*Server) DeleteFeeRecipientByPubkey ¶
func (s *Server) DeleteFeeRecipientByPubkey(ctx context.Context, req *ethpbservice.PubkeyRequest) (*empty.Empty, error)
DeleteFeeRecipientByPubkey updates the eth address mapped to the public key to the default fee recipient listed
func (*Server) DeleteGasLimit ¶ added in v3.1.0
func (s *Server) DeleteGasLimit(ctx context.Context, req *ethpbservice.DeleteGasLimitRequest) (*empty.Empty, error)
func (*Server) DeleteKeystores ¶
func (s *Server) DeleteKeystores( ctx context.Context, req *ethpbservice.DeleteKeystoresRequest, ) (*ethpbservice.DeleteKeystoresResponse, error)
DeleteKeystores allows for deleting specified public keys from Prysm.
func (*Server) DeleteRemoteKeys ¶
func (s *Server) DeleteRemoteKeys(ctx context.Context, req *ethpbservice.DeleteRemoteKeysRequest) (*ethpbservice.DeleteRemoteKeysResponse, error)
DeleteRemoteKeys deletes a list of public keys defined for web3signer keymanager type.
func (*Server) ExportSlashingProtection ¶
func (s *Server) ExportSlashingProtection(ctx context.Context, _ *empty.Empty) (*pb.ExportSlashingProtectionResponse, error)
ExportSlashingProtection handles the rpc call returning the json slashing history. The format of the export follows the EIP-3076 standard which makes it easy to migrate machines or Ethereum consensus clients.
Steps:
- Call the function which exports the data from the validator's db into an EIP standard slashing protection format.
- Format and send JSON in the response.
DEPRECATED: Prysm Web UI and associated endpoints will be fully removed in a future hard fork. Use the Keymanager APIs if an API is required.
func (*Server) GetBeaconNodeConnection ¶
func (s *Server) GetBeaconNodeConnection(ctx context.Context, _ *emptypb.Empty) (*validatorpb.NodeConnectionResponse, error)
GetBeaconNodeConnection retrieves the current beacon node connection information, as well as its sync status. DEPRECATED: Prysm Web UI and associated endpoints will be fully removed in a future hard fork.
func (*Server) GetBeaconStatus ¶
func (s *Server) GetBeaconStatus(ctx context.Context, _ *empty.Empty) (*validatorpb.BeaconStatusResponse, error)
GetBeaconStatus retrieves information about the beacon node gRPC connection and certain chain metadata, such as the genesis time, the chain head, and the deposit contract address. DEPRECATED: Prysm Web UI and associated endpoints will be fully removed in a future hard fork.
func (*Server) GetGasLimit ¶
func (s *Server) GetGasLimit(_ context.Context, req *ethpbservice.PubkeyRequest) (*ethpbservice.GetGasLimitResponse, error)
func (*Server) GetLogsEndpoints ¶
func (*Server) GetLogsEndpoints(_ context.Context, _ *emptypb.Empty) (*validatorpb.LogsEndpointResponse, error)
GetLogsEndpoints for the beacon and validator client. DEPRECATED: Prysm Web UI and associated endpoints will be fully removed in a future hard fork.
func (*Server) GetPeers ¶
GetPeers is a wrapper around the /eth/v1alpha1 endpoint of the same name. DEPRECATED: Prysm Web UI and associated endpoints will be fully removed in a future hard fork.
func (*Server) GetValidatorBalances ¶
func (s *Server) GetValidatorBalances( ctx context.Context, req *ethpb.ListValidatorBalancesRequest, ) (*ethpb.ValidatorBalances, error)
GetValidatorBalances is a wrapper around the /eth/v1alpha1 endpoint of the same name. DEPRECATED: Prysm Web UI and associated endpoints will be fully removed in a future hard fork.
func (*Server) GetValidatorParticipation ¶
func (s *Server) GetValidatorParticipation( ctx context.Context, req *ethpb.GetValidatorParticipationRequest, ) (*ethpb.ValidatorParticipationResponse, error)
GetValidatorParticipation is a wrapper around the /eth/v1alpha1 endpoint of the same name. DEPRECATED: Prysm Web UI and associated endpoints will be fully removed in a future hard fork.
func (*Server) GetValidatorPerformance ¶
func (s *Server) GetValidatorPerformance( ctx context.Context, req *ethpb.ValidatorPerformanceRequest, ) (*ethpb.ValidatorPerformanceResponse, error)
GetValidatorPerformance is a wrapper around the /eth/v1alpha1 endpoint of the same name. DEPRECATED: Prysm Web UI and associated endpoints will be fully removed in a future hard fork.
func (*Server) GetValidatorQueue ¶
func (s *Server) GetValidatorQueue( ctx context.Context, _ *empty.Empty, ) (*ethpb.ValidatorQueue, error)
GetValidatorQueue is a wrapper around the /eth/v1alpha1 endpoint of the same name. DEPRECATED: Prysm Web UI and associated endpoints will be fully removed in a future hard fork.
func (*Server) GetValidators ¶
func (s *Server) GetValidators( ctx context.Context, req *ethpb.ListValidatorsRequest, ) (*ethpb.Validators, error)
GetValidators is a wrapper around the /eth/v1alpha1 endpoint of the same name. DEPRECATED: Prysm Web UI and associated endpoints will be fully removed in a future hard fork.
func (*Server) GetVersion ¶
func (s *Server) GetVersion(ctx context.Context, _ *emptypb.Empty) (*validatorpb.VersionResponse, error)
GetVersion -- DEPRECATED: Prysm Web UI and associated endpoints will be fully removed in a future hard fork.
func (*Server) ImportKeystores ¶
func (s *Server) ImportKeystores( ctx context.Context, req *ethpbservice.ImportKeystoresRequest, ) (*ethpbservice.ImportKeystoresResponse, error)
ImportKeystores allows for importing keystores into Prysm with their slashing protection history.
func (*Server) ImportRemoteKeys ¶
func (s *Server) ImportRemoteKeys(ctx context.Context, req *ethpbservice.ImportRemoteKeysRequest) (*ethpbservice.ImportRemoteKeysResponse, error)
ImportRemoteKeys imports a list of public keys defined for web3signer keymanager type.
func (*Server) ImportSlashingProtection ¶
func (s *Server) ImportSlashingProtection(ctx context.Context, req *pb.ImportSlashingProtectionRequest) (*emptypb.Empty, error)
ImportSlashingProtection reads an input slashing protection EIP-3076 standard JSON string and inserts the data into validator DB.
Read the JSON string passed through rpc, then call the func which actually imports the data from the JSON file into our database. Use the Keymanager APIs if an API is required. DEPRECATED: Prysm Web UI and associated endpoints will be fully removed in a future hard fork.
func (*Server) Initialize ¶
func (s *Server) Initialize(_ context.Context, _ *emptypb.Empty) (*pb.InitializeAuthResponse, error)
Initialize returns metadata regarding whether the caller has authenticated and has a wallet. DEPRECATED: Prysm Web UI and associated endpoints will be fully removed in a future hard fork. Web APIs won't require JWT in the future. Still used by Keymanager API until web ui is fully removed.
func (*Server) JWTInterceptor ¶
func (s *Server) JWTInterceptor() grpc.UnaryServerInterceptor
JWTInterceptor is a gRPC unary interceptor to authorize incoming requests.
func (*Server) ListAccounts ¶
func (s *Server) ListAccounts(ctx context.Context, req *pb.ListAccountsRequest) (*pb.ListAccountsResponse, error)
ListAccounts allows retrieval of validating keys and their petnames for a user's wallet via RPC. DEPRECATED: Prysm Web UI and associated endpoints will be fully removed in a future hard fork.
func (*Server) ListFeeRecipientByPubkey ¶
func (s *Server) ListFeeRecipientByPubkey(ctx context.Context, req *ethpbservice.PubkeyRequest) (*ethpbservice.GetFeeRecipientByPubkeyResponse, error)
ListFeeRecipientByPubkey returns the public key to eth address mapping object to the end user.
func (*Server) ListKeystores ¶
func (s *Server) ListKeystores( ctx context.Context, _ *empty.Empty, ) (*ethpbservice.ListKeystoresResponse, error)
ListKeystores implements the standard validator key management API.
func (*Server) ListRemoteKeys ¶
func (s *Server) ListRemoteKeys(ctx context.Context, _ *empty.Empty) (*ethpbservice.ListRemoteKeysResponse, error)
ListRemoteKeys returns a list of all public keys defined for web3signer keymanager type.
func (*Server) RecoverWallet ¶
func (s *Server) RecoverWallet(ctx context.Context, req *pb.RecoverWalletRequest) (*pb.CreateWalletResponse, error)
RecoverWallet via an API request, allowing a user to recover a derived. Generate the seed from the mnemonic + language + 25th passphrase(optional). Create N validator keystores from the seed specified by req.NumAccounts. Set the wallet password to req.WalletPassword, then create the wallet from the provided Mnemonic and return CreateWalletResponse. DEPRECATE: Prysm Web UI and associated endpoints will be fully removed in a future hard fork.
func (*Server) SetFeeRecipientByPubkey ¶
func (s *Server) SetFeeRecipientByPubkey(ctx context.Context, req *ethpbservice.SetFeeRecipientByPubkeyRequest) (*empty.Empty, error)
SetFeeRecipientByPubkey updates the eth address mapped to the public key.
func (*Server) SetGasLimit ¶
func (s *Server) SetGasLimit(ctx context.Context, req *ethpbservice.SetGasLimitRequest) (*empty.Empty, error)
SetGasLimit updates GasLimt of the public key.
func (*Server) StreamBeaconLogs ¶
func (s *Server) StreamBeaconLogs(req *emptypb.Empty, stream validatorpb.Health_StreamBeaconLogsServer) error
StreamBeaconLogs from the beacon node via a gRPC server-side stream. DEPRECATED: Prysm Web UI and associated endpoints will be fully removed in a future hard fork.
func (*Server) StreamValidatorLogs ¶
func (s *Server) StreamValidatorLogs(_ *emptypb.Empty, stream validatorpb.Health_StreamValidatorLogsServer) error
StreamValidatorLogs from the validator client via a gRPC server-side stream. DEPRECATED: Prysm Web UI and associated endpoints will be fully removed in a future hard fork.
func (*Server) ValidateKeystores ¶
func (*Server) ValidateKeystores( _ context.Context, req *pb.ValidateKeystoresRequest, ) (*emptypb.Empty, error)
ValidateKeystores checks whether a set of EIP-2335 keystores in the request can indeed be decrypted using a password in the request. If there is no issue, we return an empty response with no error. If the password is incorrect for a single keystore, we return an appropriate error. DEPRECATE: Prysm Web UI and associated endpoints will be fully removed in a future hard fork.
func (*Server) VoluntaryExit ¶
func (s *Server) VoluntaryExit( ctx context.Context, req *pb.VoluntaryExitRequest, ) (*pb.VoluntaryExitResponse, error)
VoluntaryExit performs a voluntary exit for the validator keys specified in a request. DEPRECATE: Prysm Web UI and associated endpoints will be fully removed in a future hard fork. There is a similar endpoint that is still used /eth/v1alpha1/validator/exit.
func (*Server) WalletConfig ¶
WalletConfig returns the wallet's configuration. If no wallet exists, we return an empty response. DEPRECATE: Prysm Web UI and associated endpoints will be fully removed in a future hard fork.