Documentation ¶
Index ¶
- func CreateAuthToken(walletDirPath, validatorWebAddr string) error
- type Config
- type DeleteKeystoresRequest
- type DeleteKeystoresResponse
- type DeleteRemoteKeysRequest
- type FeeRecipient
- type GasLimitMetaData
- type GetFeeRecipientByPubkeyResponse
- type GetGasLimitResponse
- type ImportKeystoresRequest
- type ImportKeystoresResponse
- type ImportRemoteKeysRequest
- type Keystore
- type ListKeystoresResponse
- type ListRemoteKeysResponse
- type RemoteKey
- type RemoteKeysResponse
- 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(w http.ResponseWriter, r *http.Request)
- func (s *Server) DeleteGasLimit(w http.ResponseWriter, r *http.Request)
- func (s *Server) DeleteKeystores(w http.ResponseWriter, r *http.Request)
- func (s *Server) DeleteRemoteKeys(w http.ResponseWriter, r *http.Request)
- func (s *Server) ExportSlashingProtection(ctx context.Context, _ *empty.Empty) (*pb.ExportSlashingProtectionResponse, error)
- func (s *Server) GetBeaconStatus(ctx context.Context, _ *empty.Empty) (*validatorpb.BeaconStatusResponse, error)
- func (s *Server) GetGasLimit(w http.ResponseWriter, r *http.Request)
- 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(w http.ResponseWriter, r *http.Request)
- func (s *Server) ImportKeystores(w http.ResponseWriter, r *http.Request)
- func (s *Server) ImportRemoteKeys(w http.ResponseWriter, r *http.Request)
- 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) InitializeRoutes() error
- func (s *Server) JWTInterceptor() grpc.UnaryServerInterceptor
- func (s *Server) ListAccounts(ctx context.Context, req *pb.ListAccountsRequest) (*pb.ListAccountsResponse, error)
- func (s *Server) ListFeeRecipientByPubkey(w http.ResponseWriter, r *http.Request)
- func (s *Server) ListKeystores(w http.ResponseWriter, r *http.Request)
- func (s *Server) ListRemoteKeys(w http.ResponseWriter, r *http.Request)
- func (s *Server) RecoverWallet(ctx context.Context, req *pb.RecoverWalletRequest) (*pb.CreateWalletResponse, error)
- func (s *Server) SetFeeRecipientByPubkey(w http.ResponseWriter, r *http.Request)
- func (s *Server) SetGasLimit(w http.ResponseWriter, r *http.Request)
- func (s *Server) SetVoluntaryExit(w http.ResponseWriter, r *http.Request)
- func (s *Server) Start()
- func (s *Server) Status() error
- func (s *Server) Stop() error
- func (s *Server) StreamBeaconLogs(w http.ResponseWriter, r *http.Request)
- func (s *Server) StreamValidatorLogs(w http.ResponseWriter, r *http.Request)
- 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)
- type SetFeeRecipientByPubkeyRequest
- type SetGasLimitRequest
- type SetVoluntaryExitResponse
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 Router *mux.Router Wallet *wallet.Wallet }
Config options for the gRPC server.
type DeleteKeystoresRequest ¶
type DeleteKeystoresRequest struct {
Pubkeys []string `json:"pubkeys"`
}
type DeleteKeystoresResponse ¶
type DeleteKeystoresResponse struct { Data []*keymanager.KeyStatus `json:"data"` SlashingProtection string `json:"slashing_protection"` }
type DeleteRemoteKeysRequest ¶
type DeleteRemoteKeysRequest struct {
Pubkeys []string `json:"pubkeys"`
}
type FeeRecipient ¶
Fee Recipient keymanager api
type GasLimitMetaData ¶
gas limit keymanager api
type GetFeeRecipientByPubkeyResponse ¶
type GetFeeRecipientByPubkeyResponse struct {
Data *FeeRecipient `json:"data"`
}
type GetGasLimitResponse ¶
type GetGasLimitResponse struct {
Data *GasLimitMetaData `json:"data"`
}
type ImportKeystoresRequest ¶
type ImportKeystoresResponse ¶
type ImportKeystoresResponse struct {
Data []*keymanager.KeyStatus `json:"data"`
}
type ImportRemoteKeysRequest ¶
type ImportRemoteKeysRequest struct {
RemoteKeys []*RemoteKey `json:"remote_keys"`
}
type ListKeystoresResponse ¶
type ListKeystoresResponse struct {
Data []*Keystore `json:"data"`
}
local keymanager api
type ListRemoteKeysResponse ¶
type ListRemoteKeysResponse struct {
Data []*RemoteKey `json:"data"`
}
remote keymanager api
type RemoteKeysResponse ¶
type RemoteKeysResponse struct {
Data []*keymanager.KeyStatus `json:"data"`
}
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(w http.ResponseWriter, r *http.Request)
DeleteFeeRecipientByPubkey updates the eth address mapped to the public key to the default fee recipient listed
func (*Server) DeleteGasLimit ¶
func (s *Server) DeleteGasLimit(w http.ResponseWriter, r *http.Request)
DeleteGasLimit deletes the gas limit by public key
func (*Server) DeleteKeystores ¶
func (s *Server) DeleteKeystores(w http.ResponseWriter, r *http.Request)
DeleteKeystores allows for deleting specified public keys from Prysm.
func (*Server) DeleteRemoteKeys ¶
func (s *Server) DeleteRemoteKeys(w http.ResponseWriter, r *http.Request)
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) 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(w http.ResponseWriter, r *http.Request)
GetGasLimit returns the gas limit measured in gwei defined for the custom mev builder by public key
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(w http.ResponseWriter, r *http.Request)
GetVersion returns the beacon node and validator client versions
func (*Server) ImportKeystores ¶
func (s *Server) ImportKeystores(w http.ResponseWriter, r *http.Request)
ImportKeystores allows for importing keystores into Prysm with their slashing protection history.
func (*Server) ImportRemoteKeys ¶
func (s *Server) ImportRemoteKeys(w http.ResponseWriter, r *http.Request)
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) InitializeRoutes ¶
InitializeRoutes initializes pure HTTP REST endpoints for the validator client. needs to be called before the Serve function
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(w http.ResponseWriter, r *http.Request)
ListFeeRecipientByPubkey returns the public key to eth address mapping object to the end user.
func (*Server) ListKeystores ¶
func (s *Server) ListKeystores(w http.ResponseWriter, r *http.Request)
ListKeystores implements the standard validator key management API.
func (*Server) ListRemoteKeys ¶
func (s *Server) ListRemoteKeys(w http.ResponseWriter, r *http.Request)
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(w http.ResponseWriter, r *http.Request)
SetFeeRecipientByPubkey updates the eth address mapped to the public key.
func (*Server) SetGasLimit ¶
func (s *Server) SetGasLimit(w http.ResponseWriter, r *http.Request)
SetGasLimit updates the gas limit by public key
func (*Server) SetVoluntaryExit ¶
func (s *Server) SetVoluntaryExit(w http.ResponseWriter, r *http.Request)
SetVoluntaryExit creates a signed voluntary exit message and returns a VoluntaryExit object.
func (*Server) StreamBeaconLogs ¶
func (s *Server) StreamBeaconLogs(w http.ResponseWriter, r *http.Request)
StreamBeaconLogs from the beacon node via server-side events.
func (*Server) StreamValidatorLogs ¶
func (s *Server) StreamValidatorLogs(w http.ResponseWriter, r *http.Request)
StreamValidatorLogs from the validator client via server-side events.
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.
type SetFeeRecipientByPubkeyRequest ¶
type SetFeeRecipientByPubkeyRequest struct {
Ethaddress string `json:"ethaddress"`
}
type SetGasLimitRequest ¶
type SetGasLimitRequest struct {
GasLimit string `json:"gas_limit"`
}
type SetVoluntaryExitResponse ¶
type SetVoluntaryExitResponse struct {
Data *shared.SignedVoluntaryExit `json:"data"`
}
voluntary exit keymanager api