@onekeyfe/hd-web-sdk 0.2.3 → 0.2.4

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.
@@ -25273,17 +25273,37 @@ class XrpGetAddress$1 extends BaseMethod {
25273
25273
  }
25274
25274
 
25275
25275
  run() {
25276
+ var _a;
25277
+
25276
25278
  return __awaiter(this, void 0, void 0, function* () {
25277
- const res = yield this.device.commands.typedCall('BatchGetPublickeys', 'EcdsaPublicKeys', {
25278
- paths: this.params,
25279
- ecdsa_curve_name: 'secp256k1'
25280
- });
25281
- const responses = res.message.public_keys.map((publicKey, index) => ({
25282
- path: serializedPath(this.params[index].address_n),
25283
- publicKey,
25284
- address: rippleKeypairs.deriveAddress(publicKey)
25285
- }));
25286
- return responses;
25279
+ if (this.hasBundle && supportBatchPublicKey((_a = this.device) === null || _a === void 0 ? void 0 : _a.features)) {
25280
+ const res = yield this.device.commands.typedCall('BatchGetPublickeys', 'EcdsaPublicKeys', {
25281
+ paths: this.params,
25282
+ ecdsa_curve_name: 'secp256k1'
25283
+ });
25284
+ const result = res.message.public_keys.map((publicKey, index) => ({
25285
+ path: serializedPath(this.params[index].address_n),
25286
+ publicKey,
25287
+ address: rippleKeypairs.deriveAddress(publicKey)
25288
+ }));
25289
+ return Promise.resolve(result);
25290
+ }
25291
+
25292
+ const responses = [];
25293
+
25294
+ for (let i = 0; i < this.params.length; i++) {
25295
+ const param = this.params[i];
25296
+ const res = yield this.device.commands.typedCall('RippleGetAddress', 'RippleAddress', Object.assign({}, param));
25297
+ const {
25298
+ address
25299
+ } = res.message;
25300
+ responses.push({
25301
+ path: serializedPath(param.address_n),
25302
+ address
25303
+ });
25304
+ }
25305
+
25306
+ return Promise.resolve(this.hasBundle ? responses : responses[0]);
25287
25307
  });
25288
25308
  }
25289
25309
 
@@ -71816,7 +71836,7 @@ module.exports = {"i8":"6.5.4"};
71816
71836
  /***/ ((module) => {
71817
71837
 
71818
71838
  "use strict";
71819
- module.exports = JSON.parse('{"name":"@onekeyfe/hd-core","version":"0.2.3","description":"> TODO: description","author":"OneKey","homepage":"https://github.com/OneKeyHQ/hardware-js-sdk#readme","license":"ISC","main":"dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/OneKeyHQ/hardware-js-sdk.git"},"publishConfig":{"access":"public"},"scripts":{"dev":"rimraf dist && rollup -c ../../build/rollup.config.js -w","build":"rimraf dist && rollup -c ../../build/rollup.config.js","lint":"eslint .","lint:fix":"eslint . --fix"},"bugs":{"url":"https://github.com/OneKeyHQ/hardware-js-sdk/issues"},"dependencies":{"@onekeyfe/hd-shared":"^0.2.3","@onekeyfe/hd-transport":"^0.2.3","axios":"^0.27.2","bignumber.js":"^9.0.2","jszip":"^3.10.1","parse-uri":"^1.0.7","semver":"^7.3.7"},"peerDependencies":{"@noble/hashes":"^1.1.3","ripple-keypairs":"^1.1.4"},"devDependencies":{"@noble/hashes":"^1.1.3","ripple-keypairs":"^1.1.4","@types/parse-uri":"^1.0.0","@types/semver":"^7.3.9"}}');
71839
+ module.exports = JSON.parse('{"name":"@onekeyfe/hd-core","version":"0.2.4","description":"> TODO: description","author":"OneKey","homepage":"https://github.com/OneKeyHQ/hardware-js-sdk#readme","license":"ISC","main":"dist/index.js","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/OneKeyHQ/hardware-js-sdk.git"},"publishConfig":{"access":"public"},"scripts":{"dev":"rimraf dist && rollup -c ../../build/rollup.config.js -w","build":"rimraf dist && rollup -c ../../build/rollup.config.js","lint":"eslint .","lint:fix":"eslint . --fix"},"bugs":{"url":"https://github.com/OneKeyHQ/hardware-js-sdk/issues"},"dependencies":{"@onekeyfe/hd-shared":"^0.2.4","@onekeyfe/hd-transport":"^0.2.4","axios":"^0.27.2","bignumber.js":"^9.0.2","jszip":"^3.10.1","parse-uri":"^1.0.7","semver":"^7.3.7"},"peerDependencies":{"@noble/hashes":"^1.1.3","ripple-keypairs":"^1.1.4"},"devDependencies":{"@noble/hashes":"^1.1.3","@types/parse-uri":"^1.0.0","@types/semver":"^7.3.9","ripple-keypairs":"^1.1.4"}}');
71820
71840
 
71821
71841
  /***/ })
71822
71842
 
@@ -74355,7 +74375,7 @@ const src_init = async settings => {
74355
74375
 
74356
74376
  try {
74357
74377
  await init({ ..._settings,
74358
- version: "0.2.3"
74378
+ version: "0.2.4"
74359
74379
  });
74360
74380
  return true;
74361
74381
  } catch (e) {