@dashevo/dapi-grpc 0.25.8 → 0.25.10

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.
@@ -45,7 +45,7 @@ type PlatformgetIdentityBalance = {
45
45
  readonly service: typeof Platform;
46
46
  readonly requestStream: false;
47
47
  readonly responseStream: false;
48
- readonly requestType: typeof platform_pb.GetIdentityRequest;
48
+ readonly requestType: typeof platform_pb.GetIdentityBalanceRequest;
49
49
  readonly responseType: typeof platform_pb.GetIdentityBalanceResponse;
50
50
  };
51
51
 
@@ -54,7 +54,7 @@ type PlatformgetIdentityBalanceAndRevision = {
54
54
  readonly service: typeof Platform;
55
55
  readonly requestStream: false;
56
56
  readonly responseStream: false;
57
- readonly requestType: typeof platform_pb.GetIdentityRequest;
57
+ readonly requestType: typeof platform_pb.GetIdentityBalanceAndRevisionRequest;
58
58
  readonly responseType: typeof platform_pb.GetIdentityBalanceAndRevisionResponse;
59
59
  };
60
60
 
@@ -112,13 +112,13 @@ type PlatformgetIdentitiesByPublicKeyHashes = {
112
112
  readonly responseType: typeof platform_pb.GetIdentitiesByPublicKeyHashesResponse;
113
113
  };
114
114
 
115
- type PlatformgetIdentityByPublicKeyHashes = {
115
+ type PlatformgetIdentityByPublicKeyHash = {
116
116
  readonly methodName: string;
117
117
  readonly service: typeof Platform;
118
118
  readonly requestStream: false;
119
119
  readonly responseStream: false;
120
- readonly requestType: typeof platform_pb.GetIdentityByPublicKeyHashesRequest;
121
- readonly responseType: typeof platform_pb.GetIdentityByPublicKeyHashesResponse;
120
+ readonly requestType: typeof platform_pb.GetIdentityByPublicKeyHashRequest;
121
+ readonly responseType: typeof platform_pb.GetIdentityByPublicKeyHashResponse;
122
122
  };
123
123
 
124
124
  type PlatformwaitForStateTransitionResult = {
@@ -139,6 +139,33 @@ type PlatformgetConsensusParams = {
139
139
  readonly responseType: typeof platform_pb.GetConsensusParamsResponse;
140
140
  };
141
141
 
142
+ type PlatformgetVersionUpgradeState = {
143
+ readonly methodName: string;
144
+ readonly service: typeof Platform;
145
+ readonly requestStream: false;
146
+ readonly responseStream: false;
147
+ readonly requestType: typeof platform_pb.GetVersionUpgradeStateRequest;
148
+ readonly responseType: typeof platform_pb.GetVersionUpgradeStateResponse;
149
+ };
150
+
151
+ type PlatformgetVersionUpgradeVoteStatus = {
152
+ readonly methodName: string;
153
+ readonly service: typeof Platform;
154
+ readonly requestStream: false;
155
+ readonly responseStream: false;
156
+ readonly requestType: typeof platform_pb.GetVersionUpgradeVoteStatusRequest;
157
+ readonly responseType: typeof platform_pb.GetVersionUpgradeVoteStatusResponse;
158
+ };
159
+
160
+ type PlatformgetEpochsInfo = {
161
+ readonly methodName: string;
162
+ readonly service: typeof Platform;
163
+ readonly requestStream: false;
164
+ readonly responseStream: false;
165
+ readonly requestType: typeof platform_pb.GetEpochsInfoRequest;
166
+ readonly responseType: typeof platform_pb.GetEpochsInfoResponse;
167
+ };
168
+
142
169
  export class Platform {
143
170
  static readonly serviceName: string;
144
171
  static readonly broadcastStateTransition: PlatformbroadcastStateTransition;
@@ -153,9 +180,12 @@ export class Platform {
153
180
  static readonly getDataContracts: PlatformgetDataContracts;
154
181
  static readonly getDocuments: PlatformgetDocuments;
155
182
  static readonly getIdentitiesByPublicKeyHashes: PlatformgetIdentitiesByPublicKeyHashes;
156
- static readonly getIdentityByPublicKeyHashes: PlatformgetIdentityByPublicKeyHashes;
183
+ static readonly getIdentityByPublicKeyHash: PlatformgetIdentityByPublicKeyHash;
157
184
  static readonly waitForStateTransitionResult: PlatformwaitForStateTransitionResult;
158
185
  static readonly getConsensusParams: PlatformgetConsensusParams;
186
+ static readonly getVersionUpgradeState: PlatformgetVersionUpgradeState;
187
+ static readonly getVersionUpgradeVoteStatus: PlatformgetVersionUpgradeVoteStatus;
188
+ static readonly getEpochsInfo: PlatformgetEpochsInfo;
159
189
  }
160
190
 
161
191
  export type ServiceError = { message: string, code: number; metadata: grpc.Metadata }
@@ -227,21 +257,21 @@ export class PlatformClient {
227
257
  callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentityKeysResponse|null) => void
228
258
  ): UnaryResponse;
229
259
  getIdentityBalance(
230
- requestMessage: platform_pb.GetIdentityRequest,
260
+ requestMessage: platform_pb.GetIdentityBalanceRequest,
231
261
  metadata: grpc.Metadata,
232
262
  callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentityBalanceResponse|null) => void
233
263
  ): UnaryResponse;
234
264
  getIdentityBalance(
235
- requestMessage: platform_pb.GetIdentityRequest,
265
+ requestMessage: platform_pb.GetIdentityBalanceRequest,
236
266
  callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentityBalanceResponse|null) => void
237
267
  ): UnaryResponse;
238
268
  getIdentityBalanceAndRevision(
239
- requestMessage: platform_pb.GetIdentityRequest,
269
+ requestMessage: platform_pb.GetIdentityBalanceAndRevisionRequest,
240
270
  metadata: grpc.Metadata,
241
271
  callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentityBalanceAndRevisionResponse|null) => void
242
272
  ): UnaryResponse;
243
273
  getIdentityBalanceAndRevision(
244
- requestMessage: platform_pb.GetIdentityRequest,
274
+ requestMessage: platform_pb.GetIdentityBalanceAndRevisionRequest,
245
275
  callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentityBalanceAndRevisionResponse|null) => void
246
276
  ): UnaryResponse;
247
277
  getProofs(
@@ -298,14 +328,14 @@ export class PlatformClient {
298
328
  requestMessage: platform_pb.GetIdentitiesByPublicKeyHashesRequest,
299
329
  callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentitiesByPublicKeyHashesResponse|null) => void
300
330
  ): UnaryResponse;
301
- getIdentityByPublicKeyHashes(
302
- requestMessage: platform_pb.GetIdentityByPublicKeyHashesRequest,
331
+ getIdentityByPublicKeyHash(
332
+ requestMessage: platform_pb.GetIdentityByPublicKeyHashRequest,
303
333
  metadata: grpc.Metadata,
304
- callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentityByPublicKeyHashesResponse|null) => void
334
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentityByPublicKeyHashResponse|null) => void
305
335
  ): UnaryResponse;
306
- getIdentityByPublicKeyHashes(
307
- requestMessage: platform_pb.GetIdentityByPublicKeyHashesRequest,
308
- callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentityByPublicKeyHashesResponse|null) => void
336
+ getIdentityByPublicKeyHash(
337
+ requestMessage: platform_pb.GetIdentityByPublicKeyHashRequest,
338
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentityByPublicKeyHashResponse|null) => void
309
339
  ): UnaryResponse;
310
340
  waitForStateTransitionResult(
311
341
  requestMessage: platform_pb.WaitForStateTransitionResultRequest,
@@ -325,5 +355,32 @@ export class PlatformClient {
325
355
  requestMessage: platform_pb.GetConsensusParamsRequest,
326
356
  callback: (error: ServiceError|null, responseMessage: platform_pb.GetConsensusParamsResponse|null) => void
327
357
  ): UnaryResponse;
358
+ getVersionUpgradeState(
359
+ requestMessage: platform_pb.GetVersionUpgradeStateRequest,
360
+ metadata: grpc.Metadata,
361
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetVersionUpgradeStateResponse|null) => void
362
+ ): UnaryResponse;
363
+ getVersionUpgradeState(
364
+ requestMessage: platform_pb.GetVersionUpgradeStateRequest,
365
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetVersionUpgradeStateResponse|null) => void
366
+ ): UnaryResponse;
367
+ getVersionUpgradeVoteStatus(
368
+ requestMessage: platform_pb.GetVersionUpgradeVoteStatusRequest,
369
+ metadata: grpc.Metadata,
370
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetVersionUpgradeVoteStatusResponse|null) => void
371
+ ): UnaryResponse;
372
+ getVersionUpgradeVoteStatus(
373
+ requestMessage: platform_pb.GetVersionUpgradeVoteStatusRequest,
374
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetVersionUpgradeVoteStatusResponse|null) => void
375
+ ): UnaryResponse;
376
+ getEpochsInfo(
377
+ requestMessage: platform_pb.GetEpochsInfoRequest,
378
+ metadata: grpc.Metadata,
379
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetEpochsInfoResponse|null) => void
380
+ ): UnaryResponse;
381
+ getEpochsInfo(
382
+ requestMessage: platform_pb.GetEpochsInfoRequest,
383
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetEpochsInfoResponse|null) => void
384
+ ): UnaryResponse;
328
385
  }
329
386
 
@@ -51,7 +51,7 @@ Platform.getIdentityBalance = {
51
51
  service: Platform,
52
52
  requestStream: false,
53
53
  responseStream: false,
54
- requestType: platform_pb.GetIdentityRequest,
54
+ requestType: platform_pb.GetIdentityBalanceRequest,
55
55
  responseType: platform_pb.GetIdentityBalanceResponse
56
56
  };
57
57
 
@@ -60,7 +60,7 @@ Platform.getIdentityBalanceAndRevision = {
60
60
  service: Platform,
61
61
  requestStream: false,
62
62
  responseStream: false,
63
- requestType: platform_pb.GetIdentityRequest,
63
+ requestType: platform_pb.GetIdentityBalanceAndRevisionRequest,
64
64
  responseType: platform_pb.GetIdentityBalanceAndRevisionResponse
65
65
  };
66
66
 
@@ -118,13 +118,13 @@ Platform.getIdentitiesByPublicKeyHashes = {
118
118
  responseType: platform_pb.GetIdentitiesByPublicKeyHashesResponse
119
119
  };
120
120
 
121
- Platform.getIdentityByPublicKeyHashes = {
122
- methodName: "getIdentityByPublicKeyHashes",
121
+ Platform.getIdentityByPublicKeyHash = {
122
+ methodName: "getIdentityByPublicKeyHash",
123
123
  service: Platform,
124
124
  requestStream: false,
125
125
  responseStream: false,
126
- requestType: platform_pb.GetIdentityByPublicKeyHashesRequest,
127
- responseType: platform_pb.GetIdentityByPublicKeyHashesResponse
126
+ requestType: platform_pb.GetIdentityByPublicKeyHashRequest,
127
+ responseType: platform_pb.GetIdentityByPublicKeyHashResponse
128
128
  };
129
129
 
130
130
  Platform.waitForStateTransitionResult = {
@@ -145,6 +145,33 @@ Platform.getConsensusParams = {
145
145
  responseType: platform_pb.GetConsensusParamsResponse
146
146
  };
147
147
 
148
+ Platform.getVersionUpgradeState = {
149
+ methodName: "getVersionUpgradeState",
150
+ service: Platform,
151
+ requestStream: false,
152
+ responseStream: false,
153
+ requestType: platform_pb.GetVersionUpgradeStateRequest,
154
+ responseType: platform_pb.GetVersionUpgradeStateResponse
155
+ };
156
+
157
+ Platform.getVersionUpgradeVoteStatus = {
158
+ methodName: "getVersionUpgradeVoteStatus",
159
+ service: Platform,
160
+ requestStream: false,
161
+ responseStream: false,
162
+ requestType: platform_pb.GetVersionUpgradeVoteStatusRequest,
163
+ responseType: platform_pb.GetVersionUpgradeVoteStatusResponse
164
+ };
165
+
166
+ Platform.getEpochsInfo = {
167
+ methodName: "getEpochsInfo",
168
+ service: Platform,
169
+ requestStream: false,
170
+ responseStream: false,
171
+ requestType: platform_pb.GetEpochsInfoRequest,
172
+ responseType: platform_pb.GetEpochsInfoResponse
173
+ };
174
+
148
175
  exports.Platform = Platform;
149
176
 
150
177
  function PlatformClient(serviceHost, options) {
@@ -524,11 +551,11 @@ PlatformClient.prototype.getIdentitiesByPublicKeyHashes = function getIdentities
524
551
  };
525
552
  };
526
553
 
527
- PlatformClient.prototype.getIdentityByPublicKeyHashes = function getIdentityByPublicKeyHashes(requestMessage, metadata, callback) {
554
+ PlatformClient.prototype.getIdentityByPublicKeyHash = function getIdentityByPublicKeyHash(requestMessage, metadata, callback) {
528
555
  if (arguments.length === 2) {
529
556
  callback = arguments[1];
530
557
  }
531
- var client = grpc.unary(Platform.getIdentityByPublicKeyHashes, {
558
+ var client = grpc.unary(Platform.getIdentityByPublicKeyHash, {
532
559
  request: requestMessage,
533
560
  host: this.serviceHost,
534
561
  metadata: metadata,
@@ -617,5 +644,98 @@ PlatformClient.prototype.getConsensusParams = function getConsensusParams(reques
617
644
  };
618
645
  };
619
646
 
647
+ PlatformClient.prototype.getVersionUpgradeState = function getVersionUpgradeState(requestMessage, metadata, callback) {
648
+ if (arguments.length === 2) {
649
+ callback = arguments[1];
650
+ }
651
+ var client = grpc.unary(Platform.getVersionUpgradeState, {
652
+ request: requestMessage,
653
+ host: this.serviceHost,
654
+ metadata: metadata,
655
+ transport: this.options.transport,
656
+ debug: this.options.debug,
657
+ onEnd: function (response) {
658
+ if (callback) {
659
+ if (response.status !== grpc.Code.OK) {
660
+ var err = new Error(response.statusMessage);
661
+ err.code = response.status;
662
+ err.metadata = response.trailers;
663
+ callback(err, null);
664
+ } else {
665
+ callback(null, response.message);
666
+ }
667
+ }
668
+ }
669
+ });
670
+ return {
671
+ cancel: function () {
672
+ callback = null;
673
+ client.close();
674
+ }
675
+ };
676
+ };
677
+
678
+ PlatformClient.prototype.getVersionUpgradeVoteStatus = function getVersionUpgradeVoteStatus(requestMessage, metadata, callback) {
679
+ if (arguments.length === 2) {
680
+ callback = arguments[1];
681
+ }
682
+ var client = grpc.unary(Platform.getVersionUpgradeVoteStatus, {
683
+ request: requestMessage,
684
+ host: this.serviceHost,
685
+ metadata: metadata,
686
+ transport: this.options.transport,
687
+ debug: this.options.debug,
688
+ onEnd: function (response) {
689
+ if (callback) {
690
+ if (response.status !== grpc.Code.OK) {
691
+ var err = new Error(response.statusMessage);
692
+ err.code = response.status;
693
+ err.metadata = response.trailers;
694
+ callback(err, null);
695
+ } else {
696
+ callback(null, response.message);
697
+ }
698
+ }
699
+ }
700
+ });
701
+ return {
702
+ cancel: function () {
703
+ callback = null;
704
+ client.close();
705
+ }
706
+ };
707
+ };
708
+
709
+ PlatformClient.prototype.getEpochsInfo = function getEpochsInfo(requestMessage, metadata, callback) {
710
+ if (arguments.length === 2) {
711
+ callback = arguments[1];
712
+ }
713
+ var client = grpc.unary(Platform.getEpochsInfo, {
714
+ request: requestMessage,
715
+ host: this.serviceHost,
716
+ metadata: metadata,
717
+ transport: this.options.transport,
718
+ debug: this.options.debug,
719
+ onEnd: function (response) {
720
+ if (callback) {
721
+ if (response.status !== grpc.Code.OK) {
722
+ var err = new Error(response.statusMessage);
723
+ err.code = response.status;
724
+ err.metadata = response.trailers;
725
+ callback(err, null);
726
+ } else {
727
+ callback(null, response.message);
728
+ }
729
+ }
730
+ }
731
+ });
732
+ return {
733
+ cancel: function () {
734
+ callback = null;
735
+ client.close();
736
+ }
737
+ };
738
+ };
739
+
620
740
  exports.PlatformClient = PlatformClient;
621
741
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dashevo/dapi-grpc",
3
- "version": "0.25.8",
3
+ "version": "0.25.10",
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": "0.25.8",
48
+ "@dashevo/grpc-common": "0.25.10",
49
49
  "@dashevo/protobufjs": "6.10.5",
50
50
  "@grpc/grpc-js": "^1.3.7",
51
51
  "@improbable-eng/grpc-web": "^0.15.0",