@ledgerhq/live-cli 24.17.3 → 24.18.0-nightly.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.
Files changed (2) hide show
  1. package/lib/cli.js +207 -10
  2. package/package.json +3 -3
package/lib/cli.js CHANGED
@@ -436203,6 +436203,94 @@ var require_lib65 = __commonJS({
436203
436203
  }
436204
436204
  });
436205
436205
 
436206
+ // ../../node_modules/.pnpm/@exodus+patch-broken-hermes-typed-arrays@1.0.0-alpha.1/node_modules/@exodus/patch-broken-hermes-typed-arrays/index.js
436207
+ var patch_broken_hermes_typed_arrays_exports = {};
436208
+ var init_patch_broken_hermes_typed_arrays = __esm({
436209
+ "../../node_modules/.pnpm/@exodus+patch-broken-hermes-typed-arrays@1.0.0-alpha.1/node_modules/@exodus/patch-broken-hermes-typed-arrays/index.js"() {
436210
+ "use strict";
436211
+ (function fixHermesTypedArrayBug() {
436212
+ "use strict";
436213
+ var areWeBroken = function() {
436214
+ var called = 0;
436215
+ var ok = true;
436216
+ var TestArray = function(...args3) {
436217
+ called++;
436218
+ var buf2 = new Uint8Array(...args3);
436219
+ Object.setPrototypeOf(buf2, TestArray.prototype);
436220
+ return buf2;
436221
+ };
436222
+ Object.setPrototypeOf(TestArray.prototype, Uint8Array.prototype);
436223
+ Object.setPrototypeOf(TestArray, Uint8Array);
436224
+ var arr = new TestArray(1);
436225
+ ok &&= called === 1;
436226
+ if (arr.subarray(0).constructor !== TestArray)
436227
+ ok = false;
436228
+ ok &&= called === 2;
436229
+ if (arr.map(() => 1).constructor !== TestArray)
436230
+ ok = false;
436231
+ ok &&= called === 3;
436232
+ if (arr.filter(() => true).constructor !== TestArray)
436233
+ ok = false;
436234
+ ok &&= called === 4;
436235
+ if (arr.slice(0).constructor !== TestArray)
436236
+ ok = false;
436237
+ ok &&= called === 5;
436238
+ if (ok) {
436239
+ if (TestArray.of(1, 2).constructor !== TestArray)
436240
+ ok = false;
436241
+ ok &&= called === 6;
436242
+ if (TestArray.from([0]).constructor !== TestArray)
436243
+ ok = false;
436244
+ ok &&= called === 7;
436245
+ }
436246
+ var broken2 = !ok;
436247
+ var shouldPatch2 = broken2 && called === 1 && !Symbol.species && !ArrayBuffer.prototype.resize;
436248
+ return { broken: broken2, shouldPatch: shouldPatch2 };
436249
+ };
436250
+ var { broken, shouldPatch } = areWeBroken();
436251
+ if (!broken)
436252
+ return;
436253
+ var prefix3 = "[@exodus/patch-broken-hermes-typed-arrays] TypedArray support looks broken, ";
436254
+ var reportNotice = " Report this to https://github.com/ExodusMovement/patch-broken-hermes-typed-arrays/issues";
436255
+ if (!shouldPatch)
436256
+ throw new Error(`${prefix3}but we could not fix it.${reportNotice}`);
436257
+ var TypedArray = Object.getPrototypeOf(Uint8Array);
436258
+ var { subarray, map: map129, filter: filter26, slice: slice3 } = TypedArray.prototype;
436259
+ TypedArray.prototype.subarray = function(...args3) {
436260
+ var arr = subarray.apply(this, args3);
436261
+ if (!this.constructor || arr.constructor === this.constructor)
436262
+ return arr;
436263
+ return new this.constructor(arr.buffer, arr.byteOffset, arr.length);
436264
+ };
436265
+ var callTypedArrayCreateCopyWithSizeFromTypedArray = function(instance3, typed) {
436266
+ if (!instance3.constructor || instance3.constructor === typed.constructor)
436267
+ return typed;
436268
+ var { constructor: constructor2 } = instance3;
436269
+ if (instance3._isBuffer && constructor2.name === "Buffer" && Object.hasOwn(constructor2, "TYPED_ARRAY_SUPPORT") && // should not be inherited
436270
+ constructor2.TYPED_ARRAY_SUPPORT === true) {
436271
+ return new constructor2(typed.buffer, typed.byteOffset, typed.length);
436272
+ }
436273
+ var A35 = new constructor2(typed.length);
436274
+ var n46;
436275
+ for (n46 = 0; n46 < typed.length; n46++)
436276
+ A35["" + n46] = typed[n46];
436277
+ return A35;
436278
+ };
436279
+ TypedArray.prototype.map = function(...args3) {
436280
+ return callTypedArrayCreateCopyWithSizeFromTypedArray(this, map129.apply(this, args3));
436281
+ };
436282
+ TypedArray.prototype.filter = function(...args3) {
436283
+ return callTypedArrayCreateCopyWithSizeFromTypedArray(this, filter26.apply(this, args3));
436284
+ };
436285
+ TypedArray.prototype.slice = function(...args3) {
436286
+ return callTypedArrayCreateCopyWithSizeFromTypedArray(this, slice3.apply(this, args3));
436287
+ };
436288
+ if (areWeBroken().broken)
436289
+ throw new Error(`${prefix3}and patch failed to fix it!${reportNotice}`);
436290
+ })();
436291
+ }
436292
+ });
436293
+
436206
436294
  // ../../node_modules/.pnpm/@stablelib+random@1.0.2/node_modules/@stablelib/random/lib/source/browser.js
436207
436295
  var require_browser4 = __commonJS({
436208
436296
  "../../node_modules/.pnpm/@stablelib+random@1.0.2/node_modules/@stablelib/random/lib/source/browser.js"(exports2) {
@@ -528250,7 +528338,7 @@ var require_package8 = __commonJS({
528250
528338
  module2.exports = {
528251
528339
  name: "@ledgerhq/live-common",
528252
528340
  description: "Common ground for the Ledger Live apps",
528253
- version: "34.31.2",
528341
+ version: "34.32.0-nightly.1",
528254
528342
  repository: {
528255
528343
  type: "git",
528256
528344
  url: "https://github.com/LedgerHQ/ledger-live.git"
@@ -535051,7 +535139,7 @@ var require_package9 = __commonJS({
535051
535139
  "package.json"(exports2, module2) {
535052
535140
  module2.exports = {
535053
535141
  name: "@ledgerhq/live-cli",
535054
- version: "24.17.3",
535142
+ version: "24.18.0-nightly.1",
535055
535143
  description: "ledger-live CLI version",
535056
535144
  repository: {
535057
535145
  type: "git",
@@ -545229,6 +545317,35 @@ var cryptocurrenciesById = {
545229
545317
  address: "https://suivision.xyz/account/$address"
545230
545318
  }
545231
545319
  ]
545320
+ },
545321
+ babylon: {
545322
+ type: "CryptoCurrency",
545323
+ id: "babylon",
545324
+ coinType: CoinType.ATOM,
545325
+ name: "Babylon",
545326
+ managerAppName: "Cosmos",
545327
+ ticker: "BABY",
545328
+ scheme: "babylon",
545329
+ color: "#CE6533",
545330
+ family: "cosmos",
545331
+ units: [
545332
+ {
545333
+ name: "Babylon",
545334
+ code: "BABY",
545335
+ magnitude: 6
545336
+ },
545337
+ {
545338
+ name: "micro BBN",
545339
+ code: "ubbn",
545340
+ magnitude: 0
545341
+ }
545342
+ ],
545343
+ explorerViews: [
545344
+ {
545345
+ tx: "https://www.mintscan.io/babylon/txs/$hash",
545346
+ address: "https://www.mintscan.io/babylon/validators/$address"
545347
+ }
545348
+ ]
545232
545349
  }
545233
545350
  };
545234
545351
  var cryptocurrenciesByScheme = {};
@@ -545876,7 +545993,8 @@ var abandonSeedAddresses = {
545876
545993
  zenrock: "zen1704dk997ccmk5x8smn8secphckfvbgxxfd99xxr",
545877
545994
  sonic: EVM_DEAD_ADDRESS,
545878
545995
  sonic_blaze: EVM_DEAD_ADDRESS,
545879
- mina: "B62qmphduibdMJQjEvnnDizL9kVV4ripuiE9adR2wsqtegJaxHJzCic"
545996
+ mina: "B62qmphduibdMJQjEvnnDizL9kVV4ripuiE9adR2wsqtegJaxHJzCic",
545997
+ babylon: "bbn1vh34djka7ug2gww9njrsmmr7emj3dx3paz5sj4"
545880
545998
  };
545881
545999
  var getAbandonSeedAddress = (currencyId) => {
545882
546000
  (0, import_invariant.default)(abandonSeedAddresses[currencyId] !== void 0, `No abandonseed available for ${currencyId}`);
@@ -556240,7 +556358,8 @@ setSupportedCurrencies([
556240
556358
  "zenrock",
556241
556359
  "sonic",
556242
556360
  "sonic_blaze",
556243
- "mina"
556361
+ "mina",
556362
+ "babylon"
556244
556363
  ]);
556245
556364
  for (const k13 in process.env)
556246
556365
  setEnvUnsafe(k13, process.env[k13]);
@@ -606501,6 +606620,24 @@ var Zenrock = class extends cosmosBase_default {
606501
606620
  };
606502
606621
  var Zenrock_default = Zenrock;
606503
606622
 
606623
+ // ../../libs/coin-modules/coin-cosmos/lib-es/chain/Babylon.js
606624
+ var Babylon = class extends cosmosBase_default {
606625
+ stakingDocUrl;
606626
+ unbondingPeriod;
606627
+ prefix;
606628
+ validatorPrefix;
606629
+ // Provided by coin config
606630
+ ledgerValidator;
606631
+ lcd;
606632
+ constructor() {
606633
+ super();
606634
+ this.stakingDocUrl = "";
606635
+ this.unbondingPeriod = 2;
606636
+ this.prefix = "bbn";
606637
+ this.validatorPrefix = `${this.prefix}valoper`;
606638
+ }
606639
+ };
606640
+
606504
606641
  // ../../libs/coin-modules/coin-cosmos/lib-es/chain/chain.js
606505
606642
  var cosmosChainParams = {};
606506
606643
  function cryptoFactory2(currencyId) {
@@ -606571,6 +606708,9 @@ function cryptoFactory2(currencyId) {
606571
606708
  case "zenrock":
606572
606709
  cosmosChainParams[currencyId] = new Zenrock_default();
606573
606710
  break;
606711
+ case "babylon":
606712
+ cosmosChainParams[currencyId] = new Babylon();
606713
+ break;
606574
606714
  default:
606575
606715
  throw new Error(`${currencyId} is not supported`);
606576
606716
  }
@@ -607150,6 +607290,18 @@ var cosmosConfig = {
607150
607290
  type: "active"
607151
607291
  }
607152
607292
  }
607293
+ },
607294
+ config_currency_babylon: {
607295
+ type: "object",
607296
+ default: {
607297
+ lcd: "https://babylon.nodes.guru/api",
607298
+ minGasPrice: 2e-3,
607299
+ // source: https://www.mintscan.io/babylon/parameters
607300
+ status: {
607301
+ type: "active"
607302
+ },
607303
+ disableDelegation: true
607304
+ }
607153
607305
  }
607154
607306
  };
607155
607307
  var coinConfig3 = config_default();
@@ -620954,7 +621106,7 @@ var explorerApi = {
620954
621106
  var etherscan_default = explorerApi;
620955
621107
 
620956
621108
  // ../../libs/coin-modules/coin-evm/lib-es/api/explorer/ledger.js
620957
- var BATCH_SIZE = 1e4;
621109
+ var DEFAULT_BATCH_SIZE = 1e4;
620958
621110
  var LEDGER_TIMEOUT2 = 200;
620959
621111
  var DEFAULT_RETRIES_API3 = 2;
620960
621112
  async function fetchPaginatedOpsWithRetries(params, paginationToken = null, previousOperations = [], retries = DEFAULT_RETRIES_API3) {
@@ -620968,7 +621120,7 @@ async function fetchPaginatedOpsWithRetries(params, paginationToken = null, prev
620968
621120
  from_height: params.fromBlock ?? 0,
620969
621121
  order: "ascending",
620970
621122
  // Needed to make sure we get transactions after the block height and not before. Order is still descending in the end
620971
- batch_size: BATCH_SIZE,
621123
+ batch_size: params.batchSize,
620972
621124
  token: paginationToken
620973
621125
  }
620974
621126
  });
@@ -620995,7 +621147,8 @@ var getLastOperations2 = async (currency24, address4, accountId2, fromBlock) =>
620995
621147
  const ledgerExplorerOps = await fetchPaginatedOpsWithRetries({
620996
621148
  explorerId: explorer.explorerId,
620997
621149
  address: address4,
620998
- fromBlock
621150
+ fromBlock,
621151
+ batchSize: explorer.batchSize ?? DEFAULT_BATCH_SIZE
620999
621152
  });
621000
621153
  const lastCoinOperations = [];
621001
621154
  const lastTokenOperations = [];
@@ -771489,7 +771642,7 @@ async function validateRecipientCommon(mainAccount, tx, errors, warnings3, api8,
771489
771642
  }
771490
771643
  const mintTokenAccount = await getMaybeMintAccount(tx.recipient, api8);
771491
771644
  if (mintTokenAccount instanceof Error) {
771492
- throw recipientTokenAccount;
771645
+ throw mintTokenAccount;
771493
771646
  }
771494
771647
  if (mintTokenAccount) {
771495
771648
  errors.recipient = new SolanaMintAccountNotAllowed();
@@ -779077,6 +779230,38 @@ function getOperationType7(operation, addr) {
779077
779230
  }
779078
779231
  }
779079
779232
 
779233
+ // ../../libs/coin-modules/coin-stellar/lib-es/polyfill.js
779234
+ init_lib_es2();
779235
+ var OriginalTypedArrayMethods = {
779236
+ subarray: Uint8Array.prototype.subarray,
779237
+ slice: Uint8Array.prototype.slice,
779238
+ map: Uint8Array.prototype.map,
779239
+ filter: Uint8Array.prototype.filter
779240
+ };
779241
+ var hermesTypedArrayPatched = false;
779242
+ function patchHermesTypedArraysIfNeeded() {
779243
+ if (global.HermesInternal && !hermesTypedArrayPatched) {
779244
+ try {
779245
+ log2("coin:stellar", "\u{1F535} Patching TypedArray because of Hermes bug");
779246
+ init_patch_broken_hermes_typed_arrays();
779247
+ hermesTypedArrayPatched = true;
779248
+ } catch (e38) {
779249
+ log2("coin:stellar", "Failed to patch typed arrays");
779250
+ }
779251
+ }
779252
+ }
779253
+ function unpatchHermesTypedArrays() {
779254
+ if (hermesTypedArrayPatched) {
779255
+ const TypedArray = Object.getPrototypeOf(Uint8Array);
779256
+ TypedArray.prototype.subarray = OriginalTypedArrayMethods.subarray;
779257
+ TypedArray.prototype.slice = OriginalTypedArrayMethods.slice;
779258
+ TypedArray.prototype.map = OriginalTypedArrayMethods.map;
779259
+ TypedArray.prototype.filter = OriginalTypedArrayMethods.filter;
779260
+ log2("coin:stellar", "\u{1F7E2} Reverted TypedArray methods to originals");
779261
+ hermesTypedArrayPatched = false;
779262
+ }
779263
+ }
779264
+
779080
779265
  // ../../libs/coin-modules/coin-stellar/lib-es/network/horizon.js
779081
779266
  var FALLBACK_BASE_FEE = 100;
779082
779267
  var TRESHOLD_LOW = 0.5;
@@ -779252,7 +779437,9 @@ async function fetchSigners(account3) {
779252
779437
  }
779253
779438
  }
779254
779439
  async function broadcastTransaction8(signedTransaction) {
779440
+ patchHermesTypedArraysIfNeeded();
779255
779441
  const transaction = new import_stellar_sdk.Transaction(signedTransaction, import_stellar_sdk.Networks.PUBLIC);
779442
+ unpatchHermesTypedArrays();
779256
779443
  const res = await getServer().submitTransaction(transaction, {
779257
779444
  skipMemoRequiredCheck: true
779258
779445
  });
@@ -824078,7 +824265,8 @@ var evmConfig = {
824078
824265
  },
824079
824266
  explorer: {
824080
824267
  type: "ledger",
824081
- explorerId: "matic"
824268
+ explorerId: "matic",
824269
+ batchSize: 10
824082
824270
  },
824083
824271
  gasTracker: {
824084
824272
  type: "ledger",
@@ -827508,6 +827696,14 @@ var zenrock = {
827508
827696
  skipOperationHistory: true
827509
827697
  })
827510
827698
  };
827699
+ var babylonMinimalTransactionAmount = new import_bignumber376.BigNumber(2e4);
827700
+ var babylon = {
827701
+ ...generateGenericCosmosTest("babylon", false, {
827702
+ minViableAmount: babylonMinimalTransactionAmount,
827703
+ mutations: cosmosLikeMutations(babylonMinimalTransactionAmount),
827704
+ skipOperationHistory: true
827705
+ })
827706
+ };
827511
827707
  var specs_default4 = {
827512
827708
  axelar,
827513
827709
  cosmos: cosmos2,
@@ -827526,7 +827722,8 @@ var specs_default4 = {
827526
827722
  mantra,
827527
827723
  cryptoOrg,
827528
827724
  xion,
827529
- zenrock
827725
+ zenrock,
827726
+ babylon
827530
827727
  };
827531
827728
 
827532
827729
  // ../../libs/coin-modules/coin-evm/lib-es/specs.js
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/live-cli",
3
- "version": "24.17.3",
3
+ "version": "24.18.0-nightly.1",
4
4
  "description": "ledger-live CLI version",
5
5
  "repository": {
6
6
  "type": "git",
@@ -55,8 +55,8 @@
55
55
  "@types/ws": "8.5.10",
56
56
  "ts-node": "10.9.2",
57
57
  "tsup": "7.3.0",
58
- "@ledgerhq/types-cryptoassets": "^7.22.0",
59
- "@ledgerhq/types-live": "^6.68.0"
58
+ "@ledgerhq/types-cryptoassets": "^7.23.0-nightly.0",
59
+ "@ledgerhq/types-live": "^6.69.0-nightly.1"
60
60
  },
61
61
  "publishConfig": {
62
62
  "directory": "dist"