@dashevo/dapi-grpc 1.1.0-pr.1713.2 → 1.1.0-pr.2012.4
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/PlatformPromiseClient.js +36 -0
- 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
package/Cargo.toml
CHANGED
package/build.rs
CHANGED
|
@@ -47,7 +47,7 @@ fn configure_platform(mut platform: MappingConfig) -> MappingConfig {
|
|
|
47
47
|
// Derive features for versioned messages
|
|
48
48
|
//
|
|
49
49
|
// "GetConsensusParamsRequest" is excluded as this message does not support proofs
|
|
50
|
-
const VERSIONED_REQUESTS: [&str;
|
|
50
|
+
const VERSIONED_REQUESTS: [&str; 26] = [
|
|
51
51
|
"GetDataContractHistoryRequest",
|
|
52
52
|
"GetDataContractRequest",
|
|
53
53
|
"GetDataContractsRequest",
|
|
@@ -73,10 +73,11 @@ fn configure_platform(mut platform: MappingConfig) -> MappingConfig {
|
|
|
73
73
|
"GetContestedResourceVotersForIdentityRequest",
|
|
74
74
|
"GetContestedResourceIdentityVotesRequest",
|
|
75
75
|
"GetVotePollsByEndDateRequest",
|
|
76
|
+
"GetTotalCreditsInPlatformRequest",
|
|
76
77
|
];
|
|
77
78
|
|
|
78
79
|
// "GetConsensusParamsResponse" is excluded as this message does not support proofs
|
|
79
|
-
const VERSIONED_RESPONSES: [&str;
|
|
80
|
+
const VERSIONED_RESPONSES: [&str; 27] = [
|
|
80
81
|
"GetDataContractHistoryResponse",
|
|
81
82
|
"GetDataContractResponse",
|
|
82
83
|
"GetDataContractsResponse",
|
|
@@ -103,6 +104,7 @@ fn configure_platform(mut platform: MappingConfig) -> MappingConfig {
|
|
|
103
104
|
"GetContestedResourceVotersForIdentityResponse",
|
|
104
105
|
"GetContestedResourceIdentityVotesResponse",
|
|
105
106
|
"GetVotePollsByEndDateResponse",
|
|
107
|
+
"GetTotalCreditsInPlatformResponse",
|
|
106
108
|
];
|
|
107
109
|
|
|
108
110
|
check_unique(&VERSIONED_REQUESTS).expect("VERSIONED_REQUESTS");
|
|
@@ -58,6 +58,8 @@ const {
|
|
|
58
58
|
GetIdentityNonceResponse: PBJSGetIdentityNonceResponse,
|
|
59
59
|
GetIdentityKeysRequest: PBJSGetIdentityKeysRequest,
|
|
60
60
|
GetIdentityKeysResponse: PBJSGetIdentityKeysResponse,
|
|
61
|
+
GetTotalCreditsInPlatformRequest: PBJSGetTotalCreditsInPlatformRequest,
|
|
62
|
+
GetTotalCreditsInPlatformResponse: PBJSGetTotalCreditsInPlatformResponse,
|
|
61
63
|
},
|
|
62
64
|
},
|
|
63
65
|
},
|
|
@@ -82,6 +84,7 @@ const {
|
|
|
82
84
|
GetIdentityContractNonceResponse: ProtocGetIdentityContractNonceResponse,
|
|
83
85
|
GetIdentityNonceResponse: ProtocGetIdentityNonceResponse,
|
|
84
86
|
GetIdentityKeysResponse: ProtocGetIdentityKeysResponse,
|
|
87
|
+
GetTotalCreditsInPlatformResponse: ProtocGetTotalCreditsInPlatformResponse,
|
|
85
88
|
} = require('./platform_protoc');
|
|
86
89
|
|
|
87
90
|
const getPlatformDefinition = require('../../../../lib/getPlatformDefinition');
|
|
@@ -172,6 +175,10 @@ class PlatformPromiseClient {
|
|
|
172
175
|
this.client.getIdentityKeys.bind(this.client),
|
|
173
176
|
);
|
|
174
177
|
|
|
178
|
+
this.client.getTotalCreditsInPlatform = promisify(
|
|
179
|
+
this.client.getTotalCreditsInPlatform.bind(this.client),
|
|
180
|
+
);
|
|
181
|
+
|
|
175
182
|
this.protocolVersion = undefined;
|
|
176
183
|
}
|
|
177
184
|
|
|
@@ -690,6 +697,35 @@ class PlatformPromiseClient {
|
|
|
690
697
|
);
|
|
691
698
|
}
|
|
692
699
|
|
|
700
|
+
getTotalCreditsInPlatform(
|
|
701
|
+
getTotalCreditsInPlatformRequest,
|
|
702
|
+
metadata = {},
|
|
703
|
+
options = {},
|
|
704
|
+
) {
|
|
705
|
+
if (!isObject(metadata)) {
|
|
706
|
+
throw new Error('metadata must be an object');
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
return this.client.getTotalCreditsInPlatform(
|
|
710
|
+
getTotalCreditsInPlatformRequest,
|
|
711
|
+
convertObjectToMetadata(metadata),
|
|
712
|
+
{
|
|
713
|
+
interceptors: [
|
|
714
|
+
jsonToProtobufInterceptorFactory(
|
|
715
|
+
jsonToProtobufFactory(
|
|
716
|
+
ProtocGetTotalCreditsInPlatformResponse,
|
|
717
|
+
PBJSGetTotalCreditsInPlatformResponse,
|
|
718
|
+
),
|
|
719
|
+
protobufToJsonFactory(
|
|
720
|
+
PBJSGetTotalCreditsInPlatformRequest,
|
|
721
|
+
),
|
|
722
|
+
),
|
|
723
|
+
],
|
|
724
|
+
...options,
|
|
725
|
+
},
|
|
726
|
+
);
|
|
727
|
+
}
|
|
728
|
+
|
|
693
729
|
/**
|
|
694
730
|
* @param {string} protocolVersion
|
|
695
731
|
*/
|