@dashevo/dapi-grpc 0.25.0-dev.9 → 0.25.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.
@@ -0,0 +1,3 @@
1
+ # Rust bindings
2
+
3
+ Rust definitions can be found in [dapi-grpc/src](../../../../src/) directory.
@@ -0,0 +1,15 @@
1
+ use dapi_grpc::platform::v0 as platform;
2
+ use prost::Message;
3
+
4
+ fn main() {
5
+ let request = platform::GetConsensusParamsRequest {
6
+ height: 123,
7
+ prove: false,
8
+ };
9
+
10
+ let mut buffer = Vec::<u8>::new();
11
+ request.encode(&mut buffer).expect("failed to encode data");
12
+ let decoded = platform::GetConsensusParamsRequest::decode(buffer.as_ref())
13
+ .expect("failed to decode data");
14
+ assert_eq!(request, decoded);
15
+ }
@@ -56,6 +56,21 @@ class PlatformPromiseClient {
56
56
  );
57
57
  }
58
58
 
59
+ /**
60
+ *
61
+ * @param {!GetDataContractHistoryRequest} getDataContractHistoryRequest
62
+ * @param {?Object<string, string>} metadata
63
+ * @returns {Promise<!GetDataContractResponse>}
64
+ */
65
+ getDataContractHistory(getDataContractHistoryRequest, metadata = {}) {
66
+ return promisify(
67
+ this.client.getDataContractHistory.bind(this.client),
68
+ )(
69
+ getDataContractHistoryRequest,
70
+ metadata,
71
+ );
72
+ }
73
+
59
74
  /**
60
75
  *
61
76
  * @param {!GetDocumentsRequest} getDocumentsRequest