@ethersphere/bee-js 5.1.0 → 5.1.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.
@@ -71,7 +71,7 @@ export function stake(ky, amount, options) {
71
71
  yield http(ky, {
72
72
  method: 'post',
73
73
  responseType: 'json',
74
- path: `${STAKE_ENDPOINT}/deposit/${amount}`,
74
+ path: `${STAKE_ENDPOINT}/${amount}`,
75
75
  headers
76
76
  });
77
77
  });
@@ -79,6 +79,21 @@ export function getWalletBalance(ky) {
79
79
  path: `${WALLET_ENDPOINT}`,
80
80
  responseType: 'json'
81
81
  });
82
- return response.data;
82
+ return mapWalletProperties(response.data);
83
83
  });
84
+ }
85
+ /**
86
+ * TODO: Remove on next break
87
+ * @param data
88
+ */
89
+
90
+ function mapWalletProperties(data) {
91
+ return Object.assign({
92
+ // @ts-ignore: Needed for backward compatibility mapping
93
+ bzz: data.bzzBalance,
94
+ // @ts-ignore: Needed for backward compatibility mapping
95
+ xDai: data.nativeTokenBalance,
96
+ // @ts-ignore: Needed for backward compatibility mapping
97
+ contractAddress: data.chequebookContractAddress
98
+ }, data);
84
99
  }
@@ -34,9 +34,9 @@ import { http } from "../../utils/http.js";
34
34
  import getMajorSemver from 'semver/functions/major.js'; // Following lines bellow are automatically updated with GitHub Action when Bee version is updated
35
35
  // so if you are changing anything about them change the `update_bee` action accordingly!
36
36
 
37
- export const SUPPORTED_BEE_VERSION_EXACT = '1.9.0-13a47043';
38
- export const SUPPORTED_API_VERSION = '3.2.0';
39
- export const SUPPORTED_DEBUG_API_VERSION = '3.2.0';
37
+ export const SUPPORTED_BEE_VERSION_EXACT = '1.10.0-904cbb08';
38
+ export const SUPPORTED_API_VERSION = '4.0.0';
39
+ export const SUPPORTED_DEBUG_API_VERSION = '4.0.0';
40
40
  export const SUPPORTED_BEE_VERSION = SUPPORTED_BEE_VERSION_EXACT.substring(0, SUPPORTED_BEE_VERSION_EXACT.indexOf('-'));
41
41
  const NODE_INFO_URL = 'node';
42
42
  const HEALTH_URL = 'health';
@@ -1,9 +1,9 @@
1
1
  import type { Health, NodeInfo } from '../../types/debug';
2
2
  import { Ky } from '../../types';
3
3
  import { BeeVersions } from '../../types/debug';
4
- export declare const SUPPORTED_BEE_VERSION_EXACT = "1.9.0-13a47043";
5
- export declare const SUPPORTED_API_VERSION = "3.2.0";
6
- export declare const SUPPORTED_DEBUG_API_VERSION = "3.2.0";
4
+ export declare const SUPPORTED_BEE_VERSION_EXACT = "1.10.0-904cbb08";
5
+ export declare const SUPPORTED_API_VERSION = "4.0.0";
6
+ export declare const SUPPORTED_DEBUG_API_VERSION = "4.0.0";
7
7
  export declare const SUPPORTED_BEE_VERSION: string;
8
8
  /**
9
9
  * Get health of node
@@ -214,18 +214,40 @@ export interface ChainState {
214
214
  export interface WalletBalance {
215
215
  /**
216
216
  * Balance of BZZ tokens
217
+ *
218
+ * @deprecated: Use bzzBalance property instead
217
219
  */
218
220
  bzz: NumberString;
221
+ /**
222
+ * Balance of BZZ tokens
223
+ */
224
+ bzzBalance: NumberString;
219
225
  /**
220
226
  * Balance of xDai
227
+ *
228
+ * @deprecated: Use nativeTokenBalance property instead
221
229
  */
222
230
  xDai: NumberString;
231
+ /**
232
+ * Balance of xDai
233
+ */
234
+ nativeTokenBalance: NumberString;
223
235
  /**
224
236
  * Chain network ID to which the Bee node is connected
225
237
  */
226
238
  chainID: number;
227
239
  /**
228
240
  * Chequebook contract address
241
+ *
242
+ * @deprecated: Use chequebookContractAddress property instead
229
243
  */
230
244
  contractAddress: string;
245
+ /**
246
+ * Chequebook contract address
247
+ */
248
+ chequebookContractAddress: string;
249
+ /**
250
+ * Node's wallet address
251
+ */
252
+ walletAddress: string;
231
253
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ethersphere/bee-js",
3
- "version": "5.1.0",
3
+ "version": "5.1.1",
4
4
  "description": "Javascript client for Bee",
5
5
  "keywords": [
6
6
  "bee",
@@ -88,7 +88,7 @@
88
88
  "@babel/preset-typescript": "^7.14.5",
89
89
  "@commitlint/cli": "^17.0.2",
90
90
  "@commitlint/config-conventional": "^16.2.1",
91
- "@ethersphere/bee-factory": "^0.5.0",
91
+ "@ethersphere/bee-factory": "^0.5.2",
92
92
  "@fluffy-spoon/substitute": "^1.208.0",
93
93
  "@jest/test-sequencer": "^27.5.0",
94
94
  "@jest/types": "^27.5.1",
@@ -135,8 +135,8 @@
135
135
  "engines": {
136
136
  "node": ">=14.0.0",
137
137
  "npm": ">=6.0.0",
138
- "beeApiVersion": "3.2.0",
139
- "beeDebugApiVersion": "3.2.0",
140
- "bee": "1.9.0-13a47043"
138
+ "beeApiVersion": "4.0.0",
139
+ "beeDebugApiVersion": "4.0.0",
140
+ "bee": "1.10.0-904cbb08"
141
141
  }
142
142
  }