@ledgerhq/live-cli 24.19.7-nightly.1 → 24.19.7-nightly.2
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 +44 -31
- package/package.json +1 -1
package/lib/cli.js
CHANGED
|
@@ -508079,7 +508079,7 @@ var require_lib66 = __commonJS({
|
|
|
508079
508079
|
var tokenize;
|
|
508080
508080
|
{
|
|
508081
508081
|
const JSX_TAG = /^[a-z][\w-]*$/i;
|
|
508082
|
-
const
|
|
508082
|
+
const getTokenType2 = function(token, offset2, text) {
|
|
508083
508083
|
if (token.type === "name") {
|
|
508084
508084
|
if (helperValidatorIdentifier.isKeyword(token.value) || helperValidatorIdentifier.isStrictReservedWord(token.value, true) || sometimesKeywords.has(token.value)) {
|
|
508085
508085
|
return "keyword";
|
|
@@ -508104,7 +508104,7 @@ var require_lib66 = __commonJS({
|
|
|
508104
508104
|
while (match = jsTokens.default.exec(text)) {
|
|
508105
508105
|
const token = jsTokens.matchToToken(match);
|
|
508106
508106
|
yield {
|
|
508107
|
-
type:
|
|
508107
|
+
type: getTokenType2(token, match.index, text),
|
|
508108
508108
|
value: token.value
|
|
508109
508109
|
};
|
|
508110
508110
|
}
|
|
@@ -516671,7 +516671,7 @@ var require_package8 = __commonJS({
|
|
|
516671
516671
|
module2.exports = {
|
|
516672
516672
|
name: "@ledgerhq/live-common",
|
|
516673
516673
|
description: "Common ground for the Ledger Live apps",
|
|
516674
|
-
version: "34.43.0-nightly.
|
|
516674
|
+
version: "34.43.0-nightly.2",
|
|
516675
516675
|
repository: {
|
|
516676
516676
|
type: "git",
|
|
516677
516677
|
url: "https://github.com/LedgerHQ/ledger-live.git"
|
|
@@ -523472,7 +523472,7 @@ var require_package9 = __commonJS({
|
|
|
523472
523472
|
"package.json"(exports2, module2) {
|
|
523473
523473
|
module2.exports = {
|
|
523474
523474
|
name: "@ledgerhq/live-cli",
|
|
523475
|
-
version: "24.19.7-nightly.
|
|
523475
|
+
version: "24.19.7-nightly.2",
|
|
523476
523476
|
description: "ledger-live CLI version",
|
|
523477
523477
|
repository: {
|
|
523478
523478
|
type: "git",
|
|
@@ -532852,7 +532852,7 @@ var cryptocurrenciesById = {
|
|
|
532852
532852
|
id: "sonic",
|
|
532853
532853
|
coinType: CoinType.ETH,
|
|
532854
532854
|
name: "Sonic",
|
|
532855
|
-
managerAppName: "
|
|
532855
|
+
managerAppName: "Sonic",
|
|
532856
532856
|
ticker: "S",
|
|
532857
532857
|
scheme: "sonic",
|
|
532858
532858
|
color: "#FFFFFF",
|
|
@@ -532875,7 +532875,7 @@ var cryptocurrenciesById = {
|
|
|
532875
532875
|
isTestnetFor: "sonic",
|
|
532876
532876
|
coinType: CoinType.ETH,
|
|
532877
532877
|
name: "Sonic Blaze",
|
|
532878
|
-
managerAppName: "
|
|
532878
|
+
managerAppName: "Sonic",
|
|
532879
532879
|
ticker: "S",
|
|
532880
532880
|
scheme: "sonic_blaze",
|
|
532881
532881
|
color: "#FFFFFF",
|
|
@@ -568419,7 +568419,7 @@ var detectType = (address4, tx, value5) => {
|
|
|
568419
568419
|
}
|
|
568420
568420
|
return type4;
|
|
568421
568421
|
};
|
|
568422
|
-
var
|
|
568422
|
+
var getTokenType = (coin_id) => {
|
|
568423
568423
|
const parts = coin_id.split("::");
|
|
568424
568424
|
if (parts.length === 3) {
|
|
568425
568425
|
return "coin";
|
|
@@ -568468,9 +568468,8 @@ function transactionsToOperations(address4, txs) {
|
|
|
568468
568468
|
return acc;
|
|
568469
568469
|
} else {
|
|
568470
568470
|
op.asset = {
|
|
568471
|
-
type:
|
|
568472
|
-
|
|
568473
|
-
contractAddress: coin_id
|
|
568471
|
+
type: getTokenType(coin_id),
|
|
568472
|
+
assetReference: coin_id
|
|
568474
568473
|
};
|
|
568475
568474
|
acc.push(op);
|
|
568476
568475
|
}
|
|
@@ -581558,19 +581557,19 @@ var AptosAPI = class {
|
|
|
581558
581557
|
typeArguments: [APTOS_ASSET_ID],
|
|
581559
581558
|
functionArguments: [transactionIntent.recipient, transactionIntent.amount]
|
|
581560
581559
|
};
|
|
581561
|
-
if (transactionIntent.asset.type
|
|
581562
|
-
const {
|
|
581563
|
-
if (
|
|
581560
|
+
if (transactionIntent.asset.type !== "native") {
|
|
581561
|
+
const { type: type4 } = transactionIntent.asset;
|
|
581562
|
+
if (type4 === TOKEN_TYPE.FUNGIBLE_ASSET) {
|
|
581564
581563
|
txPayload.function = "0x1::primary_fungible_store::transfer";
|
|
581565
581564
|
txPayload.typeArguments = ["0x1::fungible_asset::Metadata"];
|
|
581566
581565
|
txPayload.functionArguments = [
|
|
581567
|
-
transactionIntent.asset.
|
|
581566
|
+
transactionIntent.asset.assetReference,
|
|
581568
581567
|
transactionIntent.recipient,
|
|
581569
581568
|
transactionIntent.amount
|
|
581570
581569
|
];
|
|
581571
|
-
} else if (
|
|
581570
|
+
} else if (type4 === TOKEN_TYPE.COIN) {
|
|
581572
581571
|
txPayload.function = "0x1::aptos_account::transfer_coins";
|
|
581573
|
-
txPayload.typeArguments = [transactionIntent.asset.
|
|
581572
|
+
txPayload.typeArguments = [transactionIntent.asset.assetReference];
|
|
581574
581573
|
}
|
|
581575
581574
|
}
|
|
581576
581575
|
const txOptions = {
|
|
@@ -773096,11 +773095,11 @@ var signer_default8 = getAddress_default7;
|
|
|
773096
773095
|
var import_bignumber265 = __toESM(require("bignumber.js"));
|
|
773097
773096
|
var getAssetIdFromTokenId = (tokenId) => tokenId.split("/")[2];
|
|
773098
773097
|
var getAssetIdFromAsset = (asset) => `${asset.asset_code}:${asset.asset_issuer}`;
|
|
773099
|
-
function buildStellarTokenAccount({ parentAccountId,
|
|
773098
|
+
function buildStellarTokenAccount({ parentAccountId, balance, sellingLiabilities, token, operations: operations2 }) {
|
|
773100
773099
|
const assetId = getAssetIdFromTokenId(token.id);
|
|
773101
773100
|
const id5 = `${parentAccountId}+${assetId}`;
|
|
773102
|
-
const
|
|
773103
|
-
const reservedBalance = new import_bignumber265.default(
|
|
773101
|
+
const parsedBalance = parseCurrencyUnit(token.units[0], balance);
|
|
773102
|
+
const reservedBalance = new import_bignumber265.default(balance).minus(sellingLiabilities || 0);
|
|
773104
773103
|
const spendableBalance = parseCurrencyUnit(token.units[0], reservedBalance.toString());
|
|
773105
773104
|
return {
|
|
773106
773105
|
type: "TokenAccount",
|
|
@@ -773116,7 +773115,7 @@ function buildStellarTokenAccount({ parentAccountId, stellarAsset, token, operat
|
|
|
773116
773115
|
value: op.extra.assetAmount ? new import_bignumber265.default(op.extra.assetAmount) : op.value
|
|
773117
773116
|
})),
|
|
773118
773117
|
pendingOperations: [],
|
|
773119
|
-
balance,
|
|
773118
|
+
balance: parsedBalance,
|
|
773120
773119
|
spendableBalance,
|
|
773121
773120
|
swapHistory: [],
|
|
773122
773121
|
creationDate: operations2.length > 0 ? operations2[operations2.length - 1].date : /* @__PURE__ */ new Date(),
|
|
@@ -773136,7 +773135,8 @@ function buildSubAccounts3({ currency: currency24, accountId: accountId2, assets
|
|
|
773136
773135
|
if (token && !blacklistedTokenIds.includes(token.id)) {
|
|
773137
773136
|
tokenAccounts.push(buildStellarTokenAccount({
|
|
773138
773137
|
parentAccountId: accountId2,
|
|
773139
|
-
|
|
773138
|
+
balance: asset.balance || "0",
|
|
773139
|
+
sellingLiabilities: asset.selling_liabilities || "0",
|
|
773140
773140
|
token,
|
|
773141
773141
|
operations: operations2.filter((op) => op.extra.assetCode === asset.asset_code && op.extra.assetIssuer === asset.asset_issuer)
|
|
773142
773142
|
}));
|
|
@@ -796583,7 +796583,7 @@ var import_bignumber292 = __toESM(require("bignumber.js"));
|
|
|
796583
796583
|
|
|
796584
796584
|
// ../../libs/coin-modules/coin-tron/lib-es/logic/estimateFees.js
|
|
796585
796585
|
async function estimateFees4(transactionIntent) {
|
|
796586
|
-
if (transactionIntent.asset.type === "
|
|
796586
|
+
if (transactionIntent.asset.type === "trc20") {
|
|
796587
796587
|
return BigInt(ACTIVATION_FEES_TRC_20.toString());
|
|
796588
796588
|
} else {
|
|
796589
796589
|
return BigInt(STANDARD_FEES_NATIVE.toString());
|
|
@@ -796648,10 +796648,9 @@ var getFeesFromAccountActivation = async (account3, transaction, tokenAccount) =
|
|
|
796648
796648
|
recipient: transaction.recipient,
|
|
796649
796649
|
amount: BigInt(transaction.amount.toString()),
|
|
796650
796650
|
asset: tokenAccount?.token.tokenType === "trc20" ? {
|
|
796651
|
-
type: "
|
|
796652
|
-
|
|
796653
|
-
|
|
796654
|
-
} : { type: "token", standard: "trc10", tokenId: tokenAccount?.token.id }
|
|
796651
|
+
type: "trc20",
|
|
796652
|
+
assetReference: tokenAccount.token.contractAddress
|
|
796653
|
+
} : { type: "trc10", assetReference: tokenAccount?.token.id }
|
|
796655
796654
|
};
|
|
796656
796655
|
if (tokenAccount && tokenAccount.token.tokenType === "trc20") {
|
|
796657
796656
|
const estimatedFees = await estimateFees4(transactionIntent);
|
|
@@ -807439,11 +807438,15 @@ var network_default3 = {
|
|
|
807439
807438
|
};
|
|
807440
807439
|
|
|
807441
807440
|
// ../../libs/coin-modules/coin-sui/lib-es/logic/craftTransaction.js
|
|
807442
|
-
async function craftTransaction4({ sender, amount, recipient,
|
|
807441
|
+
async function craftTransaction4({ sender, amount, recipient, asset, type: type4 }) {
|
|
807442
|
+
let coinType = DEFAULT_COIN_TYPE;
|
|
807443
|
+
if (asset.type === "token" && asset.assetReference) {
|
|
807444
|
+
coinType = asset.assetReference;
|
|
807445
|
+
}
|
|
807443
807446
|
const unsigned2 = await network_default3.createTransaction(sender, {
|
|
807444
807447
|
amount: (0, import_bignumber311.default)(amount.toString()),
|
|
807445
807448
|
recipient,
|
|
807446
|
-
coinType
|
|
807449
|
+
coinType,
|
|
807447
807450
|
mode: type4
|
|
807448
807451
|
});
|
|
807449
807452
|
return { unsigned: unsigned2 };
|
|
@@ -808369,13 +808372,22 @@ function optimisticOpcommons2(commandDescriptor) {
|
|
|
808369
808372
|
// ../../libs/coin-modules/coin-sui/lib-es/bridge/buildTransaction.js
|
|
808370
808373
|
var import_pick = __toESM(require("lodash/pick"));
|
|
808371
808374
|
var buildTransaction10 = async ({ freshAddress }, { recipient, mode, amount, coinType }) => {
|
|
808375
|
+
const NATIVE_COIN_TYPE = "0x2::sui::SUI";
|
|
808376
|
+
let asset = {
|
|
808377
|
+
type: "native"
|
|
808378
|
+
};
|
|
808379
|
+
if (coinType !== NATIVE_COIN_TYPE) {
|
|
808380
|
+
asset = {
|
|
808381
|
+
type: "token",
|
|
808382
|
+
assetReference: coinType
|
|
808383
|
+
};
|
|
808384
|
+
}
|
|
808372
808385
|
return craftTransaction4({
|
|
808373
808386
|
sender: freshAddress,
|
|
808374
808387
|
recipient,
|
|
808375
808388
|
type: mode,
|
|
808376
|
-
coinType,
|
|
808377
808389
|
amount: BigInt(amount.toString()),
|
|
808378
|
-
asset
|
|
808390
|
+
asset
|
|
808379
808391
|
});
|
|
808380
808392
|
};
|
|
808381
808393
|
|
|
@@ -815773,7 +815785,7 @@ function transactionToIntent(account3, transaction) {
|
|
|
815773
815785
|
sender: account3.freshAddress,
|
|
815774
815786
|
recipient: transaction.recipient,
|
|
815775
815787
|
amount: fromBigNumberToBigInt(transaction.amount, BigInt(0)),
|
|
815776
|
-
asset:
|
|
815788
|
+
asset: { type: "native" }
|
|
815777
815789
|
};
|
|
815778
815790
|
}
|
|
815779
815791
|
var buildOptimisticOperation22 = (account3, transaction, sequenceNumber) => {
|
|
@@ -834683,6 +834695,7 @@ var minAppVersion = {
|
|
|
834683
834695
|
"SSH/PGP Agent": "0.0.7",
|
|
834684
834696
|
Sia: "0.4.2",
|
|
834685
834697
|
Solana: "1.0.1",
|
|
834698
|
+
Sonic: "1.4.0",
|
|
834686
834699
|
Stacks: "0.0.0",
|
|
834687
834700
|
Stellar: "3.2.2",
|
|
834688
834701
|
Stratis: "1.5.0",
|