From 75ae285cb2a3731ea6b97b6d74a99a2e4c7cc395 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20R=C3=B3=C5=BCa=C5=84ski?= Date: Tue, 28 Mar 2023 17:17:56 +0200 Subject: [PATCH] Removed GatewayService --- release/go/spacemesh/v1/gateway.pb.go | 166 -------------- release/go/spacemesh/v1/gateway.pb.gw.go | 171 --------------- release/go/spacemesh/v1/gateway_types.pb.go | 229 -------------------- spacemesh/v1/api_config.yaml | 5 - spacemesh/v1/gateway.proto | 11 - spacemesh/v1/gateway_types.proto | 13 -- 6 files changed, 595 deletions(-) delete mode 100644 release/go/spacemesh/v1/gateway.pb.go delete mode 100644 release/go/spacemesh/v1/gateway.pb.gw.go delete mode 100644 release/go/spacemesh/v1/gateway_types.pb.go delete mode 100644 spacemesh/v1/gateway.proto delete mode 100644 spacemesh/v1/gateway_types.proto diff --git a/release/go/spacemesh/v1/gateway.pb.go b/release/go/spacemesh/v1/gateway.pb.go deleted file mode 100644 index 3bca8a39..00000000 --- a/release/go/spacemesh/v1/gateway.pb.go +++ /dev/null @@ -1,166 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc v3.21.5 -// source: spacemesh/v1/gateway.proto - -package v1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" -) - -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) -) - -var File_spacemesh_v1_gateway_proto protoreflect.FileDescriptor - -var file_spacemesh_v1_gateway_proto_rawDesc = []byte{ - 0x0a, 0x1a, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x67, - 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x70, 0x0a, 0x0e, - 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5e, - 0x0a, 0x0f, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, - 0x65, 0x12, 0x24, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, - 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, - 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x68, 0x61, - 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x34, - 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x6c, - 0x65, 0x61, 0x73, 0x65, 0x2f, 0x67, 0x6f, 0x2f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, - 0x68, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var file_spacemesh_v1_gateway_proto_goTypes = []interface{}{ - (*VerifyChallengeRequest)(nil), // 0: spacemesh.v1.VerifyChallengeRequest - (*VerifyChallengeResponse)(nil), // 1: spacemesh.v1.VerifyChallengeResponse -} -var file_spacemesh_v1_gateway_proto_depIdxs = []int32{ - 0, // 0: spacemesh.v1.GatewayService.VerifyChallenge:input_type -> spacemesh.v1.VerifyChallengeRequest - 1, // 1: spacemesh.v1.GatewayService.VerifyChallenge:output_type -> spacemesh.v1.VerifyChallengeResponse - 1, // [1:2] is the sub-list for method output_type - 0, // [0:1] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_spacemesh_v1_gateway_proto_init() } -func file_spacemesh_v1_gateway_proto_init() { - if File_spacemesh_v1_gateway_proto != nil { - return - } - file_spacemesh_v1_gateway_types_proto_init() - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_spacemesh_v1_gateway_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_spacemesh_v1_gateway_proto_goTypes, - DependencyIndexes: file_spacemesh_v1_gateway_proto_depIdxs, - }.Build() - File_spacemesh_v1_gateway_proto = out.File - file_spacemesh_v1_gateway_proto_rawDesc = nil - file_spacemesh_v1_gateway_proto_goTypes = nil - file_spacemesh_v1_gateway_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// 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 - -// GatewayServiceClient is the client API for GatewayService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type GatewayServiceClient interface { - // Verify a PoET challenge - VerifyChallenge(ctx context.Context, in *VerifyChallengeRequest, opts ...grpc.CallOption) (*VerifyChallengeResponse, error) -} - -type gatewayServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewGatewayServiceClient(cc grpc.ClientConnInterface) GatewayServiceClient { - return &gatewayServiceClient{cc} -} - -func (c *gatewayServiceClient) VerifyChallenge(ctx context.Context, in *VerifyChallengeRequest, opts ...grpc.CallOption) (*VerifyChallengeResponse, error) { - out := new(VerifyChallengeResponse) - err := c.cc.Invoke(ctx, "/spacemesh.v1.GatewayService/VerifyChallenge", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// GatewayServiceServer is the server API for GatewayService service. -type GatewayServiceServer interface { - // Verify a PoET challenge - VerifyChallenge(context.Context, *VerifyChallengeRequest) (*VerifyChallengeResponse, error) -} - -// UnimplementedGatewayServiceServer can be embedded to have forward compatible implementations. -type UnimplementedGatewayServiceServer struct { -} - -func (*UnimplementedGatewayServiceServer) VerifyChallenge(context.Context, *VerifyChallengeRequest) (*VerifyChallengeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method VerifyChallenge not implemented") -} - -func RegisterGatewayServiceServer(s *grpc.Server, srv GatewayServiceServer) { - s.RegisterService(&_GatewayService_serviceDesc, srv) -} - -func _GatewayService_VerifyChallenge_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(VerifyChallengeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(GatewayServiceServer).VerifyChallenge(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/spacemesh.v1.GatewayService/VerifyChallenge", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(GatewayServiceServer).VerifyChallenge(ctx, req.(*VerifyChallengeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _GatewayService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "spacemesh.v1.GatewayService", - HandlerType: (*GatewayServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "VerifyChallenge", - Handler: _GatewayService_VerifyChallenge_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "spacemesh/v1/gateway.proto", -} diff --git a/release/go/spacemesh/v1/gateway.pb.gw.go b/release/go/spacemesh/v1/gateway.pb.gw.go deleted file mode 100644 index 69118ca7..00000000 --- a/release/go/spacemesh/v1/gateway.pb.gw.go +++ /dev/null @@ -1,171 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: spacemesh/v1/gateway.proto - -/* -Package v1 is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package v1 - -import ( - "context" - "io" - "net/http" - - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join - -func request_GatewayService_VerifyChallenge_0(ctx context.Context, marshaler runtime.Marshaler, client GatewayServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq VerifyChallengeRequest - 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.VerifyChallenge(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_GatewayService_VerifyChallenge_0(ctx context.Context, marshaler runtime.Marshaler, server GatewayServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq VerifyChallengeRequest - 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.VerifyChallenge(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterGatewayServiceHandlerServer registers the http handlers for service GatewayService to "mux". -// UnaryRPC :call GatewayServiceServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterGatewayServiceHandlerFromEndpoint instead. -func RegisterGatewayServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server GatewayServiceServer) error { - - mux.Handle("POST", pattern_GatewayService_VerifyChallenge_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) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/spacemesh.v1.GatewayService/VerifyChallenge", runtime.WithHTTPPathPattern("/v1/gateway/verifychallenge")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_GatewayService_VerifyChallenge_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_GatewayService_VerifyChallenge_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterGatewayServiceHandlerFromEndpoint is same as RegisterGatewayServiceHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterGatewayServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterGatewayServiceHandler(ctx, mux, conn) -} - -// RegisterGatewayServiceHandler registers the http handlers for service GatewayService to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterGatewayServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterGatewayServiceHandlerClient(ctx, mux, NewGatewayServiceClient(conn)) -} - -// RegisterGatewayServiceHandlerClient registers the http handlers for service GatewayService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "GatewayServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "GatewayServiceClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "GatewayServiceClient" to call the correct interceptors. -func RegisterGatewayServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client GatewayServiceClient) error { - - mux.Handle("POST", pattern_GatewayService_VerifyChallenge_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) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/spacemesh.v1.GatewayService/VerifyChallenge", runtime.WithHTTPPathPattern("/v1/gateway/verifychallenge")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_GatewayService_VerifyChallenge_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_GatewayService_VerifyChallenge_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_GatewayService_VerifyChallenge_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "gateway", "verifychallenge"}, "")) -) - -var ( - forward_GatewayService_VerifyChallenge_0 = runtime.ForwardResponseMessage -) diff --git a/release/go/spacemesh/v1/gateway_types.pb.go b/release/go/spacemesh/v1/gateway_types.pb.go deleted file mode 100644 index 2af38e86..00000000 --- a/release/go/spacemesh/v1/gateway_types.pb.go +++ /dev/null @@ -1,229 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.26.0 -// protoc v3.21.5 -// source: spacemesh/v1/gateway_types.proto - -package v1 - -import ( - 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) -) - -type VerifyChallengeRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Challenge []byte `protobuf:"bytes,1,opt,name=challenge,proto3" json:"challenge,omitempty"` - Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` -} - -func (x *VerifyChallengeRequest) Reset() { - *x = VerifyChallengeRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_spacemesh_v1_gateway_types_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *VerifyChallengeRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VerifyChallengeRequest) ProtoMessage() {} - -func (x *VerifyChallengeRequest) ProtoReflect() protoreflect.Message { - mi := &file_spacemesh_v1_gateway_types_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 VerifyChallengeRequest.ProtoReflect.Descriptor instead. -func (*VerifyChallengeRequest) Descriptor() ([]byte, []int) { - return file_spacemesh_v1_gateway_types_proto_rawDescGZIP(), []int{0} -} - -func (x *VerifyChallengeRequest) GetChallenge() []byte { - if x != nil { - return x.Challenge - } - return nil -} - -func (x *VerifyChallengeRequest) GetSignature() []byte { - if x != nil { - return x.Signature - } - return nil -} - -type VerifyChallengeResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - NodeId []byte `protobuf:"bytes,2,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` -} - -func (x *VerifyChallengeResponse) Reset() { - *x = VerifyChallengeResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_spacemesh_v1_gateway_types_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *VerifyChallengeResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VerifyChallengeResponse) ProtoMessage() {} - -func (x *VerifyChallengeResponse) ProtoReflect() protoreflect.Message { - mi := &file_spacemesh_v1_gateway_types_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 VerifyChallengeResponse.ProtoReflect.Descriptor instead. -func (*VerifyChallengeResponse) Descriptor() ([]byte, []int) { - return file_spacemesh_v1_gateway_types_proto_rawDescGZIP(), []int{1} -} - -func (x *VerifyChallengeResponse) GetHash() []byte { - if x != nil { - return x.Hash - } - return nil -} - -func (x *VerifyChallengeResponse) GetNodeId() []byte { - if x != nil { - return x.NodeId - } - return nil -} - -var File_spacemesh_v1_gateway_types_proto protoreflect.FileDescriptor - -var file_spacemesh_v1_gateway_types_proto_rawDesc = []byte{ - 0x0a, 0x20, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2f, 0x76, 0x31, 0x2f, 0x67, - 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x0c, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x2e, 0x76, 0x31, - 0x22, 0x54, 0x0a, 0x16, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, - 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x68, - 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, - 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x46, 0x0a, 0x17, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, - 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x42, 0x34, - 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x6d, 0x65, 0x73, 0x68, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x6c, - 0x65, 0x61, 0x73, 0x65, 0x2f, 0x67, 0x6f, 0x2f, 0x73, 0x70, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x73, - 0x68, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_spacemesh_v1_gateway_types_proto_rawDescOnce sync.Once - file_spacemesh_v1_gateway_types_proto_rawDescData = file_spacemesh_v1_gateway_types_proto_rawDesc -) - -func file_spacemesh_v1_gateway_types_proto_rawDescGZIP() []byte { - file_spacemesh_v1_gateway_types_proto_rawDescOnce.Do(func() { - file_spacemesh_v1_gateway_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_spacemesh_v1_gateway_types_proto_rawDescData) - }) - return file_spacemesh_v1_gateway_types_proto_rawDescData -} - -var file_spacemesh_v1_gateway_types_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_spacemesh_v1_gateway_types_proto_goTypes = []interface{}{ - (*VerifyChallengeRequest)(nil), // 0: spacemesh.v1.VerifyChallengeRequest - (*VerifyChallengeResponse)(nil), // 1: spacemesh.v1.VerifyChallengeResponse -} -var file_spacemesh_v1_gateway_types_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_spacemesh_v1_gateway_types_proto_init() } -func file_spacemesh_v1_gateway_types_proto_init() { - if File_spacemesh_v1_gateway_types_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_spacemesh_v1_gateway_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VerifyChallengeRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_spacemesh_v1_gateway_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VerifyChallengeResponse); 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_spacemesh_v1_gateway_types_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_spacemesh_v1_gateway_types_proto_goTypes, - DependencyIndexes: file_spacemesh_v1_gateway_types_proto_depIdxs, - MessageInfos: file_spacemesh_v1_gateway_types_proto_msgTypes, - }.Build() - File_spacemesh_v1_gateway_types_proto = out.File - file_spacemesh_v1_gateway_types_proto_rawDesc = nil - file_spacemesh_v1_gateway_types_proto_goTypes = nil - file_spacemesh_v1_gateway_types_proto_depIdxs = nil -} diff --git a/spacemesh/v1/api_config.yaml b/spacemesh/v1/api_config.yaml index 8b8cc8f0..e650f6fa 100644 --- a/spacemesh/v1/api_config.yaml +++ b/spacemesh/v1/api_config.yaml @@ -4,11 +4,6 @@ config_version: 3 http: rules: - # GatewayService - - selector: spacemesh.v1.GatewayService.VerifyChallenge - post: "/v1/gateway/verifychallenge" - body: "*" - # DebugService - selector: spacemesh.v1.DebugService.Accounts post: "/v1/debug/accounts" diff --git a/spacemesh/v1/gateway.proto b/spacemesh/v1/gateway.proto deleted file mode 100644 index 0bfeaffe..00000000 --- a/spacemesh/v1/gateway.proto +++ /dev/null @@ -1,11 +0,0 @@ -syntax = "proto3"; -package spacemesh.v1; -option go_package = "github.com/spacemeshos/api/release/go/spacemesh/v1"; - -import "spacemesh/v1/gateway_types.proto"; - -// Exposes poet gateway services -service GatewayService { - // Verify a PoET challenge - rpc VerifyChallenge(VerifyChallengeRequest) returns (VerifyChallengeResponse); -} diff --git a/spacemesh/v1/gateway_types.proto b/spacemesh/v1/gateway_types.proto deleted file mode 100644 index 3df4f0a4..00000000 --- a/spacemesh/v1/gateway_types.proto +++ /dev/null @@ -1,13 +0,0 @@ -syntax = "proto3"; -package spacemesh.v1; -option go_package = "github.com/spacemeshos/api/release/go/spacemesh/v1"; - -message VerifyChallengeRequest { - bytes challenge = 1; - bytes signature = 2; -} - -message VerifyChallengeResponse { - bytes hash = 1; - bytes node_id = 2; -}