Repository navigation
Expand file tree
/
Copy pathkeys.proto
More file actions
139 lines (107 loc) · 2.56 KB
/
Copy pathkeys.proto
File metadata and controls
139 lines (107 loc) · 2.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
syntax = "proto3";
option go_package = "github.com/hyperledger/burrow/keys";
package keys;
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
import "crypto.proto";
option (gogoproto.stable_marshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.goproto_registration) = true;
option (gogoproto.messagename_all) = true;
service Keys {
rpc GenerateKey(GenRequest) returns (GenResponse);
rpc PublicKey(PubRequest) returns (PubResponse);
rpc Sign(SignRequest) returns (SignResponse);
rpc Verify(VerifyRequest) returns (VerifyResponse);
rpc Import(ImportRequest) returns (ImportResponse);
rpc ImportJSON(ImportJSONRequest) returns (ImportResponse);
rpc Export(ExportRequest) returns (ExportResponse);
rpc Hash(HashRequest) returns (HashResponse);
rpc RemoveName(RemoveNameRequest) returns (RemoveNameResponse);
rpc List(ListRequest) returns (ListResponse);
rpc AddName(AddNameRequest) returns (AddNameResponse);
}
// Some empty types we may define later
message ListRequest {
string KeyName = 1;
}
message VerifyResponse {
}
message RemoveNameResponse {
}
message AddNameResponse {
}
message RemoveNameRequest {
string KeyName = 1;
}
message GenRequest {
string Passphrase = 1;
string CurveType = 2;
string KeyName = 3;
}
message GenResponse {
string Address = 1;
}
message PubRequest {
string Address = 1;
string Name = 2;
}
message PubResponse {
bytes PublicKey = 1;
string CurveType = 2;
}
message ImportJSONRequest {
string Passphrase = 1;
string JSON = 2;
}
message ImportResponse {
string Address = 1;
}
message ImportRequest {
string Passphrase = 1;
string Name = 2;
string CurveType = 3;
bytes KeyBytes = 4;
}
message ExportRequest {
string Passphrase = 1;
string Name = 2;
string Address = 3;
}
message ExportResponse {
bytes Publickey = 1;
bytes Privatekey = 2;
bytes Address = 3;
string CurveType = 4;
}
message SignRequest {
string Passphrase = 1;
string Address = 2;
string Name = 3;
bytes Message = 4;
}
message SignResponse {
crypto.Signature Signature = 3;
}
message VerifyRequest {
bytes PublicKey = 2;
bytes Message = 3;
crypto.Signature Signature = 5;
}
message HashRequest {
string Hashtype = 1;
bytes Message = 2;
}
message HashResponse {
string Hash = 1;
}
message KeyID {
string Address = 1;
repeated string KeyName = 2;
}
message ListResponse {
repeated KeyID key = 1;
}
message AddNameRequest {
string Keyname = 1;
string Address = 2;
}