@dashevo/dapi-grpc 0.25.8 → 0.25.9
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 -0
- package/clients/platform/v0/nodejs/PlatformPromiseClient.js +114 -0
- package/clients/platform/v0/nodejs/platform_pbjs.js +16823 -7647
- package/clients/platform/v0/nodejs/platform_protoc.js +14405 -5883
- package/clients/platform/v0/rust/platform_example.rs +7 -2
- package/clients/platform/v0/web/PlatformPromiseClient.js +42 -0
- package/clients/platform/v0/web/platform_pb.d.ts +2103 -920
- package/clients/platform/v0/web/platform_pb.js +14405 -5883
- package/clients/platform/v0/web/platform_pb_service.d.ts +73 -16
- package/clients/platform/v0/web/platform_pb_service.js +128 -8
- package/package.json +2 -2
- package/protos/platform/v0/platform.proto +432 -186
- package/src/platform/proto/org.dash.platform.dapi.v0.rs +1095 -406
- package/test/unit/clients/platform/v0/nodejs/PlatformPromiseClient.spec.js +31 -0
package/Cargo.toml
CHANGED
|
@@ -40,6 +40,12 @@ const {
|
|
|
40
40
|
WaitForStateTransitionResultResponse: PBJSWaitForStateTransitionResultResponse,
|
|
41
41
|
GetConsensusParamsRequest: PBJSGetConsensusParamsRequest,
|
|
42
42
|
GetConsensusParamsResponse: PBJSGetConsensusParamsResponse,
|
|
43
|
+
GetEpochsInfoRequest: PBJSGetEpochsInfoRequest,
|
|
44
|
+
GetEpochsInfoResponse: PBJSGetEpochsInfoResponse,
|
|
45
|
+
GetVersionUpgradeVoteStatusRequest: PBJSGetVersionUpgradeVoteStatusRequest,
|
|
46
|
+
GetVersionUpgradeVoteStatusResponse: PBJSGetVersionUpgradeVoteStatusResponse,
|
|
47
|
+
GetVersionUpgradeStateRequest: PBJSGetVersionUpgradeStateRequest,
|
|
48
|
+
GetVersionUpgradeStateResponse: PBJSGetVersionUpgradeStateResponse,
|
|
43
49
|
},
|
|
44
50
|
},
|
|
45
51
|
},
|
|
@@ -56,6 +62,9 @@ const {
|
|
|
56
62
|
GetIdentitiesByPublicKeyHashesResponse: ProtocGetIdentitiesByPublicKeyHashesResponse,
|
|
57
63
|
WaitForStateTransitionResultResponse: ProtocWaitForStateTransitionResultResponse,
|
|
58
64
|
GetConsensusParamsResponse: ProtocGetConsensusParamsResponse,
|
|
65
|
+
GetEpochsInfoResponse: ProtocGetEpochsInfoResponse,
|
|
66
|
+
GetVersionUpgradeVoteStatusResponse: ProtocGetVersionUpgradeVoteStatusResponse,
|
|
67
|
+
GetVersionUpgradeStateResponse: ProtocGetVersionUpgradeStateResponse,
|
|
59
68
|
} = require('./platform_protoc');
|
|
60
69
|
|
|
61
70
|
const getPlatformDefinition = require('../../../../lib/getPlatformDefinition');
|
|
@@ -114,6 +123,18 @@ class PlatformPromiseClient {
|
|
|
114
123
|
this.client.getConsensusParams.bind(this.client),
|
|
115
124
|
);
|
|
116
125
|
|
|
126
|
+
this.client.getEpochsInfo = promisify(
|
|
127
|
+
this.client.getEpochsInfo.bind(this.client),
|
|
128
|
+
);
|
|
129
|
+
|
|
130
|
+
this.client.getVersionUpgradeVoteStatus = promisify(
|
|
131
|
+
this.client.getVersionUpgradeVoteStatus.bind(this.client),
|
|
132
|
+
);
|
|
133
|
+
|
|
134
|
+
this.client.getVersionUpgradeState = promisify(
|
|
135
|
+
this.client.getVersionUpgradeState.bind(this.client),
|
|
136
|
+
);
|
|
137
|
+
|
|
117
138
|
this.protocolVersion = undefined;
|
|
118
139
|
}
|
|
119
140
|
|
|
@@ -374,6 +395,99 @@ class PlatformPromiseClient {
|
|
|
374
395
|
);
|
|
375
396
|
}
|
|
376
397
|
|
|
398
|
+
/**
|
|
399
|
+
* @param {!GetEpochsInfoRequest} getEpochsInfoRequest
|
|
400
|
+
* @param {?Object<string, string>} metadata
|
|
401
|
+
* @param {CallOptions} [options={}]
|
|
402
|
+
* @return {Promise<!GetEpochsInfoResponse>}
|
|
403
|
+
*/
|
|
404
|
+
getEpochsInfo(getEpochsInfoRequest, metadata = {}, options = {}) {
|
|
405
|
+
if (!isObject(metadata)) {
|
|
406
|
+
throw new Error('metadata must be an object');
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
return this.client.getEpochsInfo(
|
|
410
|
+
getEpochsInfoRequest,
|
|
411
|
+
convertObjectToMetadata(metadata),
|
|
412
|
+
{
|
|
413
|
+
interceptors: [
|
|
414
|
+
jsonToProtobufInterceptorFactory(
|
|
415
|
+
jsonToProtobufFactory(
|
|
416
|
+
ProtocGetEpochsInfoResponse,
|
|
417
|
+
PBJSGetEpochsInfoResponse,
|
|
418
|
+
),
|
|
419
|
+
protobufToJsonFactory(
|
|
420
|
+
PBJSGetEpochsInfoRequest,
|
|
421
|
+
),
|
|
422
|
+
),
|
|
423
|
+
],
|
|
424
|
+
...options,
|
|
425
|
+
},
|
|
426
|
+
);
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* @param {!GetVersionUpgradeVoteStatusRequest} getVersionUpgradeVoteStatusRequest
|
|
431
|
+
* @param {?Object<string, string>} metadata
|
|
432
|
+
* @param {CallOptions} [options={}]
|
|
433
|
+
* @return {Promise<!GetVersionUpgradeVoteStatusResponse>}
|
|
434
|
+
*/
|
|
435
|
+
getVersionUpgradeVoteStatus(getVersionUpgradeVoteStatusRequest, metadata = {}, options = {}) {
|
|
436
|
+
if (!isObject(metadata)) {
|
|
437
|
+
throw new Error('metadata must be an object');
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
return this.client.getVersionUpgradeVoteStatus(
|
|
441
|
+
getVersionUpgradeVoteStatusRequest,
|
|
442
|
+
convertObjectToMetadata(metadata),
|
|
443
|
+
{
|
|
444
|
+
interceptors: [
|
|
445
|
+
jsonToProtobufInterceptorFactory(
|
|
446
|
+
jsonToProtobufFactory(
|
|
447
|
+
ProtocGetVersionUpgradeVoteStatusResponse,
|
|
448
|
+
PBJSGetVersionUpgradeVoteStatusResponse,
|
|
449
|
+
),
|
|
450
|
+
protobufToJsonFactory(
|
|
451
|
+
PBJSGetVersionUpgradeVoteStatusRequest,
|
|
452
|
+
),
|
|
453
|
+
),
|
|
454
|
+
],
|
|
455
|
+
...options,
|
|
456
|
+
},
|
|
457
|
+
);
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* @param {!GetVersionUpgradeStateRequest} getVersionUpgradeStateRequest
|
|
462
|
+
* @param {?Object<string, string>} metadata
|
|
463
|
+
* @param {CallOptions} [options={}]
|
|
464
|
+
* @return {Promise<!GetVersionUpgradeStateResponse>}
|
|
465
|
+
*/
|
|
466
|
+
getVersionUpgradeState(getVersionUpgradeStateRequest, metadata = {}, options = {}) {
|
|
467
|
+
if (!isObject(metadata)) {
|
|
468
|
+
throw new Error('metadata must be an object');
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
return this.client.getVersionUpgradeState(
|
|
472
|
+
getVersionUpgradeStateRequest,
|
|
473
|
+
convertObjectToMetadata(metadata),
|
|
474
|
+
{
|
|
475
|
+
interceptors: [
|
|
476
|
+
jsonToProtobufInterceptorFactory(
|
|
477
|
+
jsonToProtobufFactory(
|
|
478
|
+
ProtocGetVersionUpgradeStateResponse,
|
|
479
|
+
PBJSGetVersionUpgradeStateResponse,
|
|
480
|
+
),
|
|
481
|
+
protobufToJsonFactory(
|
|
482
|
+
PBJSGetVersionUpgradeStateRequest,
|
|
483
|
+
),
|
|
484
|
+
),
|
|
485
|
+
],
|
|
486
|
+
...options,
|
|
487
|
+
},
|
|
488
|
+
);
|
|
489
|
+
}
|
|
490
|
+
|
|
377
491
|
/**
|
|
378
492
|
* @param {string} protocolVersion
|
|
379
493
|
*/
|