@dashevo/dapi-grpc 1.8.0 → 2.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc +3 -0
- package/Cargo.toml +35 -15
- package/build.rs +117 -22
- package/clients/drive/v0/nodejs/DrivePromiseClient.js +111 -0
- package/clients/drive/v0/nodejs/drive_pbjs.js +72524 -0
- package/clients/drive/v0/nodejs/drive_protoc.js +420 -0
- package/clients/drive/v0/web/drive_pb.d.ts +56 -0
- package/clients/drive/v0/web/drive_pb.js +420 -0
- package/clients/drive/v0/web/drive_pb_service.d.ts +63 -0
- package/clients/drive/v0/web/drive_pb_service.js +61 -0
- package/clients/platform/v0/nodejs/PlatformPromiseClient.js +0 -39
- package/clients/platform/v0/nodejs/platform_pbjs.js +30162 -7538
- package/clients/platform/v0/nodejs/platform_protoc.js +38679 -16741
- package/clients/platform/v0/web/platform_pb.d.ts +3337 -461
- package/clients/platform/v0/web/platform_pb.js +38679 -16741
- package/clients/platform/v0/web/platform_pb_service.d.ts +247 -19
- package/clients/platform/v0/web/platform_pb_service.js +501 -21
- package/lib/getDriveDefinition.js +18 -0
- package/node.js +19 -0
- package/package.json +3 -3
- package/protos/drive/v0/drive.proto +18 -0
- package/protos/platform/v0/platform.proto +888 -334
- package/scripts/build.sh +55 -0
- package/scripts/patch-protobuf-js.sh +3 -2
- package/src/lib.rs +42 -10
|
@@ -11,20 +11,24 @@ service Platform {
|
|
|
11
11
|
returns (BroadcastStateTransitionResponse);
|
|
12
12
|
rpc getIdentity(GetIdentityRequest) returns (GetIdentityResponse);
|
|
13
13
|
rpc getIdentityKeys(GetIdentityKeysRequest) returns (GetIdentityKeysResponse);
|
|
14
|
-
rpc getIdentitiesContractKeys(GetIdentitiesContractKeysRequest)
|
|
15
|
-
|
|
16
|
-
rpc
|
|
14
|
+
rpc getIdentitiesContractKeys(GetIdentitiesContractKeysRequest)
|
|
15
|
+
returns (GetIdentitiesContractKeysResponse);
|
|
16
|
+
rpc getIdentityNonce(GetIdentityNonceRequest)
|
|
17
|
+
returns (GetIdentityNonceResponse);
|
|
18
|
+
rpc getIdentityContractNonce(GetIdentityContractNonceRequest)
|
|
19
|
+
returns (GetIdentityContractNonceResponse);
|
|
17
20
|
rpc getIdentityBalance(GetIdentityBalanceRequest)
|
|
18
21
|
returns (GetIdentityBalanceResponse);
|
|
19
22
|
rpc getIdentitiesBalances(GetIdentitiesBalancesRequest)
|
|
20
23
|
returns (GetIdentitiesBalancesResponse);
|
|
21
24
|
rpc getIdentityBalanceAndRevision(GetIdentityBalanceAndRevisionRequest)
|
|
22
25
|
returns (GetIdentityBalanceAndRevisionResponse);
|
|
23
|
-
rpc getEvonodesProposedEpochBlocksByIds(
|
|
26
|
+
rpc getEvonodesProposedEpochBlocksByIds(
|
|
27
|
+
GetEvonodesProposedEpochBlocksByIdsRequest)
|
|
24
28
|
returns (GetEvonodesProposedEpochBlocksResponse);
|
|
25
|
-
rpc getEvonodesProposedEpochBlocksByRange(
|
|
29
|
+
rpc getEvonodesProposedEpochBlocksByRange(
|
|
30
|
+
GetEvonodesProposedEpochBlocksByRangeRequest)
|
|
26
31
|
returns (GetEvonodesProposedEpochBlocksResponse);
|
|
27
|
-
rpc getProofs(GetProofsRequest) returns (GetProofsResponse);
|
|
28
32
|
rpc getDataContract(GetDataContractRequest) returns (GetDataContractResponse);
|
|
29
33
|
rpc getDataContractHistory(GetDataContractHistoryRequest)
|
|
30
34
|
returns (GetDataContractHistoryResponse);
|
|
@@ -33,48 +37,86 @@ service Platform {
|
|
|
33
37
|
rpc getDocuments(GetDocumentsRequest) returns (GetDocumentsResponse);
|
|
34
38
|
rpc getIdentityByPublicKeyHash(GetIdentityByPublicKeyHashRequest)
|
|
35
39
|
returns (GetIdentityByPublicKeyHashResponse);
|
|
40
|
+
rpc getIdentityByNonUniquePublicKeyHash(GetIdentityByNonUniquePublicKeyHashRequest)
|
|
41
|
+
returns (GetIdentityByNonUniquePublicKeyHashResponse);
|
|
36
42
|
rpc waitForStateTransitionResult(WaitForStateTransitionResultRequest)
|
|
37
43
|
returns (WaitForStateTransitionResultResponse);
|
|
38
44
|
rpc getConsensusParams(GetConsensusParamsRequest)
|
|
39
45
|
returns (GetConsensusParamsResponse);
|
|
40
|
-
rpc getProtocolVersionUpgradeState(GetProtocolVersionUpgradeStateRequest)
|
|
41
|
-
|
|
46
|
+
rpc getProtocolVersionUpgradeState(GetProtocolVersionUpgradeStateRequest)
|
|
47
|
+
returns (GetProtocolVersionUpgradeStateResponse);
|
|
48
|
+
rpc getProtocolVersionUpgradeVoteStatus(
|
|
49
|
+
GetProtocolVersionUpgradeVoteStatusRequest)
|
|
50
|
+
returns (GetProtocolVersionUpgradeVoteStatusResponse);
|
|
42
51
|
rpc getEpochsInfo(GetEpochsInfoRequest) returns (GetEpochsInfoResponse);
|
|
43
52
|
// What votes are currently happening for a specific contested index
|
|
44
|
-
rpc getContestedResources(GetContestedResourcesRequest)
|
|
53
|
+
rpc getContestedResources(GetContestedResourcesRequest)
|
|
54
|
+
returns (GetContestedResourcesResponse);
|
|
45
55
|
// What's the state of a contested resource vote? (ie who is winning?)
|
|
46
|
-
rpc getContestedResourceVoteState(GetContestedResourceVoteStateRequest)
|
|
56
|
+
rpc getContestedResourceVoteState(GetContestedResourceVoteStateRequest)
|
|
57
|
+
returns (GetContestedResourceVoteStateResponse);
|
|
47
58
|
// Who voted for a contested resource to go to a specific identity?
|
|
48
|
-
rpc getContestedResourceVotersForIdentity(
|
|
59
|
+
rpc getContestedResourceVotersForIdentity(
|
|
60
|
+
GetContestedResourceVotersForIdentityRequest)
|
|
61
|
+
returns (GetContestedResourceVotersForIdentityResponse);
|
|
49
62
|
// How did an identity vote?
|
|
50
|
-
rpc getContestedResourceIdentityVotes(
|
|
63
|
+
rpc getContestedResourceIdentityVotes(
|
|
64
|
+
GetContestedResourceIdentityVotesRequest)
|
|
65
|
+
returns (GetContestedResourceIdentityVotesResponse);
|
|
51
66
|
// What vote polls will end soon?
|
|
52
|
-
rpc getVotePollsByEndDate(GetVotePollsByEndDateRequest)
|
|
53
|
-
|
|
54
|
-
rpc
|
|
67
|
+
rpc getVotePollsByEndDate(GetVotePollsByEndDateRequest)
|
|
68
|
+
returns (GetVotePollsByEndDateResponse);
|
|
69
|
+
rpc getPrefundedSpecializedBalance(GetPrefundedSpecializedBalanceRequest)
|
|
70
|
+
returns (GetPrefundedSpecializedBalanceResponse);
|
|
71
|
+
rpc getTotalCreditsInPlatform(GetTotalCreditsInPlatformRequest)
|
|
72
|
+
returns (GetTotalCreditsInPlatformResponse);
|
|
55
73
|
rpc getPathElements(GetPathElementsRequest) returns (GetPathElementsResponse);
|
|
56
74
|
rpc getStatus(GetStatusRequest) returns (GetStatusResponse);
|
|
57
|
-
rpc getCurrentQuorumsInfo(GetCurrentQuorumsInfoRequest)
|
|
75
|
+
rpc getCurrentQuorumsInfo(GetCurrentQuorumsInfoRequest)
|
|
76
|
+
returns (GetCurrentQuorumsInfoResponse);
|
|
77
|
+
rpc getIdentityTokenBalances(GetIdentityTokenBalancesRequest)
|
|
78
|
+
returns (GetIdentityTokenBalancesResponse);
|
|
79
|
+
rpc getIdentitiesTokenBalances(GetIdentitiesTokenBalancesRequest)
|
|
80
|
+
returns (GetIdentitiesTokenBalancesResponse);
|
|
81
|
+
rpc getIdentityTokenInfos(GetIdentityTokenInfosRequest)
|
|
82
|
+
returns (GetIdentityTokenInfosResponse);
|
|
83
|
+
rpc getIdentitiesTokenInfos(GetIdentitiesTokenInfosRequest)
|
|
84
|
+
returns (GetIdentitiesTokenInfosResponse);
|
|
85
|
+
rpc getTokenStatuses(GetTokenStatusesRequest)
|
|
86
|
+
returns (GetTokenStatusesResponse);
|
|
87
|
+
rpc getTokenDirectPurchasePrices(GetTokenDirectPurchasePricesRequest)
|
|
88
|
+
returns (GetTokenDirectPurchasePricesResponse);
|
|
89
|
+
rpc getTokenPreProgrammedDistributions(
|
|
90
|
+
GetTokenPreProgrammedDistributionsRequest)
|
|
91
|
+
returns (GetTokenPreProgrammedDistributionsResponse);
|
|
92
|
+
rpc getTokenTotalSupply(GetTokenTotalSupplyRequest)
|
|
93
|
+
returns (GetTokenTotalSupplyResponse);
|
|
94
|
+
rpc getGroupInfo(GetGroupInfoRequest) returns (GetGroupInfoResponse);
|
|
95
|
+
rpc getGroupInfos(GetGroupInfosRequest) returns (GetGroupInfosResponse);
|
|
96
|
+
rpc getGroupActions(GetGroupActionsRequest) returns (GetGroupActionsResponse);
|
|
97
|
+
rpc getGroupActionSigners(GetGroupActionSignersRequest)
|
|
98
|
+
returns (GetGroupActionSignersResponse);
|
|
58
99
|
}
|
|
59
100
|
|
|
60
101
|
// Proof message includes cryptographic proofs for validating responses
|
|
61
102
|
message Proof {
|
|
62
|
-
bytes grovedb_proof = 1;
|
|
63
|
-
bytes quorum_hash = 2;
|
|
64
|
-
bytes signature = 3;
|
|
65
|
-
uint32 round = 4;
|
|
66
|
-
bytes block_id_hash = 5;
|
|
67
|
-
uint32 quorum_type = 6;
|
|
103
|
+
bytes grovedb_proof = 1; // GroveDB proof for the data
|
|
104
|
+
bytes quorum_hash = 2; // Hash of the quorum validating the data
|
|
105
|
+
bytes signature = 3; // Signature proving data authenticity
|
|
106
|
+
uint32 round = 4; // Consensus round number
|
|
107
|
+
bytes block_id_hash = 5; // Hash of the block ID
|
|
108
|
+
uint32 quorum_type = 6; // Type of the quorum
|
|
68
109
|
}
|
|
69
110
|
|
|
70
|
-
// ResponseMetadata provides metadata about the blockchain state at the time of
|
|
111
|
+
// ResponseMetadata provides metadata about the blockchain state at the time of
|
|
112
|
+
// response
|
|
71
113
|
message ResponseMetadata {
|
|
72
|
-
uint64 height = 1;
|
|
73
|
-
uint32 core_chain_locked_height = 2;
|
|
74
|
-
uint32 epoch = 3;
|
|
75
|
-
uint64 time_ms = 4;
|
|
76
|
-
uint32 protocol_version = 5;
|
|
77
|
-
string chain_id = 6;
|
|
114
|
+
uint64 height = 1 [ jstype = JS_STRING ]; // Current blockchain height
|
|
115
|
+
uint32 core_chain_locked_height = 2; // Latest known core height in consensus
|
|
116
|
+
uint32 epoch = 3; // Current epoch number
|
|
117
|
+
uint64 time_ms = 4 [ jstype = JS_STRING ]; // Timestamp in milliseconds
|
|
118
|
+
uint32 protocol_version = 5; // Protocol version
|
|
119
|
+
string chain_id = 6; // Identifier of the blockchain
|
|
78
120
|
}
|
|
79
121
|
|
|
80
122
|
message StateTransitionBroadcastError {
|
|
@@ -98,8 +140,8 @@ message BroadcastStateTransitionResponse {}
|
|
|
98
140
|
message GetIdentityRequest {
|
|
99
141
|
|
|
100
142
|
message GetIdentityRequestV0 {
|
|
101
|
-
bytes id = 1;
|
|
102
|
-
bool prove = 2;
|
|
143
|
+
bytes id = 1; // The ID of the identity being requested
|
|
144
|
+
bool prove = 2; // Flag to request a proof as the response
|
|
103
145
|
}
|
|
104
146
|
|
|
105
147
|
oneof version { GetIdentityRequestV0 v0 = 1; }
|
|
@@ -115,7 +157,6 @@ message GetIdentityNonceRequest {
|
|
|
115
157
|
oneof version { GetIdentityNonceRequestV0 v0 = 1; }
|
|
116
158
|
}
|
|
117
159
|
|
|
118
|
-
|
|
119
160
|
message GetIdentityContractNonceRequest {
|
|
120
161
|
|
|
121
162
|
message GetIdentityContractNonceRequestV0 {
|
|
@@ -130,8 +171,8 @@ message GetIdentityContractNonceRequest {
|
|
|
130
171
|
message GetIdentityBalanceRequest {
|
|
131
172
|
|
|
132
173
|
message GetIdentityBalanceRequestV0 {
|
|
133
|
-
bytes id = 1;
|
|
134
|
-
bool prove = 2;
|
|
174
|
+
bytes id = 1; // ID of the identity whose balance is requested
|
|
175
|
+
bool prove = 2; // Flag to request a proof as the response
|
|
135
176
|
}
|
|
136
177
|
|
|
137
178
|
oneof version { GetIdentityBalanceRequestV0 v0 = 1; }
|
|
@@ -140,8 +181,8 @@ message GetIdentityBalanceRequest {
|
|
|
140
181
|
message GetIdentityBalanceAndRevisionRequest {
|
|
141
182
|
|
|
142
183
|
message GetIdentityBalanceAndRevisionRequestV0 {
|
|
143
|
-
bytes id = 1;
|
|
144
|
-
bool prove = 2;
|
|
184
|
+
bytes id = 1; // ID of the identity for balance and revision
|
|
185
|
+
bool prove = 2; // Flag to request a proof as the response
|
|
145
186
|
}
|
|
146
187
|
|
|
147
188
|
oneof version { GetIdentityBalanceAndRevisionRequestV0 v0 = 1; }
|
|
@@ -151,10 +192,10 @@ message GetIdentityResponse {
|
|
|
151
192
|
|
|
152
193
|
message GetIdentityResponseV0 {
|
|
153
194
|
oneof result {
|
|
154
|
-
bytes identity = 1;
|
|
155
|
-
Proof proof = 2;
|
|
195
|
+
bytes identity = 1; // The requested identity data
|
|
196
|
+
Proof proof = 2; // Proof of the identity data, if requested
|
|
156
197
|
}
|
|
157
|
-
ResponseMetadata metadata = 3;
|
|
198
|
+
ResponseMetadata metadata = 3; // Metadata about the blockchain state
|
|
158
199
|
}
|
|
159
200
|
|
|
160
201
|
oneof version { GetIdentityResponseV0 v0 = 1; }
|
|
@@ -164,7 +205,7 @@ message GetIdentityNonceResponse {
|
|
|
164
205
|
|
|
165
206
|
message GetIdentityNonceResponseV0 {
|
|
166
207
|
oneof result {
|
|
167
|
-
uint64 identity_nonce = 1;
|
|
208
|
+
uint64 identity_nonce = 1 [ jstype = JS_STRING ];
|
|
168
209
|
Proof proof = 2;
|
|
169
210
|
}
|
|
170
211
|
ResponseMetadata metadata = 3;
|
|
@@ -177,7 +218,7 @@ message GetIdentityContractNonceResponse {
|
|
|
177
218
|
|
|
178
219
|
message GetIdentityContractNonceResponseV0 {
|
|
179
220
|
oneof result {
|
|
180
|
-
uint64 identity_contract_nonce = 1;
|
|
221
|
+
uint64 identity_contract_nonce = 1 [ jstype = JS_STRING ];
|
|
181
222
|
Proof proof = 2;
|
|
182
223
|
}
|
|
183
224
|
ResponseMetadata metadata = 3;
|
|
@@ -190,10 +231,11 @@ message GetIdentityBalanceResponse {
|
|
|
190
231
|
|
|
191
232
|
message GetIdentityBalanceResponseV0 {
|
|
192
233
|
oneof result {
|
|
193
|
-
uint64 balance = 1
|
|
194
|
-
|
|
234
|
+
uint64 balance = 1
|
|
235
|
+
[ jstype = JS_STRING ]; // The balance of the requested identity
|
|
236
|
+
Proof proof = 2; // Proof of the balance, if requested
|
|
195
237
|
}
|
|
196
|
-
ResponseMetadata metadata = 3;
|
|
238
|
+
ResponseMetadata metadata = 3; // Metadata about the blockchain state
|
|
197
239
|
}
|
|
198
240
|
|
|
199
241
|
oneof version { GetIdentityBalanceResponseV0 v0 = 1; }
|
|
@@ -203,15 +245,17 @@ message GetIdentityBalanceAndRevisionResponse {
|
|
|
203
245
|
|
|
204
246
|
message GetIdentityBalanceAndRevisionResponseV0 {
|
|
205
247
|
message BalanceAndRevision {
|
|
206
|
-
uint64 balance = 1;
|
|
207
|
-
uint64 revision = 2
|
|
248
|
+
uint64 balance = 1 [ jstype = JS_STRING ]; // Balance of the identity
|
|
249
|
+
uint64 revision = 2
|
|
250
|
+
[ jstype = JS_STRING ]; // Revision number of the identity
|
|
208
251
|
}
|
|
209
252
|
|
|
210
253
|
oneof result {
|
|
211
|
-
BalanceAndRevision balance_and_revision =
|
|
212
|
-
|
|
254
|
+
BalanceAndRevision balance_and_revision =
|
|
255
|
+
1; // The balance and revision data
|
|
256
|
+
Proof proof = 2; // Proof of the data, if requested
|
|
213
257
|
}
|
|
214
|
-
ResponseMetadata metadata = 3;
|
|
258
|
+
ResponseMetadata metadata = 3; // Metadata about the blockchain state
|
|
215
259
|
}
|
|
216
260
|
|
|
217
261
|
oneof version { GetIdentityBalanceAndRevisionResponseV0 v0 = 1; }
|
|
@@ -219,9 +263,9 @@ message GetIdentityBalanceAndRevisionResponse {
|
|
|
219
263
|
|
|
220
264
|
message KeyRequestType {
|
|
221
265
|
oneof request {
|
|
222
|
-
AllKeys all_keys = 1;
|
|
223
|
-
SpecificKeys specific_keys = 2;
|
|
224
|
-
SearchKey search_key = 3;
|
|
266
|
+
AllKeys all_keys = 1; // Request for all keys
|
|
267
|
+
SpecificKeys specific_keys = 2; // Request for specific keys by their IDs
|
|
268
|
+
SearchKey search_key = 3; // Request for keys based on a search criteria
|
|
225
269
|
}
|
|
226
270
|
}
|
|
227
271
|
|
|
@@ -230,31 +274,37 @@ message AllKeys {}
|
|
|
230
274
|
|
|
231
275
|
// SpecificKeys is used to request specific keys by their IDs
|
|
232
276
|
message SpecificKeys {
|
|
233
|
-
repeated uint32 key_ids = 1;
|
|
277
|
+
repeated uint32 key_ids = 1; // List of key IDs
|
|
234
278
|
}
|
|
235
279
|
|
|
236
280
|
// SearchKey represents a request to search for keys based on specific criteria
|
|
237
281
|
message SearchKey {
|
|
238
|
-
map<uint32, SecurityLevelMap> purpose_map =
|
|
282
|
+
map<uint32, SecurityLevelMap> purpose_map =
|
|
283
|
+
1; // Map of purposes to their security level maps
|
|
239
284
|
}
|
|
240
285
|
|
|
241
286
|
// SecurityLevelMap maps security levels to a request type for key retrieval
|
|
242
287
|
message SecurityLevelMap {
|
|
243
288
|
enum KeyKindRequestType {
|
|
244
|
-
CURRENT_KEY_OF_KIND_REQUEST =
|
|
245
|
-
|
|
289
|
+
CURRENT_KEY_OF_KIND_REQUEST =
|
|
290
|
+
0; // Request the current key of a particular kind
|
|
291
|
+
ALL_KEYS_OF_KIND_REQUEST = 1; // Request all keys of a particular kind
|
|
246
292
|
}
|
|
247
|
-
map<uint32, KeyKindRequestType> security_level_map =
|
|
293
|
+
map<uint32, KeyKindRequestType> security_level_map =
|
|
294
|
+
1; // Maps security levels to key request types
|
|
248
295
|
}
|
|
249
296
|
|
|
250
297
|
message GetIdentityKeysRequest {
|
|
251
298
|
|
|
252
299
|
message GetIdentityKeysRequestV0 {
|
|
253
|
-
bytes identity_id = 1;
|
|
254
|
-
KeyRequestType request_type =
|
|
255
|
-
|
|
256
|
-
google.protobuf.UInt32Value
|
|
257
|
-
|
|
300
|
+
bytes identity_id = 1; // ID of the identity for key retrieval
|
|
301
|
+
KeyRequestType request_type =
|
|
302
|
+
2; // Type of key request: all, specific, or search
|
|
303
|
+
google.protobuf.UInt32Value limit =
|
|
304
|
+
3; // Limit on the number of keys to be returned
|
|
305
|
+
google.protobuf.UInt32Value offset =
|
|
306
|
+
4; // Offset for pagination through the keys
|
|
307
|
+
bool prove = 5; // Flag to request a proof as the response
|
|
258
308
|
}
|
|
259
309
|
|
|
260
310
|
oneof version { GetIdentityKeysRequestV0 v0 = 1; }
|
|
@@ -263,13 +313,15 @@ message GetIdentityKeysRequest {
|
|
|
263
313
|
message GetIdentityKeysResponse {
|
|
264
314
|
|
|
265
315
|
message GetIdentityKeysResponseV0 {
|
|
266
|
-
message Keys {
|
|
316
|
+
message Keys {
|
|
317
|
+
repeated bytes keys_bytes = 1;
|
|
318
|
+
} // Collection of keys as byte sequences
|
|
267
319
|
|
|
268
320
|
oneof result {
|
|
269
|
-
Keys keys = 1;
|
|
270
|
-
Proof proof = 2;
|
|
321
|
+
Keys keys = 1; // The actual key data
|
|
322
|
+
Proof proof = 2; // Proof of the keys data, if requested
|
|
271
323
|
}
|
|
272
|
-
ResponseMetadata metadata = 3;
|
|
324
|
+
ResponseMetadata metadata = 3; // Metadata about the blockchain state
|
|
273
325
|
}
|
|
274
326
|
oneof version { GetIdentityKeysResponseV0 v0 = 1; }
|
|
275
327
|
}
|
|
@@ -283,9 +335,7 @@ message GetIdentitiesContractKeysRequest {
|
|
|
283
335
|
bool prove = 5;
|
|
284
336
|
}
|
|
285
337
|
|
|
286
|
-
oneof version {
|
|
287
|
-
GetIdentitiesContractKeysRequestV0 v0 = 1;
|
|
288
|
-
}
|
|
338
|
+
oneof version { GetIdentitiesContractKeysRequestV0 v0 = 1; }
|
|
289
339
|
}
|
|
290
340
|
|
|
291
341
|
message GetIdentitiesContractKeysResponse {
|
|
@@ -300,9 +350,7 @@ message GetIdentitiesContractKeysResponse {
|
|
|
300
350
|
repeated PurposeKeys keys = 2;
|
|
301
351
|
}
|
|
302
352
|
|
|
303
|
-
message IdentitiesKeys {
|
|
304
|
-
repeated IdentityKeys entries = 1;
|
|
305
|
-
};
|
|
353
|
+
message IdentitiesKeys { repeated IdentityKeys entries = 1; };
|
|
306
354
|
|
|
307
355
|
oneof result {
|
|
308
356
|
IdentitiesKeys identities_keys = 1;
|
|
@@ -317,9 +365,11 @@ message GetIdentitiesContractKeysResponse {
|
|
|
317
365
|
message GetEvonodesProposedEpochBlocksByIdsRequest {
|
|
318
366
|
|
|
319
367
|
message GetEvonodesProposedEpochBlocksByIdsRequestV0 {
|
|
320
|
-
optional uint32 epoch =
|
|
321
|
-
|
|
322
|
-
|
|
368
|
+
optional uint32 epoch =
|
|
369
|
+
1; // The epoch we are querying for, if none is set, get current epoch
|
|
370
|
+
repeated bytes ids =
|
|
371
|
+
2; // IDs of the evonodes for which we want to get their proposed blocks
|
|
372
|
+
bool prove = 3; // Flag to request a proof as the response
|
|
323
373
|
}
|
|
324
374
|
|
|
325
375
|
oneof version { GetEvonodesProposedEpochBlocksByIdsRequestV0 v0 = 1; }
|
|
@@ -330,7 +380,7 @@ message GetEvonodesProposedEpochBlocksResponse {
|
|
|
330
380
|
message GetEvonodesProposedEpochBlocksResponseV0 {
|
|
331
381
|
message EvonodeProposedBlocks {
|
|
332
382
|
bytes pro_tx_hash = 1;
|
|
333
|
-
uint64 count = 2;
|
|
383
|
+
uint64 count = 2 [ jstype = JS_STRING ];
|
|
334
384
|
}
|
|
335
385
|
|
|
336
386
|
message EvonodesProposedBlocks {
|
|
@@ -338,10 +388,11 @@ message GetEvonodesProposedEpochBlocksResponse {
|
|
|
338
388
|
}
|
|
339
389
|
|
|
340
390
|
oneof result {
|
|
341
|
-
EvonodesProposedBlocks evonodes_proposed_block_counts_info =
|
|
342
|
-
|
|
391
|
+
EvonodesProposedBlocks evonodes_proposed_block_counts_info =
|
|
392
|
+
1; // The actual result
|
|
393
|
+
Proof proof = 2; // Proof of the keys data, if requested
|
|
343
394
|
}
|
|
344
|
-
ResponseMetadata metadata = 3;
|
|
395
|
+
ResponseMetadata metadata = 3; // Metadata about the blockchain state
|
|
345
396
|
}
|
|
346
397
|
oneof version { GetEvonodesProposedEpochBlocksResponseV0 v0 = 1; }
|
|
347
398
|
}
|
|
@@ -349,13 +400,15 @@ message GetEvonodesProposedEpochBlocksResponse {
|
|
|
349
400
|
message GetEvonodesProposedEpochBlocksByRangeRequest {
|
|
350
401
|
|
|
351
402
|
message GetEvonodesProposedEpochBlocksByRangeRequestV0 {
|
|
352
|
-
optional uint32 epoch =
|
|
353
|
-
|
|
403
|
+
optional uint32 epoch =
|
|
404
|
+
1; // The epoch we are querying for, if none is set, get current epoch
|
|
405
|
+
optional uint32 limit =
|
|
406
|
+
2; // Maximum number of evonodes proposed epoch blocks to return
|
|
354
407
|
oneof start {
|
|
355
|
-
bytes start_after = 3;
|
|
356
|
-
bytes start_at = 4;
|
|
408
|
+
bytes start_after = 3; // Start retrieval after this document
|
|
409
|
+
bytes start_at = 4; // Start retrieval at this document
|
|
357
410
|
}
|
|
358
|
-
bool prove = 5;
|
|
411
|
+
bool prove = 5; // Flag to request a proof as the response
|
|
359
412
|
}
|
|
360
413
|
|
|
361
414
|
oneof version { GetEvonodesProposedEpochBlocksByRangeRequestV0 v0 = 1; }
|
|
@@ -367,21 +420,17 @@ message GetIdentitiesBalancesRequest {
|
|
|
367
420
|
bool prove = 2;
|
|
368
421
|
}
|
|
369
422
|
|
|
370
|
-
oneof version {
|
|
371
|
-
GetIdentitiesBalancesRequestV0 v0 = 1;
|
|
372
|
-
}
|
|
423
|
+
oneof version { GetIdentitiesBalancesRequestV0 v0 = 1; }
|
|
373
424
|
}
|
|
374
425
|
|
|
375
426
|
message GetIdentitiesBalancesResponse {
|
|
376
427
|
message GetIdentitiesBalancesResponseV0 {
|
|
377
428
|
message IdentityBalance {
|
|
378
429
|
bytes identity_id = 1;
|
|
379
|
-
optional uint64 balance = 2;
|
|
430
|
+
optional uint64 balance = 2 [ jstype = JS_STRING ];
|
|
380
431
|
}
|
|
381
432
|
|
|
382
|
-
message IdentitiesBalances {
|
|
383
|
-
repeated IdentityBalance entries = 1;
|
|
384
|
-
};
|
|
433
|
+
message IdentitiesBalances { repeated IdentityBalance entries = 1; };
|
|
385
434
|
|
|
386
435
|
oneof result {
|
|
387
436
|
IdentitiesBalances identities_balances = 1;
|
|
@@ -393,73 +442,10 @@ message GetIdentitiesBalancesResponse {
|
|
|
393
442
|
oneof version { GetIdentitiesBalancesResponseV0 v0 = 1; }
|
|
394
443
|
}
|
|
395
444
|
|
|
396
|
-
message GetProofsRequest {
|
|
397
|
-
message GetProofsRequestV0 {
|
|
398
|
-
// DocumentRequest specifies a request for a document proof
|
|
399
|
-
message DocumentRequest {
|
|
400
|
-
enum DocumentContestedStatus {
|
|
401
|
-
NOT_CONTESTED = 0;
|
|
402
|
-
MAYBE_CONTESTED = 1;
|
|
403
|
-
CONTESTED = 2;
|
|
404
|
-
}
|
|
405
|
-
bytes contract_id = 1; // ID of the contract the document belongs to
|
|
406
|
-
string document_type = 2; // Type of document being requested
|
|
407
|
-
bool document_type_keeps_history = 3; // Indicates if the document type keeps a history of changes
|
|
408
|
-
bytes document_id = 4; // ID of the specific document being requested
|
|
409
|
-
DocumentContestedStatus document_contested_status = 5;
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
// IdentityRequest specifies a request for an identity proof
|
|
413
|
-
message IdentityRequest {
|
|
414
|
-
enum Type {
|
|
415
|
-
FULL_IDENTITY = 0; // Request for the full identity
|
|
416
|
-
BALANCE = 1; // Request for the identity's balance
|
|
417
|
-
KEYS = 2; // Request for the identity's keys
|
|
418
|
-
REVISION = 3; // Request for the identity's revision
|
|
419
|
-
}
|
|
420
|
-
bytes identity_id = 1; // ID of the identity for which the proof is requested
|
|
421
|
-
Type request_type = 2; // Type of identity request
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
// ContractRequest specifies a request for a data contract proof.
|
|
425
|
-
message ContractRequest { bytes contract_id = 1; } // ID of the contract for which the proof is requested
|
|
426
|
-
|
|
427
|
-
message VoteStatusRequest {
|
|
428
|
-
message ContestedResourceVoteStatusRequest {
|
|
429
|
-
bytes contract_id = 1;
|
|
430
|
-
string document_type_name = 2;
|
|
431
|
-
string index_name = 3;
|
|
432
|
-
repeated bytes index_values = 4;
|
|
433
|
-
bytes voter_identifier = 5;
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
oneof request_type { ContestedResourceVoteStatusRequest contested_resource_vote_status_request = 1; }
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
repeated IdentityRequest identities = 1; // List of identity requests
|
|
440
|
-
repeated ContractRequest contracts = 2; // List of contract requests
|
|
441
|
-
repeated DocumentRequest documents = 3; // List of document requests
|
|
442
|
-
repeated VoteStatusRequest votes = 4;
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
oneof version { GetProofsRequestV0 v0 = 1; }
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
message GetProofsResponse {
|
|
449
|
-
message GetProofsResponseV0 {
|
|
450
|
-
oneof result {
|
|
451
|
-
Proof proof = 1; // Cryptographic proof for the requested data
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
ResponseMetadata metadata = 2; // Metadata about the blockchain state
|
|
455
|
-
}
|
|
456
|
-
oneof version { GetProofsResponseV0 v0 = 1; }
|
|
457
|
-
}
|
|
458
|
-
|
|
459
445
|
message GetDataContractRequest {
|
|
460
446
|
message GetDataContractRequestV0 {
|
|
461
|
-
bytes id = 1;
|
|
462
|
-
bool prove = 2;
|
|
447
|
+
bytes id = 1; // The ID of the data contract being requested
|
|
448
|
+
bool prove = 2; // Flag to request a proof as the response
|
|
463
449
|
}
|
|
464
450
|
oneof version { GetDataContractRequestV0 v0 = 1; }
|
|
465
451
|
}
|
|
@@ -467,50 +453,58 @@ message GetDataContractRequest {
|
|
|
467
453
|
message GetDataContractResponse {
|
|
468
454
|
message GetDataContractResponseV0 {
|
|
469
455
|
oneof result {
|
|
470
|
-
bytes data_contract = 1;
|
|
471
|
-
Proof proof = 2;
|
|
456
|
+
bytes data_contract = 1; // The actual data contract in binary form
|
|
457
|
+
Proof proof = 2; // Cryptographic proof of the data contract, if requested
|
|
472
458
|
}
|
|
473
|
-
ResponseMetadata metadata = 3;
|
|
459
|
+
ResponseMetadata metadata = 3; // Metadata about the blockchain state
|
|
474
460
|
}
|
|
475
461
|
oneof version { GetDataContractResponseV0 v0 = 1; }
|
|
476
462
|
}
|
|
477
463
|
|
|
478
464
|
message GetDataContractsRequest {
|
|
479
465
|
message GetDataContractsRequestV0 {
|
|
480
|
-
repeated bytes ids =
|
|
481
|
-
|
|
466
|
+
repeated bytes ids =
|
|
467
|
+
1; // A list of unique IDs for the data contracts being requested
|
|
468
|
+
bool prove = 2; // Flag to request a proof as the response
|
|
482
469
|
}
|
|
483
470
|
oneof version { GetDataContractsRequestV0 v0 = 1; }
|
|
484
471
|
}
|
|
485
472
|
|
|
486
473
|
message GetDataContractsResponse {
|
|
487
474
|
message DataContractEntry {
|
|
488
|
-
bytes identifier = 1;
|
|
489
|
-
google.protobuf.BytesValue data_contract =
|
|
475
|
+
bytes identifier = 1; // The unique identifier of the data contract
|
|
476
|
+
google.protobuf.BytesValue data_contract =
|
|
477
|
+
2; // The actual data contract content
|
|
490
478
|
}
|
|
491
479
|
|
|
492
480
|
// DataContracts is a collection of data contract entries.
|
|
493
481
|
message DataContracts {
|
|
494
|
-
repeated DataContractEntry data_contract_entries =
|
|
482
|
+
repeated DataContractEntry data_contract_entries =
|
|
483
|
+
1; // A list of data contract entries
|
|
495
484
|
}
|
|
496
485
|
|
|
497
486
|
message GetDataContractsResponseV0 {
|
|
498
487
|
oneof result {
|
|
499
|
-
DataContracts data_contracts = 1;
|
|
500
|
-
Proof proof =
|
|
488
|
+
DataContracts data_contracts = 1; // The actual data contracts requested
|
|
489
|
+
Proof proof =
|
|
490
|
+
2; // Cryptographic proof for the data contracts, if requested
|
|
501
491
|
}
|
|
502
|
-
ResponseMetadata metadata = 3;
|
|
492
|
+
ResponseMetadata metadata = 3; // Metadata about the blockchain state
|
|
503
493
|
}
|
|
504
494
|
oneof version { GetDataContractsResponseV0 v0 = 1; }
|
|
505
495
|
}
|
|
506
496
|
|
|
507
497
|
message GetDataContractHistoryRequest {
|
|
508
498
|
message GetDataContractHistoryRequestV0 {
|
|
509
|
-
bytes id = 1;
|
|
510
|
-
google.protobuf.UInt32Value limit =
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
499
|
+
bytes id = 1; // The unique ID of the data contract
|
|
500
|
+
google.protobuf.UInt32Value limit =
|
|
501
|
+
2; // The maximum number of history entries to return
|
|
502
|
+
google.protobuf.UInt32Value offset =
|
|
503
|
+
3; // The offset for pagination through the contract history
|
|
504
|
+
uint64 start_at_ms = 4 [
|
|
505
|
+
jstype = JS_STRING
|
|
506
|
+
]; // Only return results starting at this time in milliseconds
|
|
507
|
+
bool prove = 5; // Flag to request a proof as the response
|
|
514
508
|
}
|
|
515
509
|
oneof version { GetDataContractHistoryRequestV0 v0 = 1; }
|
|
516
510
|
}
|
|
@@ -519,39 +513,44 @@ message GetDataContractHistoryResponse {
|
|
|
519
513
|
message GetDataContractHistoryResponseV0 {
|
|
520
514
|
// Represents a single entry in the data contract's history
|
|
521
515
|
message DataContractHistoryEntry {
|
|
522
|
-
uint64 date = 1;
|
|
523
|
-
bytes value =
|
|
516
|
+
uint64 date = 1 [ jstype = JS_STRING ]; // The date of the history entry
|
|
517
|
+
bytes value =
|
|
518
|
+
2; // The value of the data contract at this point in history
|
|
524
519
|
}
|
|
525
520
|
|
|
526
521
|
// Collection of data contract history entries
|
|
527
522
|
message DataContractHistory {
|
|
528
|
-
repeated DataContractHistoryEntry data_contract_entries =
|
|
523
|
+
repeated DataContractHistoryEntry data_contract_entries =
|
|
524
|
+
1; // List of history entries
|
|
529
525
|
}
|
|
530
526
|
|
|
531
527
|
oneof result {
|
|
532
|
-
DataContractHistory data_contract_history =
|
|
533
|
-
|
|
528
|
+
DataContractHistory data_contract_history =
|
|
529
|
+
1; // The actual history of the data contract
|
|
530
|
+
Proof proof =
|
|
531
|
+
2; // Cryptographic proof of the data contract history, if requested
|
|
534
532
|
}
|
|
535
533
|
|
|
536
|
-
ResponseMetadata metadata = 3;
|
|
534
|
+
ResponseMetadata metadata = 3; // Metadata about the blockchain state
|
|
537
535
|
}
|
|
538
536
|
oneof version { GetDataContractHistoryResponseV0 v0 = 1; }
|
|
539
537
|
}
|
|
540
538
|
|
|
541
539
|
message GetDocumentsRequest {
|
|
542
540
|
message GetDocumentsRequestV0 {
|
|
543
|
-
bytes data_contract_id =
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
bytes
|
|
547
|
-
|
|
541
|
+
bytes data_contract_id =
|
|
542
|
+
1; // The ID of the data contract containing the documents
|
|
543
|
+
string document_type = 2; // The type of document being requested
|
|
544
|
+
bytes where = 3; // Conditions to be met by the requested documents
|
|
545
|
+
bytes order_by = 4; // Ordering criteria for the documents
|
|
546
|
+
uint32 limit = 5; // Maximum number of documents to return
|
|
548
547
|
|
|
549
548
|
// Specifies the starting point for the document retrieval
|
|
550
549
|
oneof start {
|
|
551
|
-
bytes start_after = 6;
|
|
552
|
-
bytes start_at = 7;
|
|
550
|
+
bytes start_after = 6; // Start retrieval after this document
|
|
551
|
+
bytes start_at = 7; // Start retrieval at this document
|
|
553
552
|
}
|
|
554
|
-
bool prove = 8;
|
|
553
|
+
bool prove = 8; // Flag to request a proof as the response
|
|
555
554
|
}
|
|
556
555
|
oneof version { GetDocumentsRequestV0 v0 = 1; }
|
|
557
556
|
}
|
|
@@ -560,22 +559,23 @@ message GetDocumentsResponse {
|
|
|
560
559
|
message GetDocumentsResponseV0 {
|
|
561
560
|
// Represents a collection of documents
|
|
562
561
|
message Documents {
|
|
563
|
-
repeated bytes documents = 1;
|
|
562
|
+
repeated bytes documents = 1; // The actual documents in binary form
|
|
564
563
|
}
|
|
565
564
|
|
|
566
565
|
oneof result {
|
|
567
|
-
Documents documents = 1;
|
|
568
|
-
Proof proof = 2;
|
|
566
|
+
Documents documents = 1; // The actual documents requested
|
|
567
|
+
Proof proof = 2; // Cryptographic proof of the documents, if requested
|
|
569
568
|
}
|
|
570
|
-
ResponseMetadata metadata = 3;
|
|
569
|
+
ResponseMetadata metadata = 3; // Metadata about the blockchain state
|
|
571
570
|
}
|
|
572
571
|
oneof version { GetDocumentsResponseV0 v0 = 1; }
|
|
573
572
|
}
|
|
574
573
|
|
|
575
574
|
message GetIdentityByPublicKeyHashRequest {
|
|
576
575
|
message GetIdentityByPublicKeyHashRequestV0 {
|
|
577
|
-
bytes public_key_hash =
|
|
578
|
-
|
|
576
|
+
bytes public_key_hash =
|
|
577
|
+
1; // The public key hash of the identity being requested
|
|
578
|
+
bool prove = 2; // Flag to request a proof as the response
|
|
579
579
|
}
|
|
580
580
|
oneof version { GetIdentityByPublicKeyHashRequestV0 v0 = 1; }
|
|
581
581
|
}
|
|
@@ -583,19 +583,51 @@ message GetIdentityByPublicKeyHashRequest {
|
|
|
583
583
|
message GetIdentityByPublicKeyHashResponse {
|
|
584
584
|
message GetIdentityByPublicKeyHashResponseV0 {
|
|
585
585
|
oneof result {
|
|
586
|
-
bytes identity = 1;
|
|
587
|
-
|
|
586
|
+
bytes identity = 1; // The actual identity data corresponding to the
|
|
587
|
+
// requested public key hash
|
|
588
|
+
Proof proof =
|
|
589
|
+
2; // Cryptographic proof for the identity data, if requested
|
|
588
590
|
}
|
|
589
591
|
|
|
590
|
-
ResponseMetadata metadata = 3;
|
|
592
|
+
ResponseMetadata metadata = 3; // Metadata about the blockchain state
|
|
591
593
|
}
|
|
592
594
|
oneof version { GetIdentityByPublicKeyHashResponseV0 v0 = 1; }
|
|
593
595
|
}
|
|
594
596
|
|
|
597
|
+
message GetIdentityByNonUniquePublicKeyHashRequest {
|
|
598
|
+
message GetIdentityByNonUniquePublicKeyHashRequestV0 {
|
|
599
|
+
bytes public_key_hash = 1;
|
|
600
|
+
optional bytes start_after = 2; // Give one result after a previous result
|
|
601
|
+
bool prove = 3;
|
|
602
|
+
}
|
|
603
|
+
oneof version { GetIdentityByNonUniquePublicKeyHashRequestV0 v0 = 1; }
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
message GetIdentityByNonUniquePublicKeyHashResponse {
|
|
607
|
+
message GetIdentityByNonUniquePublicKeyHashResponseV0 {
|
|
608
|
+
message IdentityResponse {
|
|
609
|
+
optional bytes identity = 1;
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
message IdentityProvedResponse {
|
|
613
|
+
Proof grovedb_identity_public_key_hash_proof = 1;
|
|
614
|
+
optional bytes identity_proof_bytes = 2; // A hack, we return 2 proofs
|
|
615
|
+
}
|
|
616
|
+
oneof result {
|
|
617
|
+
IdentityResponse identity = 1;
|
|
618
|
+
IdentityProvedResponse proof = 2;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
ResponseMetadata metadata = 3; // Metadata about the blockchain state
|
|
622
|
+
}
|
|
623
|
+
oneof version { GetIdentityByNonUniquePublicKeyHashResponseV0 v0 = 1; }
|
|
624
|
+
}
|
|
625
|
+
|
|
595
626
|
message WaitForStateTransitionResultRequest {
|
|
596
627
|
message WaitForStateTransitionResultRequestV0 {
|
|
597
|
-
bytes state_transition_hash =
|
|
598
|
-
|
|
628
|
+
bytes state_transition_hash =
|
|
629
|
+
1; // The hash of the state transition to wait for
|
|
630
|
+
bool prove = 2; // Flag to request a proof as the response
|
|
599
631
|
}
|
|
600
632
|
oneof version { WaitForStateTransitionResultRequestV0 v0 = 1; }
|
|
601
633
|
}
|
|
@@ -603,155 +635,162 @@ message WaitForStateTransitionResultRequest {
|
|
|
603
635
|
message WaitForStateTransitionResultResponse {
|
|
604
636
|
message WaitForStateTransitionResultResponseV0 {
|
|
605
637
|
oneof result {
|
|
606
|
-
StateTransitionBroadcastError error =
|
|
607
|
-
|
|
638
|
+
StateTransitionBroadcastError error =
|
|
639
|
+
1; // Any error that occurred during the state transition broadcast
|
|
640
|
+
Proof proof =
|
|
641
|
+
2; // Cryptographic proof for the state transition, if requested
|
|
608
642
|
}
|
|
609
|
-
ResponseMetadata metadata = 3;
|
|
643
|
+
ResponseMetadata metadata = 3; // Metadata about the blockchain state
|
|
610
644
|
}
|
|
611
645
|
oneof version { WaitForStateTransitionResultResponseV0 v0 = 1; }
|
|
612
646
|
}
|
|
613
647
|
|
|
614
648
|
message GetConsensusParamsRequest {
|
|
615
649
|
message GetConsensusParamsRequestV0 {
|
|
616
|
-
int32 height =
|
|
617
|
-
|
|
650
|
+
int32 height =
|
|
651
|
+
1; // The blockchain height at which to get the consensus parameters
|
|
652
|
+
bool prove = 2; // Flag to request a proof as the response
|
|
618
653
|
}
|
|
619
654
|
oneof version { GetConsensusParamsRequestV0 v0 = 1; }
|
|
620
655
|
}
|
|
621
656
|
|
|
622
657
|
message GetConsensusParamsResponse {
|
|
623
658
|
message ConsensusParamsBlock {
|
|
624
|
-
string max_bytes = 1;
|
|
625
|
-
string max_gas = 2;
|
|
626
|
-
string time_iota_ms = 3;
|
|
659
|
+
string max_bytes = 1; // The maximum size of a block in bytes
|
|
660
|
+
string max_gas = 2; // The maximum gas allowed in a block
|
|
661
|
+
string time_iota_ms = 3; // The minimum time increment between consecutive
|
|
662
|
+
// blocks, in milliseconds
|
|
627
663
|
}
|
|
628
664
|
|
|
629
665
|
message ConsensusParamsEvidence {
|
|
630
|
-
string max_age_num_blocks =
|
|
631
|
-
|
|
632
|
-
string
|
|
666
|
+
string max_age_num_blocks =
|
|
667
|
+
1; // The maximum age of evidence, in number of blocks
|
|
668
|
+
string max_age_duration = 2; // The maximum age of evidence, as a duration
|
|
669
|
+
string max_bytes = 3; // The maximum size of evidence in bytes
|
|
633
670
|
}
|
|
634
671
|
|
|
635
672
|
message GetConsensusParamsResponseV0 {
|
|
636
|
-
ConsensusParamsBlock block =
|
|
637
|
-
|
|
673
|
+
ConsensusParamsBlock block =
|
|
674
|
+
1; // Consensus parameters related to block creation and validation
|
|
675
|
+
ConsensusParamsEvidence evidence =
|
|
676
|
+
2; // Consensus parameters related to evidence
|
|
638
677
|
}
|
|
639
678
|
oneof version { GetConsensusParamsResponseV0 v0 = 1; }
|
|
640
679
|
}
|
|
641
680
|
|
|
642
|
-
|
|
643
681
|
message GetProtocolVersionUpgradeStateRequest {
|
|
644
682
|
message GetProtocolVersionUpgradeStateRequestV0 {
|
|
645
|
-
bool prove = 1;
|
|
683
|
+
bool prove = 1; // Flag to request a proof as the response
|
|
646
684
|
}
|
|
647
685
|
|
|
648
|
-
oneof version {
|
|
649
|
-
GetProtocolVersionUpgradeStateRequestV0 v0 = 1;
|
|
650
|
-
}
|
|
686
|
+
oneof version { GetProtocolVersionUpgradeStateRequestV0 v0 = 1; }
|
|
651
687
|
}
|
|
652
688
|
|
|
653
689
|
message GetProtocolVersionUpgradeStateResponse {
|
|
654
690
|
message GetProtocolVersionUpgradeStateResponseV0 {
|
|
655
691
|
// Versions holds a collection of version entries
|
|
656
692
|
message Versions {
|
|
657
|
-
repeated VersionEntry versions = 1;
|
|
693
|
+
repeated VersionEntry versions = 1; // List of protocol version entries
|
|
658
694
|
}
|
|
659
695
|
|
|
660
696
|
// VersionEntry represents a single entry of a protocol version
|
|
661
697
|
message VersionEntry {
|
|
662
|
-
uint32 version_number = 1;
|
|
663
|
-
uint32 vote_count = 2;
|
|
698
|
+
uint32 version_number = 1; // The protocol version number
|
|
699
|
+
uint32 vote_count = 2; // The vote count for this protocol version
|
|
664
700
|
}
|
|
665
701
|
|
|
666
702
|
oneof result {
|
|
667
|
-
Versions versions = 1;
|
|
668
|
-
Proof proof = 2;
|
|
703
|
+
Versions versions = 1; // The actual protocol version information
|
|
704
|
+
Proof proof = 2; // Cryptographic proof of the protocol version
|
|
705
|
+
// information, if requested
|
|
669
706
|
}
|
|
670
|
-
ResponseMetadata metadata = 3;
|
|
707
|
+
ResponseMetadata metadata = 3; // Metadata about the blockchain state
|
|
671
708
|
}
|
|
672
709
|
|
|
673
|
-
oneof version {
|
|
674
|
-
GetProtocolVersionUpgradeStateResponseV0 v0 = 1;
|
|
675
|
-
}
|
|
710
|
+
oneof version { GetProtocolVersionUpgradeStateResponseV0 v0 = 1; }
|
|
676
711
|
}
|
|
677
712
|
|
|
678
713
|
message GetProtocolVersionUpgradeVoteStatusRequest {
|
|
679
714
|
message GetProtocolVersionUpgradeVoteStatusRequestV0 {
|
|
680
|
-
bytes start_pro_tx_hash = 1;
|
|
681
|
-
|
|
682
|
-
|
|
715
|
+
bytes start_pro_tx_hash = 1; // The starting masternode provider transaction
|
|
716
|
+
// hash to filter the votes by
|
|
717
|
+
uint32 count = 2; // The number of vote entries to retrieve
|
|
718
|
+
bool prove = 3; // Flag to request a proof as the response
|
|
683
719
|
}
|
|
684
720
|
|
|
685
|
-
oneof version {
|
|
686
|
-
GetProtocolVersionUpgradeVoteStatusRequestV0 v0 = 1;
|
|
687
|
-
}
|
|
721
|
+
oneof version { GetProtocolVersionUpgradeVoteStatusRequestV0 v0 = 1; }
|
|
688
722
|
}
|
|
689
723
|
|
|
690
724
|
message GetProtocolVersionUpgradeVoteStatusResponse {
|
|
691
725
|
message GetProtocolVersionUpgradeVoteStatusResponseV0 {
|
|
692
726
|
// VersionSignals holds a collection of version signal entries
|
|
693
727
|
message VersionSignals {
|
|
694
|
-
repeated VersionSignal version_signals =
|
|
728
|
+
repeated VersionSignal version_signals =
|
|
729
|
+
1; // List of version signal entries
|
|
695
730
|
}
|
|
696
731
|
|
|
697
732
|
// VersionSignal represents a single voting signal for a protocol version
|
|
698
733
|
message VersionSignal {
|
|
699
|
-
bytes pro_tx_hash = 1;
|
|
700
|
-
|
|
734
|
+
bytes pro_tx_hash = 1; // The masternode provider transaction hash
|
|
735
|
+
// associated with the vote
|
|
736
|
+
uint32 version = 2; // The protocol version number that is being voted on
|
|
701
737
|
}
|
|
702
738
|
|
|
703
739
|
oneof result {
|
|
704
|
-
VersionSignals versions = 1;
|
|
705
|
-
Proof proof = 2;
|
|
740
|
+
VersionSignals versions = 1; // The actual version signal information
|
|
741
|
+
Proof proof = 2; // Cryptographic proof of the version signal information,
|
|
742
|
+
// if requested
|
|
706
743
|
}
|
|
707
|
-
ResponseMetadata metadata = 3;
|
|
744
|
+
ResponseMetadata metadata = 3; // Metadata about the blockchain state
|
|
708
745
|
}
|
|
709
746
|
|
|
710
|
-
oneof version {
|
|
711
|
-
GetProtocolVersionUpgradeVoteStatusResponseV0 v0 = 1;
|
|
712
|
-
}
|
|
747
|
+
oneof version { GetProtocolVersionUpgradeVoteStatusResponseV0 v0 = 1; }
|
|
713
748
|
}
|
|
714
749
|
|
|
715
750
|
message GetEpochsInfoRequest {
|
|
716
751
|
message GetEpochsInfoRequestV0 {
|
|
717
|
-
google.protobuf.UInt32Value start_epoch =
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
bool
|
|
752
|
+
google.protobuf.UInt32Value start_epoch =
|
|
753
|
+
1; // The starting epoch for the request
|
|
754
|
+
uint32 count = 2; // The number of epochs to retrieve information for
|
|
755
|
+
bool ascending =
|
|
756
|
+
3; // Flag indicating if the epochs should be listed in ascending order
|
|
757
|
+
bool prove = 4; // Flag to request a proof as the response
|
|
721
758
|
}
|
|
722
759
|
|
|
723
|
-
oneof version {
|
|
724
|
-
GetEpochsInfoRequestV0 v0 = 1;
|
|
725
|
-
}
|
|
760
|
+
oneof version { GetEpochsInfoRequestV0 v0 = 1; }
|
|
726
761
|
}
|
|
727
762
|
|
|
728
763
|
message GetEpochsInfoResponse {
|
|
729
764
|
message GetEpochsInfoResponseV0 {
|
|
730
765
|
// EpochInfos holds a collection of epoch information entries
|
|
731
766
|
message EpochInfos {
|
|
732
|
-
repeated EpochInfo epoch_infos =
|
|
767
|
+
repeated EpochInfo epoch_infos =
|
|
768
|
+
1; // List of information for each requested epoch
|
|
733
769
|
}
|
|
734
770
|
|
|
735
771
|
// EpochInfo represents information about a single epoch
|
|
736
772
|
message EpochInfo {
|
|
737
|
-
uint32 number = 1;
|
|
738
|
-
uint64 first_block_height = 2
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
773
|
+
uint32 number = 1; // The number of the epoch
|
|
774
|
+
uint64 first_block_height = 2
|
|
775
|
+
[ jstype = JS_STRING ]; // The height of the first block in this epoch
|
|
776
|
+
uint32 first_core_block_height =
|
|
777
|
+
3; // The height of the first Core block in this epoch
|
|
778
|
+
uint64 start_time = 4
|
|
779
|
+
[ jstype = JS_STRING ]; // The start time of the epoch
|
|
780
|
+
double fee_multiplier = 5; // The fee multiplier applicable in this epoch
|
|
742
781
|
uint32 protocol_version = 6;
|
|
743
782
|
}
|
|
744
783
|
|
|
745
784
|
oneof result {
|
|
746
|
-
EpochInfos epochs =
|
|
747
|
-
|
|
785
|
+
EpochInfos epochs =
|
|
786
|
+
1; // The actual information about the requested epochs
|
|
787
|
+
Proof proof =
|
|
788
|
+
2; // Cryptographic proof of the epoch information, if requested
|
|
748
789
|
}
|
|
749
|
-
ResponseMetadata metadata = 3;
|
|
790
|
+
ResponseMetadata metadata = 3; // Metadata about the blockchain state
|
|
750
791
|
}
|
|
751
792
|
|
|
752
|
-
oneof version {
|
|
753
|
-
GetEpochsInfoResponseV0 v0 = 1;
|
|
754
|
-
}
|
|
793
|
+
oneof version { GetEpochsInfoResponseV0 v0 = 1; }
|
|
755
794
|
}
|
|
756
795
|
|
|
757
796
|
message GetContestedResourcesRequest {
|
|
@@ -772,9 +811,7 @@ message GetContestedResourcesRequest {
|
|
|
772
811
|
bool prove = 9;
|
|
773
812
|
}
|
|
774
813
|
|
|
775
|
-
oneof version {
|
|
776
|
-
GetContestedResourcesRequestV0 v0 = 1;
|
|
777
|
-
}
|
|
814
|
+
oneof version { GetContestedResourcesRequestV0 v0 = 1; }
|
|
778
815
|
}
|
|
779
816
|
|
|
780
817
|
message GetContestedResourcesResponse {
|
|
@@ -790,19 +827,17 @@ message GetContestedResourcesResponse {
|
|
|
790
827
|
ResponseMetadata metadata = 3;
|
|
791
828
|
}
|
|
792
829
|
|
|
793
|
-
oneof version {
|
|
794
|
-
GetContestedResourcesResponseV0 v0 = 1;
|
|
795
|
-
}
|
|
830
|
+
oneof version { GetContestedResourcesResponseV0 v0 = 1; }
|
|
796
831
|
}
|
|
797
832
|
|
|
798
833
|
message GetVotePollsByEndDateRequest {
|
|
799
834
|
message GetVotePollsByEndDateRequestV0 {
|
|
800
835
|
message StartAtTimeInfo {
|
|
801
|
-
uint64 start_time_ms = 1;
|
|
836
|
+
uint64 start_time_ms = 1 [ jstype = JS_STRING ];
|
|
802
837
|
bool start_time_included = 2;
|
|
803
838
|
}
|
|
804
839
|
message EndAtTimeInfo {
|
|
805
|
-
uint64 end_time_ms = 1;
|
|
840
|
+
uint64 end_time_ms = 1 [ jstype = JS_STRING ];
|
|
806
841
|
bool end_time_included = 2;
|
|
807
842
|
}
|
|
808
843
|
optional StartAtTimeInfo start_time_info = 1;
|
|
@@ -813,15 +848,13 @@ message GetVotePollsByEndDateRequest {
|
|
|
813
848
|
bool prove = 6;
|
|
814
849
|
}
|
|
815
850
|
|
|
816
|
-
oneof version {
|
|
817
|
-
GetVotePollsByEndDateRequestV0 v0 = 1;
|
|
818
|
-
}
|
|
851
|
+
oneof version { GetVotePollsByEndDateRequestV0 v0 = 1; }
|
|
819
852
|
}
|
|
820
853
|
|
|
821
854
|
message GetVotePollsByEndDateResponse {
|
|
822
855
|
message GetVotePollsByEndDateResponseV0 {
|
|
823
856
|
message SerializedVotePollsByTimestamp {
|
|
824
|
-
uint64 timestamp = 1;
|
|
857
|
+
uint64 timestamp = 1 [ jstype = JS_STRING ];
|
|
825
858
|
repeated bytes serialized_vote_polls = 2;
|
|
826
859
|
}
|
|
827
860
|
|
|
@@ -837,9 +870,7 @@ message GetVotePollsByEndDateResponse {
|
|
|
837
870
|
ResponseMetadata metadata = 3;
|
|
838
871
|
}
|
|
839
872
|
|
|
840
|
-
oneof version {
|
|
841
|
-
GetVotePollsByEndDateResponseV0 v0 = 1;
|
|
842
|
-
}
|
|
873
|
+
oneof version { GetVotePollsByEndDateResponseV0 v0 = 1; }
|
|
843
874
|
}
|
|
844
875
|
|
|
845
876
|
// What's the state of a contested resource vote? (ie who is winning?)
|
|
@@ -866,9 +897,7 @@ message GetContestedResourceVoteStateRequest {
|
|
|
866
897
|
bool prove = 9;
|
|
867
898
|
}
|
|
868
899
|
|
|
869
|
-
oneof version {
|
|
870
|
-
GetContestedResourceVoteStateRequestV0 v0 = 1;
|
|
871
|
-
}
|
|
900
|
+
oneof version { GetContestedResourceVoteStateRequestV0 v0 = 1; }
|
|
872
901
|
}
|
|
873
902
|
|
|
874
903
|
message GetContestedResourceVoteStateResponse {
|
|
@@ -880,10 +909,11 @@ message GetContestedResourceVoteStateResponse {
|
|
|
880
909
|
NO_PREVIOUS_WINNER = 2;
|
|
881
910
|
}
|
|
882
911
|
FinishedVoteOutcome finished_vote_outcome = 1;
|
|
883
|
-
optional bytes won_by_identity_id =
|
|
884
|
-
|
|
912
|
+
optional bytes won_by_identity_id =
|
|
913
|
+
2; // Only used when vote_choice_type is TOWARDS_IDENTITY
|
|
914
|
+
uint64 finished_at_block_height = 3 [ jstype = JS_STRING ];
|
|
885
915
|
uint32 finished_at_core_block_height = 4;
|
|
886
|
-
uint64 finished_at_block_time_ms = 5;
|
|
916
|
+
uint64 finished_at_block_time_ms = 5 [ jstype = JS_STRING ];
|
|
887
917
|
uint32 finished_at_epoch = 6;
|
|
888
918
|
}
|
|
889
919
|
|
|
@@ -907,9 +937,7 @@ message GetContestedResourceVoteStateResponse {
|
|
|
907
937
|
ResponseMetadata metadata = 3;
|
|
908
938
|
}
|
|
909
939
|
|
|
910
|
-
oneof version {
|
|
911
|
-
GetContestedResourceVoteStateResponseV0 v0 = 1;
|
|
912
|
-
}
|
|
940
|
+
oneof version { GetContestedResourceVoteStateResponseV0 v0 = 1; }
|
|
913
941
|
}
|
|
914
942
|
|
|
915
943
|
// Who voted for a contested resource to go to a specific identity?
|
|
@@ -930,9 +958,7 @@ message GetContestedResourceVotersForIdentityRequest {
|
|
|
930
958
|
bool prove = 9;
|
|
931
959
|
}
|
|
932
960
|
|
|
933
|
-
oneof version {
|
|
934
|
-
GetContestedResourceVotersForIdentityRequestV0 v0 = 1;
|
|
935
|
-
}
|
|
961
|
+
oneof version { GetContestedResourceVotersForIdentityRequestV0 v0 = 1; }
|
|
936
962
|
}
|
|
937
963
|
|
|
938
964
|
message GetContestedResourceVotersForIdentityResponse {
|
|
@@ -949,9 +975,7 @@ message GetContestedResourceVotersForIdentityResponse {
|
|
|
949
975
|
ResponseMetadata metadata = 3;
|
|
950
976
|
}
|
|
951
977
|
|
|
952
|
-
oneof version {
|
|
953
|
-
GetContestedResourceVotersForIdentityResponseV0 v0 = 1;
|
|
954
|
-
}
|
|
978
|
+
oneof version { GetContestedResourceVotersForIdentityResponseV0 v0 = 1; }
|
|
955
979
|
}
|
|
956
980
|
|
|
957
981
|
// How did an identity vote?
|
|
@@ -969,15 +993,14 @@ message GetContestedResourceIdentityVotesRequest {
|
|
|
969
993
|
bool prove = 6;
|
|
970
994
|
}
|
|
971
995
|
|
|
972
|
-
oneof version {
|
|
973
|
-
GetContestedResourceIdentityVotesRequestV0 v0 = 1;
|
|
974
|
-
}
|
|
996
|
+
oneof version { GetContestedResourceIdentityVotesRequestV0 v0 = 1; }
|
|
975
997
|
}
|
|
976
998
|
|
|
977
999
|
message GetContestedResourceIdentityVotesResponse {
|
|
978
1000
|
message GetContestedResourceIdentityVotesResponseV0 {
|
|
979
1001
|
message ContestedResourceIdentityVotes {
|
|
980
|
-
repeated ContestedResourceIdentityVote contested_resource_identity_votes =
|
|
1002
|
+
repeated ContestedResourceIdentityVote contested_resource_identity_votes =
|
|
1003
|
+
1;
|
|
981
1004
|
bool finished_results = 2;
|
|
982
1005
|
}
|
|
983
1006
|
|
|
@@ -988,7 +1011,8 @@ message GetContestedResourceIdentityVotesResponse {
|
|
|
988
1011
|
LOCK = 2;
|
|
989
1012
|
}
|
|
990
1013
|
VoteChoiceType vote_choice_type = 1;
|
|
991
|
-
optional bytes identity_id =
|
|
1014
|
+
optional bytes identity_id =
|
|
1015
|
+
2; // Only used when vote_choice_type is TOWARDS_IDENTITY
|
|
992
1016
|
}
|
|
993
1017
|
|
|
994
1018
|
message ContestedResourceIdentityVote {
|
|
@@ -1005,9 +1029,7 @@ message GetContestedResourceIdentityVotesResponse {
|
|
|
1005
1029
|
ResponseMetadata metadata = 3;
|
|
1006
1030
|
}
|
|
1007
1031
|
|
|
1008
|
-
oneof version {
|
|
1009
|
-
GetContestedResourceIdentityVotesResponseV0 v0 = 1;
|
|
1010
|
-
}
|
|
1032
|
+
oneof version { GetContestedResourceIdentityVotesResponseV0 v0 = 1; }
|
|
1011
1033
|
}
|
|
1012
1034
|
|
|
1013
1035
|
message GetPrefundedSpecializedBalanceRequest {
|
|
@@ -1024,7 +1046,7 @@ message GetPrefundedSpecializedBalanceResponse {
|
|
|
1024
1046
|
|
|
1025
1047
|
message GetPrefundedSpecializedBalanceResponseV0 {
|
|
1026
1048
|
oneof result {
|
|
1027
|
-
uint64 balance = 1;
|
|
1049
|
+
uint64 balance = 1 [ jstype = JS_STRING ];
|
|
1028
1050
|
Proof proof = 2;
|
|
1029
1051
|
}
|
|
1030
1052
|
ResponseMetadata metadata = 3;
|
|
@@ -1034,28 +1056,22 @@ message GetPrefundedSpecializedBalanceResponse {
|
|
|
1034
1056
|
}
|
|
1035
1057
|
|
|
1036
1058
|
message GetTotalCreditsInPlatformRequest {
|
|
1037
|
-
message GetTotalCreditsInPlatformRequestV0 {
|
|
1038
|
-
bool prove = 1;
|
|
1039
|
-
}
|
|
1059
|
+
message GetTotalCreditsInPlatformRequestV0 { bool prove = 1; }
|
|
1040
1060
|
|
|
1041
|
-
oneof version {
|
|
1042
|
-
GetTotalCreditsInPlatformRequestV0 v0 = 1;
|
|
1043
|
-
}
|
|
1061
|
+
oneof version { GetTotalCreditsInPlatformRequestV0 v0 = 1; }
|
|
1044
1062
|
}
|
|
1045
1063
|
|
|
1046
1064
|
message GetTotalCreditsInPlatformResponse {
|
|
1047
1065
|
message GetTotalCreditsInPlatformResponseV0 {
|
|
1048
1066
|
oneof result {
|
|
1049
|
-
uint64 credits = 1;
|
|
1067
|
+
uint64 credits = 1 [ jstype = JS_STRING ];
|
|
1050
1068
|
|
|
1051
1069
|
Proof proof = 2;
|
|
1052
1070
|
}
|
|
1053
1071
|
ResponseMetadata metadata = 3;
|
|
1054
1072
|
}
|
|
1055
1073
|
|
|
1056
|
-
oneof version {
|
|
1057
|
-
GetTotalCreditsInPlatformResponseV0 v0 = 1;
|
|
1058
|
-
}
|
|
1074
|
+
oneof version { GetTotalCreditsInPlatformResponseV0 v0 = 1; }
|
|
1059
1075
|
}
|
|
1060
1076
|
|
|
1061
1077
|
message GetPathElementsRequest {
|
|
@@ -1065,16 +1081,12 @@ message GetPathElementsRequest {
|
|
|
1065
1081
|
bool prove = 3;
|
|
1066
1082
|
}
|
|
1067
1083
|
|
|
1068
|
-
oneof version {
|
|
1069
|
-
GetPathElementsRequestV0 v0 = 1;
|
|
1070
|
-
}
|
|
1084
|
+
oneof version { GetPathElementsRequestV0 v0 = 1; }
|
|
1071
1085
|
}
|
|
1072
1086
|
|
|
1073
1087
|
message GetPathElementsResponse {
|
|
1074
1088
|
message GetPathElementsResponseV0 {
|
|
1075
|
-
message Elements {
|
|
1076
|
-
repeated bytes elements = 1;
|
|
1077
|
-
}
|
|
1089
|
+
message Elements { repeated bytes elements = 1; }
|
|
1078
1090
|
|
|
1079
1091
|
oneof result {
|
|
1080
1092
|
Elements elements = 1;
|
|
@@ -1084,19 +1096,15 @@ message GetPathElementsResponse {
|
|
|
1084
1096
|
ResponseMetadata metadata = 3;
|
|
1085
1097
|
}
|
|
1086
1098
|
|
|
1087
|
-
oneof version {
|
|
1088
|
-
GetPathElementsResponseV0 v0 = 1;
|
|
1089
|
-
}
|
|
1099
|
+
oneof version { GetPathElementsResponseV0 v0 = 1; }
|
|
1090
1100
|
}
|
|
1091
1101
|
|
|
1092
1102
|
message GetStatusRequest {
|
|
1093
|
-
message GetStatusRequestV0 {
|
|
1094
|
-
}
|
|
1103
|
+
message GetStatusRequestV0 {}
|
|
1095
1104
|
|
|
1096
1105
|
oneof version { GetStatusRequestV0 v0 = 1; }
|
|
1097
1106
|
}
|
|
1098
1107
|
|
|
1099
|
-
|
|
1100
1108
|
message GetStatusResponse {
|
|
1101
1109
|
message GetStatusResponseV0 {
|
|
1102
1110
|
message Version {
|
|
@@ -1128,11 +1136,11 @@ message GetStatusResponse {
|
|
|
1128
1136
|
}
|
|
1129
1137
|
|
|
1130
1138
|
message Time {
|
|
1131
|
-
uint64 local = 1;
|
|
1139
|
+
uint64 local = 1 [ jstype = JS_STRING ];
|
|
1132
1140
|
// It will be missing if Drive is not responding
|
|
1133
|
-
optional uint64 block = 2;
|
|
1141
|
+
optional uint64 block = 2 [ jstype = JS_STRING ];
|
|
1134
1142
|
// It will be missing if Drive is not responding
|
|
1135
|
-
optional uint64 genesis = 3;
|
|
1143
|
+
optional uint64 genesis = 3 [ jstype = JS_STRING ];
|
|
1136
1144
|
// It will be missing if Drive is not responding
|
|
1137
1145
|
optional uint32 epoch = 4;
|
|
1138
1146
|
}
|
|
@@ -1148,11 +1156,11 @@ message GetStatusResponse {
|
|
|
1148
1156
|
bool catching_up = 1;
|
|
1149
1157
|
bytes latest_block_hash = 2;
|
|
1150
1158
|
bytes latest_app_hash = 3;
|
|
1151
|
-
uint64 latest_block_height = 4;
|
|
1159
|
+
uint64 latest_block_height = 4 [ jstype = JS_STRING ];
|
|
1152
1160
|
bytes earliest_block_hash = 5;
|
|
1153
1161
|
bytes earliest_app_hash = 6;
|
|
1154
|
-
uint64 earliest_block_height = 7;
|
|
1155
|
-
uint64 max_peer_block_height = 9;
|
|
1162
|
+
uint64 earliest_block_height = 7 [ jstype = JS_STRING ];
|
|
1163
|
+
uint64 max_peer_block_height = 9 [ jstype = JS_STRING ];
|
|
1156
1164
|
// Latest known core height in consensus.
|
|
1157
1165
|
// It will be missing if Drive is not responding
|
|
1158
1166
|
optional uint32 core_chain_locked_height = 10;
|
|
@@ -1165,14 +1173,14 @@ message GetStatusResponse {
|
|
|
1165
1173
|
}
|
|
1166
1174
|
|
|
1167
1175
|
message StateSync {
|
|
1168
|
-
uint64 total_synced_time = 1;
|
|
1169
|
-
uint64 remaining_time = 2;
|
|
1176
|
+
uint64 total_synced_time = 1 [ jstype = JS_STRING ];
|
|
1177
|
+
uint64 remaining_time = 2 [ jstype = JS_STRING ];
|
|
1170
1178
|
uint32 total_snapshots = 3;
|
|
1171
|
-
uint64 chunk_process_avg_time = 4;
|
|
1172
|
-
uint64 snapshot_height = 5;
|
|
1173
|
-
uint64 snapshot_chunks_count = 6;
|
|
1174
|
-
uint64 backfilled_blocks = 7;
|
|
1175
|
-
uint64 backfill_blocks_total = 8;
|
|
1179
|
+
uint64 chunk_process_avg_time = 4 [ jstype = JS_STRING ];
|
|
1180
|
+
uint64 snapshot_height = 5 [ jstype = JS_STRING ];
|
|
1181
|
+
uint64 snapshot_chunks_count = 6 [ jstype = JS_STRING ];
|
|
1182
|
+
uint64 backfilled_blocks = 7 [ jstype = JS_STRING ];
|
|
1183
|
+
uint64 backfill_blocks_total = 8 [ jstype = JS_STRING ];
|
|
1176
1184
|
}
|
|
1177
1185
|
|
|
1178
1186
|
Version version = 1;
|
|
@@ -1187,8 +1195,7 @@ message GetStatusResponse {
|
|
|
1187
1195
|
}
|
|
1188
1196
|
|
|
1189
1197
|
message GetCurrentQuorumsInfoRequest {
|
|
1190
|
-
message GetCurrentQuorumsInfoRequestV0 {
|
|
1191
|
-
}
|
|
1198
|
+
message GetCurrentQuorumsInfoRequestV0 {}
|
|
1192
1199
|
|
|
1193
1200
|
oneof version { GetCurrentQuorumsInfoRequestV0 v0 = 1; }
|
|
1194
1201
|
}
|
|
@@ -1215,3 +1222,550 @@ message GetCurrentQuorumsInfoResponse {
|
|
|
1215
1222
|
}
|
|
1216
1223
|
oneof version { GetCurrentQuorumsInfoResponseV0 v0 = 1; }
|
|
1217
1224
|
}
|
|
1225
|
+
|
|
1226
|
+
message GetIdentityTokenBalancesRequest {
|
|
1227
|
+
message GetIdentityTokenBalancesRequestV0 {
|
|
1228
|
+
bytes identity_id = 1; // ID of the identity
|
|
1229
|
+
repeated bytes token_ids = 2; // List of token IDs
|
|
1230
|
+
bool prove = 3; // Flag to request a proof as the response
|
|
1231
|
+
}
|
|
1232
|
+
oneof version { GetIdentityTokenBalancesRequestV0 v0 = 1; }
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
message GetIdentityTokenBalancesResponse {
|
|
1236
|
+
message GetIdentityTokenBalancesResponseV0 {
|
|
1237
|
+
message TokenBalanceEntry {
|
|
1238
|
+
bytes token_id = 1; // Token ID
|
|
1239
|
+
optional uint64 balance = 2; // Token balance for the contract
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
message TokenBalances {
|
|
1243
|
+
repeated TokenBalanceEntry token_balances = 1; // List of token balances
|
|
1244
|
+
}
|
|
1245
|
+
|
|
1246
|
+
oneof result {
|
|
1247
|
+
TokenBalances token_balances = 1; // Actual token balances
|
|
1248
|
+
Proof proof = 2; // Proof of the token balances, if requested
|
|
1249
|
+
}
|
|
1250
|
+
ResponseMetadata metadata = 3; // Metadata about the blockchain state
|
|
1251
|
+
}
|
|
1252
|
+
oneof version { GetIdentityTokenBalancesResponseV0 v0 = 1; }
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
message GetIdentitiesTokenBalancesRequest {
|
|
1256
|
+
message GetIdentitiesTokenBalancesRequestV0 {
|
|
1257
|
+
bytes token_id = 1; // Token ID
|
|
1258
|
+
repeated bytes identity_ids = 2; // List of identity IDs
|
|
1259
|
+
bool prove = 3; // Flag to request a proof as the response
|
|
1260
|
+
}
|
|
1261
|
+
oneof version { GetIdentitiesTokenBalancesRequestV0 v0 = 1; }
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
message GetIdentitiesTokenBalancesResponse {
|
|
1265
|
+
message GetIdentitiesTokenBalancesResponseV0 {
|
|
1266
|
+
message IdentityTokenBalanceEntry {
|
|
1267
|
+
bytes identity_id = 1; // Identity ID
|
|
1268
|
+
optional uint64 balance = 2; // Token balance for the identity
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
message IdentityTokenBalances {
|
|
1272
|
+
repeated IdentityTokenBalanceEntry identity_token_balances =
|
|
1273
|
+
1; // List of identity token balances
|
|
1274
|
+
}
|
|
1275
|
+
|
|
1276
|
+
oneof result {
|
|
1277
|
+
IdentityTokenBalances identity_token_balances =
|
|
1278
|
+
1; // Actual identity token balances
|
|
1279
|
+
Proof proof = 2; // Proof of the balances, if requested
|
|
1280
|
+
}
|
|
1281
|
+
ResponseMetadata metadata = 3; // Metadata about the blockchain state
|
|
1282
|
+
}
|
|
1283
|
+
oneof version { GetIdentitiesTokenBalancesResponseV0 v0 = 1; }
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1286
|
+
message GetIdentityTokenInfosRequest {
|
|
1287
|
+
message GetIdentityTokenInfosRequestV0 {
|
|
1288
|
+
bytes identity_id = 1;
|
|
1289
|
+
repeated bytes token_ids = 2;
|
|
1290
|
+
bool prove = 3;
|
|
1291
|
+
}
|
|
1292
|
+
oneof version { GetIdentityTokenInfosRequestV0 v0 = 1; }
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1295
|
+
message GetIdentityTokenInfosResponse {
|
|
1296
|
+
message GetIdentityTokenInfosResponseV0 {
|
|
1297
|
+
message TokenIdentityInfoEntry { bool frozen = 1; }
|
|
1298
|
+
|
|
1299
|
+
message TokenInfoEntry {
|
|
1300
|
+
bytes token_id = 1;
|
|
1301
|
+
optional TokenIdentityInfoEntry info = 2;
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
message TokenInfos { repeated TokenInfoEntry token_infos = 1; }
|
|
1305
|
+
|
|
1306
|
+
oneof result {
|
|
1307
|
+
TokenInfos token_infos = 1;
|
|
1308
|
+
Proof proof = 2;
|
|
1309
|
+
}
|
|
1310
|
+
ResponseMetadata metadata = 3;
|
|
1311
|
+
}
|
|
1312
|
+
oneof version { GetIdentityTokenInfosResponseV0 v0 = 1; }
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
message GetIdentitiesTokenInfosRequest {
|
|
1316
|
+
message GetIdentitiesTokenInfosRequestV0 {
|
|
1317
|
+
bytes token_id = 1;
|
|
1318
|
+
repeated bytes identity_ids = 2;
|
|
1319
|
+
bool prove = 3;
|
|
1320
|
+
}
|
|
1321
|
+
oneof version { GetIdentitiesTokenInfosRequestV0 v0 = 1; }
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
message GetIdentitiesTokenInfosResponse {
|
|
1325
|
+
message GetIdentitiesTokenInfosResponseV0 {
|
|
1326
|
+
message TokenIdentityInfoEntry { bool frozen = 1; }
|
|
1327
|
+
|
|
1328
|
+
message TokenInfoEntry {
|
|
1329
|
+
bytes identity_id = 1;
|
|
1330
|
+
optional TokenIdentityInfoEntry info = 2;
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
message IdentityTokenInfos { repeated TokenInfoEntry token_infos = 1; }
|
|
1334
|
+
|
|
1335
|
+
oneof result {
|
|
1336
|
+
IdentityTokenInfos identity_token_infos = 1;
|
|
1337
|
+
Proof proof = 2;
|
|
1338
|
+
}
|
|
1339
|
+
ResponseMetadata metadata = 3;
|
|
1340
|
+
}
|
|
1341
|
+
oneof version { GetIdentitiesTokenInfosResponseV0 v0 = 1; }
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1344
|
+
message GetTokenStatusesRequest {
|
|
1345
|
+
message GetTokenStatusesRequestV0 {
|
|
1346
|
+
repeated bytes token_ids = 1;
|
|
1347
|
+
bool prove = 2;
|
|
1348
|
+
}
|
|
1349
|
+
oneof version { GetTokenStatusesRequestV0 v0 = 1; }
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
message GetTokenStatusesResponse {
|
|
1353
|
+
message GetTokenStatusesResponseV0 {
|
|
1354
|
+
message TokenStatusEntry {
|
|
1355
|
+
bytes token_id = 1;
|
|
1356
|
+
optional bool paused = 2;
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
message TokenStatuses { repeated TokenStatusEntry token_statuses = 1; }
|
|
1360
|
+
|
|
1361
|
+
oneof result {
|
|
1362
|
+
TokenStatuses token_statuses = 1;
|
|
1363
|
+
Proof proof = 2;
|
|
1364
|
+
}
|
|
1365
|
+
ResponseMetadata metadata = 3;
|
|
1366
|
+
}
|
|
1367
|
+
oneof version { GetTokenStatusesResponseV0 v0 = 1; }
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1370
|
+
// Response to GetTokenDirectPurchasePricesRequest, containing information about
|
|
1371
|
+
// direct purchase prices defined for requested token IDs.
|
|
1372
|
+
message GetTokenDirectPurchasePricesResponse {
|
|
1373
|
+
message GetTokenDirectPurchasePricesResponseV0 {
|
|
1374
|
+
// Contains the individual price tier for a specific quantity of tokens.
|
|
1375
|
+
message PriceForQuantity {
|
|
1376
|
+
// Minimum quantity of tokens to purchase to get this price.
|
|
1377
|
+
uint64 quantity = 1;
|
|
1378
|
+
// Price for the specified quantity of tokens.
|
|
1379
|
+
uint64 price = 2;
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
// Contains list of price tiers for a specific token.
|
|
1383
|
+
message PricingSchedule {
|
|
1384
|
+
repeated PriceForQuantity price_for_quantity = 1;
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1387
|
+
message TokenDirectPurchasePriceEntry {
|
|
1388
|
+
// 32-byte token identifier
|
|
1389
|
+
bytes token_id = 1;
|
|
1390
|
+
|
|
1391
|
+
// Price of the token; optional
|
|
1392
|
+
oneof price {
|
|
1393
|
+
// Fixed price for the token.
|
|
1394
|
+
uint64 fixed_price = 2;
|
|
1395
|
+
// Tiered pricing for the token, where the price varies based on the
|
|
1396
|
+
// quantity purchased.
|
|
1397
|
+
PricingSchedule variable_price = 3;
|
|
1398
|
+
}
|
|
1399
|
+
}
|
|
1400
|
+
// For each requested token, contains list of token IDs and their
|
|
1401
|
+
// corresponding direct purchase prices.
|
|
1402
|
+
message TokenDirectPurchasePrices {
|
|
1403
|
+
repeated TokenDirectPurchasePriceEntry token_direct_purchase_price = 1;
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1406
|
+
oneof result {
|
|
1407
|
+
// Contains the list of token IDs and their corresponding direct
|
|
1408
|
+
TokenDirectPurchasePrices token_direct_purchase_prices = 1;
|
|
1409
|
+
// Requested information in a form of cryptographic proof.
|
|
1410
|
+
// In Rust, use `FromProof` trait to convert it to the actual data.
|
|
1411
|
+
Proof proof = 2;
|
|
1412
|
+
}
|
|
1413
|
+
// Metadata about the blockchain state.
|
|
1414
|
+
ResponseMetadata metadata = 3;
|
|
1415
|
+
}
|
|
1416
|
+
oneof version { GetTokenDirectPurchasePricesResponseV0 v0 = 1; }
|
|
1417
|
+
}
|
|
1418
|
+
|
|
1419
|
+
// Retrieve direct purchase prices defined for one or more tokens.
|
|
1420
|
+
//
|
|
1421
|
+
// Some tokens can have a direct purchase price defined using
|
|
1422
|
+
// `TokenSetPriceForDirectPurchaseTransition` (see `dpp` crate for details).
|
|
1423
|
+
// This request retrieves the direct purchase prices for those tokens and
|
|
1424
|
+
// returns [GetTokenDirectPurchasePricesResponse].
|
|
1425
|
+
message GetTokenDirectPurchasePricesRequest {
|
|
1426
|
+
message GetTokenDirectPurchasePricesRequestV0 {
|
|
1427
|
+
// List of token IDs to get prices for.
|
|
1428
|
+
//
|
|
1429
|
+
// The list must not be empty.
|
|
1430
|
+
// Token IDs must have 32 bytes and be unique.
|
|
1431
|
+
// Results for non-unique token IDs are undefined.
|
|
1432
|
+
repeated bytes token_ids = 1;
|
|
1433
|
+
// Whether to return proofs for the response, or just direct response.
|
|
1434
|
+
bool prove = 2;
|
|
1435
|
+
}
|
|
1436
|
+
oneof version { GetTokenDirectPurchasePricesRequestV0 v0 = 1; }
|
|
1437
|
+
}
|
|
1438
|
+
|
|
1439
|
+
message GetTokenPreProgrammedDistributionsRequest {
|
|
1440
|
+
message GetTokenPreProgrammedDistributionsRequestV0 {
|
|
1441
|
+
bytes token_id = 1;
|
|
1442
|
+
message StartAtInfo {
|
|
1443
|
+
uint64 start_time_ms = 1;
|
|
1444
|
+
optional bytes start_recipient = 2;
|
|
1445
|
+
optional bool start_recipient_included = 3;
|
|
1446
|
+
}
|
|
1447
|
+
optional StartAtInfo start_at_info = 2;
|
|
1448
|
+
optional uint32 limit = 3;
|
|
1449
|
+
bool prove = 4;
|
|
1450
|
+
}
|
|
1451
|
+
oneof version { GetTokenPreProgrammedDistributionsRequestV0 v0 = 1; }
|
|
1452
|
+
}
|
|
1453
|
+
|
|
1454
|
+
message GetTokenPreProgrammedDistributionsResponse {
|
|
1455
|
+
message GetTokenPreProgrammedDistributionsResponseV0 {
|
|
1456
|
+
message TokenDistributionEntry {
|
|
1457
|
+
bytes recipient_id = 1;
|
|
1458
|
+
uint64 amount = 2;
|
|
1459
|
+
}
|
|
1460
|
+
|
|
1461
|
+
message TokenTimedDistributionEntry {
|
|
1462
|
+
uint64 timestamp = 1;
|
|
1463
|
+
repeated TokenDistributionEntry distributions = 2;
|
|
1464
|
+
}
|
|
1465
|
+
|
|
1466
|
+
message TokenDistributions {
|
|
1467
|
+
repeated TokenTimedDistributionEntry token_distributions = 1;
|
|
1468
|
+
}
|
|
1469
|
+
|
|
1470
|
+
oneof result {
|
|
1471
|
+
TokenDistributions token_distributions = 1;
|
|
1472
|
+
Proof proof = 2;
|
|
1473
|
+
}
|
|
1474
|
+
ResponseMetadata metadata = 3;
|
|
1475
|
+
}
|
|
1476
|
+
oneof version { GetTokenPreProgrammedDistributionsResponseV0 v0 = 1; }
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
message GetTokenTotalSupplyRequest {
|
|
1480
|
+
message GetTokenTotalSupplyRequestV0 {
|
|
1481
|
+
bytes token_id = 1;
|
|
1482
|
+
bool prove = 2;
|
|
1483
|
+
}
|
|
1484
|
+
oneof version { GetTokenTotalSupplyRequestV0 v0 = 1; }
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
message GetTokenTotalSupplyResponse {
|
|
1488
|
+
message GetTokenTotalSupplyResponseV0 {
|
|
1489
|
+
message TokenTotalSupplyEntry {
|
|
1490
|
+
bytes token_id = 1;
|
|
1491
|
+
uint64 total_aggregated_amount_in_user_accounts = 2;
|
|
1492
|
+
uint64 total_system_amount = 3;
|
|
1493
|
+
}
|
|
1494
|
+
|
|
1495
|
+
oneof result {
|
|
1496
|
+
TokenTotalSupplyEntry token_total_supply = 1;
|
|
1497
|
+
Proof proof = 2;
|
|
1498
|
+
}
|
|
1499
|
+
ResponseMetadata metadata = 3;
|
|
1500
|
+
}
|
|
1501
|
+
oneof version { GetTokenTotalSupplyResponseV0 v0 = 1; }
|
|
1502
|
+
}
|
|
1503
|
+
|
|
1504
|
+
message GetGroupInfoRequest {
|
|
1505
|
+
message GetGroupInfoRequestV0 {
|
|
1506
|
+
bytes contract_id = 1;
|
|
1507
|
+
uint32 group_contract_position = 2;
|
|
1508
|
+
bool prove = 3;
|
|
1509
|
+
}
|
|
1510
|
+
oneof version { GetGroupInfoRequestV0 v0 = 1; }
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1513
|
+
message GetGroupInfoResponse {
|
|
1514
|
+
message GetGroupInfoResponseV0 {
|
|
1515
|
+
message GroupMemberEntry {
|
|
1516
|
+
bytes member_id = 1;
|
|
1517
|
+
uint32 power = 2;
|
|
1518
|
+
}
|
|
1519
|
+
|
|
1520
|
+
message GroupInfoEntry {
|
|
1521
|
+
repeated GroupMemberEntry members = 1;
|
|
1522
|
+
uint32 group_required_power = 2;
|
|
1523
|
+
}
|
|
1524
|
+
|
|
1525
|
+
message GroupInfo { optional GroupInfoEntry group_info = 1; }
|
|
1526
|
+
|
|
1527
|
+
oneof result {
|
|
1528
|
+
GroupInfo group_info = 1;
|
|
1529
|
+
Proof proof = 2;
|
|
1530
|
+
}
|
|
1531
|
+
ResponseMetadata metadata = 4;
|
|
1532
|
+
}
|
|
1533
|
+
oneof version { GetGroupInfoResponseV0 v0 = 1; }
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1536
|
+
message GetGroupInfosRequest {
|
|
1537
|
+
message StartAtGroupContractPosition {
|
|
1538
|
+
uint32 start_group_contract_position = 1;
|
|
1539
|
+
bool start_group_contract_position_included = 2;
|
|
1540
|
+
}
|
|
1541
|
+
|
|
1542
|
+
message GetGroupInfosRequestV0 {
|
|
1543
|
+
bytes contract_id = 1;
|
|
1544
|
+
optional StartAtGroupContractPosition start_at_group_contract_position = 2;
|
|
1545
|
+
optional uint32 count = 3;
|
|
1546
|
+
bool prove = 4;
|
|
1547
|
+
}
|
|
1548
|
+
oneof version { GetGroupInfosRequestV0 v0 = 1; }
|
|
1549
|
+
}
|
|
1550
|
+
|
|
1551
|
+
message GetGroupInfosResponse {
|
|
1552
|
+
message GetGroupInfosResponseV0 {
|
|
1553
|
+
message GroupMemberEntry {
|
|
1554
|
+
bytes member_id = 1;
|
|
1555
|
+
uint32 power = 2;
|
|
1556
|
+
}
|
|
1557
|
+
|
|
1558
|
+
message GroupPositionInfoEntry {
|
|
1559
|
+
uint32 group_contract_position = 1;
|
|
1560
|
+
repeated GroupMemberEntry members = 2;
|
|
1561
|
+
uint32 group_required_power = 3;
|
|
1562
|
+
}
|
|
1563
|
+
|
|
1564
|
+
message GroupInfos { repeated GroupPositionInfoEntry group_infos = 1; }
|
|
1565
|
+
|
|
1566
|
+
oneof result {
|
|
1567
|
+
GroupInfos group_infos = 1;
|
|
1568
|
+
Proof proof = 2;
|
|
1569
|
+
}
|
|
1570
|
+
ResponseMetadata metadata = 4;
|
|
1571
|
+
}
|
|
1572
|
+
oneof version { GetGroupInfosResponseV0 v0 = 1; }
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1575
|
+
message GetGroupActionsRequest {
|
|
1576
|
+
enum ActionStatus {
|
|
1577
|
+
ACTIVE = 0; // Request the active actions
|
|
1578
|
+
CLOSED = 1; // Request the closed actions
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1581
|
+
message StartAtActionId {
|
|
1582
|
+
bytes start_action_id = 1;
|
|
1583
|
+
bool start_action_id_included = 2;
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1586
|
+
message GetGroupActionsRequestV0 {
|
|
1587
|
+
bytes contract_id = 1;
|
|
1588
|
+
uint32 group_contract_position = 2;
|
|
1589
|
+
ActionStatus status = 3;
|
|
1590
|
+
optional StartAtActionId start_at_action_id = 4;
|
|
1591
|
+
optional uint32 count = 5;
|
|
1592
|
+
bool prove = 6;
|
|
1593
|
+
}
|
|
1594
|
+
oneof version { GetGroupActionsRequestV0 v0 = 1; }
|
|
1595
|
+
}
|
|
1596
|
+
|
|
1597
|
+
message GetGroupActionsResponse {
|
|
1598
|
+
message GetGroupActionsResponseV0 {
|
|
1599
|
+
// Mint event
|
|
1600
|
+
message MintEvent {
|
|
1601
|
+
uint64 amount = 1; // Amount to mint
|
|
1602
|
+
bytes recipient_id = 2; // Recipient identifier
|
|
1603
|
+
optional string public_note = 3; // Public note
|
|
1604
|
+
}
|
|
1605
|
+
|
|
1606
|
+
// Burn event
|
|
1607
|
+
message BurnEvent {
|
|
1608
|
+
uint64 amount = 1; // Amount to burn
|
|
1609
|
+
optional string public_note = 2; // Public note
|
|
1610
|
+
}
|
|
1611
|
+
|
|
1612
|
+
// Freeze event
|
|
1613
|
+
message FreezeEvent {
|
|
1614
|
+
bytes frozen_id = 1; // Identifier of the frozen entity
|
|
1615
|
+
optional string public_note = 2; // Public note
|
|
1616
|
+
}
|
|
1617
|
+
|
|
1618
|
+
// Unfreeze event
|
|
1619
|
+
message UnfreezeEvent {
|
|
1620
|
+
bytes frozen_id = 1; // Identifier of the unfrozen entity
|
|
1621
|
+
optional string public_note = 2; // Public note
|
|
1622
|
+
}
|
|
1623
|
+
|
|
1624
|
+
// Destroy frozen funds event
|
|
1625
|
+
message DestroyFrozenFundsEvent {
|
|
1626
|
+
bytes frozen_id = 1; // Identifier of the frozen entity
|
|
1627
|
+
uint64 amount = 2; // Amount to destroy
|
|
1628
|
+
optional string public_note = 3; // Public note
|
|
1629
|
+
}
|
|
1630
|
+
|
|
1631
|
+
// Shared encrypted note
|
|
1632
|
+
message SharedEncryptedNote {
|
|
1633
|
+
uint32 sender_key_index = 1; // Sender key index
|
|
1634
|
+
uint32 recipient_key_index = 2; // Recipient key index
|
|
1635
|
+
bytes encrypted_data = 3; // Encrypted data
|
|
1636
|
+
}
|
|
1637
|
+
|
|
1638
|
+
// Personal encrypted note
|
|
1639
|
+
message PersonalEncryptedNote {
|
|
1640
|
+
uint32 root_encryption_key_index = 1; // Root encryption key index
|
|
1641
|
+
uint32 derivation_encryption_key_index =
|
|
1642
|
+
2; // Derivation encryption key index
|
|
1643
|
+
bytes encrypted_data = 3; // Encrypted data
|
|
1644
|
+
}
|
|
1645
|
+
|
|
1646
|
+
// Emergency action event
|
|
1647
|
+
message EmergencyActionEvent {
|
|
1648
|
+
// Enum for emergency action types
|
|
1649
|
+
enum ActionType {
|
|
1650
|
+
PAUSE = 0; // Pause action
|
|
1651
|
+
RESUME = 1; // Resume action
|
|
1652
|
+
}
|
|
1653
|
+
|
|
1654
|
+
ActionType action_type = 1; // Emergency action type
|
|
1655
|
+
optional string public_note = 2; // Public note
|
|
1656
|
+
}
|
|
1657
|
+
|
|
1658
|
+
// Token config update event
|
|
1659
|
+
message TokenConfigUpdateEvent {
|
|
1660
|
+
bytes token_config_update_item = 1; // Token config update item
|
|
1661
|
+
optional string public_note = 2; // Public note
|
|
1662
|
+
}
|
|
1663
|
+
|
|
1664
|
+
// UpdatePrice event
|
|
1665
|
+
message UpdateDirectPurchasePriceEvent {
|
|
1666
|
+
message PriceForQuantity {
|
|
1667
|
+
uint64 quantity = 1;
|
|
1668
|
+
uint64 price = 2;
|
|
1669
|
+
}
|
|
1670
|
+
|
|
1671
|
+
message PricingSchedule {
|
|
1672
|
+
repeated PriceForQuantity price_for_quantity = 1;
|
|
1673
|
+
}
|
|
1674
|
+
oneof price {
|
|
1675
|
+
uint64 fixed_price = 1;
|
|
1676
|
+
PricingSchedule variable_price = 2;
|
|
1677
|
+
}
|
|
1678
|
+
optional string public_note = 3; // Public note
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1681
|
+
// Event associated with this action
|
|
1682
|
+
message GroupActionEvent {
|
|
1683
|
+
oneof event_type {
|
|
1684
|
+
TokenEvent token_event = 1; // Token event details
|
|
1685
|
+
DocumentEvent document_event = 2;
|
|
1686
|
+
ContractEvent contract_event = 3;
|
|
1687
|
+
}
|
|
1688
|
+
}
|
|
1689
|
+
|
|
1690
|
+
message DocumentEvent {
|
|
1691
|
+
oneof type {
|
|
1692
|
+
DocumentCreateEvent create = 1; // Create event details
|
|
1693
|
+
}
|
|
1694
|
+
}
|
|
1695
|
+
|
|
1696
|
+
message DocumentCreateEvent { bytes created_document = 1; }
|
|
1697
|
+
|
|
1698
|
+
message ContractUpdateEvent { bytes updated_contract = 1; }
|
|
1699
|
+
|
|
1700
|
+
message ContractEvent {
|
|
1701
|
+
oneof type {
|
|
1702
|
+
ContractUpdateEvent update = 1; // Contract update event
|
|
1703
|
+
}
|
|
1704
|
+
}
|
|
1705
|
+
|
|
1706
|
+
// Details for token events
|
|
1707
|
+
message TokenEvent {
|
|
1708
|
+
oneof type {
|
|
1709
|
+
MintEvent mint = 1; // Mint event details
|
|
1710
|
+
BurnEvent burn = 2; // Burn event details
|
|
1711
|
+
FreezeEvent freeze = 3; // Freeze event details
|
|
1712
|
+
UnfreezeEvent unfreeze = 4; // Unfreeze event details
|
|
1713
|
+
DestroyFrozenFundsEvent destroy_frozen_funds =
|
|
1714
|
+
5; // Destroy frozen funds
|
|
1715
|
+
EmergencyActionEvent emergency_action = 6; // Emergency action details
|
|
1716
|
+
TokenConfigUpdateEvent token_config_update =
|
|
1717
|
+
7; // Token configuration update details
|
|
1718
|
+
UpdateDirectPurchasePriceEvent update_price =
|
|
1719
|
+
8; // Updating the token direct selling price
|
|
1720
|
+
}
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1723
|
+
message GroupActionEntry {
|
|
1724
|
+
bytes action_id = 1; // Unique identifier for the action
|
|
1725
|
+
GroupActionEvent event = 2; // The event data
|
|
1726
|
+
}
|
|
1727
|
+
|
|
1728
|
+
message GroupActions { repeated GroupActionEntry group_actions = 1; }
|
|
1729
|
+
|
|
1730
|
+
oneof result {
|
|
1731
|
+
GroupActions group_actions = 1;
|
|
1732
|
+
Proof proof = 2;
|
|
1733
|
+
}
|
|
1734
|
+
ResponseMetadata metadata = 3;
|
|
1735
|
+
}
|
|
1736
|
+
oneof version { GetGroupActionsResponseV0 v0 = 1; }
|
|
1737
|
+
}
|
|
1738
|
+
|
|
1739
|
+
message GetGroupActionSignersRequest {
|
|
1740
|
+
enum ActionStatus {
|
|
1741
|
+
ACTIVE = 0; // Request the active actions
|
|
1742
|
+
CLOSED = 1; // Request the closed actions
|
|
1743
|
+
}
|
|
1744
|
+
|
|
1745
|
+
message GetGroupActionSignersRequestV0 {
|
|
1746
|
+
bytes contract_id = 1;
|
|
1747
|
+
uint32 group_contract_position = 2;
|
|
1748
|
+
ActionStatus status = 3;
|
|
1749
|
+
bytes action_id = 4;
|
|
1750
|
+
bool prove = 5;
|
|
1751
|
+
}
|
|
1752
|
+
oneof version { GetGroupActionSignersRequestV0 v0 = 1; }
|
|
1753
|
+
}
|
|
1754
|
+
|
|
1755
|
+
message GetGroupActionSignersResponse {
|
|
1756
|
+
message GetGroupActionSignersResponseV0 {
|
|
1757
|
+
message GroupActionSigner {
|
|
1758
|
+
bytes signer_id = 1;
|
|
1759
|
+
uint32 power = 2;
|
|
1760
|
+
}
|
|
1761
|
+
message GroupActionSigners { repeated GroupActionSigner signers = 1; }
|
|
1762
|
+
|
|
1763
|
+
oneof result {
|
|
1764
|
+
GroupActionSigners group_action_signers = 1;
|
|
1765
|
+
Proof proof = 2;
|
|
1766
|
+
}
|
|
1767
|
+
ResponseMetadata metadata = 3;
|
|
1768
|
+
}
|
|
1769
|
+
|
|
1770
|
+
oneof version { GetGroupActionSignersResponseV0 v0 = 1; }
|
|
1771
|
+
}
|