mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 04:47:18 +00:00
760d2fcfbc
* This PR is for issue #11155 "Keymanager APIs: get_limit api". This PR implements the first task "get gas limit for the validator key". * Removed useless import alias. * Added regenerated key_management.pb.go/pb.gw.go files as well as endpoint_factory.go changes. * Address James's comments: 1. api path component should be "gas_limit" instead of "gaslimit". 2. ran curl test like: - go build -o tmp/validator - ./tmp/validator --web --validators-external-signer-url=http://localhost:9000/ - curl -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.e30.C-BuVfWhKpr9elB05GTJdEEx_8AzkImxzXL03IqcHR8" 127.0.0.1:7500/eth/v1/validator/0xb4844195ce8ca78d9d4f7ffdf4001cfdb079e059542bcc4f45ddfff2bcec7defb1482db4f9426f92f59972da395dd2b5/gas_limit - {"data":{"pubkey":"0xb4844195ce8ca78d9d4f7ffdf4001cfdb079e059542bcc4f45ddfff2bcec7defb1482db4f9426f92f59972da395dd2b5","gas_limit":"30000000"}} Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com>
91 lines
2.1 KiB
Go
91 lines
2.1 KiB
Go
package apimiddleware
|
|
|
|
type listKeystoresResponseJson struct {
|
|
Keystores []*keystoreJson `json:"data"`
|
|
}
|
|
|
|
type keystoreJson struct {
|
|
ValidatingPubkey string `json:"validating_pubkey" hex:"true"`
|
|
DerivationPath string `json:"derivation_path"`
|
|
}
|
|
|
|
type importKeystoresRequestJson struct {
|
|
Keystores []string `json:"keystores"`
|
|
Passwords []string `json:"passwords"`
|
|
SlashingProtection string `json:"slashing_protection"`
|
|
}
|
|
|
|
type importKeystoresResponseJson struct {
|
|
Statuses []*statusJson `json:"data"`
|
|
}
|
|
|
|
type deleteKeystoresRequestJson struct {
|
|
PublicKeys []string `json:"pubkeys" hex:"true"`
|
|
}
|
|
|
|
type statusJson struct {
|
|
Status string `json:"status"`
|
|
Message string `json:"message"`
|
|
}
|
|
|
|
type deleteKeystoresResponseJson struct {
|
|
Statuses []*statusJson `json:"data"`
|
|
SlashingProtection string `json:"slashing_protection"`
|
|
}
|
|
|
|
//remote keymanager api
|
|
|
|
type listRemoteKeysResponseJson struct {
|
|
Keystores []*remoteKeysListJson `json:"data"`
|
|
}
|
|
|
|
type remoteKeysListJson struct {
|
|
Pubkey string `json:"pubkey" hex:"true"`
|
|
Url string `json:"url"`
|
|
Readonly bool `json:"readonly"`
|
|
}
|
|
|
|
type remoteKeysJson struct {
|
|
Pubkey string `json:"pubkey" hex:"true"`
|
|
Url string `json:"url"`
|
|
Readonly bool `json:"readonly"`
|
|
}
|
|
|
|
type importRemoteKeysRequestJson struct {
|
|
Keystores []*remoteKeysJson `json:"remote_keys"`
|
|
}
|
|
|
|
type importRemoteKeysResponseJson struct {
|
|
Statuses []*statusJson `json:"data"`
|
|
}
|
|
|
|
type deleteRemoteKeysRequestJson struct {
|
|
PublicKeys []string `json:"pubkeys" hex:"true"`
|
|
}
|
|
|
|
type deleteRemoteKeysResponseJson struct {
|
|
Statuses []*statusJson `json:"data"`
|
|
}
|
|
|
|
type feeRecipientJson struct {
|
|
Pubkey string `json:"pubkey" hex:"true"`
|
|
Ethaddress string `json:"ethaddress" address:"true"`
|
|
}
|
|
|
|
type gasLimitJson struct {
|
|
Pubkey string `json:"pubkey" hex:"true"`
|
|
GasLimit string `json:"gas_limit"`
|
|
}
|
|
|
|
type getFeeRecipientByPubkeyResponseJson struct {
|
|
Data *feeRecipientJson `json:"data"`
|
|
}
|
|
|
|
type setFeeRecipientByPubkeyRequestJson struct {
|
|
Ethaddress string `json:"ethaddress" hex:"true"`
|
|
}
|
|
|
|
type getGasLimitResponseJson struct {
|
|
Data *gasLimitJson `json:"data"`
|
|
}
|