@dashevo/dapi-grpc 1.0.1 → 1.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.
- package/Cargo.toml +1 -1
- package/build.rs +4 -2
- package/clients/platform/v0/nodejs/platform_pbjs.js +919 -0
- package/clients/platform/v0/nodejs/platform_protoc.js +849 -0
- package/clients/platform/v0/web/platform_pb.d.ts +117 -0
- package/clients/platform/v0/web/platform_pb.js +849 -0
- package/clients/platform/v0/web/platform_pb_service.d.ts +19 -0
- package/clients/platform/v0/web/platform_pb_service.js +40 -0
- package/package.json +2 -2
- package/protos/platform/v0/platform.proto +25 -0
|
@@ -229,6 +229,15 @@ type PlatformgetPrefundedSpecializedBalance = {
|
|
|
229
229
|
readonly responseType: typeof platform_pb.GetPrefundedSpecializedBalanceResponse;
|
|
230
230
|
};
|
|
231
231
|
|
|
232
|
+
type PlatformgetTotalCreditsInPlatform = {
|
|
233
|
+
readonly methodName: string;
|
|
234
|
+
readonly service: typeof Platform;
|
|
235
|
+
readonly requestStream: false;
|
|
236
|
+
readonly responseStream: false;
|
|
237
|
+
readonly requestType: typeof platform_pb.GetTotalCreditsInPlatformRequest;
|
|
238
|
+
readonly responseType: typeof platform_pb.GetTotalCreditsInPlatformResponse;
|
|
239
|
+
};
|
|
240
|
+
|
|
232
241
|
type PlatformgetPathElements = {
|
|
233
242
|
readonly methodName: string;
|
|
234
243
|
readonly service: typeof Platform;
|
|
@@ -265,6 +274,7 @@ export class Platform {
|
|
|
265
274
|
static readonly getContestedResourceIdentityVotes: PlatformgetContestedResourceIdentityVotes;
|
|
266
275
|
static readonly getVotePollsByEndDate: PlatformgetVotePollsByEndDate;
|
|
267
276
|
static readonly getPrefundedSpecializedBalance: PlatformgetPrefundedSpecializedBalance;
|
|
277
|
+
static readonly getTotalCreditsInPlatform: PlatformgetTotalCreditsInPlatform;
|
|
268
278
|
static readonly getPathElements: PlatformgetPathElements;
|
|
269
279
|
}
|
|
270
280
|
|
|
@@ -525,6 +535,15 @@ export class PlatformClient {
|
|
|
525
535
|
requestMessage: platform_pb.GetPrefundedSpecializedBalanceRequest,
|
|
526
536
|
callback: (error: ServiceError|null, responseMessage: platform_pb.GetPrefundedSpecializedBalanceResponse|null) => void
|
|
527
537
|
): UnaryResponse;
|
|
538
|
+
getTotalCreditsInPlatform(
|
|
539
|
+
requestMessage: platform_pb.GetTotalCreditsInPlatformRequest,
|
|
540
|
+
metadata: grpc.Metadata,
|
|
541
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetTotalCreditsInPlatformResponse|null) => void
|
|
542
|
+
): UnaryResponse;
|
|
543
|
+
getTotalCreditsInPlatform(
|
|
544
|
+
requestMessage: platform_pb.GetTotalCreditsInPlatformRequest,
|
|
545
|
+
callback: (error: ServiceError|null, responseMessage: platform_pb.GetTotalCreditsInPlatformResponse|null) => void
|
|
546
|
+
): UnaryResponse;
|
|
528
547
|
getPathElements(
|
|
529
548
|
requestMessage: platform_pb.GetPathElementsRequest,
|
|
530
549
|
metadata: grpc.Metadata,
|
|
@@ -235,6 +235,15 @@ Platform.getPrefundedSpecializedBalance = {
|
|
|
235
235
|
responseType: platform_pb.GetPrefundedSpecializedBalanceResponse
|
|
236
236
|
};
|
|
237
237
|
|
|
238
|
+
Platform.getTotalCreditsInPlatform = {
|
|
239
|
+
methodName: "getTotalCreditsInPlatform",
|
|
240
|
+
service: Platform,
|
|
241
|
+
requestStream: false,
|
|
242
|
+
responseStream: false,
|
|
243
|
+
requestType: platform_pb.GetTotalCreditsInPlatformRequest,
|
|
244
|
+
responseType: platform_pb.GetTotalCreditsInPlatformResponse
|
|
245
|
+
};
|
|
246
|
+
|
|
238
247
|
Platform.getPathElements = {
|
|
239
248
|
methodName: "getPathElements",
|
|
240
249
|
service: Platform,
|
|
@@ -1026,6 +1035,37 @@ PlatformClient.prototype.getPrefundedSpecializedBalance = function getPrefundedS
|
|
|
1026
1035
|
};
|
|
1027
1036
|
};
|
|
1028
1037
|
|
|
1038
|
+
PlatformClient.prototype.getTotalCreditsInPlatform = function getTotalCreditsInPlatform(requestMessage, metadata, callback) {
|
|
1039
|
+
if (arguments.length === 2) {
|
|
1040
|
+
callback = arguments[1];
|
|
1041
|
+
}
|
|
1042
|
+
var client = grpc.unary(Platform.getTotalCreditsInPlatform, {
|
|
1043
|
+
request: requestMessage,
|
|
1044
|
+
host: this.serviceHost,
|
|
1045
|
+
metadata: metadata,
|
|
1046
|
+
transport: this.options.transport,
|
|
1047
|
+
debug: this.options.debug,
|
|
1048
|
+
onEnd: function (response) {
|
|
1049
|
+
if (callback) {
|
|
1050
|
+
if (response.status !== grpc.Code.OK) {
|
|
1051
|
+
var err = new Error(response.statusMessage);
|
|
1052
|
+
err.code = response.status;
|
|
1053
|
+
err.metadata = response.trailers;
|
|
1054
|
+
callback(err, null);
|
|
1055
|
+
} else {
|
|
1056
|
+
callback(null, response.message);
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
});
|
|
1061
|
+
return {
|
|
1062
|
+
cancel: function () {
|
|
1063
|
+
callback = null;
|
|
1064
|
+
client.close();
|
|
1065
|
+
}
|
|
1066
|
+
};
|
|
1067
|
+
};
|
|
1068
|
+
|
|
1029
1069
|
PlatformClient.prototype.getPathElements = function getPathElements(requestMessage, metadata, callback) {
|
|
1030
1070
|
if (arguments.length === 2) {
|
|
1031
1071
|
callback = arguments[1];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dashevo/dapi-grpc",
|
|
3
|
-
"version": "1.0.1",
|
|
3
|
+
"version": "1.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": "1.0.1",
|
|
48
|
+
"@dashevo/grpc-common": "1.1.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",
|
|
@@ -45,6 +45,7 @@ service Platform {
|
|
|
45
45
|
// What vote polls will end soon?
|
|
46
46
|
rpc getVotePollsByEndDate(GetVotePollsByEndDateRequest) returns (GetVotePollsByEndDateResponse);
|
|
47
47
|
rpc getPrefundedSpecializedBalance(GetPrefundedSpecializedBalanceRequest) returns (GetPrefundedSpecializedBalanceResponse);
|
|
48
|
+
rpc getTotalCreditsInPlatform(GetTotalCreditsInPlatformRequest) returns (GetTotalCreditsInPlatformResponse);
|
|
48
49
|
rpc getPathElements(GetPathElementsRequest) returns (GetPathElementsResponse);
|
|
49
50
|
}
|
|
50
51
|
|
|
@@ -945,6 +946,30 @@ message GetPrefundedSpecializedBalanceResponse {
|
|
|
945
946
|
oneof version { GetPrefundedSpecializedBalanceResponseV0 v0 = 1; }
|
|
946
947
|
}
|
|
947
948
|
|
|
949
|
+
message GetTotalCreditsInPlatformRequest {
|
|
950
|
+
message GetTotalCreditsInPlatformRequestV0 {
|
|
951
|
+
bool prove = 1;
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
oneof version {
|
|
955
|
+
GetTotalCreditsInPlatformRequestV0 v0 = 1;
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
message GetTotalCreditsInPlatformResponse {
|
|
960
|
+
message GetTotalCreditsInPlatformResponseV0 {
|
|
961
|
+
oneof result {
|
|
962
|
+
uint64 credits = 1;
|
|
963
|
+
|
|
964
|
+
Proof proof = 2;
|
|
965
|
+
}
|
|
966
|
+
ResponseMetadata metadata = 3;
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
oneof version {
|
|
970
|
+
GetTotalCreditsInPlatformResponseV0 v0 = 1;
|
|
971
|
+
}
|
|
972
|
+
}
|
|
948
973
|
|
|
949
974
|
message GetPathElementsRequest {
|
|
950
975
|
message GetPathElementsRequestV0 {
|