@ledgerhq/live-cli 24.28.0-nightly.20251115023630 → 24.28.0-nightly.20251119023741
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.
- package/lib/cli.js +337 -1115
- package/package.json +2 -2
package/lib/cli.js
CHANGED
|
@@ -1358,799 +1358,6 @@ var require_numeral = __commonJS({
|
|
|
1358
1358
|
}
|
|
1359
1359
|
});
|
|
1360
1360
|
|
|
1361
|
-
// ../../node_modules/.pnpm/minimatch@5.1.6/node_modules/minimatch/lib/path.js
|
|
1362
|
-
var require_path = __commonJS({
|
|
1363
|
-
"../../node_modules/.pnpm/minimatch@5.1.6/node_modules/minimatch/lib/path.js"(exports2, module2) {
|
|
1364
|
-
"use strict";
|
|
1365
|
-
var isWindows = typeof process === "object" && process && process.platform === "win32";
|
|
1366
|
-
module2.exports = isWindows ? { sep: "\\" } : { sep: "/" };
|
|
1367
|
-
}
|
|
1368
|
-
});
|
|
1369
|
-
|
|
1370
|
-
// ../../node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.js
|
|
1371
|
-
var require_balanced_match = __commonJS({
|
|
1372
|
-
"../../node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.js"(exports2, module2) {
|
|
1373
|
-
"use strict";
|
|
1374
|
-
module2.exports = balanced;
|
|
1375
|
-
function balanced(a68, b17, str) {
|
|
1376
|
-
if (a68 instanceof RegExp)
|
|
1377
|
-
a68 = maybeMatch(a68, str);
|
|
1378
|
-
if (b17 instanceof RegExp)
|
|
1379
|
-
b17 = maybeMatch(b17, str);
|
|
1380
|
-
var r30 = range5(a68, b17, str);
|
|
1381
|
-
return r30 && {
|
|
1382
|
-
start: r30[0],
|
|
1383
|
-
end: r30[1],
|
|
1384
|
-
pre: str.slice(0, r30[0]),
|
|
1385
|
-
body: str.slice(r30[0] + a68.length, r30[1]),
|
|
1386
|
-
post: str.slice(r30[1] + b17.length)
|
|
1387
|
-
};
|
|
1388
|
-
}
|
|
1389
|
-
function maybeMatch(reg, str) {
|
|
1390
|
-
var m62 = str.match(reg);
|
|
1391
|
-
return m62 ? m62[0] : null;
|
|
1392
|
-
}
|
|
1393
|
-
balanced.range = range5;
|
|
1394
|
-
function range5(a68, b17, str) {
|
|
1395
|
-
var begs, beg, left2, right2, result2;
|
|
1396
|
-
var ai3 = str.indexOf(a68);
|
|
1397
|
-
var bi = str.indexOf(b17, ai3 + 1);
|
|
1398
|
-
var i58 = ai3;
|
|
1399
|
-
if (ai3 >= 0 && bi > 0) {
|
|
1400
|
-
if (a68 === b17) {
|
|
1401
|
-
return [ai3, bi];
|
|
1402
|
-
}
|
|
1403
|
-
begs = [];
|
|
1404
|
-
left2 = str.length;
|
|
1405
|
-
while (i58 >= 0 && !result2) {
|
|
1406
|
-
if (i58 == ai3) {
|
|
1407
|
-
begs.push(i58);
|
|
1408
|
-
ai3 = str.indexOf(a68, i58 + 1);
|
|
1409
|
-
} else if (begs.length == 1) {
|
|
1410
|
-
result2 = [begs.pop(), bi];
|
|
1411
|
-
} else {
|
|
1412
|
-
beg = begs.pop();
|
|
1413
|
-
if (beg < left2) {
|
|
1414
|
-
left2 = beg;
|
|
1415
|
-
right2 = bi;
|
|
1416
|
-
}
|
|
1417
|
-
bi = str.indexOf(b17, i58 + 1);
|
|
1418
|
-
}
|
|
1419
|
-
i58 = ai3 < bi && ai3 >= 0 ? ai3 : bi;
|
|
1420
|
-
}
|
|
1421
|
-
if (begs.length) {
|
|
1422
|
-
result2 = [left2, right2];
|
|
1423
|
-
}
|
|
1424
|
-
}
|
|
1425
|
-
return result2;
|
|
1426
|
-
}
|
|
1427
|
-
}
|
|
1428
|
-
});
|
|
1429
|
-
|
|
1430
|
-
// ../../node_modules/.pnpm/brace-expansion@2.0.1/node_modules/brace-expansion/index.js
|
|
1431
|
-
var require_brace_expansion = __commonJS({
|
|
1432
|
-
"../../node_modules/.pnpm/brace-expansion@2.0.1/node_modules/brace-expansion/index.js"(exports2, module2) {
|
|
1433
|
-
"use strict";
|
|
1434
|
-
var balanced = require_balanced_match();
|
|
1435
|
-
module2.exports = expandTop;
|
|
1436
|
-
var escSlash = "\0SLASH" + Math.random() + "\0";
|
|
1437
|
-
var escOpen = "\0OPEN" + Math.random() + "\0";
|
|
1438
|
-
var escClose = "\0CLOSE" + Math.random() + "\0";
|
|
1439
|
-
var escComma = "\0COMMA" + Math.random() + "\0";
|
|
1440
|
-
var escPeriod = "\0PERIOD" + Math.random() + "\0";
|
|
1441
|
-
function numeric(str) {
|
|
1442
|
-
return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0);
|
|
1443
|
-
}
|
|
1444
|
-
function escapeBraces(str) {
|
|
1445
|
-
return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod);
|
|
1446
|
-
}
|
|
1447
|
-
function unescapeBraces(str) {
|
|
1448
|
-
return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".");
|
|
1449
|
-
}
|
|
1450
|
-
function parseCommaParts(str) {
|
|
1451
|
-
if (!str)
|
|
1452
|
-
return [""];
|
|
1453
|
-
var parts = [];
|
|
1454
|
-
var m62 = balanced("{", "}", str);
|
|
1455
|
-
if (!m62)
|
|
1456
|
-
return str.split(",");
|
|
1457
|
-
var pre = m62.pre;
|
|
1458
|
-
var body = m62.body;
|
|
1459
|
-
var post3 = m62.post;
|
|
1460
|
-
var p79 = pre.split(",");
|
|
1461
|
-
p79[p79.length - 1] += "{" + body + "}";
|
|
1462
|
-
var postParts = parseCommaParts(post3);
|
|
1463
|
-
if (post3.length) {
|
|
1464
|
-
p79[p79.length - 1] += postParts.shift();
|
|
1465
|
-
p79.push.apply(p79, postParts);
|
|
1466
|
-
}
|
|
1467
|
-
parts.push.apply(parts, p79);
|
|
1468
|
-
return parts;
|
|
1469
|
-
}
|
|
1470
|
-
function expandTop(str) {
|
|
1471
|
-
if (!str)
|
|
1472
|
-
return [];
|
|
1473
|
-
if (str.substr(0, 2) === "{}") {
|
|
1474
|
-
str = "\\{\\}" + str.substr(2);
|
|
1475
|
-
}
|
|
1476
|
-
return expand2(escapeBraces(str), true).map(unescapeBraces);
|
|
1477
|
-
}
|
|
1478
|
-
function embrace(str) {
|
|
1479
|
-
return "{" + str + "}";
|
|
1480
|
-
}
|
|
1481
|
-
function isPadded(el) {
|
|
1482
|
-
return /^-?0\d/.test(el);
|
|
1483
|
-
}
|
|
1484
|
-
function lte(i58, y43) {
|
|
1485
|
-
return i58 <= y43;
|
|
1486
|
-
}
|
|
1487
|
-
function gte2(i58, y43) {
|
|
1488
|
-
return i58 >= y43;
|
|
1489
|
-
}
|
|
1490
|
-
function expand2(str, isTop) {
|
|
1491
|
-
var expansions = [];
|
|
1492
|
-
var m62 = balanced("{", "}", str);
|
|
1493
|
-
if (!m62)
|
|
1494
|
-
return [str];
|
|
1495
|
-
var pre = m62.pre;
|
|
1496
|
-
var post3 = m62.post.length ? expand2(m62.post, false) : [""];
|
|
1497
|
-
if (/\$$/.test(m62.pre)) {
|
|
1498
|
-
for (var k17 = 0; k17 < post3.length; k17++) {
|
|
1499
|
-
var expansion = pre + "{" + m62.body + "}" + post3[k17];
|
|
1500
|
-
expansions.push(expansion);
|
|
1501
|
-
}
|
|
1502
|
-
} else {
|
|
1503
|
-
var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m62.body);
|
|
1504
|
-
var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m62.body);
|
|
1505
|
-
var isSequence = isNumericSequence || isAlphaSequence;
|
|
1506
|
-
var isOptions = m62.body.indexOf(",") >= 0;
|
|
1507
|
-
if (!isSequence && !isOptions) {
|
|
1508
|
-
if (m62.post.match(/,.*\}/)) {
|
|
1509
|
-
str = m62.pre + "{" + m62.body + escClose + m62.post;
|
|
1510
|
-
return expand2(str);
|
|
1511
|
-
}
|
|
1512
|
-
return [str];
|
|
1513
|
-
}
|
|
1514
|
-
var n146;
|
|
1515
|
-
if (isSequence) {
|
|
1516
|
-
n146 = m62.body.split(/\.\./);
|
|
1517
|
-
} else {
|
|
1518
|
-
n146 = parseCommaParts(m62.body);
|
|
1519
|
-
if (n146.length === 1) {
|
|
1520
|
-
n146 = expand2(n146[0], false).map(embrace);
|
|
1521
|
-
if (n146.length === 1) {
|
|
1522
|
-
return post3.map(function(p79) {
|
|
1523
|
-
return m62.pre + n146[0] + p79;
|
|
1524
|
-
});
|
|
1525
|
-
}
|
|
1526
|
-
}
|
|
1527
|
-
}
|
|
1528
|
-
var N14;
|
|
1529
|
-
if (isSequence) {
|
|
1530
|
-
var x19 = numeric(n146[0]);
|
|
1531
|
-
var y43 = numeric(n146[1]);
|
|
1532
|
-
var width = Math.max(n146[0].length, n146[1].length);
|
|
1533
|
-
var incr = n146.length == 3 ? Math.abs(numeric(n146[2])) : 1;
|
|
1534
|
-
var test3 = lte;
|
|
1535
|
-
var reverse = y43 < x19;
|
|
1536
|
-
if (reverse) {
|
|
1537
|
-
incr *= -1;
|
|
1538
|
-
test3 = gte2;
|
|
1539
|
-
}
|
|
1540
|
-
var pad3 = n146.some(isPadded);
|
|
1541
|
-
N14 = [];
|
|
1542
|
-
for (var i58 = x19; test3(i58, y43); i58 += incr) {
|
|
1543
|
-
var c59;
|
|
1544
|
-
if (isAlphaSequence) {
|
|
1545
|
-
c59 = String.fromCharCode(i58);
|
|
1546
|
-
if (c59 === "\\")
|
|
1547
|
-
c59 = "";
|
|
1548
|
-
} else {
|
|
1549
|
-
c59 = String(i58);
|
|
1550
|
-
if (pad3) {
|
|
1551
|
-
var need = width - c59.length;
|
|
1552
|
-
if (need > 0) {
|
|
1553
|
-
var z11 = new Array(need + 1).join("0");
|
|
1554
|
-
if (i58 < 0)
|
|
1555
|
-
c59 = "-" + z11 + c59.slice(1);
|
|
1556
|
-
else
|
|
1557
|
-
c59 = z11 + c59;
|
|
1558
|
-
}
|
|
1559
|
-
}
|
|
1560
|
-
}
|
|
1561
|
-
N14.push(c59);
|
|
1562
|
-
}
|
|
1563
|
-
} else {
|
|
1564
|
-
N14 = [];
|
|
1565
|
-
for (var j9 = 0; j9 < n146.length; j9++) {
|
|
1566
|
-
N14.push.apply(N14, expand2(n146[j9], false));
|
|
1567
|
-
}
|
|
1568
|
-
}
|
|
1569
|
-
for (var j9 = 0; j9 < N14.length; j9++) {
|
|
1570
|
-
for (var k17 = 0; k17 < post3.length; k17++) {
|
|
1571
|
-
var expansion = pre + N14[j9] + post3[k17];
|
|
1572
|
-
if (!isTop || isSequence || expansion)
|
|
1573
|
-
expansions.push(expansion);
|
|
1574
|
-
}
|
|
1575
|
-
}
|
|
1576
|
-
}
|
|
1577
|
-
return expansions;
|
|
1578
|
-
}
|
|
1579
|
-
}
|
|
1580
|
-
});
|
|
1581
|
-
|
|
1582
|
-
// ../../node_modules/.pnpm/minimatch@5.1.6/node_modules/minimatch/minimatch.js
|
|
1583
|
-
var require_minimatch = __commonJS({
|
|
1584
|
-
"../../node_modules/.pnpm/minimatch@5.1.6/node_modules/minimatch/minimatch.js"(exports2, module2) {
|
|
1585
|
-
"use strict";
|
|
1586
|
-
var minimatch = module2.exports = (p79, pattern, options24 = {}) => {
|
|
1587
|
-
assertValidPattern(pattern);
|
|
1588
|
-
if (!options24.nocomment && pattern.charAt(0) === "#") {
|
|
1589
|
-
return false;
|
|
1590
|
-
}
|
|
1591
|
-
return new Minimatch(pattern, options24).match(p79);
|
|
1592
|
-
};
|
|
1593
|
-
module2.exports = minimatch;
|
|
1594
|
-
var path4 = require_path();
|
|
1595
|
-
minimatch.sep = path4.sep;
|
|
1596
|
-
var GLOBSTAR = Symbol("globstar **");
|
|
1597
|
-
minimatch.GLOBSTAR = GLOBSTAR;
|
|
1598
|
-
var expand2 = require_brace_expansion();
|
|
1599
|
-
var plTypes = {
|
|
1600
|
-
"!": { open: "(?:(?!(?:", close: "))[^/]*?)" },
|
|
1601
|
-
"?": { open: "(?:", close: ")?" },
|
|
1602
|
-
"+": { open: "(?:", close: ")+" },
|
|
1603
|
-
"*": { open: "(?:", close: ")*" },
|
|
1604
|
-
"@": { open: "(?:", close: ")" }
|
|
1605
|
-
};
|
|
1606
|
-
var qmark = "[^/]";
|
|
1607
|
-
var star = qmark + "*?";
|
|
1608
|
-
var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";
|
|
1609
|
-
var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?";
|
|
1610
|
-
var charSet = (s57) => s57.split("").reduce((set2, c59) => {
|
|
1611
|
-
set2[c59] = true;
|
|
1612
|
-
return set2;
|
|
1613
|
-
}, {});
|
|
1614
|
-
var reSpecials = charSet("().*{}+?[]^$\\!");
|
|
1615
|
-
var addPatternStartSet = charSet("[.(");
|
|
1616
|
-
var slashSplit = /\/+/;
|
|
1617
|
-
minimatch.filter = (pattern, options24 = {}) => (p79, i58, list2) => minimatch(p79, pattern, options24);
|
|
1618
|
-
var ext = (a68, b17 = {}) => {
|
|
1619
|
-
const t47 = {};
|
|
1620
|
-
Object.keys(a68).forEach((k17) => t47[k17] = a68[k17]);
|
|
1621
|
-
Object.keys(b17).forEach((k17) => t47[k17] = b17[k17]);
|
|
1622
|
-
return t47;
|
|
1623
|
-
};
|
|
1624
|
-
minimatch.defaults = (def) => {
|
|
1625
|
-
if (!def || typeof def !== "object" || !Object.keys(def).length) {
|
|
1626
|
-
return minimatch;
|
|
1627
|
-
}
|
|
1628
|
-
const orig = minimatch;
|
|
1629
|
-
const m62 = (p79, pattern, options24) => orig(p79, pattern, ext(def, options24));
|
|
1630
|
-
m62.Minimatch = class Minimatch extends orig.Minimatch {
|
|
1631
|
-
constructor(pattern, options24) {
|
|
1632
|
-
super(pattern, ext(def, options24));
|
|
1633
|
-
}
|
|
1634
|
-
};
|
|
1635
|
-
m62.Minimatch.defaults = (options24) => orig.defaults(ext(def, options24)).Minimatch;
|
|
1636
|
-
m62.filter = (pattern, options24) => orig.filter(pattern, ext(def, options24));
|
|
1637
|
-
m62.defaults = (options24) => orig.defaults(ext(def, options24));
|
|
1638
|
-
m62.makeRe = (pattern, options24) => orig.makeRe(pattern, ext(def, options24));
|
|
1639
|
-
m62.braceExpand = (pattern, options24) => orig.braceExpand(pattern, ext(def, options24));
|
|
1640
|
-
m62.match = (list2, pattern, options24) => orig.match(list2, pattern, ext(def, options24));
|
|
1641
|
-
return m62;
|
|
1642
|
-
};
|
|
1643
|
-
minimatch.braceExpand = (pattern, options24) => braceExpand(pattern, options24);
|
|
1644
|
-
var braceExpand = (pattern, options24 = {}) => {
|
|
1645
|
-
assertValidPattern(pattern);
|
|
1646
|
-
if (options24.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
|
|
1647
|
-
return [pattern];
|
|
1648
|
-
}
|
|
1649
|
-
return expand2(pattern);
|
|
1650
|
-
};
|
|
1651
|
-
var MAX_PATTERN_LENGTH = 1024 * 64;
|
|
1652
|
-
var assertValidPattern = (pattern) => {
|
|
1653
|
-
if (typeof pattern !== "string") {
|
|
1654
|
-
throw new TypeError("invalid pattern");
|
|
1655
|
-
}
|
|
1656
|
-
if (pattern.length > MAX_PATTERN_LENGTH) {
|
|
1657
|
-
throw new TypeError("pattern is too long");
|
|
1658
|
-
}
|
|
1659
|
-
};
|
|
1660
|
-
var SUBPARSE = Symbol("subparse");
|
|
1661
|
-
minimatch.makeRe = (pattern, options24) => new Minimatch(pattern, options24 || {}).makeRe();
|
|
1662
|
-
minimatch.match = (list2, pattern, options24 = {}) => {
|
|
1663
|
-
const mm = new Minimatch(pattern, options24);
|
|
1664
|
-
list2 = list2.filter((f52) => mm.match(f52));
|
|
1665
|
-
if (mm.options.nonull && !list2.length) {
|
|
1666
|
-
list2.push(pattern);
|
|
1667
|
-
}
|
|
1668
|
-
return list2;
|
|
1669
|
-
};
|
|
1670
|
-
var globUnescape = (s57) => s57.replace(/\\(.)/g, "$1");
|
|
1671
|
-
var charUnescape = (s57) => s57.replace(/\\([^-\]])/g, "$1");
|
|
1672
|
-
var regExpEscape = (s57) => s57.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
1673
|
-
var braExpEscape = (s57) => s57.replace(/[[\]\\]/g, "\\$&");
|
|
1674
|
-
var Minimatch = class {
|
|
1675
|
-
constructor(pattern, options24) {
|
|
1676
|
-
assertValidPattern(pattern);
|
|
1677
|
-
if (!options24)
|
|
1678
|
-
options24 = {};
|
|
1679
|
-
this.options = options24;
|
|
1680
|
-
this.set = [];
|
|
1681
|
-
this.pattern = pattern;
|
|
1682
|
-
this.windowsPathsNoEscape = !!options24.windowsPathsNoEscape || options24.allowWindowsEscape === false;
|
|
1683
|
-
if (this.windowsPathsNoEscape) {
|
|
1684
|
-
this.pattern = this.pattern.replace(/\\/g, "/");
|
|
1685
|
-
}
|
|
1686
|
-
this.regexp = null;
|
|
1687
|
-
this.negate = false;
|
|
1688
|
-
this.comment = false;
|
|
1689
|
-
this.empty = false;
|
|
1690
|
-
this.partial = !!options24.partial;
|
|
1691
|
-
this.make();
|
|
1692
|
-
}
|
|
1693
|
-
debug() {
|
|
1694
|
-
}
|
|
1695
|
-
make() {
|
|
1696
|
-
const pattern = this.pattern;
|
|
1697
|
-
const options24 = this.options;
|
|
1698
|
-
if (!options24.nocomment && pattern.charAt(0) === "#") {
|
|
1699
|
-
this.comment = true;
|
|
1700
|
-
return;
|
|
1701
|
-
}
|
|
1702
|
-
if (!pattern) {
|
|
1703
|
-
this.empty = true;
|
|
1704
|
-
return;
|
|
1705
|
-
}
|
|
1706
|
-
this.parseNegate();
|
|
1707
|
-
let set2 = this.globSet = this.braceExpand();
|
|
1708
|
-
if (options24.debug)
|
|
1709
|
-
this.debug = (...args3) => console.error(...args3);
|
|
1710
|
-
this.debug(this.pattern, set2);
|
|
1711
|
-
set2 = this.globParts = set2.map((s57) => s57.split(slashSplit));
|
|
1712
|
-
this.debug(this.pattern, set2);
|
|
1713
|
-
set2 = set2.map((s57, si3, set3) => s57.map(this.parse, this));
|
|
1714
|
-
this.debug(this.pattern, set2);
|
|
1715
|
-
set2 = set2.filter((s57) => s57.indexOf(false) === -1);
|
|
1716
|
-
this.debug(this.pattern, set2);
|
|
1717
|
-
this.set = set2;
|
|
1718
|
-
}
|
|
1719
|
-
parseNegate() {
|
|
1720
|
-
if (this.options.nonegate)
|
|
1721
|
-
return;
|
|
1722
|
-
const pattern = this.pattern;
|
|
1723
|
-
let negate = false;
|
|
1724
|
-
let negateOffset = 0;
|
|
1725
|
-
for (let i58 = 0; i58 < pattern.length && pattern.charAt(i58) === "!"; i58++) {
|
|
1726
|
-
negate = !negate;
|
|
1727
|
-
negateOffset++;
|
|
1728
|
-
}
|
|
1729
|
-
if (negateOffset)
|
|
1730
|
-
this.pattern = pattern.slice(negateOffset);
|
|
1731
|
-
this.negate = negate;
|
|
1732
|
-
}
|
|
1733
|
-
// set partial to true to test if, for example,
|
|
1734
|
-
// "/a/b" matches the start of "/*/b/*/d"
|
|
1735
|
-
// Partial means, if you run out of file before you run
|
|
1736
|
-
// out of pattern, then that's fine, as long as all
|
|
1737
|
-
// the parts match.
|
|
1738
|
-
matchOne(file, pattern, partial2) {
|
|
1739
|
-
var options24 = this.options;
|
|
1740
|
-
this.debug(
|
|
1741
|
-
"matchOne",
|
|
1742
|
-
{ "this": this, file, pattern }
|
|
1743
|
-
);
|
|
1744
|
-
this.debug("matchOne", file.length, pattern.length);
|
|
1745
|
-
for (var fi = 0, pi = 0, fl2 = file.length, pl = pattern.length; fi < fl2 && pi < pl; fi++, pi++) {
|
|
1746
|
-
this.debug("matchOne loop");
|
|
1747
|
-
var p79 = pattern[pi];
|
|
1748
|
-
var f52 = file[fi];
|
|
1749
|
-
this.debug(pattern, p79, f52);
|
|
1750
|
-
if (p79 === false)
|
|
1751
|
-
return false;
|
|
1752
|
-
if (p79 === GLOBSTAR) {
|
|
1753
|
-
this.debug("GLOBSTAR", [pattern, p79, f52]);
|
|
1754
|
-
var fr = fi;
|
|
1755
|
-
var pr2 = pi + 1;
|
|
1756
|
-
if (pr2 === pl) {
|
|
1757
|
-
this.debug("** at the end");
|
|
1758
|
-
for (; fi < fl2; fi++) {
|
|
1759
|
-
if (file[fi] === "." || file[fi] === ".." || !options24.dot && file[fi].charAt(0) === ".")
|
|
1760
|
-
return false;
|
|
1761
|
-
}
|
|
1762
|
-
return true;
|
|
1763
|
-
}
|
|
1764
|
-
while (fr < fl2) {
|
|
1765
|
-
var swallowee = file[fr];
|
|
1766
|
-
this.debug("\nglobstar while", file, fr, pattern, pr2, swallowee);
|
|
1767
|
-
if (this.matchOne(file.slice(fr), pattern.slice(pr2), partial2)) {
|
|
1768
|
-
this.debug("globstar found match!", fr, fl2, swallowee);
|
|
1769
|
-
return true;
|
|
1770
|
-
} else {
|
|
1771
|
-
if (swallowee === "." || swallowee === ".." || !options24.dot && swallowee.charAt(0) === ".") {
|
|
1772
|
-
this.debug("dot detected!", file, fr, pattern, pr2);
|
|
1773
|
-
break;
|
|
1774
|
-
}
|
|
1775
|
-
this.debug("globstar swallow a segment, and continue");
|
|
1776
|
-
fr++;
|
|
1777
|
-
}
|
|
1778
|
-
}
|
|
1779
|
-
if (partial2) {
|
|
1780
|
-
this.debug("\n>>> no match, partial?", file, fr, pattern, pr2);
|
|
1781
|
-
if (fr === fl2)
|
|
1782
|
-
return true;
|
|
1783
|
-
}
|
|
1784
|
-
return false;
|
|
1785
|
-
}
|
|
1786
|
-
var hit;
|
|
1787
|
-
if (typeof p79 === "string") {
|
|
1788
|
-
hit = f52 === p79;
|
|
1789
|
-
this.debug("string match", p79, f52, hit);
|
|
1790
|
-
} else {
|
|
1791
|
-
hit = f52.match(p79);
|
|
1792
|
-
this.debug("pattern match", p79, f52, hit);
|
|
1793
|
-
}
|
|
1794
|
-
if (!hit)
|
|
1795
|
-
return false;
|
|
1796
|
-
}
|
|
1797
|
-
if (fi === fl2 && pi === pl) {
|
|
1798
|
-
return true;
|
|
1799
|
-
} else if (fi === fl2) {
|
|
1800
|
-
return partial2;
|
|
1801
|
-
} else if (pi === pl) {
|
|
1802
|
-
return fi === fl2 - 1 && file[fi] === "";
|
|
1803
|
-
}
|
|
1804
|
-
throw new Error("wtf?");
|
|
1805
|
-
}
|
|
1806
|
-
braceExpand() {
|
|
1807
|
-
return braceExpand(this.pattern, this.options);
|
|
1808
|
-
}
|
|
1809
|
-
parse(pattern, isSub) {
|
|
1810
|
-
assertValidPattern(pattern);
|
|
1811
|
-
const options24 = this.options;
|
|
1812
|
-
if (pattern === "**") {
|
|
1813
|
-
if (!options24.noglobstar)
|
|
1814
|
-
return GLOBSTAR;
|
|
1815
|
-
else
|
|
1816
|
-
pattern = "*";
|
|
1817
|
-
}
|
|
1818
|
-
if (pattern === "")
|
|
1819
|
-
return "";
|
|
1820
|
-
let re5 = "";
|
|
1821
|
-
let hasMagic = false;
|
|
1822
|
-
let escaping = false;
|
|
1823
|
-
const patternListStack = [];
|
|
1824
|
-
const negativeLists = [];
|
|
1825
|
-
let stateChar;
|
|
1826
|
-
let inClass = false;
|
|
1827
|
-
let reClassStart = -1;
|
|
1828
|
-
let classStart = -1;
|
|
1829
|
-
let cs2;
|
|
1830
|
-
let pl;
|
|
1831
|
-
let sp;
|
|
1832
|
-
let dotTravAllowed = pattern.charAt(0) === ".";
|
|
1833
|
-
let dotFileAllowed = options24.dot || dotTravAllowed;
|
|
1834
|
-
const patternStart = () => dotTravAllowed ? "" : dotFileAllowed ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)";
|
|
1835
|
-
const subPatternStart = (p79) => p79.charAt(0) === "." ? "" : options24.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)";
|
|
1836
|
-
const clearStateChar = () => {
|
|
1837
|
-
if (stateChar) {
|
|
1838
|
-
switch (stateChar) {
|
|
1839
|
-
case "*":
|
|
1840
|
-
re5 += star;
|
|
1841
|
-
hasMagic = true;
|
|
1842
|
-
break;
|
|
1843
|
-
case "?":
|
|
1844
|
-
re5 += qmark;
|
|
1845
|
-
hasMagic = true;
|
|
1846
|
-
break;
|
|
1847
|
-
default:
|
|
1848
|
-
re5 += "\\" + stateChar;
|
|
1849
|
-
break;
|
|
1850
|
-
}
|
|
1851
|
-
this.debug("clearStateChar %j %j", stateChar, re5);
|
|
1852
|
-
stateChar = false;
|
|
1853
|
-
}
|
|
1854
|
-
};
|
|
1855
|
-
for (let i58 = 0, c59; i58 < pattern.length && (c59 = pattern.charAt(i58)); i58++) {
|
|
1856
|
-
this.debug("%s %s %s %j", pattern, i58, re5, c59);
|
|
1857
|
-
if (escaping) {
|
|
1858
|
-
if (c59 === "/") {
|
|
1859
|
-
return false;
|
|
1860
|
-
}
|
|
1861
|
-
if (reSpecials[c59]) {
|
|
1862
|
-
re5 += "\\";
|
|
1863
|
-
}
|
|
1864
|
-
re5 += c59;
|
|
1865
|
-
escaping = false;
|
|
1866
|
-
continue;
|
|
1867
|
-
}
|
|
1868
|
-
switch (c59) {
|
|
1869
|
-
case "/": {
|
|
1870
|
-
return false;
|
|
1871
|
-
}
|
|
1872
|
-
case "\\":
|
|
1873
|
-
if (inClass && pattern.charAt(i58 + 1) === "-") {
|
|
1874
|
-
re5 += c59;
|
|
1875
|
-
continue;
|
|
1876
|
-
}
|
|
1877
|
-
clearStateChar();
|
|
1878
|
-
escaping = true;
|
|
1879
|
-
continue;
|
|
1880
|
-
case "?":
|
|
1881
|
-
case "*":
|
|
1882
|
-
case "+":
|
|
1883
|
-
case "@":
|
|
1884
|
-
case "!":
|
|
1885
|
-
this.debug("%s %s %s %j <-- stateChar", pattern, i58, re5, c59);
|
|
1886
|
-
if (inClass) {
|
|
1887
|
-
this.debug(" in class");
|
|
1888
|
-
if (c59 === "!" && i58 === classStart + 1)
|
|
1889
|
-
c59 = "^";
|
|
1890
|
-
re5 += c59;
|
|
1891
|
-
continue;
|
|
1892
|
-
}
|
|
1893
|
-
this.debug("call clearStateChar %j", stateChar);
|
|
1894
|
-
clearStateChar();
|
|
1895
|
-
stateChar = c59;
|
|
1896
|
-
if (options24.noext)
|
|
1897
|
-
clearStateChar();
|
|
1898
|
-
continue;
|
|
1899
|
-
case "(": {
|
|
1900
|
-
if (inClass) {
|
|
1901
|
-
re5 += "(";
|
|
1902
|
-
continue;
|
|
1903
|
-
}
|
|
1904
|
-
if (!stateChar) {
|
|
1905
|
-
re5 += "\\(";
|
|
1906
|
-
continue;
|
|
1907
|
-
}
|
|
1908
|
-
const plEntry = {
|
|
1909
|
-
type: stateChar,
|
|
1910
|
-
start: i58 - 1,
|
|
1911
|
-
reStart: re5.length,
|
|
1912
|
-
open: plTypes[stateChar].open,
|
|
1913
|
-
close: plTypes[stateChar].close
|
|
1914
|
-
};
|
|
1915
|
-
this.debug(this.pattern, " ", plEntry);
|
|
1916
|
-
patternListStack.push(plEntry);
|
|
1917
|
-
re5 += plEntry.open;
|
|
1918
|
-
if (plEntry.start === 0 && plEntry.type !== "!") {
|
|
1919
|
-
dotTravAllowed = true;
|
|
1920
|
-
re5 += subPatternStart(pattern.slice(i58 + 1));
|
|
1921
|
-
}
|
|
1922
|
-
this.debug("plType %j %j", stateChar, re5);
|
|
1923
|
-
stateChar = false;
|
|
1924
|
-
continue;
|
|
1925
|
-
}
|
|
1926
|
-
case ")": {
|
|
1927
|
-
const plEntry = patternListStack[patternListStack.length - 1];
|
|
1928
|
-
if (inClass || !plEntry) {
|
|
1929
|
-
re5 += "\\)";
|
|
1930
|
-
continue;
|
|
1931
|
-
}
|
|
1932
|
-
patternListStack.pop();
|
|
1933
|
-
clearStateChar();
|
|
1934
|
-
hasMagic = true;
|
|
1935
|
-
pl = plEntry;
|
|
1936
|
-
re5 += pl.close;
|
|
1937
|
-
if (pl.type === "!") {
|
|
1938
|
-
negativeLists.push(Object.assign(pl, { reEnd: re5.length }));
|
|
1939
|
-
}
|
|
1940
|
-
continue;
|
|
1941
|
-
}
|
|
1942
|
-
case "|": {
|
|
1943
|
-
const plEntry = patternListStack[patternListStack.length - 1];
|
|
1944
|
-
if (inClass || !plEntry) {
|
|
1945
|
-
re5 += "\\|";
|
|
1946
|
-
continue;
|
|
1947
|
-
}
|
|
1948
|
-
clearStateChar();
|
|
1949
|
-
re5 += "|";
|
|
1950
|
-
if (plEntry.start === 0 && plEntry.type !== "!") {
|
|
1951
|
-
dotTravAllowed = true;
|
|
1952
|
-
re5 += subPatternStart(pattern.slice(i58 + 1));
|
|
1953
|
-
}
|
|
1954
|
-
continue;
|
|
1955
|
-
}
|
|
1956
|
-
case "[":
|
|
1957
|
-
clearStateChar();
|
|
1958
|
-
if (inClass) {
|
|
1959
|
-
re5 += "\\" + c59;
|
|
1960
|
-
continue;
|
|
1961
|
-
}
|
|
1962
|
-
inClass = true;
|
|
1963
|
-
classStart = i58;
|
|
1964
|
-
reClassStart = re5.length;
|
|
1965
|
-
re5 += c59;
|
|
1966
|
-
continue;
|
|
1967
|
-
case "]":
|
|
1968
|
-
if (i58 === classStart + 1 || !inClass) {
|
|
1969
|
-
re5 += "\\" + c59;
|
|
1970
|
-
continue;
|
|
1971
|
-
}
|
|
1972
|
-
cs2 = pattern.substring(classStart + 1, i58);
|
|
1973
|
-
try {
|
|
1974
|
-
RegExp("[" + braExpEscape(charUnescape(cs2)) + "]");
|
|
1975
|
-
re5 += c59;
|
|
1976
|
-
} catch (er3) {
|
|
1977
|
-
re5 = re5.substring(0, reClassStart) + "(?:$.)";
|
|
1978
|
-
}
|
|
1979
|
-
hasMagic = true;
|
|
1980
|
-
inClass = false;
|
|
1981
|
-
continue;
|
|
1982
|
-
default:
|
|
1983
|
-
clearStateChar();
|
|
1984
|
-
if (reSpecials[c59] && !(c59 === "^" && inClass)) {
|
|
1985
|
-
re5 += "\\";
|
|
1986
|
-
}
|
|
1987
|
-
re5 += c59;
|
|
1988
|
-
break;
|
|
1989
|
-
}
|
|
1990
|
-
}
|
|
1991
|
-
if (inClass) {
|
|
1992
|
-
cs2 = pattern.slice(classStart + 1);
|
|
1993
|
-
sp = this.parse(cs2, SUBPARSE);
|
|
1994
|
-
re5 = re5.substring(0, reClassStart) + "\\[" + sp[0];
|
|
1995
|
-
hasMagic = hasMagic || sp[1];
|
|
1996
|
-
}
|
|
1997
|
-
for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
|
|
1998
|
-
let tail;
|
|
1999
|
-
tail = re5.slice(pl.reStart + pl.open.length);
|
|
2000
|
-
this.debug("setting tail", re5, pl);
|
|
2001
|
-
tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, (_16, $1, $22) => {
|
|
2002
|
-
if (!$22) {
|
|
2003
|
-
$22 = "\\";
|
|
2004
|
-
}
|
|
2005
|
-
return $1 + $1 + $22 + "|";
|
|
2006
|
-
});
|
|
2007
|
-
this.debug("tail=%j\n %s", tail, tail, pl, re5);
|
|
2008
|
-
const t47 = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type;
|
|
2009
|
-
hasMagic = true;
|
|
2010
|
-
re5 = re5.slice(0, pl.reStart) + t47 + "\\(" + tail;
|
|
2011
|
-
}
|
|
2012
|
-
clearStateChar();
|
|
2013
|
-
if (escaping) {
|
|
2014
|
-
re5 += "\\\\";
|
|
2015
|
-
}
|
|
2016
|
-
const addPatternStart = addPatternStartSet[re5.charAt(0)];
|
|
2017
|
-
for (let n146 = negativeLists.length - 1; n146 > -1; n146--) {
|
|
2018
|
-
const nl = negativeLists[n146];
|
|
2019
|
-
const nlBefore = re5.slice(0, nl.reStart);
|
|
2020
|
-
const nlFirst = re5.slice(nl.reStart, nl.reEnd - 8);
|
|
2021
|
-
let nlAfter = re5.slice(nl.reEnd);
|
|
2022
|
-
const nlLast = re5.slice(nl.reEnd - 8, nl.reEnd) + nlAfter;
|
|
2023
|
-
const closeParensBefore = nlBefore.split(")").length;
|
|
2024
|
-
const openParensBefore = nlBefore.split("(").length - closeParensBefore;
|
|
2025
|
-
let cleanAfter = nlAfter;
|
|
2026
|
-
for (let i58 = 0; i58 < openParensBefore; i58++) {
|
|
2027
|
-
cleanAfter = cleanAfter.replace(/\)[+*?]?/, "");
|
|
2028
|
-
}
|
|
2029
|
-
nlAfter = cleanAfter;
|
|
2030
|
-
const dollar = nlAfter === "" && isSub !== SUBPARSE ? "(?:$|\\/)" : "";
|
|
2031
|
-
re5 = nlBefore + nlFirst + nlAfter + dollar + nlLast;
|
|
2032
|
-
}
|
|
2033
|
-
if (re5 !== "" && hasMagic) {
|
|
2034
|
-
re5 = "(?=.)" + re5;
|
|
2035
|
-
}
|
|
2036
|
-
if (addPatternStart) {
|
|
2037
|
-
re5 = patternStart() + re5;
|
|
2038
|
-
}
|
|
2039
|
-
if (isSub === SUBPARSE) {
|
|
2040
|
-
return [re5, hasMagic];
|
|
2041
|
-
}
|
|
2042
|
-
if (options24.nocase && !hasMagic) {
|
|
2043
|
-
hasMagic = pattern.toUpperCase() !== pattern.toLowerCase();
|
|
2044
|
-
}
|
|
2045
|
-
if (!hasMagic) {
|
|
2046
|
-
return globUnescape(pattern);
|
|
2047
|
-
}
|
|
2048
|
-
const flags2 = options24.nocase ? "i" : "";
|
|
2049
|
-
try {
|
|
2050
|
-
return Object.assign(new RegExp("^" + re5 + "$", flags2), {
|
|
2051
|
-
_glob: pattern,
|
|
2052
|
-
_src: re5
|
|
2053
|
-
});
|
|
2054
|
-
} catch (er3) {
|
|
2055
|
-
return new RegExp("$.");
|
|
2056
|
-
}
|
|
2057
|
-
}
|
|
2058
|
-
makeRe() {
|
|
2059
|
-
if (this.regexp || this.regexp === false)
|
|
2060
|
-
return this.regexp;
|
|
2061
|
-
const set2 = this.set;
|
|
2062
|
-
if (!set2.length) {
|
|
2063
|
-
this.regexp = false;
|
|
2064
|
-
return this.regexp;
|
|
2065
|
-
}
|
|
2066
|
-
const options24 = this.options;
|
|
2067
|
-
const twoStar = options24.noglobstar ? star : options24.dot ? twoStarDot : twoStarNoDot;
|
|
2068
|
-
const flags2 = options24.nocase ? "i" : "";
|
|
2069
|
-
let re5 = set2.map((pattern) => {
|
|
2070
|
-
pattern = pattern.map(
|
|
2071
|
-
(p79) => typeof p79 === "string" ? regExpEscape(p79) : p79 === GLOBSTAR ? GLOBSTAR : p79._src
|
|
2072
|
-
).reduce((set3, p79) => {
|
|
2073
|
-
if (!(set3[set3.length - 1] === GLOBSTAR && p79 === GLOBSTAR)) {
|
|
2074
|
-
set3.push(p79);
|
|
2075
|
-
}
|
|
2076
|
-
return set3;
|
|
2077
|
-
}, []);
|
|
2078
|
-
pattern.forEach((p79, i58) => {
|
|
2079
|
-
if (p79 !== GLOBSTAR || pattern[i58 - 1] === GLOBSTAR) {
|
|
2080
|
-
return;
|
|
2081
|
-
}
|
|
2082
|
-
if (i58 === 0) {
|
|
2083
|
-
if (pattern.length > 1) {
|
|
2084
|
-
pattern[i58 + 1] = "(?:\\/|" + twoStar + "\\/)?" + pattern[i58 + 1];
|
|
2085
|
-
} else {
|
|
2086
|
-
pattern[i58] = twoStar;
|
|
2087
|
-
}
|
|
2088
|
-
} else if (i58 === pattern.length - 1) {
|
|
2089
|
-
pattern[i58 - 1] += "(?:\\/|" + twoStar + ")?";
|
|
2090
|
-
} else {
|
|
2091
|
-
pattern[i58 - 1] += "(?:\\/|\\/" + twoStar + "\\/)" + pattern[i58 + 1];
|
|
2092
|
-
pattern[i58 + 1] = GLOBSTAR;
|
|
2093
|
-
}
|
|
2094
|
-
});
|
|
2095
|
-
return pattern.filter((p79) => p79 !== GLOBSTAR).join("/");
|
|
2096
|
-
}).join("|");
|
|
2097
|
-
re5 = "^(?:" + re5 + ")$";
|
|
2098
|
-
if (this.negate)
|
|
2099
|
-
re5 = "^(?!" + re5 + ").*$";
|
|
2100
|
-
try {
|
|
2101
|
-
this.regexp = new RegExp(re5, flags2);
|
|
2102
|
-
} catch (ex) {
|
|
2103
|
-
this.regexp = false;
|
|
2104
|
-
}
|
|
2105
|
-
return this.regexp;
|
|
2106
|
-
}
|
|
2107
|
-
match(f52, partial2 = this.partial) {
|
|
2108
|
-
this.debug("match", f52, this.pattern);
|
|
2109
|
-
if (this.comment)
|
|
2110
|
-
return false;
|
|
2111
|
-
if (this.empty)
|
|
2112
|
-
return f52 === "";
|
|
2113
|
-
if (f52 === "/" && partial2)
|
|
2114
|
-
return true;
|
|
2115
|
-
const options24 = this.options;
|
|
2116
|
-
if (path4.sep !== "/") {
|
|
2117
|
-
f52 = f52.split(path4.sep).join("/");
|
|
2118
|
-
}
|
|
2119
|
-
f52 = f52.split(slashSplit);
|
|
2120
|
-
this.debug(this.pattern, "split", f52);
|
|
2121
|
-
const set2 = this.set;
|
|
2122
|
-
this.debug(this.pattern, "set", set2);
|
|
2123
|
-
let filename;
|
|
2124
|
-
for (let i58 = f52.length - 1; i58 >= 0; i58--) {
|
|
2125
|
-
filename = f52[i58];
|
|
2126
|
-
if (filename)
|
|
2127
|
-
break;
|
|
2128
|
-
}
|
|
2129
|
-
for (let i58 = 0; i58 < set2.length; i58++) {
|
|
2130
|
-
const pattern = set2[i58];
|
|
2131
|
-
let file = f52;
|
|
2132
|
-
if (options24.matchBase && pattern.length === 1) {
|
|
2133
|
-
file = [filename];
|
|
2134
|
-
}
|
|
2135
|
-
const hit = this.matchOne(file, pattern, partial2);
|
|
2136
|
-
if (hit) {
|
|
2137
|
-
if (options24.flipNegate)
|
|
2138
|
-
return true;
|
|
2139
|
-
return !this.negate;
|
|
2140
|
-
}
|
|
2141
|
-
}
|
|
2142
|
-
if (options24.flipNegate)
|
|
2143
|
-
return false;
|
|
2144
|
-
return this.negate;
|
|
2145
|
-
}
|
|
2146
|
-
static defaults(def) {
|
|
2147
|
-
return minimatch.defaults(def).Minimatch;
|
|
2148
|
-
}
|
|
2149
|
-
};
|
|
2150
|
-
minimatch.Minimatch = Minimatch;
|
|
2151
|
-
}
|
|
2152
|
-
});
|
|
2153
|
-
|
|
2154
1361
|
// ../../node_modules/.pnpm/delayed-stream@1.0.0/node_modules/delayed-stream/lib/delayed_stream.js
|
|
2155
1362
|
var require_delayed_stream = __commonJS({
|
|
2156
1363
|
"../../node_modules/.pnpm/delayed-stream@1.0.0/node_modules/delayed-stream/lib/delayed_stream.js"(exports2, module2) {
|
|
@@ -34174,13 +33381,13 @@ var require_dist2 = __commonJS({
|
|
|
34174
33381
|
}
|
|
34175
33382
|
});
|
|
34176
33383
|
|
|
34177
|
-
// ../../node_modules/.pnpm/@ledgerhq+errors@6.
|
|
33384
|
+
// ../../node_modules/.pnpm/@ledgerhq+errors@6.27.0/node_modules/@ledgerhq/errors/lib-es/helpers.js
|
|
34178
33385
|
function isObject4(value2) {
|
|
34179
33386
|
return typeof value2 === "object";
|
|
34180
33387
|
}
|
|
34181
33388
|
var errorClasses2, deserializers2, addCustomErrorDeserializer2, createCustomErrorClass2;
|
|
34182
33389
|
var init_helpers2 = __esm({
|
|
34183
|
-
"../../node_modules/.pnpm/@ledgerhq+errors@6.
|
|
33390
|
+
"../../node_modules/.pnpm/@ledgerhq+errors@6.27.0/node_modules/@ledgerhq/errors/lib-es/helpers.js"() {
|
|
34184
33391
|
"use strict";
|
|
34185
33392
|
errorClasses2 = {};
|
|
34186
33393
|
deserializers2 = {};
|
|
@@ -34214,7 +33421,7 @@ var init_helpers2 = __esm({
|
|
|
34214
33421
|
}
|
|
34215
33422
|
});
|
|
34216
33423
|
|
|
34217
|
-
// ../../node_modules/.pnpm/@ledgerhq+errors@6.
|
|
33424
|
+
// ../../node_modules/.pnpm/@ledgerhq+errors@6.27.0/node_modules/@ledgerhq/errors/lib-es/index.js
|
|
34218
33425
|
function getAltStatusMessage2(code) {
|
|
34219
33426
|
switch (code) {
|
|
34220
33427
|
case 26368:
|
|
@@ -34236,9 +33443,9 @@ function getAltStatusMessage2(code) {
|
|
|
34236
33443
|
return "Internal error, please report";
|
|
34237
33444
|
}
|
|
34238
33445
|
}
|
|
34239
|
-
var AccountNameRequiredError2, AccountNotSupported2, AccountAwaitingSendPendingOperations2, AmountRequired2, BluetoothRequired2, BtcUnmatchedApp2, CantOpenDevice2, CashAddrNotSupported2, ClaimRewardsFeesWarning2, CurrencyNotSupported2, DeviceAppVerifyNotSupported2, DeviceGenuineSocketEarlyClose2, DeviceNotGenuineError2, DeviceOnDashboardExpected2, DeviceOnDashboardUnexpected2, DeviceInOSUExpected2, DeviceHalted2, DeviceNameInvalid2, DeviceSocketFail2, DeviceSocketNoBulkStatus2, DeviceNeedsRestart2, UnresponsiveDeviceError2, DisconnectedDevice2, DisconnectedDeviceDuringOperation2, DeviceExtractOnboardingStateError2, DeviceOnboardingStatePollingError2, EnpointConfigError2, EthAppPleaseEnableContractData2, FeeEstimationFailed2, FirmwareNotRecognized2, HardResetFail2, InvalidXRPTag2, InvalidAddress2, InvalidNonce2, InvalidAddressBecauseDestinationIsAlsoSource2, LatestMCUInstalledError2, LatestFirmwareVersionRequired2, UnknownMCU2, LedgerAPIError2, LedgerAPIErrorWithMessage2, LedgerAPINotAvailable2, ManagerAppAlreadyInstalledError2, ManagerAppRelyOnBTCError2, ManagerAppDepInstallRequired2, ManagerAppDepUninstallRequired2, ManagerDeviceLockedError2, ManagerFirmwareNotEnoughSpaceError2, ManagerNotEnoughSpaceError2, ManagerUninstallBTCDep2, NetworkDown2, NetworkError2, NoAddressesFound2, NotEnoughBalance2, NotEnoughBalanceFees2, NotEnoughBalanceSwap2, NotEnoughBalanceToDelegate2, UnstakeNotEnoughStakedBalanceLeft2, RestakeNotEnoughStakedBalanceLeft2, NotEnoughToRestake2, NotEnoughToUnstake2, NotEnoughBalanceInParentAccount2, NotEnoughSpendableBalance2, NotEnoughBalanceBecauseDestinationNotCreated2, NotEnoughToStake2, NoAccessToCamera2, NotEnoughGas2, NotEnoughGasSwap2, TronEmptyAccount2, MaybeKeepTronAccountAlive2, NotSupportedLegacyAddress2, GasLessThanEstimate2, PriorityFeeTooLow2, PriorityFeeTooHigh2, PriorityFeeHigherThanMaxFee2, MaxFeeTooLow2, PasswordsDontMatchError2, PasswordIncorrectError2, RecommendSubAccountsToEmpty2, RecommendUndelegation2, TimeoutTagged2, UnexpectedBootloader2, MCUNotGenuineToDashboard2, RecipientRequired2, UnavailableTezosOriginatedAccountReceive2, UnavailableTezosOriginatedAccountSend2, UpdateFetchFileFail2, UpdateIncorrectHash2, UpdateIncorrectSig2, UpdateYourApp2, UserRefusedDeviceNameChange2, UserRefusedAddress2, UserRefusedFirmwareUpdate2, UserRefusedAllowManager2, UserRefusedOnDevice2, PinNotSet2, ExpertModeRequired2, TransportOpenUserCancelled2, TransportInterfaceNotAvailable2, TransportRaceCondition2, TransportWebUSBGestureRequired2, TransactionHasBeenValidatedError2, TransportExchangeTimeoutError2, DeviceShouldStayInApp2, WebsocketConnectionError2, WebsocketConnectionFailed2, WrongDeviceForAccount2, WrongDeviceForAccountPayout2, MissingSwapPayloadParamaters2, WrongDeviceForAccountRefund2, WrongAppForCurrency2, ETHAddressNonEIP2, CantScanQRCode2, FeeNotLoaded2, FeeNotLoadedSwap2, FeeRequired2, FeeTooHigh2, PendingOperation2, SyncError2, PairingFailed2, PeerRemovedPairing2, GenuineCheckFailed2, LedgerAPI4xx2, LedgerAPI5xx2, FirmwareOrAppUpdateRequired2, ReplacementTransactionUnderpriced2, OpReturnDataSizeLimit2, DustLimit2,
|
|
33446
|
+
var AccountNameRequiredError2, AccountNotSupported2, AccountAwaitingSendPendingOperations2, AmountRequired2, BluetoothRequired2, BtcUnmatchedApp2, CantOpenDevice2, CashAddrNotSupported2, ClaimRewardsFeesWarning2, CurrencyNotSupported2, DeviceAppVerifyNotSupported2, DeviceGenuineSocketEarlyClose2, DeviceNotGenuineError2, DeviceOnDashboardExpected2, DeviceOnDashboardUnexpected2, DeviceInOSUExpected2, DeviceHalted2, DeviceNameInvalid2, DeviceSocketFail2, DeviceSocketNoBulkStatus2, DeviceNeedsRestart2, UnresponsiveDeviceError2, DisconnectedDevice2, DisconnectedDeviceDuringOperation2, DeviceExtractOnboardingStateError2, DeviceOnboardingStatePollingError2, EnpointConfigError2, EthAppPleaseEnableContractData2, CeloAppPleaseEnableContractData2, FeeEstimationFailed2, FirmwareNotRecognized2, HardResetFail2, InvalidXRPTag2, InvalidAddress2, InvalidNonce2, InvalidAddressBecauseDestinationIsAlsoSource2, LatestMCUInstalledError2, LatestFirmwareVersionRequired2, UnknownMCU2, LedgerAPIError2, LedgerAPIErrorWithMessage2, LedgerAPINotAvailable2, ManagerAppAlreadyInstalledError2, ManagerAppRelyOnBTCError2, ManagerAppDepInstallRequired2, ManagerAppDepUninstallRequired2, ManagerDeviceLockedError2, ManagerFirmwareNotEnoughSpaceError2, ManagerNotEnoughSpaceError2, ManagerUninstallBTCDep2, NetworkDown2, NetworkError2, NoAddressesFound2, NotEnoughBalance2, NotEnoughBalanceFees2, NotEnoughBalanceSwap2, NotEnoughBalanceToDelegate2, UnstakeNotEnoughStakedBalanceLeft2, RestakeNotEnoughStakedBalanceLeft2, NotEnoughToRestake2, NotEnoughToUnstake2, NotEnoughBalanceInParentAccount2, NotEnoughSpendableBalance2, NotEnoughBalanceBecauseDestinationNotCreated2, NotEnoughToStake2, NoAccessToCamera2, NotEnoughGas2, NotEnoughGasSwap2, TronEmptyAccount2, MaybeKeepTronAccountAlive2, NotSupportedLegacyAddress2, GasLessThanEstimate2, PriorityFeeTooLow2, PriorityFeeTooHigh2, PriorityFeeHigherThanMaxFee2, MaxFeeTooLow2, PasswordsDontMatchError2, PasswordIncorrectError2, RecommendSubAccountsToEmpty2, RecommendUndelegation2, TimeoutTagged2, UnexpectedBootloader2, MCUNotGenuineToDashboard2, RecipientRequired2, UnavailableTezosOriginatedAccountReceive2, UnavailableTezosOriginatedAccountSend2, UpdateFetchFileFail2, UpdateIncorrectHash2, UpdateIncorrectSig2, UpdateYourApp2, UserRefusedDeviceNameChange2, UserRefusedAddress2, UserRefusedFirmwareUpdate2, UserRefusedAllowManager2, UserRefusedOnDevice2, PinNotSet2, ExpertModeRequired2, TransportOpenUserCancelled2, TransportInterfaceNotAvailable2, TransportRaceCondition2, TransportWebUSBGestureRequired2, TransactionHasBeenValidatedError2, TransportExchangeTimeoutError2, DeviceShouldStayInApp2, WebsocketConnectionError2, WebsocketConnectionFailed2, WrongDeviceForAccount2, WrongDeviceForAccountPayout2, MissingSwapPayloadParamaters2, WrongDeviceForAccountRefund2, WrongAppForCurrency2, ETHAddressNonEIP2, CantScanQRCode2, FeeNotLoaded2, FeeNotLoadedSwap2, FeeRequired2, FeeTooHigh2, PendingOperation2, SyncError2, PairingFailed2, PeerRemovedPairing2, GenuineCheckFailed2, LedgerAPI4xx2, LedgerAPI5xx2, FirmwareOrAppUpdateRequired2, ReplacementTransactionUnderpriced2, OpReturnDataSizeLimit2, DustLimit2, LanguageNotFound2, NoDBPathGiven2, DBWrongPassword2, DBNotReset2, SequenceNumberError2, DisabledTransactionBroadcastError2, HwTransportErrorType2, TransportError2, StatusCodes2, TransportStatusError2, LockedDeviceError2;
|
|
34240
33447
|
var init_lib_es3 = __esm({
|
|
34241
|
-
"../../node_modules/.pnpm/@ledgerhq+errors@6.
|
|
33448
|
+
"../../node_modules/.pnpm/@ledgerhq+errors@6.27.0/node_modules/@ledgerhq/errors/lib-es/index.js"() {
|
|
34242
33449
|
"use strict";
|
|
34243
33450
|
init_helpers2();
|
|
34244
33451
|
AccountNameRequiredError2 = createCustomErrorClass2("AccountNameRequired");
|
|
@@ -34269,6 +33476,7 @@ var init_lib_es3 = __esm({
|
|
|
34269
33476
|
DeviceOnboardingStatePollingError2 = createCustomErrorClass2("DeviceOnboardingStatePollingError");
|
|
34270
33477
|
EnpointConfigError2 = createCustomErrorClass2("EnpointConfig");
|
|
34271
33478
|
EthAppPleaseEnableContractData2 = createCustomErrorClass2("EthAppPleaseEnableContractData");
|
|
33479
|
+
CeloAppPleaseEnableContractData2 = createCustomErrorClass2("CeloAppPleaseEnableContractData");
|
|
34272
33480
|
FeeEstimationFailed2 = createCustomErrorClass2("FeeEstimationFailed");
|
|
34273
33481
|
FirmwareNotRecognized2 = createCustomErrorClass2("FirmwareNotRecognized");
|
|
34274
33482
|
HardResetFail2 = createCustomErrorClass2("HardResetFail");
|
|
@@ -34368,9 +33576,6 @@ var init_lib_es3 = __esm({
|
|
|
34368
33576
|
ReplacementTransactionUnderpriced2 = createCustomErrorClass2("ReplacementTransactionUnderpriced");
|
|
34369
33577
|
OpReturnDataSizeLimit2 = createCustomErrorClass2("OpReturnSizeLimit");
|
|
34370
33578
|
DustLimit2 = createCustomErrorClass2("DustLimit");
|
|
34371
|
-
HederaInsufficientFundsForAssociation = createCustomErrorClass2("HederaInsufficientFundsForAssociation");
|
|
34372
|
-
HederaRecipientTokenAssociationRequired = createCustomErrorClass2("HederaRecipientTokenAssociationRequired");
|
|
34373
|
-
HederaRecipientTokenAssociationUnverified = createCustomErrorClass2("HederaRecipientTokenAssociationUnverified");
|
|
34374
33579
|
LanguageNotFound2 = createCustomErrorClass2("LanguageNotFound");
|
|
34375
33580
|
NoDBPathGiven2 = createCustomErrorClass2("NoDBPathGiven");
|
|
34376
33581
|
DBWrongPassword2 = createCustomErrorClass2("DBWrongPassword");
|
|
@@ -35033,9 +34238,9 @@ var init_Transport = __esm({
|
|
|
35033
34238
|
* @returns {Promise<Buffer>} A promise that resolves with the response data from the device.
|
|
35034
34239
|
*/
|
|
35035
34240
|
send = async (cla, ins, p1, p210, data6 = Buffer.alloc(0), statusList = [StatusCodes.OK], { abortTimeoutMs } = {}) => {
|
|
35036
|
-
const
|
|
34241
|
+
const tracer2 = this.tracer.withUpdatedContext({ function: "send" });
|
|
35037
34242
|
if (data6.length >= 256) {
|
|
35038
|
-
|
|
34243
|
+
tracer2.trace("data.length exceeded 256 bytes limit", { dataLength: data6.length });
|
|
35039
34244
|
throw new TransportError("data.length exceed 256 bytes limit. Got: " + data6.length, "DataLengthTooBig");
|
|
35040
34245
|
}
|
|
35041
34246
|
const response = await this.exchange(
|
|
@@ -35098,12 +34303,12 @@ var init_Transport = __esm({
|
|
|
35098
34303
|
* @returns a Promise resolving with the output of the given job
|
|
35099
34304
|
*/
|
|
35100
34305
|
async exchangeAtomicImpl(f52) {
|
|
35101
|
-
const
|
|
34306
|
+
const tracer2 = this.tracer.withUpdatedContext({
|
|
35102
34307
|
function: "exchangeAtomicImpl",
|
|
35103
34308
|
unresponsiveTimeout: this.unresponsiveTimeout
|
|
35104
34309
|
});
|
|
35105
34310
|
if (this.exchangeBusyPromise) {
|
|
35106
|
-
|
|
34311
|
+
tracer2.trace("Atomic exchange is already busy");
|
|
35107
34312
|
throw new TransportRaceCondition("An action was already pending on the Ledger device. Please deny or reconnect.");
|
|
35108
34313
|
}
|
|
35109
34314
|
let resolveBusy;
|
|
@@ -35113,7 +34318,7 @@ var init_Transport = __esm({
|
|
|
35113
34318
|
this.exchangeBusyPromise = busyPromise;
|
|
35114
34319
|
let unresponsiveReached = false;
|
|
35115
34320
|
const timeout10 = setTimeout(() => {
|
|
35116
|
-
|
|
34321
|
+
tracer2.trace(`Timeout reached, emitting Transport event "unresponsive"`, {
|
|
35117
34322
|
unresponsiveTimeout: this.unresponsiveTimeout
|
|
35118
34323
|
});
|
|
35119
34324
|
unresponsiveReached = true;
|
|
@@ -35122,12 +34327,12 @@ var init_Transport = __esm({
|
|
|
35122
34327
|
try {
|
|
35123
34328
|
const res = await f52();
|
|
35124
34329
|
if (unresponsiveReached) {
|
|
35125
|
-
|
|
34330
|
+
tracer2.trace("Device was unresponsive, emitting responsive");
|
|
35126
34331
|
this.emit("responsive");
|
|
35127
34332
|
}
|
|
35128
34333
|
return res;
|
|
35129
34334
|
} finally {
|
|
35130
|
-
|
|
34335
|
+
tracer2.trace("Finalize, clearing busy guard");
|
|
35131
34336
|
clearTimeout(timeout10);
|
|
35132
34337
|
if (resolveBusy)
|
|
35133
34338
|
resolveBusy();
|
|
@@ -124971,7 +124176,7 @@ var require_fetch = __commonJS({
|
|
|
124971
124176
|
});
|
|
124972
124177
|
|
|
124973
124178
|
// ../../node_modules/.pnpm/@protobufjs+path@1.1.2/node_modules/@protobufjs/path/index.js
|
|
124974
|
-
var
|
|
124179
|
+
var require_path = __commonJS({
|
|
124975
124180
|
"../../node_modules/.pnpm/@protobufjs+path@1.1.2/node_modules/@protobufjs/path/index.js"(exports2) {
|
|
124976
124181
|
"use strict";
|
|
124977
124182
|
var path4 = exports2;
|
|
@@ -126616,7 +125821,7 @@ var require_util2 = __commonJS({
|
|
|
126616
125821
|
var Enum3;
|
|
126617
125822
|
util11.codegen = require_codegen();
|
|
126618
125823
|
util11.fetch = require_fetch();
|
|
126619
|
-
util11.path =
|
|
125824
|
+
util11.path = require_path();
|
|
126620
125825
|
util11.fs = util11.inquire("fs");
|
|
126621
125826
|
util11.toArray = function toArray8(object5) {
|
|
126622
125827
|
if (object5) {
|
|
@@ -310984,14 +310189,14 @@ var require_logging = __commonJS({
|
|
|
310984
310189
|
}
|
|
310985
310190
|
}
|
|
310986
310191
|
var allEnabled = enabledTracers.has("all");
|
|
310987
|
-
function trace3(severity,
|
|
310988
|
-
if (isTracerEnabled(
|
|
310989
|
-
exports2.log(severity, (/* @__PURE__ */ new Date()).toISOString() + " | " +
|
|
310192
|
+
function trace3(severity, tracer2, text) {
|
|
310193
|
+
if (isTracerEnabled(tracer2)) {
|
|
310194
|
+
exports2.log(severity, (/* @__PURE__ */ new Date()).toISOString() + " | " + tracer2 + " | " + text);
|
|
310990
310195
|
}
|
|
310991
310196
|
}
|
|
310992
310197
|
exports2.trace = trace3;
|
|
310993
|
-
function isTracerEnabled(
|
|
310994
|
-
return !disabledTracers.has(
|
|
310198
|
+
function isTracerEnabled(tracer2) {
|
|
310199
|
+
return !disabledTracers.has(tracer2) && (allEnabled || enabledTracers.has(tracer2));
|
|
310995
310200
|
}
|
|
310996
310201
|
exports2.isTracerEnabled = isTracerEnabled;
|
|
310997
310202
|
}
|
|
@@ -316642,7 +315847,7 @@ var require_util8 = __commonJS({
|
|
|
316642
315847
|
var Enum3;
|
|
316643
315848
|
util11.codegen = require_codegen();
|
|
316644
315849
|
util11.fetch = require_fetch();
|
|
316645
|
-
util11.path =
|
|
315850
|
+
util11.path = require_path();
|
|
316646
315851
|
util11.fs = util11.inquire("fs");
|
|
316647
315852
|
util11.toArray = function toArray8(object5) {
|
|
316648
315853
|
if (object5) {
|
|
@@ -501628,13 +500833,13 @@ var init_TransportNodeHid = __esm({
|
|
|
501628
500833
|
* @returns a promise of apdu response
|
|
501629
500834
|
*/
|
|
501630
500835
|
async exchange(apdu) {
|
|
501631
|
-
const
|
|
500836
|
+
const tracer2 = this.tracer.withUpdatedContext({
|
|
501632
500837
|
function: "exchange"
|
|
501633
500838
|
});
|
|
501634
|
-
|
|
500839
|
+
tracer2.trace("Exchanging APDU ...");
|
|
501635
500840
|
const b17 = await this.exchangeAtomicImpl(async () => {
|
|
501636
500841
|
const { channel, packetSize } = this;
|
|
501637
|
-
|
|
500842
|
+
tracer2.withType("apdu").trace(`=> ${apdu.toString("hex")}`, { channel, packetSize });
|
|
501638
500843
|
const framingHelper = hid_framing_default(channel, packetSize);
|
|
501639
500844
|
const blocks2 = framingHelper.makeBlocks(apdu);
|
|
501640
500845
|
for (let i58 = 0; i58 < blocks2.length; i58++) {
|
|
@@ -501646,7 +500851,7 @@ var init_TransportNodeHid = __esm({
|
|
|
501646
500851
|
const buffer2 = await this.readHID();
|
|
501647
500852
|
acc = framingHelper.reduceResponse(acc, buffer2);
|
|
501648
500853
|
}
|
|
501649
|
-
|
|
500854
|
+
tracer2.withType("apdu").trace(`<= ${result2.toString("hex")}`, { channel, packetSize });
|
|
501650
500855
|
return result2;
|
|
501651
500856
|
});
|
|
501652
500857
|
return b17;
|
|
@@ -520289,7 +519494,7 @@ var require_package7 = __commonJS({
|
|
|
520289
519494
|
module2.exports = {
|
|
520290
519495
|
name: "@ledgerhq/live-common",
|
|
520291
519496
|
description: "Common ground for the Ledger Live apps",
|
|
520292
|
-
version: "34.53.0-nightly.
|
|
519497
|
+
version: "34.53.0-nightly.20251119023741",
|
|
520293
519498
|
repository: {
|
|
520294
519499
|
type: "git",
|
|
520295
519500
|
url: "https://github.com/LedgerHQ/ledger-live.git"
|
|
@@ -520491,10 +519696,10 @@ var require_package7 = __commonJS({
|
|
|
520491
519696
|
"@ledgerhq/logs": "workspace:^",
|
|
520492
519697
|
"@ledgerhq/speculos-transport": "workspace:^",
|
|
520493
519698
|
"@ledgerhq/wallet-api-acre-module": "workspace:^",
|
|
520494
|
-
"@ledgerhq/wallet-api-client": "^1.12.
|
|
520495
|
-
"@ledgerhq/wallet-api-core": "^1.
|
|
519699
|
+
"@ledgerhq/wallet-api-client": "^1.12.5",
|
|
519700
|
+
"@ledgerhq/wallet-api-core": "^1.26.1",
|
|
520496
519701
|
"@ledgerhq/wallet-api-exchange-module": "workspace:^",
|
|
520497
|
-
"@ledgerhq/wallet-api-server": "^
|
|
519702
|
+
"@ledgerhq/wallet-api-server": "^2.0.0",
|
|
520498
519703
|
"@noble/curves": "^1.9.7",
|
|
520499
519704
|
"@noble/hashes": "1.8.0",
|
|
520500
519705
|
"@reduxjs/toolkit": "catalog:",
|
|
@@ -520538,6 +519743,7 @@ var require_package7 = __commonJS({
|
|
|
520538
519743
|
"performance-now": "^2.1.0",
|
|
520539
519744
|
prando: "^6.0.1",
|
|
520540
519745
|
qs: "^6.10.1",
|
|
519746
|
+
"react-redux": "catalog:",
|
|
520541
519747
|
reselect: "^4.1.5",
|
|
520542
519748
|
rlp: "^3.0.0",
|
|
520543
519749
|
rxjs: "^7.8.1",
|
|
@@ -520549,8 +519755,7 @@ var require_package7 = __commonJS({
|
|
|
520549
519755
|
winston: "^3.4.0",
|
|
520550
519756
|
xstate: "^5.19.2",
|
|
520551
519757
|
yargs: "^17.0.0",
|
|
520552
|
-
zod: "^3.22.4"
|
|
520553
|
-
"react-redux": "catalog:"
|
|
519758
|
+
zod: "^3.22.4"
|
|
520554
519759
|
},
|
|
520555
519760
|
devDependencies: {
|
|
520556
519761
|
"@ledgerhq/device-react": "workspace:^",
|
|
@@ -520591,8 +519796,8 @@ var require_package7 = __commonJS({
|
|
|
520591
519796
|
nock: "^13.0.5",
|
|
520592
519797
|
react: "catalog:",
|
|
520593
519798
|
"react-dom": "catalog:",
|
|
520594
|
-
"react-native": "
|
|
520595
|
-
"react-native-svg": "
|
|
519799
|
+
"react-native": "catalog:",
|
|
519800
|
+
"react-native-svg": "catalog:",
|
|
520596
519801
|
"react-test-renderer": "catalog:",
|
|
520597
519802
|
"redux-actions": "2.6.5",
|
|
520598
519803
|
timemachine: "^0.3.2",
|
|
@@ -520628,7 +519833,7 @@ var require_package8 = __commonJS({
|
|
|
520628
519833
|
"package.json"(exports2, module2) {
|
|
520629
519834
|
module2.exports = {
|
|
520630
519835
|
name: "@ledgerhq/live-cli",
|
|
520631
|
-
version: "24.28.0-nightly.
|
|
519836
|
+
version: "24.28.0-nightly.20251119023741",
|
|
520632
519837
|
description: "ledger-live CLI version",
|
|
520633
519838
|
repository: {
|
|
520634
519839
|
type: "git",
|
|
@@ -523514,7 +522719,7 @@ var require_util15 = __commonJS({
|
|
|
523514
522719
|
var Enum3;
|
|
523515
522720
|
util11.codegen = require_codegen();
|
|
523516
522721
|
util11.fetch = require_fetch();
|
|
523517
|
-
util11.path =
|
|
522722
|
+
util11.path = require_path();
|
|
523518
522723
|
util11.fs = util11.inquire("fs");
|
|
523519
522724
|
util11.toArray = function toArray8(object5) {
|
|
523520
522725
|
if (object5) {
|
|
@@ -532291,9 +531496,6 @@ function isCurrencySupported(currency24) {
|
|
|
532291
531496
|
var import_numeral = __toESM(require_numeral());
|
|
532292
531497
|
var import_bignumber5 = require("bignumber.js");
|
|
532293
531498
|
|
|
532294
|
-
// ../../libs/ledger-live-common/lib-es/currencies/helpers.js
|
|
532295
|
-
var import_minimatch = __toESM(require_minimatch());
|
|
532296
|
-
|
|
532297
531499
|
// ../../node_modules/.pnpm/lru-cache@7.18.3/node_modules/lru-cache/index.mjs
|
|
532298
531500
|
var perf = typeof performance === "object" && performance && typeof performance.now === "function" ? performance : Date;
|
|
532299
531501
|
var hasAbortController = typeof AbortController === "function";
|
|
@@ -537459,7 +536661,7 @@ function setWalletAPIVersion(v36) {
|
|
|
537459
536661
|
version = v36;
|
|
537460
536662
|
}
|
|
537461
536663
|
|
|
537462
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
536664
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/accounts/serializers.js
|
|
537463
536665
|
var import_bignumber7 = __toESM(require("bignumber.js"));
|
|
537464
536666
|
|
|
537465
536667
|
// ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/external.js
|
|
@@ -541503,7 +540705,7 @@ var coerce = {
|
|
|
541503
540705
|
};
|
|
541504
540706
|
var NEVER = INVALID;
|
|
541505
540707
|
|
|
541506
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
540708
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/accounts/validation.js
|
|
541507
540709
|
var schemaRawAccount = external_exports.object({
|
|
541508
540710
|
id: external_exports.string(),
|
|
541509
540711
|
name: external_exports.string(),
|
|
@@ -541516,7 +540718,7 @@ var schemaRawAccount = external_exports.object({
|
|
|
541516
540718
|
parentAccountId: external_exports.string().optional()
|
|
541517
540719
|
});
|
|
541518
540720
|
|
|
541519
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
540721
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/currencies/validation.js
|
|
541520
540722
|
var schemaCurrencyType = external_exports.enum(["CryptoCurrency", "TokenCurrency"]);
|
|
541521
540723
|
var schemaTokenStandard = external_exports.enum(["ERC20"]);
|
|
541522
540724
|
var schemaBaseCurrency = external_exports.object({
|
|
@@ -541543,7 +540745,7 @@ var schemaCurrency = external_exports.discriminatedUnion("type", [
|
|
|
541543
540745
|
schemaERC20TokenCurrency
|
|
541544
540746
|
]);
|
|
541545
540747
|
|
|
541546
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
540748
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/common.js
|
|
541547
540749
|
var schemaTransactionCommon = external_exports.object({
|
|
541548
540750
|
amount: external_exports.string(),
|
|
541549
540751
|
recipient: external_exports.string()
|
|
@@ -541578,86 +540780,86 @@ var FAMILIES = [
|
|
|
541578
540780
|
];
|
|
541579
540781
|
var schemaFamilies = external_exports.enum(FAMILIES);
|
|
541580
540782
|
|
|
541581
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
540783
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/algorand/serializer.js
|
|
541582
540784
|
var import_bignumber8 = __toESM(require("bignumber.js"));
|
|
541583
540785
|
|
|
541584
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
540786
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/aptos/serializer.js
|
|
541585
540787
|
var import_bignumber9 = __toESM(require("bignumber.js"));
|
|
541586
540788
|
|
|
541587
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
540789
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/bitcoin/serializer.js
|
|
541588
540790
|
var import_bignumber10 = __toESM(require("bignumber.js"));
|
|
541589
540791
|
|
|
541590
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
540792
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/celo/serializer.js
|
|
541591
540793
|
var import_bignumber11 = __toESM(require("bignumber.js"));
|
|
541592
540794
|
|
|
541593
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
540795
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/cosmos/serializer.js
|
|
541594
540796
|
var import_bignumber12 = __toESM(require("bignumber.js"));
|
|
541595
540797
|
|
|
541596
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
540798
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/crypto_org/serializer.js
|
|
541597
540799
|
var import_bignumber13 = __toESM(require("bignumber.js"));
|
|
541598
540800
|
|
|
541599
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
540801
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/ethereum/serializer.js
|
|
541600
540802
|
var import_bignumber14 = __toESM(require("bignumber.js"));
|
|
541601
540803
|
|
|
541602
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
540804
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/near/serializer.js
|
|
541603
540805
|
var import_bignumber15 = __toESM(require("bignumber.js"));
|
|
541604
540806
|
|
|
541605
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
540807
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/hedera/serializer.js
|
|
541606
540808
|
var import_bignumber16 = __toESM(require("bignumber.js"));
|
|
541607
540809
|
|
|
541608
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
540810
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/kaspa/serializer.js
|
|
541609
540811
|
var import_bignumber17 = __toESM(require("bignumber.js"));
|
|
541610
540812
|
|
|
541611
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
540813
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/filecoin/serializer.js
|
|
541612
540814
|
var import_bignumber18 = __toESM(require("bignumber.js"));
|
|
541613
540815
|
|
|
541614
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
540816
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/neo/serializer.js
|
|
541615
540817
|
var import_bignumber19 = __toESM(require("bignumber.js"));
|
|
541616
540818
|
|
|
541617
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
540819
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/polkadot/serializer.js
|
|
541618
540820
|
var import_bignumber20 = __toESM(require("bignumber.js"));
|
|
541619
540821
|
|
|
541620
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
540822
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/ripple/serializer.js
|
|
541621
540823
|
var import_bignumber21 = __toESM(require("bignumber.js"));
|
|
541622
540824
|
|
|
541623
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
540825
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/stellar/serializer.js
|
|
541624
540826
|
var import_bignumber22 = __toESM(require("bignumber.js"));
|
|
541625
540827
|
|
|
541626
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
540828
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/tezos/serializer.js
|
|
541627
540829
|
var import_bignumber23 = __toESM(require("bignumber.js"));
|
|
541628
540830
|
|
|
541629
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
540831
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/ton/serializer.js
|
|
541630
540832
|
var import_core = __toESM(require_dist2());
|
|
541631
540833
|
var import_bignumber24 = __toESM(require("bignumber.js"));
|
|
541632
540834
|
|
|
541633
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
540835
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/tron/serializer.js
|
|
541634
540836
|
var import_bignumber25 = __toESM(require("bignumber.js"));
|
|
541635
540837
|
|
|
541636
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
540838
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/elrond/serializer.js
|
|
541637
540839
|
var import_bignumber26 = __toESM(require("bignumber.js"));
|
|
541638
540840
|
|
|
541639
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
540841
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/cardano/serializer.js
|
|
541640
540842
|
var import_bignumber27 = __toESM(require("bignumber.js"));
|
|
541641
540843
|
|
|
541642
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
540844
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/solana/serializer.js
|
|
541643
540845
|
var import_bignumber28 = __toESM(require("bignumber.js"));
|
|
541644
540846
|
|
|
541645
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
540847
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/vechain/serializer.js
|
|
541646
540848
|
var import_bignumber29 = __toESM(require("bignumber.js"));
|
|
541647
540849
|
|
|
541648
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
540850
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/stacks/serializer.js
|
|
541649
540851
|
var import_bignumber30 = __toESM(require("bignumber.js"));
|
|
541650
540852
|
|
|
541651
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
540853
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/internet_computer/serializer.js
|
|
541652
540854
|
var import_bignumber31 = __toESM(require("bignumber.js"));
|
|
541653
540855
|
|
|
541654
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
540856
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/casper/serializer.js
|
|
541655
540857
|
var import_bignumber32 = __toESM(require("bignumber.js"));
|
|
541656
540858
|
|
|
541657
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
540859
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/sui/serializer.js
|
|
541658
540860
|
var import_bignumber33 = __toESM(require("bignumber.js"));
|
|
541659
540861
|
|
|
541660
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
540862
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/algorand/validation.js
|
|
541661
540863
|
var schemaAlgorandOperationMode = external_exports.enum([
|
|
541662
540864
|
"send",
|
|
541663
540865
|
"optIn",
|
|
@@ -541672,7 +540874,7 @@ var schemaRawAlgorandTransaction = schemaTransactionCommon.extend({
|
|
|
541672
540874
|
memo: external_exports.string().optional()
|
|
541673
540875
|
});
|
|
541674
540876
|
|
|
541675
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
540877
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/aptos/validation.js
|
|
541676
540878
|
var schemaAptosOperationMode = external_exports.enum(["send"]);
|
|
541677
540879
|
var schemaRawAptosTransaction = schemaTransactionCommon.extend({
|
|
541678
540880
|
family: external_exports.literal(schemaFamilies.enum.aptos),
|
|
@@ -541680,14 +540882,14 @@ var schemaRawAptosTransaction = schemaTransactionCommon.extend({
|
|
|
541680
540882
|
fees: external_exports.string().optional()
|
|
541681
540883
|
});
|
|
541682
540884
|
|
|
541683
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
540885
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/bitcoin/validation.js
|
|
541684
540886
|
var schemaRawBitcoinTransaction = schemaTransactionCommon.extend({
|
|
541685
540887
|
family: external_exports.literal(schemaFamilies.enum.bitcoin),
|
|
541686
540888
|
feePerByte: external_exports.string().optional(),
|
|
541687
540889
|
opReturnDataHex: external_exports.string().max(160).optional()
|
|
541688
540890
|
});
|
|
541689
540891
|
|
|
541690
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
540892
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/celo/validation.js
|
|
541691
540893
|
var schemaOperationMode = external_exports.enum([
|
|
541692
540894
|
"send",
|
|
541693
540895
|
"lock",
|
|
@@ -541705,7 +540907,7 @@ var schemaRawCeloTransaction = schemaTransactionCommon.extend({
|
|
|
541705
540907
|
index: external_exports.number().optional().nullable()
|
|
541706
540908
|
});
|
|
541707
540909
|
|
|
541708
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
540910
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/cosmos/validation.js
|
|
541709
540911
|
var schemaCosmosOperationMode = external_exports.enum([
|
|
541710
540912
|
"send",
|
|
541711
540913
|
"delegate",
|
|
@@ -541728,14 +540930,14 @@ var schemaRawCosmosTransaction = schemaTransactionCommon.extend({
|
|
|
541728
540930
|
validators: external_exports.array(cosmosDelegationInfo).optional()
|
|
541729
540931
|
});
|
|
541730
540932
|
|
|
541731
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
540933
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/crypto_org/validation.js
|
|
541732
540934
|
var schemaRawCryptoOrgTransaction = schemaTransactionCommon.extend({
|
|
541733
540935
|
family: external_exports.literal(schemaFamilies.enum.crypto_org),
|
|
541734
540936
|
mode: external_exports.string(),
|
|
541735
540937
|
fees: external_exports.string().optional()
|
|
541736
540938
|
});
|
|
541737
540939
|
|
|
541738
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
540940
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/ethereum/validation.js
|
|
541739
540941
|
var schemaRawEthereumTransaction = schemaTransactionCommon.extend({
|
|
541740
540942
|
family: external_exports.literal(schemaFamilies.enum.ethereum),
|
|
541741
540943
|
nonce: external_exports.number().optional(),
|
|
@@ -541747,19 +540949,19 @@ var schemaRawEthereumTransaction = schemaTransactionCommon.extend({
|
|
|
541747
540949
|
sponsored: external_exports.boolean().optional()
|
|
541748
540950
|
});
|
|
541749
540951
|
|
|
541750
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
540952
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/near/validation.js
|
|
541751
540953
|
var schemaRawNearTransaction = schemaTransactionCommon.extend({
|
|
541752
540954
|
family: external_exports.literal(schemaFamilies.enum.near),
|
|
541753
540955
|
mode: external_exports.string(),
|
|
541754
540956
|
fees: external_exports.string().optional()
|
|
541755
540957
|
});
|
|
541756
540958
|
|
|
541757
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
540959
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/neo/validation.js
|
|
541758
540960
|
var schemaRawNeoTransaction = schemaTransactionCommon.extend({
|
|
541759
540961
|
family: external_exports.literal(schemaFamilies.enum.neo)
|
|
541760
540962
|
});
|
|
541761
540963
|
|
|
541762
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
540964
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/polkadot/validation.js
|
|
541763
540965
|
var schemaPolkadotOperationMode = external_exports.enum([
|
|
541764
540966
|
"send",
|
|
541765
540967
|
"bond",
|
|
@@ -541788,21 +540990,21 @@ var schemaRawPolkadotTransaction = schemaTransactionCommon.extend({
|
|
|
541788
540990
|
numOfSlashingSpans: external_exports.number().optional()
|
|
541789
540991
|
});
|
|
541790
540992
|
|
|
541791
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
540993
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/ripple/validation.js
|
|
541792
540994
|
var schemaRawRippleTransaction = schemaTransactionCommon.extend({
|
|
541793
540995
|
family: external_exports.literal(schemaFamilies.enum.ripple),
|
|
541794
540996
|
fee: external_exports.string().optional(),
|
|
541795
540997
|
tag: external_exports.number()
|
|
541796
540998
|
});
|
|
541797
540999
|
|
|
541798
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541000
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/solana/validation.js
|
|
541799
541001
|
var schemaRawSolanaTransaction = schemaTransactionCommon.extend({
|
|
541800
541002
|
family: external_exports.literal(schemaFamilies.enum.solana),
|
|
541801
541003
|
model: external_exports.string(),
|
|
541802
541004
|
raw: external_exports.optional(external_exports.string())
|
|
541803
541005
|
});
|
|
541804
541006
|
|
|
541805
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541007
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/stellar/validation.js
|
|
541806
541008
|
var stellarMemoTypeEnum = external_exports.enum([
|
|
541807
541009
|
"MEMO_TEXT",
|
|
541808
541010
|
"MEMO_ID",
|
|
@@ -541816,7 +541018,7 @@ var schemaRawStellarTransaction = schemaTransactionCommon.extend({
|
|
|
541816
541018
|
memoValue: external_exports.string().optional()
|
|
541817
541019
|
});
|
|
541818
541020
|
|
|
541819
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541021
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/tezos/validation.js
|
|
541820
541022
|
var schemaTezosOperationMode = external_exports.enum([
|
|
541821
541023
|
"send",
|
|
541822
541024
|
"delegate",
|
|
@@ -541829,7 +541031,7 @@ var schemaRawTezosTransaction = schemaTransactionCommon.extend({
|
|
|
541829
541031
|
gasLimit: external_exports.string().optional()
|
|
541830
541032
|
});
|
|
541831
541033
|
|
|
541832
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541034
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/ton/validation.js
|
|
541833
541035
|
var schemaTonComment = external_exports.object({
|
|
541834
541036
|
isEncrypted: external_exports.boolean(),
|
|
541835
541037
|
text: external_exports.string()
|
|
@@ -541977,7 +541179,7 @@ var schemaRawTonTransaction = schemaTransactionCommon.extend({
|
|
|
541977
541179
|
payload: schemaTonPayloadFormatRaw.optional()
|
|
541978
541180
|
});
|
|
541979
541181
|
|
|
541980
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541182
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/tron/validation.js
|
|
541981
541183
|
var schemaTronOperationMode = external_exports.enum([
|
|
541982
541184
|
"send",
|
|
541983
541185
|
"freeze",
|
|
@@ -542001,19 +541203,19 @@ var schemaRawTronTransaction = schemaTransactionCommon.extend({
|
|
|
542001
541203
|
votes: external_exports.array(schemaTronVotes).optional()
|
|
542002
541204
|
});
|
|
542003
541205
|
|
|
542004
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541206
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/hedera/validation.js
|
|
542005
541207
|
var schemaRawHederaTransaction = schemaTransactionCommon.extend({
|
|
542006
541208
|
family: external_exports.literal(schemaFamilies.enum.hedera),
|
|
542007
541209
|
memo: external_exports.string().max(100).optional()
|
|
542008
541210
|
});
|
|
542009
541211
|
|
|
542010
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541212
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/kaspa/validation.js
|
|
542011
541213
|
var schemaRawKaspaTransaction = schemaTransactionCommon.extend({
|
|
542012
541214
|
family: external_exports.literal(schemaFamilies.enum.kaspa),
|
|
542013
541215
|
customFeeRate: external_exports.string().optional()
|
|
542014
541216
|
});
|
|
542015
541217
|
|
|
542016
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541218
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/filecoin/validation.js
|
|
542017
541219
|
var schemaRawFilecoinTransaction = schemaTransactionCommon.extend({
|
|
542018
541220
|
data: external_exports.string().optional(),
|
|
542019
541221
|
family: external_exports.literal(schemaFamilies.enum.filecoin),
|
|
@@ -542026,7 +541228,7 @@ var schemaRawFilecoinTransaction = schemaTransactionCommon.extend({
|
|
|
542026
541228
|
version: external_exports.number()
|
|
542027
541229
|
});
|
|
542028
541230
|
|
|
542029
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541231
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/elrond/validation.js
|
|
542030
541232
|
var schemaOperationMode2 = external_exports.enum([
|
|
542031
541233
|
"send",
|
|
542032
541234
|
"delegate",
|
|
@@ -542050,7 +541252,7 @@ var schemaRawElrondTransaction = schemaTransactionCommon.extend({
|
|
|
542050
541252
|
gasLimit: external_exports.number()
|
|
542051
541253
|
});
|
|
542052
541254
|
|
|
542053
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541255
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/cardano/validation.js
|
|
542054
541256
|
var schemaRawCardanoTransaction = schemaTransactionCommon.extend({
|
|
542055
541257
|
family: external_exports.literal(schemaFamilies.enum.cardano),
|
|
542056
541258
|
fees: external_exports.string().optional(),
|
|
@@ -542058,21 +541260,25 @@ var schemaRawCardanoTransaction = schemaTransactionCommon.extend({
|
|
|
542058
541260
|
memo: external_exports.string().optional()
|
|
542059
541261
|
});
|
|
542060
541262
|
|
|
542061
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541263
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/vechain/validation.js
|
|
542062
541264
|
var schemaThorTransactionClause = external_exports.object({
|
|
542063
541265
|
to: external_exports.string().nullable(),
|
|
542064
541266
|
value: external_exports.union([external_exports.string(), external_exports.number()]),
|
|
542065
|
-
data: external_exports.string()
|
|
541267
|
+
data: external_exports.string(),
|
|
541268
|
+
comment: external_exports.string().optional(),
|
|
541269
|
+
abi: external_exports.string().optional()
|
|
542066
541270
|
});
|
|
542067
541271
|
var schemaThorTransactionBody = external_exports.object({
|
|
542068
541272
|
chainTag: external_exports.number(),
|
|
542069
541273
|
blockRef: external_exports.string(),
|
|
542070
541274
|
expiration: external_exports.number(),
|
|
542071
541275
|
clauses: external_exports.array(schemaThorTransactionClause),
|
|
542072
|
-
gasPriceCoef: external_exports.number(),
|
|
541276
|
+
gasPriceCoef: external_exports.number().optional(),
|
|
542073
541277
|
gas: external_exports.union([external_exports.string(), external_exports.number()]),
|
|
542074
541278
|
dependsOn: external_exports.string().nullable(),
|
|
542075
541279
|
nonce: external_exports.union([external_exports.string(), external_exports.number()]),
|
|
541280
|
+
maxFeePerGas: external_exports.union([external_exports.string(), external_exports.number()]).optional(),
|
|
541281
|
+
maxPriorityFeePerGas: external_exports.union([external_exports.string(), external_exports.number()]).optional(),
|
|
542076
541282
|
reserved: external_exports.object({
|
|
542077
541283
|
features: external_exports.number().optional(),
|
|
542078
541284
|
unused: external_exports.array(external_exports.any()).optional()
|
|
@@ -542084,7 +541290,7 @@ var schemaRawVechainTransaction = schemaTransactionCommon.extend({
|
|
|
542084
541290
|
body: schemaThorTransactionBody
|
|
542085
541291
|
});
|
|
542086
541292
|
|
|
542087
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541293
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/stacks/validation.js
|
|
542088
541294
|
var schemaRawStacksTransaction = schemaTransactionCommon.extend({
|
|
542089
541295
|
family: external_exports.literal(schemaFamilies.enum.stacks),
|
|
542090
541296
|
fee: external_exports.string().optional(),
|
|
@@ -542094,28 +541300,28 @@ var schemaRawStacksTransaction = schemaTransactionCommon.extend({
|
|
|
542094
541300
|
anchorMode: external_exports.number()
|
|
542095
541301
|
});
|
|
542096
541302
|
|
|
542097
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541303
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/internet_computer/validation.js
|
|
542098
541304
|
var schemaRawInternetComputerTransaction = schemaTransactionCommon.extend({
|
|
542099
541305
|
family: external_exports.literal(schemaFamilies.enum.internet_computer),
|
|
542100
541306
|
fees: external_exports.string(),
|
|
542101
541307
|
memo: external_exports.string().optional()
|
|
542102
541308
|
});
|
|
542103
541309
|
|
|
542104
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541310
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/casper/validation.js
|
|
542105
541311
|
var schemaRawCasperTransaction = schemaTransactionCommon.extend({
|
|
542106
541312
|
family: external_exports.literal(schemaFamilies.enum.casper),
|
|
542107
541313
|
fees: external_exports.string(),
|
|
542108
541314
|
transferId: external_exports.string().optional()
|
|
542109
541315
|
});
|
|
542110
541316
|
|
|
542111
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541317
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/sui/validation.js
|
|
542112
541318
|
var schemaRawSuiTransaction = schemaTransactionCommon.extend({
|
|
542113
541319
|
family: external_exports.literal(schemaFamilies.enum.sui),
|
|
542114
541320
|
mode: external_exports.string(),
|
|
542115
541321
|
fees: external_exports.string().optional()
|
|
542116
541322
|
});
|
|
542117
541323
|
|
|
542118
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541324
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/families/validation.js
|
|
542119
541325
|
var schemaRawTransaction = external_exports.discriminatedUnion("family", [
|
|
542120
541326
|
schemaRawAlgorandTransaction,
|
|
542121
541327
|
schemaRawAptosTransaction,
|
|
@@ -542145,7 +541351,7 @@ var schemaRawTransaction = external_exports.discriminatedUnion("family", [
|
|
|
542145
541351
|
schemaRawSuiTransaction
|
|
542146
541352
|
]);
|
|
542147
541353
|
|
|
542148
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541354
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/logger/index.js
|
|
542149
541355
|
var Logger = class {
|
|
542150
541356
|
prefix = "";
|
|
542151
541357
|
constructor(namespace) {
|
|
@@ -542165,10 +541371,10 @@ var Logger = class {
|
|
|
542165
541371
|
}
|
|
542166
541372
|
};
|
|
542167
541373
|
|
|
542168
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541374
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/transports/WindowMessageTransport.js
|
|
542169
541375
|
var defaultLogger = new Logger("WindowMessage");
|
|
542170
541376
|
|
|
542171
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541377
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/types/index.js
|
|
542172
541378
|
var FeesLevel;
|
|
542173
541379
|
(function(FeesLevel2) {
|
|
542174
541380
|
FeesLevel2["Slow"] = "slow";
|
|
@@ -542188,7 +541394,7 @@ var ExchangeType;
|
|
|
542188
541394
|
ExchangeType2[ExchangeType2["FUND"] = 2] = "FUND";
|
|
542189
541395
|
})(ExchangeType || (ExchangeType = {}));
|
|
542190
541396
|
|
|
542191
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541397
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/errors/types.js
|
|
542192
541398
|
var schemaServerErrorCode = external_exports.enum([
|
|
542193
541399
|
"NOT_IMPLEMENTED_BY_WALLET",
|
|
542194
541400
|
"ACCOUNT_NOT_FOUND",
|
|
@@ -542253,7 +541459,7 @@ var schemaServerErrorData = external_exports.discriminatedUnion("code", [
|
|
|
542253
541459
|
schemaUnauthorizedStore
|
|
542254
541460
|
]);
|
|
542255
541461
|
|
|
542256
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541462
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/JSONRPC/types.js
|
|
542257
541463
|
var RpcErrorCode;
|
|
542258
541464
|
(function(RpcErrorCode2) {
|
|
542259
541465
|
RpcErrorCode2[RpcErrorCode2["PARSE_ERROR"] = -32700] = "PARSE_ERROR";
|
|
@@ -542264,7 +541470,7 @@ var RpcErrorCode;
|
|
|
542264
541470
|
RpcErrorCode2[RpcErrorCode2["SERVER_ERROR"] = -32e3] = "SERVER_ERROR";
|
|
542265
541471
|
})(RpcErrorCode || (RpcErrorCode = {}));
|
|
542266
541472
|
|
|
542267
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541473
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/JSONRPC/validation.js
|
|
542268
541474
|
var schemaRPCId = external_exports.union([external_exports.string(), external_exports.number(), external_exports.null()]);
|
|
542269
541475
|
var schemaRPCRequest = external_exports.object({
|
|
542270
541476
|
jsonrpc: external_exports.literal("2.0"),
|
|
@@ -542293,10 +541499,10 @@ var schemaRPCResponse = external_exports.union([
|
|
|
542293
541499
|
]);
|
|
542294
541500
|
var schemaRPCCall = external_exports.union([schemaRPCRequest, schemaRPCResponse]);
|
|
542295
541501
|
|
|
542296
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541502
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/JSONRPC/RpcNode.js
|
|
542297
541503
|
init_lib_es3();
|
|
542298
541504
|
|
|
542299
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541505
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/spec/types/AccountList.js
|
|
542300
541506
|
var schemaAccountListParams = external_exports.object({
|
|
542301
541507
|
currencyIds: external_exports.array(external_exports.string()).optional()
|
|
542302
541508
|
}).optional();
|
|
@@ -542304,7 +541510,7 @@ var schemaAccountListResults = external_exports.object({
|
|
|
542304
541510
|
rawAccounts: external_exports.array(schemaRawAccount)
|
|
542305
541511
|
});
|
|
542306
541512
|
|
|
542307
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541513
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/spec/types/AccountReceive.js
|
|
542308
541514
|
var schemaAccountReceiveParams = external_exports.object({
|
|
542309
541515
|
accountId: external_exports.string(),
|
|
542310
541516
|
tokenCurrency: external_exports.string().optional()
|
|
@@ -542313,7 +541519,7 @@ var schemaAccountReceiveResults = external_exports.object({
|
|
|
542313
541519
|
address: external_exports.string()
|
|
542314
541520
|
});
|
|
542315
541521
|
|
|
542316
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541522
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/spec/types/AccountRequest.js
|
|
542317
541523
|
var schemaAccountRequestParams = external_exports.object({
|
|
542318
541524
|
currencyIds: external_exports.array(external_exports.string()).optional(),
|
|
542319
541525
|
showAccountFilter: external_exports.boolean().optional(),
|
|
@@ -542334,7 +541540,7 @@ var schemaAccountRequestResults = external_exports.object({
|
|
|
542334
541540
|
rawAccount: schemaRawAccount
|
|
542335
541541
|
});
|
|
542336
541542
|
|
|
542337
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541543
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/spec/types/BitcoinGetAddress.js
|
|
542338
541544
|
var schemaBitcoinGetAddressParams = external_exports.object({
|
|
542339
541545
|
accountId: external_exports.string(),
|
|
542340
541546
|
derivationPath: external_exports.string().optional()
|
|
@@ -542343,7 +541549,7 @@ var schemaBitcoinGetAddressResults = external_exports.object({
|
|
|
542343
541549
|
address: external_exports.string()
|
|
542344
541550
|
});
|
|
542345
541551
|
|
|
542346
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541552
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/spec/types/BitcoinGetPublicKey.js
|
|
542347
541553
|
var schemaBitcoinGetPublicKeyParams = external_exports.object({
|
|
542348
541554
|
accountId: external_exports.string(),
|
|
542349
541555
|
derivationPath: external_exports.string().optional()
|
|
@@ -542352,7 +541558,7 @@ var schemaBitcoinGetPublicKeyResults = external_exports.object({
|
|
|
542352
541558
|
publicKey: external_exports.string()
|
|
542353
541559
|
});
|
|
542354
541560
|
|
|
542355
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541561
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/spec/types/BitcoinGetXPub.js
|
|
542356
541562
|
var schemaBitcoinGetXPubParams = external_exports.object({
|
|
542357
541563
|
accountId: external_exports.string()
|
|
542358
541564
|
});
|
|
@@ -542360,7 +541566,7 @@ var schemaBitcoinGetXPubResults = external_exports.object({
|
|
|
542360
541566
|
xPub: external_exports.string()
|
|
542361
541567
|
});
|
|
542362
541568
|
|
|
542363
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541569
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/spec/types/BitcoinSignPsbt.js
|
|
542364
541570
|
var schemaBitcoinSignPsbtParams = external_exports.object({
|
|
542365
541571
|
accountId: external_exports.string(),
|
|
542366
541572
|
psbt: external_exports.string(),
|
|
@@ -542371,7 +541577,7 @@ var schemaBitcoinSignPsbtResults = external_exports.object({
|
|
|
542371
541577
|
txHash: external_exports.string().optional()
|
|
542372
541578
|
});
|
|
542373
541579
|
|
|
542374
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541580
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/spec/types/CurrencyList.js
|
|
542375
541581
|
var schemaCurrencyListParams = external_exports.object({
|
|
542376
541582
|
currencyIds: external_exports.array(external_exports.string()).optional()
|
|
542377
541583
|
}).optional();
|
|
@@ -542379,7 +541585,7 @@ var schemaCurrencyListResult = external_exports.object({
|
|
|
542379
541585
|
currencies: external_exports.array(schemaCurrency)
|
|
542380
541586
|
});
|
|
542381
541587
|
|
|
542382
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541588
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/spec/types/Device.js
|
|
542383
541589
|
var schemaDeviceType = external_exports.enum([
|
|
542384
541590
|
"blue",
|
|
542385
541591
|
"nanoS",
|
|
@@ -542390,7 +541596,7 @@ var schemaDeviceType = external_exports.enum([
|
|
|
542390
541596
|
"apex"
|
|
542391
541597
|
]);
|
|
542392
541598
|
|
|
542393
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541599
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/spec/types/DeviceClose.js
|
|
542394
541600
|
var schemaDeviceCloseParams = external_exports.object({
|
|
542395
541601
|
transportId: external_exports.string()
|
|
542396
541602
|
});
|
|
@@ -542398,7 +541604,7 @@ var schemaDeviceCloseResults = external_exports.object({
|
|
|
542398
541604
|
transportId: external_exports.string()
|
|
542399
541605
|
});
|
|
542400
541606
|
|
|
542401
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541607
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/spec/types/DeviceExchange.js
|
|
542402
541608
|
var schemaDeviceExchangeParams = external_exports.object({
|
|
542403
541609
|
apduHex: external_exports.string(),
|
|
542404
541610
|
transportId: external_exports.string()
|
|
@@ -542407,7 +541613,7 @@ var schemaDeviceExchangeResults = external_exports.object({
|
|
|
542407
541613
|
responseHex: external_exports.string()
|
|
542408
541614
|
});
|
|
542409
541615
|
|
|
542410
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541616
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/spec/types/DeviceOpen.js
|
|
542411
541617
|
var schemaDeviceOpenParams = external_exports.object({
|
|
542412
541618
|
/** ID of the device to select */
|
|
542413
541619
|
deviceId: external_exports.string()
|
|
@@ -542416,7 +541622,7 @@ var schemaDeviceOpenResults = external_exports.object({
|
|
|
542416
541622
|
transportId: external_exports.string()
|
|
542417
541623
|
});
|
|
542418
541624
|
|
|
542419
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541625
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/spec/types/DeviceSelect.js
|
|
542420
541626
|
var schemaDeviceSelectParams = external_exports.object({
|
|
542421
541627
|
/** Select the BOLOS App. If undefined selects BOLOS */
|
|
542422
541628
|
appName: external_exports.string().optional(),
|
|
@@ -542443,7 +541649,7 @@ var schemaDeviceSelectResults = external_exports.object({
|
|
|
542443
541649
|
deviceId: external_exports.string()
|
|
542444
541650
|
});
|
|
542445
541651
|
|
|
542446
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541652
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/spec/types/DeviceTransport.js
|
|
542447
541653
|
var schemaDeviceTransportParams = external_exports.object({
|
|
542448
541654
|
/** Select the BOLOS App. If undefined selects BOLOS */
|
|
542449
541655
|
appName: external_exports.string().optional(),
|
|
@@ -542470,7 +541676,7 @@ var schemaDeviceTransportResults = external_exports.object({
|
|
|
542470
541676
|
transportId: external_exports.string()
|
|
542471
541677
|
});
|
|
542472
541678
|
|
|
542473
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541679
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/spec/types/ExchangeComplete.js
|
|
542474
541680
|
var schemaFeeStrategyType = external_exports.enum(["SLOW", "MEDIUM", "FAST", "CUSTOM"]);
|
|
542475
541681
|
var schemaExchangeCompleteBaseParams = external_exports.object({
|
|
542476
541682
|
provider: external_exports.string(),
|
|
@@ -542502,7 +541708,7 @@ var schemaExchangeCompleteResults = external_exports.object({
|
|
|
542502
541708
|
transactionHash: external_exports.string()
|
|
542503
541709
|
});
|
|
542504
541710
|
|
|
542505
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541711
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/spec/types/ExchangeStart.js
|
|
542506
541712
|
var schemaExchangeType = external_exports.enum([
|
|
542507
541713
|
"SWAP",
|
|
542508
541714
|
"SELL",
|
|
@@ -542518,7 +541724,7 @@ var schemaExchangeStartResults = external_exports.object({
|
|
|
542518
541724
|
transactionId: external_exports.string()
|
|
542519
541725
|
});
|
|
542520
541726
|
|
|
542521
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541727
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/spec/types/MessageSign.js
|
|
542522
541728
|
var schemaMessageOptions = external_exports.object({
|
|
542523
541729
|
hwAppId: external_exports.string().optional(),
|
|
542524
541730
|
dependencies: external_exports.array(external_exports.string()).optional()
|
|
@@ -542533,7 +541739,7 @@ var schemaMessageSignResults = external_exports.object({
|
|
|
542533
541739
|
hexSignedMessage: external_exports.string()
|
|
542534
541740
|
});
|
|
542535
541741
|
|
|
542536
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541742
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/spec/types/StorageGet.js
|
|
542537
541743
|
var schemaStorageGetParams = external_exports.object({
|
|
542538
541744
|
key: external_exports.string().min(1),
|
|
542539
541745
|
storeId: external_exports.string().min(1).optional()
|
|
@@ -542542,7 +541748,7 @@ var schemaStorageGetResults = external_exports.object({
|
|
|
542542
541748
|
value: external_exports.string().optional()
|
|
542543
541749
|
});
|
|
542544
541750
|
|
|
542545
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541751
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/spec/types/StorageSet.js
|
|
542546
541752
|
var schemaStorageSetParams = external_exports.object({
|
|
542547
541753
|
key: external_exports.string(),
|
|
542548
541754
|
value: external_exports.string(),
|
|
@@ -542550,7 +541756,7 @@ var schemaStorageSetParams = external_exports.object({
|
|
|
542550
541756
|
});
|
|
542551
541757
|
var schemaStorageSetResults = external_exports.void().optional();
|
|
542552
541758
|
|
|
542553
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541759
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/spec/types/TransactionSign.js
|
|
542554
541760
|
var schemaTransactionOptions = external_exports.object({
|
|
542555
541761
|
hwAppId: external_exports.string().optional(),
|
|
542556
541762
|
dependencies: external_exports.array(external_exports.string()).optional()
|
|
@@ -542566,7 +541772,7 @@ var schemaTransactionSignResults = external_exports.object({
|
|
|
542566
541772
|
signedTransactionHex: external_exports.string()
|
|
542567
541773
|
});
|
|
542568
541774
|
|
|
542569
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541775
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/spec/types/TransactionSignAndBroadcast.js
|
|
542570
541776
|
var schemaTransactionOptions2 = external_exports.object({
|
|
542571
541777
|
hwAppId: external_exports.string().optional(),
|
|
542572
541778
|
dependencies: external_exports.array(external_exports.string()).optional()
|
|
@@ -542582,7 +541788,7 @@ var schemaTransactionSignAndBroadcastResults = external_exports.object({
|
|
|
542582
541788
|
transactionHash: external_exports.string()
|
|
542583
541789
|
});
|
|
542584
541790
|
|
|
542585
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541791
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/spec/types/TransactionSignRaw.js
|
|
542586
541792
|
var schemaTransactionOptions3 = external_exports.object({
|
|
542587
541793
|
hwAppId: external_exports.string().optional(),
|
|
542588
541794
|
dependencies: external_exports.array(external_exports.string()).optional()
|
|
@@ -542599,13 +541805,13 @@ var schemaTransactionSignRawResults = external_exports.object({
|
|
|
542599
541805
|
transactionHash: external_exports.string().optional()
|
|
542600
541806
|
});
|
|
542601
541807
|
|
|
542602
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541808
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/spec/types/WalletCapabilities.js
|
|
542603
541809
|
var schemaWalletCapabilitiesParams = external_exports.object({});
|
|
542604
541810
|
var schemaWalletCapabilitiesResults = external_exports.object({
|
|
542605
541811
|
methodIds: external_exports.array(external_exports.string())
|
|
542606
541812
|
});
|
|
542607
541813
|
|
|
542608
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541814
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/spec/types/WalletInfo.js
|
|
542609
541815
|
var schemaWalletInfoParams = external_exports.object({});
|
|
542610
541816
|
var schemaWalletInfoResults = external_exports.object({
|
|
542611
541817
|
tracking: external_exports.boolean(),
|
|
@@ -542615,13 +541821,13 @@ var schemaWalletInfoResults = external_exports.object({
|
|
|
542615
541821
|
})
|
|
542616
541822
|
});
|
|
542617
541823
|
|
|
542618
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541824
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/spec/types/WalletUserId.js
|
|
542619
541825
|
var schemaWalletUserIdParams = external_exports.object({});
|
|
542620
541826
|
var schemaWalletUserIdResults = external_exports.object({
|
|
542621
541827
|
userId: external_exports.string()
|
|
542622
541828
|
});
|
|
542623
541829
|
|
|
542624
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.
|
|
541830
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-core@1.26.1_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-core/lib-es/spec/methods.js
|
|
542625
541831
|
var schemaRPCMethod = external_exports.enum([
|
|
542626
541832
|
"account.list",
|
|
542627
541833
|
"account.receive",
|
|
@@ -543506,18 +542712,18 @@ var discoverDevices = (accept = () => true) => {
|
|
|
543506
542712
|
return import_rxjs4.EMPTY;
|
|
543507
542713
|
}))));
|
|
543508
542714
|
};
|
|
543509
|
-
var open = (deviceId,
|
|
542715
|
+
var open = (deviceId, options24, context) => {
|
|
543510
542716
|
for (let i58 = 0; i58 < modules.length; i58++) {
|
|
543511
542717
|
const m62 = modules[i58];
|
|
543512
|
-
const p79 = m62.open(deviceId,
|
|
542718
|
+
const p79 = m62.open(deviceId, options24?.openTimeoutMs, context, options24?.matchDeviceByName);
|
|
543513
542719
|
if (p79) {
|
|
543514
542720
|
trace({
|
|
543515
542721
|
type: LOG_TYPE,
|
|
543516
542722
|
message: `Found a matching Transport: ${m62.id}`,
|
|
543517
542723
|
context,
|
|
543518
|
-
data: {
|
|
542724
|
+
data: { options: options24 }
|
|
543519
542725
|
});
|
|
543520
|
-
if (!
|
|
542726
|
+
if (!options24?.openTimeoutMs) {
|
|
543521
542727
|
return p79;
|
|
543522
542728
|
}
|
|
543523
542729
|
let timer7 = null;
|
|
@@ -543532,11 +542738,11 @@ var open = (deviceId, timeoutMs, context) => {
|
|
|
543532
542738
|
timer7 = setTimeout(() => {
|
|
543533
542739
|
trace({
|
|
543534
542740
|
type: LOG_TYPE,
|
|
543535
|
-
message: `Could not open registered transport ${m62.id} on ${deviceId}, timed out after ${
|
|
542741
|
+
message: `Could not open registered transport ${m62.id} on ${deviceId}, timed out after ${options24?.openTimeoutMs}ms`,
|
|
543536
542742
|
context
|
|
543537
542743
|
});
|
|
543538
542744
|
return reject(new CantOpenDevice(`Timeout while opening device on transport ${m62.id}`));
|
|
543539
|
-
},
|
|
542745
|
+
}, options24?.openTimeoutMs);
|
|
543540
542746
|
})
|
|
543541
542747
|
]);
|
|
543542
542748
|
}
|
|
@@ -553667,14 +552873,14 @@ var withDevice = (deviceId, options24) => (job2) => new import_rxjs8.Observable(
|
|
|
553667
552873
|
const jobId = queuedJobManager.setLastQueuedJob(deviceId, new Promise((resolve) => {
|
|
553668
552874
|
resolveQueuedJob = resolve;
|
|
553669
552875
|
}));
|
|
553670
|
-
const
|
|
553671
|
-
|
|
552876
|
+
const tracer2 = new LocalTracer(LOG_TYPE2, { jobId, deviceId, origin: "hw:withDevice" });
|
|
552877
|
+
tracer2.trace(`New job for device: ${deviceId || "USB"}`);
|
|
553672
552878
|
const finalize4 = async (transport, cleanups) => {
|
|
553673
|
-
|
|
552879
|
+
tracer2.trace("Closing and cleaning transport", { function: "finalize" });
|
|
553674
552880
|
try {
|
|
553675
552881
|
await close(transport, deviceId);
|
|
553676
552882
|
} catch (error) {
|
|
553677
|
-
|
|
552883
|
+
tracer2.trace(`An error occurred when closing transport (ignoring it): ${error}`, {
|
|
553678
552884
|
error,
|
|
553679
552885
|
function: "finalize"
|
|
553680
552886
|
});
|
|
@@ -553683,19 +552889,19 @@ var withDevice = (deviceId, options24) => (job2) => new import_rxjs8.Observable(
|
|
|
553683
552889
|
};
|
|
553684
552890
|
let unsubscribed;
|
|
553685
552891
|
let sub;
|
|
553686
|
-
|
|
552892
|
+
tracer2.trace("Waiting for the previous job in the queue to complete", {
|
|
553687
552893
|
previousJobId: previousQueuedJob.id
|
|
553688
552894
|
});
|
|
553689
552895
|
previousQueuedJob.job.then(() => {
|
|
553690
|
-
|
|
552896
|
+
tracer2.trace("Previous queued job resolved, now trying to get a Transport instance", {
|
|
553691
552897
|
previousJobId: previousQueuedJob.id,
|
|
553692
552898
|
currentJobId: jobId
|
|
553693
552899
|
});
|
|
553694
|
-
return open(deviceId, options24
|
|
552900
|
+
return open(deviceId, options24, tracer2.getContext());
|
|
553695
552901
|
}).then(async (transport) => {
|
|
553696
|
-
|
|
552902
|
+
tracer2.trace("Got a Transport instance from open");
|
|
553697
552903
|
if (unsubscribed) {
|
|
553698
|
-
|
|
552904
|
+
tracer2.trace("Unsubscribed (1) while processing job");
|
|
553699
552905
|
return finalize4(transport, [resolveQueuedJob]);
|
|
553700
552906
|
}
|
|
553701
552907
|
if (needsCleanup[identifyTransport(transport)]) {
|
|
@@ -553705,7 +552911,7 @@ var withDevice = (deviceId, options24) => (job2) => new import_rxjs8.Observable(
|
|
|
553705
552911
|
}
|
|
553706
552912
|
return transport;
|
|
553707
552913
|
}).catch((e35) => {
|
|
553708
|
-
|
|
552914
|
+
tracer2.trace(`Error while opening Transport: ${e35}`, { error: e35 });
|
|
553709
552915
|
resolveQueuedJob();
|
|
553710
552916
|
if (e35 instanceof BluetoothRequired)
|
|
553711
552917
|
throw e35;
|
|
@@ -553720,21 +552926,21 @@ var withDevice = (deviceId, options24) => (job2) => new import_rxjs8.Observable(
|
|
|
553720
552926
|
console.error(e35);
|
|
553721
552927
|
throw new CantOpenDevice(e35.message);
|
|
553722
552928
|
}).then((transport) => {
|
|
553723
|
-
|
|
552929
|
+
tracer2.trace("Executing job", { hasTransport: !!transport, unsubscribed });
|
|
553724
552930
|
if (!transport)
|
|
553725
552931
|
return;
|
|
553726
552932
|
if (unsubscribed) {
|
|
553727
|
-
|
|
552933
|
+
tracer2.trace("Unsubscribed (2) while processing job");
|
|
553728
552934
|
return finalize4(transport, [resolveQueuedJob]);
|
|
553729
552935
|
}
|
|
553730
|
-
sub = job2(transport).pipe((0, import_operators3.catchError)((error) => initialErrorRemapping(error,
|
|
552936
|
+
sub = job2(transport).pipe((0, import_operators3.catchError)((error) => initialErrorRemapping(error, tracer2.getContext())), (0, import_operators3.catchError)(errorRemapping), transportFinally(() => {
|
|
553731
552937
|
return finalize4(transport, [resolveQueuedJob]);
|
|
553732
552938
|
})).subscribe({
|
|
553733
552939
|
next: (event) => {
|
|
553734
552940
|
o41.next(event);
|
|
553735
552941
|
},
|
|
553736
552942
|
error: (error) => {
|
|
553737
|
-
|
|
552943
|
+
tracer2.trace("Job error", { error });
|
|
553738
552944
|
if (error.statusCode) {
|
|
553739
552945
|
o41.error(new TransportStatusError(error.statusCode));
|
|
553740
552946
|
} else {
|
|
@@ -553746,11 +552952,11 @@ var withDevice = (deviceId, options24) => (job2) => new import_rxjs8.Observable(
|
|
|
553746
552952
|
}
|
|
553747
552953
|
});
|
|
553748
552954
|
}).catch((error) => {
|
|
553749
|
-
|
|
552955
|
+
tracer2.trace(`Caught error on job execution step: ${error}`, { error });
|
|
553750
552956
|
o41.error(error);
|
|
553751
552957
|
});
|
|
553752
552958
|
return () => {
|
|
553753
|
-
|
|
552959
|
+
tracer2.trace(`Unsubscribing withDevice flow. Ongoing job to unsubscribe from ? ${!!sub}`);
|
|
553754
552960
|
unsubscribed = true;
|
|
553755
552961
|
if (sub)
|
|
553756
552962
|
sub.unsubscribe();
|
|
@@ -621840,7 +621046,7 @@ init_lib14();
|
|
|
621840
621046
|
init_lib_es();
|
|
621841
621047
|
var EthAppPleaseEnableContractData3 = createCustomErrorClass("EthAppPleaseEnableContractData");
|
|
621842
621048
|
var EthAppNftNotSupported = createCustomErrorClass("EthAppNftNotSupported");
|
|
621843
|
-
var
|
|
621049
|
+
var CeloAppPleaseEnableContractData3 = createCustomErrorClass("CeloAppPleaseEnableContractData");
|
|
621844
621050
|
|
|
621845
621051
|
// ../../libs/ledgerjs/packages/hw-app-eth/lib-es/modules/EIP712/index.js
|
|
621846
621052
|
var import_semver5 = __toESM(require_semver2());
|
|
@@ -624057,7 +623263,7 @@ var starkQuantizationTypeMap = {
|
|
|
624057
623263
|
var remapTransactionRelatedErrors = (e35, chainId) => {
|
|
624058
623264
|
if (e35 && e35.statusCode === 27264) {
|
|
624059
623265
|
if (chainId.toNumber() === 42220) {
|
|
624060
|
-
return new
|
|
623266
|
+
return new CeloAppPleaseEnableContractData3();
|
|
624061
623267
|
}
|
|
624062
623268
|
return new EthAppPleaseEnableContractData3("Please enable Blind signing or Contract data in the Ethereum app Settings");
|
|
624063
623269
|
}
|
|
@@ -628355,9 +627561,9 @@ function toOperation(asset, op) {
|
|
|
628355
627561
|
}
|
|
628356
627562
|
};
|
|
628357
627563
|
}
|
|
628358
|
-
async function listOperations2(currency24, address3,
|
|
627564
|
+
async function listOperations2(currency24, address3, pagination) {
|
|
628359
627565
|
const explorerApi2 = getExplorerApi(currency24);
|
|
628360
|
-
const { lastCoinOperations, lastTokenOperations, lastNftOperations } = await explorerApi2.getLastOperations(currency24, address3, `js:2:${currency24.id}:${address3}:`, minHeight);
|
|
627566
|
+
const { lastCoinOperations, lastTokenOperations, lastNftOperations } = await explorerApi2.getLastOperations(currency24, address3, `js:2:${currency24.id}:${address3}:`, pagination.minHeight);
|
|
628361
627567
|
const isNativeOperation = (coinOperation) => ![...lastTokenOperations, ...lastNftOperations].map((op) => op.hash).includes(coinOperation.hash);
|
|
628362
627568
|
const isTokenOperation = (coinOperation) => [...lastTokenOperations, ...lastNftOperations].map((op) => op.hash).includes(coinOperation.hash);
|
|
628363
627569
|
const parents = Object.fromEntries(lastCoinOperations.filter(isTokenOperation).map((op) => [op.hash, op]));
|
|
@@ -628374,7 +627580,8 @@ async function listOperations2(currency24, address3, minHeight) {
|
|
|
628374
627580
|
"NFT_IN",
|
|
628375
627581
|
"NFT_OUT"
|
|
628376
627582
|
].includes(operation.type);
|
|
628377
|
-
|
|
627583
|
+
const operations4 = nativeOperations.concat(tokenOperations).filter(hasValidType).sort((a68, b17) => pagination.order === "asc" ? a68.tx.date.getTime() - b17.tx.date.getTime() : b17.tx.date.getTime() - a68.tx.date.getTime());
|
|
627584
|
+
return [operations4, ""];
|
|
628378
627585
|
}
|
|
628379
627586
|
|
|
628380
627587
|
// ../../libs/coin-modules/coin-evm/lib-es/logic/craftTransaction.js
|
|
@@ -682099,9 +681306,9 @@ init_lib_es();
|
|
|
682099
681306
|
init_lib_es();
|
|
682100
681307
|
var HederaAddAccountError = createCustomErrorClass("HederaAddAccountError");
|
|
682101
681308
|
var HederaRecipientInvalidChecksum = createCustomErrorClass("HederaRecipientInvalidChecksum");
|
|
682102
|
-
var
|
|
682103
|
-
var
|
|
682104
|
-
var
|
|
681309
|
+
var HederaInsufficientFundsForAssociation = createCustomErrorClass("HederaInsufficientFundsForAssociation");
|
|
681310
|
+
var HederaRecipientTokenAssociationRequired = createCustomErrorClass("HederaRecipientTokenAssociationRequired");
|
|
681311
|
+
var HederaRecipientTokenAssociationUnverified = createCustomErrorClass("HederaRecipientTokenAssociationUnverified");
|
|
682105
681312
|
|
|
682106
681313
|
// ../../libs/coin-modules/coin-hedera/lib-es/network/api.js
|
|
682107
681314
|
var getMirrorApiUrl = () => getEnv("API_HEDERA_MIRROR");
|
|
@@ -682623,7 +681830,7 @@ async function handleTokenAssociateTransaction(account3, transaction) {
|
|
|
682623
681830
|
const currentWorthInUSD = usdRate ? hbarBalance.multipliedBy(usdRate) : new import_bignumber180.default(0);
|
|
682624
681831
|
const requiredWorthInUSD = getEnv("HEDERA_TOKEN_ASSOCIATION_MIN_USD");
|
|
682625
681832
|
if (currentWorthInUSD.isLessThan(requiredWorthInUSD)) {
|
|
682626
|
-
errors.insufficientAssociateBalance = new
|
|
681833
|
+
errors.insufficientAssociateBalance = new HederaInsufficientFundsForAssociation("", {
|
|
682627
681834
|
requiredWorthInUSD
|
|
682628
681835
|
});
|
|
682629
681836
|
}
|
|
@@ -682651,10 +681858,10 @@ async function handleTokenTransaction(account3, subAccount, transaction) {
|
|
|
682651
681858
|
try {
|
|
682652
681859
|
const hasRecipientTokenAssociated = await checkAccountTokenAssociationStatus(transaction.recipient, subAccount.token.contractAddress);
|
|
682653
681860
|
if (!hasRecipientTokenAssociated) {
|
|
682654
|
-
warnings3.missingAssociation = new
|
|
681861
|
+
warnings3.missingAssociation = new HederaRecipientTokenAssociationRequired();
|
|
682655
681862
|
}
|
|
682656
681863
|
} catch {
|
|
682657
|
-
warnings3.unverifiedAssociation = new
|
|
681864
|
+
warnings3.unverifiedAssociation = new HederaRecipientTokenAssociationUnverified();
|
|
682658
681865
|
}
|
|
682659
681866
|
}
|
|
682660
681867
|
if (transaction.amount.eq(0)) {
|
|
@@ -798385,7 +797592,7 @@ function createApi5(config4, currencyId) {
|
|
|
798385
797592
|
estimateFees: (transactionIntent, customFeesParameters) => estimateFees2(currency24, transactionIntent, customFeesParameters),
|
|
798386
797593
|
getBalance: (address3) => getBalance3(currency24, address3),
|
|
798387
797594
|
lastBlock: () => lastBlock2(currency24),
|
|
798388
|
-
listOperations: (address3, pagination) => listOperations2(currency24, address3, pagination
|
|
797595
|
+
listOperations: (address3, pagination) => listOperations2(currency24, address3, pagination),
|
|
798389
797596
|
getBlock(_height) {
|
|
798390
797597
|
throw new Error("getBlock is not supported");
|
|
798391
797598
|
},
|
|
@@ -819276,12 +818483,11 @@ function genericGetAccountShape(network, kind) {
|
|
|
819276
818483
|
const spendableBalance = BigInt(nativeBalance - BigInt(nativeAsset?.locked ?? "0"));
|
|
819277
818484
|
const oldOps = (initialAccount?.operations || []).map((op) => op.accountId === accountId2 ? op : { ...op, accountId: accountId2, id: encodeOperationId(accountId2, op.hash, op.type) });
|
|
819278
818485
|
const lastPagingToken = oldOps[0]?.extra?.pagingToken || "";
|
|
819279
|
-
|
|
819280
|
-
|
|
819281
|
-
|
|
819282
|
-
}
|
|
818486
|
+
const syncHash = await getSyncHash(currency24.id, syncConfig.blacklistedTokenIds);
|
|
818487
|
+
const syncFromScratch = !initialAccount?.blockHeight || initialAccount?.syncHash !== syncHash;
|
|
818488
|
+
const minHeight = syncFromScratch ? 0 : (oldOps[0]?.blockHeight ?? 0) + 1;
|
|
819283
818489
|
const paginationParams = { minHeight, order: "asc" };
|
|
819284
|
-
if (lastPagingToken) {
|
|
818490
|
+
if (lastPagingToken && !syncFromScratch) {
|
|
819285
818491
|
paginationParams.lastPagingToken = lastPagingToken;
|
|
819286
818492
|
}
|
|
819287
818493
|
const [newCoreOps] = await alpacaApi.listOperations(address3, paginationParams);
|
|
@@ -819294,7 +818500,7 @@ function genericGetAccountShape(network, kind) {
|
|
|
819294
818500
|
operations: newAssetOperations,
|
|
819295
818501
|
getTokenFromAsset: alpacaApi.getTokenFromAsset
|
|
819296
818502
|
});
|
|
819297
|
-
const subAccounts = mergeSubAccounts5(initialAccount?.subAccounts ?? [], newSubAccounts);
|
|
818503
|
+
const subAccounts = syncFromScratch ? newSubAccounts : mergeSubAccounts5(initialAccount?.subAccounts ?? [], newSubAccounts);
|
|
819298
818504
|
const newOpsWithSubs = newOps.map((op) => {
|
|
819299
818505
|
const subOperations = inferSubOperations(op.hash, newSubAccounts);
|
|
819300
818506
|
return cleanedOperation({
|
|
@@ -819303,10 +818509,8 @@ function genericGetAccountShape(network, kind) {
|
|
|
819303
818509
|
});
|
|
819304
818510
|
});
|
|
819305
818511
|
const confirmedOperations = alpacaApi.refreshOperations && initialAccount?.pendingOperations.length ? await alpacaApi.refreshOperations(initialAccount.pendingOperations) : [];
|
|
819306
|
-
const
|
|
819307
|
-
|
|
819308
|
-
...newOpsWithSubs
|
|
819309
|
-
]);
|
|
818512
|
+
const newOperations = [...confirmedOperations, ...newOpsWithSubs];
|
|
818513
|
+
const operations4 = syncFromScratch ? newOperations : mergeOps(oldOps, newOperations);
|
|
819310
818514
|
const res = {
|
|
819311
818515
|
id: accountId2,
|
|
819312
818516
|
xpub: address3,
|
|
@@ -819315,7 +818519,8 @@ function genericGetAccountShape(network, kind) {
|
|
|
819315
818519
|
spendableBalance: new import_bignumber362.default(spendableBalance.toString()),
|
|
819316
818520
|
operations: operations4,
|
|
819317
818521
|
subAccounts,
|
|
819318
|
-
operationsCount: operations4.length
|
|
818522
|
+
operationsCount: operations4.length,
|
|
818523
|
+
syncHash
|
|
819319
818524
|
};
|
|
819320
818525
|
return res;
|
|
819321
818526
|
};
|
|
@@ -835673,10 +834878,10 @@ var import_invariant115 = __toESM(require("invariant"));
|
|
|
835673
834878
|
var import_react3 = require("react");
|
|
835674
834879
|
var import_rxjs183 = require("rxjs");
|
|
835675
834880
|
|
|
835676
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-client@1.12.
|
|
834881
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-client@1.12.5_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-client/lib-es/TransportWalletAPI.js
|
|
835677
834882
|
init_Transport();
|
|
835678
834883
|
|
|
835679
|
-
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-client@1.12.
|
|
834884
|
+
// ../../node_modules/.pnpm/@ledgerhq+wallet-api-client@1.12.5_@ton+crypto@3.3.0/node_modules/@ledgerhq/wallet-api-client/lib-es/WalletAPIClient.js
|
|
835680
834885
|
var defaultLogger2 = new Logger("Wallet-API-Client");
|
|
835681
834886
|
|
|
835682
834887
|
// ../../libs/wallet-api-acre-module/lib-es/types.js
|
|
@@ -836066,6 +835271,8 @@ function getProviderIdUseCase({ deviceInfo, forceProvider }) {
|
|
|
836066
835271
|
}
|
|
836067
835272
|
|
|
836068
835273
|
// ../../libs/device-core/lib-es/managerApi/repositories/HttpManagerApiRepository.js
|
|
835274
|
+
init_lib_es2();
|
|
835275
|
+
var tracer = new LocalTracer("live-dmk-tracer", { function: "HttpManagerApiRepository" });
|
|
836069
835276
|
var HttpManagerApiRepository = class {
|
|
836070
835277
|
managerApiBase;
|
|
836071
835278
|
liveCommonVersion;
|
|
@@ -836078,6 +835285,9 @@ var HttpManagerApiRepository = class {
|
|
|
836078
835285
|
// parameters.
|
|
836079
835286
|
fetchLatestFirmware = makeLRUCache(async ({ current_se_firmware_final_version, device_version, providerId, userId }) => {
|
|
836080
835287
|
const salt = getUserHashes(userId).firmwareSalt;
|
|
835288
|
+
tracer.trace("Fetch latest firmware", {
|
|
835289
|
+
salt
|
|
835290
|
+
});
|
|
836081
835291
|
const { data: data6 } = await network_default({
|
|
836082
835292
|
method: "GET",
|
|
836083
835293
|
url: import_url8.default.format({
|
|
@@ -836479,12 +835689,12 @@ init_lib_es2();
|
|
|
836479
835689
|
init_Transport();
|
|
836480
835690
|
init_lib_es2();
|
|
836481
835691
|
function parseGetDeviceNameResponse(response) {
|
|
836482
|
-
const
|
|
835692
|
+
const tracer2 = new LocalTracer("hw", {
|
|
836483
835693
|
function: "parseGetDeviceNameResponse"
|
|
836484
835694
|
});
|
|
836485
835695
|
const status = response.readUInt16BE(response.length - 2);
|
|
836486
|
-
if (
|
|
836487
|
-
|
|
835696
|
+
if (tracer2)
|
|
835697
|
+
tracer2.trace("Result status from 0xe0d20000", { status });
|
|
836488
835698
|
switch (status) {
|
|
836489
835699
|
case StatusCodes.OK:
|
|
836490
835700
|
return response.slice(0, response.length - 2).toString("utf-8");
|
|
@@ -836499,17 +835709,17 @@ function parseGetDeviceNameResponse(response) {
|
|
|
836499
835709
|
var CLEANING_APDU = [224, 80, 0, 0, void 0];
|
|
836500
835710
|
var GET_DEVICE_NAME_APDU = [224, 210, 0, 0, Buffer.from([])];
|
|
836501
835711
|
async function getDeviceName(transport) {
|
|
836502
|
-
const
|
|
835712
|
+
const tracer2 = new LocalTracer("hw", {
|
|
836503
835713
|
transport: transport.getTraceContext(),
|
|
836504
835714
|
function: "getDeviceName"
|
|
836505
835715
|
});
|
|
836506
|
-
|
|
835716
|
+
tracer2.trace("Start");
|
|
836507
835717
|
try {
|
|
836508
835718
|
await transport.send(...CLEANING_APDU);
|
|
836509
835719
|
} catch (error) {
|
|
836510
|
-
|
|
835720
|
+
tracer2.trace(`Error on 0xe0500000: ${error}`, { error });
|
|
836511
835721
|
}
|
|
836512
|
-
|
|
835722
|
+
tracer2.trace("Sent cleaning 0xe0500000");
|
|
836513
835723
|
const res = await transport.send(...GET_DEVICE_NAME_APDU, [
|
|
836514
835724
|
StatusCodes.OK,
|
|
836515
835725
|
StatusCodes.DEVICE_NOT_ONBOARDED,
|
|
@@ -836552,21 +835762,21 @@ var RESPONSE_STATUS_SET = [
|
|
|
836552
835762
|
StatusCodes.INVALID_BACKUP_STATE
|
|
836553
835763
|
];
|
|
836554
835764
|
async function backupAppStorage(transport) {
|
|
836555
|
-
const
|
|
835765
|
+
const tracer2 = new LocalTracer("hw", {
|
|
836556
835766
|
transport: transport.getTraceContext(),
|
|
836557
835767
|
function: "backupAppStorage"
|
|
836558
835768
|
});
|
|
836559
|
-
|
|
835769
|
+
tracer2.trace("Start");
|
|
836560
835770
|
const apdu = [...BACKUP_APP_STORAGE, Buffer.from([])];
|
|
836561
835771
|
const response = await transport.send(...apdu, RESPONSE_STATUS_SET);
|
|
836562
835772
|
return parseResponse2(response);
|
|
836563
835773
|
}
|
|
836564
835774
|
function parseResponse2(data6) {
|
|
836565
|
-
const
|
|
835775
|
+
const tracer2 = new LocalTracer("hw", {
|
|
836566
835776
|
function: "parseResponse@backupAppStorage"
|
|
836567
835777
|
});
|
|
836568
835778
|
const status = data6.readUInt16BE(data6.length - 2);
|
|
836569
|
-
|
|
835779
|
+
tracer2.trace("Result status from 0xe06b0000", { status });
|
|
836570
835780
|
switch (status) {
|
|
836571
835781
|
case StatusCodes.OK:
|
|
836572
835782
|
return data6.subarray(0, data6.length - 2);
|
|
@@ -836599,22 +835809,22 @@ var RESPONSE_STATUS_SET2 = [
|
|
|
836599
835809
|
StatusCodes.INVALID_APP_NAME_LENGTH
|
|
836600
835810
|
];
|
|
836601
835811
|
async function getAppStorageInfo(transport, appName) {
|
|
836602
|
-
const
|
|
835812
|
+
const tracer2 = new LocalTracer("hw", {
|
|
836603
835813
|
transport: transport.getTraceContext(),
|
|
836604
835814
|
function: "getAppStorageInfo"
|
|
836605
835815
|
});
|
|
836606
|
-
|
|
835816
|
+
tracer2.trace("Start");
|
|
836607
835817
|
const params = Buffer.from(appName, "ascii");
|
|
836608
835818
|
const apdu = [...GET_APP_STORAGE_INFO, params];
|
|
836609
835819
|
const response = await transport.send(...apdu, RESPONSE_STATUS_SET2);
|
|
836610
835820
|
return parseResponse3(response);
|
|
836611
835821
|
}
|
|
836612
835822
|
function parseResponse3(data6) {
|
|
836613
|
-
const
|
|
835823
|
+
const tracer2 = new LocalTracer("hw", {
|
|
836614
835824
|
function: "parseResponse@getAppStorageInfo"
|
|
836615
835825
|
});
|
|
836616
835826
|
const status = data6.readUInt16BE(data6.length - 2);
|
|
836617
|
-
|
|
835827
|
+
tracer2.trace("Result status from 0xe06a0000", { status });
|
|
836618
835828
|
switch (status) {
|
|
836619
835829
|
case StatusCodes.OK: {
|
|
836620
835830
|
let offset2 = 0;
|
|
@@ -836657,21 +835867,21 @@ var RESPONSE_STATUS_SET3 = [
|
|
|
836657
835867
|
StatusCodes.INVALID_BACKUP_HEADER
|
|
836658
835868
|
];
|
|
836659
835869
|
async function restoreAppStorage(transport, chunk5) {
|
|
836660
|
-
const
|
|
835870
|
+
const tracer2 = new LocalTracer("hw", {
|
|
836661
835871
|
transport: transport.getTraceContext(),
|
|
836662
835872
|
function: "restoreAppStorage"
|
|
836663
835873
|
});
|
|
836664
|
-
|
|
835874
|
+
tracer2.trace("Start");
|
|
836665
835875
|
const apdu = [...RESTORE_APP_STORAGE, chunk5];
|
|
836666
835876
|
const response = await transport.send(...apdu, RESPONSE_STATUS_SET3);
|
|
836667
835877
|
parseResponse4(response);
|
|
836668
835878
|
}
|
|
836669
835879
|
function parseResponse4(data6) {
|
|
836670
|
-
const
|
|
835880
|
+
const tracer2 = new LocalTracer("hw", {
|
|
836671
835881
|
function: "parseResponse@restoreAppStorage"
|
|
836672
835882
|
});
|
|
836673
835883
|
const status = data6.readUInt16BE(data6.length - 2);
|
|
836674
|
-
|
|
835884
|
+
tracer2.trace("Result status from 0xe06d0000", { status });
|
|
836675
835885
|
switch (status) {
|
|
836676
835886
|
case StatusCodes.OK:
|
|
836677
835887
|
return;
|
|
@@ -836706,21 +835916,21 @@ var RESPONSE_STATUS_SET4 = [
|
|
|
836706
835916
|
StatusCodes.INVALID_CHUNK_LENGTH
|
|
836707
835917
|
];
|
|
836708
835918
|
async function restoreAppStorageCommit(transport) {
|
|
836709
|
-
const
|
|
835919
|
+
const tracer2 = new LocalTracer("hw", {
|
|
836710
835920
|
transport: transport.getTraceContext(),
|
|
836711
835921
|
function: "restoreAppStorageCommit"
|
|
836712
835922
|
});
|
|
836713
|
-
|
|
835923
|
+
tracer2.trace("Start");
|
|
836714
835924
|
const apdu = [...RESTORE_APP_STORAGE_COMMIT, Buffer.from([])];
|
|
836715
835925
|
const response = await transport.send(...apdu, RESPONSE_STATUS_SET4);
|
|
836716
835926
|
parseResponse5(response);
|
|
836717
835927
|
}
|
|
836718
835928
|
function parseResponse5(data6) {
|
|
836719
|
-
const
|
|
835929
|
+
const tracer2 = new LocalTracer("hw", {
|
|
836720
835930
|
function: "parseResponse@restoreAppStorageCommit"
|
|
836721
835931
|
});
|
|
836722
835932
|
const status = data6.readUInt16BE(data6.length - 2);
|
|
836723
|
-
|
|
835933
|
+
tracer2.trace("Result status from 0xe06e0000", { status });
|
|
836724
835934
|
switch (status) {
|
|
836725
835935
|
case StatusCodes.OK:
|
|
836726
835936
|
return;
|
|
@@ -836752,11 +835962,11 @@ var RESPONSE_STATUS_SET5 = [
|
|
|
836752
835962
|
StatusCodes.INVALID_BACKUP_LENGTH
|
|
836753
835963
|
];
|
|
836754
835964
|
async function restoreAppStorageInit(transport, appName, backupSize) {
|
|
836755
|
-
const
|
|
835965
|
+
const tracer2 = new LocalTracer("hw", {
|
|
836756
835966
|
transport: transport.getTraceContext(),
|
|
836757
835967
|
function: "restoreAppStorageInit"
|
|
836758
835968
|
});
|
|
836759
|
-
|
|
835969
|
+
tracer2.trace("Start");
|
|
836760
835970
|
const params = Buffer.concat([
|
|
836761
835971
|
Buffer.from(backupSize.toString(16).padStart(8, "0"), "hex"),
|
|
836762
835972
|
// BACKUP_LEN
|
|
@@ -836768,11 +835978,11 @@ async function restoreAppStorageInit(transport, appName, backupSize) {
|
|
|
836768
835978
|
parseResponse6(response);
|
|
836769
835979
|
}
|
|
836770
835980
|
function parseResponse6(data6) {
|
|
836771
|
-
const
|
|
835981
|
+
const tracer2 = new LocalTracer("hw", {
|
|
836772
835982
|
function: "parseResponse@restoreAppStorageInit"
|
|
836773
835983
|
});
|
|
836774
835984
|
const status = data6.readUInt16BE(data6.length - 2);
|
|
836775
|
-
|
|
835985
|
+
tracer2.trace("Result status from 0xe06c0000", { status });
|
|
836776
835986
|
switch (status) {
|
|
836777
835987
|
case StatusCodes.OK:
|
|
836778
835988
|
return;
|
|
@@ -836879,21 +836089,21 @@ var RESPONSE_STATUS_SET6 = [
|
|
|
836879
836089
|
StatusCodes.PIN_NOT_SET
|
|
836880
836090
|
];
|
|
836881
836091
|
async function reinstallConfigurationConsent(transport, args3) {
|
|
836882
|
-
const
|
|
836092
|
+
const tracer2 = new LocalTracer("hw", {
|
|
836883
836093
|
transport: transport.getTraceContext(),
|
|
836884
836094
|
function: "reinstallConfigurationConsent"
|
|
836885
836095
|
});
|
|
836886
|
-
|
|
836096
|
+
tracer2.trace("Start");
|
|
836887
836097
|
const apdu = [...REINSTALL_CONFIG, Buffer.from(args3)];
|
|
836888
836098
|
const response = await transport.send(...apdu, RESPONSE_STATUS_SET6);
|
|
836889
836099
|
return parseResponse7(response);
|
|
836890
836100
|
}
|
|
836891
836101
|
function parseResponse7(data6) {
|
|
836892
|
-
const
|
|
836102
|
+
const tracer2 = new LocalTracer("hw", {
|
|
836893
836103
|
function: "parseResponse@reinstallConfigurationConsent"
|
|
836894
836104
|
});
|
|
836895
836105
|
const status = data6.readUInt16BE(data6.length - 2);
|
|
836896
|
-
|
|
836106
|
+
tracer2.trace("Result status from 0xe06f0000", { status });
|
|
836897
836107
|
switch (status) {
|
|
836898
836108
|
case StatusCodes.OK:
|
|
836899
836109
|
return;
|
|
@@ -836928,13 +836138,13 @@ var isDashboardName = (name2) => dashboardNames.includes(name2);
|
|
|
836928
836138
|
var ManagerAllowedFlag = 8;
|
|
836929
836139
|
var PinValidatedFlag = 128;
|
|
836930
836140
|
async function getDeviceInfo_default(transport) {
|
|
836931
|
-
const
|
|
836141
|
+
const tracer2 = new LocalTracer("hw", {
|
|
836932
836142
|
...transport.getTraceContext(),
|
|
836933
836143
|
function: "getDeviceInfo"
|
|
836934
836144
|
});
|
|
836935
|
-
|
|
836145
|
+
tracer2.trace("Starting get device info");
|
|
836936
836146
|
const probablyOnDashboard = await getAppAndVersion_default(transport).then(({ name: name2 }) => isDashboardName(name2)).catch((e35) => {
|
|
836937
|
-
|
|
836147
|
+
tracer2.trace(`Error from getAppAndVersion: ${e35}`, { error: e35 });
|
|
836938
836148
|
if (e35 instanceof TransportStatusError) {
|
|
836939
836149
|
if (e35.statusCode === 28160) {
|
|
836940
836150
|
return true;
|
|
@@ -836946,11 +836156,11 @@ async function getDeviceInfo_default(transport) {
|
|
|
836946
836156
|
throw e35;
|
|
836947
836157
|
});
|
|
836948
836158
|
if (!probablyOnDashboard) {
|
|
836949
|
-
|
|
836159
|
+
tracer2.trace(`Device not on dashboard`);
|
|
836950
836160
|
throw new DeviceOnDashboardExpected();
|
|
836951
836161
|
}
|
|
836952
836162
|
const res = await getVersion(transport).catch((e35) => {
|
|
836953
|
-
|
|
836163
|
+
tracer2.trace(`Error from getVersion: ${e35}`, { error: e35 });
|
|
836954
836164
|
if (e35 instanceof TransportStatusError) {
|
|
836955
836165
|
if (e35.statusCode === 27910 || e35.statusCode === 27911) {
|
|
836956
836166
|
throw new DeviceNotOnboarded();
|
|
@@ -837035,12 +836245,12 @@ var ALLOW_SECURE_CHANNEL_DELAY = 500;
|
|
|
837035
836245
|
var warningsSubject = new import_rxjs187.Subject();
|
|
837036
836246
|
var warnings2 = warningsSubject.asObservable();
|
|
837037
836247
|
function createDeviceSocket(transport, { url: url4, unresponsiveExpectedDuringBulk, context }) {
|
|
837038
|
-
const
|
|
836248
|
+
const tracer2 = new LocalTracer(LOG_TYPE3, {
|
|
837039
836249
|
...context,
|
|
837040
836250
|
function: "createDeviceSocket",
|
|
837041
836251
|
transportContext: transport.getTraceContext()
|
|
837042
836252
|
});
|
|
837043
|
-
|
|
836253
|
+
tracer2.trace("Starting web socket communication", { url: url4, unresponsiveExpectedDuringBulk });
|
|
837044
836254
|
return new import_rxjs187.Observable((o41) => {
|
|
837045
836255
|
let deviceError = null;
|
|
837046
836256
|
let unsubscribed = false;
|
|
@@ -837050,13 +836260,13 @@ function createDeviceSocket(transport, { url: url4, unresponsiveExpectedDuringBu
|
|
|
837050
836260
|
let allowSecureChannelTimeout = null;
|
|
837051
836261
|
const ws3 = new import_isomorphic_ws3.default(url4);
|
|
837052
836262
|
ws3.onopen = () => {
|
|
837053
|
-
|
|
836263
|
+
tracer2.trace("Socket opened", { url: url4 });
|
|
837054
836264
|
o41.next({
|
|
837055
836265
|
type: "opened"
|
|
837056
836266
|
});
|
|
837057
836267
|
};
|
|
837058
836268
|
ws3.onerror = (e35) => {
|
|
837059
|
-
|
|
836269
|
+
tracer2.trace("Socket error", { e: e35 });
|
|
837060
836270
|
if (inBulkMode)
|
|
837061
836271
|
return;
|
|
837062
836272
|
o41.error(new WebsocketConnectionError(e35.message, {
|
|
@@ -837064,13 +836274,13 @@ function createDeviceSocket(transport, { url: url4, unresponsiveExpectedDuringBu
|
|
|
837064
836274
|
}));
|
|
837065
836275
|
};
|
|
837066
836276
|
ws3.onclose = () => {
|
|
837067
|
-
|
|
836277
|
+
tracer2.trace("Socket closed", { url: url4, inBulkMode, correctlyFinished });
|
|
837068
836278
|
if (inBulkMode)
|
|
837069
836279
|
return;
|
|
837070
836280
|
if (correctlyFinished) {
|
|
837071
836281
|
o41.complete();
|
|
837072
836282
|
} else {
|
|
837073
|
-
|
|
836283
|
+
tracer2.trace(`Socket closed, not correctly finished, device error: ${deviceError}`, {
|
|
837074
836284
|
deviceError,
|
|
837075
836285
|
inBulkMode
|
|
837076
836286
|
});
|
|
@@ -837083,10 +836293,10 @@ function createDeviceSocket(transport, { url: url4, unresponsiveExpectedDuringBu
|
|
|
837083
836293
|
deviceError = null;
|
|
837084
836294
|
try {
|
|
837085
836295
|
const input = JSON.parse(e35.data);
|
|
837086
|
-
|
|
836296
|
+
tracer2.trace("Socket in", { type: input.query });
|
|
837087
836297
|
switch (input.query) {
|
|
837088
836298
|
case "exchange": {
|
|
837089
|
-
|
|
836299
|
+
tracer2.trace("Socket in: exchange", {
|
|
837090
836300
|
nonce: input?.nonce,
|
|
837091
836301
|
uuid: input?.uuid,
|
|
837092
836302
|
session: input?.session
|
|
@@ -837154,13 +836364,13 @@ function createDeviceSocket(transport, { url: url4, unresponsiveExpectedDuringBu
|
|
|
837154
836364
|
response,
|
|
837155
836365
|
data: data6.toString("hex")
|
|
837156
836366
|
};
|
|
837157
|
-
|
|
836367
|
+
tracer2.trace("Socket out", { response: msg.response });
|
|
837158
836368
|
const strMsg = JSON.stringify(msg);
|
|
837159
836369
|
ws3.send(strMsg);
|
|
837160
836370
|
break;
|
|
837161
836371
|
}
|
|
837162
836372
|
case "bulk": {
|
|
837163
|
-
|
|
836373
|
+
tracer2.trace("Socket in: bulk", {
|
|
837164
836374
|
apduCount: input?.data?.length,
|
|
837165
836375
|
nonce: input?.nonce,
|
|
837166
836376
|
uuid: input?.uuid,
|
|
@@ -837188,7 +836398,7 @@ function createDeviceSocket(transport, { url: url4, unresponsiveExpectedDuringBu
|
|
|
837188
836398
|
});
|
|
837189
836399
|
});
|
|
837190
836400
|
if (unsubscribed) {
|
|
837191
|
-
|
|
836401
|
+
tracer2.trace("unsubscribed before end of bulk");
|
|
837192
836402
|
return;
|
|
837193
836403
|
}
|
|
837194
836404
|
correctlyFinished = true;
|
|
@@ -837197,7 +836407,7 @@ function createDeviceSocket(transport, { url: url4, unresponsiveExpectedDuringBu
|
|
|
837197
836407
|
}
|
|
837198
836408
|
case "success": {
|
|
837199
836409
|
const payload = input.result || input.data;
|
|
837200
|
-
|
|
836410
|
+
tracer2.trace("Socket in: success", {
|
|
837201
836411
|
payload,
|
|
837202
836412
|
inBulkMode,
|
|
837203
836413
|
nonce: input?.nonce,
|
|
@@ -837217,7 +836427,7 @@ function createDeviceSocket(transport, { url: url4, unresponsiveExpectedDuringBu
|
|
|
837217
836427
|
break;
|
|
837218
836428
|
}
|
|
837219
836429
|
case "error": {
|
|
837220
|
-
|
|
836430
|
+
tracer2.trace("Socket in: error", {
|
|
837221
836431
|
errorData: input?.data,
|
|
837222
836432
|
inBulkMode,
|
|
837223
836433
|
nonce: input?.nonce,
|
|
@@ -837231,7 +836441,7 @@ function createDeviceSocket(transport, { url: url4, unresponsiveExpectedDuringBu
|
|
|
837231
836441
|
});
|
|
837232
836442
|
}
|
|
837233
836443
|
case "warning": {
|
|
837234
|
-
|
|
836444
|
+
tracer2.trace("Socket in: warning", {
|
|
837235
836445
|
warningData: input?.data,
|
|
837236
836446
|
inBulkMode,
|
|
837237
836447
|
nonce: input?.nonce,
|
|
@@ -837248,23 +836458,23 @@ function createDeviceSocket(transport, { url: url4, unresponsiveExpectedDuringBu
|
|
|
837248
836458
|
break;
|
|
837249
836459
|
}
|
|
837250
836460
|
default:
|
|
837251
|
-
|
|
836461
|
+
tracer2.trace("Socket in: cannot handle msg of type", { input });
|
|
837252
836462
|
}
|
|
837253
836463
|
} catch (err) {
|
|
837254
836464
|
deviceError = err;
|
|
837255
|
-
|
|
836465
|
+
tracer2.trace("Socket message error", { err });
|
|
837256
836466
|
o41.error(err);
|
|
837257
836467
|
}
|
|
837258
836468
|
};
|
|
837259
836469
|
const onDisconnect = (e35) => {
|
|
837260
836470
|
transport.off("disconnect", onDisconnect);
|
|
837261
|
-
|
|
836471
|
+
tracer2.trace(`Socket disconnected. Emitting a DisconnectedDeviceDuringOperation. Error: ${e35}`, { error: e35 });
|
|
837262
836472
|
const error = new DisconnectedDeviceDuringOperation(e35 && e35.message || "");
|
|
837263
836473
|
deviceError = error;
|
|
837264
836474
|
o41.error(error);
|
|
837265
836475
|
};
|
|
837266
836476
|
const onUnresponsiveDevice = () => {
|
|
837267
|
-
|
|
836477
|
+
tracer2.trace(`Device unresponsive`, {
|
|
837268
836478
|
inBulkMode,
|
|
837269
836479
|
unresponsiveExpectedDuringBulk,
|
|
837270
836480
|
allowSecureChannelTimeout,
|
|
@@ -837641,11 +836851,11 @@ init_lib_es2();
|
|
|
837641
836851
|
var APP_INSTALL_RETRY_DELAY = 500;
|
|
837642
836852
|
var APP_INSTALL_RETRY_LIMIT = 5;
|
|
837643
836853
|
function installApp(transport, targetId, app, { retryLimit = APP_INSTALL_RETRY_LIMIT, retryDelayMs = APP_INSTALL_RETRY_DELAY } = {}) {
|
|
837644
|
-
const
|
|
836854
|
+
const tracer2 = new LocalTracer(LOG_TYPE, {
|
|
837645
836855
|
...transport.getTraceContext(),
|
|
837646
836856
|
function: "installApp"
|
|
837647
836857
|
});
|
|
837648
|
-
|
|
836858
|
+
tracer2.trace("Install app", {
|
|
837649
836859
|
targetId,
|
|
837650
836860
|
appName: app?.name,
|
|
837651
836861
|
appVersion: app?.version,
|
|
@@ -837664,12 +836874,12 @@ function installApp(transport, targetId, app, { retryLimit = APP_INSTALL_RETRY_L
|
|
|
837664
836874
|
count: retryLimit,
|
|
837665
836875
|
delay: (error, retryCount) => {
|
|
837666
836876
|
if (error instanceof LockedDeviceError || error instanceof ManagerDeviceLockedError || error instanceof UnresponsiveDeviceError) {
|
|
837667
|
-
|
|
836877
|
+
tracer2.trace(`Not retrying on error: ${error}`, {
|
|
837668
836878
|
error
|
|
837669
836879
|
});
|
|
837670
836880
|
return (0, import_rxjs190.throwError)(() => error);
|
|
837671
836881
|
}
|
|
837672
|
-
|
|
836882
|
+
tracer2.trace(`Retrying (${retryCount}/${retryLimit}) on error: ${error}`, {
|
|
837673
836883
|
error,
|
|
837674
836884
|
retryLimit,
|
|
837675
836885
|
retryDelayMs
|
|
@@ -837686,7 +836896,7 @@ function installApp(transport, targetId, app, { retryLimit = APP_INSTALL_RETRY_L
|
|
|
837686
836896
|
})),
|
|
837687
836897
|
// extract a stream of progress percentage
|
|
837688
836898
|
(0, import_operators39.catchError)((e35) => {
|
|
837689
|
-
|
|
836899
|
+
tracer2.trace(`Error: ${e35}`, { error: e35 });
|
|
837690
836900
|
if (!e35 || !e35.message)
|
|
837691
836901
|
return (0, import_rxjs190.throwError)(() => e35);
|
|
837692
836902
|
const status = e35.message.slice(e35.message.length - 4);
|
|
@@ -837924,8 +837134,8 @@ function getLatestFirmwareForDeviceUseCase(deviceInfo, managerApiRepository = Ht
|
|
|
837924
837134
|
var appsWithDynamicHashes = ["Fido U2F", "Security Key"];
|
|
837925
837135
|
var emptyHashData = "0".repeat(64);
|
|
837926
837136
|
var listApps2 = ({ transport, deviceInfo, deviceProxyModel, managerDevModeEnabled, forceProvider, managerApiRepository }) => {
|
|
837927
|
-
const
|
|
837928
|
-
|
|
837137
|
+
const tracer2 = new LocalTracer("list-apps", { transport: transport.getTraceContext() });
|
|
837138
|
+
tracer2.trace("Using new version", { deviceInfo });
|
|
837929
837139
|
if (deviceInfo.isOSU || deviceInfo.isBootloader) {
|
|
837930
837140
|
return (0, import_rxjs193.throwError)(() => new UnexpectedBootloader(""));
|
|
837931
837141
|
}
|
|
@@ -837964,7 +837174,7 @@ var listApps2 = ({ transport, deviceInfo, deviceProxyModel, managerDevModeEnable
|
|
|
837964
837174
|
});
|
|
837965
837175
|
}
|
|
837966
837176
|
if (deviceInfo.managerAllowed) {
|
|
837967
|
-
|
|
837177
|
+
tracer2.trace("Using direct apdu listapps");
|
|
837968
837178
|
listAppsResponsePromise = listAppsWithSingleCommand().catch((e35) => {
|
|
837969
837179
|
if (e35 instanceof TransportStatusError && [
|
|
837970
837180
|
StatusCodes.CLA_NOT_SUPPORTED,
|
|
@@ -837974,13 +837184,13 @@ var listApps2 = ({ transport, deviceInfo, deviceProxyModel, managerDevModeEnable
|
|
|
837974
837184
|
27905
|
|
837975
837185
|
// No StatusCodes definition
|
|
837976
837186
|
].includes(e35.statusCode)) {
|
|
837977
|
-
|
|
837187
|
+
tracer2.trace("Fallback to scriptrunner listapps");
|
|
837978
837188
|
return listAppsWithManagerApi();
|
|
837979
837189
|
}
|
|
837980
837190
|
throw e35;
|
|
837981
837191
|
});
|
|
837982
837192
|
} else {
|
|
837983
|
-
|
|
837193
|
+
tracer2.trace("Using scriptrunner listapps");
|
|
837984
837194
|
listAppsResponsePromise = listAppsWithManagerApi();
|
|
837985
837195
|
}
|
|
837986
837196
|
const filteredListAppsPromise = listAppsResponsePromise.then((result3) => {
|
|
@@ -838033,7 +837243,7 @@ var listApps2 = ({ transport, deviceInfo, deviceProxyModel, managerDevModeEnable
|
|
|
838033
837243
|
return;
|
|
838034
837244
|
}
|
|
838035
837245
|
const matchFromCatalog = catalogForDevice.find(({ name: name2 }) => name2 === localName);
|
|
838036
|
-
|
|
837246
|
+
tracer2.trace(`Falling back to catalog for ${localName}`, {
|
|
838037
837247
|
localName,
|
|
838038
837248
|
matchFromCatalog: Boolean(matchFromCatalog)
|
|
838039
837249
|
});
|
|
@@ -838041,7 +837251,7 @@ var listApps2 = ({ transport, deviceInfo, deviceProxyModel, managerDevModeEnable
|
|
|
838041
837251
|
installedList.push(matchFromCatalog);
|
|
838042
837252
|
}
|
|
838043
837253
|
});
|
|
838044
|
-
|
|
837254
|
+
tracer2.trace("Installed and in catalog apps", {
|
|
838045
837255
|
installedApps: installedList.length,
|
|
838046
837256
|
inCatalogApps: catalogForDevice.length
|
|
838047
837257
|
});
|
|
@@ -839073,9 +838283,9 @@ var attemptToQuitApp_default = attemptToQuitApp;
|
|
|
839073
838283
|
|
|
839074
838284
|
// ../../libs/ledger-live-common/lib-es/hw/customLockScreenFetch.js
|
|
839075
838285
|
var MAX_APDU_SIZE = 240;
|
|
839076
|
-
function fetchImage({ deviceId, request: request2 }) {
|
|
838286
|
+
function fetchImage({ deviceId, deviceName, request: request2 }) {
|
|
839077
838287
|
const { backupHash, allowedEmpty = false, deviceModelId } = request2;
|
|
839078
|
-
const sub = withDevice(deviceId)((transport) => new import_rxjs209.Observable((subscriber) => {
|
|
838288
|
+
const sub = withDevice(deviceId, deviceName ? { matchDeviceByName: deviceName } : void 0)((transport) => new import_rxjs209.Observable((subscriber) => {
|
|
839079
838289
|
const timeoutSub = (0, import_rxjs209.of)({
|
|
839080
838290
|
type: "unresponsiveDevice"
|
|
839081
838291
|
}).pipe((0, import_operators48.delay)(1e3)).subscribe((e35) => subscriber.next(e35));
|
|
@@ -839188,7 +838398,8 @@ var exec2 = async (opts) => {
|
|
|
839188
838398
|
await new Promise(
|
|
839189
838399
|
(p79) => fetchImage({
|
|
839190
838400
|
deviceId,
|
|
839191
|
-
request: { allowedEmpty: false, deviceModelId: clsSupportedDeviceModelId }
|
|
838401
|
+
request: { allowedEmpty: false, deviceModelId: clsSupportedDeviceModelId },
|
|
838402
|
+
deviceName: null
|
|
839192
838403
|
}).subscribe(
|
|
839193
838404
|
(event) => {
|
|
839194
838405
|
if (event.type === "imageFetched") {
|
|
@@ -839261,14 +838472,14 @@ var withTransport = (deviceId, options24) => {
|
|
|
839261
838472
|
const jobId = queuedJobManager.setLastQueuedJob(deviceId, new Promise((resolve) => {
|
|
839262
838473
|
resolveQueuedJob = resolve;
|
|
839263
838474
|
}));
|
|
839264
|
-
const
|
|
838475
|
+
const tracer2 = new LocalTracer(LOG_TYPE4, {
|
|
839265
838476
|
jobId,
|
|
839266
838477
|
deviceId,
|
|
839267
838478
|
origin: "deviceSdk:withTransport"
|
|
839268
838479
|
});
|
|
839269
|
-
|
|
838480
|
+
tracer2.trace(`New job for device: ${deviceId || "USB"}`);
|
|
839270
838481
|
const finalize4 = (transport, cleanups) => {
|
|
839271
|
-
|
|
838482
|
+
tracer2.trace("Closing and cleaning transport");
|
|
839272
838483
|
return close(transport, deviceId).catch(() => {
|
|
839273
838484
|
}).then(() => {
|
|
839274
838485
|
cleanups.forEach((c59) => c59());
|
|
@@ -839277,9 +838488,9 @@ var withTransport = (deviceId, options24) => {
|
|
|
839277
838488
|
let unsubscribed;
|
|
839278
838489
|
let sub;
|
|
839279
838490
|
const setupTransport = async (transport) => {
|
|
839280
|
-
|
|
838491
|
+
tracer2.trace("Setting up the transport instance");
|
|
839281
838492
|
if (unsubscribed) {
|
|
839282
|
-
|
|
838493
|
+
tracer2.trace("Unsubscribed (1) while processing job");
|
|
839283
838494
|
return finalize4(transport, [resolveQueuedJob]);
|
|
839284
838495
|
}
|
|
839285
838496
|
if (needsCleanup2[identifyTransport2(transport)]) {
|
|
@@ -839290,7 +838501,7 @@ var withTransport = (deviceId, options24) => {
|
|
|
839290
838501
|
return transport;
|
|
839291
838502
|
};
|
|
839292
838503
|
const onErrorDuringTransportSetup = (error) => {
|
|
839293
|
-
|
|
838504
|
+
tracer2.trace("Error while setting up a transport: ", { error });
|
|
839294
838505
|
resolveQueuedJob();
|
|
839295
838506
|
if (error instanceof BluetoothRequired)
|
|
839296
838507
|
throw error;
|
|
@@ -839308,50 +838519,50 @@ var withTransport = (deviceId, options24) => {
|
|
|
839308
838519
|
throw new CantOpenDevice("Unknown error");
|
|
839309
838520
|
};
|
|
839310
838521
|
const buildRefreshableTransport = (transport) => {
|
|
839311
|
-
|
|
838522
|
+
tracer2.trace("Creating a refreshable transport from a given instance");
|
|
839312
838523
|
const transportRef = {
|
|
839313
838524
|
current: transport,
|
|
839314
838525
|
_refreshedCounter: 0,
|
|
839315
838526
|
refreshTransport: Promise.resolve
|
|
839316
838527
|
};
|
|
839317
|
-
|
|
838528
|
+
tracer2.updateContext({ transportRefreshedCounter: transportRef._refreshedCounter });
|
|
839318
838529
|
transportRef.refreshTransport = async () => {
|
|
839319
|
-
|
|
838530
|
+
tracer2.trace("Refreshing current transport");
|
|
839320
838531
|
return close(transportRef.current, deviceId).catch(() => {
|
|
839321
|
-
}).then(async () => open(deviceId, options24
|
|
838532
|
+
}).then(async () => open(deviceId, options24, tracer2.getContext())).then(async (newTransport) => {
|
|
839322
838533
|
await setupTransport(transportRef.current);
|
|
839323
838534
|
transportRef.current = newTransport;
|
|
839324
838535
|
transportRef._refreshedCounter++;
|
|
839325
|
-
|
|
839326
|
-
|
|
838536
|
+
tracer2.updateContext({ transportRefreshedCounter: transportRef._refreshedCounter });
|
|
838537
|
+
tracer2.trace("Transport was refreshed");
|
|
839327
838538
|
}).catch(onErrorDuringTransportSetup);
|
|
839328
838539
|
};
|
|
839329
838540
|
return transportRef;
|
|
839330
838541
|
};
|
|
839331
|
-
|
|
838542
|
+
tracer2.trace("Waiting for the previous job in the queue to complete", {
|
|
839332
838543
|
previousJobId: previousQueuedJob.id
|
|
839333
838544
|
});
|
|
839334
838545
|
previousQueuedJob.job.then(() => {
|
|
839335
|
-
|
|
838546
|
+
tracer2.trace("Previous queued job resolved, now trying to get a Transport instance", {
|
|
839336
838547
|
previousJobId: previousQueuedJob.id,
|
|
839337
838548
|
currentJobId: jobId
|
|
839338
838549
|
});
|
|
839339
|
-
return open(deviceId, options24
|
|
838550
|
+
return open(deviceId, options24, tracer2.getContext());
|
|
839340
838551
|
}).then((transport) => {
|
|
839341
838552
|
return buildRefreshableTransport(transport);
|
|
839342
838553
|
}).then(async (transportRef) => {
|
|
839343
838554
|
await setupTransport(transportRef.current);
|
|
839344
838555
|
return transportRef;
|
|
839345
838556
|
}).catch(onErrorDuringTransportSetup).then((transportRef) => {
|
|
839346
|
-
|
|
838557
|
+
tracer2.trace("Executing job", { hasTransport: !!transportRef, unsubscribed });
|
|
839347
838558
|
if (!transportRef.current)
|
|
839348
838559
|
return;
|
|
839349
838560
|
if (unsubscribed) {
|
|
839350
|
-
|
|
838561
|
+
tracer2.trace("Unsubscribed (2) while processing job");
|
|
839351
838562
|
return finalize4(transportRef.current, [resolveQueuedJob]);
|
|
839352
838563
|
}
|
|
839353
838564
|
sub = job2({ transportRef }).pipe(
|
|
839354
|
-
(0, import_operators49.catchError)((error) => initialErrorRemapping2(error,
|
|
838565
|
+
(0, import_operators49.catchError)((error) => initialErrorRemapping2(error, tracer2.getContext())),
|
|
839355
838566
|
(0, import_operators49.catchError)(errorRemapping2),
|
|
839356
838567
|
// close the transport and clean up everything
|
|
839357
838568
|
transportFinally2(() => {
|
|
@@ -839362,7 +838573,7 @@ var withTransport = (deviceId, options24) => {
|
|
|
839362
838573
|
subscriber.error(error);
|
|
839363
838574
|
});
|
|
839364
838575
|
return () => {
|
|
839365
|
-
|
|
838576
|
+
tracer2.trace(`Unsubscribing withDevice flow. Ongoing job to unsubscribe from ? ${!!sub}`);
|
|
839366
838577
|
unsubscribed = true;
|
|
839367
838578
|
if (sub)
|
|
839368
838579
|
sub.unsubscribe();
|
|
@@ -839414,10 +838625,10 @@ var errorRemapping2 = (e35) => (0, import_rxjs211.throwError)(() => e35);
|
|
|
839414
838625
|
var MAX_APDU_SIZE2 = 255;
|
|
839415
838626
|
var COMPRESS_CHUNK_SIZE = 2048;
|
|
839416
838627
|
var isDmkDeviceDisconnectedError = (err) => typeof err === "object" && err !== null && (err instanceof k8 || "_tag" in err && err._tag === "DeviceDisconnectedWhileSendingError");
|
|
839417
|
-
function loadImage({ deviceId, request: request2 }) {
|
|
838628
|
+
function loadImage({ deviceId, deviceName, request: request2 }) {
|
|
839418
838629
|
const { hexImage, padImage = true, deviceModelId } = request2;
|
|
839419
838630
|
const screenSpecs = getScreenSpecs(deviceModelId);
|
|
839420
|
-
const sub = withTransport(deviceId)(({ transportRef }) => new import_rxjs212.Observable((subscriber) => {
|
|
838631
|
+
const sub = withTransport(deviceId, deviceName ? { matchDeviceByName: deviceName } : void 0)(({ transportRef }) => new import_rxjs212.Observable((subscriber) => {
|
|
839421
838632
|
const timeoutSub = (0, import_rxjs212.of)({ type: "unresponsiveDevice" }).pipe((0, import_operators50.delay)(1e3)).subscribe((e35) => subscriber.next(e35));
|
|
839422
838633
|
const sub2 = (0, import_rxjs212.from)(getDeviceInfo_default(transportRef.current)).pipe((0, import_operators50.mergeMap)(async () => {
|
|
839423
838634
|
timeoutSub.unsubscribe();
|
|
@@ -839585,7 +838796,8 @@ var exec3 = async (opts) => {
|
|
|
839585
838796
|
await new Promise(
|
|
839586
838797
|
(resolve) => loadImage({
|
|
839587
838798
|
deviceId,
|
|
839588
|
-
request: { hexImage: hexImageWithoutHeader, deviceModelId: clsSupportedDeviceModelId }
|
|
838799
|
+
request: { hexImage: hexImageWithoutHeader, deviceModelId: clsSupportedDeviceModelId },
|
|
838800
|
+
deviceName: null
|
|
839589
838801
|
}).subscribe(
|
|
839590
838802
|
(x19) => console.log(x19),
|
|
839591
838803
|
(e35) => {
|
|
@@ -839641,7 +838853,8 @@ var exec4 = async (opts) => {
|
|
|
839641
838853
|
await new Promise(
|
|
839642
838854
|
(resolve) => loadImage({
|
|
839643
838855
|
deviceId,
|
|
839644
|
-
request: { hexImage, deviceModelId: clsSupportedDeviceModelId }
|
|
838856
|
+
request: { hexImage, deviceModelId: clsSupportedDeviceModelId },
|
|
838857
|
+
deviceName: null
|
|
839645
838858
|
}).subscribe(
|
|
839646
838859
|
(x19) => console.log(x19),
|
|
839647
838860
|
(e35) => {
|
|
@@ -839853,8 +839066,8 @@ var LOG_TYPE5 = "device-sdk-command";
|
|
|
839853
839066
|
|
|
839854
839067
|
// ../../libs/ledger-live-common/lib-es/deviceSDK/commands/firmwareUpdate/installFirmware.js
|
|
839855
839068
|
function installFirmwareCommand(transport, { targetId, firmware }) {
|
|
839856
|
-
const
|
|
839857
|
-
|
|
839069
|
+
const tracer2 = new LocalTracer(LOG_TYPE5, { function: "installFirmwareCommand" });
|
|
839070
|
+
tracer2.trace("Starting", {
|
|
839858
839071
|
targetId,
|
|
839859
839072
|
osuFirmware: firmware
|
|
839860
839073
|
});
|
|
@@ -839870,9 +839083,9 @@ function installFirmwareCommand(transport, { targetId, firmware }) {
|
|
|
839870
839083
|
}
|
|
839871
839084
|
}),
|
|
839872
839085
|
unresponsiveExpectedDuringBulk: true,
|
|
839873
|
-
context:
|
|
839086
|
+
context: tracer2.getContext()
|
|
839874
839087
|
}).pipe((0, import_operators54.catchError)((error) => {
|
|
839875
|
-
|
|
839088
|
+
tracer2.trace("Socket firmware error", { error });
|
|
839876
839089
|
return remapSocketFirmwareError(error);
|
|
839877
839090
|
}), (0, import_operators54.filter)((e35) => {
|
|
839878
839091
|
return e35.type === "bulk-progress" || e35.type === "device-permission-requested";
|
|
@@ -839893,7 +839106,7 @@ function installFirmwareCommand(transport, { targetId, firmware }) {
|
|
|
839893
839106
|
}
|
|
839894
839107
|
return { type: "allowSecureChannelRequested" };
|
|
839895
839108
|
}), (0, import_operators54.catchError)((error) => {
|
|
839896
|
-
|
|
839109
|
+
tracer2.trace("Socket unresponsive error", { error });
|
|
839897
839110
|
return remapSocketUnresponsiveError(error);
|
|
839898
839111
|
}));
|
|
839899
839112
|
}
|
|
@@ -839932,8 +839145,8 @@ init_lib_es2();
|
|
|
839932
839145
|
var import_operators55 = require("rxjs/operators");
|
|
839933
839146
|
var filterProgressEvent = (e35) => e35.type === "bulk-progress";
|
|
839934
839147
|
function flashMcuOrBootloaderCommand(transport, { targetId, version: version19 }) {
|
|
839935
|
-
const
|
|
839936
|
-
|
|
839148
|
+
const tracer2 = new LocalTracer(LOG_TYPE5, { function: "flashMcuOrBootloaderCommand" });
|
|
839149
|
+
tracer2.trace("Starting", {
|
|
839937
839150
|
targetId,
|
|
839938
839151
|
version: version19
|
|
839939
839152
|
});
|
|
@@ -839946,7 +839159,7 @@ function flashMcuOrBootloaderCommand(transport, { targetId, version: version19 }
|
|
|
839946
839159
|
version: version19
|
|
839947
839160
|
}
|
|
839948
839161
|
}),
|
|
839949
|
-
context:
|
|
839162
|
+
context: tracer2.getContext()
|
|
839950
839163
|
}).pipe((0, import_operators55.filter)(filterProgressEvent), (0, import_operators55.map)((e35) => ({
|
|
839951
839164
|
type: "progress",
|
|
839952
839165
|
progress: e35.progress
|
|
@@ -840026,7 +839239,7 @@ function sharedLogicTaskWrapper(task, defaultTimeoutOverride) {
|
|
|
840026
839239
|
});
|
|
840027
839240
|
};
|
|
840028
839241
|
}
|
|
840029
|
-
var isDmkError = (error) => error && "_tag" in error;
|
|
839242
|
+
var isDmkError = (error) => !!error && typeof error === "object" && error !== null && "_tag" in error;
|
|
840030
839243
|
function retryOnErrorsCommandWrapper({ command: command4, allowedErrors, allowedDmkErrors = [] }) {
|
|
840031
839244
|
return (transportRef, argsWithoutTransport) => {
|
|
840032
839245
|
let sameErrorInARowCount = 0;
|
|
@@ -840084,9 +839297,9 @@ var import_rxjs226 = require("rxjs");
|
|
|
840084
839297
|
var import_operators59 = require("rxjs/operators");
|
|
840085
839298
|
var ManagerAllowedFlag2 = 8;
|
|
840086
839299
|
var PinValidatedFlag2 = 128;
|
|
840087
|
-
function internalGetDeviceInfoTask({ deviceId }) {
|
|
839300
|
+
function internalGetDeviceInfoTask({ deviceId, deviceName }) {
|
|
840088
839301
|
return new import_rxjs226.Observable((subscriber) => {
|
|
840089
|
-
return withTransport(deviceId)(({ transportRef }) => quitApp(transportRef.current).pipe((0, import_operators59.switchMap)(() => {
|
|
839302
|
+
return withTransport(deviceId, deviceName ? { matchDeviceByName: deviceName } : void 0)(({ transportRef }) => quitApp(transportRef.current).pipe((0, import_operators59.switchMap)(() => {
|
|
840090
839303
|
return retryOnErrorsCommandWrapper({
|
|
840091
839304
|
command: getVersion2,
|
|
840092
839305
|
allowedErrors: [{ maxRetries: 3, errorClass: DisconnectedDevice }],
|
|
@@ -840165,13 +839378,13 @@ var waitForGetVersion = retryOnErrorsCommandWrapper({
|
|
|
840165
839378
|
new p10()
|
|
840166
839379
|
]
|
|
840167
839380
|
});
|
|
840168
|
-
function internalUpdateFirmwareTask({ deviceId, updateContext }) {
|
|
840169
|
-
const
|
|
839381
|
+
function internalUpdateFirmwareTask({ deviceId, deviceName, updateContext }) {
|
|
839382
|
+
const tracer2 = new LocalTracer(LOG_TYPE6, {
|
|
840170
839383
|
function: "updateFirmwareTask"
|
|
840171
839384
|
});
|
|
840172
839385
|
return new import_rxjs227.Observable((subscriber) => {
|
|
840173
|
-
const sub = withTransport(deviceId)(({ transportRef }) => (0, import_rxjs227.concat)(quitApp(transportRef.current).pipe((0, import_operators60.switchMap)(() => {
|
|
840174
|
-
|
|
839386
|
+
const sub = withTransport(deviceId, deviceName ? { matchDeviceByName: deviceName } : void 0)(({ transportRef }) => (0, import_rxjs227.concat)(quitApp(transportRef.current).pipe((0, import_operators60.switchMap)(() => {
|
|
839387
|
+
tracer2.updateContext({ transportContext: transportRef.current.getTraceContext() });
|
|
840175
839388
|
return waitForGetVersion(transportRef, {});
|
|
840176
839389
|
}), (0, import_operators60.switchMap)((value2) => {
|
|
840177
839390
|
const { firmwareInfo } = value2;
|
|
@@ -840179,7 +839392,7 @@ function internalUpdateFirmwareTask({ deviceId, updateContext }) {
|
|
|
840179
839392
|
firmwareInfo,
|
|
840180
839393
|
updateContext,
|
|
840181
839394
|
transport: transportRef.current,
|
|
840182
|
-
tracer
|
|
839395
|
+
tracer: tracer2
|
|
840183
839396
|
}).pipe((0, import_operators60.map)((e35) => {
|
|
840184
839397
|
if (e35.type === "unresponsive") {
|
|
840185
839398
|
return {
|
|
@@ -840197,15 +839410,15 @@ function internalUpdateFirmwareTask({ deviceId, updateContext }) {
|
|
|
840197
839410
|
next: (event) => {
|
|
840198
839411
|
switch (event.type) {
|
|
840199
839412
|
case "allowSecureChannelRequested":
|
|
840200
|
-
|
|
839413
|
+
tracer2.trace("allowSecureChannelRequested");
|
|
840201
839414
|
subscriber.next(event);
|
|
840202
839415
|
break;
|
|
840203
839416
|
case "firmwareInstallPermissionRequested":
|
|
840204
|
-
|
|
839417
|
+
tracer2.trace("firmwareInstallPermissionRequested");
|
|
840205
839418
|
subscriber.next({ type: "installOsuDevicePermissionRequested" });
|
|
840206
839419
|
break;
|
|
840207
839420
|
case "firmwareInstallPermissionGranted":
|
|
840208
|
-
|
|
839421
|
+
tracer2.trace("firmwareInstallPermissionGranted");
|
|
840209
839422
|
subscriber.next({ type: "installOsuDevicePermissionGranted" });
|
|
840210
839423
|
break;
|
|
840211
839424
|
case "progress":
|
|
@@ -840220,7 +839433,7 @@ function internalUpdateFirmwareTask({ deviceId, updateContext }) {
|
|
|
840220
839433
|
},
|
|
840221
839434
|
complete: () => subscriber.complete(),
|
|
840222
839435
|
error: (error) => {
|
|
840223
|
-
|
|
839436
|
+
tracer2.trace(`Error: ${error}`, { error });
|
|
840224
839437
|
if (error instanceof UserRefusedFirmwareUpdate) {
|
|
840225
839438
|
subscriber.next({ type: "installOsuDevicePermissionDenied" });
|
|
840226
839439
|
} else if (error instanceof UserRefusedAllowManager) {
|
|
@@ -840308,10 +839521,10 @@ var flashMcuOrBootloader = (updateContext, firmwareInfo, transportRef, deviceId,
|
|
|
840308
839521
|
});
|
|
840309
839522
|
});
|
|
840310
839523
|
};
|
|
840311
|
-
var installOsuFirmware = ({ transport, updateContext, firmwareInfo, tracer }) => {
|
|
839524
|
+
var installOsuFirmware = ({ transport, updateContext, firmwareInfo, tracer: tracer2 }) => {
|
|
840312
839525
|
const { targetId } = firmwareInfo;
|
|
840313
839526
|
const { osu } = updateContext;
|
|
840314
|
-
|
|
839527
|
+
tracer2.trace("Initiating osu firmware installation", { targetId, osu });
|
|
840315
839528
|
return installFirmwareCommand(transport, {
|
|
840316
839529
|
targetId,
|
|
840317
839530
|
firmware: osu
|
|
@@ -840352,9 +839565,9 @@ var initialSharedActionState = {
|
|
|
840352
839565
|
// ../../libs/ledger-live-common/lib-es/deviceSDK/tasks/getLatestFirmware.js
|
|
840353
839566
|
var import_rxjs228 = require("rxjs");
|
|
840354
839567
|
var import_operators61 = require("rxjs/operators");
|
|
840355
|
-
function internalGetLatestFirmwareTask({ deviceId, deviceInfo }) {
|
|
839568
|
+
function internalGetLatestFirmwareTask({ deviceId, deviceName, deviceInfo }) {
|
|
840356
839569
|
return new import_rxjs228.Observable((subscriber) => {
|
|
840357
|
-
return withTransport(deviceId)(({ transportRef }) => quitApp(transportRef.current).pipe((0, import_operators61.switchMap)(() => {
|
|
839570
|
+
return withTransport(deviceId, deviceName ? { matchDeviceByName: deviceName } : void 0)(({ transportRef }) => quitApp(transportRef.current).pipe((0, import_operators61.switchMap)(() => {
|
|
840358
839571
|
return (0, import_rxjs228.from)(getLatestFirmwareForDeviceUseCase(deviceInfo));
|
|
840359
839572
|
}), (0, import_operators61.switchMap)((firmwareUpdateContext) => {
|
|
840360
839573
|
if (firmwareUpdateContext) {
|
|
@@ -840384,19 +839597,20 @@ var initialState2 = {
|
|
|
840384
839597
|
progress: 0,
|
|
840385
839598
|
...initialSharedActionState
|
|
840386
839599
|
};
|
|
840387
|
-
function updateFirmwareAction({ deviceId }) {
|
|
840388
|
-
return (0, import_rxjs229.concat)((0, import_rxjs229.of)(initialState2), getDeviceInfoTask({ deviceId }).pipe((0, import_operators62.switchMap)((event) => {
|
|
839600
|
+
function updateFirmwareAction({ deviceId, deviceName }) {
|
|
839601
|
+
return (0, import_rxjs229.concat)((0, import_rxjs229.of)(initialState2), getDeviceInfoTask({ deviceId, deviceName }).pipe((0, import_operators62.switchMap)((event) => {
|
|
840389
839602
|
if (event.type !== "data") {
|
|
840390
839603
|
return (0, import_rxjs229.of)(event);
|
|
840391
839604
|
}
|
|
840392
839605
|
const { deviceInfo } = event;
|
|
840393
|
-
return getLatestFirmwareTask({ deviceId, deviceInfo });
|
|
839606
|
+
return getLatestFirmwareTask({ deviceId, deviceName, deviceInfo });
|
|
840394
839607
|
}), (0, import_operators62.switchMap)((event) => {
|
|
840395
839608
|
if (event.type !== "data") {
|
|
840396
839609
|
return (0, import_rxjs229.of)(event);
|
|
840397
839610
|
} else {
|
|
840398
839611
|
return updateFirmwareTask({
|
|
840399
839612
|
deviceId,
|
|
839613
|
+
deviceName,
|
|
840400
839614
|
updateContext: event.firmwareUpdateContext
|
|
840401
839615
|
});
|
|
840402
839616
|
}
|
|
@@ -840479,7 +839693,7 @@ var deviceSDKFirmwareUpdate_default = {
|
|
|
840479
839693
|
(0, import_operators63.mergeMap)(() => {
|
|
840480
839694
|
return (0, import_rxjs230.concat)(
|
|
840481
839695
|
(0, import_rxjs230.of)(`Attempting to install firmware`),
|
|
840482
|
-
updateFirmwareAction({ deviceId: device2 || "" })
|
|
839696
|
+
updateFirmwareAction({ deviceId: device2 || "", deviceName: null })
|
|
840483
839697
|
);
|
|
840484
839698
|
})
|
|
840485
839699
|
))
|
|
@@ -840546,17 +839760,17 @@ var FlagMasks;
|
|
|
840546
839760
|
FlagMasks2[FlagMasks2["ISSUE_TEMPERATURE"] = 32] = "ISSUE_TEMPERATURE";
|
|
840547
839761
|
})(FlagMasks || (FlagMasks = {}));
|
|
840548
839762
|
var getBatteryStatus = async (transport, statuses) => {
|
|
840549
|
-
const
|
|
839763
|
+
const tracer2 = new LocalTracer(LOG_TYPE, {
|
|
840550
839764
|
function: "getBatteryStatus",
|
|
840551
839765
|
statuses
|
|
840552
839766
|
});
|
|
840553
|
-
|
|
839767
|
+
tracer2.trace(`Starting`);
|
|
840554
839768
|
const result2 = [];
|
|
840555
839769
|
for (let i58 = 0; i58 < statuses.length; i58++) {
|
|
840556
839770
|
const res = await transport.send(224, 16, 0, statuses[i58]);
|
|
840557
839771
|
const status = res.readUInt16BE(res.length - 2);
|
|
840558
839772
|
if (status !== StatusCodes.OK) {
|
|
840559
|
-
|
|
839773
|
+
tracer2.trace(`Error: status ${status}`, { status, res });
|
|
840560
839774
|
throw new TransportStatusError(status);
|
|
840561
839775
|
}
|
|
840562
839776
|
switch (statuses[i58]) {
|
|
@@ -840638,9 +839852,9 @@ function getBatteryStatus2({ transport, statusType }) {
|
|
|
840638
839852
|
var getBatteryStatus_default2 = getBatteryStatus2;
|
|
840639
839853
|
|
|
840640
839854
|
// ../../libs/ledger-live-common/lib-es/deviceSDK/tasks/getBatteryStatuses.js
|
|
840641
|
-
function internalGetBatteryStatusesTask({ deviceId, statuses }) {
|
|
839855
|
+
function internalGetBatteryStatusesTask({ deviceId, deviceName, statuses }) {
|
|
840642
839856
|
return new import_rxjs232.Observable((subscriber) => {
|
|
840643
|
-
return withTransport(deviceId)(({ transportRef }) => quitApp(transportRef.current).pipe((0, import_operators65.switchMap)(() => {
|
|
839857
|
+
return withTransport(deviceId, deviceName ? { matchDeviceByName: deviceName } : void 0)(({ transportRef }) => quitApp(transportRef.current).pipe((0, import_operators65.switchMap)(() => {
|
|
840644
839858
|
const statusesObservable = statuses.map((statusType) => retryOnErrorsCommandWrapper({
|
|
840645
839859
|
command: ({ transport }) => getBatteryStatus_default2({ transport, statusType }).pipe((0, import_operators65.filter)((e35) => e35.type === "data")),
|
|
840646
839860
|
allowedErrors: [{ maxRetries: 3, errorClass: DisconnectedDevice }]
|
|
@@ -840663,8 +839877,8 @@ var initialState3 = {
|
|
|
840663
839877
|
batteryStatuses: [],
|
|
840664
839878
|
...initialSharedActionState
|
|
840665
839879
|
};
|
|
840666
|
-
function getBatteryStatusesAction({ deviceId, statuses }) {
|
|
840667
|
-
return getBatteryStatusTask({ deviceId, statuses }).pipe((0, import_operators66.scan)((currentState, event) => {
|
|
839880
|
+
function getBatteryStatusesAction({ deviceId, deviceName, statuses }) {
|
|
839881
|
+
return getBatteryStatusTask({ deviceId, deviceName, statuses }).pipe((0, import_operators66.scan)((currentState, event) => {
|
|
840668
839882
|
switch (event.type) {
|
|
840669
839883
|
case "taskError":
|
|
840670
839884
|
return { ...initialState3, error: { type: event.error } };
|
|
@@ -840700,7 +839914,8 @@ var deviceSDKGetBatteryStatuses_default = {
|
|
|
840700
839914
|
BatteryStatusTypes.BATTERY_PERCENTAGE,
|
|
840701
839915
|
BatteryStatusTypes.BATTERY_TEMPERATURE,
|
|
840702
839916
|
BatteryStatusTypes.BATTERY_VOLTAGE
|
|
840703
|
-
]
|
|
839917
|
+
],
|
|
839918
|
+
deviceName: null
|
|
840704
839919
|
}).subscribe(o41);
|
|
840705
839920
|
});
|
|
840706
839921
|
}
|
|
@@ -840715,8 +839930,8 @@ var initialState4 = {
|
|
|
840715
839930
|
deviceInfo: null,
|
|
840716
839931
|
...initialSharedActionState
|
|
840717
839932
|
};
|
|
840718
|
-
function getDeviceInfoAction({ deviceId }) {
|
|
840719
|
-
return getDeviceInfoTask({ deviceId }).pipe((0, import_operators67.scan)((currentState, event) => {
|
|
839933
|
+
function getDeviceInfoAction({ deviceId, deviceName }) {
|
|
839934
|
+
return getDeviceInfoTask({ deviceId, deviceName }).pipe((0, import_operators67.scan)((currentState, event) => {
|
|
840720
839935
|
switch (event.type) {
|
|
840721
839936
|
case "taskError":
|
|
840722
839937
|
return { ...initialState4, error: { type: event.error } };
|
|
@@ -840744,7 +839959,8 @@ var deviceSDKGetDeviceInfo_default = {
|
|
|
840744
839959
|
job: ({ device: device2 }) => {
|
|
840745
839960
|
return new import_rxjs234.Observable((o41) => {
|
|
840746
839961
|
return getDeviceInfoAction({
|
|
840747
|
-
deviceId: device2 ?? ""
|
|
839962
|
+
deviceId: device2 ?? "",
|
|
839963
|
+
deviceName: null
|
|
840748
839964
|
}).subscribe(o41);
|
|
840749
839965
|
});
|
|
840750
839966
|
}
|
|
@@ -840777,22 +839993,22 @@ function toggleOnboardingEarlyCheckCmd({ transport, p2: p210 }) {
|
|
|
840777
839993
|
|
|
840778
839994
|
// ../../libs/ledger-live-common/lib-es/deviceSDK/tasks/toggleOnboardingEarlyCheck.js
|
|
840779
839995
|
init_lib_es();
|
|
840780
|
-
function internalToggleOnboardingEarlyCheckTask({ deviceId, toggleType }) {
|
|
840781
|
-
const
|
|
839996
|
+
function internalToggleOnboardingEarlyCheckTask({ deviceId, deviceName, toggleType }) {
|
|
839997
|
+
const tracer2 = new LocalTracer(LOG_TYPE6, {
|
|
840782
839998
|
function: "toggleOnboardingEarlyCheckTask",
|
|
840783
839999
|
toggleType
|
|
840784
840000
|
});
|
|
840785
|
-
|
|
840001
|
+
tracer2.trace("Starting toggleOnboardingEarlyCheckTask");
|
|
840786
840002
|
const p210 = toggleType === "enter" ? ToggleTypeP2.EnterChecking : ToggleTypeP2.ExitChecking;
|
|
840787
840003
|
return new import_rxjs236.Observable((subscriber) => {
|
|
840788
|
-
withTransport(deviceId)(({ transportRef }) => toggleOnboardingEarlyCheckCmd({
|
|
840004
|
+
withTransport(deviceId, deviceName ? { matchDeviceByName: deviceName } : void 0)(({ transportRef }) => toggleOnboardingEarlyCheckCmd({
|
|
840789
840005
|
transport: transportRef.current,
|
|
840790
840006
|
p2: p210
|
|
840791
840007
|
})).subscribe({
|
|
840792
840008
|
next: (_16) => subscriber.next({ type: "success" }),
|
|
840793
840009
|
error: (error) => {
|
|
840794
840010
|
if (error instanceof TransportStatusError) {
|
|
840795
|
-
|
|
840011
|
+
tracer2.trace("A TransportStatusError error occurred", { error });
|
|
840796
840012
|
if (error.statusCode === StatusCodes.SECURITY_STATUS_NOT_SATISFIED) {
|
|
840797
840013
|
subscriber.next({
|
|
840798
840014
|
type: "taskError",
|
|
@@ -840807,7 +840023,7 @@ function internalToggleOnboardingEarlyCheckTask({ deviceId, toggleType }) {
|
|
|
840807
840023
|
return;
|
|
840808
840024
|
}
|
|
840809
840025
|
}
|
|
840810
|
-
|
|
840026
|
+
tracer2.trace("An unknown error occurred", { error });
|
|
840811
840027
|
subscriber.next({ type: "taskError", error: "Unknown" });
|
|
840812
840028
|
},
|
|
840813
840029
|
complete: () => subscriber.complete()
|
|
@@ -840822,8 +840038,8 @@ var initialState5 = {
|
|
|
840822
840038
|
toggleStatus: "none",
|
|
840823
840039
|
...initialSharedActionState
|
|
840824
840040
|
};
|
|
840825
|
-
function toggleOnboardingEarlyCheckAction({ deviceId, toggleType }) {
|
|
840826
|
-
return toggleOnboardingEarlyCheckTask({ deviceId, toggleType }).pipe((0, import_operators68.scan)((currentState, event) => {
|
|
840041
|
+
function toggleOnboardingEarlyCheckAction({ deviceId, deviceName, toggleType }) {
|
|
840042
|
+
return toggleOnboardingEarlyCheckTask({ deviceId, deviceName, toggleType }).pipe((0, import_operators68.scan)((currentState, event) => {
|
|
840827
840043
|
switch (event.type) {
|
|
840828
840044
|
case "taskError":
|
|
840829
840045
|
return {
|
|
@@ -840872,6 +840088,7 @@ var deviceSDKToggleOnboardingEarlyCheck_default = {
|
|
|
840872
840088
|
}
|
|
840873
840089
|
return toggleOnboardingEarlyCheckAction({
|
|
840874
840090
|
deviceId: device2 ?? "",
|
|
840091
|
+
deviceName: null,
|
|
840875
840092
|
toggleType: toggleType ?? "enter"
|
|
840876
840093
|
}).subscribe(o41);
|
|
840877
840094
|
});
|
|
@@ -841422,9 +840639,9 @@ var import_rxjs251 = require("rxjs");
|
|
|
841422
840639
|
init_lib_es();
|
|
841423
840640
|
var import_rxjs249 = require("rxjs");
|
|
841424
840641
|
var import_operators79 = require("rxjs/operators");
|
|
841425
|
-
function installLanguage({ deviceId, request: request2 }) {
|
|
840642
|
+
function installLanguage({ deviceId, deviceName, request: request2 }) {
|
|
841426
840643
|
const { language } = request2;
|
|
841427
|
-
const sub = withDevice(deviceId)((transport) => new import_rxjs249.Observable((subscriber) => {
|
|
840644
|
+
const sub = withDevice(deviceId, deviceName ? { matchDeviceByName: deviceName } : void 0)((transport) => new import_rxjs249.Observable((subscriber) => {
|
|
841428
840645
|
const timeoutSub = (0, import_rxjs249.of)({
|
|
841429
840646
|
type: "unresponsiveDevice"
|
|
841430
840647
|
}).pipe((0, import_operators79.delay)(1e3)).subscribe((e35) => subscriber.next(e35));
|
|
@@ -841545,7 +840762,7 @@ var exec5 = async (opts) => {
|
|
|
841545
840762
|
const language = uninstall || install2;
|
|
841546
840763
|
if (install2) {
|
|
841547
840764
|
await new Promise(
|
|
841548
|
-
(p79) => installLanguage({ deviceId, request: { language } }).subscribe(
|
|
840765
|
+
(p79) => installLanguage({ deviceId, deviceName: null, request: { language } }).subscribe(
|
|
841549
840766
|
(x19) => console.log(x19),
|
|
841550
840767
|
(e35) => {
|
|
841551
840768
|
console.error(e35);
|
|
@@ -846791,6 +846008,7 @@ var extractOnboardingState = (flagsBytes, charonState) => {
|
|
|
846791
846008
|
// ../../libs/ledger-live-common/lib-es/hw/getOnboardingStatePolling.js
|
|
846792
846009
|
var getOnboardingStatePolling = ({
|
|
846793
846010
|
deviceId,
|
|
846011
|
+
deviceName,
|
|
846794
846012
|
pollingPeriodMs,
|
|
846795
846013
|
transportAbortTimeoutMs = pollingPeriodMs - 100,
|
|
846796
846014
|
safeGuardTimeoutMs = pollingPeriodMs * 10,
|
|
@@ -846798,7 +846016,10 @@ var getOnboardingStatePolling = ({
|
|
|
846798
846016
|
allowedErrorChecks = []
|
|
846799
846017
|
}) => {
|
|
846800
846018
|
const getOnboardingStateOnce = () => {
|
|
846801
|
-
return withDevice(deviceId, {
|
|
846019
|
+
return withDevice(deviceId, {
|
|
846020
|
+
openTimeoutMs: transportAbortTimeoutMs,
|
|
846021
|
+
matchDeviceByName: deviceName ?? void 0
|
|
846022
|
+
})((t47) => (0, import_rxjs265.from)(getVersion(t47, { abortTimeoutMs: transportAbortTimeoutMs }))).pipe(
|
|
846802
846023
|
(0, import_operators89.timeout)(safeGuardTimeoutMs),
|
|
846803
846024
|
// Throws a TimeoutError
|
|
846804
846025
|
(0, import_operators89.first)(),
|
|
@@ -846884,6 +846105,7 @@ var synchronousOnboarding_default = {
|
|
|
846884
846105
|
pollingPeriodMs
|
|
846885
846106
|
}) => getOnboardingStatePolling({
|
|
846886
846107
|
deviceId: device2 ?? "",
|
|
846108
|
+
deviceName: null,
|
|
846887
846109
|
pollingPeriodMs: pollingPeriodMs ?? 1e3
|
|
846888
846110
|
})
|
|
846889
846111
|
};
|