diff --git a/gen/proto/go/ring/v1/service.pb.go b/gen/proto/go/ring/v1/service.pb.go index 85700427de758fd242f53f6d91f04c5532c40ff6..e2f65bec410aecd0efcfb999116af25c93c4f56d 100644 --- a/gen/proto/go/ring/v1/service.pb.go +++ b/gen/proto/go/ring/v1/service.pb.go @@ -33,36 +33,44 @@ var file_ring_v1_service_proto_rawDesc = []byte{ 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x5f, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x6e, 0x0a, 0x0b, 0x52, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x5f, 0x0a, 0x12, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x61, 0x77, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x72, 0x69, 0x6e, 0x67, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, - 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x61, 0x77, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x42, 0xa7, 0x01, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x69, 0x6e, - 0x67, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x43, 0x61, 0x64, 0x75, 0x63, 0x65, 0x75, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x76, 0x65, 0x72, - 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x3b, 0x72, 0x69, 0x6e, - 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x52, 0x58, 0x58, 0xaa, 0x02, 0x07, 0x52, 0x69, 0x6e, 0x67, - 0x2e, 0x56, 0x31, 0xca, 0x02, 0x07, 0x52, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x13, - 0x52, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x08, 0x52, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xa8, 0x01, 0x0a, 0x0b, 0x52, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x5f, 0x0a, 0x12, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x61, 0x77, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x72, 0x69, 0x6e, + 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, + 0x2e, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x61, 0x77, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x05, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x15, + 0x2e, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, + 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, + 0xa7, 0x01, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x42, + 0x0c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x4d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x61, 0x64, 0x75, + 0x63, 0x65, 0x75, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, + 0x72, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x3b, 0x72, 0x69, 0x6e, 0x67, 0x76, 0x31, 0xa2, 0x02, + 0x03, 0x52, 0x58, 0x58, 0xaa, 0x02, 0x07, 0x52, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0xca, 0x02, + 0x07, 0x52, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x13, 0x52, 0x69, 0x6e, 0x67, 0x5c, + 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, + 0x08, 0x52, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var file_ring_v1_service_proto_goTypes = []interface{}{ (*SendRawTransactionRequest)(nil), // 0: ring.v1.SendRawTransactionRequest - (*SendRawTransactionResponse)(nil), // 1: ring.v1.SendRawTransactionResponse + (*NonceRequest)(nil), // 1: ring.v1.NonceRequest + (*SendRawTransactionResponse)(nil), // 2: ring.v1.SendRawTransactionResponse + (*NonceResponse)(nil), // 3: ring.v1.NonceResponse } var file_ring_v1_service_proto_depIdxs = []int32{ 0, // 0: ring.v1.RingService.SendRawTransaction:input_type -> ring.v1.SendRawTransactionRequest - 1, // 1: ring.v1.RingService.SendRawTransaction:output_type -> ring.v1.SendRawTransactionResponse - 1, // [1:2] is the sub-list for method output_type - 0, // [0:1] is the sub-list for method input_type + 1, // 1: ring.v1.RingService.Nonce:input_type -> ring.v1.NonceRequest + 2, // 2: ring.v1.RingService.SendRawTransaction:output_type -> ring.v1.SendRawTransactionResponse + 3, // 3: ring.v1.RingService.Nonce:output_type -> ring.v1.NonceResponse + 2, // [2:4] is the sub-list for method output_type + 0, // [0:2] 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 diff --git a/gen/proto/go/ring/v1/service_grpc.pb.go b/gen/proto/go/ring/v1/service_grpc.pb.go index 507065e72a47df906bdaef9494c1a44f774aaebc..e7349782129adcd381e4ef4a1d605252fd515af6 100644 --- a/gen/proto/go/ring/v1/service_grpc.pb.go +++ b/gen/proto/go/ring/v1/service_grpc.pb.go @@ -24,6 +24,7 @@ const _ = grpc.SupportPackageIsVersion7 type RingServiceClient interface { // account info service SendRawTransaction(ctx context.Context, in *SendRawTransactionRequest, opts ...grpc.CallOption) (*SendRawTransactionResponse, error) + Nonce(ctx context.Context, in *NonceRequest, opts ...grpc.CallOption) (*NonceResponse, error) } type ringServiceClient struct { @@ -43,12 +44,22 @@ func (c *ringServiceClient) SendRawTransaction(ctx context.Context, in *SendRawT return out, nil } +func (c *ringServiceClient) Nonce(ctx context.Context, in *NonceRequest, opts ...grpc.CallOption) (*NonceResponse, error) { + out := new(NonceResponse) + err := c.cc.Invoke(ctx, "/ring.v1.RingService/Nonce", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // RingServiceServer is the server API for RingService service. // All implementations must embed UnimplementedRingServiceServer // for forward compatibility type RingServiceServer interface { // account info service SendRawTransaction(context.Context, *SendRawTransactionRequest) (*SendRawTransactionResponse, error) + Nonce(context.Context, *NonceRequest) (*NonceResponse, error) mustEmbedUnimplementedRingServiceServer() } @@ -59,6 +70,9 @@ type UnimplementedRingServiceServer struct { func (UnimplementedRingServiceServer) SendRawTransaction(context.Context, *SendRawTransactionRequest) (*SendRawTransactionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SendRawTransaction not implemented") } +func (UnimplementedRingServiceServer) Nonce(context.Context, *NonceRequest) (*NonceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Nonce not implemented") +} func (UnimplementedRingServiceServer) mustEmbedUnimplementedRingServiceServer() {} // UnsafeRingServiceServer may be embedded to opt out of forward compatibility for this service. @@ -90,6 +104,24 @@ func _RingService_SendRawTransaction_Handler(srv interface{}, ctx context.Contex return interceptor(ctx, in, info, handler) } +func _RingService_Nonce_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(NonceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RingServiceServer).Nonce(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ring.v1.RingService/Nonce", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RingServiceServer).Nonce(ctx, req.(*NonceRequest)) + } + return interceptor(ctx, in, info, handler) +} + // RingService_ServiceDesc is the grpc.ServiceDesc for RingService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -101,6 +133,10 @@ var RingService_ServiceDesc = grpc.ServiceDesc{ MethodName: "SendRawTransaction", Handler: _RingService_SendRawTransaction_Handler, }, + { + MethodName: "Nonce", + Handler: _RingService_Nonce_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "ring/v1/service.proto", diff --git a/ringapi/ring/v1/service.proto b/ringapi/ring/v1/service.proto index e1ca6430419795ae3fff040d5a603e0f24d51acb..2a6c7d1cfd6af129ff220536c416ea0c355f062e 100644 --- a/ringapi/ring/v1/service.proto +++ b/ringapi/ring/v1/service.proto @@ -11,5 +11,6 @@ service RingService{ // account info service rpc SendRawTransaction(SendRawTransactionRequest) returns (SendRawTransactionResponse) {}; + rpc Nonce(NonceRequest) returns (NonceResponse) {}; } \ No newline at end of file