@dashevo/dapi-grpc 0.25.0-dev.9 → 0.25.0-pr.1545.2

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.
@@ -28,6 +28,51 @@ Platform.getIdentity = {
28
28
  responseType: platform_pb.GetIdentityResponse
29
29
  };
30
30
 
31
+ Platform.getIdentities = {
32
+ methodName: "getIdentities",
33
+ service: Platform,
34
+ requestStream: false,
35
+ responseStream: false,
36
+ requestType: platform_pb.GetIdentitiesRequest,
37
+ responseType: platform_pb.GetIdentitiesResponse
38
+ };
39
+
40
+ Platform.getIdentityKeys = {
41
+ methodName: "getIdentityKeys",
42
+ service: Platform,
43
+ requestStream: false,
44
+ responseStream: false,
45
+ requestType: platform_pb.GetIdentityKeysRequest,
46
+ responseType: platform_pb.GetIdentityKeysResponse
47
+ };
48
+
49
+ Platform.getIdentityBalance = {
50
+ methodName: "getIdentityBalance",
51
+ service: Platform,
52
+ requestStream: false,
53
+ responseStream: false,
54
+ requestType: platform_pb.GetIdentityBalanceRequest,
55
+ responseType: platform_pb.GetIdentityBalanceResponse
56
+ };
57
+
58
+ Platform.getIdentityBalanceAndRevision = {
59
+ methodName: "getIdentityBalanceAndRevision",
60
+ service: Platform,
61
+ requestStream: false,
62
+ responseStream: false,
63
+ requestType: platform_pb.GetIdentityBalanceAndRevisionRequest,
64
+ responseType: platform_pb.GetIdentityBalanceAndRevisionResponse
65
+ };
66
+
67
+ Platform.getProofs = {
68
+ methodName: "getProofs",
69
+ service: Platform,
70
+ requestStream: false,
71
+ responseStream: false,
72
+ requestType: platform_pb.GetProofsRequest,
73
+ responseType: platform_pb.GetProofsResponse
74
+ };
75
+
31
76
  Platform.getDataContract = {
32
77
  methodName: "getDataContract",
33
78
  service: Platform,
@@ -37,6 +82,24 @@ Platform.getDataContract = {
37
82
  responseType: platform_pb.GetDataContractResponse
38
83
  };
39
84
 
85
+ Platform.getDataContractHistory = {
86
+ methodName: "getDataContractHistory",
87
+ service: Platform,
88
+ requestStream: false,
89
+ responseStream: false,
90
+ requestType: platform_pb.GetDataContractHistoryRequest,
91
+ responseType: platform_pb.GetDataContractHistoryResponse
92
+ };
93
+
94
+ Platform.getDataContracts = {
95
+ methodName: "getDataContracts",
96
+ service: Platform,
97
+ requestStream: false,
98
+ responseStream: false,
99
+ requestType: platform_pb.GetDataContractsRequest,
100
+ responseType: platform_pb.GetDataContractsResponse
101
+ };
102
+
40
103
  Platform.getDocuments = {
41
104
  methodName: "getDocuments",
42
105
  service: Platform,
@@ -55,6 +118,15 @@ Platform.getIdentitiesByPublicKeyHashes = {
55
118
  responseType: platform_pb.GetIdentitiesByPublicKeyHashesResponse
56
119
  };
57
120
 
121
+ Platform.getIdentityByPublicKeyHash = {
122
+ methodName: "getIdentityByPublicKeyHash",
123
+ service: Platform,
124
+ requestStream: false,
125
+ responseStream: false,
126
+ requestType: platform_pb.GetIdentityByPublicKeyHashRequest,
127
+ responseType: platform_pb.GetIdentityByPublicKeyHashResponse
128
+ };
129
+
58
130
  Platform.waitForStateTransitionResult = {
59
131
  methodName: "waitForStateTransitionResult",
60
132
  service: Platform,
@@ -73,6 +145,33 @@ Platform.getConsensusParams = {
73
145
  responseType: platform_pb.GetConsensusParamsResponse
74
146
  };
75
147
 
148
+ Platform.getProtocolVersionUpgradeState = {
149
+ methodName: "getProtocolVersionUpgradeState",
150
+ service: Platform,
151
+ requestStream: false,
152
+ responseStream: false,
153
+ requestType: platform_pb.GetProtocolVersionUpgradeStateRequest,
154
+ responseType: platform_pb.GetProtocolVersionUpgradeStateResponse
155
+ };
156
+
157
+ Platform.getProtocolVersionUpgradeVoteStatus = {
158
+ methodName: "getProtocolVersionUpgradeVoteStatus",
159
+ service: Platform,
160
+ requestStream: false,
161
+ responseStream: false,
162
+ requestType: platform_pb.GetProtocolVersionUpgradeVoteStatusRequest,
163
+ responseType: platform_pb.GetProtocolVersionUpgradeVoteStatusResponse
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
+
76
175
  exports.Platform = Platform;
77
176
 
78
177
  function PlatformClient(serviceHost, options) {
@@ -142,6 +241,161 @@ PlatformClient.prototype.getIdentity = function getIdentity(requestMessage, meta
142
241
  };
143
242
  };
144
243
 
244
+ PlatformClient.prototype.getIdentities = function getIdentities(requestMessage, metadata, callback) {
245
+ if (arguments.length === 2) {
246
+ callback = arguments[1];
247
+ }
248
+ var client = grpc.unary(Platform.getIdentities, {
249
+ request: requestMessage,
250
+ host: this.serviceHost,
251
+ metadata: metadata,
252
+ transport: this.options.transport,
253
+ debug: this.options.debug,
254
+ onEnd: function (response) {
255
+ if (callback) {
256
+ if (response.status !== grpc.Code.OK) {
257
+ var err = new Error(response.statusMessage);
258
+ err.code = response.status;
259
+ err.metadata = response.trailers;
260
+ callback(err, null);
261
+ } else {
262
+ callback(null, response.message);
263
+ }
264
+ }
265
+ }
266
+ });
267
+ return {
268
+ cancel: function () {
269
+ callback = null;
270
+ client.close();
271
+ }
272
+ };
273
+ };
274
+
275
+ PlatformClient.prototype.getIdentityKeys = function getIdentityKeys(requestMessage, metadata, callback) {
276
+ if (arguments.length === 2) {
277
+ callback = arguments[1];
278
+ }
279
+ var client = grpc.unary(Platform.getIdentityKeys, {
280
+ request: requestMessage,
281
+ host: this.serviceHost,
282
+ metadata: metadata,
283
+ transport: this.options.transport,
284
+ debug: this.options.debug,
285
+ onEnd: function (response) {
286
+ if (callback) {
287
+ if (response.status !== grpc.Code.OK) {
288
+ var err = new Error(response.statusMessage);
289
+ err.code = response.status;
290
+ err.metadata = response.trailers;
291
+ callback(err, null);
292
+ } else {
293
+ callback(null, response.message);
294
+ }
295
+ }
296
+ }
297
+ });
298
+ return {
299
+ cancel: function () {
300
+ callback = null;
301
+ client.close();
302
+ }
303
+ };
304
+ };
305
+
306
+ PlatformClient.prototype.getIdentityBalance = function getIdentityBalance(requestMessage, metadata, callback) {
307
+ if (arguments.length === 2) {
308
+ callback = arguments[1];
309
+ }
310
+ var client = grpc.unary(Platform.getIdentityBalance, {
311
+ request: requestMessage,
312
+ host: this.serviceHost,
313
+ metadata: metadata,
314
+ transport: this.options.transport,
315
+ debug: this.options.debug,
316
+ onEnd: function (response) {
317
+ if (callback) {
318
+ if (response.status !== grpc.Code.OK) {
319
+ var err = new Error(response.statusMessage);
320
+ err.code = response.status;
321
+ err.metadata = response.trailers;
322
+ callback(err, null);
323
+ } else {
324
+ callback(null, response.message);
325
+ }
326
+ }
327
+ }
328
+ });
329
+ return {
330
+ cancel: function () {
331
+ callback = null;
332
+ client.close();
333
+ }
334
+ };
335
+ };
336
+
337
+ PlatformClient.prototype.getIdentityBalanceAndRevision = function getIdentityBalanceAndRevision(requestMessage, metadata, callback) {
338
+ if (arguments.length === 2) {
339
+ callback = arguments[1];
340
+ }
341
+ var client = grpc.unary(Platform.getIdentityBalanceAndRevision, {
342
+ request: requestMessage,
343
+ host: this.serviceHost,
344
+ metadata: metadata,
345
+ transport: this.options.transport,
346
+ debug: this.options.debug,
347
+ onEnd: function (response) {
348
+ if (callback) {
349
+ if (response.status !== grpc.Code.OK) {
350
+ var err = new Error(response.statusMessage);
351
+ err.code = response.status;
352
+ err.metadata = response.trailers;
353
+ callback(err, null);
354
+ } else {
355
+ callback(null, response.message);
356
+ }
357
+ }
358
+ }
359
+ });
360
+ return {
361
+ cancel: function () {
362
+ callback = null;
363
+ client.close();
364
+ }
365
+ };
366
+ };
367
+
368
+ PlatformClient.prototype.getProofs = function getProofs(requestMessage, metadata, callback) {
369
+ if (arguments.length === 2) {
370
+ callback = arguments[1];
371
+ }
372
+ var client = grpc.unary(Platform.getProofs, {
373
+ request: requestMessage,
374
+ host: this.serviceHost,
375
+ metadata: metadata,
376
+ transport: this.options.transport,
377
+ debug: this.options.debug,
378
+ onEnd: function (response) {
379
+ if (callback) {
380
+ if (response.status !== grpc.Code.OK) {
381
+ var err = new Error(response.statusMessage);
382
+ err.code = response.status;
383
+ err.metadata = response.trailers;
384
+ callback(err, null);
385
+ } else {
386
+ callback(null, response.message);
387
+ }
388
+ }
389
+ }
390
+ });
391
+ return {
392
+ cancel: function () {
393
+ callback = null;
394
+ client.close();
395
+ }
396
+ };
397
+ };
398
+
145
399
  PlatformClient.prototype.getDataContract = function getDataContract(requestMessage, metadata, callback) {
146
400
  if (arguments.length === 2) {
147
401
  callback = arguments[1];
@@ -173,6 +427,68 @@ PlatformClient.prototype.getDataContract = function getDataContract(requestMessa
173
427
  };
174
428
  };
175
429
 
430
+ PlatformClient.prototype.getDataContractHistory = function getDataContractHistory(requestMessage, metadata, callback) {
431
+ if (arguments.length === 2) {
432
+ callback = arguments[1];
433
+ }
434
+ var client = grpc.unary(Platform.getDataContractHistory, {
435
+ request: requestMessage,
436
+ host: this.serviceHost,
437
+ metadata: metadata,
438
+ transport: this.options.transport,
439
+ debug: this.options.debug,
440
+ onEnd: function (response) {
441
+ if (callback) {
442
+ if (response.status !== grpc.Code.OK) {
443
+ var err = new Error(response.statusMessage);
444
+ err.code = response.status;
445
+ err.metadata = response.trailers;
446
+ callback(err, null);
447
+ } else {
448
+ callback(null, response.message);
449
+ }
450
+ }
451
+ }
452
+ });
453
+ return {
454
+ cancel: function () {
455
+ callback = null;
456
+ client.close();
457
+ }
458
+ };
459
+ };
460
+
461
+ PlatformClient.prototype.getDataContracts = function getDataContracts(requestMessage, metadata, callback) {
462
+ if (arguments.length === 2) {
463
+ callback = arguments[1];
464
+ }
465
+ var client = grpc.unary(Platform.getDataContracts, {
466
+ request: requestMessage,
467
+ host: this.serviceHost,
468
+ metadata: metadata,
469
+ transport: this.options.transport,
470
+ debug: this.options.debug,
471
+ onEnd: function (response) {
472
+ if (callback) {
473
+ if (response.status !== grpc.Code.OK) {
474
+ var err = new Error(response.statusMessage);
475
+ err.code = response.status;
476
+ err.metadata = response.trailers;
477
+ callback(err, null);
478
+ } else {
479
+ callback(null, response.message);
480
+ }
481
+ }
482
+ }
483
+ });
484
+ return {
485
+ cancel: function () {
486
+ callback = null;
487
+ client.close();
488
+ }
489
+ };
490
+ };
491
+
176
492
  PlatformClient.prototype.getDocuments = function getDocuments(requestMessage, metadata, callback) {
177
493
  if (arguments.length === 2) {
178
494
  callback = arguments[1];
@@ -235,6 +551,37 @@ PlatformClient.prototype.getIdentitiesByPublicKeyHashes = function getIdentities
235
551
  };
236
552
  };
237
553
 
554
+ PlatformClient.prototype.getIdentityByPublicKeyHash = function getIdentityByPublicKeyHash(requestMessage, metadata, callback) {
555
+ if (arguments.length === 2) {
556
+ callback = arguments[1];
557
+ }
558
+ var client = grpc.unary(Platform.getIdentityByPublicKeyHash, {
559
+ request: requestMessage,
560
+ host: this.serviceHost,
561
+ metadata: metadata,
562
+ transport: this.options.transport,
563
+ debug: this.options.debug,
564
+ onEnd: function (response) {
565
+ if (callback) {
566
+ if (response.status !== grpc.Code.OK) {
567
+ var err = new Error(response.statusMessage);
568
+ err.code = response.status;
569
+ err.metadata = response.trailers;
570
+ callback(err, null);
571
+ } else {
572
+ callback(null, response.message);
573
+ }
574
+ }
575
+ }
576
+ });
577
+ return {
578
+ cancel: function () {
579
+ callback = null;
580
+ client.close();
581
+ }
582
+ };
583
+ };
584
+
238
585
  PlatformClient.prototype.waitForStateTransitionResult = function waitForStateTransitionResult(requestMessage, metadata, callback) {
239
586
  if (arguments.length === 2) {
240
587
  callback = arguments[1];
@@ -297,5 +644,98 @@ PlatformClient.prototype.getConsensusParams = function getConsensusParams(reques
297
644
  };
298
645
  };
299
646
 
647
+ PlatformClient.prototype.getProtocolVersionUpgradeState = function getProtocolVersionUpgradeState(requestMessage, metadata, callback) {
648
+ if (arguments.length === 2) {
649
+ callback = arguments[1];
650
+ }
651
+ var client = grpc.unary(Platform.getProtocolVersionUpgradeState, {
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.getProtocolVersionUpgradeVoteStatus = function getProtocolVersionUpgradeVoteStatus(requestMessage, metadata, callback) {
679
+ if (arguments.length === 2) {
680
+ callback = arguments[1];
681
+ }
682
+ var client = grpc.unary(Platform.getProtocolVersionUpgradeVoteStatus, {
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
+
300
740
  exports.PlatformClient = PlatformClient;
301
741
 
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@dashevo/dapi-grpc",
3
- "version": "0.25.0-dev.9",
3
+ "version": "0.25.0-pr.1545.2",
4
4
  "description": "DAPI GRPC definition file and generated clients",
5
5
  "browser": "browser.js",
6
6
  "main": "node.js",
7
7
  "scripts": {
8
- "build": "yarn exec scripts/build.sh && yarn exec scripts/patch-protobuf-js.sh",
8
+ "build": "yarn exec scripts/build.sh",
9
9
  "lint": "eslint .",
10
10
  "prepublishOnly": "yarn run build",
11
11
  "test": "yarn run test:unit",
@@ -21,6 +21,18 @@
21
21
  "name": "Anton Suprunchuk",
22
22
  "email": "anton.suprunchuk@dash.org",
23
23
  "url": "https://github.com/antouhou"
24
+ },
25
+ {
26
+ "name": "Samuel Westrich",
27
+ "email": "sam@dash.org"
28
+ },
29
+ {
30
+ "name": "Igor Markin",
31
+ "email": "igor.markin@dash.org"
32
+ },
33
+ {
34
+ "name": "Łukasz Klimek",
35
+ "email": "lukasz.klimek@dash.org"
24
36
  }
25
37
  ],
26
38
  "repository": {
@@ -33,7 +45,7 @@
33
45
  },
34
46
  "homepage": "https://github.com/dashevo/dapi-grpc#readme",
35
47
  "dependencies": {
36
- "@dashevo/grpc-common": "0.25.0-dev.9",
48
+ "@dashevo/grpc-common": "0.25.0-pr.1545.2",
37
49
  "@dashevo/protobufjs": "6.10.5",
38
50
  "@grpc/grpc-js": "^1.3.7",
39
51
  "@improbable-eng/grpc-web": "^0.15.0",
@@ -41,7 +53,7 @@
41
53
  "long": "^5.2.0"
42
54
  },
43
55
  "devDependencies": {
44
- "chai": "^4.3.4",
56
+ "chai": "^4.3.9",
45
57
  "chai-as-promised": "^7.1.1",
46
58
  "dirty-chai": "^2.0.1",
47
59
  "eslint": "^7.32.0",