@dashevo/dapi-grpc 0.25.21 → 1.0.0-beta.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 +35 -16
- package/build.rs +139 -56
- package/clients/core/v0/nodejs/CorePromiseClient.js +124 -13
- package/clients/core/v0/nodejs/core_pbjs.js +1922 -987
- package/clients/core/v0/nodejs/core_protoc.js +1291 -645
- package/clients/core/v0/rust/core_example.rs +1 -1
- package/clients/core/v0/web/CorePromiseClient.js +49 -5
- package/clients/core/v0/web/core_pb.d.ts +173 -89
- package/clients/core/v0/web/core_pb.js +1291 -645
- package/clients/core/v0/web/core_pb_service.d.ts +59 -10
- package/clients/core/v0/web/core_pb_service.js +134 -6
- package/clients/platform/v0/nodejs/PlatformPromiseClient.js +208 -14
- package/clients/platform/v0/nodejs/platform_pbjs.js +22951 -9938
- package/clients/platform/v0/nodejs/platform_protoc.js +22332 -9091
- package/clients/platform/v0/rust/platform_example.rs +1 -1
- package/clients/platform/v0/web/PlatformPromiseClient.js +64 -8
- package/clients/platform/v0/web/platform_pb.d.ts +2057 -302
- package/clients/platform/v0/web/platform_pb.js +22332 -9091
- package/clients/platform/v0/web/platform_pb_service.d.ts +187 -35
- package/clients/platform/v0/web/platform_pb_service.js +355 -35
- package/package.json +2 -2
- package/protos/core/v0/core.proto +45 -23
- package/protos/platform/v0/platform.proto +429 -50
- package/src/lib.rs +26 -2
- package/src/mock/serde_mockable.rs +105 -0
- package/src/mock.rs +130 -0
- package/test/unit/clients/core/v0/nodejs/CorePromiseClient.spec.js +27 -6
- package/test/unit/clients/platform/v0/nodejs/PlatformPromiseClient.spec.js +55 -1
- package/test/unit/getCoreDefinition.spec.js +5 -2
- package/src/core/proto/org.dash.platform.dapi.v0.rs +0 -666
- package/src/platform/proto/org.dash.platform.dapi.v0.rs +0 -2481
|
@@ -7,8 +7,8 @@ class PlatformPromiseClient {
|
|
|
7
7
|
* @param {?Object} credentials
|
|
8
8
|
* @param {?Object} options
|
|
9
9
|
*/
|
|
10
|
-
constructor(hostname, credentials
|
|
11
|
-
this.client = new PlatformClient(hostname, options)
|
|
10
|
+
constructor(hostname, credentials, options = {}) {
|
|
11
|
+
this.client = new PlatformClient(hostname, options);
|
|
12
12
|
|
|
13
13
|
this.protocolVersion = undefined;
|
|
14
14
|
}
|
|
@@ -41,6 +41,20 @@ class PlatformPromiseClient {
|
|
|
41
41
|
);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
/**
|
|
45
|
+
* @param {!GetIdentitiesContractKeysRequest} getIdentitiesContractKeysRequest
|
|
46
|
+
* @param {?Object<string, string>} metadata
|
|
47
|
+
* @return {Promise<!GetIdentitiesContractKeysResponse>}
|
|
48
|
+
*/
|
|
49
|
+
getIdentitiesContractKeys(getIdentitiesContractKeysRequest, metadata = {}) {
|
|
50
|
+
return promisify(
|
|
51
|
+
this.client.getIdentitiesContractKeys.bind(this.client),
|
|
52
|
+
)(
|
|
53
|
+
getIdentitiesContractKeysRequest,
|
|
54
|
+
metadata,
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
44
58
|
/**
|
|
45
59
|
*
|
|
46
60
|
* @param {!GetDataContractRequest} getDataContractRequest
|
|
@@ -87,17 +101,17 @@ class PlatformPromiseClient {
|
|
|
87
101
|
}
|
|
88
102
|
|
|
89
103
|
/**
|
|
90
|
-
* @param {!
|
|
104
|
+
* @param {!GetIdentityByPublicKeyHash} getIdentityByPublicKeyHashRequest
|
|
91
105
|
* @param {?Object<string, string>} metadata
|
|
92
|
-
* @returns {Promise<!
|
|
106
|
+
* @returns {Promise<!GetIdentityByPublicKeyHashResponse>}
|
|
93
107
|
*/
|
|
94
|
-
|
|
95
|
-
|
|
108
|
+
getIdentityByPublicKeyHash(
|
|
109
|
+
getIdentityByPublicKeyHashRequest, metadata = {}
|
|
96
110
|
) {
|
|
97
111
|
return promisify(
|
|
98
|
-
this.client.
|
|
112
|
+
this.client.getIdentityByPublicKeyHash.bind(this.client),
|
|
99
113
|
)(
|
|
100
|
-
|
|
114
|
+
getIdentityByPublicKeyHashRequest,
|
|
101
115
|
metadata,
|
|
102
116
|
);
|
|
103
117
|
}
|
|
@@ -176,6 +190,48 @@ class PlatformPromiseClient {
|
|
|
176
190
|
);
|
|
177
191
|
}
|
|
178
192
|
|
|
193
|
+
/**
|
|
194
|
+
* @param {!GetIdentityContractNonceRequest} getIdentityContractNonceRequest
|
|
195
|
+
* @param {?Object<string, string>} metadata
|
|
196
|
+
* @return {Promise<!GetIdentityContractNonceResponse>}
|
|
197
|
+
*/
|
|
198
|
+
getIdentityContractNonce(getIdentityContractNonceRequest, metadata = {}) {
|
|
199
|
+
return promisify(
|
|
200
|
+
this.client.getIdentityContractNonce.bind(this.client),
|
|
201
|
+
)(
|
|
202
|
+
getIdentityContractNonceRequest,
|
|
203
|
+
metadata,
|
|
204
|
+
);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* @param {!GetIdentityNonceRequest} getIdentityNonceRequest
|
|
209
|
+
* @param {?Object<string, string>} metadata
|
|
210
|
+
* @return {Promise<!GetIdentityNonceResponse>}
|
|
211
|
+
*/
|
|
212
|
+
getIdentityNonce(getIdentityNonceRequest, metadata = {}) {
|
|
213
|
+
return promisify(
|
|
214
|
+
this.client.getIdentityNonce.bind(this.client),
|
|
215
|
+
)(
|
|
216
|
+
getIdentityNonceRequest,
|
|
217
|
+
metadata,
|
|
218
|
+
);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* @param {!GetIdentityKeysRequest} getIdentityKeysRequest
|
|
223
|
+
* @param {?Object<string, string>} metadata
|
|
224
|
+
* @return {Promise<!GetIdentityKeysResponse>}
|
|
225
|
+
*/
|
|
226
|
+
getIdentityKeys(getIdentityKeysRequest, metadata = {}) {
|
|
227
|
+
return promisify(
|
|
228
|
+
this.client.getIdentityKeys.bind(this.client),
|
|
229
|
+
)(
|
|
230
|
+
getIdentityKeysRequest,
|
|
231
|
+
metadata,
|
|
232
|
+
);
|
|
233
|
+
}
|
|
234
|
+
|
|
179
235
|
/**
|
|
180
236
|
* @param {string} protocolVersion
|
|
181
237
|
*/
|