@dashevo/dapi-grpc 5.0.2 → 5.1.0-dev.1

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.
@@ -292,6 +292,15 @@ type PlatformwaitForStateTransitionResult = {
292
292
  readonly responseType: typeof platform_pb.WaitForStateTransitionResultResponse;
293
293
  };
294
294
 
295
+ type PlatformgetRecentStateTransitionStatus = {
296
+ readonly methodName: string;
297
+ readonly service: typeof Platform;
298
+ readonly requestStream: false;
299
+ readonly responseStream: false;
300
+ readonly requestType: typeof platform_pb.GetRecentStateTransitionStatusRequest;
301
+ readonly responseType: typeof platform_pb.GetRecentStateTransitionStatusResponse;
302
+ };
303
+
295
304
  type PlatformgetConsensusParams = {
296
305
  readonly methodName: string;
297
306
  readonly service: typeof Platform;
@@ -382,6 +391,24 @@ type PlatformgetVotePollsByEndDate = {
382
391
  readonly responseType: typeof platform_pb.GetVotePollsByEndDateResponse;
383
392
  };
384
393
 
394
+ type PlatformgetYesNoVotePollState = {
395
+ readonly methodName: string;
396
+ readonly service: typeof Platform;
397
+ readonly requestStream: false;
398
+ readonly responseStream: false;
399
+ readonly requestType: typeof platform_pb.GetYesNoVotePollStateRequest;
400
+ readonly responseType: typeof platform_pb.GetYesNoVotePollStateResponse;
401
+ };
402
+
403
+ type PlatformgetMasternodeYesNoVote = {
404
+ readonly methodName: string;
405
+ readonly service: typeof Platform;
406
+ readonly requestStream: false;
407
+ readonly responseStream: false;
408
+ readonly requestType: typeof platform_pb.GetMasternodeYesNoVoteRequest;
409
+ readonly responseType: typeof platform_pb.GetMasternodeYesNoVoteResponse;
410
+ };
411
+
385
412
  type PlatformgetPrefundedSpecializedBalance = {
386
413
  readonly methodName: string;
387
414
  readonly service: typeof Platform;
@@ -661,6 +688,33 @@ type PlatformgetShieldedNullifiers = {
661
688
  readonly responseType: typeof platform_pb.GetShieldedNullifiersResponse;
662
689
  };
663
690
 
691
+ type PlatformgetPrivateDocumentEntries = {
692
+ readonly methodName: string;
693
+ readonly service: typeof Platform;
694
+ readonly requestStream: false;
695
+ readonly responseStream: false;
696
+ readonly requestType: typeof platform_pb.GetPrivateDocumentEntriesRequest;
697
+ readonly responseType: typeof platform_pb.GetPrivateDocumentEntriesResponse;
698
+ };
699
+
700
+ type PlatformgetOwnerTransactionsInBlock = {
701
+ readonly methodName: string;
702
+ readonly service: typeof Platform;
703
+ readonly requestStream: false;
704
+ readonly responseStream: false;
705
+ readonly requestType: typeof platform_pb.GetOwnerTransactionsInBlockRequest;
706
+ readonly responseType: typeof platform_pb.GetOwnerTransactionsInBlockResponse;
707
+ };
708
+
709
+ type PlatformgetBlocks = {
710
+ readonly methodName: string;
711
+ readonly service: typeof Platform;
712
+ readonly requestStream: false;
713
+ readonly responseStream: false;
714
+ readonly requestType: typeof platform_pb.GetBlocksRequest;
715
+ readonly responseType: typeof platform_pb.GetBlocksResponse;
716
+ };
717
+
664
718
  export class Platform {
665
719
  static readonly serviceName: string;
666
720
  static readonly broadcastStateTransition: PlatformbroadcastStateTransition;
@@ -695,6 +749,7 @@ export class Platform {
695
749
  static readonly getIdentityByPublicKeyHash: PlatformgetIdentityByPublicKeyHash;
696
750
  static readonly getIdentityByNonUniquePublicKeyHash: PlatformgetIdentityByNonUniquePublicKeyHash;
697
751
  static readonly waitForStateTransitionResult: PlatformwaitForStateTransitionResult;
752
+ static readonly getRecentStateTransitionStatus: PlatformgetRecentStateTransitionStatus;
698
753
  static readonly getConsensusParams: PlatformgetConsensusParams;
699
754
  static readonly getProtocolVersionUpgradeState: PlatformgetProtocolVersionUpgradeState;
700
755
  static readonly getProtocolVersionUpgradeVoteStatus: PlatformgetProtocolVersionUpgradeVoteStatus;
@@ -705,6 +760,8 @@ export class Platform {
705
760
  static readonly getContestedResourceVotersForIdentity: PlatformgetContestedResourceVotersForIdentity;
706
761
  static readonly getContestedResourceIdentityVotes: PlatformgetContestedResourceIdentityVotes;
707
762
  static readonly getVotePollsByEndDate: PlatformgetVotePollsByEndDate;
763
+ static readonly getYesNoVotePollState: PlatformgetYesNoVotePollState;
764
+ static readonly getMasternodeYesNoVote: PlatformgetMasternodeYesNoVote;
708
765
  static readonly getPrefundedSpecializedBalance: PlatformgetPrefundedSpecializedBalance;
709
766
  static readonly getTotalCreditsInPlatform: PlatformgetTotalCreditsInPlatform;
710
767
  static readonly getPathElements: PlatformgetPathElements;
@@ -736,6 +793,9 @@ export class Platform {
736
793
  static readonly getShieldedPoolState: PlatformgetShieldedPoolState;
737
794
  static readonly getShieldedNotesCount: PlatformgetShieldedNotesCount;
738
795
  static readonly getShieldedNullifiers: PlatformgetShieldedNullifiers;
796
+ static readonly getPrivateDocumentEntries: PlatformgetPrivateDocumentEntries;
797
+ static readonly getOwnerTransactionsInBlock: PlatformgetOwnerTransactionsInBlock;
798
+ static readonly getBlocks: PlatformgetBlocks;
739
799
  }
740
800
 
741
801
  export type ServiceError = { message: string, code: number; metadata: grpc.Metadata }
@@ -1058,6 +1118,15 @@ export class PlatformClient {
1058
1118
  requestMessage: platform_pb.WaitForStateTransitionResultRequest,
1059
1119
  callback: (error: ServiceError|null, responseMessage: platform_pb.WaitForStateTransitionResultResponse|null) => void
1060
1120
  ): UnaryResponse;
1121
+ getRecentStateTransitionStatus(
1122
+ requestMessage: platform_pb.GetRecentStateTransitionStatusRequest,
1123
+ metadata: grpc.Metadata,
1124
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetRecentStateTransitionStatusResponse|null) => void
1125
+ ): UnaryResponse;
1126
+ getRecentStateTransitionStatus(
1127
+ requestMessage: platform_pb.GetRecentStateTransitionStatusRequest,
1128
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetRecentStateTransitionStatusResponse|null) => void
1129
+ ): UnaryResponse;
1061
1130
  getConsensusParams(
1062
1131
  requestMessage: platform_pb.GetConsensusParamsRequest,
1063
1132
  metadata: grpc.Metadata,
@@ -1148,6 +1217,24 @@ export class PlatformClient {
1148
1217
  requestMessage: platform_pb.GetVotePollsByEndDateRequest,
1149
1218
  callback: (error: ServiceError|null, responseMessage: platform_pb.GetVotePollsByEndDateResponse|null) => void
1150
1219
  ): UnaryResponse;
1220
+ getYesNoVotePollState(
1221
+ requestMessage: platform_pb.GetYesNoVotePollStateRequest,
1222
+ metadata: grpc.Metadata,
1223
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetYesNoVotePollStateResponse|null) => void
1224
+ ): UnaryResponse;
1225
+ getYesNoVotePollState(
1226
+ requestMessage: platform_pb.GetYesNoVotePollStateRequest,
1227
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetYesNoVotePollStateResponse|null) => void
1228
+ ): UnaryResponse;
1229
+ getMasternodeYesNoVote(
1230
+ requestMessage: platform_pb.GetMasternodeYesNoVoteRequest,
1231
+ metadata: grpc.Metadata,
1232
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetMasternodeYesNoVoteResponse|null) => void
1233
+ ): UnaryResponse;
1234
+ getMasternodeYesNoVote(
1235
+ requestMessage: platform_pb.GetMasternodeYesNoVoteRequest,
1236
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetMasternodeYesNoVoteResponse|null) => void
1237
+ ): UnaryResponse;
1151
1238
  getPrefundedSpecializedBalance(
1152
1239
  requestMessage: platform_pb.GetPrefundedSpecializedBalanceRequest,
1153
1240
  metadata: grpc.Metadata,
@@ -1427,5 +1514,32 @@ export class PlatformClient {
1427
1514
  requestMessage: platform_pb.GetShieldedNullifiersRequest,
1428
1515
  callback: (error: ServiceError|null, responseMessage: platform_pb.GetShieldedNullifiersResponse|null) => void
1429
1516
  ): UnaryResponse;
1517
+ getPrivateDocumentEntries(
1518
+ requestMessage: platform_pb.GetPrivateDocumentEntriesRequest,
1519
+ metadata: grpc.Metadata,
1520
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetPrivateDocumentEntriesResponse|null) => void
1521
+ ): UnaryResponse;
1522
+ getPrivateDocumentEntries(
1523
+ requestMessage: platform_pb.GetPrivateDocumentEntriesRequest,
1524
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetPrivateDocumentEntriesResponse|null) => void
1525
+ ): UnaryResponse;
1526
+ getOwnerTransactionsInBlock(
1527
+ requestMessage: platform_pb.GetOwnerTransactionsInBlockRequest,
1528
+ metadata: grpc.Metadata,
1529
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetOwnerTransactionsInBlockResponse|null) => void
1530
+ ): UnaryResponse;
1531
+ getOwnerTransactionsInBlock(
1532
+ requestMessage: platform_pb.GetOwnerTransactionsInBlockRequest,
1533
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetOwnerTransactionsInBlockResponse|null) => void
1534
+ ): UnaryResponse;
1535
+ getBlocks(
1536
+ requestMessage: platform_pb.GetBlocksRequest,
1537
+ metadata: grpc.Metadata,
1538
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetBlocksResponse|null) => void
1539
+ ): UnaryResponse;
1540
+ getBlocks(
1541
+ requestMessage: platform_pb.GetBlocksRequest,
1542
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetBlocksResponse|null) => void
1543
+ ): UnaryResponse;
1430
1544
  }
1431
1545
 
@@ -298,6 +298,15 @@ Platform.waitForStateTransitionResult = {
298
298
  responseType: platform_pb.WaitForStateTransitionResultResponse
299
299
  };
300
300
 
301
+ Platform.getRecentStateTransitionStatus = {
302
+ methodName: "getRecentStateTransitionStatus",
303
+ service: Platform,
304
+ requestStream: false,
305
+ responseStream: false,
306
+ requestType: platform_pb.GetRecentStateTransitionStatusRequest,
307
+ responseType: platform_pb.GetRecentStateTransitionStatusResponse
308
+ };
309
+
301
310
  Platform.getConsensusParams = {
302
311
  methodName: "getConsensusParams",
303
312
  service: Platform,
@@ -388,6 +397,24 @@ Platform.getVotePollsByEndDate = {
388
397
  responseType: platform_pb.GetVotePollsByEndDateResponse
389
398
  };
390
399
 
400
+ Platform.getYesNoVotePollState = {
401
+ methodName: "getYesNoVotePollState",
402
+ service: Platform,
403
+ requestStream: false,
404
+ responseStream: false,
405
+ requestType: platform_pb.GetYesNoVotePollStateRequest,
406
+ responseType: platform_pb.GetYesNoVotePollStateResponse
407
+ };
408
+
409
+ Platform.getMasternodeYesNoVote = {
410
+ methodName: "getMasternodeYesNoVote",
411
+ service: Platform,
412
+ requestStream: false,
413
+ responseStream: false,
414
+ requestType: platform_pb.GetMasternodeYesNoVoteRequest,
415
+ responseType: platform_pb.GetMasternodeYesNoVoteResponse
416
+ };
417
+
391
418
  Platform.getPrefundedSpecializedBalance = {
392
419
  methodName: "getPrefundedSpecializedBalance",
393
420
  service: Platform,
@@ -667,6 +694,33 @@ Platform.getShieldedNullifiers = {
667
694
  responseType: platform_pb.GetShieldedNullifiersResponse
668
695
  };
669
696
 
697
+ Platform.getPrivateDocumentEntries = {
698
+ methodName: "getPrivateDocumentEntries",
699
+ service: Platform,
700
+ requestStream: false,
701
+ responseStream: false,
702
+ requestType: platform_pb.GetPrivateDocumentEntriesRequest,
703
+ responseType: platform_pb.GetPrivateDocumentEntriesResponse
704
+ };
705
+
706
+ Platform.getOwnerTransactionsInBlock = {
707
+ methodName: "getOwnerTransactionsInBlock",
708
+ service: Platform,
709
+ requestStream: false,
710
+ responseStream: false,
711
+ requestType: platform_pb.GetOwnerTransactionsInBlockRequest,
712
+ responseType: platform_pb.GetOwnerTransactionsInBlockResponse
713
+ };
714
+
715
+ Platform.getBlocks = {
716
+ methodName: "getBlocks",
717
+ service: Platform,
718
+ requestStream: false,
719
+ responseStream: false,
720
+ requestType: platform_pb.GetBlocksRequest,
721
+ responseType: platform_pb.GetBlocksResponse
722
+ };
723
+
670
724
  exports.Platform = Platform;
671
725
 
672
726
  function PlatformClient(serviceHost, options) {
@@ -1666,6 +1720,37 @@ PlatformClient.prototype.waitForStateTransitionResult = function waitForStateTra
1666
1720
  };
1667
1721
  };
1668
1722
 
1723
+ PlatformClient.prototype.getRecentStateTransitionStatus = function getRecentStateTransitionStatus(requestMessage, metadata, callback) {
1724
+ if (arguments.length === 2) {
1725
+ callback = arguments[1];
1726
+ }
1727
+ var client = grpc.unary(Platform.getRecentStateTransitionStatus, {
1728
+ request: requestMessage,
1729
+ host: this.serviceHost,
1730
+ metadata: metadata,
1731
+ transport: this.options.transport,
1732
+ debug: this.options.debug,
1733
+ onEnd: function (response) {
1734
+ if (callback) {
1735
+ if (response.status !== grpc.Code.OK) {
1736
+ var err = new Error(response.statusMessage);
1737
+ err.code = response.status;
1738
+ err.metadata = response.trailers;
1739
+ callback(err, null);
1740
+ } else {
1741
+ callback(null, response.message);
1742
+ }
1743
+ }
1744
+ }
1745
+ });
1746
+ return {
1747
+ cancel: function () {
1748
+ callback = null;
1749
+ client.close();
1750
+ }
1751
+ };
1752
+ };
1753
+
1669
1754
  PlatformClient.prototype.getConsensusParams = function getConsensusParams(requestMessage, metadata, callback) {
1670
1755
  if (arguments.length === 2) {
1671
1756
  callback = arguments[1];
@@ -1976,6 +2061,68 @@ PlatformClient.prototype.getVotePollsByEndDate = function getVotePollsByEndDate(
1976
2061
  };
1977
2062
  };
1978
2063
 
2064
+ PlatformClient.prototype.getYesNoVotePollState = function getYesNoVotePollState(requestMessage, metadata, callback) {
2065
+ if (arguments.length === 2) {
2066
+ callback = arguments[1];
2067
+ }
2068
+ var client = grpc.unary(Platform.getYesNoVotePollState, {
2069
+ request: requestMessage,
2070
+ host: this.serviceHost,
2071
+ metadata: metadata,
2072
+ transport: this.options.transport,
2073
+ debug: this.options.debug,
2074
+ onEnd: function (response) {
2075
+ if (callback) {
2076
+ if (response.status !== grpc.Code.OK) {
2077
+ var err = new Error(response.statusMessage);
2078
+ err.code = response.status;
2079
+ err.metadata = response.trailers;
2080
+ callback(err, null);
2081
+ } else {
2082
+ callback(null, response.message);
2083
+ }
2084
+ }
2085
+ }
2086
+ });
2087
+ return {
2088
+ cancel: function () {
2089
+ callback = null;
2090
+ client.close();
2091
+ }
2092
+ };
2093
+ };
2094
+
2095
+ PlatformClient.prototype.getMasternodeYesNoVote = function getMasternodeYesNoVote(requestMessage, metadata, callback) {
2096
+ if (arguments.length === 2) {
2097
+ callback = arguments[1];
2098
+ }
2099
+ var client = grpc.unary(Platform.getMasternodeYesNoVote, {
2100
+ request: requestMessage,
2101
+ host: this.serviceHost,
2102
+ metadata: metadata,
2103
+ transport: this.options.transport,
2104
+ debug: this.options.debug,
2105
+ onEnd: function (response) {
2106
+ if (callback) {
2107
+ if (response.status !== grpc.Code.OK) {
2108
+ var err = new Error(response.statusMessage);
2109
+ err.code = response.status;
2110
+ err.metadata = response.trailers;
2111
+ callback(err, null);
2112
+ } else {
2113
+ callback(null, response.message);
2114
+ }
2115
+ }
2116
+ }
2117
+ });
2118
+ return {
2119
+ cancel: function () {
2120
+ callback = null;
2121
+ client.close();
2122
+ }
2123
+ };
2124
+ };
2125
+
1979
2126
  PlatformClient.prototype.getPrefundedSpecializedBalance = function getPrefundedSpecializedBalance(requestMessage, metadata, callback) {
1980
2127
  if (arguments.length === 2) {
1981
2128
  callback = arguments[1];
@@ -2937,5 +3084,98 @@ PlatformClient.prototype.getShieldedNullifiers = function getShieldedNullifiers(
2937
3084
  };
2938
3085
  };
2939
3086
 
3087
+ PlatformClient.prototype.getPrivateDocumentEntries = function getPrivateDocumentEntries(requestMessage, metadata, callback) {
3088
+ if (arguments.length === 2) {
3089
+ callback = arguments[1];
3090
+ }
3091
+ var client = grpc.unary(Platform.getPrivateDocumentEntries, {
3092
+ request: requestMessage,
3093
+ host: this.serviceHost,
3094
+ metadata: metadata,
3095
+ transport: this.options.transport,
3096
+ debug: this.options.debug,
3097
+ onEnd: function (response) {
3098
+ if (callback) {
3099
+ if (response.status !== grpc.Code.OK) {
3100
+ var err = new Error(response.statusMessage);
3101
+ err.code = response.status;
3102
+ err.metadata = response.trailers;
3103
+ callback(err, null);
3104
+ } else {
3105
+ callback(null, response.message);
3106
+ }
3107
+ }
3108
+ }
3109
+ });
3110
+ return {
3111
+ cancel: function () {
3112
+ callback = null;
3113
+ client.close();
3114
+ }
3115
+ };
3116
+ };
3117
+
3118
+ PlatformClient.prototype.getOwnerTransactionsInBlock = function getOwnerTransactionsInBlock(requestMessage, metadata, callback) {
3119
+ if (arguments.length === 2) {
3120
+ callback = arguments[1];
3121
+ }
3122
+ var client = grpc.unary(Platform.getOwnerTransactionsInBlock, {
3123
+ request: requestMessage,
3124
+ host: this.serviceHost,
3125
+ metadata: metadata,
3126
+ transport: this.options.transport,
3127
+ debug: this.options.debug,
3128
+ onEnd: function (response) {
3129
+ if (callback) {
3130
+ if (response.status !== grpc.Code.OK) {
3131
+ var err = new Error(response.statusMessage);
3132
+ err.code = response.status;
3133
+ err.metadata = response.trailers;
3134
+ callback(err, null);
3135
+ } else {
3136
+ callback(null, response.message);
3137
+ }
3138
+ }
3139
+ }
3140
+ });
3141
+ return {
3142
+ cancel: function () {
3143
+ callback = null;
3144
+ client.close();
3145
+ }
3146
+ };
3147
+ };
3148
+
3149
+ PlatformClient.prototype.getBlocks = function getBlocks(requestMessage, metadata, callback) {
3150
+ if (arguments.length === 2) {
3151
+ callback = arguments[1];
3152
+ }
3153
+ var client = grpc.unary(Platform.getBlocks, {
3154
+ request: requestMessage,
3155
+ host: this.serviceHost,
3156
+ metadata: metadata,
3157
+ transport: this.options.transport,
3158
+ debug: this.options.debug,
3159
+ onEnd: function (response) {
3160
+ if (callback) {
3161
+ if (response.status !== grpc.Code.OK) {
3162
+ var err = new Error(response.statusMessage);
3163
+ err.code = response.status;
3164
+ err.metadata = response.trailers;
3165
+ callback(err, null);
3166
+ } else {
3167
+ callback(null, response.message);
3168
+ }
3169
+ }
3170
+ }
3171
+ });
3172
+ return {
3173
+ cancel: function () {
3174
+ callback = null;
3175
+ client.close();
3176
+ }
3177
+ };
3178
+ };
3179
+
2940
3180
  exports.PlatformClient = PlatformClient;
2941
3181
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dashevo/dapi-grpc",
3
- "version": "5.0.2",
3
+ "version": "5.1.0-dev.1",
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": "5.0.2",
48
+ "@dashevo/grpc-common": "5.1.0-dev.1",
49
49
  "@dashevo/protobufjs": "6.10.5",
50
50
  "@grpc/grpc-js": "^1.14.5",
51
51
  "@improbable-eng/grpc-web": "^0.15.0",