@dashevo/dapi-grpc 1.8.0 → 2.0.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.
- package/.eslintrc +3 -0
- package/Cargo.toml +25 -14
- package/build.rs +80 -20
- package/clients/platform/v0/nodejs/platform_pbjs.js +21836 -132
- package/clients/platform/v0/nodejs/platform_protoc.js +38698 -17593
- package/clients/platform/v0/web/platform_pb.d.ts +2865 -99
- package/clients/platform/v0/web/platform_pb.js +38698 -17593
- package/clients/platform/v0/web/platform_pb_service.d.ts +209 -0
- package/clients/platform/v0/web/platform_pb_service.js +440 -0
- package/package.json +3 -3
- package/protos/platform/v0/platform.proto +588 -37
- package/src/lib.rs +19 -10
|
@@ -292,6 +292,105 @@ type PlatformgetCurrentQuorumsInfo = {
|
|
|
292
292
|
readonly responseType: typeof platform_pb.GetCurrentQuorumsInfoResponse;
|
|
293
293
|
};
|
|
294
294
|
|
|
295
|
+
type PlatformgetIdentityTokenBalances = {
|
|
296
|
+
readonly methodName: string;
|
|
297
|
+
readonly service: typeof Platform;
|
|
298
|
+
readonly requestStream: false;
|
|
299
|
+
readonly responseStream: false;
|
|
300
|
+
readonly requestType: typeof platform_pb.GetIdentityTokenBalancesRequest;
|
|
301
|
+
readonly responseType: typeof platform_pb.GetIdentityTokenBalancesResponse;
|
|
302
|
+
};
|
|
303
|
+
|
|
304
|
+
type PlatformgetIdentitiesTokenBalances = {
|
|
305
|
+
readonly methodName: string;
|
|
306
|
+
readonly service: typeof Platform;
|
|
307
|
+
readonly requestStream: false;
|
|
308
|
+
readonly responseStream: false;
|
|
309
|
+
readonly requestType: typeof platform_pb.GetIdentitiesTokenBalancesRequest;
|
|
310
|
+
readonly responseType: typeof platform_pb.GetIdentitiesTokenBalancesResponse;
|
|
311
|
+
};
|
|
312
|
+
|
|
313
|
+
type PlatformgetIdentityTokenInfos = {
|
|
314
|
+
readonly methodName: string;
|
|
315
|
+
readonly service: typeof Platform;
|
|
316
|
+
readonly requestStream: false;
|
|
317
|
+
readonly responseStream: false;
|
|
318
|
+
readonly requestType: typeof platform_pb.GetIdentityTokenInfosRequest;
|
|
319
|
+
readonly responseType: typeof platform_pb.GetIdentityTokenInfosResponse;
|
|
320
|
+
};
|
|
321
|
+
|
|
322
|
+
type PlatformgetIdentitiesTokenInfos = {
|
|
323
|
+
readonly methodName: string;
|
|
324
|
+
readonly service: typeof Platform;
|
|
325
|
+
readonly requestStream: false;
|
|
326
|
+
readonly responseStream: false;
|
|
327
|
+
readonly requestType: typeof platform_pb.GetIdentitiesTokenInfosRequest;
|
|
328
|
+
readonly responseType: typeof platform_pb.GetIdentitiesTokenInfosResponse;
|
|
329
|
+
};
|
|
330
|
+
|
|
331
|
+
type PlatformgetTokenStatuses = {
|
|
332
|
+
readonly methodName: string;
|
|
333
|
+
readonly service: typeof Platform;
|
|
334
|
+
readonly requestStream: false;
|
|
335
|
+
readonly responseStream: false;
|
|
336
|
+
readonly requestType: typeof platform_pb.GetTokenStatusesRequest;
|
|
337
|
+
readonly responseType: typeof platform_pb.GetTokenStatusesResponse;
|
|
338
|
+
};
|
|
339
|
+
|
|
340
|
+
type PlatformgetTokenPreProgrammedDistributions = {
|
|
341
|
+
readonly methodName: string;
|
|
342
|
+
readonly service: typeof Platform;
|
|
343
|
+
readonly requestStream: false;
|
|
344
|
+
readonly responseStream: false;
|
|
345
|
+
readonly requestType: typeof platform_pb.GetTokenPreProgrammedDistributionsRequest;
|
|
346
|
+
readonly responseType: typeof platform_pb.GetTokenPreProgrammedDistributionsResponse;
|
|
347
|
+
};
|
|
348
|
+
|
|
349
|
+
type PlatformgetTokenTotalSupply = {
|
|
350
|
+
readonly methodName: string;
|
|
351
|
+
readonly service: typeof Platform;
|
|
352
|
+
readonly requestStream: false;
|
|
353
|
+
readonly responseStream: false;
|
|
354
|
+
readonly requestType: typeof platform_pb.GetTokenTotalSupplyRequest;
|
|
355
|
+
readonly responseType: typeof platform_pb.GetTokenTotalSupplyResponse;
|
|
356
|
+
};
|
|
357
|
+
|
|
358
|
+
type PlatformgetGroupInfo = {
|
|
359
|
+
readonly methodName: string;
|
|
360
|
+
readonly service: typeof Platform;
|
|
361
|
+
readonly requestStream: false;
|
|
362
|
+
readonly responseStream: false;
|
|
363
|
+
readonly requestType: typeof platform_pb.GetGroupInfoRequest;
|
|
364
|
+
readonly responseType: typeof platform_pb.GetGroupInfoResponse;
|
|
365
|
+
};
|
|
366
|
+
|
|
367
|
+
type PlatformgetGroupInfos = {
|
|
368
|
+
readonly methodName: string;
|
|
369
|
+
readonly service: typeof Platform;
|
|
370
|
+
readonly requestStream: false;
|
|
371
|
+
readonly responseStream: false;
|
|
372
|
+
readonly requestType: typeof platform_pb.GetGroupInfosRequest;
|
|
373
|
+
readonly responseType: typeof platform_pb.GetGroupInfosResponse;
|
|
374
|
+
};
|
|
375
|
+
|
|
376
|
+
type PlatformgetGroupActions = {
|
|
377
|
+
readonly methodName: string;
|
|
378
|
+
readonly service: typeof Platform;
|
|
379
|
+
readonly requestStream: false;
|
|
380
|
+
readonly responseStream: false;
|
|
381
|
+
readonly requestType: typeof platform_pb.GetGroupActionsRequest;
|
|
382
|
+
readonly responseType: typeof platform_pb.GetGroupActionsResponse;
|
|
383
|
+
};
|
|
384
|
+
|
|
385
|
+
type PlatformgetGroupActionSigners = {
|
|
386
|
+
readonly methodName: string;
|
|
387
|
+
readonly service: typeof Platform;
|
|
388
|
+
readonly requestStream: false;
|
|
389
|
+
readonly responseStream: false;
|
|
390
|
+
readonly requestType: typeof platform_pb.GetGroupActionSignersRequest;
|
|
391
|
+
readonly responseType: typeof platform_pb.GetGroupActionSignersResponse;
|
|
392
|
+
};
|
|
393
|
+
|
|
295
394
|
export class Platform {
|
|
296
395
|
static readonly serviceName: string;
|
|
297
396
|
static readonly broadcastStateTransition: PlatformbroadcastStateTransition;
|
|
@@ -326,6 +425,17 @@ export class Platform {
|
|
|
326
425
|
static readonly getPathElements: PlatformgetPathElements;
|
|
327
426
|
static readonly getStatus: PlatformgetStatus;
|
|
328
427
|
static readonly getCurrentQuorumsInfo: PlatformgetCurrentQuorumsInfo;
|
|
428
|
+
static readonly getIdentityTokenBalances: PlatformgetIdentityTokenBalances;
|
|
429
|
+
static readonly getIdentitiesTokenBalances: PlatformgetIdentitiesTokenBalances;
|
|
430
|
+
static readonly getIdentityTokenInfos: PlatformgetIdentityTokenInfos;
|
|
431
|
+
static readonly getIdentitiesTokenInfos: PlatformgetIdentitiesTokenInfos;
|
|
432
|
+
static readonly getTokenStatuses: PlatformgetTokenStatuses;
|
|
433
|
+
static readonly getTokenPreProgrammedDistributions: PlatformgetTokenPreProgrammedDistributions;
|
|
434
|
+
static readonly getTokenTotalSupply: PlatformgetTokenTotalSupply;
|
|
435
|
+
static readonly getGroupInfo: PlatformgetGroupInfo;
|
|
436
|
+
static readonly getGroupInfos: PlatformgetGroupInfos;
|
|
437
|
+
static readonly getGroupActions: PlatformgetGroupActions;
|
|
438
|
+
static readonly getGroupActionSigners: PlatformgetGroupActionSigners;
|
|
329
439
|
}
|
|
330
440
|
|
|
331
441
|
export type ServiceError = { message: string, code: number; metadata: grpc.Metadata }
|
|
@@ -648,5 +758,104 @@ export class PlatformClient {
|
|
|
648
758
|
requestMessage: platform_pb.GetCurrentQuorumsInfoRequest,
|
|
649
759
|
callback: (error: ServiceError|null, responseMessage: platform_pb.GetCurrentQuorumsInfoResponse|null) => void
|
|
650
760
|
): UnaryResponse;
|
|
761
|
+
getIdentityTokenBalances(
|
|
762
|
+
requestMessage: platform_pb.GetIdentityTokenBalancesRequest,
|
|
763
|
+
metadata: grpc.Metadata,
|
|
764
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentityTokenBalancesResponse|null) => void
|
|
765
|
+
): UnaryResponse;
|
|
766
|
+
getIdentityTokenBalances(
|
|
767
|
+
requestMessage: platform_pb.GetIdentityTokenBalancesRequest,
|
|
768
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentityTokenBalancesResponse|null) => void
|
|
769
|
+
): UnaryResponse;
|
|
770
|
+
getIdentitiesTokenBalances(
|
|
771
|
+
requestMessage: platform_pb.GetIdentitiesTokenBalancesRequest,
|
|
772
|
+
metadata: grpc.Metadata,
|
|
773
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentitiesTokenBalancesResponse|null) => void
|
|
774
|
+
): UnaryResponse;
|
|
775
|
+
getIdentitiesTokenBalances(
|
|
776
|
+
requestMessage: platform_pb.GetIdentitiesTokenBalancesRequest,
|
|
777
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentitiesTokenBalancesResponse|null) => void
|
|
778
|
+
): UnaryResponse;
|
|
779
|
+
getIdentityTokenInfos(
|
|
780
|
+
requestMessage: platform_pb.GetIdentityTokenInfosRequest,
|
|
781
|
+
metadata: grpc.Metadata,
|
|
782
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentityTokenInfosResponse|null) => void
|
|
783
|
+
): UnaryResponse;
|
|
784
|
+
getIdentityTokenInfos(
|
|
785
|
+
requestMessage: platform_pb.GetIdentityTokenInfosRequest,
|
|
786
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentityTokenInfosResponse|null) => void
|
|
787
|
+
): UnaryResponse;
|
|
788
|
+
getIdentitiesTokenInfos(
|
|
789
|
+
requestMessage: platform_pb.GetIdentitiesTokenInfosRequest,
|
|
790
|
+
metadata: grpc.Metadata,
|
|
791
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentitiesTokenInfosResponse|null) => void
|
|
792
|
+
): UnaryResponse;
|
|
793
|
+
getIdentitiesTokenInfos(
|
|
794
|
+
requestMessage: platform_pb.GetIdentitiesTokenInfosRequest,
|
|
795
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetIdentitiesTokenInfosResponse|null) => void
|
|
796
|
+
): UnaryResponse;
|
|
797
|
+
getTokenStatuses(
|
|
798
|
+
requestMessage: platform_pb.GetTokenStatusesRequest,
|
|
799
|
+
metadata: grpc.Metadata,
|
|
800
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetTokenStatusesResponse|null) => void
|
|
801
|
+
): UnaryResponse;
|
|
802
|
+
getTokenStatuses(
|
|
803
|
+
requestMessage: platform_pb.GetTokenStatusesRequest,
|
|
804
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetTokenStatusesResponse|null) => void
|
|
805
|
+
): UnaryResponse;
|
|
806
|
+
getTokenPreProgrammedDistributions(
|
|
807
|
+
requestMessage: platform_pb.GetTokenPreProgrammedDistributionsRequest,
|
|
808
|
+
metadata: grpc.Metadata,
|
|
809
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetTokenPreProgrammedDistributionsResponse|null) => void
|
|
810
|
+
): UnaryResponse;
|
|
811
|
+
getTokenPreProgrammedDistributions(
|
|
812
|
+
requestMessage: platform_pb.GetTokenPreProgrammedDistributionsRequest,
|
|
813
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetTokenPreProgrammedDistributionsResponse|null) => void
|
|
814
|
+
): UnaryResponse;
|
|
815
|
+
getTokenTotalSupply(
|
|
816
|
+
requestMessage: platform_pb.GetTokenTotalSupplyRequest,
|
|
817
|
+
metadata: grpc.Metadata,
|
|
818
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetTokenTotalSupplyResponse|null) => void
|
|
819
|
+
): UnaryResponse;
|
|
820
|
+
getTokenTotalSupply(
|
|
821
|
+
requestMessage: platform_pb.GetTokenTotalSupplyRequest,
|
|
822
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetTokenTotalSupplyResponse|null) => void
|
|
823
|
+
): UnaryResponse;
|
|
824
|
+
getGroupInfo(
|
|
825
|
+
requestMessage: platform_pb.GetGroupInfoRequest,
|
|
826
|
+
metadata: grpc.Metadata,
|
|
827
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetGroupInfoResponse|null) => void
|
|
828
|
+
): UnaryResponse;
|
|
829
|
+
getGroupInfo(
|
|
830
|
+
requestMessage: platform_pb.GetGroupInfoRequest,
|
|
831
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetGroupInfoResponse|null) => void
|
|
832
|
+
): UnaryResponse;
|
|
833
|
+
getGroupInfos(
|
|
834
|
+
requestMessage: platform_pb.GetGroupInfosRequest,
|
|
835
|
+
metadata: grpc.Metadata,
|
|
836
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetGroupInfosResponse|null) => void
|
|
837
|
+
): UnaryResponse;
|
|
838
|
+
getGroupInfos(
|
|
839
|
+
requestMessage: platform_pb.GetGroupInfosRequest,
|
|
840
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetGroupInfosResponse|null) => void
|
|
841
|
+
): UnaryResponse;
|
|
842
|
+
getGroupActions(
|
|
843
|
+
requestMessage: platform_pb.GetGroupActionsRequest,
|
|
844
|
+
metadata: grpc.Metadata,
|
|
845
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetGroupActionsResponse|null) => void
|
|
846
|
+
): UnaryResponse;
|
|
847
|
+
getGroupActions(
|
|
848
|
+
requestMessage: platform_pb.GetGroupActionsRequest,
|
|
849
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetGroupActionsResponse|null) => void
|
|
850
|
+
): UnaryResponse;
|
|
851
|
+
getGroupActionSigners(
|
|
852
|
+
requestMessage: platform_pb.GetGroupActionSignersRequest,
|
|
853
|
+
metadata: grpc.Metadata,
|
|
854
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetGroupActionSignersResponse|null) => void
|
|
855
|
+
): UnaryResponse;
|
|
856
|
+
getGroupActionSigners(
|
|
857
|
+
requestMessage: platform_pb.GetGroupActionSignersRequest,
|
|
858
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetGroupActionSignersResponse|null) => void
|
|
859
|
+
): UnaryResponse;
|
|
651
860
|
}
|
|
652
861
|
|
|
@@ -298,6 +298,105 @@ Platform.getCurrentQuorumsInfo = {
|
|
|
298
298
|
responseType: platform_pb.GetCurrentQuorumsInfoResponse
|
|
299
299
|
};
|
|
300
300
|
|
|
301
|
+
Platform.getIdentityTokenBalances = {
|
|
302
|
+
methodName: "getIdentityTokenBalances",
|
|
303
|
+
service: Platform,
|
|
304
|
+
requestStream: false,
|
|
305
|
+
responseStream: false,
|
|
306
|
+
requestType: platform_pb.GetIdentityTokenBalancesRequest,
|
|
307
|
+
responseType: platform_pb.GetIdentityTokenBalancesResponse
|
|
308
|
+
};
|
|
309
|
+
|
|
310
|
+
Platform.getIdentitiesTokenBalances = {
|
|
311
|
+
methodName: "getIdentitiesTokenBalances",
|
|
312
|
+
service: Platform,
|
|
313
|
+
requestStream: false,
|
|
314
|
+
responseStream: false,
|
|
315
|
+
requestType: platform_pb.GetIdentitiesTokenBalancesRequest,
|
|
316
|
+
responseType: platform_pb.GetIdentitiesTokenBalancesResponse
|
|
317
|
+
};
|
|
318
|
+
|
|
319
|
+
Platform.getIdentityTokenInfos = {
|
|
320
|
+
methodName: "getIdentityTokenInfos",
|
|
321
|
+
service: Platform,
|
|
322
|
+
requestStream: false,
|
|
323
|
+
responseStream: false,
|
|
324
|
+
requestType: platform_pb.GetIdentityTokenInfosRequest,
|
|
325
|
+
responseType: platform_pb.GetIdentityTokenInfosResponse
|
|
326
|
+
};
|
|
327
|
+
|
|
328
|
+
Platform.getIdentitiesTokenInfos = {
|
|
329
|
+
methodName: "getIdentitiesTokenInfos",
|
|
330
|
+
service: Platform,
|
|
331
|
+
requestStream: false,
|
|
332
|
+
responseStream: false,
|
|
333
|
+
requestType: platform_pb.GetIdentitiesTokenInfosRequest,
|
|
334
|
+
responseType: platform_pb.GetIdentitiesTokenInfosResponse
|
|
335
|
+
};
|
|
336
|
+
|
|
337
|
+
Platform.getTokenStatuses = {
|
|
338
|
+
methodName: "getTokenStatuses",
|
|
339
|
+
service: Platform,
|
|
340
|
+
requestStream: false,
|
|
341
|
+
responseStream: false,
|
|
342
|
+
requestType: platform_pb.GetTokenStatusesRequest,
|
|
343
|
+
responseType: platform_pb.GetTokenStatusesResponse
|
|
344
|
+
};
|
|
345
|
+
|
|
346
|
+
Platform.getTokenPreProgrammedDistributions = {
|
|
347
|
+
methodName: "getTokenPreProgrammedDistributions",
|
|
348
|
+
service: Platform,
|
|
349
|
+
requestStream: false,
|
|
350
|
+
responseStream: false,
|
|
351
|
+
requestType: platform_pb.GetTokenPreProgrammedDistributionsRequest,
|
|
352
|
+
responseType: platform_pb.GetTokenPreProgrammedDistributionsResponse
|
|
353
|
+
};
|
|
354
|
+
|
|
355
|
+
Platform.getTokenTotalSupply = {
|
|
356
|
+
methodName: "getTokenTotalSupply",
|
|
357
|
+
service: Platform,
|
|
358
|
+
requestStream: false,
|
|
359
|
+
responseStream: false,
|
|
360
|
+
requestType: platform_pb.GetTokenTotalSupplyRequest,
|
|
361
|
+
responseType: platform_pb.GetTokenTotalSupplyResponse
|
|
362
|
+
};
|
|
363
|
+
|
|
364
|
+
Platform.getGroupInfo = {
|
|
365
|
+
methodName: "getGroupInfo",
|
|
366
|
+
service: Platform,
|
|
367
|
+
requestStream: false,
|
|
368
|
+
responseStream: false,
|
|
369
|
+
requestType: platform_pb.GetGroupInfoRequest,
|
|
370
|
+
responseType: platform_pb.GetGroupInfoResponse
|
|
371
|
+
};
|
|
372
|
+
|
|
373
|
+
Platform.getGroupInfos = {
|
|
374
|
+
methodName: "getGroupInfos",
|
|
375
|
+
service: Platform,
|
|
376
|
+
requestStream: false,
|
|
377
|
+
responseStream: false,
|
|
378
|
+
requestType: platform_pb.GetGroupInfosRequest,
|
|
379
|
+
responseType: platform_pb.GetGroupInfosResponse
|
|
380
|
+
};
|
|
381
|
+
|
|
382
|
+
Platform.getGroupActions = {
|
|
383
|
+
methodName: "getGroupActions",
|
|
384
|
+
service: Platform,
|
|
385
|
+
requestStream: false,
|
|
386
|
+
responseStream: false,
|
|
387
|
+
requestType: platform_pb.GetGroupActionsRequest,
|
|
388
|
+
responseType: platform_pb.GetGroupActionsResponse
|
|
389
|
+
};
|
|
390
|
+
|
|
391
|
+
Platform.getGroupActionSigners = {
|
|
392
|
+
methodName: "getGroupActionSigners",
|
|
393
|
+
service: Platform,
|
|
394
|
+
requestStream: false,
|
|
395
|
+
responseStream: false,
|
|
396
|
+
requestType: platform_pb.GetGroupActionSignersRequest,
|
|
397
|
+
responseType: platform_pb.GetGroupActionSignersResponse
|
|
398
|
+
};
|
|
399
|
+
|
|
301
400
|
exports.Platform = Platform;
|
|
302
401
|
|
|
303
402
|
function PlatformClient(serviceHost, options) {
|
|
@@ -1297,5 +1396,346 @@ PlatformClient.prototype.getCurrentQuorumsInfo = function getCurrentQuorumsInfo(
|
|
|
1297
1396
|
};
|
|
1298
1397
|
};
|
|
1299
1398
|
|
|
1399
|
+
PlatformClient.prototype.getIdentityTokenBalances = function getIdentityTokenBalances(requestMessage, metadata, callback) {
|
|
1400
|
+
if (arguments.length === 2) {
|
|
1401
|
+
callback = arguments[1];
|
|
1402
|
+
}
|
|
1403
|
+
var client = grpc.unary(Platform.getIdentityTokenBalances, {
|
|
1404
|
+
request: requestMessage,
|
|
1405
|
+
host: this.serviceHost,
|
|
1406
|
+
metadata: metadata,
|
|
1407
|
+
transport: this.options.transport,
|
|
1408
|
+
debug: this.options.debug,
|
|
1409
|
+
onEnd: function (response) {
|
|
1410
|
+
if (callback) {
|
|
1411
|
+
if (response.status !== grpc.Code.OK) {
|
|
1412
|
+
var err = new Error(response.statusMessage);
|
|
1413
|
+
err.code = response.status;
|
|
1414
|
+
err.metadata = response.trailers;
|
|
1415
|
+
callback(err, null);
|
|
1416
|
+
} else {
|
|
1417
|
+
callback(null, response.message);
|
|
1418
|
+
}
|
|
1419
|
+
}
|
|
1420
|
+
}
|
|
1421
|
+
});
|
|
1422
|
+
return {
|
|
1423
|
+
cancel: function () {
|
|
1424
|
+
callback = null;
|
|
1425
|
+
client.close();
|
|
1426
|
+
}
|
|
1427
|
+
};
|
|
1428
|
+
};
|
|
1429
|
+
|
|
1430
|
+
PlatformClient.prototype.getIdentitiesTokenBalances = function getIdentitiesTokenBalances(requestMessage, metadata, callback) {
|
|
1431
|
+
if (arguments.length === 2) {
|
|
1432
|
+
callback = arguments[1];
|
|
1433
|
+
}
|
|
1434
|
+
var client = grpc.unary(Platform.getIdentitiesTokenBalances, {
|
|
1435
|
+
request: requestMessage,
|
|
1436
|
+
host: this.serviceHost,
|
|
1437
|
+
metadata: metadata,
|
|
1438
|
+
transport: this.options.transport,
|
|
1439
|
+
debug: this.options.debug,
|
|
1440
|
+
onEnd: function (response) {
|
|
1441
|
+
if (callback) {
|
|
1442
|
+
if (response.status !== grpc.Code.OK) {
|
|
1443
|
+
var err = new Error(response.statusMessage);
|
|
1444
|
+
err.code = response.status;
|
|
1445
|
+
err.metadata = response.trailers;
|
|
1446
|
+
callback(err, null);
|
|
1447
|
+
} else {
|
|
1448
|
+
callback(null, response.message);
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1451
|
+
}
|
|
1452
|
+
});
|
|
1453
|
+
return {
|
|
1454
|
+
cancel: function () {
|
|
1455
|
+
callback = null;
|
|
1456
|
+
client.close();
|
|
1457
|
+
}
|
|
1458
|
+
};
|
|
1459
|
+
};
|
|
1460
|
+
|
|
1461
|
+
PlatformClient.prototype.getIdentityTokenInfos = function getIdentityTokenInfos(requestMessage, metadata, callback) {
|
|
1462
|
+
if (arguments.length === 2) {
|
|
1463
|
+
callback = arguments[1];
|
|
1464
|
+
}
|
|
1465
|
+
var client = grpc.unary(Platform.getIdentityTokenInfos, {
|
|
1466
|
+
request: requestMessage,
|
|
1467
|
+
host: this.serviceHost,
|
|
1468
|
+
metadata: metadata,
|
|
1469
|
+
transport: this.options.transport,
|
|
1470
|
+
debug: this.options.debug,
|
|
1471
|
+
onEnd: function (response) {
|
|
1472
|
+
if (callback) {
|
|
1473
|
+
if (response.status !== grpc.Code.OK) {
|
|
1474
|
+
var err = new Error(response.statusMessage);
|
|
1475
|
+
err.code = response.status;
|
|
1476
|
+
err.metadata = response.trailers;
|
|
1477
|
+
callback(err, null);
|
|
1478
|
+
} else {
|
|
1479
|
+
callback(null, response.message);
|
|
1480
|
+
}
|
|
1481
|
+
}
|
|
1482
|
+
}
|
|
1483
|
+
});
|
|
1484
|
+
return {
|
|
1485
|
+
cancel: function () {
|
|
1486
|
+
callback = null;
|
|
1487
|
+
client.close();
|
|
1488
|
+
}
|
|
1489
|
+
};
|
|
1490
|
+
};
|
|
1491
|
+
|
|
1492
|
+
PlatformClient.prototype.getIdentitiesTokenInfos = function getIdentitiesTokenInfos(requestMessage, metadata, callback) {
|
|
1493
|
+
if (arguments.length === 2) {
|
|
1494
|
+
callback = arguments[1];
|
|
1495
|
+
}
|
|
1496
|
+
var client = grpc.unary(Platform.getIdentitiesTokenInfos, {
|
|
1497
|
+
request: requestMessage,
|
|
1498
|
+
host: this.serviceHost,
|
|
1499
|
+
metadata: metadata,
|
|
1500
|
+
transport: this.options.transport,
|
|
1501
|
+
debug: this.options.debug,
|
|
1502
|
+
onEnd: function (response) {
|
|
1503
|
+
if (callback) {
|
|
1504
|
+
if (response.status !== grpc.Code.OK) {
|
|
1505
|
+
var err = new Error(response.statusMessage);
|
|
1506
|
+
err.code = response.status;
|
|
1507
|
+
err.metadata = response.trailers;
|
|
1508
|
+
callback(err, null);
|
|
1509
|
+
} else {
|
|
1510
|
+
callback(null, response.message);
|
|
1511
|
+
}
|
|
1512
|
+
}
|
|
1513
|
+
}
|
|
1514
|
+
});
|
|
1515
|
+
return {
|
|
1516
|
+
cancel: function () {
|
|
1517
|
+
callback = null;
|
|
1518
|
+
client.close();
|
|
1519
|
+
}
|
|
1520
|
+
};
|
|
1521
|
+
};
|
|
1522
|
+
|
|
1523
|
+
PlatformClient.prototype.getTokenStatuses = function getTokenStatuses(requestMessage, metadata, callback) {
|
|
1524
|
+
if (arguments.length === 2) {
|
|
1525
|
+
callback = arguments[1];
|
|
1526
|
+
}
|
|
1527
|
+
var client = grpc.unary(Platform.getTokenStatuses, {
|
|
1528
|
+
request: requestMessage,
|
|
1529
|
+
host: this.serviceHost,
|
|
1530
|
+
metadata: metadata,
|
|
1531
|
+
transport: this.options.transport,
|
|
1532
|
+
debug: this.options.debug,
|
|
1533
|
+
onEnd: function (response) {
|
|
1534
|
+
if (callback) {
|
|
1535
|
+
if (response.status !== grpc.Code.OK) {
|
|
1536
|
+
var err = new Error(response.statusMessage);
|
|
1537
|
+
err.code = response.status;
|
|
1538
|
+
err.metadata = response.trailers;
|
|
1539
|
+
callback(err, null);
|
|
1540
|
+
} else {
|
|
1541
|
+
callback(null, response.message);
|
|
1542
|
+
}
|
|
1543
|
+
}
|
|
1544
|
+
}
|
|
1545
|
+
});
|
|
1546
|
+
return {
|
|
1547
|
+
cancel: function () {
|
|
1548
|
+
callback = null;
|
|
1549
|
+
client.close();
|
|
1550
|
+
}
|
|
1551
|
+
};
|
|
1552
|
+
};
|
|
1553
|
+
|
|
1554
|
+
PlatformClient.prototype.getTokenPreProgrammedDistributions = function getTokenPreProgrammedDistributions(requestMessage, metadata, callback) {
|
|
1555
|
+
if (arguments.length === 2) {
|
|
1556
|
+
callback = arguments[1];
|
|
1557
|
+
}
|
|
1558
|
+
var client = grpc.unary(Platform.getTokenPreProgrammedDistributions, {
|
|
1559
|
+
request: requestMessage,
|
|
1560
|
+
host: this.serviceHost,
|
|
1561
|
+
metadata: metadata,
|
|
1562
|
+
transport: this.options.transport,
|
|
1563
|
+
debug: this.options.debug,
|
|
1564
|
+
onEnd: function (response) {
|
|
1565
|
+
if (callback) {
|
|
1566
|
+
if (response.status !== grpc.Code.OK) {
|
|
1567
|
+
var err = new Error(response.statusMessage);
|
|
1568
|
+
err.code = response.status;
|
|
1569
|
+
err.metadata = response.trailers;
|
|
1570
|
+
callback(err, null);
|
|
1571
|
+
} else {
|
|
1572
|
+
callback(null, response.message);
|
|
1573
|
+
}
|
|
1574
|
+
}
|
|
1575
|
+
}
|
|
1576
|
+
});
|
|
1577
|
+
return {
|
|
1578
|
+
cancel: function () {
|
|
1579
|
+
callback = null;
|
|
1580
|
+
client.close();
|
|
1581
|
+
}
|
|
1582
|
+
};
|
|
1583
|
+
};
|
|
1584
|
+
|
|
1585
|
+
PlatformClient.prototype.getTokenTotalSupply = function getTokenTotalSupply(requestMessage, metadata, callback) {
|
|
1586
|
+
if (arguments.length === 2) {
|
|
1587
|
+
callback = arguments[1];
|
|
1588
|
+
}
|
|
1589
|
+
var client = grpc.unary(Platform.getTokenTotalSupply, {
|
|
1590
|
+
request: requestMessage,
|
|
1591
|
+
host: this.serviceHost,
|
|
1592
|
+
metadata: metadata,
|
|
1593
|
+
transport: this.options.transport,
|
|
1594
|
+
debug: this.options.debug,
|
|
1595
|
+
onEnd: function (response) {
|
|
1596
|
+
if (callback) {
|
|
1597
|
+
if (response.status !== grpc.Code.OK) {
|
|
1598
|
+
var err = new Error(response.statusMessage);
|
|
1599
|
+
err.code = response.status;
|
|
1600
|
+
err.metadata = response.trailers;
|
|
1601
|
+
callback(err, null);
|
|
1602
|
+
} else {
|
|
1603
|
+
callback(null, response.message);
|
|
1604
|
+
}
|
|
1605
|
+
}
|
|
1606
|
+
}
|
|
1607
|
+
});
|
|
1608
|
+
return {
|
|
1609
|
+
cancel: function () {
|
|
1610
|
+
callback = null;
|
|
1611
|
+
client.close();
|
|
1612
|
+
}
|
|
1613
|
+
};
|
|
1614
|
+
};
|
|
1615
|
+
|
|
1616
|
+
PlatformClient.prototype.getGroupInfo = function getGroupInfo(requestMessage, metadata, callback) {
|
|
1617
|
+
if (arguments.length === 2) {
|
|
1618
|
+
callback = arguments[1];
|
|
1619
|
+
}
|
|
1620
|
+
var client = grpc.unary(Platform.getGroupInfo, {
|
|
1621
|
+
request: requestMessage,
|
|
1622
|
+
host: this.serviceHost,
|
|
1623
|
+
metadata: metadata,
|
|
1624
|
+
transport: this.options.transport,
|
|
1625
|
+
debug: this.options.debug,
|
|
1626
|
+
onEnd: function (response) {
|
|
1627
|
+
if (callback) {
|
|
1628
|
+
if (response.status !== grpc.Code.OK) {
|
|
1629
|
+
var err = new Error(response.statusMessage);
|
|
1630
|
+
err.code = response.status;
|
|
1631
|
+
err.metadata = response.trailers;
|
|
1632
|
+
callback(err, null);
|
|
1633
|
+
} else {
|
|
1634
|
+
callback(null, response.message);
|
|
1635
|
+
}
|
|
1636
|
+
}
|
|
1637
|
+
}
|
|
1638
|
+
});
|
|
1639
|
+
return {
|
|
1640
|
+
cancel: function () {
|
|
1641
|
+
callback = null;
|
|
1642
|
+
client.close();
|
|
1643
|
+
}
|
|
1644
|
+
};
|
|
1645
|
+
};
|
|
1646
|
+
|
|
1647
|
+
PlatformClient.prototype.getGroupInfos = function getGroupInfos(requestMessage, metadata, callback) {
|
|
1648
|
+
if (arguments.length === 2) {
|
|
1649
|
+
callback = arguments[1];
|
|
1650
|
+
}
|
|
1651
|
+
var client = grpc.unary(Platform.getGroupInfos, {
|
|
1652
|
+
request: requestMessage,
|
|
1653
|
+
host: this.serviceHost,
|
|
1654
|
+
metadata: metadata,
|
|
1655
|
+
transport: this.options.transport,
|
|
1656
|
+
debug: this.options.debug,
|
|
1657
|
+
onEnd: function (response) {
|
|
1658
|
+
if (callback) {
|
|
1659
|
+
if (response.status !== grpc.Code.OK) {
|
|
1660
|
+
var err = new Error(response.statusMessage);
|
|
1661
|
+
err.code = response.status;
|
|
1662
|
+
err.metadata = response.trailers;
|
|
1663
|
+
callback(err, null);
|
|
1664
|
+
} else {
|
|
1665
|
+
callback(null, response.message);
|
|
1666
|
+
}
|
|
1667
|
+
}
|
|
1668
|
+
}
|
|
1669
|
+
});
|
|
1670
|
+
return {
|
|
1671
|
+
cancel: function () {
|
|
1672
|
+
callback = null;
|
|
1673
|
+
client.close();
|
|
1674
|
+
}
|
|
1675
|
+
};
|
|
1676
|
+
};
|
|
1677
|
+
|
|
1678
|
+
PlatformClient.prototype.getGroupActions = function getGroupActions(requestMessage, metadata, callback) {
|
|
1679
|
+
if (arguments.length === 2) {
|
|
1680
|
+
callback = arguments[1];
|
|
1681
|
+
}
|
|
1682
|
+
var client = grpc.unary(Platform.getGroupActions, {
|
|
1683
|
+
request: requestMessage,
|
|
1684
|
+
host: this.serviceHost,
|
|
1685
|
+
metadata: metadata,
|
|
1686
|
+
transport: this.options.transport,
|
|
1687
|
+
debug: this.options.debug,
|
|
1688
|
+
onEnd: function (response) {
|
|
1689
|
+
if (callback) {
|
|
1690
|
+
if (response.status !== grpc.Code.OK) {
|
|
1691
|
+
var err = new Error(response.statusMessage);
|
|
1692
|
+
err.code = response.status;
|
|
1693
|
+
err.metadata = response.trailers;
|
|
1694
|
+
callback(err, null);
|
|
1695
|
+
} else {
|
|
1696
|
+
callback(null, response.message);
|
|
1697
|
+
}
|
|
1698
|
+
}
|
|
1699
|
+
}
|
|
1700
|
+
});
|
|
1701
|
+
return {
|
|
1702
|
+
cancel: function () {
|
|
1703
|
+
callback = null;
|
|
1704
|
+
client.close();
|
|
1705
|
+
}
|
|
1706
|
+
};
|
|
1707
|
+
};
|
|
1708
|
+
|
|
1709
|
+
PlatformClient.prototype.getGroupActionSigners = function getGroupActionSigners(requestMessage, metadata, callback) {
|
|
1710
|
+
if (arguments.length === 2) {
|
|
1711
|
+
callback = arguments[1];
|
|
1712
|
+
}
|
|
1713
|
+
var client = grpc.unary(Platform.getGroupActionSigners, {
|
|
1714
|
+
request: requestMessage,
|
|
1715
|
+
host: this.serviceHost,
|
|
1716
|
+
metadata: metadata,
|
|
1717
|
+
transport: this.options.transport,
|
|
1718
|
+
debug: this.options.debug,
|
|
1719
|
+
onEnd: function (response) {
|
|
1720
|
+
if (callback) {
|
|
1721
|
+
if (response.status !== grpc.Code.OK) {
|
|
1722
|
+
var err = new Error(response.statusMessage);
|
|
1723
|
+
err.code = response.status;
|
|
1724
|
+
err.metadata = response.trailers;
|
|
1725
|
+
callback(err, null);
|
|
1726
|
+
} else {
|
|
1727
|
+
callback(null, response.message);
|
|
1728
|
+
}
|
|
1729
|
+
}
|
|
1730
|
+
}
|
|
1731
|
+
});
|
|
1732
|
+
return {
|
|
1733
|
+
cancel: function () {
|
|
1734
|
+
callback = null;
|
|
1735
|
+
client.close();
|
|
1736
|
+
}
|
|
1737
|
+
};
|
|
1738
|
+
};
|
|
1739
|
+
|
|
1300
1740
|
exports.PlatformClient = PlatformClient;
|
|
1301
1741
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dashevo/dapi-grpc",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.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": "
|
|
48
|
+
"@dashevo/grpc-common": "2.0.0-dev.1",
|
|
49
49
|
"@dashevo/protobufjs": "6.10.5",
|
|
50
50
|
"@grpc/grpc-js": "1.4.4",
|
|
51
51
|
"@improbable-eng/grpc-web": "^0.15.0",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"eslint": "^8.53.0",
|
|
60
60
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
61
61
|
"eslint-plugin-import": "^2.29.0",
|
|
62
|
-
"mocha": "^
|
|
62
|
+
"mocha": "^11.1.0",
|
|
63
63
|
"mocha-sinon": "^2.1.2",
|
|
64
64
|
"sinon": "^17.0.1",
|
|
65
65
|
"sinon-chai": "^3.7.0"
|