@ledgerhq/live-cli 24.30.0-nightly.20251215120904 → 24.30.0-nightly.20251217023943
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 +87 -10
- package/package.json +3 -3
package/lib/cli.js
CHANGED
|
@@ -543744,7 +543744,7 @@ var require_package8 = __commonJS({
|
|
|
543744
543744
|
module2.exports = {
|
|
543745
543745
|
name: "@ledgerhq/live-common",
|
|
543746
543746
|
description: "Common ground for the Ledger Live apps",
|
|
543747
|
-
version: "34.55.0-nightly.
|
|
543747
|
+
version: "34.55.0-nightly.20251217023943",
|
|
543748
543748
|
repository: {
|
|
543749
543749
|
type: "git",
|
|
543750
543750
|
url: "https://github.com/LedgerHQ/ledger-live.git"
|
|
@@ -543853,7 +543853,7 @@ var require_package8 = __commonJS({
|
|
|
543853
543853
|
react: ">=16",
|
|
543854
543854
|
"react-dom": ">=16",
|
|
543855
543855
|
"react-native": ">=0.65.1",
|
|
543856
|
-
"react-redux": "
|
|
543856
|
+
"react-redux": "^7.2.9 || ^9.0.0",
|
|
543857
543857
|
"redux-actions": "2.6.5"
|
|
543858
543858
|
},
|
|
543859
543859
|
peerDependenciesMeta: {
|
|
@@ -543935,6 +543935,7 @@ var require_package8 = __commonJS({
|
|
|
543935
543935
|
"@ledgerhq/hw-bolos": "workspace:^",
|
|
543936
543936
|
"@ledgerhq/hw-transport": "workspace:*",
|
|
543937
543937
|
"@ledgerhq/hw-transport-mocker": "workspace:^",
|
|
543938
|
+
"@ledgerhq/client-ids": "workspace:^",
|
|
543938
543939
|
"@ledgerhq/ledger-cal-service": "workspace:^",
|
|
543939
543940
|
"@ledgerhq/ledger-trust-service": "workspace:^",
|
|
543940
543941
|
"@ledgerhq/live-app-sdk": "^0.8.1",
|
|
@@ -544000,7 +544001,6 @@ var require_package8 = __commonJS({
|
|
|
544000
544001
|
"performance-now": "^2.1.0",
|
|
544001
544002
|
prando: "^6.0.1",
|
|
544002
544003
|
qs: "^6.10.1",
|
|
544003
|
-
"react-redux": "catalog:",
|
|
544004
544004
|
reselect: "^4.1.5",
|
|
544005
544005
|
rlp: "^3.0.0",
|
|
544006
544006
|
rxjs: "catalog:",
|
|
@@ -544032,7 +544032,6 @@ var require_package8 = __commonJS({
|
|
|
544032
544032
|
"@types/lodash": "^4.14.179",
|
|
544033
544033
|
"@types/node": "^22.10.10",
|
|
544034
544034
|
"@types/react": "^18.2.21",
|
|
544035
|
-
"@types/react-redux": "^7.1.33",
|
|
544036
544035
|
"@types/uuid": "^8.3.4",
|
|
544037
544036
|
benchmark: "^2.1.4",
|
|
544038
544037
|
buffer: "6.0.3",
|
|
@@ -544055,6 +544054,7 @@ var require_package8 = __commonJS({
|
|
|
544055
544054
|
"react-dom": "catalog:",
|
|
544056
544055
|
"react-native": "catalog:",
|
|
544057
544056
|
"react-test-renderer": "catalog:",
|
|
544057
|
+
"react-redux": "catalog:",
|
|
544058
544058
|
"redux-actions": "2.6.5",
|
|
544059
544059
|
timemachine: "^0.3.2",
|
|
544060
544060
|
"ts-jest": "^29.1.1",
|
|
@@ -544081,7 +544081,7 @@ var require_package9 = __commonJS({
|
|
|
544081
544081
|
"package.json"(exports2, module2) {
|
|
544082
544082
|
module2.exports = {
|
|
544083
544083
|
name: "@ledgerhq/live-cli",
|
|
544084
|
-
version: "24.30.0-nightly.
|
|
544084
|
+
version: "24.30.0-nightly.20251217023943",
|
|
544085
544085
|
description: "ledger-live CLI version",
|
|
544086
544086
|
repository: {
|
|
544087
544087
|
type: "git",
|
|
@@ -549547,6 +549547,12 @@ var envDefinitions = {
|
|
|
549547
549547
|
parser: stringParser,
|
|
549548
549548
|
desc: "Cryptoassets list service url (staging)"
|
|
549549
549549
|
},
|
|
549550
|
+
PUSH_DEVICES_SERVICE_URL: {
|
|
549551
|
+
def: "",
|
|
549552
|
+
// FIXME LIVE-23878: need to set the final endpoint
|
|
549553
|
+
parser: stringParser,
|
|
549554
|
+
desc: "Push Devices Service url for device tracking"
|
|
549555
|
+
},
|
|
549550
549556
|
FEATURE_FLAGS: {
|
|
549551
549557
|
def: "{}",
|
|
549552
549558
|
parser: jsonParser,
|
|
@@ -589425,19 +589431,19 @@ function getCoinAndAmounts(tx, address3) {
|
|
|
589425
589431
|
const stakingTx = !!tx.events.find((event) => STAKING_EVENTS.includes(event.type));
|
|
589426
589432
|
if (stakingTx) {
|
|
589427
589433
|
tx.events.forEach((event) => {
|
|
589428
|
-
if (ADD_STAKE_EVENTS.includes(event.type) && tx.sender
|
|
589434
|
+
if (ADD_STAKE_EVENTS.includes(event.type) && compareAddress(tx.sender, address3) && amount_out.isZero()) {
|
|
589429
589435
|
coin_id = APTOS_ASSET_ID;
|
|
589430
589436
|
type4 = OP_TYPE.STAKE;
|
|
589431
589437
|
amount_out = amount_out.plus(event.data.amount_added || event.data.amount);
|
|
589432
|
-
} else if (REACTIVATE_STAKE_EVENTS.includes(event.type) && tx.sender
|
|
589438
|
+
} else if (REACTIVATE_STAKE_EVENTS.includes(event.type) && compareAddress(tx.sender, address3) && amount_out.isZero()) {
|
|
589433
589439
|
coin_id = APTOS_ASSET_ID;
|
|
589434
589440
|
type4 = OP_TYPE.STAKE;
|
|
589435
589441
|
amount_out = amount_out.plus(event.data.amount_reactivated || event.data.amount);
|
|
589436
|
-
} else if (UNLOCK_STAKE_EVENTS.includes(event.type) && tx.sender
|
|
589442
|
+
} else if (UNLOCK_STAKE_EVENTS.includes(event.type) && compareAddress(tx.sender, address3) && amount_in.isZero()) {
|
|
589437
589443
|
coin_id = APTOS_ASSET_ID;
|
|
589438
589444
|
type4 = OP_TYPE.UNSTAKE;
|
|
589439
589445
|
amount_in = amount_in.plus(event.data.amount_unlocked || event.data.amount);
|
|
589440
|
-
} else if (WITHDRAW_STAKE_EVENTS.includes(event.type) && tx.sender
|
|
589446
|
+
} else if (WITHDRAW_STAKE_EVENTS.includes(event.type) && compareAddress(tx.sender, address3) && amount_in.isZero()) {
|
|
589441
589447
|
coin_id = APTOS_ASSET_ID;
|
|
589442
589448
|
type4 = OP_TYPE.WITHDRAW;
|
|
589443
589449
|
amount_in = amount_in.plus(event.data.amount_withdrawn || event.data.amount);
|
|
@@ -878542,6 +878548,39 @@ init_lib_es2();
|
|
|
878542
878548
|
var import_isomorphic_ws5 = __toESM(require_node8());
|
|
878543
878549
|
var import_rxjs199 = require("rxjs");
|
|
878544
878550
|
init_lib_es();
|
|
878551
|
+
init_sha3();
|
|
878552
|
+
|
|
878553
|
+
// ../../libs/client-ids/lib-es/ids/DeviceId.js
|
|
878554
|
+
var DEVICE_ID_SYMBOL = Symbol("deviceId");
|
|
878555
|
+
var DeviceId = class _DeviceId {
|
|
878556
|
+
[DEVICE_ID_SYMBOL];
|
|
878557
|
+
static fromString(id5) {
|
|
878558
|
+
return new _DeviceId(id5);
|
|
878559
|
+
}
|
|
878560
|
+
constructor(id5) {
|
|
878561
|
+
if (!id5 || typeof id5 !== "string" || id5.trim().length === 0) {
|
|
878562
|
+
throw new Error("DeviceId must be a non-empty string");
|
|
878563
|
+
}
|
|
878564
|
+
this[DEVICE_ID_SYMBOL] = id5;
|
|
878565
|
+
}
|
|
878566
|
+
toString() {
|
|
878567
|
+
return "[DeviceId:REDACTED]";
|
|
878568
|
+
}
|
|
878569
|
+
toJSON() {
|
|
878570
|
+
return "[DeviceId:REDACTED]";
|
|
878571
|
+
}
|
|
878572
|
+
exportDeviceIdForPushDevicesService() {
|
|
878573
|
+
return this[DEVICE_ID_SYMBOL];
|
|
878574
|
+
}
|
|
878575
|
+
exportDeviceIdForPersistence() {
|
|
878576
|
+
return this[DEVICE_ID_SYMBOL];
|
|
878577
|
+
}
|
|
878578
|
+
equals(other) {
|
|
878579
|
+
return this[DEVICE_ID_SYMBOL] === other[DEVICE_ID_SYMBOL];
|
|
878580
|
+
}
|
|
878581
|
+
};
|
|
878582
|
+
|
|
878583
|
+
// ../../libs/ledger-live-common/lib-es/socket/index.js
|
|
878545
878584
|
var LOG_TYPE3 = "socket";
|
|
878546
878585
|
var ALLOW_SECURE_CHANNEL_DELAY = 500;
|
|
878547
878586
|
var warningsSubject = new import_rxjs199.Subject();
|
|
@@ -878560,6 +878599,7 @@ function createDeviceSocket(transport, { url: url5, unresponsiveExpectedDuringBu
|
|
|
878560
878599
|
let correctlyFinished = false;
|
|
878561
878600
|
let inBulkMode = false;
|
|
878562
878601
|
let allowSecureChannelTimeout = null;
|
|
878602
|
+
let deviceIdCaptured = false;
|
|
878563
878603
|
const ws3 = new import_isomorphic_ws5.default(url5);
|
|
878564
878604
|
ws3.onopen = () => {
|
|
878565
878605
|
tracer2.trace("Socket opened", { url: url5 });
|
|
@@ -878621,6 +878661,7 @@ function createDeviceSocket(transport, { url: url5, unresponsiveExpectedDuringBu
|
|
|
878621
878661
|
});
|
|
878622
878662
|
}, ALLOW_SECURE_CHANNEL_DELAY);
|
|
878623
878663
|
}
|
|
878664
|
+
const shouldCaptureDeviceId = !deviceIdCaptured && apdu.slice(0, 2).toString("hex") === "e052";
|
|
878624
878665
|
const r87 = await transport.exchange(apdu);
|
|
878625
878666
|
if (allowSecureChannelTimeout) {
|
|
878626
878667
|
clearTimeout(allowSecureChannelTimeout);
|
|
@@ -878653,6 +878694,26 @@ function createDeviceSocket(transport, { url: url5, unresponsiveExpectedDuringBu
|
|
|
878653
878694
|
type: "device-permission-granted"
|
|
878654
878695
|
});
|
|
878655
878696
|
}
|
|
878697
|
+
if (shouldCaptureDeviceId && status === StatusCodes.OK) {
|
|
878698
|
+
try {
|
|
878699
|
+
const responseData = r87.slice(0, r87.length - 2);
|
|
878700
|
+
const headerLength = responseData[0];
|
|
878701
|
+
const publicKeyLengthOffset = 1 + headerLength;
|
|
878702
|
+
const publicKeyLength = responseData[publicKeyLengthOffset];
|
|
878703
|
+
const publicKeyOffset = publicKeyLengthOffset + 1;
|
|
878704
|
+
const publicKey4 = responseData.slice(publicKeyOffset, publicKeyOffset + publicKeyLength);
|
|
878705
|
+
const deviceIdHash = sha3_256(publicKey4);
|
|
878706
|
+
const deviceIdString = Buffer.from(deviceIdHash).toString("hex");
|
|
878707
|
+
const deviceId = DeviceId.fromString(deviceIdString);
|
|
878708
|
+
deviceIdCaptured = true;
|
|
878709
|
+
o93.next({
|
|
878710
|
+
type: "device-id",
|
|
878711
|
+
deviceId
|
|
878712
|
+
});
|
|
878713
|
+
} catch (err) {
|
|
878714
|
+
tracer2.trace("Failed to extract device ID from GetCertificate response", { err });
|
|
878715
|
+
}
|
|
878716
|
+
}
|
|
878656
878717
|
const data6 = r87.slice(0, r87.length - 2);
|
|
878657
878718
|
o93.next({
|
|
878658
878719
|
type: "exchange",
|
|
@@ -879514,6 +879575,14 @@ var listApps2 = ({ transport, deviceInfo, deviceProxyModel, managerDevModeEnable
|
|
|
879514
879575
|
case "device-permission-requested":
|
|
879515
879576
|
o93.next(e95);
|
|
879516
879577
|
break;
|
|
879578
|
+
case "device-id": {
|
|
879579
|
+
const deviceIdValue = typeof e95.deviceId === "string" ? DeviceId.fromString(e95.deviceId) : e95.deviceId;
|
|
879580
|
+
o93.next({
|
|
879581
|
+
type: "device-id",
|
|
879582
|
+
deviceId: deviceIdValue
|
|
879583
|
+
});
|
|
879584
|
+
break;
|
|
879585
|
+
}
|
|
879517
879586
|
}
|
|
879518
879587
|
},
|
|
879519
879588
|
error: reject
|
|
@@ -888280,11 +888349,19 @@ var getOnboardingStatePolling = ({
|
|
|
888280
888349
|
// Nb Empirical value
|
|
888281
888350
|
allowedErrorChecks = []
|
|
888282
888351
|
}) => {
|
|
888352
|
+
let hasQuitAppAlreadyRun = false;
|
|
888283
888353
|
const getOnboardingStateOnce = () => {
|
|
888284
888354
|
return withDevice(deviceId, {
|
|
888285
888355
|
openTimeoutMs: transportAbortTimeoutMs,
|
|
888286
888356
|
matchDeviceByName: deviceName ?? void 0
|
|
888287
|
-
})((t110) =>
|
|
888357
|
+
})((t110) => {
|
|
888358
|
+
const getVersionObs = (0, import_rxjs276.from)(getVersion(t110, { abortTimeoutMs: transportAbortTimeoutMs }));
|
|
888359
|
+
if (hasQuitAppAlreadyRun) {
|
|
888360
|
+
return getVersionObs;
|
|
888361
|
+
}
|
|
888362
|
+
hasQuitAppAlreadyRun = true;
|
|
888363
|
+
return quitApp(t110).pipe((0, import_operators90.switchMap)(() => getVersionObs));
|
|
888364
|
+
}).pipe(
|
|
888288
888365
|
(0, import_operators90.timeout)(safeGuardTimeoutMs),
|
|
888289
888366
|
// Throws a TimeoutError
|
|
888290
888367
|
(0, import_operators90.first)(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/live-cli",
|
|
3
|
-
"version": "24.30.0-nightly.
|
|
3
|
+
"version": "24.30.0-nightly.20251217023943",
|
|
4
4
|
"description": "ledger-live CLI version",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"ts-node": "10.9.2",
|
|
59
59
|
"tsup": "7.3.0",
|
|
60
60
|
"yaml": "2.8.1",
|
|
61
|
-
"@ledgerhq/types-cryptoassets": "^7.31.0-nightly.
|
|
62
|
-
"@ledgerhq/types-live": "^6.91.0-nightly.
|
|
61
|
+
"@ledgerhq/types-cryptoassets": "^7.31.0-nightly.20251217023943",
|
|
62
|
+
"@ledgerhq/types-live": "^6.91.0-nightly.20251217023943"
|
|
63
63
|
},
|
|
64
64
|
"publishConfig": {
|
|
65
65
|
"directory": "dist"
|