dash-platform-sdk 1.0.0

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.
@@ -0,0 +1,1768 @@
1
+ syntax = "proto3";
2
+ import "google/protobuf/wrappers.proto";
3
+ import "google/protobuf/struct.proto";
4
+
5
+ package org.dash.platform.dapi.v0;
6
+
7
+ import "google/protobuf/timestamp.proto";
8
+
9
+ service Platform {
10
+ rpc broadcastStateTransition(BroadcastStateTransitionRequest)
11
+ returns (BroadcastStateTransitionResponse);
12
+ rpc getIdentity(GetIdentityRequest) returns (GetIdentityResponse);
13
+ rpc getIdentityKeys(GetIdentityKeysRequest) returns (GetIdentityKeysResponse);
14
+ rpc getIdentitiesContractKeys(GetIdentitiesContractKeysRequest) returns (GetIdentitiesContractKeysResponse);
15
+ rpc getIdentityNonce(GetIdentityNonceRequest) returns (GetIdentityNonceResponse);
16
+ rpc getIdentityContractNonce(GetIdentityContractNonceRequest) returns (GetIdentityContractNonceResponse);
17
+ rpc getIdentityBalance(GetIdentityBalanceRequest)
18
+ returns (GetIdentityBalanceResponse);
19
+ rpc getIdentitiesBalances(GetIdentitiesBalancesRequest)
20
+ returns (GetIdentitiesBalancesResponse);
21
+ rpc getIdentityBalanceAndRevision(GetIdentityBalanceAndRevisionRequest)
22
+ returns (GetIdentityBalanceAndRevisionResponse);
23
+ rpc getEvonodesProposedEpochBlocksByIds(GetEvonodesProposedEpochBlocksByIdsRequest)
24
+ returns (GetEvonodesProposedEpochBlocksResponse);
25
+ rpc getEvonodesProposedEpochBlocksByRange(GetEvonodesProposedEpochBlocksByRangeRequest)
26
+ returns (GetEvonodesProposedEpochBlocksResponse);
27
+ rpc getProofs(GetProofsRequest) returns (GetProofsResponse);
28
+ rpc getDataContract(GetDataContractRequest) returns (GetDataContractResponse);
29
+ rpc getDataContractHistory(GetDataContractHistoryRequest)
30
+ returns (GetDataContractHistoryResponse);
31
+ rpc getDataContracts(GetDataContractsRequest)
32
+ returns (GetDataContractsResponse);
33
+ rpc getDocuments(GetDocumentsRequest) returns (GetDocumentsResponse);
34
+ rpc getIdentityByPublicKeyHash(GetIdentityByPublicKeyHashRequest)
35
+ returns (GetIdentityByPublicKeyHashResponse);
36
+ rpc waitForStateTransitionResult(WaitForStateTransitionResultRequest)
37
+ returns (WaitForStateTransitionResultResponse);
38
+ rpc getConsensusParams(GetConsensusParamsRequest)
39
+ returns (GetConsensusParamsResponse);
40
+ rpc getProtocolVersionUpgradeState(GetProtocolVersionUpgradeStateRequest) returns (GetProtocolVersionUpgradeStateResponse);
41
+ rpc getProtocolVersionUpgradeVoteStatus(GetProtocolVersionUpgradeVoteStatusRequest) returns (GetProtocolVersionUpgradeVoteStatusResponse);
42
+ rpc getEpochsInfo(GetEpochsInfoRequest) returns (GetEpochsInfoResponse);
43
+ // What votes are currently happening for a specific contested index
44
+ rpc getContestedResources(GetContestedResourcesRequest) returns (GetContestedResourcesResponse);
45
+ // What's the state of a contested resource vote? (ie who is winning?)
46
+ rpc getContestedResourceVoteState(GetContestedResourceVoteStateRequest) returns (GetContestedResourceVoteStateResponse);
47
+ // Who voted for a contested resource to go to a specific identity?
48
+ rpc getContestedResourceVotersForIdentity(GetContestedResourceVotersForIdentityRequest) returns (GetContestedResourceVotersForIdentityResponse);
49
+ // How did an identity vote?
50
+ rpc getContestedResourceIdentityVotes(GetContestedResourceIdentityVotesRequest) returns (GetContestedResourceIdentityVotesResponse);
51
+ // What vote polls will end soon?
52
+ rpc getVotePollsByEndDate(GetVotePollsByEndDateRequest) returns (GetVotePollsByEndDateResponse);
53
+ rpc getPrefundedSpecializedBalance(GetPrefundedSpecializedBalanceRequest) returns (GetPrefundedSpecializedBalanceResponse);
54
+ rpc getTotalCreditsInPlatform(GetTotalCreditsInPlatformRequest) returns (GetTotalCreditsInPlatformResponse);
55
+ rpc getPathElements(GetPathElementsRequest) returns (GetPathElementsResponse);
56
+ 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);
65
+ rpc getGroupInfo(GetGroupInfoRequest) returns (GetGroupInfoResponse);
66
+ rpc getGroupInfos(GetGroupInfosRequest) returns (GetGroupInfosResponse);
67
+ rpc getGroupActions(GetGroupActionsRequest) returns (GetGroupActionsResponse);
68
+ rpc getGroupActionSigners(GetGroupActionSignersRequest) returns (GetGroupActionSignersResponse);
69
+ }
70
+
71
+ // Proof message includes cryptographic proofs for validating responses
72
+ 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
79
+ }
80
+
81
+ // ResponseMetadata provides metadata about the blockchain state at the time of response
82
+ 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
89
+ }
90
+
91
+ message StateTransitionBroadcastError {
92
+ uint32 code = 1;
93
+ string message = 2;
94
+ bytes data = 3;
95
+ }
96
+
97
+ enum KeyPurpose {
98
+ AUTHENTICATION = 0;
99
+ ENCRYPTION = 1;
100
+ DECRYPTION = 2;
101
+ TRANSFER = 3;
102
+ VOTING = 5;
103
+ }
104
+
105
+ message BroadcastStateTransitionRequest { bytes state_transition = 1; }
106
+
107
+ message BroadcastStateTransitionResponse {}
108
+
109
+ message GetIdentityRequest {
110
+
111
+ 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
114
+ }
115
+
116
+ oneof version { GetIdentityRequestV0 v0 = 1; }
117
+ }
118
+
119
+ message GetIdentityNonceRequest {
120
+
121
+ message GetIdentityNonceRequestV0 {
122
+ bytes identity_id = 1;
123
+ bool prove = 2;
124
+ }
125
+
126
+ oneof version { GetIdentityNonceRequestV0 v0 = 1; }
127
+ }
128
+
129
+
130
+ message GetIdentityContractNonceRequest {
131
+
132
+ message GetIdentityContractNonceRequestV0 {
133
+ bytes identity_id = 1;
134
+ bytes contract_id = 2;
135
+ bool prove = 3;
136
+ }
137
+
138
+ oneof version { GetIdentityContractNonceRequestV0 v0 = 1; }
139
+ }
140
+
141
+ message GetIdentityBalanceRequest {
142
+
143
+ 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
146
+ }
147
+
148
+ oneof version { GetIdentityBalanceRequestV0 v0 = 1; }
149
+ }
150
+
151
+ message GetIdentityBalanceAndRevisionRequest {
152
+
153
+ 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
156
+ }
157
+
158
+ oneof version { GetIdentityBalanceAndRevisionRequestV0 v0 = 1; }
159
+ }
160
+
161
+ message GetIdentityResponse {
162
+
163
+ message GetIdentityResponseV0 {
164
+ oneof result {
165
+ bytes identity = 1; // The requested identity data
166
+ Proof proof = 2; // Proof of the identity data, if requested
167
+ }
168
+ ResponseMetadata metadata = 3; // Metadata about the blockchain state
169
+ }
170
+
171
+ oneof version { GetIdentityResponseV0 v0 = 1; }
172
+ }
173
+
174
+ message GetIdentityNonceResponse {
175
+
176
+ message GetIdentityNonceResponseV0 {
177
+ oneof result {
178
+ uint64 identity_nonce = 1 [jstype = JS_STRING];
179
+ Proof proof = 2;
180
+ }
181
+ ResponseMetadata metadata = 3;
182
+ }
183
+
184
+ oneof version { GetIdentityNonceResponseV0 v0 = 1; }
185
+ }
186
+
187
+ message GetIdentityContractNonceResponse {
188
+
189
+ message GetIdentityContractNonceResponseV0 {
190
+ oneof result {
191
+ uint64 identity_contract_nonce = 1 [jstype = JS_STRING];
192
+ Proof proof = 2;
193
+ }
194
+ ResponseMetadata metadata = 3;
195
+ }
196
+
197
+ oneof version { GetIdentityContractNonceResponseV0 v0 = 1; }
198
+ }
199
+
200
+ message GetIdentityBalanceResponse {
201
+
202
+ message GetIdentityBalanceResponseV0 {
203
+ 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
206
+ }
207
+ ResponseMetadata metadata = 3; // Metadata about the blockchain state
208
+ }
209
+
210
+ oneof version { GetIdentityBalanceResponseV0 v0 = 1; }
211
+ }
212
+
213
+ message GetIdentityBalanceAndRevisionResponse {
214
+
215
+ message GetIdentityBalanceAndRevisionResponseV0 {
216
+ 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
219
+ }
220
+
221
+ oneof result {
222
+ BalanceAndRevision balance_and_revision = 1; // The balance and revision data
223
+ Proof proof = 2; // Proof of the data, if requested
224
+ }
225
+ ResponseMetadata metadata = 3; // Metadata about the blockchain state
226
+ }
227
+
228
+ oneof version { GetIdentityBalanceAndRevisionResponseV0 v0 = 1; }
229
+ }
230
+
231
+ message KeyRequestType {
232
+ 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
236
+ }
237
+ }
238
+
239
+ // AllKeys is an empty message used to signify a request for all keys
240
+ message AllKeys {}
241
+
242
+ // SpecificKeys is used to request specific keys by their IDs
243
+ message SpecificKeys {
244
+ repeated uint32 key_ids = 1; // List of key IDs
245
+ }
246
+
247
+ // SearchKey represents a request to search for keys based on specific criteria
248
+ message SearchKey {
249
+ map<uint32, SecurityLevelMap> purpose_map = 1; // Map of purposes to their security level maps
250
+ }
251
+
252
+ // SecurityLevelMap maps security levels to a request type for key retrieval
253
+ message SecurityLevelMap {
254
+ 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
257
+ }
258
+ map<uint32, KeyKindRequestType> security_level_map = 1; // Maps security levels to key request types
259
+ }
260
+
261
+ message GetIdentityKeysRequest {
262
+
263
+ 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
269
+ }
270
+
271
+ oneof version { GetIdentityKeysRequestV0 v0 = 1; }
272
+ }
273
+
274
+ message GetIdentityKeysResponse {
275
+
276
+ message GetIdentityKeysResponseV0 {
277
+ message Keys { repeated bytes keys_bytes = 1; } // Collection of keys as byte sequences
278
+
279
+ oneof result {
280
+ Keys keys = 1; // The actual key data
281
+ Proof proof = 2; // Proof of the keys data, if requested
282
+ }
283
+ ResponseMetadata metadata = 3; // Metadata about the blockchain state
284
+ }
285
+ oneof version { GetIdentityKeysResponseV0 v0 = 1; }
286
+ }
287
+
288
+ message GetIdentitiesContractKeysRequest {
289
+ message GetIdentitiesContractKeysRequestV0 {
290
+ repeated bytes identities_ids = 1;
291
+ bytes contract_id = 2;
292
+ optional string document_type_name = 3;
293
+ repeated KeyPurpose purposes = 4;
294
+ bool prove = 5;
295
+ }
296
+
297
+ oneof version {
298
+ GetIdentitiesContractKeysRequestV0 v0 = 1;
299
+ }
300
+ }
301
+
302
+ message GetIdentitiesContractKeysResponse {
303
+ message GetIdentitiesContractKeysResponseV0 {
304
+ message PurposeKeys {
305
+ KeyPurpose purpose = 1;
306
+ repeated bytes keys_bytes = 2;
307
+ }
308
+
309
+ message IdentityKeys {
310
+ bytes identity_id = 1;
311
+ repeated PurposeKeys keys = 2;
312
+ }
313
+
314
+ message IdentitiesKeys {
315
+ repeated IdentityKeys entries = 1;
316
+ };
317
+
318
+ oneof result {
319
+ IdentitiesKeys identities_keys = 1;
320
+ Proof proof = 2;
321
+ }
322
+ ResponseMetadata metadata = 3;
323
+ }
324
+
325
+ oneof version { GetIdentitiesContractKeysResponseV0 v0 = 1; }
326
+ }
327
+
328
+ message GetEvonodesProposedEpochBlocksByIdsRequest {
329
+
330
+ 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
334
+ }
335
+
336
+ oneof version { GetEvonodesProposedEpochBlocksByIdsRequestV0 v0 = 1; }
337
+ }
338
+
339
+ message GetEvonodesProposedEpochBlocksResponse {
340
+
341
+ message GetEvonodesProposedEpochBlocksResponseV0 {
342
+ message EvonodeProposedBlocks {
343
+ bytes pro_tx_hash = 1;
344
+ uint64 count = 2 [jstype = JS_STRING];
345
+ }
346
+
347
+ message EvonodesProposedBlocks {
348
+ repeated EvonodeProposedBlocks evonodes_proposed_block_counts = 1;
349
+ }
350
+
351
+ oneof result {
352
+ EvonodesProposedBlocks evonodes_proposed_block_counts_info = 1; // The actual result
353
+ Proof proof = 2; // Proof of the keys data, if requested
354
+ }
355
+ ResponseMetadata metadata = 3; // Metadata about the blockchain state
356
+ }
357
+ oneof version { GetEvonodesProposedEpochBlocksResponseV0 v0 = 1; }
358
+ }
359
+
360
+ message GetEvonodesProposedEpochBlocksByRangeRequest {
361
+
362
+ 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
365
+ oneof start {
366
+ bytes start_after = 3; // Start retrieval after this document
367
+ bytes start_at = 4; // Start retrieval at this document
368
+ }
369
+ bool prove = 5; // Flag to request a proof as the response
370
+ }
371
+
372
+ oneof version { GetEvonodesProposedEpochBlocksByRangeRequestV0 v0 = 1; }
373
+ }
374
+
375
+ message GetIdentitiesBalancesRequest {
376
+ message GetIdentitiesBalancesRequestV0 {
377
+ repeated bytes ids = 1;
378
+ bool prove = 2;
379
+ }
380
+
381
+ oneof version {
382
+ GetIdentitiesBalancesRequestV0 v0 = 1;
383
+ }
384
+ }
385
+
386
+ message GetIdentitiesBalancesResponse {
387
+ message GetIdentitiesBalancesResponseV0 {
388
+ message IdentityBalance {
389
+ bytes identity_id = 1;
390
+ optional uint64 balance = 2 [jstype = JS_STRING];
391
+ }
392
+
393
+ message IdentitiesBalances {
394
+ repeated IdentityBalance entries = 1;
395
+ };
396
+
397
+ oneof result {
398
+ IdentitiesBalances identities_balances = 1;
399
+ Proof proof = 2;
400
+ }
401
+ ResponseMetadata metadata = 3;
402
+ }
403
+
404
+ oneof version { GetIdentitiesBalancesResponseV0 v0 = 1; }
405
+ }
406
+
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
+ message GetDataContractRequest {
488
+ 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
491
+ }
492
+ oneof version { GetDataContractRequestV0 v0 = 1; }
493
+ }
494
+
495
+ message GetDataContractResponse {
496
+ message GetDataContractResponseV0 {
497
+ 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
500
+ }
501
+ ResponseMetadata metadata = 3; // Metadata about the blockchain state
502
+ }
503
+ oneof version { GetDataContractResponseV0 v0 = 1; }
504
+ }
505
+
506
+ message GetDataContractsRequest {
507
+ 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
510
+ }
511
+ oneof version { GetDataContractsRequestV0 v0 = 1; }
512
+ }
513
+
514
+ message GetDataContractsResponse {
515
+ 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
518
+ }
519
+
520
+ // DataContracts is a collection of data contract entries.
521
+ message DataContracts {
522
+ repeated DataContractEntry data_contract_entries = 1; // A list of data contract entries
523
+ }
524
+
525
+ message GetDataContractsResponseV0 {
526
+ oneof result {
527
+ DataContracts data_contracts = 1; // The actual data contracts requested
528
+ Proof proof = 2; // Cryptographic proof for the data contracts, if requested
529
+ }
530
+ ResponseMetadata metadata = 3; // Metadata about the blockchain state
531
+ }
532
+ oneof version { GetDataContractsResponseV0 v0 = 1; }
533
+ }
534
+
535
+ message GetDataContractHistoryRequest {
536
+ 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
542
+ }
543
+ oneof version { GetDataContractHistoryRequestV0 v0 = 1; }
544
+ }
545
+
546
+ message GetDataContractHistoryResponse {
547
+ message GetDataContractHistoryResponseV0 {
548
+ // Represents a single entry in the data contract's history
549
+ 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
552
+ }
553
+
554
+ // Collection of data contract history entries
555
+ message DataContractHistory {
556
+ repeated DataContractHistoryEntry data_contract_entries = 1; // List of history entries
557
+ }
558
+
559
+ 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
562
+ }
563
+
564
+ ResponseMetadata metadata = 3; // Metadata about the blockchain state
565
+ }
566
+ oneof version { GetDataContractHistoryResponseV0 v0 = 1; }
567
+ }
568
+
569
+ message GetDocumentsRequest {
570
+ 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
576
+
577
+ // Specifies the starting point for the document retrieval
578
+ oneof start {
579
+ bytes start_after = 6; // Start retrieval after this document
580
+ bytes start_at = 7; // Start retrieval at this document
581
+ }
582
+ bool prove = 8; // Flag to request a proof as the response
583
+ }
584
+ oneof version { GetDocumentsRequestV0 v0 = 1; }
585
+ }
586
+
587
+ message GetDocumentsResponse {
588
+ message GetDocumentsResponseV0 {
589
+ // Represents a collection of documents
590
+ message Documents {
591
+ repeated bytes documents = 1; // The actual documents in binary form
592
+ }
593
+
594
+ oneof result {
595
+ Documents documents = 1; // The actual documents requested
596
+ Proof proof = 2; // Cryptographic proof of the documents, if requested
597
+ }
598
+ ResponseMetadata metadata = 3; // Metadata about the blockchain state
599
+ }
600
+ oneof version { GetDocumentsResponseV0 v0 = 1; }
601
+ }
602
+
603
+ message GetIdentityByPublicKeyHashRequest {
604
+ 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
607
+ }
608
+ oneof version { GetIdentityByPublicKeyHashRequestV0 v0 = 1; }
609
+ }
610
+
611
+ message GetIdentityByPublicKeyHashResponse {
612
+ message GetIdentityByPublicKeyHashResponseV0 {
613
+ 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
616
+ }
617
+
618
+ ResponseMetadata metadata = 3; // Metadata about the blockchain state
619
+ }
620
+ oneof version { GetIdentityByPublicKeyHashResponseV0 v0 = 1; }
621
+ }
622
+
623
+ message WaitForStateTransitionResultRequest {
624
+ 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
627
+ }
628
+ oneof version { WaitForStateTransitionResultRequestV0 v0 = 1; }
629
+ }
630
+
631
+ message WaitForStateTransitionResultResponse {
632
+ message WaitForStateTransitionResultResponseV0 {
633
+ 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
636
+ }
637
+ ResponseMetadata metadata = 3; // Metadata about the blockchain state
638
+ }
639
+ oneof version { WaitForStateTransitionResultResponseV0 v0 = 1; }
640
+ }
641
+
642
+ message GetConsensusParamsRequest {
643
+ 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
646
+ }
647
+ oneof version { GetConsensusParamsRequestV0 v0 = 1; }
648
+ }
649
+
650
+ message GetConsensusParamsResponse {
651
+ 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
655
+ }
656
+
657
+ 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
661
+ }
662
+
663
+ message GetConsensusParamsResponseV0 {
664
+ ConsensusParamsBlock block = 1; // Consensus parameters related to block creation and validation
665
+ ConsensusParamsEvidence evidence = 2; // Consensus parameters related to evidence
666
+ }
667
+ oneof version { GetConsensusParamsResponseV0 v0 = 1; }
668
+ }
669
+
670
+
671
+ message GetProtocolVersionUpgradeStateRequest {
672
+ message GetProtocolVersionUpgradeStateRequestV0 {
673
+ bool prove = 1; // Flag to request a proof as the response
674
+ }
675
+
676
+ oneof version {
677
+ GetProtocolVersionUpgradeStateRequestV0 v0 = 1;
678
+ }
679
+ }
680
+
681
+ message GetProtocolVersionUpgradeStateResponse {
682
+ message GetProtocolVersionUpgradeStateResponseV0 {
683
+ // Versions holds a collection of version entries
684
+ message Versions {
685
+ repeated VersionEntry versions = 1; // List of protocol version entries
686
+ }
687
+
688
+ // VersionEntry represents a single entry of a protocol version
689
+ message VersionEntry {
690
+ uint32 version_number = 1; // The protocol version number
691
+ uint32 vote_count = 2; // The vote count for this protocol version
692
+ }
693
+
694
+ oneof result {
695
+ Versions versions = 1; // The actual protocol version information
696
+ Proof proof = 2; // Cryptographic proof of the protocol version information, if requested
697
+ }
698
+ ResponseMetadata metadata = 3; // Metadata about the blockchain state
699
+ }
700
+
701
+ oneof version {
702
+ GetProtocolVersionUpgradeStateResponseV0 v0 = 1;
703
+ }
704
+ }
705
+
706
+ message GetProtocolVersionUpgradeVoteStatusRequest {
707
+ 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
711
+ }
712
+
713
+ oneof version {
714
+ GetProtocolVersionUpgradeVoteStatusRequestV0 v0 = 1;
715
+ }
716
+ }
717
+
718
+ message GetProtocolVersionUpgradeVoteStatusResponse {
719
+ message GetProtocolVersionUpgradeVoteStatusResponseV0 {
720
+ // VersionSignals holds a collection of version signal entries
721
+ message VersionSignals {
722
+ repeated VersionSignal version_signals = 1; // List of version signal entries
723
+ }
724
+
725
+ // VersionSignal represents a single voting signal for a protocol version
726
+ 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
729
+ }
730
+
731
+ oneof result {
732
+ VersionSignals versions = 1; // The actual version signal information
733
+ Proof proof = 2; // Cryptographic proof of the version signal information, if requested
734
+ }
735
+ ResponseMetadata metadata = 3; // Metadata about the blockchain state
736
+ }
737
+
738
+ oneof version {
739
+ GetProtocolVersionUpgradeVoteStatusResponseV0 v0 = 1;
740
+ }
741
+ }
742
+
743
+ message GetEpochsInfoRequest {
744
+ 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
749
+ }
750
+
751
+ oneof version {
752
+ GetEpochsInfoRequestV0 v0 = 1;
753
+ }
754
+ }
755
+
756
+ message GetEpochsInfoResponse {
757
+ message GetEpochsInfoResponseV0 {
758
+ // EpochInfos holds a collection of epoch information entries
759
+ message EpochInfos {
760
+ repeated EpochInfo epoch_infos = 1; // List of information for each requested epoch
761
+ }
762
+
763
+ // EpochInfo represents information about a single epoch
764
+ 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
770
+ uint32 protocol_version = 6;
771
+ }
772
+
773
+ 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
776
+ }
777
+ ResponseMetadata metadata = 3; // Metadata about the blockchain state
778
+ }
779
+
780
+ oneof version {
781
+ GetEpochsInfoResponseV0 v0 = 1;
782
+ }
783
+ }
784
+
785
+ message GetContestedResourcesRequest {
786
+ message GetContestedResourcesRequestV0 {
787
+ message StartAtValueInfo {
788
+ bytes start_value = 1;
789
+ bool start_value_included = 2;
790
+ }
791
+
792
+ bytes contract_id = 1;
793
+ string document_type_name = 2;
794
+ string index_name = 3;
795
+ repeated bytes start_index_values = 4;
796
+ repeated bytes end_index_values = 5;
797
+ optional StartAtValueInfo start_at_value_info = 6;
798
+ optional uint32 count = 7;
799
+ bool order_ascending = 8;
800
+ bool prove = 9;
801
+ }
802
+
803
+ oneof version {
804
+ GetContestedResourcesRequestV0 v0 = 1;
805
+ }
806
+ }
807
+
808
+ message GetContestedResourcesResponse {
809
+ message GetContestedResourcesResponseV0 {
810
+ message ContestedResourceValues {
811
+ repeated bytes contested_resource_values = 1;
812
+ }
813
+
814
+ oneof result {
815
+ ContestedResourceValues contested_resource_values = 1;
816
+ Proof proof = 2;
817
+ }
818
+ ResponseMetadata metadata = 3;
819
+ }
820
+
821
+ oneof version {
822
+ GetContestedResourcesResponseV0 v0 = 1;
823
+ }
824
+ }
825
+
826
+ message GetVotePollsByEndDateRequest {
827
+ message GetVotePollsByEndDateRequestV0 {
828
+ message StartAtTimeInfo {
829
+ uint64 start_time_ms = 1 [jstype = JS_STRING];
830
+ bool start_time_included = 2;
831
+ }
832
+ message EndAtTimeInfo {
833
+ uint64 end_time_ms = 1 [jstype = JS_STRING];
834
+ bool end_time_included = 2;
835
+ }
836
+ optional StartAtTimeInfo start_time_info = 1;
837
+ optional EndAtTimeInfo end_time_info = 2;
838
+ optional uint32 limit = 3;
839
+ optional uint32 offset = 4;
840
+ bool ascending = 5;
841
+ bool prove = 6;
842
+ }
843
+
844
+ oneof version {
845
+ GetVotePollsByEndDateRequestV0 v0 = 1;
846
+ }
847
+ }
848
+
849
+ message GetVotePollsByEndDateResponse {
850
+ message GetVotePollsByEndDateResponseV0 {
851
+ message SerializedVotePollsByTimestamp {
852
+ uint64 timestamp = 1 [jstype = JS_STRING];
853
+ repeated bytes serialized_vote_polls = 2;
854
+ }
855
+
856
+ message SerializedVotePollsByTimestamps {
857
+ repeated SerializedVotePollsByTimestamp vote_polls_by_timestamps = 1;
858
+ bool finished_results = 2;
859
+ }
860
+
861
+ oneof result {
862
+ SerializedVotePollsByTimestamps vote_polls_by_timestamps = 1;
863
+ Proof proof = 2;
864
+ }
865
+ ResponseMetadata metadata = 3;
866
+ }
867
+
868
+ oneof version {
869
+ GetVotePollsByEndDateResponseV0 v0 = 1;
870
+ }
871
+ }
872
+
873
+ // What's the state of a contested resource vote? (ie who is winning?)
874
+ message GetContestedResourceVoteStateRequest {
875
+ message GetContestedResourceVoteStateRequestV0 {
876
+ message StartAtIdentifierInfo {
877
+ bytes start_identifier = 1;
878
+ bool start_identifier_included = 2;
879
+ }
880
+ enum ResultType {
881
+ DOCUMENTS = 0;
882
+ VOTE_TALLY = 1;
883
+ DOCUMENTS_AND_VOTE_TALLY = 2;
884
+ }
885
+
886
+ bytes contract_id = 1;
887
+ string document_type_name = 2;
888
+ string index_name = 3;
889
+ repeated bytes index_values = 4;
890
+ ResultType result_type = 5;
891
+ bool allow_include_locked_and_abstaining_vote_tally = 6;
892
+ optional StartAtIdentifierInfo start_at_identifier_info = 7;
893
+ optional uint32 count = 8;
894
+ bool prove = 9;
895
+ }
896
+
897
+ oneof version {
898
+ GetContestedResourceVoteStateRequestV0 v0 = 1;
899
+ }
900
+ }
901
+
902
+ message GetContestedResourceVoteStateResponse {
903
+ message GetContestedResourceVoteStateResponseV0 {
904
+ message FinishedVoteInfo {
905
+ enum FinishedVoteOutcome {
906
+ TOWARDS_IDENTITY = 0;
907
+ LOCKED = 1;
908
+ NO_PREVIOUS_WINNER = 2;
909
+ }
910
+ 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];
913
+ uint32 finished_at_core_block_height = 4;
914
+ uint64 finished_at_block_time_ms = 5 [jstype = JS_STRING];
915
+ uint32 finished_at_epoch = 6;
916
+ }
917
+
918
+ message ContestedResourceContenders {
919
+ repeated Contender contenders = 1;
920
+ optional uint32 abstain_vote_tally = 2;
921
+ optional uint32 lock_vote_tally = 3;
922
+ optional FinishedVoteInfo finished_vote_info = 4;
923
+ }
924
+
925
+ message Contender {
926
+ bytes identifier = 1;
927
+ optional uint32 vote_count = 2;
928
+ optional bytes document = 3;
929
+ }
930
+
931
+ oneof result {
932
+ ContestedResourceContenders contested_resource_contenders = 1;
933
+ Proof proof = 2;
934
+ }
935
+ ResponseMetadata metadata = 3;
936
+ }
937
+
938
+ oneof version {
939
+ GetContestedResourceVoteStateResponseV0 v0 = 1;
940
+ }
941
+ }
942
+
943
+ // Who voted for a contested resource to go to a specific identity?
944
+ message GetContestedResourceVotersForIdentityRequest {
945
+ message GetContestedResourceVotersForIdentityRequestV0 {
946
+ message StartAtIdentifierInfo {
947
+ bytes start_identifier = 1;
948
+ bool start_identifier_included = 2;
949
+ }
950
+ bytes contract_id = 1;
951
+ string document_type_name = 2;
952
+ string index_name = 3;
953
+ repeated bytes index_values = 4;
954
+ bytes contestant_id = 5;
955
+ optional StartAtIdentifierInfo start_at_identifier_info = 6;
956
+ optional uint32 count = 7;
957
+ bool order_ascending = 8;
958
+ bool prove = 9;
959
+ }
960
+
961
+ oneof version {
962
+ GetContestedResourceVotersForIdentityRequestV0 v0 = 1;
963
+ }
964
+ }
965
+
966
+ message GetContestedResourceVotersForIdentityResponse {
967
+ message GetContestedResourceVotersForIdentityResponseV0 {
968
+ message ContestedResourceVoters {
969
+ repeated bytes voters = 1;
970
+ bool finished_results = 2;
971
+ }
972
+
973
+ oneof result {
974
+ ContestedResourceVoters contested_resource_voters = 1;
975
+ Proof proof = 2;
976
+ }
977
+ ResponseMetadata metadata = 3;
978
+ }
979
+
980
+ oneof version {
981
+ GetContestedResourceVotersForIdentityResponseV0 v0 = 1;
982
+ }
983
+ }
984
+
985
+ // How did an identity vote?
986
+ message GetContestedResourceIdentityVotesRequest {
987
+ message GetContestedResourceIdentityVotesRequestV0 {
988
+ message StartAtVotePollIdInfo {
989
+ bytes start_at_poll_identifier = 1;
990
+ bool start_poll_identifier_included = 2;
991
+ }
992
+ bytes identity_id = 1;
993
+ google.protobuf.UInt32Value limit = 2;
994
+ google.protobuf.UInt32Value offset = 3;
995
+ bool order_ascending = 4;
996
+ optional StartAtVotePollIdInfo start_at_vote_poll_id_info = 5;
997
+ bool prove = 6;
998
+ }
999
+
1000
+ oneof version {
1001
+ GetContestedResourceIdentityVotesRequestV0 v0 = 1;
1002
+ }
1003
+ }
1004
+
1005
+ message GetContestedResourceIdentityVotesResponse {
1006
+ message GetContestedResourceIdentityVotesResponseV0 {
1007
+ message ContestedResourceIdentityVotes {
1008
+ repeated ContestedResourceIdentityVote contested_resource_identity_votes = 1;
1009
+ bool finished_results = 2;
1010
+ }
1011
+
1012
+ message ResourceVoteChoice {
1013
+ enum VoteChoiceType {
1014
+ TOWARDS_IDENTITY = 0;
1015
+ ABSTAIN = 1;
1016
+ LOCK = 2;
1017
+ }
1018
+ VoteChoiceType vote_choice_type = 1;
1019
+ optional bytes identity_id = 2; // Only used when vote_choice_type is TOWARDS_IDENTITY
1020
+ }
1021
+
1022
+ message ContestedResourceIdentityVote {
1023
+ bytes contract_id = 1;
1024
+ string document_type_name = 2;
1025
+ repeated bytes serialized_index_storage_values = 3;
1026
+ ResourceVoteChoice vote_choice = 4;
1027
+ }
1028
+
1029
+ oneof result {
1030
+ ContestedResourceIdentityVotes votes = 1;
1031
+ Proof proof = 2;
1032
+ }
1033
+ ResponseMetadata metadata = 3;
1034
+ }
1035
+
1036
+ oneof version {
1037
+ GetContestedResourceIdentityVotesResponseV0 v0 = 1;
1038
+ }
1039
+ }
1040
+
1041
+ message GetPrefundedSpecializedBalanceRequest {
1042
+
1043
+ message GetPrefundedSpecializedBalanceRequestV0 {
1044
+ bytes id = 1;
1045
+ bool prove = 2;
1046
+ }
1047
+
1048
+ oneof version { GetPrefundedSpecializedBalanceRequestV0 v0 = 1; }
1049
+ }
1050
+
1051
+ message GetPrefundedSpecializedBalanceResponse {
1052
+
1053
+ message GetPrefundedSpecializedBalanceResponseV0 {
1054
+ oneof result {
1055
+ uint64 balance = 1 [jstype = JS_STRING];
1056
+ Proof proof = 2;
1057
+ }
1058
+ ResponseMetadata metadata = 3;
1059
+ }
1060
+
1061
+ oneof version { GetPrefundedSpecializedBalanceResponseV0 v0 = 1; }
1062
+ }
1063
+
1064
+ message GetTotalCreditsInPlatformRequest {
1065
+ message GetTotalCreditsInPlatformRequestV0 {
1066
+ bool prove = 1;
1067
+ }
1068
+
1069
+ oneof version {
1070
+ GetTotalCreditsInPlatformRequestV0 v0 = 1;
1071
+ }
1072
+ }
1073
+
1074
+ message GetTotalCreditsInPlatformResponse {
1075
+ message GetTotalCreditsInPlatformResponseV0 {
1076
+ oneof result {
1077
+ uint64 credits = 1 [jstype = JS_STRING];
1078
+
1079
+ Proof proof = 2;
1080
+ }
1081
+ ResponseMetadata metadata = 3;
1082
+ }
1083
+
1084
+ oneof version {
1085
+ GetTotalCreditsInPlatformResponseV0 v0 = 1;
1086
+ }
1087
+ }
1088
+
1089
+ message GetPathElementsRequest {
1090
+ message GetPathElementsRequestV0 {
1091
+ repeated bytes path = 1;
1092
+ repeated bytes keys = 2;
1093
+ bool prove = 3;
1094
+ }
1095
+
1096
+ oneof version {
1097
+ GetPathElementsRequestV0 v0 = 1;
1098
+ }
1099
+ }
1100
+
1101
+ message GetPathElementsResponse {
1102
+ message GetPathElementsResponseV0 {
1103
+ message Elements {
1104
+ repeated bytes elements = 1;
1105
+ }
1106
+
1107
+ oneof result {
1108
+ Elements elements = 1;
1109
+
1110
+ Proof proof = 2;
1111
+ }
1112
+ ResponseMetadata metadata = 3;
1113
+ }
1114
+
1115
+ oneof version {
1116
+ GetPathElementsResponseV0 v0 = 1;
1117
+ }
1118
+ }
1119
+
1120
+ message GetStatusRequest {
1121
+ message GetStatusRequestV0 {
1122
+ }
1123
+
1124
+ oneof version { GetStatusRequestV0 v0 = 1; }
1125
+ }
1126
+
1127
+
1128
+ message GetStatusResponse {
1129
+ message GetStatusResponseV0 {
1130
+ message Version {
1131
+ message Software {
1132
+ string dapi = 1;
1133
+ // It will be missing if Drive is not responding
1134
+ optional string drive = 2;
1135
+ // It will be missing if Tenderdash is not responding
1136
+ optional string tenderdash = 3;
1137
+ }
1138
+
1139
+ message Protocol {
1140
+ message Tenderdash {
1141
+ uint32 p2p = 1;
1142
+ uint32 block = 2;
1143
+ }
1144
+
1145
+ message Drive {
1146
+ uint32 latest = 3;
1147
+ uint32 current = 4;
1148
+ }
1149
+
1150
+ Tenderdash tenderdash = 1;
1151
+ Drive drive = 2;
1152
+ }
1153
+
1154
+ Software software = 1;
1155
+ Protocol protocol = 2;
1156
+ }
1157
+
1158
+ message Time {
1159
+ uint64 local = 1 [jstype = JS_STRING];
1160
+ // It will be missing if Drive is not responding
1161
+ optional uint64 block = 2 [jstype = JS_STRING];
1162
+ // It will be missing if Drive is not responding
1163
+ optional uint64 genesis = 3 [jstype = JS_STRING];
1164
+ // It will be missing if Drive is not responding
1165
+ optional uint32 epoch = 4;
1166
+ }
1167
+
1168
+ message Node {
1169
+ // Platform node ID
1170
+ bytes id = 1;
1171
+ // Evo masternode pro tx hash. It will be absent if the node is a fullnode
1172
+ optional bytes pro_tx_hash = 2;
1173
+ }
1174
+
1175
+ message Chain {
1176
+ bool catching_up = 1;
1177
+ bytes latest_block_hash = 2;
1178
+ bytes latest_app_hash = 3;
1179
+ uint64 latest_block_height = 4 [jstype = JS_STRING];
1180
+ bytes earliest_block_hash = 5;
1181
+ bytes earliest_app_hash = 6;
1182
+ uint64 earliest_block_height = 7 [jstype = JS_STRING];
1183
+ uint64 max_peer_block_height = 9 [jstype = JS_STRING];
1184
+ // Latest known core height in consensus.
1185
+ // It will be missing if Drive is not responding
1186
+ optional uint32 core_chain_locked_height = 10;
1187
+ }
1188
+
1189
+ message Network {
1190
+ string chain_id = 1;
1191
+ uint32 peers_count = 2;
1192
+ bool listening = 3;
1193
+ }
1194
+
1195
+ message StateSync {
1196
+ uint64 total_synced_time = 1 [jstype = JS_STRING];
1197
+ uint64 remaining_time = 2 [jstype = JS_STRING];
1198
+ 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];
1204
+ }
1205
+
1206
+ Version version = 1;
1207
+ Node node = 2;
1208
+ Chain chain = 3;
1209
+ Network network = 4;
1210
+ StateSync state_sync = 5;
1211
+ Time time = 6;
1212
+ }
1213
+
1214
+ oneof version { GetStatusResponseV0 v0 = 1; }
1215
+ }
1216
+
1217
+ message GetCurrentQuorumsInfoRequest {
1218
+ message GetCurrentQuorumsInfoRequestV0 {
1219
+ }
1220
+
1221
+ oneof version { GetCurrentQuorumsInfoRequestV0 v0 = 1; }
1222
+ }
1223
+
1224
+ message GetCurrentQuorumsInfoResponse {
1225
+ message ValidatorV0 {
1226
+ bytes pro_tx_hash = 1;
1227
+ string node_ip = 2;
1228
+ bool is_banned = 3;
1229
+ }
1230
+ message ValidatorSetV0 {
1231
+ bytes quorum_hash = 1;
1232
+ uint32 core_height = 2;
1233
+ repeated ValidatorV0 members = 3;
1234
+ bytes threshold_public_key = 4;
1235
+ }
1236
+
1237
+ message GetCurrentQuorumsInfoResponseV0 {
1238
+ repeated bytes quorum_hashes = 1;
1239
+ bytes current_quorum_hash = 2;
1240
+ repeated ValidatorSetV0 validator_sets = 3;
1241
+ bytes last_block_proposer = 4;
1242
+ ResponseMetadata metadata = 5;
1243
+ }
1244
+ oneof version { GetCurrentQuorumsInfoResponseV0 v0 = 1; }
1245
+ }
1246
+
1247
+ message GetIdentityTokenBalancesRequest {
1248
+ 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;
1255
+ }
1256
+ }
1257
+
1258
+ message GetIdentityTokenBalancesResponse {
1259
+ message GetIdentityTokenBalancesResponseV0 {
1260
+ message TokenBalanceEntry {
1261
+ bytes token_id = 1; // Token ID
1262
+ optional uint64 balance = 2; // Token balance for the contract
1263
+ }
1264
+
1265
+ message TokenBalances {
1266
+ repeated TokenBalanceEntry token_balances = 1; // List of token balances
1267
+ }
1268
+
1269
+ oneof result {
1270
+ TokenBalances token_balances = 1; // Actual token balances
1271
+ Proof proof = 2; // Proof of the token balances, if requested
1272
+ }
1273
+ ResponseMetadata metadata = 3; // Metadata about the blockchain state
1274
+ }
1275
+ oneof version {
1276
+ GetIdentityTokenBalancesResponseV0 v0 = 1;
1277
+ }
1278
+ }
1279
+
1280
+ message GetIdentitiesTokenBalancesRequest {
1281
+ 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;
1288
+ }
1289
+ }
1290
+
1291
+ message GetIdentitiesTokenBalancesResponse {
1292
+ message GetIdentitiesTokenBalancesResponseV0 {
1293
+ message IdentityTokenBalanceEntry {
1294
+ bytes identity_id = 1; // Identity ID
1295
+ optional uint64 balance = 2; // Token balance for the identity
1296
+ }
1297
+
1298
+ message IdentityTokenBalances {
1299
+ repeated IdentityTokenBalanceEntry identity_token_balances = 1; // List of identity token balances
1300
+ }
1301
+
1302
+ oneof result {
1303
+ IdentityTokenBalances identity_token_balances = 1; // Actual identity token balances
1304
+ Proof proof = 2; // Proof of the balances, if requested
1305
+ }
1306
+ ResponseMetadata metadata = 3; // Metadata about the blockchain state
1307
+ }
1308
+ oneof version {
1309
+ GetIdentitiesTokenBalancesResponseV0 v0 = 1;
1310
+ }
1311
+ }
1312
+
1313
+
1314
+
1315
+ message GetIdentityTokenInfosRequest {
1316
+ message GetIdentityTokenInfosRequestV0 {
1317
+ bytes identity_id = 1;
1318
+ repeated bytes token_ids = 2;
1319
+ bool prove = 3;
1320
+ }
1321
+ oneof version {
1322
+ GetIdentityTokenInfosRequestV0 v0 = 1;
1323
+ }
1324
+ }
1325
+
1326
+ message GetIdentityTokenInfosResponse {
1327
+ message GetIdentityTokenInfosResponseV0 {
1328
+ message TokenIdentityInfoEntry {
1329
+ bool frozen = 1;
1330
+ }
1331
+
1332
+ message TokenInfoEntry {
1333
+ bytes token_id = 1;
1334
+ optional TokenIdentityInfoEntry info = 2;
1335
+ }
1336
+
1337
+ message TokenInfos {
1338
+ repeated TokenInfoEntry token_infos = 1;
1339
+ }
1340
+
1341
+ oneof result {
1342
+ TokenInfos token_infos = 1;
1343
+ Proof proof = 2;
1344
+ }
1345
+ ResponseMetadata metadata = 3;
1346
+ }
1347
+ oneof version {
1348
+ GetIdentityTokenInfosResponseV0 v0 = 1;
1349
+ }
1350
+ }
1351
+
1352
+ message GetIdentitiesTokenInfosRequest {
1353
+ message GetIdentitiesTokenInfosRequestV0 {
1354
+ bytes token_id = 1;
1355
+ repeated bytes identity_ids = 2;
1356
+ bool prove = 3;
1357
+ }
1358
+ oneof version {
1359
+ GetIdentitiesTokenInfosRequestV0 v0 = 1;
1360
+ }
1361
+ }
1362
+
1363
+ message GetIdentitiesTokenInfosResponse {
1364
+ message GetIdentitiesTokenInfosResponseV0 {
1365
+ message TokenIdentityInfoEntry {
1366
+ bool frozen = 1;
1367
+ }
1368
+
1369
+ message TokenInfoEntry {
1370
+ bytes identity_id = 1;
1371
+ optional TokenIdentityInfoEntry info = 2;
1372
+ }
1373
+
1374
+ message IdentityTokenInfos {
1375
+ repeated TokenInfoEntry token_infos = 1;
1376
+ }
1377
+
1378
+ oneof result {
1379
+ IdentityTokenInfos identity_token_infos = 1;
1380
+ Proof proof = 2;
1381
+ }
1382
+ ResponseMetadata metadata = 3;
1383
+ }
1384
+ oneof version {
1385
+ GetIdentitiesTokenInfosResponseV0 v0 = 1;
1386
+ }
1387
+ }
1388
+
1389
+ message GetTokenStatusesRequest {
1390
+ message GetTokenStatusesRequestV0 {
1391
+ repeated bytes token_ids = 1;
1392
+ bool prove = 2;
1393
+ }
1394
+ oneof version {
1395
+ GetTokenStatusesRequestV0 v0 = 1;
1396
+ }
1397
+ }
1398
+
1399
+ message GetTokenStatusesResponse {
1400
+ message GetTokenStatusesResponseV0 {
1401
+ message TokenStatusEntry {
1402
+ bytes token_id = 1;
1403
+ optional bool paused = 2;
1404
+ }
1405
+
1406
+ message TokenStatuses {
1407
+ repeated TokenStatusEntry token_statuses = 1;
1408
+ }
1409
+
1410
+ oneof result {
1411
+ TokenStatuses token_statuses = 1;
1412
+ Proof proof = 2;
1413
+ }
1414
+ ResponseMetadata metadata = 3;
1415
+ }
1416
+ oneof version {
1417
+ GetTokenStatusesResponseV0 v0 = 1;
1418
+ }
1419
+ }
1420
+
1421
+ message GetTokenPreProgrammedDistributionsRequest {
1422
+ message GetTokenPreProgrammedDistributionsRequestV0 {
1423
+ bytes token_id = 1;
1424
+ message StartAtInfo {
1425
+ uint64 start_time_ms = 1;
1426
+ optional bytes start_recipient = 2;
1427
+ optional bool start_recipient_included = 3;
1428
+ }
1429
+ optional StartAtInfo start_at_info = 2;
1430
+ optional uint32 limit = 3;
1431
+ bool prove = 4;
1432
+ }
1433
+ oneof version {
1434
+ GetTokenPreProgrammedDistributionsRequestV0 v0 = 1;
1435
+ }
1436
+ }
1437
+
1438
+ message GetTokenPreProgrammedDistributionsResponse {
1439
+ message GetTokenPreProgrammedDistributionsResponseV0 {
1440
+ message TokenDistributionEntry {
1441
+ bytes recipient_id = 1;
1442
+ uint64 amount = 2;
1443
+ }
1444
+
1445
+ message TokenTimedDistributionEntry {
1446
+ uint64 timestamp = 1;
1447
+ repeated TokenDistributionEntry distributions = 2;
1448
+ }
1449
+
1450
+ message TokenDistributions {
1451
+ repeated TokenTimedDistributionEntry token_distributions = 1;
1452
+ }
1453
+
1454
+ oneof result {
1455
+ TokenDistributions token_distributions = 1;
1456
+ Proof proof = 2;
1457
+ }
1458
+ ResponseMetadata metadata = 3;
1459
+ }
1460
+ oneof version {
1461
+ GetTokenPreProgrammedDistributionsResponseV0 v0 = 1;
1462
+ }
1463
+ }
1464
+
1465
+ message GetTokenTotalSupplyRequest {
1466
+ message GetTokenTotalSupplyRequestV0 {
1467
+ bytes token_id = 1;
1468
+ bool prove = 2;
1469
+ }
1470
+ oneof version {
1471
+ GetTokenTotalSupplyRequestV0 v0 = 1;
1472
+ }
1473
+ }
1474
+
1475
+ message GetTokenTotalSupplyResponse {
1476
+ message GetTokenTotalSupplyResponseV0 {
1477
+ message TokenTotalSupplyEntry {
1478
+ bytes token_id = 1;
1479
+ uint64 total_aggregated_amount_in_user_accounts = 2;
1480
+ uint64 total_system_amount = 3;
1481
+ }
1482
+
1483
+ oneof result {
1484
+ TokenTotalSupplyEntry token_total_supply = 1;
1485
+ Proof proof = 2;
1486
+ }
1487
+ ResponseMetadata metadata = 3;
1488
+ }
1489
+ oneof version {
1490
+ GetTokenTotalSupplyResponseV0 v0 = 1;
1491
+ }
1492
+ }
1493
+
1494
+ message GetGroupInfoRequest {
1495
+ message GetGroupInfoRequestV0 {
1496
+ bytes contract_id = 1;
1497
+ uint32 group_contract_position = 2;
1498
+ bool prove = 3;
1499
+ }
1500
+ oneof version {
1501
+ GetGroupInfoRequestV0 v0 = 1;
1502
+ }
1503
+ }
1504
+
1505
+ message GetGroupInfoResponse {
1506
+ message GetGroupInfoResponseV0 {
1507
+ message GroupMemberEntry {
1508
+ bytes member_id = 1;
1509
+ uint32 power = 2;
1510
+ }
1511
+
1512
+ message GroupInfoEntry {
1513
+ repeated GroupMemberEntry members = 1;
1514
+ uint32 group_required_power = 2;
1515
+ }
1516
+
1517
+ message GroupInfo {
1518
+ optional GroupInfoEntry group_info = 1;
1519
+ }
1520
+
1521
+ oneof result {
1522
+ GroupInfo group_info = 1;
1523
+ Proof proof = 2;
1524
+ }
1525
+ ResponseMetadata metadata = 4;
1526
+ }
1527
+ oneof version {
1528
+ GetGroupInfoResponseV0 v0 = 1;
1529
+ }
1530
+ }
1531
+
1532
+ message GetGroupInfosRequest {
1533
+ message StartAtGroupContractPosition {
1534
+ uint32 start_group_contract_position = 1;
1535
+ bool start_group_contract_position_included = 2;
1536
+ }
1537
+
1538
+ message GetGroupInfosRequestV0 {
1539
+ bytes contract_id = 1;
1540
+ optional StartAtGroupContractPosition start_at_group_contract_position = 2;
1541
+ optional uint32 count = 3;
1542
+ bool prove = 4;
1543
+ }
1544
+ oneof version {
1545
+ GetGroupInfosRequestV0 v0 = 1;
1546
+ }
1547
+ }
1548
+
1549
+ message GetGroupInfosResponse {
1550
+ message GetGroupInfosResponseV0 {
1551
+ message GroupMemberEntry {
1552
+ bytes member_id = 1;
1553
+ uint32 power = 2;
1554
+ }
1555
+
1556
+ message GroupPositionInfoEntry {
1557
+ uint32 group_contract_position = 1;
1558
+ repeated GroupMemberEntry members = 2;
1559
+ uint32 group_required_power = 3;
1560
+ }
1561
+
1562
+ message GroupInfos {
1563
+ repeated GroupPositionInfoEntry group_infos = 1;
1564
+ }
1565
+
1566
+ oneof result {
1567
+ GroupInfos group_infos = 1;
1568
+ Proof proof = 2;
1569
+ }
1570
+ ResponseMetadata metadata = 4;
1571
+ }
1572
+ oneof version {
1573
+ GetGroupInfosResponseV0 v0 = 1;
1574
+ }
1575
+ }
1576
+
1577
+ message GetGroupActionsRequest {
1578
+ enum ActionStatus {
1579
+ ACTIVE = 0; // Request the active actions
1580
+ CLOSED = 1; // Request the closed actions
1581
+ }
1582
+
1583
+ message StartAtActionId {
1584
+ bytes start_action_id = 1;
1585
+ bool start_action_id_included = 2;
1586
+ }
1587
+
1588
+ message GetGroupActionsRequestV0 {
1589
+ bytes contract_id = 1;
1590
+ uint32 group_contract_position = 2;
1591
+ ActionStatus status = 3;
1592
+ optional StartAtActionId start_at_action_id = 4;
1593
+ optional uint32 count = 5;
1594
+ bool prove = 6;
1595
+ }
1596
+ oneof version {
1597
+ GetGroupActionsRequestV0 v0 = 1;
1598
+ }
1599
+ }
1600
+
1601
+ message GetGroupActionsResponse {
1602
+ message GetGroupActionsResponseV0 {
1603
+ // Mint event
1604
+ message MintEvent {
1605
+ uint64 amount = 1; // Amount to mint
1606
+ bytes recipient_id = 2; // Recipient identifier
1607
+ optional string public_note = 3; // Public note
1608
+ }
1609
+
1610
+ // Burn event
1611
+ message BurnEvent {
1612
+ uint64 amount = 1; // Amount to burn
1613
+ optional string public_note = 2; // Public note
1614
+ }
1615
+
1616
+ // Freeze event
1617
+ message FreezeEvent {
1618
+ bytes frozen_id = 1; // Identifier of the frozen entity
1619
+ optional string public_note = 2; // Public note
1620
+ }
1621
+
1622
+ // Unfreeze event
1623
+ message UnfreezeEvent {
1624
+ bytes frozen_id = 1; // Identifier of the unfrozen entity
1625
+ optional string public_note = 2; // Public note
1626
+ }
1627
+
1628
+ // Destroy frozen funds event
1629
+ message DestroyFrozenFundsEvent {
1630
+ bytes frozen_id = 1; // Identifier of the frozen entity
1631
+ uint64 amount = 2; // Amount to destroy
1632
+ optional string public_note = 3; // Public note
1633
+ }
1634
+
1635
+ // Shared encrypted note
1636
+ message SharedEncryptedNote {
1637
+ uint32 sender_key_index = 1; // Sender key index
1638
+ uint32 recipient_key_index = 2; // Recipient key index
1639
+ bytes encrypted_data = 3; // Encrypted data
1640
+ }
1641
+
1642
+ // Personal encrypted note
1643
+ message PersonalEncryptedNote {
1644
+ uint32 root_encryption_key_index = 1; // Root encryption key index
1645
+ uint32 derivation_encryption_key_index = 2; // Derivation encryption key index
1646
+ bytes encrypted_data = 3; // Encrypted data
1647
+ }
1648
+
1649
+ // Emergency action event
1650
+ message EmergencyActionEvent {
1651
+ // Enum for emergency action types
1652
+ enum ActionType {
1653
+ PAUSE = 0; // Pause action
1654
+ RESUME = 1; // Resume action
1655
+ }
1656
+
1657
+ ActionType action_type = 1; // Emergency action type
1658
+ optional string public_note = 2; // Public note
1659
+ }
1660
+
1661
+ // Token config update event
1662
+ message TokenConfigUpdateEvent {
1663
+ bytes token_config_update_item = 1; // Token config update item
1664
+ optional string public_note = 2; // Public note
1665
+ }
1666
+
1667
+ // Event associated with this action
1668
+ message GroupActionEvent {
1669
+ oneof event_type {
1670
+ TokenEvent token_event = 1; // Token event details
1671
+ DocumentEvent document_event = 2;
1672
+ ContractEvent contract_event = 3;
1673
+ }
1674
+ }
1675
+
1676
+ message DocumentEvent {
1677
+ oneof type {
1678
+ DocumentCreateEvent create = 1; // Create event details
1679
+ }
1680
+ }
1681
+
1682
+ message DocumentCreateEvent {
1683
+ bytes created_document = 1;
1684
+ }
1685
+
1686
+ message ContractUpdateEvent {
1687
+ bytes updated_contract = 1;
1688
+ }
1689
+
1690
+ message ContractEvent {
1691
+ oneof type {
1692
+ ContractUpdateEvent update = 1; // Contract update event
1693
+ }
1694
+ }
1695
+
1696
+ // Details for token events
1697
+ message TokenEvent {
1698
+ 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
1704
+ EmergencyActionEvent emergency_action = 6; // Emergency action details
1705
+ TokenConfigUpdateEvent token_config_update = 7; // Token configuration update details
1706
+ }
1707
+ }
1708
+
1709
+ message GroupActionEntry {
1710
+ bytes action_id = 1; // Unique identifier for the action
1711
+ GroupActionEvent event = 2; // The event data
1712
+ }
1713
+
1714
+ message GroupActions {
1715
+ repeated GroupActionEntry group_actions = 1;
1716
+ }
1717
+
1718
+ oneof result {
1719
+ GroupActions group_actions = 1;
1720
+ Proof proof = 2;
1721
+ }
1722
+ ResponseMetadata metadata = 3;
1723
+ }
1724
+ oneof version {
1725
+ GetGroupActionsResponseV0 v0 = 1;
1726
+ }
1727
+ }
1728
+
1729
+
1730
+ message GetGroupActionSignersRequest {
1731
+ enum ActionStatus {
1732
+ ACTIVE = 0; // Request the active actions
1733
+ CLOSED = 1; // Request the closed actions
1734
+ }
1735
+
1736
+ message GetGroupActionSignersRequestV0 {
1737
+ bytes contract_id = 1;
1738
+ uint32 group_contract_position = 2;
1739
+ ActionStatus status = 3;
1740
+ bytes action_id = 4;
1741
+ bool prove = 5;
1742
+ }
1743
+ oneof version {
1744
+ GetGroupActionSignersRequestV0 v0 = 1;
1745
+ }
1746
+ }
1747
+
1748
+ message GetGroupActionSignersResponse {
1749
+ message GetGroupActionSignersResponseV0 {
1750
+ message GroupActionSigner {
1751
+ bytes signer_id = 1;
1752
+ uint32 power = 2;
1753
+ }
1754
+ message GroupActionSigners {
1755
+ repeated GroupActionSigner signers = 1;
1756
+ }
1757
+
1758
+ oneof result {
1759
+ GroupActionSigners group_action_signers = 1;
1760
+ Proof proof = 2;
1761
+ }
1762
+ ResponseMetadata metadata = 3;
1763
+ }
1764
+
1765
+ oneof version {
1766
+ GetGroupActionSignersResponseV0 v0 = 1;
1767
+ }
1768
+ }