@dashevo/dapi-grpc 0.25.0-dev.8 → 0.25.0-pr.1545.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.
@@ -1,4 +1,6 @@
1
1
  syntax = "proto3";
2
+ import "google/protobuf/wrappers.proto";
3
+ import "google/protobuf/struct.proto";
2
4
 
3
5
  package org.dash.platform.dapi.v0;
4
6
 
@@ -7,25 +9,41 @@ import "google/protobuf/timestamp.proto";
7
9
  service Platform {
8
10
  rpc broadcastStateTransition (BroadcastStateTransitionRequest) returns (BroadcastStateTransitionResponse);
9
11
  rpc getIdentity (GetIdentityRequest) returns (GetIdentityResponse);
12
+ rpc getIdentities (GetIdentitiesRequest) returns (GetIdentitiesResponse);
13
+ rpc getIdentityKeys (GetIdentityKeysRequest) returns (GetIdentityKeysResponse);
14
+ rpc getIdentityBalance(GetIdentityBalanceRequest) returns (GetIdentityBalanceResponse);
15
+ rpc getIdentityBalanceAndRevision(GetIdentityBalanceAndRevisionRequest)
16
+ returns (GetIdentityBalanceAndRevisionResponse);
17
+ rpc getProofs (GetProofsRequest) returns (GetProofsResponse);
10
18
  rpc getDataContract (GetDataContractRequest) returns (GetDataContractResponse);
19
+ rpc getDataContractHistory (GetDataContractHistoryRequest) returns (GetDataContractHistoryResponse);
20
+ rpc getDataContracts (GetDataContractsRequest) returns (GetDataContractsResponse);
11
21
  rpc getDocuments (GetDocumentsRequest) returns (GetDocumentsResponse);
12
22
  rpc getIdentitiesByPublicKeyHashes (GetIdentitiesByPublicKeyHashesRequest) returns (GetIdentitiesByPublicKeyHashesResponse);
23
+ rpc getIdentityByPublicKeyHash (GetIdentityByPublicKeyHashRequest) returns (GetIdentityByPublicKeyHashResponse);
13
24
  rpc waitForStateTransitionResult (WaitForStateTransitionResultRequest) returns (WaitForStateTransitionResultResponse);
14
25
  rpc getConsensusParams (GetConsensusParamsRequest) returns (GetConsensusParamsResponse);
26
+ rpc getProtocolVersionUpgradeState(GetProtocolVersionUpgradeStateRequest) returns (GetProtocolVersionUpgradeStateResponse);
27
+ rpc getProtocolVersionUpgradeVoteStatus(GetProtocolVersionUpgradeVoteStatusRequest) returns (GetProtocolVersionUpgradeVoteStatusResponse);
28
+ rpc getEpochsInfo(GetEpochsInfoRequest) returns (GetEpochsInfoResponse);
15
29
  }
16
30
 
17
31
  message Proof {
18
- bytes merkle_proof = 1;
32
+ bytes grovedb_proof = 1;
19
33
  bytes quorum_hash = 2;
20
34
  bytes signature = 3;
21
35
  uint32 round = 4;
36
+ bytes block_id_hash = 5;
37
+ uint32 quorum_type = 6;
22
38
  }
23
39
 
24
40
  message ResponseMetadata {
25
- int64 height = 1;
41
+ uint64 height = 1;
26
42
  uint32 core_chain_locked_height = 2;
27
- uint64 time_ms = 3;
28
- uint32 protocol_version = 4;
43
+ uint32 epoch = 3;
44
+ uint64 time_ms = 4;
45
+ uint32 protocol_version = 5;
46
+ string chain_id = 6;
29
47
  }
30
48
 
31
49
  message StateTransitionBroadcastError {
@@ -43,92 +61,578 @@ message BroadcastStateTransitionResponse {
43
61
  }
44
62
 
45
63
  message GetIdentityRequest {
46
- bytes id = 1;
47
- bool prove = 2;
64
+
65
+ message GetIdentityRequestV0 {
66
+ bytes id = 1;
67
+ bool prove = 2;
68
+ }
69
+
70
+ oneof version {
71
+ GetIdentityRequestV0 v0 = 1;
72
+ }
73
+ }
74
+
75
+ message GetIdentityBalanceRequest {
76
+
77
+ message GetIdentityBalanceRequestV0 {
78
+ bytes id = 1;
79
+ bool prove = 2;
80
+ }
81
+
82
+ oneof version {
83
+ GetIdentityBalanceRequestV0 v0 = 1;
84
+ }
85
+ }
86
+
87
+
88
+ message GetIdentityBalanceAndRevisionRequest {
89
+
90
+ message GetIdentityBalanceAndRevisionRequestV0 {
91
+ bytes id = 1;
92
+ bool prove = 2;
93
+ }
94
+
95
+ oneof version {
96
+ GetIdentityBalanceAndRevisionRequestV0 v0 = 1;
97
+ }
48
98
  }
49
99
 
50
100
  message GetIdentityResponse {
51
- bytes identity = 1;
52
- Proof proof = 2;
53
- ResponseMetadata metadata = 3;
101
+
102
+ message GetIdentityResponseV0 {
103
+ oneof result {
104
+ bytes identity = 1;
105
+ Proof proof = 2;
106
+ }
107
+ ResponseMetadata metadata = 3;
108
+ }
109
+
110
+ oneof version {
111
+ GetIdentityResponseV0 v0 = 1;
112
+ }
113
+ }
114
+
115
+ message GetIdentitiesRequest {
116
+
117
+ message GetIdentitiesRequestV0 {
118
+ repeated bytes ids = 1;
119
+ bool prove = 2;
120
+ }
121
+
122
+ oneof version {
123
+ GetIdentitiesRequestV0 v0 = 1;
124
+ }
125
+ }
126
+
127
+ message GetIdentitiesResponse {
128
+
129
+ message IdentityValue {
130
+ bytes value = 1;
131
+ }
132
+
133
+ message IdentityEntry {
134
+ bytes key = 1;
135
+ IdentityValue value = 2;
136
+ }
137
+
138
+ message Identities {
139
+ repeated IdentityEntry identity_entries = 1;
140
+ }
141
+
142
+ message GetIdentitiesResponseV0 {
143
+ oneof result {
144
+ Identities identities = 1;
145
+ Proof proof = 2;
146
+ }
147
+ ResponseMetadata metadata = 3;
148
+ }
149
+
150
+ oneof version {
151
+ GetIdentitiesResponseV0 v0 = 1;
152
+ }
153
+ }
154
+
155
+ message GetIdentityBalanceResponse {
156
+
157
+ message GetIdentityBalanceResponseV0 {
158
+ oneof result {
159
+ uint64 balance = 1;
160
+ Proof proof = 2;
161
+ }
162
+ ResponseMetadata metadata = 3;
163
+ }
164
+
165
+ oneof version {
166
+ GetIdentityBalanceResponseV0 v0 = 1;
167
+ }
168
+ }
169
+
170
+ message GetIdentityBalanceAndRevisionResponse {
171
+
172
+ message GetIdentityBalanceAndRevisionResponseV0 {
173
+ message BalanceAndRevision {
174
+ uint64 balance = 1;
175
+ uint64 revision = 2;
176
+ }
177
+
178
+ oneof result {
179
+ BalanceAndRevision balance_and_revision = 1;
180
+ Proof proof = 2;
181
+ }
182
+ ResponseMetadata metadata = 3;
183
+ }
184
+
185
+ oneof version {
186
+ GetIdentityBalanceAndRevisionResponseV0 v0 = 1;
187
+ }
188
+ }
189
+
190
+ message KeyRequestType {
191
+ oneof request {
192
+ AllKeys all_keys = 1;
193
+ SpecificKeys specific_keys = 2;
194
+ SearchKey search_key = 3;
195
+ }
196
+ }
197
+
198
+ message AllKeys {
199
+ }
200
+
201
+ message SpecificKeys {
202
+ repeated uint32 key_ids = 1;
203
+ }
204
+
205
+ message SearchKey {
206
+ map<uint32, SecurityLevelMap> purpose_map = 1;
207
+ }
208
+
209
+ message SecurityLevelMap {
210
+ enum KeyKindRequestType {
211
+ CURRENT_KEY_OF_KIND_REQUEST = 0;
212
+ ALL_KEYS_OF_KIND_REQUEST = 1;
213
+ }
214
+ map<uint32, KeyKindRequestType> security_level_map = 1;
215
+ }
216
+
217
+ message GetIdentityKeysRequest {
218
+
219
+ message GetIdentityKeysRequestV0 {
220
+ bytes identity_id = 1;
221
+ KeyRequestType request_type = 2;
222
+ google.protobuf.UInt32Value limit = 3;
223
+ google.protobuf.UInt32Value offset = 4;
224
+ bool prove = 5;
225
+ }
226
+
227
+ oneof version {
228
+ GetIdentityKeysRequestV0 v0 = 1;
229
+ }
230
+ }
231
+
232
+ message GetIdentityKeysResponse {
233
+
234
+ message GetIdentityKeysResponseV0 {
235
+ message Keys {
236
+ repeated bytes keys_bytes = 1;
237
+ }
238
+
239
+ oneof result {
240
+ Keys keys = 1;
241
+ Proof proof = 2;
242
+ }
243
+ ResponseMetadata metadata = 3;
244
+ }
245
+
246
+ oneof version {
247
+ GetIdentityKeysResponseV0 v0 = 1;
248
+ }
54
249
  }
55
250
 
56
- message GetDataContractRequest {
57
- bytes id = 1;
58
- bool prove = 2;
251
+ message GetProofsRequest {
252
+ message GetProofsRequestV0 {
253
+ message DocumentRequest {
254
+ bytes contract_id = 1;
255
+ string document_type = 2;
256
+ bool document_type_keeps_history = 3;
257
+ bytes document_id = 4;
258
+ }
259
+
260
+ message IdentityRequest {
261
+ enum Type {
262
+ FULL_IDENTITY = 0;
263
+ BALANCE = 1;
264
+ KEYS = 2;
265
+ }
266
+ bytes identity_id = 1;
267
+ Type request_type = 2;
268
+ }
269
+
270
+ message ContractRequest {
271
+ bytes contract_id = 1;
272
+ }
273
+
274
+ repeated IdentityRequest identities = 1;
275
+ repeated ContractRequest contracts = 2;
276
+ repeated DocumentRequest documents = 3;
277
+ }
278
+
279
+ oneof version {
280
+ GetProofsRequestV0 v0 = 1;
281
+ }
282
+ }
283
+
284
+ message GetProofsResponse {
285
+ message GetProofsResponseV0 {
286
+ Proof proof = 1;
287
+ ResponseMetadata metadata = 2;
288
+ }
289
+ oneof version {
290
+ GetProofsResponseV0 v0 = 1;
291
+ }
292
+ }
293
+
294
+ message GetDataContractRequest {
295
+ message GetDataContractRequestV0 {
296
+ bytes id = 1;
297
+ bool prove = 2;
298
+ }
299
+ oneof version {
300
+ GetDataContractRequestV0 v0 = 1;
301
+ }
59
302
  }
60
303
 
61
304
  message GetDataContractResponse {
62
- bytes data_contract = 1;
63
- Proof proof = 2;
64
- ResponseMetadata metadata = 3;
305
+ message GetDataContractResponseV0 {
306
+ oneof result {
307
+ bytes data_contract = 1;
308
+ Proof proof = 2;
309
+ }
310
+ ResponseMetadata metadata = 3;
311
+ }
312
+ oneof version {
313
+ GetDataContractResponseV0 v0 = 1;
314
+ }
65
315
  }
66
316
 
67
- message GetDocumentsRequest {
68
- bytes data_contract_id = 1;
69
- string document_type = 2;
317
+ message GetDataContractsRequest {
318
+ message GetDataContractsRequestV0 {
319
+ repeated bytes ids = 1;
320
+ bool prove = 2;
321
+ }
322
+ oneof version {
323
+ GetDataContractsRequestV0 v0 = 1;
324
+ }
325
+ }
70
326
 
71
- bytes where = 3;
72
- bytes order_by = 4;
327
+ message GetDataContractsResponse {
328
+ message DataContractEntry {
329
+ bytes identifier = 1;
330
+ google.protobuf.BytesValue data_contract = 2;
331
+ }
332
+ message DataContracts {
333
+ repeated DataContractEntry data_contract_entries = 1;
334
+ }
335
+
336
+
337
+ message GetDataContractsResponseV0 {
338
+ oneof result {
339
+ DataContracts data_contracts = 1;
340
+ Proof proof = 2;
341
+ }
342
+ ResponseMetadata metadata = 3;
343
+ }
344
+ oneof version {
345
+ GetDataContractsResponseV0 v0 = 1;
346
+ }
347
+ }
73
348
 
74
- uint32 limit = 5;
349
+ message GetDataContractHistoryRequest {
350
+ message GetDataContractHistoryRequestV0 {
351
+ bytes id = 1;
352
+ google.protobuf.UInt32Value limit = 2;
353
+ google.protobuf.UInt32Value offset = 3;
354
+ uint64 start_at_ms = 4;
355
+ bool prove = 5;
356
+ }
357
+ oneof version {
358
+ GetDataContractHistoryRequestV0 v0 = 1;
359
+ }
360
+ }
75
361
 
362
+ message GetDataContractHistoryResponse {
363
+ message GetDataContractHistoryResponseV0 {
364
+ message DataContractHistoryEntry {
365
+ uint64 date = 1;
366
+ bytes value = 2;
367
+ }
368
+
369
+ message DataContractHistory {
370
+ repeated DataContractHistoryEntry data_contract_entries = 1;
371
+ }
372
+
373
+ oneof result {
374
+ DataContractHistory data_contract_history = 1;
375
+ Proof proof = 2;
376
+ }
377
+
378
+ ResponseMetadata metadata = 3;
379
+ }
380
+ oneof version {
381
+ GetDataContractHistoryResponseV0 v0 = 1;
382
+ }
383
+ }
384
+
385
+ message GetDocumentsRequest {
386
+ message GetDocumentsRequestV0 {
387
+ bytes data_contract_id = 1;
388
+ string document_type = 2;
389
+ bytes where = 3;
390
+ bytes order_by = 4;
391
+ uint32 limit = 5;
76
392
  oneof start {
77
393
  bytes start_after = 6;
78
394
  bytes start_at = 7;
79
395
  }
80
-
81
- bool prove = 8;
396
+ bool prove = 8;
397
+ }
398
+ oneof version {
399
+ GetDocumentsRequestV0 v0 = 1;
400
+ }
82
401
  }
83
402
 
84
403
  message GetDocumentsResponse {
85
- repeated bytes documents = 1;
86
- Proof proof = 2;
87
- ResponseMetadata metadata = 3;
404
+ message GetDocumentsResponseV0 {
405
+ message Documents {
406
+ repeated bytes documents = 1;
407
+ }
408
+
409
+ oneof result {
410
+ Documents documents = 1;
411
+ Proof proof = 2;
412
+ }
413
+ ResponseMetadata metadata = 3;
414
+ }
415
+ oneof version {
416
+ GetDocumentsResponseV0 v0 = 1;
417
+ }
88
418
  }
89
419
 
90
420
  message GetIdentitiesByPublicKeyHashesRequest {
91
- repeated bytes public_key_hashes = 1;
92
- bool prove = 2;
421
+ message GetIdentitiesByPublicKeyHashesRequestV0 {
422
+ repeated bytes public_key_hashes = 1;
423
+ bool prove = 2;
424
+ }
425
+ oneof version {
426
+ GetIdentitiesByPublicKeyHashesRequestV0 v0 = 1;
427
+ }
93
428
  }
94
429
 
95
430
  message GetIdentitiesByPublicKeyHashesResponse {
96
- repeated bytes identities = 1;
97
- Proof proof = 2;
98
- ResponseMetadata metadata = 3;
431
+ message PublicKeyHashIdentityEntry {
432
+ bytes public_key_hash = 1;
433
+ google.protobuf.BytesValue value = 2;
434
+ }
435
+
436
+ message IdentitiesByPublicKeyHashes {
437
+ repeated PublicKeyHashIdentityEntry identity_entries = 1;
438
+ }
439
+
440
+ message GetIdentitiesByPublicKeyHashesResponseV0 {
441
+ oneof result {
442
+ IdentitiesByPublicKeyHashes identities = 1;
443
+ Proof proof = 2;
444
+ }
445
+
446
+ ResponseMetadata metadata = 3;
447
+ }
448
+ oneof version {
449
+ GetIdentitiesByPublicKeyHashesResponseV0 v0 = 1;
450
+ }
99
451
  }
100
452
 
101
- message WaitForStateTransitionResultRequest {
102
- bytes state_transition_hash = 1;
103
- bool prove = 2;
453
+ message GetIdentityByPublicKeyHashRequest {
454
+ message GetIdentityByPublicKeyHashRequestV0 {
455
+ bytes public_key_hash = 1;
456
+ bool prove = 2;
457
+ }
458
+ oneof version {
459
+ GetIdentityByPublicKeyHashRequestV0 v0 = 1;
460
+ }
104
461
  }
105
462
 
106
- message WaitForStateTransitionResultResponse {
107
- oneof responses {
108
- StateTransitionBroadcastError error = 1;
109
- Proof proof = 2;
463
+ message GetIdentityByPublicKeyHashResponse {
464
+ message GetIdentityByPublicKeyHashResponseV0 {
465
+ oneof result {
466
+ bytes identity = 1;
467
+ Proof proof = 2;
468
+ }
469
+
470
+ ResponseMetadata metadata = 3;
471
+ }
472
+ oneof version {
473
+ GetIdentityByPublicKeyHashResponseV0 v0 = 1;
110
474
  }
111
- ResponseMetadata metadata = 3;
112
475
  }
113
476
 
114
- message ConsensusParamsBlock {
115
- string max_bytes = 1;
116
- string max_gas = 2;
117
- string time_iota_ms = 3;
477
+ message WaitForStateTransitionResultRequest {
478
+ message WaitForStateTransitionResultRequestV0 {
479
+ bytes state_transition_hash = 1;
480
+ bool prove = 2;
481
+ }
482
+ oneof version {
483
+ WaitForStateTransitionResultRequestV0 v0 = 1;
484
+ }
118
485
  }
119
486
 
120
- message ConsensusParamsEvidence {
121
- string max_age_num_blocks = 1;
122
- string max_age_duration = 2;
123
- string max_bytes = 3;
487
+ message WaitForStateTransitionResultResponse {
488
+ message WaitForStateTransitionResultResponseV0 {
489
+ oneof result {
490
+ StateTransitionBroadcastError error = 1;
491
+ Proof proof = 2;
492
+ }
493
+ ResponseMetadata metadata = 3;
494
+ }
495
+ oneof version {
496
+ WaitForStateTransitionResultResponseV0 v0 = 1;
497
+ }
124
498
  }
125
499
 
126
500
  message GetConsensusParamsRequest {
127
- int64 height = 1;
128
- bool prove = 2;
501
+ message GetConsensusParamsRequestV0 {
502
+ int32 height = 1;
503
+ bool prove = 2;
504
+ }
505
+ oneof version {
506
+ GetConsensusParamsRequestV0 v0 = 1;
507
+ }
129
508
  }
130
509
 
131
510
  message GetConsensusParamsResponse {
132
- ConsensusParamsBlock block = 1;
133
- ConsensusParamsEvidence evidence = 2;
511
+ message ConsensusParamsBlock {
512
+ string max_bytes = 1;
513
+ string max_gas = 2;
514
+ string time_iota_ms = 3;
515
+ }
516
+
517
+ message ConsensusParamsEvidence {
518
+ string max_age_num_blocks = 1;
519
+ string max_age_duration = 2;
520
+ string max_bytes = 3;
521
+ }
522
+
523
+ message GetConsensusParamsResponseV0 {
524
+ ConsensusParamsBlock block = 1;
525
+ ConsensusParamsEvidence evidence = 2;
526
+ }
527
+ oneof version {
528
+ GetConsensusParamsResponseV0 v0 = 1;
529
+ }
530
+ }
531
+
532
+
533
+ message GetProtocolVersionUpgradeStateRequest {
534
+ message GetProtocolVersionUpgradeStateRequestV0 {
535
+ bool prove = 1;
536
+ }
537
+
538
+ oneof version {
539
+ GetProtocolVersionUpgradeStateRequestV0 v0 = 1;
540
+ }
541
+ }
542
+
543
+ message GetProtocolVersionUpgradeStateResponse {
544
+ message GetProtocolVersionUpgradeStateResponseV0 {
545
+ message Versions {
546
+ repeated VersionEntry versions = 1;
547
+ }
548
+
549
+ message VersionEntry {
550
+ uint32 version_number = 1;
551
+ uint32 vote_count = 2;
552
+ }
553
+
554
+ oneof result {
555
+ Versions versions = 1;
556
+ Proof proof = 2;
557
+ }
558
+ ResponseMetadata metadata = 3;
559
+ }
560
+
561
+ oneof version {
562
+ GetProtocolVersionUpgradeStateResponseV0 v0 = 1;
563
+ }
564
+ }
565
+
566
+ message GetProtocolVersionUpgradeVoteStatusRequest {
567
+ message GetProtocolVersionUpgradeVoteStatusRequestV0 {
568
+ bytes start_pro_tx_hash = 1;
569
+ uint32 count = 2;
570
+ bool prove = 3;
571
+ }
572
+
573
+ oneof version {
574
+ GetProtocolVersionUpgradeVoteStatusRequestV0 v0 = 1;
575
+ }
576
+ }
577
+
578
+ message GetProtocolVersionUpgradeVoteStatusResponse {
579
+ message GetProtocolVersionUpgradeVoteStatusResponseV0 {
580
+ message VersionSignals {
581
+ repeated VersionSignal version_signals = 1;
582
+ }
583
+
584
+ message VersionSignal {
585
+ bytes pro_tx_hash = 1;
586
+ uint32 version = 2;
587
+ }
588
+
589
+ oneof result {
590
+ VersionSignals versions = 1;
591
+ Proof proof = 2;
592
+ }
593
+ ResponseMetadata metadata = 3;
594
+ }
595
+
596
+ oneof version {
597
+ GetProtocolVersionUpgradeVoteStatusResponseV0 v0 = 1;
598
+ }
599
+ }
600
+
601
+ message GetEpochsInfoRequest {
602
+ message GetEpochsInfoRequestV0 {
603
+ google.protobuf.UInt32Value start_epoch = 1;
604
+ uint32 count = 2;
605
+ bool ascending = 3;
606
+ bool prove = 4;
607
+ }
608
+
609
+ oneof version {
610
+ GetEpochsInfoRequestV0 v0 = 1;
611
+ }
612
+ }
613
+
614
+ message GetEpochsInfoResponse {
615
+ message GetEpochsInfoResponseV0 {
616
+ message EpochInfos {
617
+ repeated EpochInfo epoch_infos = 1;
618
+ }
619
+
620
+ message EpochInfo {
621
+ uint32 number = 1;
622
+ uint64 first_block_height = 2;
623
+ uint32 first_core_block_height = 3;
624
+ uint64 start_time = 4;
625
+ double fee_multiplier = 5;
626
+ }
627
+
628
+ oneof result {
629
+ EpochInfos epochs = 1;
630
+ Proof proof = 2;
631
+ }
632
+ ResponseMetadata metadata = 3;
633
+ }
634
+
635
+ oneof version {
636
+ GetEpochsInfoResponseV0 v0 = 1;
637
+ }
134
638
  }