@ledgerhq/live-cli 24.27.0-nightly.20251031023756 → 24.27.0-nightly.20251031094135
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 +45 -30
- package/package.json +3 -3
package/lib/cli.js
CHANGED
|
@@ -520289,7 +520289,7 @@ var require_package7 = __commonJS({
|
|
|
520289
520289
|
module2.exports = {
|
|
520290
520290
|
name: "@ledgerhq/live-common",
|
|
520291
520291
|
description: "Common ground for the Ledger Live apps",
|
|
520292
|
-
version: "34.52.0-nightly.
|
|
520292
|
+
version: "34.52.0-nightly.20251031094135",
|
|
520293
520293
|
repository: {
|
|
520294
520294
|
type: "git",
|
|
520295
520295
|
url: "https://github.com/LedgerHQ/ledger-live.git"
|
|
@@ -520624,7 +520624,7 @@ var require_package8 = __commonJS({
|
|
|
520624
520624
|
"package.json"(exports2, module2) {
|
|
520625
520625
|
module2.exports = {
|
|
520626
520626
|
name: "@ledgerhq/live-cli",
|
|
520627
|
-
version: "24.27.0-nightly.
|
|
520627
|
+
version: "24.27.0-nightly.20251031094135",
|
|
520628
520628
|
description: "ledger-live CLI version",
|
|
520629
520629
|
repository: {
|
|
520630
520630
|
type: "git",
|
|
@@ -628343,10 +628343,11 @@ async function estimateFees2(currency24, transactionIntent, customFeesParameters
|
|
|
628343
628343
|
});
|
|
628344
628344
|
return { finalFeeData: feeData };
|
|
628345
628345
|
})();
|
|
628346
|
-
const
|
|
628346
|
+
const finalType = finalFeeData.maxFeePerGas && finalFeeData.maxPriorityFeePerGas ? TransactionTypes2.eip1559 : TransactionTypes2.legacy;
|
|
628347
|
+
const gasPrice = finalType === TransactionTypes2.legacy ? finalFeeData.gasPrice : finalFeeData.maxFeePerGas;
|
|
628347
628348
|
const fee = gasPrice?.multipliedBy(gasLimit) || new import_bignumber162.default(0);
|
|
628348
628349
|
const unsignedTransaction = {
|
|
628349
|
-
type:
|
|
628350
|
+
type: finalType,
|
|
628350
628351
|
to,
|
|
628351
628352
|
nonce,
|
|
628352
628353
|
gasLimit: BigInt(gasLimit.toFixed(0)),
|
|
@@ -628359,6 +628360,7 @@ async function estimateFees2(currency24, transactionIntent, customFeesParameters
|
|
|
628359
628360
|
value: BigInt(fee.toString()),
|
|
628360
628361
|
parameters: {
|
|
628361
628362
|
...toApiFeeData(finalFeeData),
|
|
628363
|
+
type: finalType,
|
|
628362
628364
|
additionalFees: additionalFees && BigInt(additionalFees.toFixed()),
|
|
628363
628365
|
gasLimit: BigInt(gasLimit.toFixed()),
|
|
628364
628366
|
gasOptions: finalGasOptions && toApiGasOptions(finalGasOptions)
|
|
@@ -767939,11 +767941,11 @@ async function post2(endPoint, body) {
|
|
|
767939
767941
|
data: body
|
|
767940
767942
|
});
|
|
767941
767943
|
if ("Error" in data6) {
|
|
767942
|
-
|
|
767943
|
-
|
|
767944
|
-
|
|
767945
|
-
});
|
|
767946
|
-
throw new Error(
|
|
767944
|
+
const error = data6.Error;
|
|
767945
|
+
const message2 = (0, import_querystring3.stringify)(error);
|
|
767946
|
+
const nonEmptyMessage = message2 === "" ? error.toString() : message2;
|
|
767947
|
+
log2("tron-error", nonEmptyMessage, { endPoint, body });
|
|
767948
|
+
throw new Error(nonEmptyMessage);
|
|
767947
767949
|
}
|
|
767948
767950
|
return data6;
|
|
767949
767951
|
}
|
|
@@ -819195,21 +819197,34 @@ function assetInfosFallback(transaction) {
|
|
|
819195
819197
|
assetOwner: transaction.assetOwner ?? ""
|
|
819196
819198
|
};
|
|
819197
819199
|
}
|
|
819200
|
+
function propagateField(estimation, field, dest) {
|
|
819201
|
+
const value2 = estimation?.parameters?.[field];
|
|
819202
|
+
if (typeof value2 !== "bigint" && typeof value2 !== "number" && typeof value2 !== "string")
|
|
819203
|
+
return;
|
|
819204
|
+
switch (field) {
|
|
819205
|
+
case "type":
|
|
819206
|
+
dest[field] = Number(value2.toString());
|
|
819207
|
+
return;
|
|
819208
|
+
case "storageLimit":
|
|
819209
|
+
dest[field] = new import_bignumber363.default(value2.toString());
|
|
819210
|
+
return;
|
|
819211
|
+
default:
|
|
819212
|
+
return;
|
|
819213
|
+
}
|
|
819214
|
+
}
|
|
819198
819215
|
function genericPrepareTransaction(network, kind) {
|
|
819199
819216
|
return async (account3, transaction) => {
|
|
819200
819217
|
const { getAssetFromToken: getAssetFromToken3, computeIntentType: computeIntentType2, estimateFees: estimateFees10, validateIntent: validateIntent5 } = getAlpacaApi(account3.currency.id, kind);
|
|
819201
819218
|
const { assetReference, assetOwner } = getAssetFromToken3 ? getAssetInfos(transaction, account3.freshAddress, getAssetFromToken3) : assetInfosFallback(transaction);
|
|
819202
819219
|
const customParametersFees = transaction.customFees?.parameters?.fees;
|
|
819203
|
-
|
|
819204
|
-
|
|
819205
|
-
|
|
819206
|
-
|
|
819207
|
-
|
|
819208
|
-
}
|
|
819209
|
-
if (!bnEq(transaction.fees, new import_bignumber363.default(fees2.toString()))) {
|
|
819220
|
+
const estimation = customParametersFees ? { value: BigInt(customParametersFees.toFixed()) } : await estimateFees10(transactionToIntent(account3, {
|
|
819221
|
+
...transaction
|
|
819222
|
+
}, computeIntentType2));
|
|
819223
|
+
const fees2 = new import_bignumber363.default(estimation.value.toString());
|
|
819224
|
+
if (!bnEq(transaction.fees, fees2)) {
|
|
819210
819225
|
const next = {
|
|
819211
819226
|
...transaction,
|
|
819212
|
-
fees:
|
|
819227
|
+
fees: fees2,
|
|
819213
819228
|
assetReference,
|
|
819214
819229
|
assetOwner,
|
|
819215
819230
|
customFees: {
|
|
@@ -819218,17 +819233,11 @@ function genericPrepareTransaction(network, kind) {
|
|
|
819218
819233
|
}
|
|
819219
819234
|
}
|
|
819220
819235
|
};
|
|
819221
|
-
const
|
|
819222
|
-
|
|
819223
|
-
|
|
819224
|
-
const params = feeEstimation?.parameters;
|
|
819225
|
-
if (params) {
|
|
819226
|
-
const storageLimit = params["storageLimit"];
|
|
819227
|
-
if (storageLimit !== void 0 && (typeof storageLimit === "bigint" || typeof storageLimit === "number" || typeof storageLimit === "string")) {
|
|
819228
|
-
next.storageLimit = new import_bignumber363.default(storageLimit.toString());
|
|
819229
|
-
}
|
|
819236
|
+
const fieldsToPropagate = ["type", "storageLimit"];
|
|
819237
|
+
for (const field of fieldsToPropagate) {
|
|
819238
|
+
propagateField(estimation, field, next);
|
|
819230
819239
|
}
|
|
819231
|
-
if (transaction.useAllAmount ||
|
|
819240
|
+
if (transaction.useAllAmount || ["stake", "unstake"].includes(transaction.mode ?? "")) {
|
|
819232
819241
|
const { amount } = await validateIntent5(transactionToIntent(account3, {
|
|
819233
819242
|
...transaction
|
|
819234
819243
|
}, computeIntentType2));
|
|
@@ -819271,7 +819280,8 @@ function genericGetTransactionStatus(network, kind) {
|
|
|
819271
819280
|
memoValue: transaction.memoValue || "",
|
|
819272
819281
|
family: transaction.family,
|
|
819273
819282
|
feesStrategy: transaction.feesStrategy,
|
|
819274
|
-
data: transaction.data
|
|
819283
|
+
data: transaction.data,
|
|
819284
|
+
type: transaction.type
|
|
819275
819285
|
};
|
|
819276
819286
|
if (alpacaApi.getChainSpecificRules) {
|
|
819277
819287
|
const chainSpecificValidation = alpacaApi.getChainSpecificRules();
|
|
@@ -819335,12 +819345,17 @@ function createTransaction41(account3) {
|
|
|
819335
819345
|
};
|
|
819336
819346
|
case "evm": {
|
|
819337
819347
|
return {
|
|
819338
|
-
mode: "send
|
|
819348
|
+
mode: "send",
|
|
819349
|
+
type: 2,
|
|
819339
819350
|
family: currency24.family,
|
|
819340
819351
|
amount: new import_bignumber365.default(0),
|
|
819341
819352
|
recipient: "",
|
|
819342
819353
|
useAllAmount: false,
|
|
819343
|
-
feesStrategy: "medium"
|
|
819354
|
+
feesStrategy: "medium",
|
|
819355
|
+
chainId: currency24.ethereumLikeInfo?.chainId ?? 0,
|
|
819356
|
+
gasLimit: new import_bignumber365.default(21e3),
|
|
819357
|
+
maxFeePerGas: new import_bignumber365.default(0),
|
|
819358
|
+
maxPriorityFeePerGas: new import_bignumber365.default(0)
|
|
819344
819359
|
};
|
|
819345
819360
|
}
|
|
819346
819361
|
default:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/live-cli",
|
|
3
|
-
"version": "24.27.0-nightly.
|
|
3
|
+
"version": "24.27.0-nightly.20251031094135",
|
|
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.30.0-nightly.
|
|
62
|
-
"@ledgerhq/types-live": "^6.88.0-nightly.
|
|
61
|
+
"@ledgerhq/types-cryptoassets": "^7.30.0-nightly.20251031094135",
|
|
62
|
+
"@ledgerhq/types-live": "^6.88.0-nightly.20251031094135"
|
|
63
63
|
},
|
|
64
64
|
"publishConfig": {
|
|
65
65
|
"directory": "dist"
|