@ledgerhq/live-cli 24.24.0-nightly.1 → 24.24.0-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 +3 -57
- package/package.json +2 -2
package/lib/cli.js
CHANGED
|
@@ -513833,7 +513833,7 @@ var require_package7 = __commonJS({
|
|
|
513833
513833
|
module2.exports = {
|
|
513834
513834
|
name: "@ledgerhq/live-common",
|
|
513835
513835
|
description: "Common ground for the Ledger Live apps",
|
|
513836
|
-
version: "34.49.0-nightly.
|
|
513836
|
+
version: "34.49.0-nightly.2",
|
|
513837
513837
|
repository: {
|
|
513838
513838
|
type: "git",
|
|
513839
513839
|
url: "https://github.com/LedgerHQ/ledger-live.git"
|
|
@@ -514024,7 +514024,6 @@ var require_package7 = __commonJS({
|
|
|
514024
514024
|
"@ledgerhq/live-env": "workspace:^",
|
|
514025
514025
|
"@ledgerhq/live-hooks": "workspace:*",
|
|
514026
514026
|
"@ledgerhq/live-network": "workspace:^",
|
|
514027
|
-
"@ledgerhq/live-nft": "workspace:^",
|
|
514028
514027
|
"@ledgerhq/live-promise": "workspace:^",
|
|
514029
514028
|
"@ledgerhq/live-signer-canton": "workspace:^",
|
|
514030
514029
|
"@ledgerhq/live-signer-evm": "workspace:^",
|
|
@@ -514169,7 +514168,7 @@ var require_package8 = __commonJS({
|
|
|
514169
514168
|
"package.json"(exports2, module2) {
|
|
514170
514169
|
module2.exports = {
|
|
514171
514170
|
name: "@ledgerhq/live-cli",
|
|
514172
|
-
version: "24.24.0-nightly.
|
|
514171
|
+
version: "24.24.0-nightly.2",
|
|
514173
514172
|
description: "ledger-live CLI version",
|
|
514174
514173
|
repository: {
|
|
514175
514174
|
type: "git",
|
|
@@ -519361,11 +519360,6 @@ var envDefinitions = {
|
|
|
519361
519360
|
parser: boolParser,
|
|
519362
519361
|
desc: "allow the creation of legacy accounts"
|
|
519363
519362
|
},
|
|
519364
|
-
SIMPLE_HASH_API_BASE: {
|
|
519365
|
-
def: "https://simplehash.api.live.ledger.com/api/v0",
|
|
519366
|
-
parser: stringParser,
|
|
519367
|
-
desc: "SimpleHash API base url"
|
|
519368
|
-
},
|
|
519369
519363
|
SKIP_ONBOARDING: {
|
|
519370
519364
|
def: false,
|
|
519371
519365
|
parser: boolParser,
|
|
@@ -537879,34 +537873,6 @@ function checkAccountSupported(account3) {
|
|
|
537879
537873
|
}
|
|
537880
537874
|
}
|
|
537881
537875
|
|
|
537882
|
-
// ../../libs/live-nft/lib-es/supported.js
|
|
537883
|
-
var SupportedBlockchain;
|
|
537884
|
-
(function(SupportedBlockchain2) {
|
|
537885
|
-
SupportedBlockchain2["Arbitrum"] = "arbitrum";
|
|
537886
|
-
SupportedBlockchain2["Avalanche"] = "avalanche_c_chain";
|
|
537887
|
-
SupportedBlockchain2["Base"] = "base";
|
|
537888
|
-
SupportedBlockchain2["Bsc"] = "bsc";
|
|
537889
|
-
SupportedBlockchain2["Ethereum"] = "ethereum";
|
|
537890
|
-
SupportedBlockchain2["Optimism"] = "optimism";
|
|
537891
|
-
SupportedBlockchain2["Polygon"] = "polygon";
|
|
537892
|
-
SupportedBlockchain2["Solana"] = "solana";
|
|
537893
|
-
})(SupportedBlockchain || (SupportedBlockchain = {}));
|
|
537894
|
-
var replacements = {
|
|
537895
|
-
[SupportedBlockchain.Avalanche]: "avalanche"
|
|
537896
|
-
};
|
|
537897
|
-
|
|
537898
|
-
// ../../libs/live-nft/lib-es/index.js
|
|
537899
|
-
var nftsByCollections = (nfts = [], collectionAddress) => {
|
|
537900
|
-
return collectionAddress ? nfts.filter((n143) => n143.contract === collectionAddress) : nfts.reduce((acc, nft) => {
|
|
537901
|
-
const { contract } = nft;
|
|
537902
|
-
if (!acc[contract]) {
|
|
537903
|
-
acc[contract] = [];
|
|
537904
|
-
}
|
|
537905
|
-
acc[contract].push(nft);
|
|
537906
|
-
return acc;
|
|
537907
|
-
}, {});
|
|
537908
|
-
};
|
|
537909
|
-
|
|
537910
537876
|
// ../../libs/live-wallet/lib-es/accountName.js
|
|
537911
537877
|
var getDefaultAccountNameForCurrencyIndex = ({ currency: currency24, index }) => {
|
|
537912
537878
|
return `${currency24.name} ${index + 1}`;
|
|
@@ -847917,13 +847883,6 @@ var inferFamilyFromAccountId = (0, import_memoize2.default)((accountId2) => {
|
|
|
847917
847883
|
});
|
|
847918
847884
|
|
|
847919
847885
|
// ../../libs/ledger-live-common/lib-es/account/formatters.js
|
|
847920
|
-
var styling = {
|
|
847921
|
-
bold: (str) => `\x1B[1m${str}\x1B[22m`,
|
|
847922
|
-
underline: (str) => `\x1B[4m${str}\x1B[24m`,
|
|
847923
|
-
cyan: (str) => `\x1B[36m${str}\x1B[37m`,
|
|
847924
|
-
magenta: (str) => `\x1B[35m${str}\x1B[37m`,
|
|
847925
|
-
reverse: (str) => `\x1B[7m${str}\x1B[27m`
|
|
847926
|
-
};
|
|
847927
847886
|
var isSignificantAccount = (acc) => acc.balance.gt(10 ** (getAccountCurrency(acc).units[0].magnitude - 6));
|
|
847928
847887
|
var formatOp = (unitByAccountId, familySpecific) => {
|
|
847929
847888
|
const format6 = (op, level2 = 0) => {
|
|
@@ -847954,7 +847913,7 @@ function maybeDisplaySumOfOpsIssue(ops, balance, unit) {
|
|
|
847954
847913
|
}) + ")";
|
|
847955
847914
|
}
|
|
847956
847915
|
var cliFormat = (account3, level2) => {
|
|
847957
|
-
const { id: id7, name: name2, freshAddress, freshAddressPath, derivationMode, index, operations: operations3
|
|
847916
|
+
const { id: id7, name: name2, freshAddress, freshAddressPath, derivationMode, index, operations: operations3 } = account3;
|
|
847958
847917
|
const tag = getTagDerivationMode(account3.currency, derivationMode);
|
|
847959
847918
|
const balance = formatCurrencyUnit(getAccountCurrency(account3).units[0], account3.balance, {
|
|
847960
847919
|
showCode: true
|
|
@@ -847976,19 +847935,6 @@ var cliFormat = (account3, level2) => {
|
|
|
847976
847935
|
showCode: true,
|
|
847977
847936
|
disableRounding: true
|
|
847978
847937
|
}) + " (" + ta2.operations.length + " ops)" + maybeDisplaySumOfOpsIssue(ta2.operations, ta2.balance, getAccountCurrency(ta2).units[0])).join("\n");
|
|
847979
|
-
if (nfts?.length) {
|
|
847980
|
-
const NFTCollections = nftsByCollections(nfts);
|
|
847981
|
-
str += "\n";
|
|
847982
|
-
str += `NFT Collections (${Object.keys(NFTCollections).length}) `;
|
|
847983
|
-
str += "\n";
|
|
847984
|
-
str += Object.entries(NFTCollections).map(([contract, nfts2]) => {
|
|
847985
|
-
const tokenName = nfts2?.[0]?.metadata?.tokenName;
|
|
847986
|
-
const { bold, magenta, cyan, reverse } = styling;
|
|
847987
|
-
return `${bold(tokenName ?? "Unknown Collection Name")} (${magenta(contract)}): ` + nfts2.map((t46) => t46?.metadata?.nftName ? `
|
|
847988
|
-
${t46.amount}x ${reverse(` ${t46?.metadata?.nftName} `)} ${cyan("#" + t46.tokenId)}` : `
|
|
847989
|
-
${t46.amount}x ${cyan("#" + t46.tokenId)}`).join();
|
|
847990
|
-
}).join("\n");
|
|
847991
|
-
}
|
|
847992
847938
|
if (level2 === "basic")
|
|
847993
847939
|
return str;
|
|
847994
847940
|
str += "\nOPERATIONS (" + operations3.length + ")";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/live-cli",
|
|
3
|
-
"version": "24.24.0-nightly.
|
|
3
|
+
"version": "24.24.0-nightly.2",
|
|
4
4
|
"description": "ledger-live CLI version",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"ts-node": "10.9.2",
|
|
58
58
|
"tsup": "7.3.0",
|
|
59
59
|
"@ledgerhq/types-cryptoassets": "^7.27.0-nightly.0",
|
|
60
|
-
"@ledgerhq/types-live": "^6.85.0-nightly.
|
|
60
|
+
"@ledgerhq/types-live": "^6.85.0-nightly.2"
|
|
61
61
|
},
|
|
62
62
|
"publishConfig": {
|
|
63
63
|
"directory": "dist"
|