@dashevo/dapi-grpc 0.24.0-dev.2 → 0.24.0-dev.20
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/README.md +3 -3
- package/browser.js +13 -5
- package/clients/core/v0/nodejs/CorePromiseClient.js +2 -1
- package/clients/core/v0/nodejs/core_protoc.js +33 -39
- package/clients/core/v0/web/CorePromiseClient.js +159 -0
- package/clients/core/v0/web/core_pb.d.ts +783 -0
- package/clients/core/v0/web/core_pb.js +33 -39
- package/clients/core/v0/web/core_pb_service.d.ts +161 -0
- package/clients/core/v0/web/core_pb_service.js +317 -0
- package/clients/platform/v0/nodejs/PlatformPromiseClient.js +2 -1
- package/clients/platform/v0/nodejs/platform_pbjs.js +348 -20
- package/clients/platform/v0/nodejs/platform_protoc.js +131 -45
- package/clients/platform/v0/web/PlatformPromiseClient.js +130 -0
- package/clients/platform/v0/web/platform_pb.d.ts +608 -0
- package/clients/platform/v0/web/platform_pb.js +131 -45
- package/clients/platform/v0/web/platform_pb_service.d.ts +177 -0
- package/clients/platform/v0/web/platform_pb_service.js +301 -0
- package/lib/utils/parseMetadata.js +27 -0
- package/node.js +4 -0
- package/package.json +4 -4
- package/protos/platform/v0/platform.proto +6 -1
- package/scripts/build.sh +11 -10
- package/scripts/patch-protobuf-js.sh +30 -0
- package/clients/core/v0/web/core_grpc_web_pb.js +0 -495
- package/clients/platform/v0/web/platform_grpc_web_pb.js +0 -505
|
@@ -13,35 +13,31 @@
|
|
|
13
13
|
|
|
14
14
|
var jspb = require('google-protobuf');
|
|
15
15
|
var goog = jspb;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
goog.exportSymbol('proto.org.dash.platform.dapi.v0.
|
|
25
|
-
goog.exportSymbol('proto.org.dash.platform.dapi.v0.
|
|
26
|
-
goog.exportSymbol('proto.org.dash.platform.dapi.v0.
|
|
27
|
-
goog.exportSymbol('proto.org.dash.platform.dapi.v0.
|
|
28
|
-
goog.exportSymbol('proto.org.dash.platform.dapi.v0.
|
|
29
|
-
goog.exportSymbol('proto.org.dash.platform.dapi.v0.
|
|
30
|
-
goog.exportSymbol('proto.org.dash.platform.dapi.v0.
|
|
31
|
-
goog.exportSymbol('proto.org.dash.platform.dapi.v0.
|
|
32
|
-
goog.exportSymbol('proto.org.dash.platform.dapi.v0.
|
|
33
|
-
goog.exportSymbol('proto.org.dash.platform.dapi.v0.
|
|
34
|
-
goog.exportSymbol('proto.org.dash.platform.dapi.v0.
|
|
35
|
-
goog.exportSymbol('proto.org.dash.platform.dapi.v0.
|
|
36
|
-
goog.exportSymbol('proto.org.dash.platform.dapi.v0.
|
|
37
|
-
goog.exportSymbol('proto.org.dash.platform.dapi.v0.
|
|
38
|
-
goog.exportSymbol('proto.org.dash.platform.dapi.v0.
|
|
39
|
-
goog.exportSymbol('proto.org.dash.platform.dapi.v0.
|
|
40
|
-
goog.exportSymbol('proto.org.dash.platform.dapi.v0.
|
|
41
|
-
goog.exportSymbol('proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError', null, global);
|
|
42
|
-
goog.exportSymbol('proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest', null, global);
|
|
43
|
-
goog.exportSymbol('proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse', null, global);
|
|
44
|
-
goog.exportSymbol('proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.ResponsesCase', null, global);
|
|
16
|
+
const proto = {};
|
|
17
|
+
|
|
18
|
+
var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
|
|
19
|
+
goog.object.extend(proto, google_protobuf_timestamp_pb);
|
|
20
|
+
goog.exportSymbol('proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest', null, { proto });
|
|
21
|
+
goog.exportSymbol('proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse', null, { proto });
|
|
22
|
+
goog.exportSymbol('proto.org.dash.platform.dapi.v0.ConsensusParamsBlock', null, { proto });
|
|
23
|
+
goog.exportSymbol('proto.org.dash.platform.dapi.v0.ConsensusParamsEvidence', null, { proto });
|
|
24
|
+
goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetConsensusParamsRequest', null, { proto });
|
|
25
|
+
goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetConsensusParamsResponse', null, { proto });
|
|
26
|
+
goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDataContractRequest', null, { proto });
|
|
27
|
+
goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDataContractResponse', null, { proto });
|
|
28
|
+
goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest', null, { proto });
|
|
29
|
+
goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.StartCase', null, { proto });
|
|
30
|
+
goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsResponse', null, { proto });
|
|
31
|
+
goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesRequest', null, { proto });
|
|
32
|
+
goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentitiesByPublicKeyHashesResponse', null, { proto });
|
|
33
|
+
goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityRequest', null, { proto });
|
|
34
|
+
goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetIdentityResponse', null, { proto });
|
|
35
|
+
goog.exportSymbol('proto.org.dash.platform.dapi.v0.Proof', null, { proto });
|
|
36
|
+
goog.exportSymbol('proto.org.dash.platform.dapi.v0.ResponseMetadata', null, { proto });
|
|
37
|
+
goog.exportSymbol('proto.org.dash.platform.dapi.v0.StateTransitionBroadcastError', null, { proto });
|
|
38
|
+
goog.exportSymbol('proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest', null, { proto });
|
|
39
|
+
goog.exportSymbol('proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse', null, { proto });
|
|
40
|
+
goog.exportSymbol('proto.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.ResponsesCase', null, { proto });
|
|
45
41
|
/**
|
|
46
42
|
* Generated by JsPbCodeGenerator.
|
|
47
43
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
@@ -474,8 +470,9 @@ proto.org.dash.platform.dapi.v0.Proof.prototype.toObject = function(opt_includeI
|
|
|
474
470
|
proto.org.dash.platform.dapi.v0.Proof.toObject = function(includeInstance, msg) {
|
|
475
471
|
var f, obj = {
|
|
476
472
|
merkleProof: msg.getMerkleProof_asB64(),
|
|
477
|
-
|
|
478
|
-
signature: msg.getSignature_asB64()
|
|
473
|
+
quorumHash: msg.getQuorumHash_asB64(),
|
|
474
|
+
signature: msg.getSignature_asB64(),
|
|
475
|
+
round: jspb.Message.getFieldWithDefault(msg, 4, 0)
|
|
479
476
|
};
|
|
480
477
|
|
|
481
478
|
if (includeInstance) {
|
|
@@ -518,12 +515,16 @@ proto.org.dash.platform.dapi.v0.Proof.deserializeBinaryFromReader = function(msg
|
|
|
518
515
|
break;
|
|
519
516
|
case 2:
|
|
520
517
|
var value = /** @type {!Uint8Array} */ (reader.readBytes());
|
|
521
|
-
msg.
|
|
518
|
+
msg.setQuorumHash(value);
|
|
522
519
|
break;
|
|
523
520
|
case 3:
|
|
524
521
|
var value = /** @type {!Uint8Array} */ (reader.readBytes());
|
|
525
522
|
msg.setSignature(value);
|
|
526
523
|
break;
|
|
524
|
+
case 4:
|
|
525
|
+
var value = /** @type {number} */ (reader.readUint32());
|
|
526
|
+
msg.setRound(value);
|
|
527
|
+
break;
|
|
527
528
|
default:
|
|
528
529
|
reader.skipField();
|
|
529
530
|
break;
|
|
@@ -560,7 +561,7 @@ proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter = function(message
|
|
|
560
561
|
f
|
|
561
562
|
);
|
|
562
563
|
}
|
|
563
|
-
f = message.
|
|
564
|
+
f = message.getQuorumHash_asU8();
|
|
564
565
|
if (f.length > 0) {
|
|
565
566
|
writer.writeBytes(
|
|
566
567
|
2,
|
|
@@ -574,6 +575,13 @@ proto.org.dash.platform.dapi.v0.Proof.serializeBinaryToWriter = function(message
|
|
|
574
575
|
f
|
|
575
576
|
);
|
|
576
577
|
}
|
|
578
|
+
f = message.getRound();
|
|
579
|
+
if (f !== 0) {
|
|
580
|
+
writer.writeUint32(
|
|
581
|
+
4,
|
|
582
|
+
f
|
|
583
|
+
);
|
|
584
|
+
}
|
|
577
585
|
};
|
|
578
586
|
|
|
579
587
|
|
|
@@ -620,35 +628,35 @@ proto.org.dash.platform.dapi.v0.Proof.prototype.setMerkleProof = function(value)
|
|
|
620
628
|
|
|
621
629
|
|
|
622
630
|
/**
|
|
623
|
-
* optional bytes
|
|
631
|
+
* optional bytes quorum_hash = 2;
|
|
624
632
|
* @return {string}
|
|
625
633
|
*/
|
|
626
|
-
proto.org.dash.platform.dapi.v0.Proof.prototype.
|
|
634
|
+
proto.org.dash.platform.dapi.v0.Proof.prototype.getQuorumHash = function() {
|
|
627
635
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
|
628
636
|
};
|
|
629
637
|
|
|
630
638
|
|
|
631
639
|
/**
|
|
632
|
-
* optional bytes
|
|
633
|
-
* This is a type-conversion wrapper around `
|
|
640
|
+
* optional bytes quorum_hash = 2;
|
|
641
|
+
* This is a type-conversion wrapper around `getQuorumHash()`
|
|
634
642
|
* @return {string}
|
|
635
643
|
*/
|
|
636
|
-
proto.org.dash.platform.dapi.v0.Proof.prototype.
|
|
644
|
+
proto.org.dash.platform.dapi.v0.Proof.prototype.getQuorumHash_asB64 = function() {
|
|
637
645
|
return /** @type {string} */ (jspb.Message.bytesAsB64(
|
|
638
|
-
this.
|
|
646
|
+
this.getQuorumHash()));
|
|
639
647
|
};
|
|
640
648
|
|
|
641
649
|
|
|
642
650
|
/**
|
|
643
|
-
* optional bytes
|
|
651
|
+
* optional bytes quorum_hash = 2;
|
|
644
652
|
* Note that Uint8Array is not supported on all browsers.
|
|
645
653
|
* @see http://caniuse.com/Uint8Array
|
|
646
|
-
* This is a type-conversion wrapper around `
|
|
654
|
+
* This is a type-conversion wrapper around `getQuorumHash()`
|
|
647
655
|
* @return {!Uint8Array}
|
|
648
656
|
*/
|
|
649
|
-
proto.org.dash.platform.dapi.v0.Proof.prototype.
|
|
657
|
+
proto.org.dash.platform.dapi.v0.Proof.prototype.getQuorumHash_asU8 = function() {
|
|
650
658
|
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
|
|
651
|
-
this.
|
|
659
|
+
this.getQuorumHash()));
|
|
652
660
|
};
|
|
653
661
|
|
|
654
662
|
|
|
@@ -656,7 +664,7 @@ proto.org.dash.platform.dapi.v0.Proof.prototype.getSignatureLlmqHash_asU8 = func
|
|
|
656
664
|
* @param {!(string|Uint8Array)} value
|
|
657
665
|
* @return {!proto.org.dash.platform.dapi.v0.Proof} returns this
|
|
658
666
|
*/
|
|
659
|
-
proto.org.dash.platform.dapi.v0.Proof.prototype.
|
|
667
|
+
proto.org.dash.platform.dapi.v0.Proof.prototype.setQuorumHash = function(value) {
|
|
660
668
|
return jspb.Message.setProto3BytesField(this, 2, value);
|
|
661
669
|
};
|
|
662
670
|
|
|
@@ -703,6 +711,24 @@ proto.org.dash.platform.dapi.v0.Proof.prototype.setSignature = function(value) {
|
|
|
703
711
|
};
|
|
704
712
|
|
|
705
713
|
|
|
714
|
+
/**
|
|
715
|
+
* optional uint32 round = 4;
|
|
716
|
+
* @return {number}
|
|
717
|
+
*/
|
|
718
|
+
proto.org.dash.platform.dapi.v0.Proof.prototype.getRound = function() {
|
|
719
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
|
|
720
|
+
};
|
|
721
|
+
|
|
722
|
+
|
|
723
|
+
/**
|
|
724
|
+
* @param {number} value
|
|
725
|
+
* @return {!proto.org.dash.platform.dapi.v0.Proof} returns this
|
|
726
|
+
*/
|
|
727
|
+
proto.org.dash.platform.dapi.v0.Proof.prototype.setRound = function(value) {
|
|
728
|
+
return jspb.Message.setProto3IntField(this, 4, value);
|
|
729
|
+
};
|
|
730
|
+
|
|
731
|
+
|
|
706
732
|
|
|
707
733
|
|
|
708
734
|
|
|
@@ -736,7 +762,9 @@ proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.toObject = function(o
|
|
|
736
762
|
proto.org.dash.platform.dapi.v0.ResponseMetadata.toObject = function(includeInstance, msg) {
|
|
737
763
|
var f, obj = {
|
|
738
764
|
height: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
|
739
|
-
coreChainLockedHeight: jspb.Message.getFieldWithDefault(msg, 2, 0)
|
|
765
|
+
coreChainLockedHeight: jspb.Message.getFieldWithDefault(msg, 2, 0),
|
|
766
|
+
timeMs: jspb.Message.getFieldWithDefault(msg, 3, 0),
|
|
767
|
+
protocolVersion: jspb.Message.getFieldWithDefault(msg, 4, 0)
|
|
740
768
|
};
|
|
741
769
|
|
|
742
770
|
if (includeInstance) {
|
|
@@ -781,6 +809,14 @@ proto.org.dash.platform.dapi.v0.ResponseMetadata.deserializeBinaryFromReader = f
|
|
|
781
809
|
var value = /** @type {number} */ (reader.readUint32());
|
|
782
810
|
msg.setCoreChainLockedHeight(value);
|
|
783
811
|
break;
|
|
812
|
+
case 3:
|
|
813
|
+
var value = /** @type {number} */ (reader.readUint64());
|
|
814
|
+
msg.setTimeMs(value);
|
|
815
|
+
break;
|
|
816
|
+
case 4:
|
|
817
|
+
var value = /** @type {number} */ (reader.readUint32());
|
|
818
|
+
msg.setProtocolVersion(value);
|
|
819
|
+
break;
|
|
784
820
|
default:
|
|
785
821
|
reader.skipField();
|
|
786
822
|
break;
|
|
@@ -824,6 +860,20 @@ proto.org.dash.platform.dapi.v0.ResponseMetadata.serializeBinaryToWriter = funct
|
|
|
824
860
|
f
|
|
825
861
|
);
|
|
826
862
|
}
|
|
863
|
+
f = message.getTimeMs();
|
|
864
|
+
if (f !== 0) {
|
|
865
|
+
writer.writeUint64(
|
|
866
|
+
3,
|
|
867
|
+
f
|
|
868
|
+
);
|
|
869
|
+
}
|
|
870
|
+
f = message.getProtocolVersion();
|
|
871
|
+
if (f !== 0) {
|
|
872
|
+
writer.writeUint32(
|
|
873
|
+
4,
|
|
874
|
+
f
|
|
875
|
+
);
|
|
876
|
+
}
|
|
827
877
|
};
|
|
828
878
|
|
|
829
879
|
|
|
@@ -863,6 +913,42 @@ proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.setCoreChainLockedHei
|
|
|
863
913
|
};
|
|
864
914
|
|
|
865
915
|
|
|
916
|
+
/**
|
|
917
|
+
* optional uint64 time_ms = 3;
|
|
918
|
+
* @return {number}
|
|
919
|
+
*/
|
|
920
|
+
proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.getTimeMs = function() {
|
|
921
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
|
|
922
|
+
};
|
|
923
|
+
|
|
924
|
+
|
|
925
|
+
/**
|
|
926
|
+
* @param {number} value
|
|
927
|
+
* @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} returns this
|
|
928
|
+
*/
|
|
929
|
+
proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.setTimeMs = function(value) {
|
|
930
|
+
return jspb.Message.setProto3IntField(this, 3, value);
|
|
931
|
+
};
|
|
932
|
+
|
|
933
|
+
|
|
934
|
+
/**
|
|
935
|
+
* optional uint32 protocol_version = 4;
|
|
936
|
+
* @return {number}
|
|
937
|
+
*/
|
|
938
|
+
proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.getProtocolVersion = function() {
|
|
939
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
|
|
940
|
+
};
|
|
941
|
+
|
|
942
|
+
|
|
943
|
+
/**
|
|
944
|
+
* @param {number} value
|
|
945
|
+
* @return {!proto.org.dash.platform.dapi.v0.ResponseMetadata} returns this
|
|
946
|
+
*/
|
|
947
|
+
proto.org.dash.platform.dapi.v0.ResponseMetadata.prototype.setProtocolVersion = function(value) {
|
|
948
|
+
return jspb.Message.setProto3IntField(this, 4, value);
|
|
949
|
+
};
|
|
950
|
+
|
|
951
|
+
|
|
866
952
|
|
|
867
953
|
|
|
868
954
|
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
const { PlatformClient } = require('./platform_pb_service');
|
|
2
|
+
const { promisify } = require('util');
|
|
3
|
+
|
|
4
|
+
class PlatformPromiseClient {
|
|
5
|
+
/**
|
|
6
|
+
* @param {string} hostname
|
|
7
|
+
* @param {?Object} credentials
|
|
8
|
+
* @param {?Object} options
|
|
9
|
+
*/
|
|
10
|
+
constructor(hostname, credentials , options = {}) {
|
|
11
|
+
this.client = new PlatformClient(hostname, options)
|
|
12
|
+
|
|
13
|
+
this.protocolVersion = undefined;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @param {!BroadcastStateTransitionRequest} broadcastStateTransitionRequest
|
|
18
|
+
* @param {?Object<string, string>} metadata
|
|
19
|
+
* @return {Promise<!BroadcastStateTransitionResponse>}
|
|
20
|
+
*/
|
|
21
|
+
broadcastStateTransition(broadcastStateTransitionRequest, metadata = {}) {
|
|
22
|
+
return promisify(
|
|
23
|
+
this.client.broadcastStateTransition.bind(this.client),
|
|
24
|
+
)(
|
|
25
|
+
broadcastStateTransitionRequest,
|
|
26
|
+
metadata,
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @param {!GetIdentityRequest} getIdentityRequest
|
|
32
|
+
* @param {?Object<string, string>} metadata
|
|
33
|
+
* @return {Promise<!GetIdentityResponse>}
|
|
34
|
+
*/
|
|
35
|
+
getIdentity(getIdentityRequest, metadata = {}) {
|
|
36
|
+
return promisify(
|
|
37
|
+
this.client.getIdentity.bind(this.client),
|
|
38
|
+
)(
|
|
39
|
+
getIdentityRequest,
|
|
40
|
+
metadata,
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @param {!GetDataContractRequest} getDataContractRequest
|
|
47
|
+
* @param {?Object<string, string>} metadata
|
|
48
|
+
* @returns {Promise<!GetDataContractResponse>}
|
|
49
|
+
*/
|
|
50
|
+
getDataContract(getDataContractRequest, metadata = {}) {
|
|
51
|
+
return promisify(
|
|
52
|
+
this.client.getDataContract.bind(this.client),
|
|
53
|
+
)(
|
|
54
|
+
getDataContractRequest,
|
|
55
|
+
metadata,
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
* @param {!GetDocumentsRequest} getDocumentsRequest
|
|
62
|
+
* @param {?Object<string, string>} metadata
|
|
63
|
+
* @returns {Promise<!GetDocumentsResponse>}
|
|
64
|
+
*/
|
|
65
|
+
getDocuments(getDocumentsRequest, metadata = {}) {
|
|
66
|
+
return promisify(
|
|
67
|
+
this.client.getDocuments.bind(this.client),
|
|
68
|
+
)(
|
|
69
|
+
getDocumentsRequest,
|
|
70
|
+
metadata,
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* @param {!GetIdentitiesByPublicKeyHashesRequest} getIdentitiesByPublicKeyHashesRequest
|
|
76
|
+
* @param {?Object<string, string>} metadata
|
|
77
|
+
* @returns {Promise<!GetIdentitiesByPublicKeyHashesResponse>}
|
|
78
|
+
*/
|
|
79
|
+
getIdentitiesByPublicKeyHashes(
|
|
80
|
+
getIdentitiesByPublicKeyHashesRequest, metadata = {}
|
|
81
|
+
) {
|
|
82
|
+
return promisify(
|
|
83
|
+
this.client.getIdentitiesByPublicKeyHashes.bind(this.client),
|
|
84
|
+
)(
|
|
85
|
+
getIdentitiesByPublicKeyHashesRequest,
|
|
86
|
+
metadata,
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* @param {!WaitForStateTransitionResultRequest} waitForStateTransitionResultRequest
|
|
92
|
+
* @param {?Object<string, string>} metadata
|
|
93
|
+
* @returns {Promise<!WaitForStateTransitionResultResponse>}
|
|
94
|
+
*/
|
|
95
|
+
waitForStateTransitionResult(
|
|
96
|
+
waitForStateTransitionResultRequest, metadata = {}
|
|
97
|
+
) {
|
|
98
|
+
return promisify(
|
|
99
|
+
this.client.waitForStateTransitionResult.bind(this.client),
|
|
100
|
+
)(
|
|
101
|
+
waitForStateTransitionResultRequest,
|
|
102
|
+
metadata,
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* @param {!GetConsensusParamsRequest} getConsensusParamsRequest
|
|
108
|
+
* @param {?Object<string, string>} metadata
|
|
109
|
+
* @returns {Promise<!GetConsensusParamsResponse>}
|
|
110
|
+
*/
|
|
111
|
+
getConsensusParams(
|
|
112
|
+
getConsensusParamsRequest, metadata = {}
|
|
113
|
+
) {
|
|
114
|
+
return promisify(
|
|
115
|
+
this.client.getConsensusParams.bind(this.client),
|
|
116
|
+
)(
|
|
117
|
+
getConsensusParamsRequest,
|
|
118
|
+
metadata,
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* @param {string} protocolVersion
|
|
124
|
+
*/
|
|
125
|
+
setProtocolVersion(protocolVersion) {
|
|
126
|
+
this.setProtocolVersion = protocolVersion;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
module.exports = PlatformPromiseClient;
|