Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
MetaProtocol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nebula
MetaProtocol
Commits
91a1a7d0
Commit
91a1a7d0
authored
2 years ago
by
Ubuntu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add nonce grpc for ring
parent
091336f1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
68 additions
and
23 deletions
+68
-23
service.pb.go
gen/proto/go/ring/v1/service.pb.go
+31
-23
service_grpc.pb.go
gen/proto/go/ring/v1/service_grpc.pb.go
+36
-0
service.proto
ringapi/ring/v1/service.proto
+1
-0
No files found.
gen/proto/go/ring/v1/service.pb.go
View file @
91a1a7d0
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
gen/proto/go/ring/v1/service_grpc.pb.go
View file @
91a1a7d0
...
...
@@ -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"
,
...
...
This diff is collapsed.
Click to expand it.
ringapi/ring/v1/service.proto
View file @
91a1a7d0
...
...
@@ -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
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment