@dashevo/dapi-grpc 1.0.0-beta.2 → 1.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Cargo.toml +1 -1
- package/package.json +2 -2
- package/protos/platform/v0/platform.proto +177 -148
package/Cargo.toml
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dashevo/dapi-grpc",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.3",
|
|
4
4
|
"description": "DAPI GRPC definition file and generated clients",
|
|
5
5
|
"browser": "browser.js",
|
|
6
6
|
"main": "node.js",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"homepage": "https://github.com/dashevo/dapi-grpc#readme",
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@dashevo/grpc-common": "1.0.0-beta.
|
|
48
|
+
"@dashevo/grpc-common": "1.0.0-beta.3",
|
|
49
49
|
"@dashevo/protobufjs": "6.10.5",
|
|
50
50
|
"@grpc/grpc-js": "1.4.4",
|
|
51
51
|
"@improbable-eng/grpc-web": "^0.15.0",
|
|
@@ -48,22 +48,24 @@ service Platform {
|
|
|
48
48
|
rpc getPathElements(GetPathElementsRequest) returns (GetPathElementsResponse);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
+
// Proof message includes cryptographic proofs for validating responses
|
|
51
52
|
message Proof {
|
|
52
|
-
bytes grovedb_proof = 1;
|
|
53
|
-
bytes quorum_hash = 2;
|
|
54
|
-
bytes signature = 3;
|
|
55
|
-
uint32 round = 4;
|
|
56
|
-
bytes block_id_hash = 5;
|
|
57
|
-
uint32 quorum_type = 6;
|
|
53
|
+
bytes grovedb_proof = 1; // GroveDB proof for the data
|
|
54
|
+
bytes quorum_hash = 2; // Hash of the quorum validating the data
|
|
55
|
+
bytes signature = 3; // Signature proving data authenticity
|
|
56
|
+
uint32 round = 4; // Consensus round number
|
|
57
|
+
bytes block_id_hash = 5; // Hash of the block ID
|
|
58
|
+
uint32 quorum_type = 6; // Type of the quorum
|
|
58
59
|
}
|
|
59
60
|
|
|
61
|
+
// ResponseMetadata provides metadata about the blockchain state at the time of response
|
|
60
62
|
message ResponseMetadata {
|
|
61
|
-
uint64 height = 1;
|
|
62
|
-
uint32 core_chain_locked_height = 2;
|
|
63
|
-
uint32 epoch = 3;
|
|
64
|
-
uint64 time_ms = 4;
|
|
65
|
-
uint32 protocol_version = 5;
|
|
66
|
-
string chain_id = 6;
|
|
63
|
+
uint64 height = 1; // Current blockchain height
|
|
64
|
+
uint32 core_chain_locked_height = 2; // Latest known core height in consensus
|
|
65
|
+
uint32 epoch = 3; // Current epoch number
|
|
66
|
+
uint64 time_ms = 4; // Timestamp in milliseconds
|
|
67
|
+
uint32 protocol_version = 5; // Protocol version
|
|
68
|
+
string chain_id = 6; // Identifier of the blockchain
|
|
67
69
|
}
|
|
68
70
|
|
|
69
71
|
message StateTransitionBroadcastError {
|
|
@@ -87,8 +89,8 @@ message BroadcastStateTransitionResponse {}
|
|
|
87
89
|
message GetIdentityRequest {
|
|
88
90
|
|
|
89
91
|
message GetIdentityRequestV0 {
|
|
90
|
-
bytes id = 1;
|
|
91
|
-
bool prove = 2;
|
|
92
|
+
bytes id = 1; // The ID of the identity being requested
|
|
93
|
+
bool prove = 2; // Flag to request a proof as the response
|
|
92
94
|
}
|
|
93
95
|
|
|
94
96
|
oneof version { GetIdentityRequestV0 v0 = 1; }
|
|
@@ -119,8 +121,8 @@ message GetIdentityContractNonceRequest {
|
|
|
119
121
|
message GetIdentityBalanceRequest {
|
|
120
122
|
|
|
121
123
|
message GetIdentityBalanceRequestV0 {
|
|
122
|
-
bytes id = 1;
|
|
123
|
-
bool prove = 2;
|
|
124
|
+
bytes id = 1; // ID of the identity whose balance is requested
|
|
125
|
+
bool prove = 2; // Flag to request a proof as the response
|
|
124
126
|
}
|
|
125
127
|
|
|
126
128
|
oneof version { GetIdentityBalanceRequestV0 v0 = 1; }
|
|
@@ -129,8 +131,8 @@ message GetIdentityBalanceRequest {
|
|
|
129
131
|
message GetIdentityBalanceAndRevisionRequest {
|
|
130
132
|
|
|
131
133
|
message GetIdentityBalanceAndRevisionRequestV0 {
|
|
132
|
-
bytes id = 1;
|
|
133
|
-
bool prove = 2;
|
|
134
|
+
bytes id = 1; // ID of the identity for balance and revision
|
|
135
|
+
bool prove = 2; // Flag to request a proof as the response
|
|
134
136
|
}
|
|
135
137
|
|
|
136
138
|
oneof version { GetIdentityBalanceAndRevisionRequestV0 v0 = 1; }
|
|
@@ -140,10 +142,10 @@ message GetIdentityResponse {
|
|
|
140
142
|
|
|
141
143
|
message GetIdentityResponseV0 {
|
|
142
144
|
oneof result {
|
|
143
|
-
bytes identity = 1;
|
|
144
|
-
Proof proof = 2;
|
|
145
|
+
bytes identity = 1; // The requested identity data
|
|
146
|
+
Proof proof = 2; // Proof of the identity data, if requested
|
|
145
147
|
}
|
|
146
|
-
ResponseMetadata metadata = 3;
|
|
148
|
+
ResponseMetadata metadata = 3; // Metadata about the blockchain state
|
|
147
149
|
}
|
|
148
150
|
|
|
149
151
|
oneof version { GetIdentityResponseV0 v0 = 1; }
|
|
@@ -179,10 +181,10 @@ message GetIdentityBalanceResponse {
|
|
|
179
181
|
|
|
180
182
|
message GetIdentityBalanceResponseV0 {
|
|
181
183
|
oneof result {
|
|
182
|
-
uint64 balance = 1;
|
|
183
|
-
Proof proof = 2;
|
|
184
|
+
uint64 balance = 1; // The balance of the requested identity
|
|
185
|
+
Proof proof = 2; // Proof of the balance, if requested
|
|
184
186
|
}
|
|
185
|
-
ResponseMetadata metadata = 3;
|
|
187
|
+
ResponseMetadata metadata = 3; // Metadata about the blockchain state
|
|
186
188
|
}
|
|
187
189
|
|
|
188
190
|
oneof version { GetIdentityBalanceResponseV0 v0 = 1; }
|
|
@@ -192,15 +194,15 @@ message GetIdentityBalanceAndRevisionResponse {
|
|
|
192
194
|
|
|
193
195
|
message GetIdentityBalanceAndRevisionResponseV0 {
|
|
194
196
|
message BalanceAndRevision {
|
|
195
|
-
uint64 balance = 1;
|
|
196
|
-
uint64 revision = 2;
|
|
197
|
+
uint64 balance = 1; // Balance of the identity
|
|
198
|
+
uint64 revision = 2; // Revision number of the identity
|
|
197
199
|
}
|
|
198
200
|
|
|
199
201
|
oneof result {
|
|
200
|
-
BalanceAndRevision balance_and_revision = 1;
|
|
201
|
-
Proof proof = 2;
|
|
202
|
+
BalanceAndRevision balance_and_revision = 1; // The balance and revision data
|
|
203
|
+
Proof proof = 2; // Proof of the data, if requested
|
|
202
204
|
}
|
|
203
|
-
ResponseMetadata metadata = 3;
|
|
205
|
+
ResponseMetadata metadata = 3; // Metadata about the blockchain state
|
|
204
206
|
}
|
|
205
207
|
|
|
206
208
|
oneof version { GetIdentityBalanceAndRevisionResponseV0 v0 = 1; }
|
|
@@ -208,34 +210,42 @@ message GetIdentityBalanceAndRevisionResponse {
|
|
|
208
210
|
|
|
209
211
|
message KeyRequestType {
|
|
210
212
|
oneof request {
|
|
211
|
-
AllKeys all_keys = 1;
|
|
212
|
-
SpecificKeys specific_keys = 2;
|
|
213
|
-
SearchKey search_key = 3;
|
|
213
|
+
AllKeys all_keys = 1; // Request for all keys
|
|
214
|
+
SpecificKeys specific_keys = 2; // Request for specific keys by their IDs
|
|
215
|
+
SearchKey search_key = 3; // Request for keys based on a search criteria
|
|
214
216
|
}
|
|
215
217
|
}
|
|
216
218
|
|
|
219
|
+
// AllKeys is an empty message used to signify a request for all keys
|
|
217
220
|
message AllKeys {}
|
|
218
221
|
|
|
219
|
-
|
|
222
|
+
// SpecificKeys is used to request specific keys by their IDs
|
|
223
|
+
message SpecificKeys {
|
|
224
|
+
repeated uint32 key_ids = 1; // List of key IDs
|
|
225
|
+
}
|
|
220
226
|
|
|
221
|
-
|
|
227
|
+
// SearchKey represents a request to search for keys based on specific criteria
|
|
228
|
+
message SearchKey {
|
|
229
|
+
map<uint32, SecurityLevelMap> purpose_map = 1; // Map of purposes to their security level maps
|
|
230
|
+
}
|
|
222
231
|
|
|
232
|
+
// SecurityLevelMap maps security levels to a request type for key retrieval
|
|
223
233
|
message SecurityLevelMap {
|
|
224
234
|
enum KeyKindRequestType {
|
|
225
|
-
CURRENT_KEY_OF_KIND_REQUEST = 0;
|
|
226
|
-
ALL_KEYS_OF_KIND_REQUEST = 1;
|
|
235
|
+
CURRENT_KEY_OF_KIND_REQUEST = 0; // Request the current key of a particular kind
|
|
236
|
+
ALL_KEYS_OF_KIND_REQUEST = 1; // Request all keys of a particular kind
|
|
227
237
|
}
|
|
228
|
-
map<uint32, KeyKindRequestType> security_level_map = 1;
|
|
238
|
+
map<uint32, KeyKindRequestType> security_level_map = 1; // Maps security levels to key request types
|
|
229
239
|
}
|
|
230
240
|
|
|
231
241
|
message GetIdentityKeysRequest {
|
|
232
242
|
|
|
233
243
|
message GetIdentityKeysRequestV0 {
|
|
234
|
-
bytes identity_id = 1;
|
|
235
|
-
KeyRequestType request_type = 2;
|
|
236
|
-
google.protobuf.UInt32Value limit = 3;
|
|
237
|
-
google.protobuf.UInt32Value offset = 4;
|
|
238
|
-
bool prove = 5;
|
|
244
|
+
bytes identity_id = 1; // ID of the identity for key retrieval
|
|
245
|
+
KeyRequestType request_type = 2; // Type of key request: all, specific, or search
|
|
246
|
+
google.protobuf.UInt32Value limit = 3; // Limit on the number of keys to be returned
|
|
247
|
+
google.protobuf.UInt32Value offset = 4; // Offset for pagination through the keys
|
|
248
|
+
bool prove = 5; // Flag to request a proof as the response
|
|
239
249
|
}
|
|
240
250
|
|
|
241
251
|
oneof version { GetIdentityKeysRequestV0 v0 = 1; }
|
|
@@ -244,15 +254,14 @@ message GetIdentityKeysRequest {
|
|
|
244
254
|
message GetIdentityKeysResponse {
|
|
245
255
|
|
|
246
256
|
message GetIdentityKeysResponseV0 {
|
|
247
|
-
message Keys { repeated bytes keys_bytes = 1; }
|
|
257
|
+
message Keys { repeated bytes keys_bytes = 1; } // Collection of keys as byte sequences
|
|
248
258
|
|
|
249
259
|
oneof result {
|
|
250
|
-
Keys keys = 1;
|
|
251
|
-
Proof proof = 2;
|
|
260
|
+
Keys keys = 1; // The actual key data
|
|
261
|
+
Proof proof = 2; // Proof of the keys data, if requested
|
|
252
262
|
}
|
|
253
|
-
ResponseMetadata metadata = 3;
|
|
263
|
+
ResponseMetadata metadata = 3; // Metadata about the blockchain state
|
|
254
264
|
}
|
|
255
|
-
|
|
256
265
|
oneof version { GetIdentityKeysResponseV0 v0 = 1; }
|
|
257
266
|
}
|
|
258
267
|
|
|
@@ -298,31 +307,34 @@ message GetIdentitiesContractKeysResponse {
|
|
|
298
307
|
|
|
299
308
|
message GetProofsRequest {
|
|
300
309
|
message GetProofsRequestV0 {
|
|
310
|
+
// DocumentRequest specifies a request for a document proof
|
|
301
311
|
message DocumentRequest {
|
|
302
312
|
enum DocumentContestedStatus {
|
|
303
313
|
NOT_CONTESTED = 0;
|
|
304
314
|
MAYBE_CONTESTED = 1;
|
|
305
315
|
CONTESTED = 2;
|
|
306
316
|
}
|
|
307
|
-
bytes contract_id = 1;
|
|
308
|
-
string document_type = 2;
|
|
309
|
-
bool document_type_keeps_history = 3;
|
|
310
|
-
bytes document_id = 4;
|
|
317
|
+
bytes contract_id = 1; // ID of the contract the document belongs to
|
|
318
|
+
string document_type = 2; // Type of document being requested
|
|
319
|
+
bool document_type_keeps_history = 3; // Indicates if the document type keeps a history of changes
|
|
320
|
+
bytes document_id = 4; // ID of the specific document being requested
|
|
311
321
|
DocumentContestedStatus document_contested_status = 5;
|
|
312
322
|
}
|
|
313
323
|
|
|
324
|
+
// IdentityRequest specifies a request for an identity proof
|
|
314
325
|
message IdentityRequest {
|
|
315
326
|
enum Type {
|
|
316
|
-
FULL_IDENTITY = 0;
|
|
317
|
-
BALANCE = 1;
|
|
318
|
-
KEYS = 2;
|
|
319
|
-
REVISION = 3;
|
|
327
|
+
FULL_IDENTITY = 0; // Request for the full identity
|
|
328
|
+
BALANCE = 1; // Request for the identity's balance
|
|
329
|
+
KEYS = 2; // Request for the identity's keys
|
|
330
|
+
REVISION = 3; // Request for the identity's revision
|
|
320
331
|
}
|
|
321
|
-
bytes identity_id = 1;
|
|
322
|
-
Type request_type = 2;
|
|
332
|
+
bytes identity_id = 1; // ID of the identity for which the proof is requested
|
|
333
|
+
Type request_type = 2; // Type of identity request
|
|
323
334
|
}
|
|
324
335
|
|
|
325
|
-
|
|
336
|
+
// ContractRequest specifies a request for a data contract proof.
|
|
337
|
+
message ContractRequest { bytes contract_id = 1; } // ID of the contract for which the proof is requested
|
|
326
338
|
|
|
327
339
|
message VoteStatusRequest {
|
|
328
340
|
message ContestedResourceVoteStatusRequest {
|
|
@@ -336,9 +348,9 @@ message GetProofsRequest {
|
|
|
336
348
|
oneof request_type { ContestedResourceVoteStatusRequest contested_resource_vote_status_request = 1; }
|
|
337
349
|
}
|
|
338
350
|
|
|
339
|
-
repeated IdentityRequest identities = 1;
|
|
340
|
-
repeated ContractRequest contracts = 2;
|
|
341
|
-
repeated DocumentRequest documents = 3;
|
|
351
|
+
repeated IdentityRequest identities = 1; // List of identity requests
|
|
352
|
+
repeated ContractRequest contracts = 2; // List of contract requests
|
|
353
|
+
repeated DocumentRequest documents = 3; // List of document requests
|
|
342
354
|
repeated VoteStatusRequest votes = 4;
|
|
343
355
|
}
|
|
344
356
|
|
|
@@ -347,17 +359,19 @@ message GetProofsRequest {
|
|
|
347
359
|
|
|
348
360
|
message GetProofsResponse {
|
|
349
361
|
message GetProofsResponseV0 {
|
|
350
|
-
oneof result {
|
|
362
|
+
oneof result {
|
|
363
|
+
Proof proof = 1; // Cryptographic proof for the requested data
|
|
364
|
+
}
|
|
351
365
|
|
|
352
|
-
ResponseMetadata metadata = 2;
|
|
366
|
+
ResponseMetadata metadata = 2; // Metadata about the blockchain state
|
|
353
367
|
}
|
|
354
368
|
oneof version { GetProofsResponseV0 v0 = 1; }
|
|
355
369
|
}
|
|
356
370
|
|
|
357
371
|
message GetDataContractRequest {
|
|
358
372
|
message GetDataContractRequestV0 {
|
|
359
|
-
bytes id = 1;
|
|
360
|
-
bool prove = 2;
|
|
373
|
+
bytes id = 1; // The ID of the data contract being requested
|
|
374
|
+
bool prove = 2; // Flag to request a proof as the response
|
|
361
375
|
}
|
|
362
376
|
oneof version { GetDataContractRequestV0 v0 = 1; }
|
|
363
377
|
}
|
|
@@ -365,106 +379,115 @@ message GetDataContractRequest {
|
|
|
365
379
|
message GetDataContractResponse {
|
|
366
380
|
message GetDataContractResponseV0 {
|
|
367
381
|
oneof result {
|
|
368
|
-
bytes data_contract = 1;
|
|
369
|
-
Proof proof = 2;
|
|
382
|
+
bytes data_contract = 1; // The actual data contract in binary form
|
|
383
|
+
Proof proof = 2; // Cryptographic proof of the data contract, if requested
|
|
370
384
|
}
|
|
371
|
-
ResponseMetadata metadata = 3;
|
|
385
|
+
ResponseMetadata metadata = 3; // Metadata about the blockchain state
|
|
372
386
|
}
|
|
373
387
|
oneof version { GetDataContractResponseV0 v0 = 1; }
|
|
374
388
|
}
|
|
375
389
|
|
|
376
390
|
message GetDataContractsRequest {
|
|
377
391
|
message GetDataContractsRequestV0 {
|
|
378
|
-
repeated bytes ids = 1;
|
|
379
|
-
bool prove = 2;
|
|
392
|
+
repeated bytes ids = 1; // A list of unique IDs for the data contracts being requested
|
|
393
|
+
bool prove = 2; // Flag to request a proof as the response
|
|
380
394
|
}
|
|
381
395
|
oneof version { GetDataContractsRequestV0 v0 = 1; }
|
|
382
396
|
}
|
|
383
397
|
|
|
384
398
|
message GetDataContractsResponse {
|
|
385
399
|
message DataContractEntry {
|
|
386
|
-
bytes identifier = 1;
|
|
387
|
-
google.protobuf.BytesValue data_contract = 2;
|
|
400
|
+
bytes identifier = 1; // The unique identifier of the data contract
|
|
401
|
+
google.protobuf.BytesValue data_contract = 2; // The actual data contract content
|
|
388
402
|
}
|
|
403
|
+
|
|
404
|
+
// DataContracts is a collection of data contract entries.
|
|
389
405
|
message DataContracts {
|
|
390
|
-
repeated DataContractEntry data_contract_entries = 1;
|
|
406
|
+
repeated DataContractEntry data_contract_entries = 1; // A list of data contract entries
|
|
391
407
|
}
|
|
392
408
|
|
|
393
409
|
message GetDataContractsResponseV0 {
|
|
394
410
|
oneof result {
|
|
395
|
-
DataContracts data_contracts = 1;
|
|
396
|
-
Proof proof = 2;
|
|
411
|
+
DataContracts data_contracts = 1; // The actual data contracts requested
|
|
412
|
+
Proof proof = 2; // Cryptographic proof for the data contracts, if requested
|
|
397
413
|
}
|
|
398
|
-
ResponseMetadata metadata = 3;
|
|
414
|
+
ResponseMetadata metadata = 3; // Metadata about the blockchain state
|
|
399
415
|
}
|
|
400
416
|
oneof version { GetDataContractsResponseV0 v0 = 1; }
|
|
401
417
|
}
|
|
402
418
|
|
|
403
419
|
message GetDataContractHistoryRequest {
|
|
404
420
|
message GetDataContractHistoryRequestV0 {
|
|
405
|
-
bytes id = 1;
|
|
406
|
-
google.protobuf.UInt32Value limit = 2;
|
|
407
|
-
google.protobuf.UInt32Value offset = 3;
|
|
408
|
-
uint64 start_at_ms = 4;
|
|
409
|
-
bool prove = 5;
|
|
421
|
+
bytes id = 1; // The unique ID of the data contract
|
|
422
|
+
google.protobuf.UInt32Value limit = 2; // The maximum number of history entries to return
|
|
423
|
+
google.protobuf.UInt32Value offset = 3; // The offset for pagination through the contract history
|
|
424
|
+
uint64 start_at_ms = 4; // Only return results starting at this time in milliseconds
|
|
425
|
+
bool prove = 5; // Flag to request a proof as the response
|
|
410
426
|
}
|
|
411
427
|
oneof version { GetDataContractHistoryRequestV0 v0 = 1; }
|
|
412
428
|
}
|
|
413
429
|
|
|
414
430
|
message GetDataContractHistoryResponse {
|
|
415
431
|
message GetDataContractHistoryResponseV0 {
|
|
432
|
+
// Represents a single entry in the data contract's history
|
|
416
433
|
message DataContractHistoryEntry {
|
|
417
|
-
uint64 date = 1;
|
|
418
|
-
bytes value = 2;
|
|
434
|
+
uint64 date = 1; // The date of the history entry
|
|
435
|
+
bytes value = 2; // The value of the data contract at this point in history
|
|
419
436
|
}
|
|
420
437
|
|
|
438
|
+
// Collection of data contract history entries
|
|
421
439
|
message DataContractHistory {
|
|
422
|
-
repeated DataContractHistoryEntry data_contract_entries = 1;
|
|
440
|
+
repeated DataContractHistoryEntry data_contract_entries = 1; // List of history entries
|
|
423
441
|
}
|
|
424
442
|
|
|
425
443
|
oneof result {
|
|
426
|
-
DataContractHistory data_contract_history = 1;
|
|
427
|
-
Proof proof = 2;
|
|
444
|
+
DataContractHistory data_contract_history = 1; // The actual history of the data contract
|
|
445
|
+
Proof proof = 2; // Cryptographic proof of the data contract history, if requested
|
|
428
446
|
}
|
|
429
447
|
|
|
430
|
-
ResponseMetadata metadata = 3;
|
|
448
|
+
ResponseMetadata metadata = 3; // Metadata about the blockchain state
|
|
431
449
|
}
|
|
432
450
|
oneof version { GetDataContractHistoryResponseV0 v0 = 1; }
|
|
433
451
|
}
|
|
434
452
|
|
|
435
453
|
message GetDocumentsRequest {
|
|
436
454
|
message GetDocumentsRequestV0 {
|
|
437
|
-
bytes data_contract_id = 1;
|
|
438
|
-
string document_type = 2;
|
|
439
|
-
bytes where = 3;
|
|
440
|
-
bytes order_by = 4;
|
|
441
|
-
uint32 limit = 5;
|
|
455
|
+
bytes data_contract_id = 1; // The ID of the data contract containing the documents
|
|
456
|
+
string document_type = 2; // The type of document being requested
|
|
457
|
+
bytes where = 3; // Conditions to be met by the requested documents
|
|
458
|
+
bytes order_by = 4; // Ordering criteria for the documents
|
|
459
|
+
uint32 limit = 5; // Maximum number of documents to return
|
|
460
|
+
|
|
461
|
+
// Specifies the starting point for the document retrieval
|
|
442
462
|
oneof start {
|
|
443
|
-
bytes start_after = 6;
|
|
444
|
-
bytes start_at = 7;
|
|
463
|
+
bytes start_after = 6; // Start retrieval after this document
|
|
464
|
+
bytes start_at = 7; // Start retrieval at this document
|
|
445
465
|
}
|
|
446
|
-
bool prove = 8;
|
|
466
|
+
bool prove = 8; // Flag to request a proof as the response
|
|
447
467
|
}
|
|
448
468
|
oneof version { GetDocumentsRequestV0 v0 = 1; }
|
|
449
469
|
}
|
|
450
470
|
|
|
451
471
|
message GetDocumentsResponse {
|
|
452
472
|
message GetDocumentsResponseV0 {
|
|
453
|
-
|
|
473
|
+
// Represents a collection of documents
|
|
474
|
+
message Documents {
|
|
475
|
+
repeated bytes documents = 1; // The actual documents in binary form
|
|
476
|
+
}
|
|
454
477
|
|
|
455
478
|
oneof result {
|
|
456
|
-
Documents documents = 1;
|
|
457
|
-
Proof proof = 2;
|
|
479
|
+
Documents documents = 1; // The actual documents requested
|
|
480
|
+
Proof proof = 2; // Cryptographic proof of the documents, if requested
|
|
458
481
|
}
|
|
459
|
-
ResponseMetadata metadata = 3;
|
|
482
|
+
ResponseMetadata metadata = 3; // Metadata about the blockchain state
|
|
460
483
|
}
|
|
461
484
|
oneof version { GetDocumentsResponseV0 v0 = 1; }
|
|
462
485
|
}
|
|
463
486
|
|
|
464
487
|
message GetIdentityByPublicKeyHashRequest {
|
|
465
488
|
message GetIdentityByPublicKeyHashRequestV0 {
|
|
466
|
-
bytes public_key_hash = 1;
|
|
467
|
-
bool prove = 2;
|
|
489
|
+
bytes public_key_hash = 1; // The public key hash of the identity being requested
|
|
490
|
+
bool prove = 2; // Flag to request a proof as the response
|
|
468
491
|
}
|
|
469
492
|
oneof version { GetIdentityByPublicKeyHashRequestV0 v0 = 1; }
|
|
470
493
|
}
|
|
@@ -472,19 +495,19 @@ message GetIdentityByPublicKeyHashRequest {
|
|
|
472
495
|
message GetIdentityByPublicKeyHashResponse {
|
|
473
496
|
message GetIdentityByPublicKeyHashResponseV0 {
|
|
474
497
|
oneof result {
|
|
475
|
-
bytes identity = 1;
|
|
476
|
-
Proof proof = 2;
|
|
498
|
+
bytes identity = 1; // The actual identity data corresponding to the requested public key hash
|
|
499
|
+
Proof proof = 2; // Cryptographic proof for the identity data, if requested
|
|
477
500
|
}
|
|
478
501
|
|
|
479
|
-
ResponseMetadata metadata = 3;
|
|
502
|
+
ResponseMetadata metadata = 3; // Metadata about the blockchain state
|
|
480
503
|
}
|
|
481
504
|
oneof version { GetIdentityByPublicKeyHashResponseV0 v0 = 1; }
|
|
482
505
|
}
|
|
483
506
|
|
|
484
507
|
message WaitForStateTransitionResultRequest {
|
|
485
508
|
message WaitForStateTransitionResultRequestV0 {
|
|
486
|
-
bytes state_transition_hash = 1;
|
|
487
|
-
bool prove = 2;
|
|
509
|
+
bytes state_transition_hash = 1; // The hash of the state transition to wait for
|
|
510
|
+
bool prove = 2; // Flag to request a proof as the response
|
|
488
511
|
}
|
|
489
512
|
oneof version { WaitForStateTransitionResultRequestV0 v0 = 1; }
|
|
490
513
|
}
|
|
@@ -492,38 +515,38 @@ message WaitForStateTransitionResultRequest {
|
|
|
492
515
|
message WaitForStateTransitionResultResponse {
|
|
493
516
|
message WaitForStateTransitionResultResponseV0 {
|
|
494
517
|
oneof result {
|
|
495
|
-
StateTransitionBroadcastError error = 1;
|
|
496
|
-
Proof proof = 2;
|
|
518
|
+
StateTransitionBroadcastError error = 1; // Any error that occurred during the state transition broadcast
|
|
519
|
+
Proof proof = 2; // Cryptographic proof for the state transition, if requested
|
|
497
520
|
}
|
|
498
|
-
ResponseMetadata metadata = 3;
|
|
521
|
+
ResponseMetadata metadata = 3; // Metadata about the blockchain state
|
|
499
522
|
}
|
|
500
523
|
oneof version { WaitForStateTransitionResultResponseV0 v0 = 1; }
|
|
501
524
|
}
|
|
502
525
|
|
|
503
526
|
message GetConsensusParamsRequest {
|
|
504
527
|
message GetConsensusParamsRequestV0 {
|
|
505
|
-
int32 height = 1;
|
|
506
|
-
bool prove = 2;
|
|
528
|
+
int32 height = 1; // The blockchain height at which to get the consensus parameters
|
|
529
|
+
bool prove = 2; // Flag to request a proof as the response
|
|
507
530
|
}
|
|
508
531
|
oneof version { GetConsensusParamsRequestV0 v0 = 1; }
|
|
509
532
|
}
|
|
510
533
|
|
|
511
534
|
message GetConsensusParamsResponse {
|
|
512
535
|
message ConsensusParamsBlock {
|
|
513
|
-
string max_bytes = 1;
|
|
514
|
-
string max_gas = 2;
|
|
515
|
-
string time_iota_ms = 3;
|
|
536
|
+
string max_bytes = 1; // The maximum size of a block in bytes
|
|
537
|
+
string max_gas = 2; // The maximum gas allowed in a block
|
|
538
|
+
string time_iota_ms = 3; // The minimum time increment between consecutive blocks, in milliseconds
|
|
516
539
|
}
|
|
517
540
|
|
|
518
541
|
message ConsensusParamsEvidence {
|
|
519
|
-
string max_age_num_blocks = 1;
|
|
520
|
-
string max_age_duration = 2;
|
|
521
|
-
string max_bytes = 3;
|
|
542
|
+
string max_age_num_blocks = 1; // The maximum age of evidence, in number of blocks
|
|
543
|
+
string max_age_duration = 2; // The maximum age of evidence, as a duration
|
|
544
|
+
string max_bytes = 3; // The maximum size of evidence in bytes
|
|
522
545
|
}
|
|
523
546
|
|
|
524
547
|
message GetConsensusParamsResponseV0 {
|
|
525
|
-
ConsensusParamsBlock block = 1;
|
|
526
|
-
ConsensusParamsEvidence evidence = 2;
|
|
548
|
+
ConsensusParamsBlock block = 1; // Consensus parameters related to block creation and validation
|
|
549
|
+
ConsensusParamsEvidence evidence = 2; // Consensus parameters related to evidence
|
|
527
550
|
}
|
|
528
551
|
oneof version { GetConsensusParamsResponseV0 v0 = 1; }
|
|
529
552
|
}
|
|
@@ -531,7 +554,7 @@ message GetConsensusParamsResponse {
|
|
|
531
554
|
|
|
532
555
|
message GetProtocolVersionUpgradeStateRequest {
|
|
533
556
|
message GetProtocolVersionUpgradeStateRequestV0 {
|
|
534
|
-
bool prove = 1;
|
|
557
|
+
bool prove = 1; // Flag to request a proof as the response
|
|
535
558
|
}
|
|
536
559
|
|
|
537
560
|
oneof version {
|
|
@@ -541,20 +564,22 @@ message GetProtocolVersionUpgradeStateRequest {
|
|
|
541
564
|
|
|
542
565
|
message GetProtocolVersionUpgradeStateResponse {
|
|
543
566
|
message GetProtocolVersionUpgradeStateResponseV0 {
|
|
567
|
+
// Versions holds a collection of version entries
|
|
544
568
|
message Versions {
|
|
545
|
-
repeated VersionEntry versions = 1;
|
|
569
|
+
repeated VersionEntry versions = 1; // List of protocol version entries
|
|
546
570
|
}
|
|
547
571
|
|
|
572
|
+
// VersionEntry represents a single entry of a protocol version
|
|
548
573
|
message VersionEntry {
|
|
549
|
-
uint32 version_number = 1;
|
|
550
|
-
uint32 vote_count = 2;
|
|
574
|
+
uint32 version_number = 1; // The protocol version number
|
|
575
|
+
uint32 vote_count = 2; // The vote count for this protocol version
|
|
551
576
|
}
|
|
552
577
|
|
|
553
578
|
oneof result {
|
|
554
|
-
Versions versions = 1;
|
|
555
|
-
Proof proof = 2;
|
|
579
|
+
Versions versions = 1; // The actual protocol version information
|
|
580
|
+
Proof proof = 2; // Cryptographic proof of the protocol version information, if requested
|
|
556
581
|
}
|
|
557
|
-
ResponseMetadata metadata = 3;
|
|
582
|
+
ResponseMetadata metadata = 3; // Metadata about the blockchain state
|
|
558
583
|
}
|
|
559
584
|
|
|
560
585
|
oneof version {
|
|
@@ -564,9 +589,9 @@ message GetProtocolVersionUpgradeStateResponse {
|
|
|
564
589
|
|
|
565
590
|
message GetProtocolVersionUpgradeVoteStatusRequest {
|
|
566
591
|
message GetProtocolVersionUpgradeVoteStatusRequestV0 {
|
|
567
|
-
bytes start_pro_tx_hash = 1;
|
|
568
|
-
uint32 count = 2;
|
|
569
|
-
bool prove = 3;
|
|
592
|
+
bytes start_pro_tx_hash = 1; // The starting masternode provider transaction hash to filter the votes by
|
|
593
|
+
uint32 count = 2; // The number of vote entries to retrieve
|
|
594
|
+
bool prove = 3; // Flag to request a proof as the response
|
|
570
595
|
}
|
|
571
596
|
|
|
572
597
|
oneof version {
|
|
@@ -576,20 +601,22 @@ message GetProtocolVersionUpgradeVoteStatusRequest {
|
|
|
576
601
|
|
|
577
602
|
message GetProtocolVersionUpgradeVoteStatusResponse {
|
|
578
603
|
message GetProtocolVersionUpgradeVoteStatusResponseV0 {
|
|
604
|
+
// VersionSignals holds a collection of version signal entries
|
|
579
605
|
message VersionSignals {
|
|
580
|
-
repeated VersionSignal version_signals = 1;
|
|
606
|
+
repeated VersionSignal version_signals = 1; // List of version signal entries
|
|
581
607
|
}
|
|
582
608
|
|
|
609
|
+
// VersionSignal represents a single voting signal for a protocol version
|
|
583
610
|
message VersionSignal {
|
|
584
|
-
bytes pro_tx_hash = 1;
|
|
585
|
-
uint32 version = 2;
|
|
611
|
+
bytes pro_tx_hash = 1; // The masternode provider transaction hash associated with the vote
|
|
612
|
+
uint32 version = 2; // The protocol version number that is being voted on
|
|
586
613
|
}
|
|
587
614
|
|
|
588
615
|
oneof result {
|
|
589
|
-
VersionSignals versions = 1;
|
|
590
|
-
Proof proof = 2;
|
|
616
|
+
VersionSignals versions = 1; // The actual version signal information
|
|
617
|
+
Proof proof = 2; // Cryptographic proof of the version signal information, if requested
|
|
591
618
|
}
|
|
592
|
-
ResponseMetadata metadata = 3;
|
|
619
|
+
ResponseMetadata metadata = 3; // Metadata about the blockchain state
|
|
593
620
|
}
|
|
594
621
|
|
|
595
622
|
oneof version {
|
|
@@ -599,10 +626,10 @@ message GetProtocolVersionUpgradeVoteStatusResponse {
|
|
|
599
626
|
|
|
600
627
|
message GetEpochsInfoRequest {
|
|
601
628
|
message GetEpochsInfoRequestV0 {
|
|
602
|
-
google.protobuf.UInt32Value start_epoch = 1;
|
|
603
|
-
uint32 count = 2;
|
|
604
|
-
bool ascending = 3;
|
|
605
|
-
bool prove = 4;
|
|
629
|
+
google.protobuf.UInt32Value start_epoch = 1; // The starting epoch for the request
|
|
630
|
+
uint32 count = 2; // The number of epochs to retrieve information for
|
|
631
|
+
bool ascending = 3; // Flag indicating if the epochs should be listed in ascending order
|
|
632
|
+
bool prove = 4; // Flag to request a proof as the response
|
|
606
633
|
}
|
|
607
634
|
|
|
608
635
|
oneof version {
|
|
@@ -612,24 +639,26 @@ message GetEpochsInfoRequest {
|
|
|
612
639
|
|
|
613
640
|
message GetEpochsInfoResponse {
|
|
614
641
|
message GetEpochsInfoResponseV0 {
|
|
642
|
+
// EpochInfos holds a collection of epoch information entries
|
|
615
643
|
message EpochInfos {
|
|
616
|
-
repeated EpochInfo epoch_infos = 1;
|
|
644
|
+
repeated EpochInfo epoch_infos = 1; // List of information for each requested epoch
|
|
617
645
|
}
|
|
618
646
|
|
|
647
|
+
// EpochInfo represents information about a single epoch
|
|
619
648
|
message EpochInfo {
|
|
620
|
-
uint32 number = 1;
|
|
621
|
-
uint64 first_block_height = 2;
|
|
622
|
-
uint32 first_core_block_height = 3;
|
|
623
|
-
uint64 start_time = 4;
|
|
624
|
-
double fee_multiplier = 5;
|
|
649
|
+
uint32 number = 1; // The number of the epoch
|
|
650
|
+
uint64 first_block_height = 2; // The height of the first block in this epoch
|
|
651
|
+
uint32 first_core_block_height = 3; // The height of the first Core block in this epoch
|
|
652
|
+
uint64 start_time = 4; // The start time of the epoch
|
|
653
|
+
double fee_multiplier = 5; // The fee multiplier applicable in this epoch
|
|
625
654
|
uint32 protocol_version = 6;
|
|
626
655
|
}
|
|
627
656
|
|
|
628
657
|
oneof result {
|
|
629
|
-
EpochInfos epochs = 1;
|
|
630
|
-
Proof proof = 2;
|
|
658
|
+
EpochInfos epochs = 1; // The actual information about the requested epochs
|
|
659
|
+
Proof proof = 2; // Cryptographic proof of the epoch information, if requested
|
|
631
660
|
}
|
|
632
|
-
ResponseMetadata metadata = 3;
|
|
661
|
+
ResponseMetadata metadata = 3; // Metadata about the blockchain state
|
|
633
662
|
}
|
|
634
663
|
|
|
635
664
|
oneof version {
|