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
7b2ea958
Commit
7b2ea958
authored
Nov 23, 2022
by
Ubuntu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replace data with Inner
parent
8177ac74
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
274 additions
and
261 deletions
+274
-261
resource.proto
baseapi/base/v1/resource.proto
+10
-1
chain-v2.png
chain-v2.png
+0
-0
resource.pb.go
gen/proto/go/base/v1/resource.pb.go
+59
-59
service.pb.go
gen/proto/go/ring/v1/service.pb.go
+196
-194
service_grpc.pb.go
gen/proto/go/ring/v1/service_grpc.pb.go
+7
-6
service.proto
ringapi/ring/v1/service.proto
+2
-1
No files found.
baseapi/base/v1/resource.proto
View file @
7b2ea958
...
@@ -22,8 +22,17 @@ message Address {
...
@@ -22,8 +22,17 @@ message Address {
bytes
address
=
1
;
bytes
address
=
1
;
}
}
// // Lengths of hashes and addresses in bytes.
// const (
// // HashLength is the expected length of the hash
// HashLength = 32
// // AddressLength is the expected length of the address
// AddressLength = 20
// )
message
EthTransaction
{
message
EthTransaction
{
Txdata
data
=
1
;
Txdata
Inner
=
1
;
google.protobuf.Timestamp
time
=
2
;
google.protobuf.Timestamp
time
=
2
;
}
}
...
...
chain-v2.png
0 → 100644
View file @
7b2ea958
531 KB
gen/proto/go/base/v1/resource.pb.go
View file @
7b2ea958
This diff is collapsed.
Click to expand it.
gen/proto/go/ring/v1/service.pb.go
View file @
7b2ea958
This diff is collapsed.
Click to expand it.
gen/proto/go/ring/v1/service_grpc.pb.go
View file @
7b2ea958
...
@@ -8,6 +8,7 @@ package ringv1
...
@@ -8,6 +8,7 @@ package ringv1
import
(
import
(
context
"context"
context
"context"
v1
"github.com/CaduceusMetaverseProtocol/metaprotocol/gen/proto/go/base/v1"
grpc
"google.golang.org/grpc"
grpc
"google.golang.org/grpc"
codes
"google.golang.org/grpc/codes"
codes
"google.golang.org/grpc/codes"
status
"google.golang.org/grpc/status"
status
"google.golang.org/grpc/status"
...
@@ -68,7 +69,7 @@ type RingServiceClient interface {
...
@@ -68,7 +69,7 @@ type RingServiceClient interface {
GetCode
(
ctx
context
.
Context
,
in
*
GetCodeRequest
,
opts
...
grpc
.
CallOption
)
(
*
GetCodeResponse
,
error
)
GetCode
(
ctx
context
.
Context
,
in
*
GetCodeRequest
,
opts
...
grpc
.
CallOption
)
(
*
GetCodeResponse
,
error
)
Sign
(
ctx
context
.
Context
,
in
*
SignRequest
,
opts
...
grpc
.
CallOption
)
(
*
SignResponse
,
error
)
Sign
(
ctx
context
.
Context
,
in
*
SignRequest
,
opts
...
grpc
.
CallOption
)
(
*
SignResponse
,
error
)
SignTransaction
(
ctx
context
.
Context
,
in
*
SignTransactionRequest
,
opts
...
grpc
.
CallOption
)
(
*
SignTransactionResponse
,
error
)
SignTransaction
(
ctx
context
.
Context
,
in
*
SignTransactionRequest
,
opts
...
grpc
.
CallOption
)
(
*
SignTransactionResponse
,
error
)
SendTransaction
(
ctx
context
.
Context
,
in
*
SendTransactionRequest
,
opts
...
grpc
.
CallOption
)
(
*
SendTransactionResponse
,
error
)
SendTransaction
(
ctx
context
.
Context
,
in
*
v1
.
EthTransaction
,
opts
...
grpc
.
CallOption
)
(
*
SendTransactionResponse
,
error
)
SendRawTransaction
(
ctx
context
.
Context
,
in
*
SendRawTransactionRequest
,
opts
...
grpc
.
CallOption
)
(
*
SendRawTransactionResponse
,
error
)
SendRawTransaction
(
ctx
context
.
Context
,
in
*
SendRawTransactionRequest
,
opts
...
grpc
.
CallOption
)
(
*
SendRawTransactionResponse
,
error
)
Call
(
ctx
context
.
Context
,
in
*
CallRequest
,
opts
...
grpc
.
CallOption
)
(
*
CallResponse
,
error
)
Call
(
ctx
context
.
Context
,
in
*
CallRequest
,
opts
...
grpc
.
CallOption
)
(
*
CallResponse
,
error
)
// filter
// filter
...
@@ -422,7 +423,7 @@ func (c *ringServiceClient) SignTransaction(ctx context.Context, in *SignTransac
...
@@ -422,7 +423,7 @@ func (c *ringServiceClient) SignTransaction(ctx context.Context, in *SignTransac
return
out
,
nil
return
out
,
nil
}
}
func
(
c
*
ringServiceClient
)
SendTransaction
(
ctx
context
.
Context
,
in
*
SendTransactionRequest
,
opts
...
grpc
.
CallOption
)
(
*
SendTransactionResponse
,
error
)
{
func
(
c
*
ringServiceClient
)
SendTransaction
(
ctx
context
.
Context
,
in
*
v1
.
EthTransaction
,
opts
...
grpc
.
CallOption
)
(
*
SendTransactionResponse
,
error
)
{
out
:=
new
(
SendTransactionResponse
)
out
:=
new
(
SendTransactionResponse
)
err
:=
c
.
cc
.
Invoke
(
ctx
,
"/ring.v1.RingService/SendTransaction"
,
in
,
out
,
opts
...
)
err
:=
c
.
cc
.
Invoke
(
ctx
,
"/ring.v1.RingService/SendTransaction"
,
in
,
out
,
opts
...
)
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -561,7 +562,7 @@ type RingServiceServer interface {
...
@@ -561,7 +562,7 @@ type RingServiceServer interface {
GetCode
(
context
.
Context
,
*
GetCodeRequest
)
(
*
GetCodeResponse
,
error
)
GetCode
(
context
.
Context
,
*
GetCodeRequest
)
(
*
GetCodeResponse
,
error
)
Sign
(
context
.
Context
,
*
SignRequest
)
(
*
SignResponse
,
error
)
Sign
(
context
.
Context
,
*
SignRequest
)
(
*
SignResponse
,
error
)
SignTransaction
(
context
.
Context
,
*
SignTransactionRequest
)
(
*
SignTransactionResponse
,
error
)
SignTransaction
(
context
.
Context
,
*
SignTransactionRequest
)
(
*
SignTransactionResponse
,
error
)
SendTransaction
(
context
.
Context
,
*
SendTransactionRequest
)
(
*
SendTransactionResponse
,
error
)
SendTransaction
(
context
.
Context
,
*
v1
.
EthTransaction
)
(
*
SendTransactionResponse
,
error
)
SendRawTransaction
(
context
.
Context
,
*
SendRawTransactionRequest
)
(
*
SendRawTransactionResponse
,
error
)
SendRawTransaction
(
context
.
Context
,
*
SendRawTransactionRequest
)
(
*
SendRawTransactionResponse
,
error
)
Call
(
context
.
Context
,
*
CallRequest
)
(
*
CallResponse
,
error
)
Call
(
context
.
Context
,
*
CallRequest
)
(
*
CallResponse
,
error
)
// filter
// filter
...
@@ -690,7 +691,7 @@ func (UnimplementedRingServiceServer) Sign(context.Context, *SignRequest) (*Sign
...
@@ -690,7 +691,7 @@ func (UnimplementedRingServiceServer) Sign(context.Context, *SignRequest) (*Sign
func
(
UnimplementedRingServiceServer
)
SignTransaction
(
context
.
Context
,
*
SignTransactionRequest
)
(
*
SignTransactionResponse
,
error
)
{
func
(
UnimplementedRingServiceServer
)
SignTransaction
(
context
.
Context
,
*
SignTransactionRequest
)
(
*
SignTransactionResponse
,
error
)
{
return
nil
,
status
.
Errorf
(
codes
.
Unimplemented
,
"method SignTransaction not implemented"
)
return
nil
,
status
.
Errorf
(
codes
.
Unimplemented
,
"method SignTransaction not implemented"
)
}
}
func
(
UnimplementedRingServiceServer
)
SendTransaction
(
context
.
Context
,
*
SendTransactionRequest
)
(
*
SendTransactionResponse
,
error
)
{
func
(
UnimplementedRingServiceServer
)
SendTransaction
(
context
.
Context
,
*
v1
.
EthTransaction
)
(
*
SendTransactionResponse
,
error
)
{
return
nil
,
status
.
Errorf
(
codes
.
Unimplemented
,
"method SendTransaction not implemented"
)
return
nil
,
status
.
Errorf
(
codes
.
Unimplemented
,
"method SendTransaction not implemented"
)
}
}
func
(
UnimplementedRingServiceServer
)
SendRawTransaction
(
context
.
Context
,
*
SendRawTransactionRequest
)
(
*
SendRawTransactionResponse
,
error
)
{
func
(
UnimplementedRingServiceServer
)
SendRawTransaction
(
context
.
Context
,
*
SendRawTransactionRequest
)
(
*
SendRawTransactionResponse
,
error
)
{
...
@@ -1400,7 +1401,7 @@ func _RingService_SignTransaction_Handler(srv interface{}, ctx context.Context,
...
@@ -1400,7 +1401,7 @@ func _RingService_SignTransaction_Handler(srv interface{}, ctx context.Context,
}
}
func
_RingService_SendTransaction_Handler
(
srv
interface
{},
ctx
context
.
Context
,
dec
func
(
interface
{})
error
,
interceptor
grpc
.
UnaryServerInterceptor
)
(
interface
{},
error
)
{
func
_RingService_SendTransaction_Handler
(
srv
interface
{},
ctx
context
.
Context
,
dec
func
(
interface
{})
error
,
interceptor
grpc
.
UnaryServerInterceptor
)
(
interface
{},
error
)
{
in
:=
new
(
SendTransactionRequest
)
in
:=
new
(
v1
.
EthTransaction
)
if
err
:=
dec
(
in
);
err
!=
nil
{
if
err
:=
dec
(
in
);
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
...
@@ -1412,7 +1413,7 @@ func _RingService_SendTransaction_Handler(srv interface{}, ctx context.Context,
...
@@ -1412,7 +1413,7 @@ func _RingService_SendTransaction_Handler(srv interface{}, ctx context.Context,
FullMethod
:
"/ring.v1.RingService/SendTransaction"
,
FullMethod
:
"/ring.v1.RingService/SendTransaction"
,
}
}
handler
:=
func
(
ctx
context
.
Context
,
req
interface
{})
(
interface
{},
error
)
{
handler
:=
func
(
ctx
context
.
Context
,
req
interface
{})
(
interface
{},
error
)
{
return
srv
.
(
RingServiceServer
)
.
SendTransaction
(
ctx
,
req
.
(
*
SendTransactionRequest
))
return
srv
.
(
RingServiceServer
)
.
SendTransaction
(
ctx
,
req
.
(
*
v1
.
EthTransaction
))
}
}
return
interceptor
(
ctx
,
in
,
info
,
handler
)
return
interceptor
(
ctx
,
in
,
info
,
handler
)
}
}
...
...
ringapi/ring/v1/service.proto
View file @
7b2ea958
...
@@ -5,6 +5,7 @@ package ring.v1;
...
@@ -5,6 +5,7 @@ package ring.v1;
import
"google/protobuf/empty.proto"
;
import
"google/protobuf/empty.proto"
;
import
"ring/v1/request_response.proto"
;
import
"ring/v1/request_response.proto"
;
import
"ring/v1/account_req_res.proto"
;
import
"ring/v1/account_req_res.proto"
;
import
"base/v1/resource.proto"
;
service
RingService
{
service
RingService
{
// web3
// web3
...
@@ -60,7 +61,7 @@ service RingService{
...
@@ -60,7 +61,7 @@ service RingService{
rpc
GetCode
(
GetCodeRequest
)
returns
(
GetCodeResponse
)
{};
rpc
GetCode
(
GetCodeRequest
)
returns
(
GetCodeResponse
)
{};
rpc
Sign
(
SignRequest
)
returns
(
SignResponse
)
{};
rpc
Sign
(
SignRequest
)
returns
(
SignResponse
)
{};
rpc
SignTransaction
(
SignTransactionRequest
)
returns
(
SignTransactionResponse
)
{};
rpc
SignTransaction
(
SignTransactionRequest
)
returns
(
SignTransactionResponse
)
{};
rpc
SendTransaction
(
SendTransactionRequest
)
returns
(
SendTransactionResponse
)
{};
rpc
SendTransaction
(
base.v1.EthTransaction
)
returns
(
SendTransactionResponse
)
{};
rpc
SendRawTransaction
(
SendRawTransactionRequest
)
returns
(
SendRawTransactionResponse
)
{};
rpc
SendRawTransaction
(
SendRawTransactionRequest
)
returns
(
SendRawTransactionResponse
)
{};
rpc
Call
(
CallRequest
)
returns
(
CallResponse
)
{};
rpc
Call
(
CallRequest
)
returns
(
CallResponse
)
{};
...
...
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