diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..f05c90f --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,30 @@ +name: Go + +on: + push: + branches: [ main ] + paths: + - 'support-service/**' + pull_request: + paths: + - 'support-service/**' + +jobs: + build: + runs-on: ubuntu-latest + defaults: + run: + working-directory: support-service + steps: + - uses: actions/checkout@v2 + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.16 + + - name: Build + run: go build -v ./... + + - name: Test + run: go test -v ./... \ No newline at end of file diff --git a/buf.gen.yaml b/buf.gen.yaml deleted file mode 100644 index 41ab3ff..0000000 --- a/buf.gen.yaml +++ /dev/null @@ -1 +0,0 @@ -version: v1beta1 diff --git a/support-service/Makefile b/support-service/Makefile new file mode 100644 index 0000000..78c01a7 --- /dev/null +++ b/support-service/Makefile @@ -0,0 +1,4 @@ +proto-gen: + buf generate + mv github.com/regen-network/keystone/support-service/* . + rm -rf github.com/ diff --git a/support-service/account.pb.go b/support-service/account.pb.go new file mode 100644 index 0000000..99b4cea --- /dev/null +++ b/support-service/account.pb.go @@ -0,0 +1,245 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.15.2 +// source: regen/keystone/v1alpha1/account.proto + +package support_service + +import ( + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + anypb "google.golang.org/protobuf/types/known/anypb" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type AccountServiceBootstrapRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PubKey *anypb.Any `protobuf:"bytes,1,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"` +} + +func (x *AccountServiceBootstrapRequest) Reset() { + *x = AccountServiceBootstrapRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_keystone_v1alpha1_account_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccountServiceBootstrapRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccountServiceBootstrapRequest) ProtoMessage() {} + +func (x *AccountServiceBootstrapRequest) ProtoReflect() protoreflect.Message { + mi := &file_regen_keystone_v1alpha1_account_proto_msgTypes[0] + 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 AccountServiceBootstrapRequest.ProtoReflect.Descriptor instead. +func (*AccountServiceBootstrapRequest) Descriptor() ([]byte, []int) { + return file_regen_keystone_v1alpha1_account_proto_rawDescGZIP(), []int{0} +} + +func (x *AccountServiceBootstrapRequest) GetPubKey() *anypb.Any { + if x != nil { + return x.PubKey + } + return nil +} + +type AccountServiceBootstrapResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AccountAddress string `protobuf:"bytes,1,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` + KeyAddress string `protobuf:"bytes,2,opt,name=key_address,json=keyAddress,proto3" json:"key_address,omitempty"` +} + +func (x *AccountServiceBootstrapResponse) Reset() { + *x = AccountServiceBootstrapResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_keystone_v1alpha1_account_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AccountServiceBootstrapResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AccountServiceBootstrapResponse) ProtoMessage() {} + +func (x *AccountServiceBootstrapResponse) ProtoReflect() protoreflect.Message { + mi := &file_regen_keystone_v1alpha1_account_proto_msgTypes[1] + 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 AccountServiceBootstrapResponse.ProtoReflect.Descriptor instead. +func (*AccountServiceBootstrapResponse) Descriptor() ([]byte, []int) { + return file_regen_keystone_v1alpha1_account_proto_rawDescGZIP(), []int{1} +} + +func (x *AccountServiceBootstrapResponse) GetAccountAddress() string { + if x != nil { + return x.AccountAddress + } + return "" +} + +func (x *AccountServiceBootstrapResponse) GetKeyAddress() string { + if x != nil { + return x.KeyAddress + } + return "" +} + +var File_regen_keystone_v1alpha1_account_proto protoreflect.FileDescriptor + +var file_regen_keystone_v1alpha1_account_proto_rawDesc = []byte{ + 0x0a, 0x25, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x6e, 0x65, + 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x6b, + 0x65, 0x79, 0x73, 0x74, 0x6f, 0x6e, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4f, 0x0a, 0x1e, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x6f, 0x6f, + 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, + 0x07, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x22, 0x6b, 0x0a, 0x1f, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x6f, + 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x27, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6b, 0x65, 0x79, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6b, + 0x65, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x32, 0x90, 0x01, 0x0a, 0x0e, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7e, 0x0a, 0x09, + 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x12, 0x37, 0x2e, 0x72, 0x65, 0x67, 0x65, + 0x6e, 0x2e, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x6e, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x6b, 0x65, 0x79, 0x73, 0x74, + 0x6f, 0x6e, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x6f, 0x6f, 0x74, 0x73, + 0x74, 0x72, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x33, 0x5a, 0x31, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, + 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x6e, + 0x65, 0x2f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_regen_keystone_v1alpha1_account_proto_rawDescOnce sync.Once + file_regen_keystone_v1alpha1_account_proto_rawDescData = file_regen_keystone_v1alpha1_account_proto_rawDesc +) + +func file_regen_keystone_v1alpha1_account_proto_rawDescGZIP() []byte { + file_regen_keystone_v1alpha1_account_proto_rawDescOnce.Do(func() { + file_regen_keystone_v1alpha1_account_proto_rawDescData = protoimpl.X.CompressGZIP(file_regen_keystone_v1alpha1_account_proto_rawDescData) + }) + return file_regen_keystone_v1alpha1_account_proto_rawDescData +} + +var file_regen_keystone_v1alpha1_account_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_regen_keystone_v1alpha1_account_proto_goTypes = []interface{}{ + (*AccountServiceBootstrapRequest)(nil), // 0: regen.keystone.v1alpha1.AccountServiceBootstrapRequest + (*AccountServiceBootstrapResponse)(nil), // 1: regen.keystone.v1alpha1.AccountServiceBootstrapResponse + (*anypb.Any)(nil), // 2: google.protobuf.Any +} +var file_regen_keystone_v1alpha1_account_proto_depIdxs = []int32{ + 2, // 0: regen.keystone.v1alpha1.AccountServiceBootstrapRequest.pub_key:type_name -> google.protobuf.Any + 0, // 1: regen.keystone.v1alpha1.AccountService.Bootstrap:input_type -> regen.keystone.v1alpha1.AccountServiceBootstrapRequest + 1, // 2: regen.keystone.v1alpha1.AccountService.Bootstrap:output_type -> regen.keystone.v1alpha1.AccountServiceBootstrapResponse + 2, // [2:3] is the sub-list for method output_type + 1, // [1:2] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_regen_keystone_v1alpha1_account_proto_init() } +func file_regen_keystone_v1alpha1_account_proto_init() { + if File_regen_keystone_v1alpha1_account_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_regen_keystone_v1alpha1_account_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AccountServiceBootstrapRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_keystone_v1alpha1_account_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AccountServiceBootstrapResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_regen_keystone_v1alpha1_account_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_regen_keystone_v1alpha1_account_proto_goTypes, + DependencyIndexes: file_regen_keystone_v1alpha1_account_proto_depIdxs, + MessageInfos: file_regen_keystone_v1alpha1_account_proto_msgTypes, + }.Build() + File_regen_keystone_v1alpha1_account_proto = out.File + file_regen_keystone_v1alpha1_account_proto_rawDesc = nil + file_regen_keystone_v1alpha1_account_proto_goTypes = nil + file_regen_keystone_v1alpha1_account_proto_depIdxs = nil +} diff --git a/support-service/account/service.go b/support-service/account/service.go new file mode 100644 index 0000000..3ed6032 --- /dev/null +++ b/support-service/account/service.go @@ -0,0 +1,16 @@ +package account + +import ( + context "context" + support_service "github.com/regen-network/keystone/support-service" +) + +type service struct { + *support_service.UnimplementedAccountServiceServer +} + +var _ support_service.AccountServiceServer = service{} + +func (s service) Bootstrap(ctx context.Context, request *support_service.AccountServiceBootstrapRequest) (*support_service.AccountServiceBootstrapResponse, error) { + return nil, nil +} diff --git a/support-service/account_grpc.pb.go b/support-service/account_grpc.pb.go new file mode 100644 index 0000000..9383c67 --- /dev/null +++ b/support-service/account_grpc.pb.go @@ -0,0 +1,90 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package support_service + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// AccountServiceClient is the client API for AccountService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type AccountServiceClient interface { + Bootstrap(ctx context.Context, in *AccountServiceBootstrapRequest, opts ...grpc.CallOption) (*AccountServiceBootstrapResponse, error) +} + +type accountServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewAccountServiceClient(cc grpc.ClientConnInterface) AccountServiceClient { + return &accountServiceClient{cc} +} + +func (c *accountServiceClient) Bootstrap(ctx context.Context, in *AccountServiceBootstrapRequest, opts ...grpc.CallOption) (*AccountServiceBootstrapResponse, error) { + out := new(AccountServiceBootstrapResponse) + err := c.cc.Invoke(ctx, "/regen.keystone.v1alpha1.AccountService/Bootstrap", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AccountServiceServer is the server API for AccountService service. +// All implementations must embed UnimplementedAccountServiceServer +// for forward compatibility +type AccountServiceServer interface { + Bootstrap(context.Context, *AccountServiceBootstrapRequest) (*AccountServiceBootstrapResponse, error) + mustEmbedUnimplementedAccountServiceServer() +} + +// UnimplementedAccountServiceServer must be embedded to have forward compatible implementations. +type UnimplementedAccountServiceServer struct { +} + +func (*UnimplementedAccountServiceServer) Bootstrap(context.Context, *AccountServiceBootstrapRequest) (*AccountServiceBootstrapResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Bootstrap not implemented") +} +func (*UnimplementedAccountServiceServer) mustEmbedUnimplementedAccountServiceServer() {} + +func RegisterAccountServiceServer(s *grpc.Server, srv AccountServiceServer) { + s.RegisterService(&_AccountService_serviceDesc, srv) +} + +func _AccountService_Bootstrap_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AccountServiceBootstrapRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AccountServiceServer).Bootstrap(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/regen.keystone.v1alpha1.AccountService/Bootstrap", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AccountServiceServer).Bootstrap(ctx, req.(*AccountServiceBootstrapRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _AccountService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "regen.keystone.v1alpha1.AccountService", + HandlerType: (*AccountServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Bootstrap", + Handler: _AccountService_Bootstrap_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "regen/keystone/v1alpha1/account.proto", +} diff --git a/support-service/buf.gen.yaml b/support-service/buf.gen.yaml new file mode 100644 index 0000000..372fcc1 --- /dev/null +++ b/support-service/buf.gen.yaml @@ -0,0 +1,8 @@ +version: v1beta1 +plugins: + - name: go + out: . + - name: go-grpc + out: . + + diff --git a/buf.yaml b/support-service/buf.yaml similarity index 100% rename from buf.yaml rename to support-service/buf.yaml diff --git a/support-service/go.mod b/support-service/go.mod new file mode 100644 index 0000000..3e9251c --- /dev/null +++ b/support-service/go.mod @@ -0,0 +1,9 @@ +module github.com/regen-network/keystone/support-service + +go 1.16 + +require ( + github.com/golang/protobuf v1.4.2 // indirect + google.golang.org/grpc v1.36.1 // indirect + google.golang.org/protobuf v1.25.0 // indirect +) diff --git a/support-service/go.sum b/support-service/go.sum new file mode 100644 index 0000000..0f6d5d0 --- /dev/null +++ b/support-service/go.sum @@ -0,0 +1,82 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.36.1 h1:cmUfbeGKnz9+2DD/UYsMQXeqbHZqZDs4eQwW0sFOpBY= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/support-service/network.pb.go b/support-service/network.pb.go new file mode 100644 index 0000000..22d9087 --- /dev/null +++ b/support-service/network.pb.go @@ -0,0 +1,313 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0 +// protoc v3.15.2 +// source: regen/keystone/v1alpha1/network.proto + +package support_service + +import ( + proto "github.com/golang/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 + +type NetworkServiceListRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *NetworkServiceListRequest) Reset() { + *x = NetworkServiceListRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_keystone_v1alpha1_network_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NetworkServiceListRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NetworkServiceListRequest) ProtoMessage() {} + +func (x *NetworkServiceListRequest) ProtoReflect() protoreflect.Message { + mi := &file_regen_keystone_v1alpha1_network_proto_msgTypes[0] + 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 NetworkServiceListRequest.ProtoReflect.Descriptor instead. +func (*NetworkServiceListRequest) Descriptor() ([]byte, []int) { + return file_regen_keystone_v1alpha1_network_proto_rawDescGZIP(), []int{0} +} + +type NetworkServiceListResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Networks []*NetworkInfo `protobuf:"bytes,1,rep,name=networks,proto3" json:"networks,omitempty"` +} + +func (x *NetworkServiceListResponse) Reset() { + *x = NetworkServiceListResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_keystone_v1alpha1_network_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NetworkServiceListResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NetworkServiceListResponse) ProtoMessage() {} + +func (x *NetworkServiceListResponse) ProtoReflect() protoreflect.Message { + mi := &file_regen_keystone_v1alpha1_network_proto_msgTypes[1] + 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 NetworkServiceListResponse.ProtoReflect.Descriptor instead. +func (*NetworkServiceListResponse) Descriptor() ([]byte, []int) { + return file_regen_keystone_v1alpha1_network_proto_rawDescGZIP(), []int{1} +} + +func (x *NetworkServiceListResponse) GetNetworks() []*NetworkInfo { + if x != nil { + return x.Networks + } + return nil +} + +type NetworkInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + TendermintRpcUrl string `protobuf:"bytes,3,opt,name=tendermint_rpc_url,json=tendermintRpcUrl,proto3" json:"tendermint_rpc_url,omitempty"` + GrpcUrl string `protobuf:"bytes,4,opt,name=grpc_url,json=grpcUrl,proto3" json:"grpc_url,omitempty"` +} + +func (x *NetworkInfo) Reset() { + *x = NetworkInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_regen_keystone_v1alpha1_network_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NetworkInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NetworkInfo) ProtoMessage() {} + +func (x *NetworkInfo) ProtoReflect() protoreflect.Message { + mi := &file_regen_keystone_v1alpha1_network_proto_msgTypes[2] + 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 NetworkInfo.ProtoReflect.Descriptor instead. +func (*NetworkInfo) Descriptor() ([]byte, []int) { + return file_regen_keystone_v1alpha1_network_proto_rawDescGZIP(), []int{2} +} + +func (x *NetworkInfo) GetChainId() string { + if x != nil { + return x.ChainId + } + return "" +} + +func (x *NetworkInfo) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *NetworkInfo) GetTendermintRpcUrl() string { + if x != nil { + return x.TendermintRpcUrl + } + return "" +} + +func (x *NetworkInfo) GetGrpcUrl() string { + if x != nil { + return x.GrpcUrl + } + return "" +} + +var File_regen_keystone_v1alpha1_network_proto protoreflect.FileDescriptor + +var file_regen_keystone_v1alpha1_network_proto_rawDesc = []byte{ + 0x0a, 0x25, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2f, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x6e, 0x65, + 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x6b, + 0x65, 0x79, 0x73, 0x74, 0x6f, 0x6e, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x22, 0x1b, 0x0a, 0x19, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x5e, 0x0a, + 0x1a, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, + 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, + 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x6e, 0x65, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x22, 0x94, 0x01, + 0x0a, 0x0b, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x19, 0x0a, + 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, + 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x74, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x74, 0x5f, 0x72, 0x70, 0x63, 0x5f, 0x75, 0x72, + 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x6d, + 0x69, 0x6e, 0x74, 0x52, 0x70, 0x63, 0x55, 0x72, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x70, + 0x63, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x70, + 0x63, 0x55, 0x72, 0x6c, 0x32, 0x81, 0x01, 0x0a, 0x0e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6f, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, + 0x32, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x6e, 0x65, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, + 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x6b, 0x65, 0x79, 0x73, + 0x74, 0x6f, 0x6e, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x6e, 0x2d, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x6b, 0x65, 0x79, 0x73, 0x74, 0x6f, 0x6e, 0x65, 0x2f, 0x73, 0x75, + 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_regen_keystone_v1alpha1_network_proto_rawDescOnce sync.Once + file_regen_keystone_v1alpha1_network_proto_rawDescData = file_regen_keystone_v1alpha1_network_proto_rawDesc +) + +func file_regen_keystone_v1alpha1_network_proto_rawDescGZIP() []byte { + file_regen_keystone_v1alpha1_network_proto_rawDescOnce.Do(func() { + file_regen_keystone_v1alpha1_network_proto_rawDescData = protoimpl.X.CompressGZIP(file_regen_keystone_v1alpha1_network_proto_rawDescData) + }) + return file_regen_keystone_v1alpha1_network_proto_rawDescData +} + +var file_regen_keystone_v1alpha1_network_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_regen_keystone_v1alpha1_network_proto_goTypes = []interface{}{ + (*NetworkServiceListRequest)(nil), // 0: regen.keystone.v1alpha1.NetworkServiceListRequest + (*NetworkServiceListResponse)(nil), // 1: regen.keystone.v1alpha1.NetworkServiceListResponse + (*NetworkInfo)(nil), // 2: regen.keystone.v1alpha1.NetworkInfo +} +var file_regen_keystone_v1alpha1_network_proto_depIdxs = []int32{ + 2, // 0: regen.keystone.v1alpha1.NetworkServiceListResponse.networks:type_name -> regen.keystone.v1alpha1.NetworkInfo + 0, // 1: regen.keystone.v1alpha1.NetworkService.List:input_type -> regen.keystone.v1alpha1.NetworkServiceListRequest + 1, // 2: regen.keystone.v1alpha1.NetworkService.List:output_type -> regen.keystone.v1alpha1.NetworkServiceListResponse + 2, // [2:3] is the sub-list for method output_type + 1, // [1:2] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_regen_keystone_v1alpha1_network_proto_init() } +func file_regen_keystone_v1alpha1_network_proto_init() { + if File_regen_keystone_v1alpha1_network_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_regen_keystone_v1alpha1_network_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NetworkServiceListRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_keystone_v1alpha1_network_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NetworkServiceListResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_regen_keystone_v1alpha1_network_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NetworkInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_regen_keystone_v1alpha1_network_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_regen_keystone_v1alpha1_network_proto_goTypes, + DependencyIndexes: file_regen_keystone_v1alpha1_network_proto_depIdxs, + MessageInfos: file_regen_keystone_v1alpha1_network_proto_msgTypes, + }.Build() + File_regen_keystone_v1alpha1_network_proto = out.File + file_regen_keystone_v1alpha1_network_proto_rawDesc = nil + file_regen_keystone_v1alpha1_network_proto_goTypes = nil + file_regen_keystone_v1alpha1_network_proto_depIdxs = nil +} diff --git a/support-service/network/service.go b/support-service/network/service.go new file mode 100644 index 0000000..6185368 --- /dev/null +++ b/support-service/network/service.go @@ -0,0 +1,19 @@ +package network + +import ( + "context" + support_service "github.com/regen-network/keystone/support-service" +) + +type service struct { + *support_service.UnimplementedNetworkServiceServer + networks []*support_service.NetworkInfo +} + +var _ support_service.NetworkServiceServer = service{} + +func (s service) List(context.Context, *support_service.NetworkServiceListRequest) (*support_service.NetworkServiceListResponse, error) { + return &support_service.NetworkServiceListResponse{ + Networks: s.networks, + }, nil +} diff --git a/support-service/network_grpc.pb.go b/support-service/network_grpc.pb.go new file mode 100644 index 0000000..f1fff27 --- /dev/null +++ b/support-service/network_grpc.pb.go @@ -0,0 +1,90 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package support_service + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// NetworkServiceClient is the client API for NetworkService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type NetworkServiceClient interface { + List(ctx context.Context, in *NetworkServiceListRequest, opts ...grpc.CallOption) (*NetworkServiceListResponse, error) +} + +type networkServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewNetworkServiceClient(cc grpc.ClientConnInterface) NetworkServiceClient { + return &networkServiceClient{cc} +} + +func (c *networkServiceClient) List(ctx context.Context, in *NetworkServiceListRequest, opts ...grpc.CallOption) (*NetworkServiceListResponse, error) { + out := new(NetworkServiceListResponse) + err := c.cc.Invoke(ctx, "/regen.keystone.v1alpha1.NetworkService/List", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// NetworkServiceServer is the server API for NetworkService service. +// All implementations must embed UnimplementedNetworkServiceServer +// for forward compatibility +type NetworkServiceServer interface { + List(context.Context, *NetworkServiceListRequest) (*NetworkServiceListResponse, error) + mustEmbedUnimplementedNetworkServiceServer() +} + +// UnimplementedNetworkServiceServer must be embedded to have forward compatible implementations. +type UnimplementedNetworkServiceServer struct { +} + +func (*UnimplementedNetworkServiceServer) List(context.Context, *NetworkServiceListRequest) (*NetworkServiceListResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method List not implemented") +} +func (*UnimplementedNetworkServiceServer) mustEmbedUnimplementedNetworkServiceServer() {} + +func RegisterNetworkServiceServer(s *grpc.Server, srv NetworkServiceServer) { + s.RegisterService(&_NetworkService_serviceDesc, srv) +} + +func _NetworkService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(NetworkServiceListRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NetworkServiceServer).List(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/regen.keystone.v1alpha1.NetworkService/List", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NetworkServiceServer).List(ctx, req.(*NetworkServiceListRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _NetworkService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "regen.keystone.v1alpha1.NetworkService", + HandlerType: (*NetworkServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "List", + Handler: _NetworkService_List_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "regen/keystone/v1alpha1/network.proto", +} diff --git a/support-service/proto/regen/keystone/v1alpha1/account.proto b/support-service/proto/regen/keystone/v1alpha1/account.proto new file mode 100644 index 0000000..2c86288 --- /dev/null +++ b/support-service/proto/regen/keystone/v1alpha1/account.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; + +package regen.keystone.v1alpha1; + +import "google/protobuf/any.proto"; + +option go_package = "github.com/regen-network/keystone/support-service"; + +service AccountService { + rpc Bootstrap(AccountServiceBootstrapRequest) returns (AccountServiceBootstrapResponse); +} + +message AccountServiceBootstrapRequest { + google.protobuf.Any pub_key = 1; +} + +message AccountServiceBootstrapResponse { + string account_address = 1; + string key_address = 2; +} + + diff --git a/support-service/proto/regen/keystone/v1alpha1/network.proto b/support-service/proto/regen/keystone/v1alpha1/network.proto new file mode 100644 index 0000000..17cf931 --- /dev/null +++ b/support-service/proto/regen/keystone/v1alpha1/network.proto @@ -0,0 +1,24 @@ +syntax = "proto3"; + +package regen.keystone.v1alpha1; + +option go_package = "github.com/regen-network/keystone/support-service"; + +service NetworkService { + rpc List (NetworkServiceListRequest) returns (NetworkServiceListResponse); +} + +message NetworkServiceListRequest { } + +message NetworkServiceListResponse { + repeated NetworkInfo networks = 1; +} + +message NetworkInfo { + string chain_id = 1; + string display_name = 2; + string tendermint_rpc_url = 3; + string grpc_url = 4; +} + +