@alephium/web3 0.11.1 → 0.11.2

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.
@@ -929,7 +929,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
929
929
  }
930
930
  /**
931
931
  * @title Alephium API
932
- * @version 2.2.1
932
+ * @version 2.2.2
933
933
  * @baseUrl ../
934
934
  */
935
935
  export declare class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
@@ -1235,6 +1235,15 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
1235
1235
  */
1236
1236
  timespan?: number;
1237
1237
  }, params?: RequestParams) => Promise<string>;
1238
+ /**
1239
+ * No description
1240
+ *
1241
+ * @tags Infos
1242
+ * @name GetInfosCurrentDifficulty
1243
+ * @summary Get the average difficulty of the latest blocks from all shards
1244
+ * @request GET:/infos/current-difficulty
1245
+ */
1246
+ getInfosCurrentDifficulty: (params?: RequestParams) => Promise<string>;
1238
1247
  };
1239
1248
  blockflow: {
1240
1249
  /**
@@ -151,7 +151,7 @@ class HttpClient {
151
151
  exports.HttpClient = HttpClient;
152
152
  /**
153
153
  * @title Alephium API
154
- * @version 2.2.1
154
+ * @version 2.2.2
155
155
  * @baseUrl ../
156
156
  */
157
157
  class Api extends HttpClient {
@@ -614,6 +614,20 @@ class Api extends HttpClient {
614
614
  query: query,
615
615
  format: 'json',
616
616
  ...params
617
+ }).then(utils_1.convertHttpResponse),
618
+ /**
619
+ * No description
620
+ *
621
+ * @tags Infos
622
+ * @name GetInfosCurrentDifficulty
623
+ * @summary Get the average difficulty of the latest blocks from all shards
624
+ * @request GET:/infos/current-difficulty
625
+ */
626
+ getInfosCurrentDifficulty: (params = {}) => this.request({
627
+ path: `/infos/current-difficulty`,
628
+ method: 'GET',
629
+ format: 'json',
630
+ ...params
617
631
  }).then(utils_1.convertHttpResponse)
618
632
  };
619
633
  this.blockflow = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alephium/web3",
3
- "version": "0.11.1",
3
+ "version": "0.11.2",
4
4
  "description": "A JS/TS library to interact with the Alephium platform",
5
5
  "license": "GPL",
6
6
  "main": "dist/src/index.js",
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "author": "Alephium dev <dev@alephium.org>",
29
29
  "config": {
30
- "alephium_version": "2.2.1",
30
+ "alephium_version": "2.2.2",
31
31
  "explorer_backend_version": "1.13.4"
32
32
  },
33
33
  "type": "commonjs",
@@ -1217,7 +1217,7 @@ export class HttpClient<SecurityDataType = unknown> {
1217
1217
 
1218
1218
  /**
1219
1219
  * @title Alephium API
1220
- * @version 2.2.1
1220
+ * @version 2.2.2
1221
1221
  * @baseUrl ../
1222
1222
  */
1223
1223
  export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
@@ -1787,6 +1787,22 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
1787
1787
  query: query,
1788
1788
  format: 'json',
1789
1789
  ...params
1790
+ }).then(convertHttpResponse),
1791
+
1792
+ /**
1793
+ * No description
1794
+ *
1795
+ * @tags Infos
1796
+ * @name GetInfosCurrentDifficulty
1797
+ * @summary Get the average difficulty of the latest blocks from all shards
1798
+ * @request GET:/infos/current-difficulty
1799
+ */
1800
+ getInfosCurrentDifficulty: (params: RequestParams = {}) =>
1801
+ this.request<string, BadRequest | Unauthorized | NotFound | InternalServerError | ServiceUnavailable>({
1802
+ path: `/infos/current-difficulty`,
1803
+ method: 'GET',
1804
+ format: 'json',
1805
+ ...params
1790
1806
  }).then(convertHttpResponse)
1791
1807
  }
1792
1808
  blockflow = {