@ledgerhq/live-cli 24.21.3-nightly.8 → 24.21.3-nightly.9

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 +540 -9
  2. package/package.json +1 -1
package/lib/cli.js CHANGED
@@ -516720,7 +516720,7 @@ var require_package7 = __commonJS({
516720
516720
  module2.exports = {
516721
516721
  name: "@ledgerhq/live-common",
516722
516722
  description: "Common ground for the Ledger Live apps",
516723
- version: "34.47.0-nightly.8",
516723
+ version: "34.47.0-nightly.9",
516724
516724
  repository: {
516725
516725
  type: "git",
516726
516726
  url: "https://github.com/LedgerHQ/ledger-live.git"
@@ -517108,6 +517108,526 @@ var require_testecc = __commonJS({
517108
517108
  }
517109
517109
  });
517110
517110
 
517111
+ // ../../node_modules/.pnpm/@scure+base@1.2.6/node_modules/@scure/base/lib/index.js
517112
+ var require_lib67 = __commonJS({
517113
+ "../../node_modules/.pnpm/@scure+base@1.2.6/node_modules/@scure/base/lib/index.js"(exports2) {
517114
+ "use strict";
517115
+ Object.defineProperty(exports2, "__esModule", { value: true });
517116
+ exports2.bytes = exports2.stringToBytes = exports2.str = exports2.bytesToString = exports2.hex = exports2.utf8 = exports2.bech32m = exports2.bech32 = exports2.base58check = exports2.createBase58check = exports2.base58xmr = exports2.base58xrp = exports2.base58flickr = exports2.base58 = exports2.base64urlnopad = exports2.base64url = exports2.base64nopad = exports2.base64 = exports2.base32crockford = exports2.base32hexnopad = exports2.base32hex = exports2.base32nopad = exports2.base32 = exports2.base16 = exports2.utils = void 0;
517117
+ function isBytes6(a63) {
517118
+ return a63 instanceof Uint8Array || ArrayBuffer.isView(a63) && a63.constructor.name === "Uint8Array";
517119
+ }
517120
+ function abytes2(b18, ...lengths) {
517121
+ if (!isBytes6(b18))
517122
+ throw new Error("Uint8Array expected");
517123
+ if (lengths.length > 0 && !lengths.includes(b18.length))
517124
+ throw new Error("Uint8Array expected of length " + lengths + ", got length=" + b18.length);
517125
+ }
517126
+ function isArrayOf2(isString6, arr) {
517127
+ if (!Array.isArray(arr))
517128
+ return false;
517129
+ if (arr.length === 0)
517130
+ return true;
517131
+ if (isString6) {
517132
+ return arr.every((item) => typeof item === "string");
517133
+ } else {
517134
+ return arr.every((item) => Number.isSafeInteger(item));
517135
+ }
517136
+ }
517137
+ function afn2(input) {
517138
+ if (typeof input !== "function")
517139
+ throw new Error("function expected");
517140
+ return true;
517141
+ }
517142
+ function astr2(label, input) {
517143
+ if (typeof input !== "string")
517144
+ throw new Error(`${label}: string expected`);
517145
+ return true;
517146
+ }
517147
+ function anumber3(n113) {
517148
+ if (!Number.isSafeInteger(n113))
517149
+ throw new Error(`invalid integer: ${n113}`);
517150
+ }
517151
+ function aArr2(input) {
517152
+ if (!Array.isArray(input))
517153
+ throw new Error("array expected");
517154
+ }
517155
+ function astrArr2(label, input) {
517156
+ if (!isArrayOf2(true, input))
517157
+ throw new Error(`${label}: array of strings expected`);
517158
+ }
517159
+ function anumArr2(label, input) {
517160
+ if (!isArrayOf2(false, input))
517161
+ throw new Error(`${label}: array of numbers expected`);
517162
+ }
517163
+ // @__NO_SIDE_EFFECTS__
517164
+ function chain5(...args3) {
517165
+ const id6 = (a63) => a63;
517166
+ const wrap4 = (a63, b18) => (c56) => a63(b18(c56));
517167
+ const encode26 = args3.map((x20) => x20.encode).reduceRight(wrap4, id6);
517168
+ const decode29 = args3.map((x20) => x20.decode).reduce(wrap4, id6);
517169
+ return { encode: encode26, decode: decode29 };
517170
+ }
517171
+ // @__NO_SIDE_EFFECTS__
517172
+ function alphabet4(letters) {
517173
+ const lettersA = typeof letters === "string" ? letters.split("") : letters;
517174
+ const len = lettersA.length;
517175
+ astrArr2("alphabet", lettersA);
517176
+ const indexes3 = new Map(lettersA.map((l66, i56) => [l66, i56]));
517177
+ return {
517178
+ encode: (digits) => {
517179
+ aArr2(digits);
517180
+ return digits.map((i56) => {
517181
+ if (!Number.isSafeInteger(i56) || i56 < 0 || i56 >= len)
517182
+ throw new Error(`alphabet.encode: digit index outside alphabet "${i56}". Allowed: ${letters}`);
517183
+ return lettersA[i56];
517184
+ });
517185
+ },
517186
+ decode: (input) => {
517187
+ aArr2(input);
517188
+ return input.map((letter) => {
517189
+ astr2("alphabet.decode", letter);
517190
+ const i56 = indexes3.get(letter);
517191
+ if (i56 === void 0)
517192
+ throw new Error(`Unknown letter: "${letter}". Allowed: ${letters}`);
517193
+ return i56;
517194
+ });
517195
+ }
517196
+ };
517197
+ }
517198
+ // @__NO_SIDE_EFFECTS__
517199
+ function join4(separator = "") {
517200
+ astr2("join", separator);
517201
+ return {
517202
+ encode: (from91) => {
517203
+ astrArr2("join.decode", from91);
517204
+ return from91.join(separator);
517205
+ },
517206
+ decode: (to) => {
517207
+ astr2("join.decode", to);
517208
+ return to.split(separator);
517209
+ }
517210
+ };
517211
+ }
517212
+ // @__NO_SIDE_EFFECTS__
517213
+ function padding3(bits2, chr = "=") {
517214
+ anumber3(bits2);
517215
+ astr2("padding", chr);
517216
+ return {
517217
+ encode(data9) {
517218
+ astrArr2("padding.encode", data9);
517219
+ while (data9.length * bits2 % 8)
517220
+ data9.push(chr);
517221
+ return data9;
517222
+ },
517223
+ decode(input) {
517224
+ astrArr2("padding.decode", input);
517225
+ let end = input.length;
517226
+ if (end * bits2 % 8)
517227
+ throw new Error("padding: invalid, string should have whole number of bytes");
517228
+ for (; end > 0 && input[end - 1] === chr; end--) {
517229
+ const last = end - 1;
517230
+ const byte = last * bits2;
517231
+ if (byte % 8 === 0)
517232
+ throw new Error("padding: invalid, string has too much padding");
517233
+ }
517234
+ return input.slice(0, end);
517235
+ }
517236
+ };
517237
+ }
517238
+ // @__NO_SIDE_EFFECTS__
517239
+ function normalize4(fn3) {
517240
+ afn2(fn3);
517241
+ return { encode: (from91) => from91, decode: (to) => fn3(to) };
517242
+ }
517243
+ function convertRadix4(data9, from91, to) {
517244
+ if (from91 < 2)
517245
+ throw new Error(`convertRadix: invalid from=${from91}, base cannot be less than 2`);
517246
+ if (to < 2)
517247
+ throw new Error(`convertRadix: invalid to=${to}, base cannot be less than 2`);
517248
+ aArr2(data9);
517249
+ if (!data9.length)
517250
+ return [];
517251
+ let pos = 0;
517252
+ const res = [];
517253
+ const digits = Array.from(data9, (d54) => {
517254
+ anumber3(d54);
517255
+ if (d54 < 0 || d54 >= from91)
517256
+ throw new Error(`invalid integer: ${d54}`);
517257
+ return d54;
517258
+ });
517259
+ const dlen = digits.length;
517260
+ while (true) {
517261
+ let carry = 0;
517262
+ let done = true;
517263
+ for (let i56 = pos; i56 < dlen; i56++) {
517264
+ const digit = digits[i56];
517265
+ const fromCarry = from91 * carry;
517266
+ const digitBase = fromCarry + digit;
517267
+ if (!Number.isSafeInteger(digitBase) || fromCarry / from91 !== carry || digitBase - digit !== fromCarry) {
517268
+ throw new Error("convertRadix: carry overflow");
517269
+ }
517270
+ const div = digitBase / to;
517271
+ carry = digitBase % to;
517272
+ const rounded = Math.floor(div);
517273
+ digits[i56] = rounded;
517274
+ if (!Number.isSafeInteger(rounded) || rounded * to + carry !== digitBase)
517275
+ throw new Error("convertRadix: carry overflow");
517276
+ if (!done)
517277
+ continue;
517278
+ else if (!rounded)
517279
+ pos = i56;
517280
+ else
517281
+ done = false;
517282
+ }
517283
+ res.push(carry);
517284
+ if (done)
517285
+ break;
517286
+ }
517287
+ for (let i56 = 0; i56 < data9.length - 1 && data9[i56] === 0; i56++)
517288
+ res.push(0);
517289
+ return res.reverse();
517290
+ }
517291
+ var gcd = (a63, b18) => b18 === 0 ? a63 : gcd(b18, a63 % b18);
517292
+ var radix2carry = /* @__NO_SIDE_EFFECTS__ */ (from91, to) => from91 + (to - gcd(from91, to));
517293
+ var powers = /* @__PURE__ */ (() => {
517294
+ let res = [];
517295
+ for (let i56 = 0; i56 < 40; i56++)
517296
+ res.push(2 ** i56);
517297
+ return res;
517298
+ })();
517299
+ function convertRadix22(data9, from91, to, padding4) {
517300
+ aArr2(data9);
517301
+ if (from91 <= 0 || from91 > 32)
517302
+ throw new Error(`convertRadix2: wrong from=${from91}`);
517303
+ if (to <= 0 || to > 32)
517304
+ throw new Error(`convertRadix2: wrong to=${to}`);
517305
+ if (/* @__PURE__ */ radix2carry(from91, to) > 32) {
517306
+ throw new Error(`convertRadix2: carry overflow from=${from91} to=${to} carryBits=${/* @__PURE__ */ radix2carry(from91, to)}`);
517307
+ }
517308
+ let carry = 0;
517309
+ let pos = 0;
517310
+ const max2 = powers[from91];
517311
+ const mask5 = powers[to] - 1;
517312
+ const res = [];
517313
+ for (const n113 of data9) {
517314
+ anumber3(n113);
517315
+ if (n113 >= max2)
517316
+ throw new Error(`convertRadix2: invalid data word=${n113} from=${from91}`);
517317
+ carry = carry << from91 | n113;
517318
+ if (pos + from91 > 32)
517319
+ throw new Error(`convertRadix2: carry overflow pos=${pos} from=${from91}`);
517320
+ pos += from91;
517321
+ for (; pos >= to; pos -= to)
517322
+ res.push((carry >> pos - to & mask5) >>> 0);
517323
+ const pow3 = powers[pos];
517324
+ if (pow3 === void 0)
517325
+ throw new Error("invalid carry");
517326
+ carry &= pow3 - 1;
517327
+ }
517328
+ carry = carry << to - pos & mask5;
517329
+ if (!padding4 && pos >= from91)
517330
+ throw new Error("Excess padding");
517331
+ if (!padding4 && carry > 0)
517332
+ throw new Error(`Non-zero padding: ${carry}`);
517333
+ if (padding4 && pos > 0)
517334
+ res.push(carry >>> 0);
517335
+ return res;
517336
+ }
517337
+ // @__NO_SIDE_EFFECTS__
517338
+ function radix3(num) {
517339
+ anumber3(num);
517340
+ const _256 = 2 ** 8;
517341
+ return {
517342
+ encode: (bytes5) => {
517343
+ if (!isBytes6(bytes5))
517344
+ throw new Error("radix.encode input should be Uint8Array");
517345
+ return convertRadix4(Array.from(bytes5), _256, num);
517346
+ },
517347
+ decode: (digits) => {
517348
+ anumArr2("radix.decode", digits);
517349
+ return Uint8Array.from(convertRadix4(digits, num, _256));
517350
+ }
517351
+ };
517352
+ }
517353
+ // @__NO_SIDE_EFFECTS__
517354
+ function radix22(bits2, revPadding = false) {
517355
+ anumber3(bits2);
517356
+ if (bits2 <= 0 || bits2 > 32)
517357
+ throw new Error("radix2: bits should be in (0..32]");
517358
+ if (/* @__PURE__ */ radix2carry(8, bits2) > 32 || /* @__PURE__ */ radix2carry(bits2, 8) > 32)
517359
+ throw new Error("radix2: carry overflow");
517360
+ return {
517361
+ encode: (bytes5) => {
517362
+ if (!isBytes6(bytes5))
517363
+ throw new Error("radix2.encode input should be Uint8Array");
517364
+ return convertRadix22(Array.from(bytes5), 8, bits2, !revPadding);
517365
+ },
517366
+ decode: (digits) => {
517367
+ anumArr2("radix2.decode", digits);
517368
+ return Uint8Array.from(convertRadix22(digits, bits2, 8, revPadding));
517369
+ }
517370
+ };
517371
+ }
517372
+ function unsafeWrapper(fn3) {
517373
+ afn2(fn3);
517374
+ return function(...args3) {
517375
+ try {
517376
+ return fn3.apply(null, args3);
517377
+ } catch (e36) {
517378
+ }
517379
+ };
517380
+ }
517381
+ function checksum14(len, fn3) {
517382
+ anumber3(len);
517383
+ afn2(fn3);
517384
+ return {
517385
+ encode(data9) {
517386
+ if (!isBytes6(data9))
517387
+ throw new Error("checksum.encode: input should be Uint8Array");
517388
+ const sum2 = fn3(data9).slice(0, len);
517389
+ const res = new Uint8Array(data9.length + len);
517390
+ res.set(data9);
517391
+ res.set(sum2, data9.length);
517392
+ return res;
517393
+ },
517394
+ decode(data9) {
517395
+ if (!isBytes6(data9))
517396
+ throw new Error("checksum.decode: input should be Uint8Array");
517397
+ const payload = data9.slice(0, -len);
517398
+ const oldChecksum = data9.slice(-len);
517399
+ const newChecksum = fn3(payload).slice(0, len);
517400
+ for (let i56 = 0; i56 < len; i56++)
517401
+ if (newChecksum[i56] !== oldChecksum[i56])
517402
+ throw new Error("Invalid checksum");
517403
+ return payload;
517404
+ }
517405
+ };
517406
+ }
517407
+ exports2.utils = {
517408
+ alphabet: alphabet4,
517409
+ chain: chain5,
517410
+ checksum: checksum14,
517411
+ convertRadix: convertRadix4,
517412
+ convertRadix2: convertRadix22,
517413
+ radix: radix3,
517414
+ radix2: radix22,
517415
+ join: join4,
517416
+ padding: padding3
517417
+ };
517418
+ exports2.base16 = /* @__PURE__ */ chain5(/* @__PURE__ */ radix22(4), /* @__PURE__ */ alphabet4("0123456789ABCDEF"), /* @__PURE__ */ join4(""));
517419
+ exports2.base32 = /* @__PURE__ */ chain5(/* @__PURE__ */ radix22(5), /* @__PURE__ */ alphabet4("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"), /* @__PURE__ */ padding3(5), /* @__PURE__ */ join4(""));
517420
+ exports2.base32nopad = /* @__PURE__ */ chain5(/* @__PURE__ */ radix22(5), /* @__PURE__ */ alphabet4("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"), /* @__PURE__ */ join4(""));
517421
+ exports2.base32hex = /* @__PURE__ */ chain5(/* @__PURE__ */ radix22(5), /* @__PURE__ */ alphabet4("0123456789ABCDEFGHIJKLMNOPQRSTUV"), /* @__PURE__ */ padding3(5), /* @__PURE__ */ join4(""));
517422
+ exports2.base32hexnopad = /* @__PURE__ */ chain5(/* @__PURE__ */ radix22(5), /* @__PURE__ */ alphabet4("0123456789ABCDEFGHIJKLMNOPQRSTUV"), /* @__PURE__ */ join4(""));
517423
+ exports2.base32crockford = /* @__PURE__ */ chain5(/* @__PURE__ */ radix22(5), /* @__PURE__ */ alphabet4("0123456789ABCDEFGHJKMNPQRSTVWXYZ"), /* @__PURE__ */ join4(""), /* @__PURE__ */ normalize4((s48) => s48.toUpperCase().replace(/O/g, "0").replace(/[IL]/g, "1")));
517424
+ var hasBase64Builtin = /* @__PURE__ */ (() => typeof Uint8Array.from([]).toBase64 === "function" && typeof Uint8Array.fromBase64 === "function")();
517425
+ var decodeBase64Builtin = (s48, isUrl) => {
517426
+ astr2("base64", s48);
517427
+ const re3 = isUrl ? /^[A-Za-z0-9=_-]+$/ : /^[A-Za-z0-9=+/]+$/;
517428
+ const alphabet5 = isUrl ? "base64url" : "base64";
517429
+ if (s48.length > 0 && !re3.test(s48))
517430
+ throw new Error("invalid base64");
517431
+ return Uint8Array.fromBase64(s48, { alphabet: alphabet5, lastChunkHandling: "strict" });
517432
+ };
517433
+ exports2.base64 = hasBase64Builtin ? {
517434
+ encode(b18) {
517435
+ abytes2(b18);
517436
+ return b18.toBase64();
517437
+ },
517438
+ decode(s48) {
517439
+ return decodeBase64Builtin(s48, false);
517440
+ }
517441
+ } : /* @__PURE__ */ chain5(/* @__PURE__ */ radix22(6), /* @__PURE__ */ alphabet4("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"), /* @__PURE__ */ padding3(6), /* @__PURE__ */ join4(""));
517442
+ exports2.base64nopad = /* @__PURE__ */ chain5(/* @__PURE__ */ radix22(6), /* @__PURE__ */ alphabet4("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"), /* @__PURE__ */ join4(""));
517443
+ exports2.base64url = hasBase64Builtin ? {
517444
+ encode(b18) {
517445
+ abytes2(b18);
517446
+ return b18.toBase64({ alphabet: "base64url" });
517447
+ },
517448
+ decode(s48) {
517449
+ return decodeBase64Builtin(s48, true);
517450
+ }
517451
+ } : /* @__PURE__ */ chain5(/* @__PURE__ */ radix22(6), /* @__PURE__ */ alphabet4("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"), /* @__PURE__ */ padding3(6), /* @__PURE__ */ join4(""));
517452
+ exports2.base64urlnopad = /* @__PURE__ */ chain5(/* @__PURE__ */ radix22(6), /* @__PURE__ */ alphabet4("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"), /* @__PURE__ */ join4(""));
517453
+ var genBase583 = /* @__NO_SIDE_EFFECTS__ */ (abc) => /* @__PURE__ */ chain5(/* @__PURE__ */ radix3(58), /* @__PURE__ */ alphabet4(abc), /* @__PURE__ */ join4(""));
517454
+ exports2.base58 = /* @__PURE__ */ genBase583("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");
517455
+ exports2.base58flickr = /* @__PURE__ */ genBase583("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ");
517456
+ exports2.base58xrp = /* @__PURE__ */ genBase583("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz");
517457
+ var XMR_BLOCK_LEN = [0, 2, 3, 5, 6, 7, 9, 10, 11];
517458
+ exports2.base58xmr = {
517459
+ encode(data9) {
517460
+ let res = "";
517461
+ for (let i56 = 0; i56 < data9.length; i56 += 8) {
517462
+ const block2 = data9.subarray(i56, i56 + 8);
517463
+ res += exports2.base58.encode(block2).padStart(XMR_BLOCK_LEN[block2.length], "1");
517464
+ }
517465
+ return res;
517466
+ },
517467
+ decode(str) {
517468
+ let res = [];
517469
+ for (let i56 = 0; i56 < str.length; i56 += 11) {
517470
+ const slice3 = str.slice(i56, i56 + 11);
517471
+ const blockLen = XMR_BLOCK_LEN.indexOf(slice3.length);
517472
+ const block2 = exports2.base58.decode(slice3);
517473
+ for (let j7 = 0; j7 < block2.length - blockLen; j7++) {
517474
+ if (block2[j7] !== 0)
517475
+ throw new Error("base58xmr: wrong padding");
517476
+ }
517477
+ res = res.concat(Array.from(block2.slice(block2.length - blockLen)));
517478
+ }
517479
+ return Uint8Array.from(res);
517480
+ }
517481
+ };
517482
+ var createBase58check2 = (sha25613) => /* @__PURE__ */ chain5(checksum14(4, (data9) => sha25613(sha25613(data9))), exports2.base58);
517483
+ exports2.createBase58check = createBase58check2;
517484
+ exports2.base58check = exports2.createBase58check;
517485
+ var BECH_ALPHABET = /* @__PURE__ */ chain5(/* @__PURE__ */ alphabet4("qpzry9x8gf2tvdw0s3jn54khce6mua7l"), /* @__PURE__ */ join4(""));
517486
+ var POLYMOD_GENERATORS = [996825010, 642813549, 513874426, 1027748829, 705979059];
517487
+ function bech32Polymod(pre) {
517488
+ const b18 = pre >> 25;
517489
+ let chk = (pre & 33554431) << 5;
517490
+ for (let i56 = 0; i56 < POLYMOD_GENERATORS.length; i56++) {
517491
+ if ((b18 >> i56 & 1) === 1)
517492
+ chk ^= POLYMOD_GENERATORS[i56];
517493
+ }
517494
+ return chk;
517495
+ }
517496
+ function bechChecksum(prefix3, words13, encodingConst = 1) {
517497
+ const len = prefix3.length;
517498
+ let chk = 1;
517499
+ for (let i56 = 0; i56 < len; i56++) {
517500
+ const c56 = prefix3.charCodeAt(i56);
517501
+ if (c56 < 33 || c56 > 126)
517502
+ throw new Error(`Invalid prefix (${prefix3})`);
517503
+ chk = bech32Polymod(chk) ^ c56 >> 5;
517504
+ }
517505
+ chk = bech32Polymod(chk);
517506
+ for (let i56 = 0; i56 < len; i56++)
517507
+ chk = bech32Polymod(chk) ^ prefix3.charCodeAt(i56) & 31;
517508
+ for (let v31 of words13)
517509
+ chk = bech32Polymod(chk) ^ v31;
517510
+ for (let i56 = 0; i56 < 6; i56++)
517511
+ chk = bech32Polymod(chk);
517512
+ chk ^= encodingConst;
517513
+ return BECH_ALPHABET.encode(convertRadix22([chk % powers[30]], 30, 5, false));
517514
+ }
517515
+ // @__NO_SIDE_EFFECTS__
517516
+ function genBech32(encoding) {
517517
+ const ENCODING_CONST2 = encoding === "bech32" ? 1 : 734539939;
517518
+ const _words = /* @__PURE__ */ radix22(5);
517519
+ const fromWords4 = _words.decode;
517520
+ const toWords3 = _words.encode;
517521
+ const fromWordsUnsafe2 = unsafeWrapper(fromWords4);
517522
+ function encode26(prefix3, words13, limit = 90) {
517523
+ astr2("bech32.encode prefix", prefix3);
517524
+ if (isBytes6(words13))
517525
+ words13 = Array.from(words13);
517526
+ anumArr2("bech32.encode", words13);
517527
+ const plen = prefix3.length;
517528
+ if (plen === 0)
517529
+ throw new TypeError(`Invalid prefix length ${plen}`);
517530
+ const actualLength = plen + 7 + words13.length;
517531
+ if (limit !== false && actualLength > limit)
517532
+ throw new TypeError(`Length ${actualLength} exceeds limit ${limit}`);
517533
+ const lowered = prefix3.toLowerCase();
517534
+ const sum2 = bechChecksum(lowered, words13, ENCODING_CONST2);
517535
+ return `${lowered}1${BECH_ALPHABET.encode(words13)}${sum2}`;
517536
+ }
517537
+ function decode29(str, limit = 90) {
517538
+ astr2("bech32.decode input", str);
517539
+ const slen = str.length;
517540
+ if (slen < 8 || limit !== false && slen > limit)
517541
+ throw new TypeError(`invalid string length: ${slen} (${str}). Expected (8..${limit})`);
517542
+ const lowered = str.toLowerCase();
517543
+ if (str !== lowered && str !== str.toUpperCase())
517544
+ throw new Error(`String must be lowercase or uppercase`);
517545
+ const sepIndex = lowered.lastIndexOf("1");
517546
+ if (sepIndex === 0 || sepIndex === -1)
517547
+ throw new Error(`Letter "1" must be present between prefix and data only`);
517548
+ const prefix3 = lowered.slice(0, sepIndex);
517549
+ const data9 = lowered.slice(sepIndex + 1);
517550
+ if (data9.length < 6)
517551
+ throw new Error("Data must be at least 6 characters long");
517552
+ const words13 = BECH_ALPHABET.decode(data9).slice(0, -6);
517553
+ const sum2 = bechChecksum(prefix3, words13, ENCODING_CONST2);
517554
+ if (!data9.endsWith(sum2))
517555
+ throw new Error(`Invalid checksum in ${str}: expected "${sum2}"`);
517556
+ return { prefix: prefix3, words: words13 };
517557
+ }
517558
+ const decodeUnsafe4 = unsafeWrapper(decode29);
517559
+ function decodeToBytes(str) {
517560
+ const { prefix: prefix3, words: words13 } = decode29(str, false);
517561
+ return { prefix: prefix3, words: words13, bytes: fromWords4(words13) };
517562
+ }
517563
+ function encodeFromBytes(prefix3, bytes5) {
517564
+ return encode26(prefix3, toWords3(bytes5));
517565
+ }
517566
+ return {
517567
+ encode: encode26,
517568
+ decode: decode29,
517569
+ encodeFromBytes,
517570
+ decodeToBytes,
517571
+ decodeUnsafe: decodeUnsafe4,
517572
+ fromWords: fromWords4,
517573
+ fromWordsUnsafe: fromWordsUnsafe2,
517574
+ toWords: toWords3
517575
+ };
517576
+ }
517577
+ exports2.bech32 = /* @__PURE__ */ genBech32("bech32");
517578
+ exports2.bech32m = /* @__PURE__ */ genBech32("bech32m");
517579
+ exports2.utf8 = {
517580
+ encode: (data9) => new TextDecoder().decode(data9),
517581
+ decode: (str) => new TextEncoder().encode(str)
517582
+ };
517583
+ var hasHexBuiltin2 = /* @__PURE__ */ (() => typeof Uint8Array.from([]).toHex === "function" && typeof Uint8Array.fromHex === "function")();
517584
+ var hexBuiltin = {
517585
+ encode(data9) {
517586
+ abytes2(data9);
517587
+ return data9.toHex();
517588
+ },
517589
+ decode(s48) {
517590
+ astr2("hex", s48);
517591
+ return Uint8Array.fromHex(s48);
517592
+ }
517593
+ };
517594
+ exports2.hex = hasHexBuiltin2 ? hexBuiltin : /* @__PURE__ */ chain5(/* @__PURE__ */ radix22(4), /* @__PURE__ */ alphabet4("0123456789abcdef"), /* @__PURE__ */ join4(""), /* @__PURE__ */ normalize4((s48) => {
517595
+ if (typeof s48 !== "string" || s48.length % 2 !== 0)
517596
+ throw new TypeError(`hex.decode: expected string, got ${typeof s48} with length ${s48.length}`);
517597
+ return s48.toLowerCase();
517598
+ }));
517599
+ var CODERS = {
517600
+ utf8: exports2.utf8,
517601
+ hex: exports2.hex,
517602
+ base16: exports2.base16,
517603
+ base32: exports2.base32,
517604
+ base64: exports2.base64,
517605
+ base64url: exports2.base64url,
517606
+ base58: exports2.base58,
517607
+ base58xmr: exports2.base58xmr
517608
+ };
517609
+ var coderTypeError = "Invalid encoding type. Available types: utf8, hex, base16, base32, base64, base64url, base58, base58xmr";
517610
+ var bytesToString = (type4, bytes5) => {
517611
+ if (typeof type4 !== "string" || !CODERS.hasOwnProperty(type4))
517612
+ throw new TypeError(coderTypeError);
517613
+ if (!isBytes6(bytes5))
517614
+ throw new TypeError("bytesToString() expects Uint8Array");
517615
+ return CODERS[type4].encode(bytes5);
517616
+ };
517617
+ exports2.bytesToString = bytesToString;
517618
+ exports2.str = exports2.bytesToString;
517619
+ var stringToBytes3 = (type4, str) => {
517620
+ if (!CODERS.hasOwnProperty(type4))
517621
+ throw new TypeError(coderTypeError);
517622
+ if (typeof str !== "string")
517623
+ throw new TypeError("stringToBytes() expects string");
517624
+ return CODERS[type4].decode(str);
517625
+ };
517626
+ exports2.stringToBytes = stringToBytes3;
517627
+ exports2.bytes = exports2.stringToBytes;
517628
+ }
517629
+ });
517630
+
517111
517631
  // ../../node_modules/.pnpm/bip32@4.0.0/node_modules/bip32/src/bip32.js
517112
517632
  var require_bip325 = __commonJS({
517113
517633
  "../../node_modules/.pnpm/bip32@4.0.0/node_modules/bip32/src/bip32.js"(exports2) {
@@ -517116,7 +517636,7 @@ var require_bip325 = __commonJS({
517116
517636
  exports2.BIP32Factory = void 0;
517117
517637
  var crypto35 = require_crypto7();
517118
517638
  var testecc_1 = require_testecc();
517119
- var base_1 = require_lib63();
517639
+ var base_1 = require_lib67();
517120
517640
  var sha256_1 = require_sha2565();
517121
517641
  var typeforce = require_typeforce();
517122
517642
  var wif = require_wif();
@@ -517466,7 +517986,7 @@ var require_package8 = __commonJS({
517466
517986
  "package.json"(exports2, module2) {
517467
517987
  module2.exports = {
517468
517988
  name: "@ledgerhq/live-cli",
517469
- version: "24.21.3-nightly.8",
517989
+ version: "24.21.3-nightly.9",
517470
517990
  description: "ledger-live CLI version",
517471
517991
  repository: {
517472
517992
  type: "git",
@@ -522154,6 +522674,16 @@ var envDefinitions = {
522154
522674
  def: "https://delegations-elrond.coin.ledger.com",
522155
522675
  desc: "MultiversX DELEGATION API url"
522156
522676
  },
522677
+ API_KASPA_ENDPOINT: {
522678
+ parser: stringParser,
522679
+ def: "https://kaspa.coin.ledger.com",
522680
+ desc: "Kaspa API url"
522681
+ },
522682
+ API_KASPA_TESTNET_ENDPOINT: {
522683
+ parser: stringParser,
522684
+ def: "https://kaspa.coin.ledger-test.com",
522685
+ desc: "Kaspa testnet API url"
522686
+ },
522157
522687
  API_STELLAR_HORIZON: {
522158
522688
  parser: stringParser,
522159
522689
  def: "https://stellar.coin.ledger.com",
@@ -778786,7 +779316,7 @@ var validateRecipient4 = (recipient) => {
778786
779316
  return Promise.resolve({ recipientError, recipientWarning });
778787
779317
  };
778788
779318
 
778789
- // ../../node_modules/.pnpm/@taquito+http-utils@23.0.0-beta.1/node_modules/@taquito/http-utils/dist/taquito-http-utils.es6.js
779319
+ // ../../node_modules/.pnpm/@taquito+http-utils@23.0.0-beta.1_patch_hash=v4hkik3oiwaypgtnmqvg6j46di/node_modules/@taquito/http-utils/dist/taquito-http-utils.es6.js
778790
779320
  function __awaiter8(thisArg, _arguments, P21, generator) {
778791
779321
  function adopt(value5) {
778792
779322
  return value5 instanceof P21 ? value5 : new P21(function(resolve) {
@@ -778915,11 +779445,9 @@ var isNode4 = typeof process !== "undefined" && !!((_a4 = process === null || pr
778915
779445
  if (isNode4) {
778916
779446
  fetch11 = (init_lib12(), __toCommonJS(lib_exports5));
778917
779447
  if (Number(process.versions.node.split(".")[0]) >= 19) {
778918
- createAgent = (url4) => __awaiter8(void 0, void 0, void 0, function* () {
778919
- const { Agent: HttpsAgent } = yield import("https");
778920
- const { Agent: HttpAgent2 } = yield import("http");
778921
- return url4.startsWith("https") ? new HttpsAgent({ keepAlive: false }) : new HttpAgent2({ keepAlive: false });
778922
- });
779448
+ createAgent = (url4) => {
779449
+ return url4.startsWith("https") ? new require("https").Agent({ keepAlive: false }) : new require("http").Agent({ keepAlive: false });
779450
+ };
778923
779451
  }
778924
779452
  }
778925
779453
  var HttpBackend = class {
@@ -852089,6 +852617,9 @@ fill-range/index.js:
852089
852617
  * Licensed under the MIT License.
852090
852618
  *)
852091
852619
 
852620
+ @scure/base/lib/index.js:
852621
+ (*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
852622
+
852092
852623
  @scure/base/lib/esm/index.js:
852093
852624
  (*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
852094
852625
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/live-cli",
3
- "version": "24.21.3-nightly.8",
3
+ "version": "24.21.3-nightly.9",
4
4
  "description": "ledger-live CLI version",
5
5
  "repository": {
6
6
  "type": "git",