prysm-pulse/validator/rpc/structs.go
james-prysm 9c938d354d
HTTP Validator API: /eth/v1/validator/{pubkey}/gas_limit (#13082)
* WIP

* more WIP

* fixing unit tests

* gaz

* gofmt

* adding routes

* adding tests for validator routes

* adding in missed comment

* Update validator/rpc/handlers_keymanager.go

Co-authored-by: Sammy Rosso <15244892+saolyn@users.noreply.github.com>

* Update validator/rpc/handlers_keymanager.go

Co-authored-by: Sammy Rosso <15244892+saolyn@users.noreply.github.com>

* Update validator/rpc/handlers_keymanager.go

Co-authored-by: Sammy Rosso <15244892+saolyn@users.noreply.github.com>

* Update validator/rpc/handlers_keymanager.go

Co-authored-by: Sammy Rosso <15244892+saolyn@users.noreply.github.com>

* Update validator/rpc/handlers_keymanager.go

Co-authored-by: Sammy Rosso <15244892+saolyn@users.noreply.github.com>

* Update validator/rpc/handlers_keymanager.go

Co-authored-by: Sammy Rosso <15244892+saolyn@users.noreply.github.com>

* Update validator/rpc/handlers_keymanager.go

Co-authored-by: Sammy Rosso <15244892+saolyn@users.noreply.github.com>

* adding log and removing unneeded type

* fixing casing on tests

* adding more tests

* Update server.go

Co-authored-by: Radosław Kapka <rkapka@wp.pl>

* Update validator/rpc/handlers_keymanager.go

Co-authored-by: Radosław Kapka <rkapka@wp.pl>

* addressing radek's comments

* handling error

* fixing naming on validator struct for mock

---------

Co-authored-by: Sammy Rosso <15244892+saolyn@users.noreply.github.com>
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
2023-10-23 15:49:28 +00:00

47 lines
953 B
Go

package rpc
import (
"github.com/prysmaticlabs/prysm/v4/beacon-chain/rpc/eth/shared"
"github.com/prysmaticlabs/prysm/v4/validator/keymanager"
)
type SetVoluntaryExitResponse struct {
Data *shared.SignedVoluntaryExit `json:"data"`
}
type GasLimitMetaData struct {
Pubkey string `json:"pubkey"`
GasLimit string `json:"gas_limit"`
}
type GetGasLimitResponse struct {
Data *GasLimitMetaData `json:"data"`
}
type SetGasLimitRequest struct {
GasLimit string `json:"gas_limit"`
}
// remote keymanager api
type ListRemoteKeysResponse struct {
Data []*RemoteKey `json:"data"`
}
type RemoteKey struct {
Pubkey string `json:"pubkey"`
Url string `json:"url"`
Readonly bool `json:"readonly"`
}
type ImportRemoteKeysRequest struct {
RemoteKeys []*RemoteKey `json:"remote_keys"`
}
type DeleteRemoteKeysRequest struct {
Pubkeys []string `json:"pubkeys"`
}
type RemoteKeysResponse struct {
Data []*keymanager.KeyStatus `json:"data"`
}