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