@dashevo/dapi-grpc 1.1.1 → 1.2.0-rc.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 +2 -2
- package/clients/platform/v0/nodejs/PlatformPromiseClient.js +36 -0
- package/clients/platform/v0/nodejs/platform_pbjs.js +3673 -0
- package/clients/platform/v0/nodejs/platform_protoc.js +3633 -0
- package/clients/platform/v0/web/PlatformPromiseClient.js +14 -0
- package/clients/platform/v0/web/platform_pb.d.ts +466 -0
- package/clients/platform/v0/web/platform_pb.js +3633 -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 +98 -0
package/Cargo.toml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "dapi-grpc"
|
|
3
3
|
description = "GRPC client for Dash Platform"
|
|
4
|
-
version = "1.
|
|
4
|
+
version = "1.2.0-rc.1"
|
|
5
5
|
authors = [
|
|
6
6
|
"Samuel Westrich <sam@dash.org>",
|
|
7
7
|
"Igor Markin <igor.markin@dash.org>",
|
|
@@ -10,7 +10,7 @@ authors = [
|
|
|
10
10
|
"Ivan Shumkov <shumkov@dash.org>",
|
|
11
11
|
]
|
|
12
12
|
edition = "2021"
|
|
13
|
-
rust-version =
|
|
13
|
+
rust-version.workspace = true
|
|
14
14
|
license = "MIT"
|
|
15
15
|
|
|
16
16
|
[features]
|
|
@@ -60,6 +60,8 @@ const {
|
|
|
60
60
|
GetIdentityKeysResponse: PBJSGetIdentityKeysResponse,
|
|
61
61
|
GetTotalCreditsInPlatformRequest: PBJSGetTotalCreditsInPlatformRequest,
|
|
62
62
|
GetTotalCreditsInPlatformResponse: PBJSGetTotalCreditsInPlatformResponse,
|
|
63
|
+
GetStatusRequest: PBJSGetStatusRequest,
|
|
64
|
+
GetStatusResponse: PBJSGetStatusResponse,
|
|
63
65
|
},
|
|
64
66
|
},
|
|
65
67
|
},
|
|
@@ -85,6 +87,7 @@ const {
|
|
|
85
87
|
GetIdentityNonceResponse: ProtocGetIdentityNonceResponse,
|
|
86
88
|
GetIdentityKeysResponse: ProtocGetIdentityKeysResponse,
|
|
87
89
|
GetTotalCreditsInPlatformResponse: ProtocGetTotalCreditsInPlatformResponse,
|
|
90
|
+
GetStatusResponse: ProtocGetStatusResponse,
|
|
88
91
|
} = require('./platform_protoc');
|
|
89
92
|
|
|
90
93
|
const getPlatformDefinition = require('../../../../lib/getPlatformDefinition');
|
|
@@ -179,6 +182,10 @@ class PlatformPromiseClient {
|
|
|
179
182
|
this.client.getTotalCreditsInPlatform.bind(this.client),
|
|
180
183
|
);
|
|
181
184
|
|
|
185
|
+
this.client.getStatus = promisify(
|
|
186
|
+
this.client.getStatus.bind(this.client),
|
|
187
|
+
);
|
|
188
|
+
|
|
182
189
|
this.protocolVersion = undefined;
|
|
183
190
|
}
|
|
184
191
|
|
|
@@ -726,6 +733,35 @@ class PlatformPromiseClient {
|
|
|
726
733
|
);
|
|
727
734
|
}
|
|
728
735
|
|
|
736
|
+
getStatus(
|
|
737
|
+
getStatusRequest,
|
|
738
|
+
metadata = {},
|
|
739
|
+
options = {},
|
|
740
|
+
) {
|
|
741
|
+
if (!isObject(metadata)) {
|
|
742
|
+
throw new Error('metadata must be an object');
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
return this.client.getStatus(
|
|
746
|
+
getStatusRequest,
|
|
747
|
+
convertObjectToMetadata(metadata),
|
|
748
|
+
{
|
|
749
|
+
interceptors: [
|
|
750
|
+
jsonToProtobufInterceptorFactory(
|
|
751
|
+
jsonToProtobufFactory(
|
|
752
|
+
ProtocGetStatusResponse,
|
|
753
|
+
PBJSGetStatusResponse,
|
|
754
|
+
),
|
|
755
|
+
protobufToJsonFactory(
|
|
756
|
+
PBJSGetStatusRequest,
|
|
757
|
+
),
|
|
758
|
+
),
|
|
759
|
+
],
|
|
760
|
+
...options,
|
|
761
|
+
},
|
|
762
|
+
);
|
|
763
|
+
}
|
|
764
|
+
|
|
729
765
|
/**
|
|
730
766
|
* @param {string} protocolVersion
|
|
731
767
|
*/
|