@dashevo/dapi-grpc 1.1.1 → 1.2.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  [package]
2
2
  name = "dapi-grpc"
3
3
  description = "GRPC client for Dash Platform"
4
- version = "1.1.1"
4
+ version = "1.2.0"
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 = "1.76"
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
  */