@dashevo/dapi-grpc 2.0.0-dev.1 → 2.0.0-rc.2

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