From 7143fe80bcaf5da9dcaf77dfd52df27848ee7c1a Mon Sep 17 00:00:00 2001 From: james-prysm <90280386+james-prysm@users.noreply.github.com> Date: Thu, 19 Oct 2023 11:17:42 -0500 Subject: [PATCH] HTTP VALIDATOR API: remote keymanager api `/eth/v1/remotekeys` (#13059) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * WIP migrating keymanager api changes * gaz * fixing more tests * fixing unit tests * fixing deepsource * fixing visibility of package * fixing more package visability issues * gaz * fixing test * moving routes to proper location * removing whitespae for linting * Update validator/rpc/handlers_keymanager.go Co-authored-by: RadosÅ‚aw Kapka * radek's comments --------- Co-authored-by: RadosÅ‚aw Kapka --- api/client/validator/BUILD.bazel | 1 + api/client/validator/client.go | 11 +- cmd/prysmctl/validator/BUILD.bazel | 1 + cmd/prysmctl/validator/cmd.go | 2 +- .../validator/proposer_settings_test.go | 5 +- proto/eth/service/key_management.pb.go | 1319 +++-------------- proto/eth/service/key_management.pb.gw.go | 227 --- proto/eth/service/key_management.proto | 94 -- validator/keymanager/BUILD.bazel | 6 +- validator/keymanager/constants.go | 4 +- .../keymanager/remote-web3signer/BUILD.bazel | 2 - .../remote-web3signer/keymanager.go | 101 +- .../remote-web3signer/keymanager_test.go | 39 +- validator/keymanager/types.go | 10 +- validator/rpc/BUILD.bazel | 4 +- .../rpc/apimiddleware/endpoint_factory.go | 7 - validator/rpc/apimiddleware/structs.go | 34 - validator/rpc/apimiddleware/structs_test.go | 110 -- validator/rpc/handlers_keymanager.go | 148 +- validator/rpc/handlers_keymanager_test.go | 183 +++ validator/rpc/server.go | 8 +- validator/rpc/standard_api.go | 131 -- validator/rpc/standard_api_test.go | 155 -- validator/rpc/structs.go | 28 +- 24 files changed, 682 insertions(+), 1948 deletions(-) diff --git a/api/client/validator/BUILD.bazel b/api/client/validator/BUILD.bazel index 2440cbaeb5..7420768228 100644 --- a/api/client/validator/BUILD.bazel +++ b/api/client/validator/BUILD.bazel @@ -7,6 +7,7 @@ go_library( visibility = ["//visibility:public"], deps = [ "//api/client:go_default_library", + "//validator/rpc:go_default_library", "//validator/rpc/apimiddleware:go_default_library", "@com_github_pkg_errors//:go_default_library", ], diff --git a/api/client/validator/client.go b/api/client/validator/client.go index d4614f3d92..7fb23e9ea2 100644 --- a/api/client/validator/client.go +++ b/api/client/validator/client.go @@ -8,6 +8,7 @@ import ( "github.com/pkg/errors" "github.com/prysmaticlabs/prysm/v4/api/client" + "github.com/prysmaticlabs/prysm/v4/validator/rpc" "github.com/prysmaticlabs/prysm/v4/validator/rpc/apimiddleware" ) @@ -41,7 +42,7 @@ func (c *Client) GetValidatorPubKeys(ctx context.Context) ([]string, error) { if err != nil { return nil, err } - if len(jsonlocal.Keystores) == 0 && len(jsonremote.Keystores) == 0 { + if len(jsonlocal.Keystores) == 0 && len(jsonremote.Data) == 0 { return nil, errors.New("there are no local keys or remote keys on the validator") } @@ -50,8 +51,8 @@ func (c *Client) GetValidatorPubKeys(ctx context.Context) ([]string, error) { for index := range jsonlocal.Keystores { hexKeys[jsonlocal.Keystores[index].ValidatingPubkey] = true } - for index := range jsonremote.Keystores { - hexKeys[jsonremote.Keystores[index].Pubkey] = true + for index := range jsonremote.Data { + hexKeys[jsonremote.Data[index].Pubkey] = true } keys := make([]string, 0) for k := range hexKeys { @@ -74,14 +75,14 @@ func (c *Client) GetLocalValidatorKeys(ctx context.Context) (*apimiddleware.List } // GetRemoteValidatorKeys calls the keymanager APIs for web3signer validator keys -func (c *Client) GetRemoteValidatorKeys(ctx context.Context) (*apimiddleware.ListRemoteKeysResponseJson, error) { +func (c *Client) GetRemoteValidatorKeys(ctx context.Context) (*rpc.ListRemoteKeysResponse, error) { remoteBytes, err := c.Get(ctx, remoteKeysPath, client.WithAuthorizationToken(c.Token())) if err != nil { if !strings.Contains(err.Error(), "Prysm Wallet is not of type Web3Signer") { return nil, err } } - jsonremote := &apimiddleware.ListRemoteKeysResponseJson{} + jsonremote := &rpc.ListRemoteKeysResponse{} if len(remoteBytes) != 0 { if err := json.Unmarshal(remoteBytes, jsonremote); err != nil { return nil, errors.Wrap(err, "failed to parse remote keystore list") diff --git a/cmd/prysmctl/validator/BUILD.bazel b/cmd/prysmctl/validator/BUILD.bazel index a374028dea..00fc7d6ebc 100644 --- a/cmd/prysmctl/validator/BUILD.bazel +++ b/cmd/prysmctl/validator/BUILD.bazel @@ -53,6 +53,7 @@ go_test( "//config/params:go_default_library", "//testing/assert:go_default_library", "//testing/require:go_default_library", + "//validator/rpc:go_default_library", "//validator/rpc/apimiddleware:go_default_library", "@com_github_ethereum_go_ethereum//common/hexutil:go_default_library", "@com_github_sirupsen_logrus//hooks/test:go_default_library", diff --git a/cmd/prysmctl/validator/cmd.go b/cmd/prysmctl/validator/cmd.go index 29f96931d2..69b10aa71b 100644 --- a/cmd/prysmctl/validator/cmd.go +++ b/cmd/prysmctl/validator/cmd.go @@ -125,7 +125,7 @@ var Commands = []*cli.Command{ }, { Name: "proposer-settings", - Aliases: []string{"w"}, + Aliases: []string{"ps"}, Usage: "Display or recreate currently used proposer settings.", Flags: []cli.Flag{ cmd.ConfigFileFlag, diff --git a/cmd/prysmctl/validator/proposer_settings_test.go b/cmd/prysmctl/validator/proposer_settings_test.go index b8c1de4c04..985e513bb3 100644 --- a/cmd/prysmctl/validator/proposer_settings_test.go +++ b/cmd/prysmctl/validator/proposer_settings_test.go @@ -13,6 +13,7 @@ import ( "github.com/prysmaticlabs/prysm/v4/testing/assert" "github.com/prysmaticlabs/prysm/v4/testing/require" + "github.com/prysmaticlabs/prysm/v4/validator/rpc" "github.com/prysmaticlabs/prysm/v4/validator/rpc/apimiddleware" logtest "github.com/sirupsen/logrus/hooks/test" "github.com/urfave/cli/v2" @@ -39,8 +40,8 @@ func getValidatorHappyPathTestServer(t *testing.T) *httptest.Server { }) require.NoError(t, err) } else if r.RequestURI == "/eth/v1/remotekeys" { - err := json.NewEncoder(w).Encode(&apimiddleware.ListRemoteKeysResponseJson{ - Keystores: []*apimiddleware.RemoteKeysListJson{ + err := json.NewEncoder(w).Encode(&rpc.ListRemoteKeysResponse{ + Data: []*rpc.RemoteKey{ { Pubkey: key1, }, diff --git a/proto/eth/service/key_management.pb.go b/proto/eth/service/key_management.pb.go index 0724d65ba7..30e5311015 100755 --- a/proto/eth/service/key_management.pb.go +++ b/proto/eth/service/key_management.pb.go @@ -129,107 +129,6 @@ func (DeletedKeystoreStatus_Status) EnumDescriptor() ([]byte, []int) { return file_proto_eth_service_key_management_proto_rawDescGZIP(), []int{6, 0} } -type ImportedRemoteKeysStatus_Status int32 - -const ( - ImportedRemoteKeysStatus_UNKNOWN ImportedRemoteKeysStatus_Status = 0 - ImportedRemoteKeysStatus_IMPORTED ImportedRemoteKeysStatus_Status = 1 - ImportedRemoteKeysStatus_DUPLICATE ImportedRemoteKeysStatus_Status = 2 - ImportedRemoteKeysStatus_ERROR ImportedRemoteKeysStatus_Status = 3 -) - -// Enum value maps for ImportedRemoteKeysStatus_Status. -var ( - ImportedRemoteKeysStatus_Status_name = map[int32]string{ - 0: "UNKNOWN", - 1: "IMPORTED", - 2: "DUPLICATE", - 3: "ERROR", - } - ImportedRemoteKeysStatus_Status_value = map[string]int32{ - "UNKNOWN": 0, - "IMPORTED": 1, - "DUPLICATE": 2, - "ERROR": 3, - } -) - -func (x ImportedRemoteKeysStatus_Status) Enum() *ImportedRemoteKeysStatus_Status { - p := new(ImportedRemoteKeysStatus_Status) - *p = x - return p -} - -func (x ImportedRemoteKeysStatus_Status) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ImportedRemoteKeysStatus_Status) Descriptor() protoreflect.EnumDescriptor { - return file_proto_eth_service_key_management_proto_enumTypes[2].Descriptor() -} - -func (ImportedRemoteKeysStatus_Status) Type() protoreflect.EnumType { - return &file_proto_eth_service_key_management_proto_enumTypes[2] -} - -func (x ImportedRemoteKeysStatus_Status) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ImportedRemoteKeysStatus_Status.Descriptor instead. -func (ImportedRemoteKeysStatus_Status) EnumDescriptor() ([]byte, []int) { - return file_proto_eth_service_key_management_proto_rawDescGZIP(), []int{12, 0} -} - -type DeletedRemoteKeysStatus_Status int32 - -const ( - DeletedRemoteKeysStatus_NOT_FOUND DeletedRemoteKeysStatus_Status = 0 - DeletedRemoteKeysStatus_DELETED DeletedRemoteKeysStatus_Status = 1 - DeletedRemoteKeysStatus_ERROR DeletedRemoteKeysStatus_Status = 3 -) - -// Enum value maps for DeletedRemoteKeysStatus_Status. -var ( - DeletedRemoteKeysStatus_Status_name = map[int32]string{ - 0: "NOT_FOUND", - 1: "DELETED", - 3: "ERROR", - } - DeletedRemoteKeysStatus_Status_value = map[string]int32{ - "NOT_FOUND": 0, - "DELETED": 1, - "ERROR": 3, - } -) - -func (x DeletedRemoteKeysStatus_Status) Enum() *DeletedRemoteKeysStatus_Status { - p := new(DeletedRemoteKeysStatus_Status) - *p = x - return p -} - -func (x DeletedRemoteKeysStatus_Status) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (DeletedRemoteKeysStatus_Status) Descriptor() protoreflect.EnumDescriptor { - return file_proto_eth_service_key_management_proto_enumTypes[3].Descriptor() -} - -func (DeletedRemoteKeysStatus_Status) Type() protoreflect.EnumType { - return &file_proto_eth_service_key_management_proto_enumTypes[3] -} - -func (x DeletedRemoteKeysStatus_Status) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use DeletedRemoteKeysStatus_Status.Descriptor instead. -func (DeletedRemoteKeysStatus_Status) EnumDescriptor() ([]byte, []int) { - return file_proto_eth_service_key_management_proto_rawDescGZIP(), []int{13, 0} -} - type ListKeystoresResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -599,351 +498,6 @@ func (x *DeletedKeystoreStatus) GetMessage() string { return "" } -type ListRemoteKeysResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Data []*ListRemoteKeysResponse_Keystore `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` -} - -func (x *ListRemoteKeysResponse) Reset() { - *x = ListRemoteKeysResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_service_key_management_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListRemoteKeysResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListRemoteKeysResponse) ProtoMessage() {} - -func (x *ListRemoteKeysResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_service_key_management_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListRemoteKeysResponse.ProtoReflect.Descriptor instead. -func (*ListRemoteKeysResponse) Descriptor() ([]byte, []int) { - return file_proto_eth_service_key_management_proto_rawDescGZIP(), []int{7} -} - -func (x *ListRemoteKeysResponse) GetData() []*ListRemoteKeysResponse_Keystore { - if x != nil { - return x.Data - } - return nil -} - -type ImportRemoteKeysRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - RemoteKeys []*ImportRemoteKeysRequest_Keystore `protobuf:"bytes,1,rep,name=remote_keys,json=remoteKeys,proto3" json:"remote_keys,omitempty"` -} - -func (x *ImportRemoteKeysRequest) Reset() { - *x = ImportRemoteKeysRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_service_key_management_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ImportRemoteKeysRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ImportRemoteKeysRequest) ProtoMessage() {} - -func (x *ImportRemoteKeysRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_service_key_management_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ImportRemoteKeysRequest.ProtoReflect.Descriptor instead. -func (*ImportRemoteKeysRequest) Descriptor() ([]byte, []int) { - return file_proto_eth_service_key_management_proto_rawDescGZIP(), []int{8} -} - -func (x *ImportRemoteKeysRequest) GetRemoteKeys() []*ImportRemoteKeysRequest_Keystore { - if x != nil { - return x.RemoteKeys - } - return nil -} - -type ImportRemoteKeysResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Data []*ImportedRemoteKeysStatus `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` -} - -func (x *ImportRemoteKeysResponse) Reset() { - *x = ImportRemoteKeysResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_service_key_management_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ImportRemoteKeysResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ImportRemoteKeysResponse) ProtoMessage() {} - -func (x *ImportRemoteKeysResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_service_key_management_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ImportRemoteKeysResponse.ProtoReflect.Descriptor instead. -func (*ImportRemoteKeysResponse) Descriptor() ([]byte, []int) { - return file_proto_eth_service_key_management_proto_rawDescGZIP(), []int{9} -} - -func (x *ImportRemoteKeysResponse) GetData() []*ImportedRemoteKeysStatus { - if x != nil { - return x.Data - } - return nil -} - -type DeleteRemoteKeysRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Pubkeys [][]byte `protobuf:"bytes,1,rep,name=pubkeys,proto3" json:"pubkeys,omitempty"` -} - -func (x *DeleteRemoteKeysRequest) Reset() { - *x = DeleteRemoteKeysRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_service_key_management_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteRemoteKeysRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteRemoteKeysRequest) ProtoMessage() {} - -func (x *DeleteRemoteKeysRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_service_key_management_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteRemoteKeysRequest.ProtoReflect.Descriptor instead. -func (*DeleteRemoteKeysRequest) Descriptor() ([]byte, []int) { - return file_proto_eth_service_key_management_proto_rawDescGZIP(), []int{10} -} - -func (x *DeleteRemoteKeysRequest) GetPubkeys() [][]byte { - if x != nil { - return x.Pubkeys - } - return nil -} - -type DeleteRemoteKeysResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Data []*DeletedRemoteKeysStatus `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` -} - -func (x *DeleteRemoteKeysResponse) Reset() { - *x = DeleteRemoteKeysResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_service_key_management_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteRemoteKeysResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteRemoteKeysResponse) ProtoMessage() {} - -func (x *DeleteRemoteKeysResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_service_key_management_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteRemoteKeysResponse.ProtoReflect.Descriptor instead. -func (*DeleteRemoteKeysResponse) Descriptor() ([]byte, []int) { - return file_proto_eth_service_key_management_proto_rawDescGZIP(), []int{11} -} - -func (x *DeleteRemoteKeysResponse) GetData() []*DeletedRemoteKeysStatus { - if x != nil { - return x.Data - } - return nil -} - -type ImportedRemoteKeysStatus struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Status ImportedRemoteKeysStatus_Status `protobuf:"varint,1,opt,name=status,proto3,enum=ethereum.eth.service.ImportedRemoteKeysStatus_Status" json:"status,omitempty"` - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` -} - -func (x *ImportedRemoteKeysStatus) Reset() { - *x = ImportedRemoteKeysStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_service_key_management_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ImportedRemoteKeysStatus) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ImportedRemoteKeysStatus) ProtoMessage() {} - -func (x *ImportedRemoteKeysStatus) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_service_key_management_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ImportedRemoteKeysStatus.ProtoReflect.Descriptor instead. -func (*ImportedRemoteKeysStatus) Descriptor() ([]byte, []int) { - return file_proto_eth_service_key_management_proto_rawDescGZIP(), []int{12} -} - -func (x *ImportedRemoteKeysStatus) GetStatus() ImportedRemoteKeysStatus_Status { - if x != nil { - return x.Status - } - return ImportedRemoteKeysStatus_UNKNOWN -} - -func (x *ImportedRemoteKeysStatus) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -type DeletedRemoteKeysStatus struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Status DeletedRemoteKeysStatus_Status `protobuf:"varint,1,opt,name=status,proto3,enum=ethereum.eth.service.DeletedRemoteKeysStatus_Status" json:"status,omitempty"` - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` -} - -func (x *DeletedRemoteKeysStatus) Reset() { - *x = DeletedRemoteKeysStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_service_key_management_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeletedRemoteKeysStatus) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeletedRemoteKeysStatus) ProtoMessage() {} - -func (x *DeletedRemoteKeysStatus) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_service_key_management_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeletedRemoteKeysStatus.ProtoReflect.Descriptor instead. -func (*DeletedRemoteKeysStatus) Descriptor() ([]byte, []int) { - return file_proto_eth_service_key_management_proto_rawDescGZIP(), []int{13} -} - -func (x *DeletedRemoteKeysStatus) GetStatus() DeletedRemoteKeysStatus_Status { - if x != nil { - return x.Status - } - return DeletedRemoteKeysStatus_NOT_FOUND -} - -func (x *DeletedRemoteKeysStatus) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - type PubkeyRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -955,7 +509,7 @@ type PubkeyRequest struct { func (x *PubkeyRequest) Reset() { *x = PubkeyRequest{} if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_service_key_management_proto_msgTypes[14] + mi := &file_proto_eth_service_key_management_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -968,7 +522,7 @@ func (x *PubkeyRequest) String() string { func (*PubkeyRequest) ProtoMessage() {} func (x *PubkeyRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_service_key_management_proto_msgTypes[14] + mi := &file_proto_eth_service_key_management_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -981,7 +535,7 @@ func (x *PubkeyRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PubkeyRequest.ProtoReflect.Descriptor instead. func (*PubkeyRequest) Descriptor() ([]byte, []int) { - return file_proto_eth_service_key_management_proto_rawDescGZIP(), []int{14} + return file_proto_eth_service_key_management_proto_rawDescGZIP(), []int{7} } func (x *PubkeyRequest) GetPubkey() []byte { @@ -1002,7 +556,7 @@ type GetFeeRecipientByPubkeyResponse struct { func (x *GetFeeRecipientByPubkeyResponse) Reset() { *x = GetFeeRecipientByPubkeyResponse{} if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_service_key_management_proto_msgTypes[15] + mi := &file_proto_eth_service_key_management_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1015,7 +569,7 @@ func (x *GetFeeRecipientByPubkeyResponse) String() string { func (*GetFeeRecipientByPubkeyResponse) ProtoMessage() {} func (x *GetFeeRecipientByPubkeyResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_service_key_management_proto_msgTypes[15] + mi := &file_proto_eth_service_key_management_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1028,7 +582,7 @@ func (x *GetFeeRecipientByPubkeyResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetFeeRecipientByPubkeyResponse.ProtoReflect.Descriptor instead. func (*GetFeeRecipientByPubkeyResponse) Descriptor() ([]byte, []int) { - return file_proto_eth_service_key_management_proto_rawDescGZIP(), []int{15} + return file_proto_eth_service_key_management_proto_rawDescGZIP(), []int{8} } func (x *GetFeeRecipientByPubkeyResponse) GetData() *GetFeeRecipientByPubkeyResponse_FeeRecipient { @@ -1050,7 +604,7 @@ type SetFeeRecipientByPubkeyRequest struct { func (x *SetFeeRecipientByPubkeyRequest) Reset() { *x = SetFeeRecipientByPubkeyRequest{} if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_service_key_management_proto_msgTypes[16] + mi := &file_proto_eth_service_key_management_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1063,7 +617,7 @@ func (x *SetFeeRecipientByPubkeyRequest) String() string { func (*SetFeeRecipientByPubkeyRequest) ProtoMessage() {} func (x *SetFeeRecipientByPubkeyRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_service_key_management_proto_msgTypes[16] + mi := &file_proto_eth_service_key_management_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1076,7 +630,7 @@ func (x *SetFeeRecipientByPubkeyRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SetFeeRecipientByPubkeyRequest.ProtoReflect.Descriptor instead. func (*SetFeeRecipientByPubkeyRequest) Descriptor() ([]byte, []int) { - return file_proto_eth_service_key_management_proto_rawDescGZIP(), []int{16} + return file_proto_eth_service_key_management_proto_rawDescGZIP(), []int{9} } func (x *SetFeeRecipientByPubkeyRequest) GetPubkey() []byte { @@ -1104,7 +658,7 @@ type GetGasLimitResponse struct { func (x *GetGasLimitResponse) Reset() { *x = GetGasLimitResponse{} if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_service_key_management_proto_msgTypes[17] + mi := &file_proto_eth_service_key_management_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1117,7 +671,7 @@ func (x *GetGasLimitResponse) String() string { func (*GetGasLimitResponse) ProtoMessage() {} func (x *GetGasLimitResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_service_key_management_proto_msgTypes[17] + mi := &file_proto_eth_service_key_management_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1130,7 +684,7 @@ func (x *GetGasLimitResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetGasLimitResponse.ProtoReflect.Descriptor instead. func (*GetGasLimitResponse) Descriptor() ([]byte, []int) { - return file_proto_eth_service_key_management_proto_rawDescGZIP(), []int{17} + return file_proto_eth_service_key_management_proto_rawDescGZIP(), []int{10} } func (x *GetGasLimitResponse) GetData() *GetGasLimitResponse_GasLimit { @@ -1152,7 +706,7 @@ type SetGasLimitRequest struct { func (x *SetGasLimitRequest) Reset() { *x = SetGasLimitRequest{} if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_service_key_management_proto_msgTypes[18] + mi := &file_proto_eth_service_key_management_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1165,7 +719,7 @@ func (x *SetGasLimitRequest) String() string { func (*SetGasLimitRequest) ProtoMessage() {} func (x *SetGasLimitRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_service_key_management_proto_msgTypes[18] + mi := &file_proto_eth_service_key_management_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1178,7 +732,7 @@ func (x *SetGasLimitRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SetGasLimitRequest.ProtoReflect.Descriptor instead. func (*SetGasLimitRequest) Descriptor() ([]byte, []int) { - return file_proto_eth_service_key_management_proto_rawDescGZIP(), []int{18} + return file_proto_eth_service_key_management_proto_rawDescGZIP(), []int{11} } func (x *SetGasLimitRequest) GetPubkey() []byte { @@ -1206,7 +760,7 @@ type DeleteGasLimitRequest struct { func (x *DeleteGasLimitRequest) Reset() { *x = DeleteGasLimitRequest{} if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_service_key_management_proto_msgTypes[19] + mi := &file_proto_eth_service_key_management_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1219,7 +773,7 @@ func (x *DeleteGasLimitRequest) String() string { func (*DeleteGasLimitRequest) ProtoMessage() {} func (x *DeleteGasLimitRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_service_key_management_proto_msgTypes[19] + mi := &file_proto_eth_service_key_management_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1232,7 +786,7 @@ func (x *DeleteGasLimitRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteGasLimitRequest.ProtoReflect.Descriptor instead. func (*DeleteGasLimitRequest) Descriptor() ([]byte, []int) { - return file_proto_eth_service_key_management_proto_rawDescGZIP(), []int{19} + return file_proto_eth_service_key_management_proto_rawDescGZIP(), []int{12} } func (x *DeleteGasLimitRequest) GetPubkey() []byte { @@ -1254,7 +808,7 @@ type ListKeystoresResponse_Keystore struct { func (x *ListKeystoresResponse_Keystore) Reset() { *x = ListKeystoresResponse_Keystore{} if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_service_key_management_proto_msgTypes[20] + mi := &file_proto_eth_service_key_management_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1267,7 +821,7 @@ func (x *ListKeystoresResponse_Keystore) String() string { func (*ListKeystoresResponse_Keystore) ProtoMessage() {} func (x *ListKeystoresResponse_Keystore) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_service_key_management_proto_msgTypes[20] + mi := &file_proto_eth_service_key_management_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1297,124 +851,6 @@ func (x *ListKeystoresResponse_Keystore) GetDerivationPath() string { return "" } -type ListRemoteKeysResponse_Keystore struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Pubkey []byte `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"` - Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` - Readonly bool `protobuf:"varint,3,opt,name=readonly,proto3" json:"readonly,omitempty"` -} - -func (x *ListRemoteKeysResponse_Keystore) Reset() { - *x = ListRemoteKeysResponse_Keystore{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_service_key_management_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListRemoteKeysResponse_Keystore) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListRemoteKeysResponse_Keystore) ProtoMessage() {} - -func (x *ListRemoteKeysResponse_Keystore) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_service_key_management_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListRemoteKeysResponse_Keystore.ProtoReflect.Descriptor instead. -func (*ListRemoteKeysResponse_Keystore) Descriptor() ([]byte, []int) { - return file_proto_eth_service_key_management_proto_rawDescGZIP(), []int{7, 0} -} - -func (x *ListRemoteKeysResponse_Keystore) GetPubkey() []byte { - if x != nil { - return x.Pubkey - } - return nil -} - -func (x *ListRemoteKeysResponse_Keystore) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -func (x *ListRemoteKeysResponse_Keystore) GetReadonly() bool { - if x != nil { - return x.Readonly - } - return false -} - -type ImportRemoteKeysRequest_Keystore struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Pubkey []byte `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey,omitempty"` - Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` -} - -func (x *ImportRemoteKeysRequest_Keystore) Reset() { - *x = ImportRemoteKeysRequest_Keystore{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_service_key_management_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ImportRemoteKeysRequest_Keystore) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ImportRemoteKeysRequest_Keystore) ProtoMessage() {} - -func (x *ImportRemoteKeysRequest_Keystore) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_service_key_management_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ImportRemoteKeysRequest_Keystore.ProtoReflect.Descriptor instead. -func (*ImportRemoteKeysRequest_Keystore) Descriptor() ([]byte, []int) { - return file_proto_eth_service_key_management_proto_rawDescGZIP(), []int{8, 0} -} - -func (x *ImportRemoteKeysRequest_Keystore) GetPubkey() []byte { - if x != nil { - return x.Pubkey - } - return nil -} - -func (x *ImportRemoteKeysRequest_Keystore) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - type GetFeeRecipientByPubkeyResponse_FeeRecipient struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1427,7 +863,7 @@ type GetFeeRecipientByPubkeyResponse_FeeRecipient struct { func (x *GetFeeRecipientByPubkeyResponse_FeeRecipient) Reset() { *x = GetFeeRecipientByPubkeyResponse_FeeRecipient{} if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_service_key_management_proto_msgTypes[23] + mi := &file_proto_eth_service_key_management_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1440,7 +876,7 @@ func (x *GetFeeRecipientByPubkeyResponse_FeeRecipient) String() string { func (*GetFeeRecipientByPubkeyResponse_FeeRecipient) ProtoMessage() {} func (x *GetFeeRecipientByPubkeyResponse_FeeRecipient) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_service_key_management_proto_msgTypes[23] + mi := &file_proto_eth_service_key_management_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1453,7 +889,7 @@ func (x *GetFeeRecipientByPubkeyResponse_FeeRecipient) ProtoReflect() protorefle // Deprecated: Use GetFeeRecipientByPubkeyResponse_FeeRecipient.ProtoReflect.Descriptor instead. func (*GetFeeRecipientByPubkeyResponse_FeeRecipient) Descriptor() ([]byte, []int) { - return file_proto_eth_service_key_management_proto_rawDescGZIP(), []int{15, 0} + return file_proto_eth_service_key_management_proto_rawDescGZIP(), []int{8, 0} } func (x *GetFeeRecipientByPubkeyResponse_FeeRecipient) GetPubkey() []byte { @@ -1482,7 +918,7 @@ type GetGasLimitResponse_GasLimit struct { func (x *GetGasLimitResponse_GasLimit) Reset() { *x = GetGasLimitResponse_GasLimit{} if protoimpl.UnsafeEnabled { - mi := &file_proto_eth_service_key_management_proto_msgTypes[24] + mi := &file_proto_eth_service_key_management_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1495,7 +931,7 @@ func (x *GetGasLimitResponse_GasLimit) String() string { func (*GetGasLimitResponse_GasLimit) ProtoMessage() {} func (x *GetGasLimitResponse_GasLimit) ProtoReflect() protoreflect.Message { - mi := &file_proto_eth_service_key_management_proto_msgTypes[24] + mi := &file_proto_eth_service_key_management_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1508,7 +944,7 @@ func (x *GetGasLimitResponse_GasLimit) ProtoReflect() protoreflect.Message { // Deprecated: Use GetGasLimitResponse_GasLimit.ProtoReflect.Descriptor instead. func (*GetGasLimitResponse_GasLimit) Descriptor() ([]byte, []int) { - return file_proto_eth_service_key_management_proto_rawDescGZIP(), []int{17, 0} + return file_proto_eth_service_key_management_proto_rawDescGZIP(), []int{10, 0} } func (x *GetGasLimitResponse_GasLimit) GetPubkey() []byte { @@ -1599,230 +1035,142 @@ var file_proto_eth_service_key_management_proto_rawDesc = []byte{ 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x4e, 0x4f, 0x54, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, - 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x22, 0xb5, 0x01, - 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, - 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x1a, 0x50, 0x0a, 0x08, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, - 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x61, - 0x64, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x61, - 0x64, 0x6f, 0x6e, 0x6c, 0x79, 0x22, 0xa8, 0x01, 0x0a, 0x17, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, - 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x57, 0x0a, 0x0b, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, - 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x49, 0x6d, - 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x0a, - 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x1a, 0x34, 0x0a, 0x08, 0x4b, 0x65, - 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, - 0x22, 0x5e, 0x0a, 0x18, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, - 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x74, 0x68, - 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, - 0x4b, 0x65, 0x79, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x22, 0x33, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, - 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, - 0x75, 0x62, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x75, - 0x62, 0x6b, 0x65, 0x79, 0x73, 0x22, 0x5d, 0x0a, 0x18, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, - 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x41, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x2d, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x52, 0x65, - 0x6d, 0x6f, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x04, - 0x64, 0x61, 0x74, 0x61, 0x22, 0xc2, 0x01, 0x0a, 0x18, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x65, - 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x12, 0x4d, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x35, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x65, - 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x3d, 0x0a, 0x06, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, - 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4d, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, - 0x0d, 0x0a, 0x09, 0x44, 0x55, 0x50, 0x4c, 0x49, 0x43, 0x41, 0x54, 0x45, 0x10, 0x02, 0x12, 0x09, - 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x22, 0xb2, 0x01, 0x0a, 0x17, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x4c, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, - 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x64, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x2f, 0x0a, - 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x4f, 0x54, 0x5f, 0x46, - 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, - 0x44, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x22, 0x27, - 0x0a, 0x0d, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x22, 0xc1, 0x01, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x46, - 0x65, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x50, 0x75, 0x62, - 0x6b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x65, 0x74, 0x68, 0x65, - 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x47, 0x65, 0x74, 0x46, 0x65, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, - 0x42, 0x79, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x2e, 0x46, 0x65, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x64, - 0x61, 0x74, 0x61, 0x1a, 0x46, 0x0a, 0x0c, 0x46, 0x65, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, - 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x65, - 0x74, 0x68, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x0a, 0x65, 0x74, 0x68, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x58, 0x0a, 0x1e, 0x53, - 0x65, 0x74, 0x46, 0x65, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x42, 0x79, - 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, - 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, - 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x74, 0x68, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x65, 0x74, 0x68, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x9e, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x47, 0x61, 0x73, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x65, 0x74, - 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x47, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x3f, 0x0a, 0x08, 0x47, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, - 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, - 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, - 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x49, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x47, 0x61, 0x73, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, - 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, - 0x62, 0x6b, 0x65, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, - 0x74, 0x22, 0x2f, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x61, 0x73, 0x4c, 0x69, - 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, - 0x62, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, - 0x65, 0x79, 0x32, 0x96, 0x0e, 0x0a, 0x0d, 0x4b, 0x65, 0x79, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x78, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x73, - 0x74, 0x6f, 0x72, 0x65, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x2b, 0x2e, - 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, - 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x1c, 0x12, 0x1a, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, - 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x12, 0x95, - 0x01, 0x0a, 0x0f, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, - 0x65, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, - 0x68, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, - 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2d, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4b, 0x65, - 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x65, 0x79, - 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x12, 0x95, 0x01, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x74, 0x68, - 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, - 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, - 0x01, 0x2a, 0x2a, 0x1a, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, - 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x12, 0x7b, - 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, - 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x2c, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, - 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, - 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, - 0x2f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x6b, 0x65, 0x79, 0x73, 0x12, 0x99, 0x01, 0x0a, 0x10, - 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, - 0x12, 0x2d, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, - 0x6d, 0x6f, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x2e, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x6d, - 0x6f, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x6d, - 0x6f, 0x74, 0x65, 0x6b, 0x65, 0x79, 0x73, 0x12, 0x99, 0x01, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x2d, 0x2e, 0x65, - 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, - 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x65, 0x74, - 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4b, - 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x2a, 0x1b, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, - 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x6b, - 0x65, 0x79, 0x73, 0x12, 0xb0, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x65, 0x65, 0x52, - 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, - 0x12, 0x23, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, - 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x65, 0x74, - 0x46, 0x65, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x50, 0x75, - 0x62, 0x6b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x32, 0x12, 0x30, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, - 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x2f, 0x7b, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x7d, 0x2f, 0x66, 0x65, 0x65, 0x72, 0x65, 0x63, - 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0xa4, 0x01, 0x0a, 0x17, 0x53, 0x65, 0x74, 0x46, 0x65, + 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x22, 0x27, 0x0a, + 0x0d, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, + 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, + 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x22, 0xc1, 0x01, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x46, 0x65, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x50, 0x75, 0x62, 0x6b, - 0x65, 0x79, 0x12, 0x34, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, - 0x68, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x53, 0x65, 0x74, 0x46, 0x65, 0x65, - 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x50, 0x75, 0x62, 0x6b, 0x65, - 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x3a, 0x01, 0x2a, 0x22, 0x30, 0x2f, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x7b, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x7d, - 0x2f, 0x66, 0x65, 0x65, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x96, 0x01, - 0x0a, 0x1a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x46, 0x65, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, - 0x69, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x23, 0x2e, 0x65, + 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, + 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x47, 0x65, 0x74, 0x46, 0x65, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x42, + 0x79, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, + 0x46, 0x65, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x1a, 0x46, 0x0a, 0x0c, 0x46, 0x65, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, + 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x74, + 0x68, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, + 0x65, 0x74, 0x68, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x58, 0x0a, 0x1e, 0x53, 0x65, + 0x74, 0x46, 0x65, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x50, + 0x75, 0x62, 0x6b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, + 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, + 0x62, 0x6b, 0x65, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x74, 0x68, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x65, 0x74, 0x68, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x22, 0x9e, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x47, 0x61, 0x73, 0x4c, + 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x65, 0x74, 0x68, + 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x47, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x1a, 0x3f, 0x0a, 0x08, 0x47, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, + 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x49, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x47, 0x61, 0x73, 0x4c, + 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, + 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, + 0x6b, 0x65, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, + 0x22, 0x2f, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x61, 0x73, 0x4c, 0x69, 0x6d, + 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, + 0x79, 0x32, 0xe1, 0x0a, 0x0a, 0x0d, 0x4b, 0x65, 0x79, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x12, 0x78, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x74, + 0x6f, 0x72, 0x65, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x2b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x35, 0x3a, 0x01, 0x2a, 0x2a, 0x30, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, - 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x2f, 0x7b, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x7d, 0x2f, 0x66, 0x65, 0x65, 0x72, 0x65, 0x63, - 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x94, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x47, 0x61, - 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x23, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, - 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x50, 0x75, - 0x62, 0x6b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x65, 0x74, - 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, + 0x69, 0x63, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x1c, 0x12, 0x1a, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, + 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x12, 0x95, 0x01, + 0x0a, 0x0f, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, + 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4b, + 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2d, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4b, 0x65, 0x79, + 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x65, 0x79, 0x73, + 0x74, 0x6f, 0x72, 0x65, 0x73, 0x12, 0x95, 0x01, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x74, 0x68, 0x65, + 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, + 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x44, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, + 0x2a, 0x2a, 0x1a, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, + 0x2f, 0x76, 0x31, 0x2f, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x12, 0xb0, 0x01, + 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x65, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, + 0x6e, 0x74, 0x42, 0x79, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x23, 0x2e, 0x65, 0x74, 0x68, + 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x35, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x65, 0x65, 0x52, 0x65, 0x63, + 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x12, 0x30, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x7b, 0x70, 0x75, 0x62, 0x6b, - 0x65, 0x79, 0x7d, 0x2f, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x89, 0x01, - 0x0a, 0x0b, 0x53, 0x65, 0x74, 0x47, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x28, 0x2e, - 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x53, 0x65, 0x74, 0x47, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, - 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x3a, 0x01, 0x2a, 0x22, 0x2d, 0x2f, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x7b, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x7d, 0x2f, - 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x8f, 0x01, 0x0a, 0x0e, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x47, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x2b, 0x2e, 0x65, + 0x65, 0x79, 0x7d, 0x2f, 0x66, 0x65, 0x65, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, + 0x12, 0xa4, 0x01, 0x0a, 0x17, 0x53, 0x65, 0x74, 0x46, 0x65, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, + 0x69, 0x65, 0x6e, 0x74, 0x42, 0x79, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x34, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x61, 0x73, 0x4c, 0x69, 0x6d, - 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x3a, 0x01, 0x2a, 0x2a, 0x2d, 0x2f, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x7b, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, - 0x7d, 0x2f, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x9a, 0x01, 0x0a, 0x18, - 0x6f, 0x72, 0x67, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, - 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x19, 0x4b, 0x65, 0x79, 0x4d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, - 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, 0x76, 0x34, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, - 0x74, 0x68, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0xaa, 0x02, 0x14, 0x45, 0x74, 0x68, - 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x45, 0x74, 0x68, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0xca, 0x02, 0x14, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5c, 0x45, 0x74, 0x68, - 0x5c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x63, 0x65, 0x2e, 0x53, 0x65, 0x74, 0x46, 0x65, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, + 0x65, 0x6e, 0x74, 0x42, 0x79, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x35, 0x3a, 0x01, 0x2a, 0x22, 0x30, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x2f, 0x7b, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x7d, 0x2f, 0x66, 0x65, 0x65, 0x72, 0x65, + 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x96, 0x01, 0x0a, 0x1a, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x46, 0x65, 0x65, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x42, 0x79, + 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x23, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, + 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x50, 0x75, + 0x62, 0x6b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x3a, 0x01, 0x2a, 0x2a, 0x30, + 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, + 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x7b, 0x70, 0x75, 0x62, 0x6b, + 0x65, 0x79, 0x7d, 0x2f, 0x66, 0x65, 0x65, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, + 0x12, 0x94, 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x47, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, + 0x12, 0x23, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, + 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x47, 0x65, 0x74, + 0x47, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x2f, 0x7b, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x7d, 0x2f, 0x67, 0x61, + 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x89, 0x01, 0x0a, 0x0b, 0x53, 0x65, 0x74, 0x47, + 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x28, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, + 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x53, + 0x65, 0x74, 0x47, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x32, 0x3a, 0x01, 0x2a, 0x22, 0x2d, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, + 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, + 0x2f, 0x7b, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x7d, 0x2f, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x12, 0x8f, 0x01, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x61, + 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x2b, 0x2e, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, + 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x47, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x38, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x32, 0x3a, 0x01, 0x2a, 0x2a, 0x2d, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x2f, 0x7b, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x7d, 0x2f, 0x67, 0x61, 0x73, 0x5f, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x42, 0x9a, 0x01, 0x0a, 0x18, 0x6f, 0x72, 0x67, 0x2e, 0x65, 0x74, + 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, 0x65, 0x74, 0x68, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x42, 0x19, 0x4b, 0x65, 0x79, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x79, 0x73, + 0x6d, 0x61, 0x74, 0x69, 0x63, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x70, 0x72, 0x79, 0x73, 0x6d, 0x2f, + 0x76, 0x34, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x74, 0x68, 0x2f, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0xaa, 0x02, 0x14, 0x45, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x2e, + 0x45, 0x74, 0x68, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0xca, 0x02, 0x14, 0x45, 0x74, + 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5c, 0x45, 0x74, 0x68, 0x5c, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1837,83 +1185,60 @@ func file_proto_eth_service_key_management_proto_rawDescGZIP() []byte { return file_proto_eth_service_key_management_proto_rawDescData } -var file_proto_eth_service_key_management_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_proto_eth_service_key_management_proto_msgTypes = make([]protoimpl.MessageInfo, 25) +var file_proto_eth_service_key_management_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_proto_eth_service_key_management_proto_msgTypes = make([]protoimpl.MessageInfo, 16) var file_proto_eth_service_key_management_proto_goTypes = []interface{}{ (ImportedKeystoreStatus_Status)(0), // 0: ethereum.eth.service.ImportedKeystoreStatus.Status (DeletedKeystoreStatus_Status)(0), // 1: ethereum.eth.service.DeletedKeystoreStatus.Status - (ImportedRemoteKeysStatus_Status)(0), // 2: ethereum.eth.service.ImportedRemoteKeysStatus.Status - (DeletedRemoteKeysStatus_Status)(0), // 3: ethereum.eth.service.DeletedRemoteKeysStatus.Status - (*ListKeystoresResponse)(nil), // 4: ethereum.eth.service.ListKeystoresResponse - (*ImportKeystoresRequest)(nil), // 5: ethereum.eth.service.ImportKeystoresRequest - (*ImportKeystoresResponse)(nil), // 6: ethereum.eth.service.ImportKeystoresResponse - (*DeleteKeystoresRequest)(nil), // 7: ethereum.eth.service.DeleteKeystoresRequest - (*DeleteKeystoresResponse)(nil), // 8: ethereum.eth.service.DeleteKeystoresResponse - (*ImportedKeystoreStatus)(nil), // 9: ethereum.eth.service.ImportedKeystoreStatus - (*DeletedKeystoreStatus)(nil), // 10: ethereum.eth.service.DeletedKeystoreStatus - (*ListRemoteKeysResponse)(nil), // 11: ethereum.eth.service.ListRemoteKeysResponse - (*ImportRemoteKeysRequest)(nil), // 12: ethereum.eth.service.ImportRemoteKeysRequest - (*ImportRemoteKeysResponse)(nil), // 13: ethereum.eth.service.ImportRemoteKeysResponse - (*DeleteRemoteKeysRequest)(nil), // 14: ethereum.eth.service.DeleteRemoteKeysRequest - (*DeleteRemoteKeysResponse)(nil), // 15: ethereum.eth.service.DeleteRemoteKeysResponse - (*ImportedRemoteKeysStatus)(nil), // 16: ethereum.eth.service.ImportedRemoteKeysStatus - (*DeletedRemoteKeysStatus)(nil), // 17: ethereum.eth.service.DeletedRemoteKeysStatus - (*PubkeyRequest)(nil), // 18: ethereum.eth.service.PubkeyRequest - (*GetFeeRecipientByPubkeyResponse)(nil), // 19: ethereum.eth.service.GetFeeRecipientByPubkeyResponse - (*SetFeeRecipientByPubkeyRequest)(nil), // 20: ethereum.eth.service.SetFeeRecipientByPubkeyRequest - (*GetGasLimitResponse)(nil), // 21: ethereum.eth.service.GetGasLimitResponse - (*SetGasLimitRequest)(nil), // 22: ethereum.eth.service.SetGasLimitRequest - (*DeleteGasLimitRequest)(nil), // 23: ethereum.eth.service.DeleteGasLimitRequest - (*ListKeystoresResponse_Keystore)(nil), // 24: ethereum.eth.service.ListKeystoresResponse.Keystore - (*ListRemoteKeysResponse_Keystore)(nil), // 25: ethereum.eth.service.ListRemoteKeysResponse.Keystore - (*ImportRemoteKeysRequest_Keystore)(nil), // 26: ethereum.eth.service.ImportRemoteKeysRequest.Keystore - (*GetFeeRecipientByPubkeyResponse_FeeRecipient)(nil), // 27: ethereum.eth.service.GetFeeRecipientByPubkeyResponse.FeeRecipient - (*GetGasLimitResponse_GasLimit)(nil), // 28: ethereum.eth.service.GetGasLimitResponse.GasLimit - (*emptypb.Empty)(nil), // 29: google.protobuf.Empty + (*ListKeystoresResponse)(nil), // 2: ethereum.eth.service.ListKeystoresResponse + (*ImportKeystoresRequest)(nil), // 3: ethereum.eth.service.ImportKeystoresRequest + (*ImportKeystoresResponse)(nil), // 4: ethereum.eth.service.ImportKeystoresResponse + (*DeleteKeystoresRequest)(nil), // 5: ethereum.eth.service.DeleteKeystoresRequest + (*DeleteKeystoresResponse)(nil), // 6: ethereum.eth.service.DeleteKeystoresResponse + (*ImportedKeystoreStatus)(nil), // 7: ethereum.eth.service.ImportedKeystoreStatus + (*DeletedKeystoreStatus)(nil), // 8: ethereum.eth.service.DeletedKeystoreStatus + (*PubkeyRequest)(nil), // 9: ethereum.eth.service.PubkeyRequest + (*GetFeeRecipientByPubkeyResponse)(nil), // 10: ethereum.eth.service.GetFeeRecipientByPubkeyResponse + (*SetFeeRecipientByPubkeyRequest)(nil), // 11: ethereum.eth.service.SetFeeRecipientByPubkeyRequest + (*GetGasLimitResponse)(nil), // 12: ethereum.eth.service.GetGasLimitResponse + (*SetGasLimitRequest)(nil), // 13: ethereum.eth.service.SetGasLimitRequest + (*DeleteGasLimitRequest)(nil), // 14: ethereum.eth.service.DeleteGasLimitRequest + (*ListKeystoresResponse_Keystore)(nil), // 15: ethereum.eth.service.ListKeystoresResponse.Keystore + (*GetFeeRecipientByPubkeyResponse_FeeRecipient)(nil), // 16: ethereum.eth.service.GetFeeRecipientByPubkeyResponse.FeeRecipient + (*GetGasLimitResponse_GasLimit)(nil), // 17: ethereum.eth.service.GetGasLimitResponse.GasLimit + (*emptypb.Empty)(nil), // 18: google.protobuf.Empty } var file_proto_eth_service_key_management_proto_depIdxs = []int32{ - 24, // 0: ethereum.eth.service.ListKeystoresResponse.data:type_name -> ethereum.eth.service.ListKeystoresResponse.Keystore - 9, // 1: ethereum.eth.service.ImportKeystoresResponse.data:type_name -> ethereum.eth.service.ImportedKeystoreStatus - 10, // 2: ethereum.eth.service.DeleteKeystoresResponse.data:type_name -> ethereum.eth.service.DeletedKeystoreStatus + 15, // 0: ethereum.eth.service.ListKeystoresResponse.data:type_name -> ethereum.eth.service.ListKeystoresResponse.Keystore + 7, // 1: ethereum.eth.service.ImportKeystoresResponse.data:type_name -> ethereum.eth.service.ImportedKeystoreStatus + 8, // 2: ethereum.eth.service.DeleteKeystoresResponse.data:type_name -> ethereum.eth.service.DeletedKeystoreStatus 0, // 3: ethereum.eth.service.ImportedKeystoreStatus.status:type_name -> ethereum.eth.service.ImportedKeystoreStatus.Status 1, // 4: ethereum.eth.service.DeletedKeystoreStatus.status:type_name -> ethereum.eth.service.DeletedKeystoreStatus.Status - 25, // 5: ethereum.eth.service.ListRemoteKeysResponse.data:type_name -> ethereum.eth.service.ListRemoteKeysResponse.Keystore - 26, // 6: ethereum.eth.service.ImportRemoteKeysRequest.remote_keys:type_name -> ethereum.eth.service.ImportRemoteKeysRequest.Keystore - 16, // 7: ethereum.eth.service.ImportRemoteKeysResponse.data:type_name -> ethereum.eth.service.ImportedRemoteKeysStatus - 17, // 8: ethereum.eth.service.DeleteRemoteKeysResponse.data:type_name -> ethereum.eth.service.DeletedRemoteKeysStatus - 2, // 9: ethereum.eth.service.ImportedRemoteKeysStatus.status:type_name -> ethereum.eth.service.ImportedRemoteKeysStatus.Status - 3, // 10: ethereum.eth.service.DeletedRemoteKeysStatus.status:type_name -> ethereum.eth.service.DeletedRemoteKeysStatus.Status - 27, // 11: ethereum.eth.service.GetFeeRecipientByPubkeyResponse.data:type_name -> ethereum.eth.service.GetFeeRecipientByPubkeyResponse.FeeRecipient - 28, // 12: ethereum.eth.service.GetGasLimitResponse.data:type_name -> ethereum.eth.service.GetGasLimitResponse.GasLimit - 29, // 13: ethereum.eth.service.KeyManagement.ListKeystores:input_type -> google.protobuf.Empty - 5, // 14: ethereum.eth.service.KeyManagement.ImportKeystores:input_type -> ethereum.eth.service.ImportKeystoresRequest - 7, // 15: ethereum.eth.service.KeyManagement.DeleteKeystores:input_type -> ethereum.eth.service.DeleteKeystoresRequest - 29, // 16: ethereum.eth.service.KeyManagement.ListRemoteKeys:input_type -> google.protobuf.Empty - 12, // 17: ethereum.eth.service.KeyManagement.ImportRemoteKeys:input_type -> ethereum.eth.service.ImportRemoteKeysRequest - 14, // 18: ethereum.eth.service.KeyManagement.DeleteRemoteKeys:input_type -> ethereum.eth.service.DeleteRemoteKeysRequest - 18, // 19: ethereum.eth.service.KeyManagement.ListFeeRecipientByPubkey:input_type -> ethereum.eth.service.PubkeyRequest - 20, // 20: ethereum.eth.service.KeyManagement.SetFeeRecipientByPubkey:input_type -> ethereum.eth.service.SetFeeRecipientByPubkeyRequest - 18, // 21: ethereum.eth.service.KeyManagement.DeleteFeeRecipientByPubkey:input_type -> ethereum.eth.service.PubkeyRequest - 18, // 22: ethereum.eth.service.KeyManagement.GetGasLimit:input_type -> ethereum.eth.service.PubkeyRequest - 22, // 23: ethereum.eth.service.KeyManagement.SetGasLimit:input_type -> ethereum.eth.service.SetGasLimitRequest - 23, // 24: ethereum.eth.service.KeyManagement.DeleteGasLimit:input_type -> ethereum.eth.service.DeleteGasLimitRequest - 4, // 25: ethereum.eth.service.KeyManagement.ListKeystores:output_type -> ethereum.eth.service.ListKeystoresResponse - 6, // 26: ethereum.eth.service.KeyManagement.ImportKeystores:output_type -> ethereum.eth.service.ImportKeystoresResponse - 8, // 27: ethereum.eth.service.KeyManagement.DeleteKeystores:output_type -> ethereum.eth.service.DeleteKeystoresResponse - 11, // 28: ethereum.eth.service.KeyManagement.ListRemoteKeys:output_type -> ethereum.eth.service.ListRemoteKeysResponse - 13, // 29: ethereum.eth.service.KeyManagement.ImportRemoteKeys:output_type -> ethereum.eth.service.ImportRemoteKeysResponse - 15, // 30: ethereum.eth.service.KeyManagement.DeleteRemoteKeys:output_type -> ethereum.eth.service.DeleteRemoteKeysResponse - 19, // 31: ethereum.eth.service.KeyManagement.ListFeeRecipientByPubkey:output_type -> ethereum.eth.service.GetFeeRecipientByPubkeyResponse - 29, // 32: ethereum.eth.service.KeyManagement.SetFeeRecipientByPubkey:output_type -> google.protobuf.Empty - 29, // 33: ethereum.eth.service.KeyManagement.DeleteFeeRecipientByPubkey:output_type -> google.protobuf.Empty - 21, // 34: ethereum.eth.service.KeyManagement.GetGasLimit:output_type -> ethereum.eth.service.GetGasLimitResponse - 29, // 35: ethereum.eth.service.KeyManagement.SetGasLimit:output_type -> google.protobuf.Empty - 29, // 36: ethereum.eth.service.KeyManagement.DeleteGasLimit:output_type -> google.protobuf.Empty - 25, // [25:37] is the sub-list for method output_type - 13, // [13:25] is the sub-list for method input_type - 13, // [13:13] is the sub-list for extension type_name - 13, // [13:13] is the sub-list for extension extendee - 0, // [0:13] is the sub-list for field type_name + 16, // 5: ethereum.eth.service.GetFeeRecipientByPubkeyResponse.data:type_name -> ethereum.eth.service.GetFeeRecipientByPubkeyResponse.FeeRecipient + 17, // 6: ethereum.eth.service.GetGasLimitResponse.data:type_name -> ethereum.eth.service.GetGasLimitResponse.GasLimit + 18, // 7: ethereum.eth.service.KeyManagement.ListKeystores:input_type -> google.protobuf.Empty + 3, // 8: ethereum.eth.service.KeyManagement.ImportKeystores:input_type -> ethereum.eth.service.ImportKeystoresRequest + 5, // 9: ethereum.eth.service.KeyManagement.DeleteKeystores:input_type -> ethereum.eth.service.DeleteKeystoresRequest + 9, // 10: ethereum.eth.service.KeyManagement.ListFeeRecipientByPubkey:input_type -> ethereum.eth.service.PubkeyRequest + 11, // 11: ethereum.eth.service.KeyManagement.SetFeeRecipientByPubkey:input_type -> ethereum.eth.service.SetFeeRecipientByPubkeyRequest + 9, // 12: ethereum.eth.service.KeyManagement.DeleteFeeRecipientByPubkey:input_type -> ethereum.eth.service.PubkeyRequest + 9, // 13: ethereum.eth.service.KeyManagement.GetGasLimit:input_type -> ethereum.eth.service.PubkeyRequest + 13, // 14: ethereum.eth.service.KeyManagement.SetGasLimit:input_type -> ethereum.eth.service.SetGasLimitRequest + 14, // 15: ethereum.eth.service.KeyManagement.DeleteGasLimit:input_type -> ethereum.eth.service.DeleteGasLimitRequest + 2, // 16: ethereum.eth.service.KeyManagement.ListKeystores:output_type -> ethereum.eth.service.ListKeystoresResponse + 4, // 17: ethereum.eth.service.KeyManagement.ImportKeystores:output_type -> ethereum.eth.service.ImportKeystoresResponse + 6, // 18: ethereum.eth.service.KeyManagement.DeleteKeystores:output_type -> ethereum.eth.service.DeleteKeystoresResponse + 10, // 19: ethereum.eth.service.KeyManagement.ListFeeRecipientByPubkey:output_type -> ethereum.eth.service.GetFeeRecipientByPubkeyResponse + 18, // 20: ethereum.eth.service.KeyManagement.SetFeeRecipientByPubkey:output_type -> google.protobuf.Empty + 18, // 21: ethereum.eth.service.KeyManagement.DeleteFeeRecipientByPubkey:output_type -> google.protobuf.Empty + 12, // 22: ethereum.eth.service.KeyManagement.GetGasLimit:output_type -> ethereum.eth.service.GetGasLimitResponse + 18, // 23: ethereum.eth.service.KeyManagement.SetGasLimit:output_type -> google.protobuf.Empty + 18, // 24: ethereum.eth.service.KeyManagement.DeleteGasLimit:output_type -> google.protobuf.Empty + 16, // [16:25] is the sub-list for method output_type + 7, // [7:16] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_proto_eth_service_key_management_proto_init() } @@ -2007,90 +1332,6 @@ func file_proto_eth_service_key_management_proto_init() { } } file_proto_eth_service_key_management_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListRemoteKeysResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_eth_service_key_management_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ImportRemoteKeysRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_eth_service_key_management_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ImportRemoteKeysResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_eth_service_key_management_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteRemoteKeysRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_eth_service_key_management_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteRemoteKeysResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_eth_service_key_management_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ImportedRemoteKeysStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_eth_service_key_management_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeletedRemoteKeysStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_eth_service_key_management_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PubkeyRequest); i { case 0: return &v.state @@ -2102,7 +1343,7 @@ func file_proto_eth_service_key_management_proto_init() { return nil } } - file_proto_eth_service_key_management_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_proto_eth_service_key_management_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetFeeRecipientByPubkeyResponse); i { case 0: return &v.state @@ -2114,7 +1355,7 @@ func file_proto_eth_service_key_management_proto_init() { return nil } } - file_proto_eth_service_key_management_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_proto_eth_service_key_management_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SetFeeRecipientByPubkeyRequest); i { case 0: return &v.state @@ -2126,7 +1367,7 @@ func file_proto_eth_service_key_management_proto_init() { return nil } } - file_proto_eth_service_key_management_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_proto_eth_service_key_management_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetGasLimitResponse); i { case 0: return &v.state @@ -2138,7 +1379,7 @@ func file_proto_eth_service_key_management_proto_init() { return nil } } - file_proto_eth_service_key_management_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + file_proto_eth_service_key_management_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SetGasLimitRequest); i { case 0: return &v.state @@ -2150,7 +1391,7 @@ func file_proto_eth_service_key_management_proto_init() { return nil } } - file_proto_eth_service_key_management_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + file_proto_eth_service_key_management_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteGasLimitRequest); i { case 0: return &v.state @@ -2162,7 +1403,7 @@ func file_proto_eth_service_key_management_proto_init() { return nil } } - file_proto_eth_service_key_management_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + file_proto_eth_service_key_management_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListKeystoresResponse_Keystore); i { case 0: return &v.state @@ -2174,31 +1415,7 @@ func file_proto_eth_service_key_management_proto_init() { return nil } } - file_proto_eth_service_key_management_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListRemoteKeysResponse_Keystore); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_eth_service_key_management_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ImportRemoteKeysRequest_Keystore); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_eth_service_key_management_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + file_proto_eth_service_key_management_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetFeeRecipientByPubkeyResponse_FeeRecipient); i { case 0: return &v.state @@ -2210,7 +1427,7 @@ func file_proto_eth_service_key_management_proto_init() { return nil } } - file_proto_eth_service_key_management_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + file_proto_eth_service_key_management_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetGasLimitResponse_GasLimit); i { case 0: return &v.state @@ -2228,8 +1445,8 @@ func file_proto_eth_service_key_management_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_proto_eth_service_key_management_proto_rawDesc, - NumEnums: 4, - NumMessages: 25, + NumEnums: 2, + NumMessages: 16, NumExtensions: 0, NumServices: 1, }, @@ -2259,9 +1476,6 @@ type KeyManagementClient interface { ListKeystores(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListKeystoresResponse, error) ImportKeystores(ctx context.Context, in *ImportKeystoresRequest, opts ...grpc.CallOption) (*ImportKeystoresResponse, error) DeleteKeystores(ctx context.Context, in *DeleteKeystoresRequest, opts ...grpc.CallOption) (*DeleteKeystoresResponse, error) - ListRemoteKeys(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListRemoteKeysResponse, error) - ImportRemoteKeys(ctx context.Context, in *ImportRemoteKeysRequest, opts ...grpc.CallOption) (*ImportRemoteKeysResponse, error) - DeleteRemoteKeys(ctx context.Context, in *DeleteRemoteKeysRequest, opts ...grpc.CallOption) (*DeleteRemoteKeysResponse, error) ListFeeRecipientByPubkey(ctx context.Context, in *PubkeyRequest, opts ...grpc.CallOption) (*GetFeeRecipientByPubkeyResponse, error) SetFeeRecipientByPubkey(ctx context.Context, in *SetFeeRecipientByPubkeyRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) DeleteFeeRecipientByPubkey(ctx context.Context, in *PubkeyRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) @@ -2305,33 +1519,6 @@ func (c *keyManagementClient) DeleteKeystores(ctx context.Context, in *DeleteKey return out, nil } -func (c *keyManagementClient) ListRemoteKeys(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListRemoteKeysResponse, error) { - out := new(ListRemoteKeysResponse) - err := c.cc.Invoke(ctx, "/ethereum.eth.service.KeyManagement/ListRemoteKeys", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *keyManagementClient) ImportRemoteKeys(ctx context.Context, in *ImportRemoteKeysRequest, opts ...grpc.CallOption) (*ImportRemoteKeysResponse, error) { - out := new(ImportRemoteKeysResponse) - err := c.cc.Invoke(ctx, "/ethereum.eth.service.KeyManagement/ImportRemoteKeys", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *keyManagementClient) DeleteRemoteKeys(ctx context.Context, in *DeleteRemoteKeysRequest, opts ...grpc.CallOption) (*DeleteRemoteKeysResponse, error) { - out := new(DeleteRemoteKeysResponse) - err := c.cc.Invoke(ctx, "/ethereum.eth.service.KeyManagement/DeleteRemoteKeys", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *keyManagementClient) ListFeeRecipientByPubkey(ctx context.Context, in *PubkeyRequest, opts ...grpc.CallOption) (*GetFeeRecipientByPubkeyResponse, error) { out := new(GetFeeRecipientByPubkeyResponse) err := c.cc.Invoke(ctx, "/ethereum.eth.service.KeyManagement/ListFeeRecipientByPubkey", in, out, opts...) @@ -2391,9 +1578,6 @@ type KeyManagementServer interface { ListKeystores(context.Context, *emptypb.Empty) (*ListKeystoresResponse, error) ImportKeystores(context.Context, *ImportKeystoresRequest) (*ImportKeystoresResponse, error) DeleteKeystores(context.Context, *DeleteKeystoresRequest) (*DeleteKeystoresResponse, error) - ListRemoteKeys(context.Context, *emptypb.Empty) (*ListRemoteKeysResponse, error) - ImportRemoteKeys(context.Context, *ImportRemoteKeysRequest) (*ImportRemoteKeysResponse, error) - DeleteRemoteKeys(context.Context, *DeleteRemoteKeysRequest) (*DeleteRemoteKeysResponse, error) ListFeeRecipientByPubkey(context.Context, *PubkeyRequest) (*GetFeeRecipientByPubkeyResponse, error) SetFeeRecipientByPubkey(context.Context, *SetFeeRecipientByPubkeyRequest) (*emptypb.Empty, error) DeleteFeeRecipientByPubkey(context.Context, *PubkeyRequest) (*emptypb.Empty, error) @@ -2415,15 +1599,6 @@ func (*UnimplementedKeyManagementServer) ImportKeystores(context.Context, *Impor func (*UnimplementedKeyManagementServer) DeleteKeystores(context.Context, *DeleteKeystoresRequest) (*DeleteKeystoresResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteKeystores not implemented") } -func (*UnimplementedKeyManagementServer) ListRemoteKeys(context.Context, *emptypb.Empty) (*ListRemoteKeysResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListRemoteKeys not implemented") -} -func (*UnimplementedKeyManagementServer) ImportRemoteKeys(context.Context, *ImportRemoteKeysRequest) (*ImportRemoteKeysResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ImportRemoteKeys not implemented") -} -func (*UnimplementedKeyManagementServer) DeleteRemoteKeys(context.Context, *DeleteRemoteKeysRequest) (*DeleteRemoteKeysResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteRemoteKeys not implemented") -} func (*UnimplementedKeyManagementServer) ListFeeRecipientByPubkey(context.Context, *PubkeyRequest) (*GetFeeRecipientByPubkeyResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListFeeRecipientByPubkey not implemented") } @@ -2501,60 +1676,6 @@ func _KeyManagement_DeleteKeystores_Handler(srv interface{}, ctx context.Context return interceptor(ctx, in, info, handler) } -func _KeyManagement_ListRemoteKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(emptypb.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeyManagementServer).ListRemoteKeys(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ethereum.eth.service.KeyManagement/ListRemoteKeys", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeyManagementServer).ListRemoteKeys(ctx, req.(*emptypb.Empty)) - } - return interceptor(ctx, in, info, handler) -} - -func _KeyManagement_ImportRemoteKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ImportRemoteKeysRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeyManagementServer).ImportRemoteKeys(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ethereum.eth.service.KeyManagement/ImportRemoteKeys", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeyManagementServer).ImportRemoteKeys(ctx, req.(*ImportRemoteKeysRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KeyManagement_DeleteRemoteKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteRemoteKeysRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeyManagementServer).DeleteRemoteKeys(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/ethereum.eth.service.KeyManagement/DeleteRemoteKeys", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeyManagementServer).DeleteRemoteKeys(ctx, req.(*DeleteRemoteKeysRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _KeyManagement_ListFeeRecipientByPubkey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(PubkeyRequest) if err := dec(in); err != nil { @@ -2679,18 +1800,6 @@ var _KeyManagement_serviceDesc = grpc.ServiceDesc{ MethodName: "DeleteKeystores", Handler: _KeyManagement_DeleteKeystores_Handler, }, - { - MethodName: "ListRemoteKeys", - Handler: _KeyManagement_ListRemoteKeys_Handler, - }, - { - MethodName: "ImportRemoteKeys", - Handler: _KeyManagement_ImportRemoteKeys_Handler, - }, - { - MethodName: "DeleteRemoteKeys", - Handler: _KeyManagement_DeleteRemoteKeys_Handler, - }, { MethodName: "ListFeeRecipientByPubkey", Handler: _KeyManagement_ListFeeRecipientByPubkey_Handler, diff --git a/proto/eth/service/key_management.pb.gw.go b/proto/eth/service/key_management.pb.gw.go index 3f0e686f53..f7aa1e4c4f 100755 --- a/proto/eth/service/key_management.pb.gw.go +++ b/proto/eth/service/key_management.pb.gw.go @@ -121,92 +121,6 @@ func local_request_KeyManagement_DeleteKeystores_0(ctx context.Context, marshale } -func request_KeyManagement_ListRemoteKeys_0(ctx context.Context, marshaler runtime.Marshaler, client KeyManagementClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq emptypb.Empty - var metadata runtime.ServerMetadata - - msg, err := client.ListRemoteKeys(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_KeyManagement_ListRemoteKeys_0(ctx context.Context, marshaler runtime.Marshaler, server KeyManagementServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq emptypb.Empty - var metadata runtime.ServerMetadata - - msg, err := server.ListRemoteKeys(ctx, &protoReq) - return msg, metadata, err - -} - -func request_KeyManagement_ImportRemoteKeys_0(ctx context.Context, marshaler runtime.Marshaler, client KeyManagementClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ImportRemoteKeysRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ImportRemoteKeys(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_KeyManagement_ImportRemoteKeys_0(ctx context.Context, marshaler runtime.Marshaler, server KeyManagementServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ImportRemoteKeysRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ImportRemoteKeys(ctx, &protoReq) - return msg, metadata, err - -} - -func request_KeyManagement_DeleteRemoteKeys_0(ctx context.Context, marshaler runtime.Marshaler, client KeyManagementClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteRemoteKeysRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.DeleteRemoteKeys(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_KeyManagement_DeleteRemoteKeys_0(ctx context.Context, marshaler runtime.Marshaler, server KeyManagementServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteRemoteKeysRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.DeleteRemoteKeys(ctx, &protoReq) - return msg, metadata, err - -} - func request_KeyManagement_ListFeeRecipientByPubkey_0(ctx context.Context, marshaler runtime.Marshaler, client KeyManagementClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq PubkeyRequest var metadata runtime.ServerMetadata @@ -670,75 +584,6 @@ func RegisterKeyManagementHandlerServer(ctx context.Context, mux *runtime.ServeM }) - mux.Handle("GET", pattern_KeyManagement_ListRemoteKeys_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ethereum.eth.service.KeyManagement/ListRemoteKeys") - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_KeyManagement_ListRemoteKeys_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_KeyManagement_ListRemoteKeys_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_KeyManagement_ImportRemoteKeys_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ethereum.eth.service.KeyManagement/ImportRemoteKeys") - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_KeyManagement_ImportRemoteKeys_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_KeyManagement_ImportRemoteKeys_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_KeyManagement_DeleteRemoteKeys_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/ethereum.eth.service.KeyManagement/DeleteRemoteKeys") - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_KeyManagement_DeleteRemoteKeys_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_KeyManagement_DeleteRemoteKeys_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_KeyManagement_ListFeeRecipientByPubkey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -978,66 +823,6 @@ func RegisterKeyManagementHandlerClient(ctx context.Context, mux *runtime.ServeM }) - mux.Handle("GET", pattern_KeyManagement_ListRemoteKeys_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/ethereum.eth.service.KeyManagement/ListRemoteKeys") - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_KeyManagement_ListRemoteKeys_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_KeyManagement_ListRemoteKeys_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_KeyManagement_ImportRemoteKeys_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/ethereum.eth.service.KeyManagement/ImportRemoteKeys") - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_KeyManagement_ImportRemoteKeys_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_KeyManagement_ImportRemoteKeys_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_KeyManagement_DeleteRemoteKeys_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req, "/ethereum.eth.service.KeyManagement/DeleteRemoteKeys") - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_KeyManagement_DeleteRemoteKeys_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_KeyManagement_DeleteRemoteKeys_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_KeyManagement_ListFeeRecipientByPubkey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1168,12 +953,6 @@ var ( pattern_KeyManagement_DeleteKeystores_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"internal", "eth", "v1", "keystores"}, "")) - pattern_KeyManagement_ListRemoteKeys_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"internal", "eth", "v1", "remotekeys"}, "")) - - pattern_KeyManagement_ImportRemoteKeys_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"internal", "eth", "v1", "remotekeys"}, "")) - - pattern_KeyManagement_DeleteRemoteKeys_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"internal", "eth", "v1", "remotekeys"}, "")) - pattern_KeyManagement_ListFeeRecipientByPubkey_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"internal", "eth", "v1", "validator", "pubkey", "feerecipient"}, "")) pattern_KeyManagement_SetFeeRecipientByPubkey_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"internal", "eth", "v1", "validator", "pubkey", "feerecipient"}, "")) @@ -1194,12 +973,6 @@ var ( forward_KeyManagement_DeleteKeystores_0 = runtime.ForwardResponseMessage - forward_KeyManagement_ListRemoteKeys_0 = runtime.ForwardResponseMessage - - forward_KeyManagement_ImportRemoteKeys_0 = runtime.ForwardResponseMessage - - forward_KeyManagement_DeleteRemoteKeys_0 = runtime.ForwardResponseMessage - forward_KeyManagement_ListFeeRecipientByPubkey_0 = runtime.ForwardResponseMessage forward_KeyManagement_SetFeeRecipientByPubkey_0 = runtime.ForwardResponseMessage diff --git a/proto/eth/service/key_management.proto b/proto/eth/service/key_management.proto index 4ebd364be3..3a0edd41a0 100644 --- a/proto/eth/service/key_management.proto +++ b/proto/eth/service/key_management.proto @@ -85,48 +85,6 @@ service KeyManagement { }; } - // ListRemoteKeys for all web3signer public validator keys known to the keymanager. - // - // HTTP response status codes: - // - 200: Successful response - // - 401: Unauthorized - // - 403: Forbidden from accessing the resource - // - 500: Validator internal error - rpc ListRemoteKeys(google.protobuf.Empty) returns (ListRemoteKeysResponse) { - option (google.api.http) = { - get: "/internal/eth/v1/remotekeys" - }; - } - - // ImportRemoteKeys imports and sets web3signer public validator keys in the keymanager. - // - // HTTP response status codes: - // - 200: Successful response - // - 401: Unauthorized - // - 403: Forbidden from accessing the resource - // - 500: Validator internal error - rpc ImportRemoteKeys(ImportRemoteKeysRequest) returns (ImportRemoteKeysResponse) { - option (google.api.http) = { - post: "/internal/eth/v1/remotekeys", - body: "*" - }; - } - - - // DeleteRemoteKeys removes web3signer public validator keys in the keymanager. - // - // HTTP response status codes: - // - 200: Successful response - // - 401: Unauthorized - // - 403: Forbidden from accessing the resource - // - 500: Validator internal error - rpc DeleteRemoteKeys(DeleteRemoteKeysRequest) returns (DeleteRemoteKeysResponse) { - option (google.api.http) = { - delete: "/internal/eth/v1/remotekeys", - body: "*" - }; - } - // ListFeeRecipientByPubkey returns the hex encoded fee recipient address for the given pubkey. // // HTTP response status codes: @@ -266,58 +224,6 @@ message DeletedKeystoreStatus { string message = 2; } - -message ListRemoteKeysResponse { - message Keystore { - bytes pubkey = 1; - string url = 2; - bool readonly = 3; - } - repeated Keystore data = 1; -} - -message ImportRemoteKeysRequest { - message Keystore { - bytes pubkey = 1; - string url = 2; - } - repeated Keystore remote_keys = 1; -} - -message ImportRemoteKeysResponse { - repeated ImportedRemoteKeysStatus data = 1; -} - -message DeleteRemoteKeysRequest { - repeated bytes pubkeys = 1; -} - -message DeleteRemoteKeysResponse { - repeated DeletedRemoteKeysStatus data = 1; -} - -message ImportedRemoteKeysStatus { - enum Status { - UNKNOWN = 0; - IMPORTED = 1; - DUPLICATE = 2; - ERROR = 3; - } - Status status = 1; - string message = 2; -} - -message DeletedRemoteKeysStatus { - enum Status { - NOT_FOUND = 0; - DELETED = 1; - ERROR = 3; // skips 2 to match Delete KeyStore status which has error = 3. - } - Status status = 1; - string message = 2; -} - - message PubkeyRequest { bytes pubkey = 1; } diff --git a/validator/keymanager/BUILD.bazel b/validator/keymanager/BUILD.bazel index 2c88381330..6a8f27ebf6 100644 --- a/validator/keymanager/BUILD.bazel +++ b/validator/keymanager/BUILD.bazel @@ -8,11 +8,7 @@ go_library( ], importpath = "github.com/prysmaticlabs/prysm/v4/validator/keymanager", visibility = [ - "//cmd:__subpackages__", - "//testing/endtoend/components:__subpackages__", - "//tools:__subpackages__", - "//validator:__pkg__", - "//validator:__subpackages__", + "//visibility:public", ], deps = [ "//async/event:go_default_library", diff --git a/validator/keymanager/constants.go b/validator/keymanager/constants.go index a8f3a4ee6c..b532793563 100644 --- a/validator/keymanager/constants.go +++ b/validator/keymanager/constants.go @@ -1,4 +1,6 @@ package keymanager // KeysReloaded is a "key reloaded" message. -const KeysReloaded = "Reloaded validator keys into keymanager" +const ( + KeysReloaded = "Reloaded validator keys into keymanager" +) diff --git a/validator/keymanager/remote-web3signer/BUILD.bazel b/validator/keymanager/remote-web3signer/BUILD.bazel index 1a5125d612..4b54080837 100644 --- a/validator/keymanager/remote-web3signer/BUILD.bazel +++ b/validator/keymanager/remote-web3signer/BUILD.bazel @@ -37,10 +37,8 @@ go_test( srcs = ["keymanager_test.go"], embed = [":go_default_library"], deps = [ - "//config/fieldparams:go_default_library", "//crypto/bls:go_default_library", "//encoding/bytesutil:go_default_library", - "//proto/eth/service:go_default_library", "//proto/prysm/v1alpha1/validator-client:go_default_library", "//testing/require:go_default_library", "//validator/keymanager/remote-web3signer/internal:go_default_library", diff --git a/validator/keymanager/remote-web3signer/keymanager.go b/validator/keymanager/remote-web3signer/keymanager.go index f59326c3b5..385b1f82f1 100644 --- a/validator/keymanager/remote-web3signer/keymanager.go +++ b/validator/keymanager/remote-web3signer/keymanager.go @@ -24,6 +24,15 @@ import ( log "github.com/sirupsen/logrus" ) +const ( + StatusImported = "IMPORTED" + StatusError = "ERROR" + StatusDuplicate = "DUPLICATE" + StatusUnknown = "UNKNOWN" + StatusNotFound = "NOT_FOUND" + StatusDeleted = "DELETED" +) + // SetupConfig includes configuration values for initializing. // a keymanager, such as passwords, the wallet, and more. // Web3Signer contains one public keys option. Either through a URL or a static key list. @@ -449,71 +458,95 @@ func DisplayRemotePublicKeys(validatingPubKeys [][48]byte) { } // AddPublicKeys imports a list of public keys into the keymanager for web3signer use. Returns status with message. -func (km *Keymanager) AddPublicKeys(ctx context.Context, pubKeys [][fieldparams.BLSPubkeyLength]byte) ([]*ethpbservice.ImportedRemoteKeysStatus, error) { - if ctx == nil { - return nil, errors.New("context is nil") - } - importedRemoteKeysStatuses := make([]*ethpbservice.ImportedRemoteKeysStatus, len(pubKeys)) - for i, pubKey := range pubKeys { +func (km *Keymanager) AddPublicKeys(pubKeys []string) []*keymanager.KeyStatus { + importedRemoteKeysStatuses := make([]*keymanager.KeyStatus, len(pubKeys)) + for i, pubkey := range pubKeys { found := false + pubkeyBytes, err := hexutil.Decode(pubkey) + if err != nil { + importedRemoteKeysStatuses[i] = &keymanager.KeyStatus{ + Status: StatusError, + Message: err.Error(), + } + continue + } + if len(pubkeyBytes) != fieldparams.BLSPubkeyLength { + importedRemoteKeysStatuses[i] = &keymanager.KeyStatus{ + Status: StatusError, + Message: fmt.Sprintf("pubkey byte length (%d) did not match bls pubkey byte length (%d)", len(pubkeyBytes), fieldparams.BLSPubkeyLength), + } + continue + } for _, key := range km.providedPublicKeys { - if bytes.Equal(key[:], pubKey[:]) { + if bytes.Equal(key[:], pubkeyBytes) { found = true break } } if found { - importedRemoteKeysStatuses[i] = ðpbservice.ImportedRemoteKeysStatus{ - Status: ethpbservice.ImportedRemoteKeysStatus_DUPLICATE, - Message: fmt.Sprintf("Duplicate pubkey: %v, already in use", hexutil.Encode(pubKey[:])), + importedRemoteKeysStatuses[i] = &keymanager.KeyStatus{ + Status: StatusDuplicate, + Message: fmt.Sprintf("Duplicate pubkey: %v, already in use", pubkey), } continue } - km.providedPublicKeys = append(km.providedPublicKeys, pubKey) - importedRemoteKeysStatuses[i] = ðpbservice.ImportedRemoteKeysStatus{ - Status: ethpbservice.ImportedRemoteKeysStatus_IMPORTED, - Message: fmt.Sprintf("Successfully added pubkey: %v", hexutil.Encode(pubKey[:])), + km.providedPublicKeys = append(km.providedPublicKeys, bytesutil.ToBytes48(pubkeyBytes)) + importedRemoteKeysStatuses[i] = &keymanager.KeyStatus{ + Status: StatusImported, + Message: fmt.Sprintf("Successfully added pubkey: %v", pubkey), } - log.Debug("Added pubkey to keymanager for web3signer", "pubkey", hexutil.Encode(pubKey[:])) + log.Debug("Added pubkey to keymanager for web3signer", "pubkey", pubkey) } km.accountsChangedFeed.Send(km.providedPublicKeys) - return importedRemoteKeysStatuses, nil + return importedRemoteKeysStatuses } // DeletePublicKeys removes a list of public keys from the keymanager for web3signer use. Returns status with message. -func (km *Keymanager) DeletePublicKeys(ctx context.Context, pubKeys [][fieldparams.BLSPubkeyLength]byte) ([]*ethpbservice.DeletedRemoteKeysStatus, error) { - if ctx == nil { - return nil, errors.New("context is nil") - } - deletedRemoteKeysStatuses := make([]*ethpbservice.DeletedRemoteKeysStatus, len(pubKeys)) +func (km *Keymanager) DeletePublicKeys(pubKeys []string) []*keymanager.KeyStatus { + deletedRemoteKeysStatuses := make([]*keymanager.KeyStatus, len(pubKeys)) if len(km.providedPublicKeys) == 0 { for i := range deletedRemoteKeysStatuses { - deletedRemoteKeysStatuses[i] = ðpbservice.DeletedRemoteKeysStatus{ - Status: ethpbservice.DeletedRemoteKeysStatus_NOT_FOUND, + deletedRemoteKeysStatuses[i] = &keymanager.KeyStatus{ + Status: StatusNotFound, Message: "No pubkeys are set in validator", } } - return deletedRemoteKeysStatuses, nil + return deletedRemoteKeysStatuses } for i, pubkey := range pubKeys { for in, key := range km.providedPublicKeys { - if bytes.Equal(key[:], pubkey[:]) { - km.providedPublicKeys = append(km.providedPublicKeys[:in], km.providedPublicKeys[in+1:]...) - deletedRemoteKeysStatuses[i] = ðpbservice.DeletedRemoteKeysStatus{ - Status: ethpbservice.DeletedRemoteKeysStatus_DELETED, - Message: fmt.Sprintf("Successfully deleted pubkey: %v", hexutil.Encode(pubkey[:])), + pubkeyBytes, err := hexutil.Decode(pubkey) + if err != nil { + deletedRemoteKeysStatuses[i] = &keymanager.KeyStatus{ + Status: StatusError, + Message: err.Error(), } - log.Debug("Deleted pubkey from keymanager for web3signer", "pubkey", hexutil.Encode(pubkey[:])) + continue + } + if len(pubkeyBytes) != fieldparams.BLSPubkeyLength { + deletedRemoteKeysStatuses[i] = &keymanager.KeyStatus{ + Status: StatusError, + Message: fmt.Sprintf("pubkey byte length (%d) did not match bls pubkey byte length (%d)", len(pubkeyBytes), fieldparams.BLSPubkeyLength), + } + continue + } + if bytes.Equal(key[:], pubkeyBytes) { + km.providedPublicKeys = append(km.providedPublicKeys[:in], km.providedPublicKeys[in+1:]...) + deletedRemoteKeysStatuses[i] = &keymanager.KeyStatus{ + Status: StatusDeleted, + Message: fmt.Sprintf("Successfully deleted pubkey: %v", pubkey), + } + log.Debug("Deleted pubkey from keymanager for web3signer", "pubkey", pubkey) break } } if deletedRemoteKeysStatuses[i] == nil { - deletedRemoteKeysStatuses[i] = ðpbservice.DeletedRemoteKeysStatus{ - Status: ethpbservice.DeletedRemoteKeysStatus_NOT_FOUND, - Message: fmt.Sprintf("Pubkey: %v not found", hexutil.Encode(pubkey[:])), + deletedRemoteKeysStatuses[i] = &keymanager.KeyStatus{ + Status: StatusNotFound, + Message: fmt.Sprintf("Pubkey: %v not found", pubkey), } } } km.accountsChangedFeed.Send(km.providedPublicKeys) - return deletedRemoteKeysStatuses, nil + return deletedRemoteKeysStatuses } diff --git a/validator/keymanager/remote-web3signer/keymanager_test.go b/validator/keymanager/remote-web3signer/keymanager_test.go index f7c5d043c8..2d9bf48212 100644 --- a/validator/keymanager/remote-web3signer/keymanager_test.go +++ b/validator/keymanager/remote-web3signer/keymanager_test.go @@ -8,10 +8,8 @@ import ( "testing" "github.com/ethereum/go-ethereum/common/hexutil" - fieldparams "github.com/prysmaticlabs/prysm/v4/config/fieldparams" "github.com/prysmaticlabs/prysm/v4/crypto/bls" "github.com/prysmaticlabs/prysm/v4/encoding/bytesutil" - ethpbservice "github.com/prysmaticlabs/prysm/v4/proto/eth/service" validatorpb "github.com/prysmaticlabs/prysm/v4/proto/prysm/v1alpha1/validator-client" "github.com/prysmaticlabs/prysm/v4/testing/require" "github.com/prysmaticlabs/prysm/v4/validator/keymanager/remote-web3signer/internal" @@ -299,20 +297,14 @@ func TestKeymanager_AddPublicKeys(t *testing.T) { if err != nil { fmt.Printf("error: %v", err) } - pubkey, err := hexutil.Decode("0xa2b5aaad9c6efefe7bb9b1243a043404f3362937cfb6b31833929833173f476630ea2cfeb0d9ddf15f97ca8685948820") - require.NoError(t, err) - publicKeys := [][fieldparams.BLSPubkeyLength]byte{ - bytesutil.ToBytes48(pubkey), - } - statuses, err := km.AddPublicKeys(ctx, publicKeys) - require.NoError(t, err) + publicKeys := []string{"0xa2b5aaad9c6efefe7bb9b1243a043404f3362937cfb6b31833929833173f476630ea2cfeb0d9ddf15f97ca8685948820"} + statuses := km.AddPublicKeys(publicKeys) for _, status := range statuses { - require.Equal(t, ethpbservice.ImportedRemoteKeysStatus_IMPORTED, status.Status) + require.Equal(t, StatusImported, status.Status) } - statuses, err = km.AddPublicKeys(ctx, publicKeys) - require.NoError(t, err) + statuses = km.AddPublicKeys(publicKeys) for _, status := range statuses { - require.Equal(t, ethpbservice.ImportedRemoteKeysStatus_DUPLICATE, status.Status) + require.Equal(t, StatusDuplicate, status.Status) } } @@ -330,26 +322,19 @@ func TestKeymanager_DeletePublicKeys(t *testing.T) { if err != nil { fmt.Printf("error: %v", err) } - pubkey, err := hexutil.Decode("0xa2b5aaad9c6efefe7bb9b1243a043404f3362937cfb6b31833929833173f476630ea2cfeb0d9ddf15f97ca8685948820") - require.NoError(t, err) - publicKeys := [][fieldparams.BLSPubkeyLength]byte{ - bytesutil.ToBytes48(pubkey), - } - statuses, err := km.AddPublicKeys(ctx, publicKeys) - require.NoError(t, err) + publicKeys := []string{"0xa2b5aaad9c6efefe7bb9b1243a043404f3362937cfb6b31833929833173f476630ea2cfeb0d9ddf15f97ca8685948820"} + statuses := km.AddPublicKeys(publicKeys) for _, status := range statuses { - require.Equal(t, ethpbservice.ImportedRemoteKeysStatus_IMPORTED, status.Status) + require.Equal(t, StatusImported, status.Status) } - s, err := km.DeletePublicKeys(ctx, publicKeys) - require.NoError(t, err) + s := km.DeletePublicKeys(publicKeys) for _, status := range s { - require.Equal(t, ethpbservice.DeletedRemoteKeysStatus_DELETED, status.Status) + require.Equal(t, StatusDeleted, status.Status) } - s, err = km.DeletePublicKeys(ctx, publicKeys) - require.NoError(t, err) + s = km.DeletePublicKeys(publicKeys) for _, status := range s { - require.Equal(t, ethpbservice.DeletedRemoteKeysStatus_NOT_FOUND, status.Status) + require.Equal(t, StatusNotFound, status.Status) } } diff --git a/validator/keymanager/types.go b/validator/keymanager/types.go index 68a3338fbd..d4b8cfe0f8 100644 --- a/validator/keymanager/types.go +++ b/validator/keymanager/types.go @@ -62,12 +62,18 @@ type KeyStoreExtractor interface { // PublicKeyAdder allows adding public keys to the keymanager. type PublicKeyAdder interface { - AddPublicKeys(ctx context.Context, publicKeys [][fieldparams.BLSPubkeyLength]byte) ([]*ethpbservice.ImportedRemoteKeysStatus, error) + AddPublicKeys(publicKeys []string) []*KeyStatus +} + +// KeyStatus is a json representation of the status fields for the keymanager apis +type KeyStatus struct { + Status string `json:"status"` + Message string `json:"message"` } // PublicKeyDeleter allows deleting public keys set in keymanager. type PublicKeyDeleter interface { - DeletePublicKeys(ctx context.Context, publicKeys [][fieldparams.BLSPubkeyLength]byte) ([]*ethpbservice.DeletedRemoteKeysStatus, error) + DeletePublicKeys(publicKeys []string) []*KeyStatus } type ListKeymanagerAccountConfig struct { diff --git a/validator/rpc/BUILD.bazel b/validator/rpc/BUILD.bazel index a529679a67..99fe50abd1 100644 --- a/validator/rpc/BUILD.bazel +++ b/validator/rpc/BUILD.bazel @@ -18,8 +18,7 @@ go_library( ], importpath = "github.com/prysmaticlabs/prysm/v4/validator/rpc", visibility = [ - "//cmd/validator:__subpackages__", - "//validator:__subpackages__", + "//visibility:public", ], deps = [ "//api/grpc:go_default_library", @@ -58,6 +57,7 @@ go_library( "//validator/keymanager:go_default_library", "//validator/keymanager/derived:go_default_library", "//validator/keymanager/local:go_default_library", + "//validator/keymanager/remote-web3signer:go_default_library", "//validator/slashing-protection-history:go_default_library", "//validator/slashing-protection-history/format:go_default_library", "@com_github_ethereum_go_ethereum//common:go_default_library", diff --git a/validator/rpc/apimiddleware/endpoint_factory.go b/validator/rpc/apimiddleware/endpoint_factory.go index 50a6f875c6..c83b8435e0 100644 --- a/validator/rpc/apimiddleware/endpoint_factory.go +++ b/validator/rpc/apimiddleware/endpoint_factory.go @@ -17,7 +17,6 @@ func (f *ValidatorEndpointFactory) IsNil() bool { func (*ValidatorEndpointFactory) Paths() []string { return []string{ "/eth/v1/keystores", - "/eth/v1/remotekeys", "/eth/v1/validator/{pubkey}/feerecipient", "/eth/v1/validator/{pubkey}/gas_limit", } @@ -33,12 +32,6 @@ func (*ValidatorEndpointFactory) Create(path string) (*apimiddleware.Endpoint, e endpoint.PostResponse = &ImportKeystoresResponseJson{} endpoint.DeleteRequest = &DeleteKeystoresRequestJson{} endpoint.DeleteResponse = &DeleteKeystoresResponseJson{} - case "/eth/v1/remotekeys": - endpoint.GetResponse = &ListRemoteKeysResponseJson{} - endpoint.PostRequest = &ImportRemoteKeysRequestJson{} - endpoint.PostResponse = &ImportRemoteKeysResponseJson{} - endpoint.DeleteRequest = &DeleteRemoteKeysRequestJson{} - endpoint.DeleteResponse = &DeleteRemoteKeysResponseJson{} case "/eth/v1/validator/{pubkey}/feerecipient": endpoint.GetResponse = &GetFeeRecipientByPubkeyResponseJson{} endpoint.PostRequest = &SetFeeRecipientByPubkeyRequestJson{} diff --git a/validator/rpc/apimiddleware/structs.go b/validator/rpc/apimiddleware/structs.go index 6f3937c12d..14ffa770d1 100644 --- a/validator/rpc/apimiddleware/structs.go +++ b/validator/rpc/apimiddleware/structs.go @@ -33,40 +33,6 @@ type DeleteKeystoresResponseJson struct { 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"` diff --git a/validator/rpc/apimiddleware/structs_test.go b/validator/rpc/apimiddleware/structs_test.go index cf36da1ce6..950c56fafb 100644 --- a/validator/rpc/apimiddleware/structs_test.go +++ b/validator/rpc/apimiddleware/structs_test.go @@ -118,116 +118,6 @@ func TestDeleteKeystores_JSONisEqual(t *testing.T) { } -func TestListRemoteKeys_JSONisEqual(t *testing.T) { - middlewareResponse := &ListRemoteKeysResponseJson{ - Keystores: []*RemoteKeysListJson{ - { - Pubkey: "0x0", - Url: "http://localhost:8080", - Readonly: true, - }, - }, - } - - protoResponse := &service.ListRemoteKeysResponse{ - Data: []*service.ListRemoteKeysResponse_Keystore{ - { - Pubkey: make([]byte, fieldparams.BLSPubkeyLength), - Url: "http://localhost:8080", - Readonly: true, - }, - }, - } - - listResp, err := areJsonPropertyNamesEqual(middlewareResponse, protoResponse) - require.NoError(t, err) - require.Equal(t, listResp, true) - - resp, err := areJsonPropertyNamesEqual(middlewareResponse.Keystores[0], protoResponse.Data[0]) - require.NoError(t, err) - require.Equal(t, resp, true) -} - -func TestImportRemoteKeys_JSONisEqual(t *testing.T) { - importKeystoresRequest := &ImportRemoteKeysRequestJson{} - - protoImportRequest := &service.ImportRemoteKeysRequest{ - RemoteKeys: []*service.ImportRemoteKeysRequest_Keystore{ - { - Pubkey: make([]byte, fieldparams.BLSPubkeyLength), - Url: "http://localhost:8080", - }, - }, - } - - requestResp, err := areJsonPropertyNamesEqual(importKeystoresRequest, protoImportRequest) - require.NoError(t, err) - require.Equal(t, requestResp, true) - - importKeystoresResponse := &ImportRemoteKeysResponseJson{ - Statuses: []*StatusJson{ - { - Status: "Error", - Message: "a", - }, - }, - } - - protoImportKeystoresResponse := &service.ImportRemoteKeysResponse{ - Data: []*service.ImportedRemoteKeysStatus{ - { - Status: service.ImportedRemoteKeysStatus_ERROR, - Message: "a", - }, - }, - } - - ImportResp, err := areJsonPropertyNamesEqual(importKeystoresResponse, protoImportKeystoresResponse) - require.NoError(t, err) - require.Equal(t, ImportResp, true) - - resp, err := areJsonPropertyNamesEqual(importKeystoresResponse.Statuses[0], protoImportKeystoresResponse.Data[0]) - require.NoError(t, err) - require.Equal(t, resp, true) -} - -func TestDeleteRemoteKeys_JSONisEqual(t *testing.T) { - deleteKeystoresRequest := &DeleteRemoteKeysRequestJson{} - - protoDeleteRequest := &service.DeleteRemoteKeysRequest{ - Pubkeys: [][]byte{{}}, - } - - requestResp, err := areJsonPropertyNamesEqual(deleteKeystoresRequest, protoDeleteRequest) - require.NoError(t, err) - require.Equal(t, requestResp, true) - - deleteKeystoresResponse := &DeleteRemoteKeysResponseJson{ - Statuses: []*StatusJson{ - { - Status: "Error", - Message: "a", - }, - }, - } - protoDeleteResponse := &service.DeleteRemoteKeysResponse{ - Data: []*service.DeletedRemoteKeysStatus{ - { - Status: service.DeletedRemoteKeysStatus_ERROR, - Message: "a", - }, - }, - } - - deleteResp, err := areJsonPropertyNamesEqual(deleteKeystoresResponse, protoDeleteResponse) - require.NoError(t, err) - require.Equal(t, deleteResp, true) - - resp, err := areJsonPropertyNamesEqual(deleteKeystoresResponse.Statuses[0], protoDeleteResponse.Data[0]) - require.NoError(t, err) - require.Equal(t, resp, true) -} - // note: this does not do a deep comparison of the structs func areJsonPropertyNamesEqual(internal, proto interface{}) (bool, error) { internalJSON, err := json.Marshal(internal) diff --git a/validator/rpc/handlers_keymanager.go b/validator/rpc/handlers_keymanager.go index cb34ecfa82..eae4f7575c 100644 --- a/validator/rpc/handlers_keymanager.go +++ b/validator/rpc/handlers_keymanager.go @@ -1,6 +1,7 @@ package rpc import ( + "encoding/json" "fmt" "net/http" @@ -12,6 +13,8 @@ import ( "github.com/prysmaticlabs/prysm/v4/consensus-types/primitives" http2 "github.com/prysmaticlabs/prysm/v4/network/http" "github.com/prysmaticlabs/prysm/v4/validator/client" + "github.com/prysmaticlabs/prysm/v4/validator/keymanager" + remote_web3signer "github.com/prysmaticlabs/prysm/v4/validator/keymanager/remote-web3signer" "go.opencensus.io/trace" "google.golang.org/protobuf/types/known/emptypb" ) @@ -26,7 +29,7 @@ func (s *Server) SetVoluntaryExit(w http.ResponseWriter, r *http.Request) { return } - if s.wallet == nil { + if !s.walletInitialized { http2.HandleError(w, "No wallet found", http.StatusServiceUnavailable) return } @@ -92,3 +95,146 @@ func (s *Server) SetVoluntaryExit(w http.ResponseWriter, r *http.Request) { } http2.WriteJson(w, response) } + +// ListRemoteKeys returns a list of all public keys defined for web3signer keymanager type. +func (s *Server) ListRemoteKeys(w http.ResponseWriter, r *http.Request) { + ctx, span := trace.StartSpan(r.Context(), "validator.keymanagerAPI.ListRemoteKeys") + defer span.End() + + if s.validatorService == nil { + http2.HandleError(w, "Validator service not ready.", http.StatusServiceUnavailable) + return + } + if !s.walletInitialized { + http2.HandleError(w, "Prysm Wallet not initialized. Please create a new wallet.", http.StatusServiceUnavailable) + return + } + km, err := s.validatorService.Keymanager() + if err != nil { + http2.HandleError(w, err.Error(), http.StatusInternalServerError) + return + } + if s.wallet.KeymanagerKind() != keymanager.Web3Signer { + http2.HandleError(w, "Prysm Wallet is not of type Web3Signer. Please execute validator client with web3signer flags.", http.StatusInternalServerError) + return + } + pubKeys, err := km.FetchValidatingPublicKeys(ctx) + if err != nil { + http2.HandleError(w, errors.Errorf("Could not retrieve public keys: %v", err).Error(), http.StatusInternalServerError) + return + } + keystoreResponse := make([]*RemoteKey, len(pubKeys)) + for i := 0; i < len(pubKeys); i++ { + keystoreResponse[i] = &RemoteKey{ + Pubkey: hexutil.Encode(pubKeys[i][:]), + Url: s.validatorService.Web3SignerConfig.BaseEndpoint, + Readonly: true, + } + } + + response := &ListRemoteKeysResponse{ + Data: keystoreResponse, + } + http2.WriteJson(w, response) +} + +// ImportRemoteKeys imports a list of public keys defined for web3signer keymanager type. +func (s *Server) ImportRemoteKeys(w http.ResponseWriter, r *http.Request) { + _, span := trace.StartSpan(r.Context(), "validator.keymanagerAPI.ImportRemoteKeys") + defer span.End() + + if s.validatorService == nil { + http2.HandleError(w, "Validator service not ready.", http.StatusServiceUnavailable) + return + } + if !s.walletInitialized { + http2.HandleError(w, "Prysm Wallet not initialized. Please create a new wallet.", http.StatusServiceUnavailable) + return + } + km, err := s.validatorService.Keymanager() + if err != nil { + http2.HandleError(w, err.Error(), http.StatusInternalServerError) + return + } + if s.wallet.KeymanagerKind() != keymanager.Web3Signer { + http2.HandleError(w, "Prysm Wallet is not of type Web3Signer. Please execute validator client with web3signer flags.", http.StatusInternalServerError) + return + } + + var req ImportRemoteKeysRequest + if err = json.NewDecoder(r.Body).Decode(&req); err != nil { + http2.HandleError(w, "Could not decode request body: "+err.Error(), http.StatusBadRequest) + return + } + + adder, ok := km.(keymanager.PublicKeyAdder) + if !ok { + statuses := make([]*keymanager.KeyStatus, len(req.RemoteKeys)) + for i := 0; i < len(req.RemoteKeys); i++ { + statuses[i] = &keymanager.KeyStatus{ + Status: remote_web3signer.StatusError, + Message: "Keymanager kind cannot import public keys for web3signer keymanager type.", + } + } + http2.WriteJson(w, &RemoteKeysResponse{Data: statuses}) + return + } + + remoteKeys := make([]string, len(req.RemoteKeys)) + isUrlUsed := false + for i, obj := range req.RemoteKeys { + remoteKeys[i] = obj.Pubkey + if obj.Url != "" { + isUrlUsed = true + } + } + if isUrlUsed { + log.Warnf("Setting web3signer base url for imported keys is not supported. Prysm only uses the url from --validators-external-signer-url flag for web3signer.") + } + + http2.WriteJson(w, &RemoteKeysResponse{Data: adder.AddPublicKeys(remoteKeys)}) +} + +// DeleteRemoteKeys deletes a list of public keys defined for web3signer keymanager type. +func (s *Server) DeleteRemoteKeys(w http.ResponseWriter, r *http.Request) { + _, span := trace.StartSpan(r.Context(), "validator.keymanagerAPI.DeleteRemoteKeys") + defer span.End() + + if s.validatorService == nil { + http2.HandleError(w, "Validator service not ready.", http.StatusServiceUnavailable) + return + } + if !s.walletInitialized { + http2.HandleError(w, "Prysm Wallet not initialized. Please create a new wallet.", http.StatusServiceUnavailable) + return + } + km, err := s.validatorService.Keymanager() + if err != nil { + http2.HandleError(w, err.Error(), http.StatusInternalServerError) + return + } + if s.wallet.KeymanagerKind() != keymanager.Web3Signer { + http2.HandleError(w, "Prysm Wallet is not of type Web3Signer. Please execute validator client with web3signer flags.", http.StatusInternalServerError) + return + } + var req DeleteRemoteKeysRequest + if err = json.NewDecoder(r.Body).Decode(&req); err != nil { + http2.HandleError(w, "Could not decode request body: "+err.Error(), http.StatusBadRequest) + return + } + + deleter, ok := km.(keymanager.PublicKeyDeleter) + if !ok { + statuses := make([]*keymanager.KeyStatus, len(req.Pubkeys)) + for i := 0; i < len(req.Pubkeys); i++ { + statuses[i] = &keymanager.KeyStatus{ + Status: remote_web3signer.StatusError, + Message: "Keymanager kind cannot delete public keys for web3signer keymanager type.", + } + } + http2.WriteJson(w, &RemoteKeysResponse{Data: statuses}) + return + } + + http2.WriteJson(w, RemoteKeysResponse{Data: deleter.DeletePublicKeys(req.Pubkeys)}) +} diff --git a/validator/rpc/handlers_keymanager_test.go b/validator/rpc/handlers_keymanager_test.go index 1369a6b574..c7ebd2a051 100644 --- a/validator/rpc/handlers_keymanager_test.go +++ b/validator/rpc/handlers_keymanager_test.go @@ -13,9 +13,12 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/golang/mock/gomock" + "github.com/golang/protobuf/ptypes/empty" "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + fieldparams "github.com/prysmaticlabs/prysm/v4/config/fieldparams" "github.com/prysmaticlabs/prysm/v4/consensus-types/primitives" + "github.com/prysmaticlabs/prysm/v4/encoding/bytesutil" eth "github.com/prysmaticlabs/prysm/v4/proto/prysm/v1alpha1" "github.com/prysmaticlabs/prysm/v4/testing/assert" "github.com/prysmaticlabs/prysm/v4/testing/require" @@ -23,9 +26,11 @@ import ( "github.com/prysmaticlabs/prysm/v4/validator/accounts" "github.com/prysmaticlabs/prysm/v4/validator/accounts/iface" mock "github.com/prysmaticlabs/prysm/v4/validator/accounts/testing" + "github.com/prysmaticlabs/prysm/v4/validator/accounts/wallet" "github.com/prysmaticlabs/prysm/v4/validator/client" "github.com/prysmaticlabs/prysm/v4/validator/keymanager" "github.com/prysmaticlabs/prysm/v4/validator/keymanager/derived" + remoteweb3signer "github.com/prysmaticlabs/prysm/v4/validator/keymanager/remote-web3signer" mocks "github.com/prysmaticlabs/prysm/v4/validator/testing" "google.golang.org/grpc" "google.golang.org/protobuf/types/known/emptypb" @@ -91,6 +96,7 @@ func TestServer_SetVoluntaryExit(t *testing.T) { beaconNodeValidatorClient: beaconClient, wallet: w, beaconNodeClient: mockNodeClient, + walletInitialized: w != nil, } type want struct { @@ -158,6 +164,7 @@ func TestServer_SetVoluntaryExit(t *testing.T) { }, mockSetup: func(s *Server) error { s.wallet = nil + s.walletInitialized = false return nil }, }, @@ -216,3 +223,179 @@ func TestServer_SetVoluntaryExit(t *testing.T) { }) } } + +func TestServer_ListRemoteKeys(t *testing.T) { + t.Run("wallet not ready", func(t *testing.T) { + s := Server{} + _, err := s.ListKeystores(context.Background(), &empty.Empty{}) + require.ErrorContains(t, "Prysm Wallet not initialized. Please create a new wallet.", err) + }) + ctx := context.Background() + w := wallet.NewWalletForWeb3Signer() + root := make([]byte, fieldparams.RootLength) + root[0] = 1 + bytevalue, err := hexutil.Decode("0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a") + require.NoError(t, err) + pubkeys := [][fieldparams.BLSPubkeyLength]byte{bytesutil.ToBytes48(bytevalue)} + config := &remoteweb3signer.SetupConfig{ + BaseEndpoint: "http://example.com", + GenesisValidatorsRoot: root, + ProvidedPublicKeys: pubkeys, + } + km, err := w.InitializeKeymanager(ctx, iface.InitKeymanagerConfig{ListenForChanges: false, Web3SignerConfig: config}) + require.NoError(t, err) + vs, err := client.NewValidatorService(ctx, &client.Config{ + Wallet: w, + Validator: &mock.MockValidator{ + Km: km, + }, + Web3SignerConfig: config, + }) + require.NoError(t, err) + s := &Server{ + walletInitialized: true, + wallet: w, + validatorService: vs, + } + expectedKeys, err := km.FetchValidatingPublicKeys(ctx) + require.NoError(t, err) + + t.Run("returns proper data with existing pub keystores", func(t *testing.T) { + req := httptest.NewRequest("GET", "/eth/v1/remotekeys", nil) + w := httptest.NewRecorder() + w.Body = &bytes.Buffer{} + s.ListRemoteKeys(w, req) + assert.Equal(t, http.StatusOK, w.Code) + resp := &ListRemoteKeysResponse{} + require.NoError(t, json.Unmarshal(w.Body.Bytes(), resp)) + for i := 0; i < len(resp.Data); i++ { + require.DeepEqual(t, hexutil.Encode(expectedKeys[i][:]), resp.Data[i].Pubkey) + } + }) +} + +func TestServer_ImportRemoteKeys(t *testing.T) { + t.Run("wallet not ready", func(t *testing.T) { + s := Server{} + _, err := s.ListKeystores(context.Background(), &empty.Empty{}) + require.ErrorContains(t, "Prysm Wallet not initialized. Please create a new wallet.", err) + }) + ctx := context.Background() + w := wallet.NewWalletForWeb3Signer() + root := make([]byte, fieldparams.RootLength) + root[0] = 1 + config := &remoteweb3signer.SetupConfig{ + BaseEndpoint: "http://example.com", + GenesisValidatorsRoot: root, + ProvidedPublicKeys: nil, + } + km, err := w.InitializeKeymanager(ctx, iface.InitKeymanagerConfig{ListenForChanges: false, Web3SignerConfig: config}) + require.NoError(t, err) + vs, err := client.NewValidatorService(ctx, &client.Config{ + Wallet: w, + Validator: &mock.MockValidator{ + Km: km, + }, + Web3SignerConfig: config, + }) + require.NoError(t, err) + s := &Server{ + walletInitialized: true, + wallet: w, + validatorService: vs, + } + pubkey := "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a" + remoteKeys := []*RemoteKey{ + { + Pubkey: pubkey, + }, + } + + t.Run("returns proper data with existing pub keystores", func(t *testing.T) { + var body bytes.Buffer + b, err := json.Marshal(&ImportRemoteKeysRequest{RemoteKeys: remoteKeys}) + require.NoError(t, err) + body.Write(b) + req := httptest.NewRequest("GET", "/eth/v1/remotekeys", &body) + w := httptest.NewRecorder() + w.Body = &bytes.Buffer{} + s.ImportRemoteKeys(w, req) + assert.Equal(t, http.StatusOK, w.Code) + expectedStatuses := []*keymanager.KeyStatus{ + { + Status: remoteweb3signer.StatusImported, + Message: fmt.Sprintf("Successfully added pubkey: %v", pubkey), + }, + } + resp := &RemoteKeysResponse{} + require.NoError(t, json.Unmarshal(w.Body.Bytes(), resp)) + for i := 0; i < len(resp.Data); i++ { + require.DeepEqual(t, expectedStatuses[i], resp.Data[i]) + } + }) +} + +func TestServer_DeleteRemoteKeys(t *testing.T) { + t.Run("wallet not ready", func(t *testing.T) { + s := Server{} + _, err := s.ListKeystores(context.Background(), &empty.Empty{}) + require.ErrorContains(t, "Prysm Wallet not initialized. Please create a new wallet.", err) + }) + ctx := context.Background() + w := wallet.NewWalletForWeb3Signer() + root := make([]byte, fieldparams.RootLength) + root[0] = 1 + pkey := "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a" + bytevalue, err := hexutil.Decode(pkey) + require.NoError(t, err) + pubkeys := [][fieldparams.BLSPubkeyLength]byte{bytesutil.ToBytes48(bytevalue)} + config := &remoteweb3signer.SetupConfig{ + BaseEndpoint: "http://example.com", + GenesisValidatorsRoot: root, + ProvidedPublicKeys: pubkeys, + } + km, err := w.InitializeKeymanager(ctx, iface.InitKeymanagerConfig{ListenForChanges: false, Web3SignerConfig: config}) + require.NoError(t, err) + vs, err := client.NewValidatorService(ctx, &client.Config{ + Wallet: w, + Validator: &mock.MockValidator{ + Km: km, + }, + Web3SignerConfig: config, + }) + require.NoError(t, err) + s := &Server{ + walletInitialized: true, + wallet: w, + validatorService: vs, + } + + t.Run("returns proper data with existing pub keystores", func(t *testing.T) { + var body bytes.Buffer + b, err := json.Marshal(&DeleteRemoteKeysRequest{ + Pubkeys: []string{pkey}, + }) + require.NoError(t, err) + body.Write(b) + req := httptest.NewRequest("DELETE", "/eth/v1/remotekeys", &body) + w := httptest.NewRecorder() + w.Body = &bytes.Buffer{} + s.DeleteRemoteKeys(w, req) + assert.Equal(t, http.StatusOK, w.Code) + expectedStatuses := []*keymanager.KeyStatus{ + { + Status: remoteweb3signer.StatusDeleted, + Message: fmt.Sprintf("Successfully deleted pubkey: %v", pkey), + }, + } + resp := &RemoteKeysResponse{} + require.NoError(t, json.Unmarshal(w.Body.Bytes(), resp)) + for i := 0; i < len(resp.Data); i++ { + require.DeepEqual(t, expectedStatuses[i], resp.Data[i]) + + } + expectedKeys, err := km.FetchValidatingPublicKeys(ctx) + require.NoError(t, err) + require.Equal(t, 0, len(expectedKeys)) + }) +} diff --git a/validator/rpc/server.go b/validator/rpc/server.go index 8096ae3af2..14046a7f0e 100644 --- a/validator/rpc/server.go +++ b/validator/rpc/server.go @@ -186,6 +186,12 @@ func (s *Server) Start() { ethpbservice.RegisterKeyManagementServer(s.grpcServer, s) validatorpb.RegisterSlashingProtectionServer(s.grpcServer, s) + s.router.HandleFunc("/eth/v1/remotekeys", s.ListRemoteKeys).Methods(http.MethodGet) + s.router.HandleFunc("/eth/v1/remotekeys", s.ImportRemoteKeys).Methods(http.MethodPost) + s.router.HandleFunc("/eth/v1/remotekeys", s.DeleteRemoteKeys).Methods(http.MethodDelete) + s.router.HandleFunc("/eth/v1/validator/{pubkey}/voluntary_exit", s.SetVoluntaryExit).Methods(http.MethodPost) + + // routes needs to be set before the server calls the server function go func() { if s.listener != nil { if err := s.grpcServer.Serve(s.listener); err != nil { @@ -206,8 +212,6 @@ func (s *Server) Start() { logValidatorWebAuth(validatorWebAddr, token, authTokenPath) go s.refreshAuthTokenFromFileChanges(s.ctx, authTokenPath) } - - s.router.HandleFunc("/eth/v1/validator/{pubkey}/voluntary_exit", s.SetVoluntaryExit).Methods(http.MethodPost) } // Stop the gRPC server. diff --git a/validator/rpc/standard_api.go b/validator/rpc/standard_api.go index 702decf48e..2051226280 100644 --- a/validator/rpc/standard_api.go +++ b/validator/rpc/standard_api.go @@ -263,137 +263,6 @@ func (s *Server) slashingProtectionHistoryForDeletedKeys( return slashingprotection.ExportStandardProtectionJSON(ctx, s.valDB, filteredKeys...) } -// ListRemoteKeys returns a list of all public keys defined for web3signer keymanager type. -func (s *Server) ListRemoteKeys(ctx context.Context, _ *empty.Empty) (*ethpbservice.ListRemoteKeysResponse, error) { - if !s.walletInitialized { - return nil, status.Error(codes.FailedPrecondition, "Prysm Wallet not initialized. Please create a new wallet.") - } - if s.validatorService == nil { - return nil, status.Error(codes.FailedPrecondition, "Validator service not ready.") - } - km, err := s.validatorService.Keymanager() - if err != nil { - return nil, status.Errorf(codes.Internal, "Could not get Prysm keymanager (possibly due to beacon node unavailable): %v", err) - } - if s.wallet.KeymanagerKind() != keymanager.Web3Signer { - return nil, status.Errorf(codes.FailedPrecondition, "Prysm Wallet is not of type Web3Signer. Please execute validator client with web3signer flags.") - } - pubKeys, err := km.FetchValidatingPublicKeys(ctx) - if err != nil { - return nil, status.Errorf(codes.Internal, "Could not retrieve keystores: %v", err) - } - keystoreResponse := make([]*ethpbservice.ListRemoteKeysResponse_Keystore, len(pubKeys)) - for i := 0; i < len(pubKeys); i++ { - keystoreResponse[i] = ðpbservice.ListRemoteKeysResponse_Keystore{ - Pubkey: pubKeys[i][:], - Url: s.validatorService.Web3SignerConfig.BaseEndpoint, - Readonly: true, - } - } - return ðpbservice.ListRemoteKeysResponse{ - Data: keystoreResponse, - }, nil -} - -// ImportRemoteKeys imports a list of public keys defined for web3signer keymanager type. -func (s *Server) ImportRemoteKeys(ctx context.Context, req *ethpbservice.ImportRemoteKeysRequest) (*ethpbservice.ImportRemoteKeysResponse, error) { - if !s.walletInitialized { - return nil, status.Error(codes.FailedPrecondition, "Prysm Wallet not initialized. Please create a new wallet.") - } - if s.validatorService == nil { - return nil, status.Error(codes.FailedPrecondition, "Validator service not ready.") - } - km, err := s.validatorService.Keymanager() - if err != nil { - return nil, status.Errorf(codes.Internal, fmt.Sprintf("Could not get Prysm keymanager (possibly due to beacon node unavailable): %v", err)) - } - if s.wallet.KeymanagerKind() != keymanager.Web3Signer { - return nil, status.Errorf(codes.FailedPrecondition, "Prysm Wallet is not of type Web3Signer. Please execute validator client with web3signer flags.") - } - adder, ok := km.(keymanager.PublicKeyAdder) - if !ok { - statuses := groupImportRemoteKeysErrors(req, "Keymanager kind cannot import public keys for web3signer keymanager type.") - return ðpbservice.ImportRemoteKeysResponse{Data: statuses}, nil - } - - remoteKeys := make([][fieldparams.BLSPubkeyLength]byte, len(req.RemoteKeys)) - isUrlUsed := false - for i, obj := range req.RemoteKeys { - remoteKeys[i] = bytesutil.ToBytes48(obj.Pubkey) - if obj.Url != "" { - isUrlUsed = true - } - } - if isUrlUsed { - log.Warnf("Setting web3signer base url for imported keys is not supported. Prysm only uses the url from --validators-external-signer-url flag for web3signer.") - } - - statuses, err := adder.AddPublicKeys(ctx, remoteKeys) - if err != nil { - sts := groupImportRemoteKeysErrors(req, fmt.Sprintf("Could not add keys;error: %v", err)) - return ðpbservice.ImportRemoteKeysResponse{Data: sts}, nil - } - return ðpbservice.ImportRemoteKeysResponse{ - Data: statuses, - }, nil -} - -func groupImportRemoteKeysErrors(req *ethpbservice.ImportRemoteKeysRequest, errorMessage string) []*ethpbservice.ImportedRemoteKeysStatus { - statuses := make([]*ethpbservice.ImportedRemoteKeysStatus, len(req.RemoteKeys)) - for i := 0; i < len(req.RemoteKeys); i++ { - statuses[i] = ðpbservice.ImportedRemoteKeysStatus{ - Status: ethpbservice.ImportedRemoteKeysStatus_ERROR, - Message: errorMessage, - } - } - return statuses -} - -// DeleteRemoteKeys deletes a list of public keys defined for web3signer keymanager type. -func (s *Server) DeleteRemoteKeys(ctx context.Context, req *ethpbservice.DeleteRemoteKeysRequest) (*ethpbservice.DeleteRemoteKeysResponse, error) { - if !s.walletInitialized { - return nil, status.Error(codes.FailedPrecondition, "Prysm Wallet not initialized. Please create a new wallet.") - } - if s.validatorService == nil { - return nil, status.Error(codes.FailedPrecondition, "Validator service not ready.") - } - km, err := s.validatorService.Keymanager() - if err != nil { - return nil, status.Errorf(codes.Internal, "Could not get Prysm keymanager (possibly due to beacon node unavailable): %v", err) - } - if s.wallet.KeymanagerKind() != keymanager.Web3Signer { - return nil, status.Errorf(codes.FailedPrecondition, "Prysm Wallet is not of type Web3Signer. Please execute validator client with web3signer flags.") - } - deleter, ok := km.(keymanager.PublicKeyDeleter) - if !ok { - statuses := groupDeleteRemoteKeysErrors(req, "Keymanager kind cannot delete public keys for web3signer keymanager type.") - return ðpbservice.DeleteRemoteKeysResponse{Data: statuses}, nil - } - remoteKeys := make([][fieldparams.BLSPubkeyLength]byte, len(req.Pubkeys)) - for i, key := range req.Pubkeys { - remoteKeys[i] = bytesutil.ToBytes48(key) - } - statuses, err := deleter.DeletePublicKeys(ctx, remoteKeys) - if err != nil { - sts := groupDeleteRemoteKeysErrors(req, fmt.Sprintf("Could not delete keys;error: %v", err)) - return ðpbservice.DeleteRemoteKeysResponse{Data: sts}, nil - } - return ðpbservice.DeleteRemoteKeysResponse{ - Data: statuses, - }, nil -} - -func groupDeleteRemoteKeysErrors(req *ethpbservice.DeleteRemoteKeysRequest, errorMessage string) []*ethpbservice.DeletedRemoteKeysStatus { - statuses := make([]*ethpbservice.DeletedRemoteKeysStatus, len(req.Pubkeys)) - for i := 0; i < len(req.Pubkeys); i++ { - statuses[i] = ðpbservice.DeletedRemoteKeysStatus{ - Status: ethpbservice.DeletedRemoteKeysStatus_ERROR, - Message: errorMessage, - } - } - return statuses -} - func (s *Server) GetGasLimit(_ context.Context, req *ethpbservice.PubkeyRequest) (*ethpbservice.GetGasLimitResponse, error) { if s.validatorService == nil { return nil, status.Error(codes.FailedPrecondition, "Validator service not ready") diff --git a/validator/rpc/standard_api_test.go b/validator/rpc/standard_api_test.go index acb1948ced..1f521ba1cf 100644 --- a/validator/rpc/standard_api_test.go +++ b/validator/rpc/standard_api_test.go @@ -542,161 +542,6 @@ func createRandomKeystore(t testing.TB, password string) *keymanager.Keystore { } } -func TestServer_ListRemoteKeys(t *testing.T) { - t.Run("wallet not ready", func(t *testing.T) { - s := Server{} - _, err := s.ListKeystores(context.Background(), &empty.Empty{}) - require.ErrorContains(t, "Prysm Wallet not initialized. Please create a new wallet.", err) - }) - ctx := context.Background() - w := wallet.NewWalletForWeb3Signer() - root := make([]byte, fieldparams.RootLength) - root[0] = 1 - bytevalue, err := hexutil.Decode("0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a") - require.NoError(t, err) - pubkeys := [][fieldparams.BLSPubkeyLength]byte{bytesutil.ToBytes48(bytevalue)} - config := &remoteweb3signer.SetupConfig{ - BaseEndpoint: "http://example.com", - GenesisValidatorsRoot: root, - ProvidedPublicKeys: pubkeys, - } - km, err := w.InitializeKeymanager(ctx, iface.InitKeymanagerConfig{ListenForChanges: false, Web3SignerConfig: config}) - require.NoError(t, err) - vs, err := client.NewValidatorService(ctx, &client.Config{ - Wallet: w, - Validator: &mock.MockValidator{ - Km: km, - }, - Web3SignerConfig: config, - }) - require.NoError(t, err) - s := &Server{ - walletInitialized: true, - wallet: w, - validatorService: vs, - } - expectedKeys, err := km.FetchValidatingPublicKeys(ctx) - require.NoError(t, err) - - t.Run("returns proper data with existing pub keystores", func(t *testing.T) { - resp, err := s.ListRemoteKeys(context.Background(), &empty.Empty{}) - require.NoError(t, err) - for i := 0; i < len(resp.Data); i++ { - require.DeepEqual(t, expectedKeys[i][:], resp.Data[i].Pubkey) - } - }) -} - -func TestServer_ImportRemoteKeys(t *testing.T) { - t.Run("wallet not ready", func(t *testing.T) { - s := Server{} - _, err := s.ListKeystores(context.Background(), &empty.Empty{}) - require.ErrorContains(t, "Prysm Wallet not initialized. Please create a new wallet.", err) - }) - ctx := context.Background() - w := wallet.NewWalletForWeb3Signer() - root := make([]byte, fieldparams.RootLength) - root[0] = 1 - config := &remoteweb3signer.SetupConfig{ - BaseEndpoint: "http://example.com", - GenesisValidatorsRoot: root, - ProvidedPublicKeys: nil, - } - km, err := w.InitializeKeymanager(ctx, iface.InitKeymanagerConfig{ListenForChanges: false, Web3SignerConfig: config}) - require.NoError(t, err) - vs, err := client.NewValidatorService(ctx, &client.Config{ - Wallet: w, - Validator: &mock.MockValidator{ - Km: km, - }, - Web3SignerConfig: config, - }) - require.NoError(t, err) - s := &Server{ - walletInitialized: true, - wallet: w, - validatorService: vs, - } - bytevalue, err := hexutil.Decode("0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a") - require.NoError(t, err) - remoteKeys := []*ethpbservice.ImportRemoteKeysRequest_Keystore{ - { - Pubkey: bytevalue, - }, - } - - t.Run("returns proper data with existing pub keystores", func(t *testing.T) { - resp, err := s.ImportRemoteKeys(context.Background(), ðpbservice.ImportRemoteKeysRequest{ - RemoteKeys: remoteKeys, - }) - expectedStatuses := []*ethpbservice.ImportedRemoteKeysStatus{ - { - Status: ethpbservice.ImportedRemoteKeysStatus_IMPORTED, - Message: fmt.Sprintf("Successfully added pubkey: %v", hexutil.Encode(bytevalue)), - }, - } - require.NoError(t, err) - for i := 0; i < len(resp.Data); i++ { - require.DeepEqual(t, expectedStatuses[i], resp.Data[i]) - } - }) -} - -func TestServer_DeleteRemoteKeys(t *testing.T) { - t.Run("wallet not ready", func(t *testing.T) { - s := Server{} - _, err := s.ListKeystores(context.Background(), &empty.Empty{}) - require.ErrorContains(t, "Prysm Wallet not initialized. Please create a new wallet.", err) - }) - ctx := context.Background() - w := wallet.NewWalletForWeb3Signer() - root := make([]byte, fieldparams.RootLength) - root[0] = 1 - bytevalue, err := hexutil.Decode("0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a") - require.NoError(t, err) - pubkeys := [][fieldparams.BLSPubkeyLength]byte{bytesutil.ToBytes48(bytevalue)} - config := &remoteweb3signer.SetupConfig{ - BaseEndpoint: "http://example.com", - GenesisValidatorsRoot: root, - ProvidedPublicKeys: pubkeys, - } - km, err := w.InitializeKeymanager(ctx, iface.InitKeymanagerConfig{ListenForChanges: false, Web3SignerConfig: config}) - require.NoError(t, err) - vs, err := client.NewValidatorService(ctx, &client.Config{ - Wallet: w, - Validator: &mock.MockValidator{ - Km: km, - }, - Web3SignerConfig: config, - }) - require.NoError(t, err) - s := &Server{ - walletInitialized: true, - wallet: w, - validatorService: vs, - } - - t.Run("returns proper data with existing pub keystores", func(t *testing.T) { - resp, err := s.DeleteRemoteKeys(context.Background(), ðpbservice.DeleteRemoteKeysRequest{ - Pubkeys: [][]byte{bytevalue}, - }) - expectedStatuses := []*ethpbservice.DeletedRemoteKeysStatus{ - { - Status: ethpbservice.DeletedRemoteKeysStatus_DELETED, - Message: fmt.Sprintf("Successfully deleted pubkey: %v", hexutil.Encode(bytevalue)), - }, - } - require.NoError(t, err) - for i := 0; i < len(resp.Data); i++ { - require.DeepEqual(t, expectedStatuses[i], resp.Data[i]) - - } - expectedKeys, err := km.FetchValidatingPublicKeys(ctx) - require.NoError(t, err) - require.Equal(t, 0, len(expectedKeys)) - }) -} - func TestServer_ListFeeRecipientByPubkey(t *testing.T) { ctx := context.Background() byteval, err := hexutil.Decode("0xaf2e7ba294e03438ea819bd4033c6c1bf6b04320ee2075b77273c08d02f8a61bcc303c2c06bd3713cb442072ae591493") diff --git a/validator/rpc/structs.go b/validator/rpc/structs.go index e377c4923e..241356fd19 100644 --- a/validator/rpc/structs.go +++ b/validator/rpc/structs.go @@ -1,7 +1,33 @@ package rpc -import "github.com/prysmaticlabs/prysm/v4/beacon-chain/rpc/eth/shared" +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"` } + +// 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"` +}