@ledgerhq/live-cli 24.18.4-nightly.1 → 24.18.4-nightly.3
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 +56 -11
- package/package.json +1 -1
package/lib/cli.js
CHANGED
|
@@ -530283,7 +530283,7 @@ var require_package8 = __commonJS({
|
|
|
530283
530283
|
module2.exports = {
|
|
530284
530284
|
name: "@ledgerhq/live-common",
|
|
530285
530285
|
description: "Common ground for the Ledger Live apps",
|
|
530286
|
-
version: "34.35.0-nightly.
|
|
530286
|
+
version: "34.35.0-nightly.3",
|
|
530287
530287
|
repository: {
|
|
530288
530288
|
type: "git",
|
|
530289
530289
|
url: "https://github.com/LedgerHQ/ledger-live.git"
|
|
@@ -537082,7 +537082,7 @@ var require_package9 = __commonJS({
|
|
|
537082
537082
|
"package.json"(exports2, module2) {
|
|
537083
537083
|
module2.exports = {
|
|
537084
537084
|
name: "@ledgerhq/live-cli",
|
|
537085
|
-
version: "24.18.4-nightly.
|
|
537085
|
+
version: "24.18.4-nightly.3",
|
|
537086
537086
|
description: "ledger-live CLI version",
|
|
537087
537087
|
repository: {
|
|
537088
537088
|
type: "git",
|
|
@@ -594557,9 +594557,8 @@ var AptosAPI = class {
|
|
|
594557
594557
|
async getBalance(address4, token) {
|
|
594558
594558
|
if (token.tokenType === "coin") {
|
|
594559
594559
|
return await this.getCoinBalance(address4, token.contractAddress);
|
|
594560
|
-
} else {
|
|
594561
|
-
return await this.getFABalance(address4, token.contractAddress);
|
|
594562
594560
|
}
|
|
594561
|
+
return await this.getFABalance(address4, token.contractAddress);
|
|
594563
594562
|
}
|
|
594564
594563
|
async getLastBlock() {
|
|
594565
594564
|
const { block_height } = await this.aptosClient.getLedgerInfo();
|
|
@@ -594684,6 +594683,23 @@ var AptosAPI = class {
|
|
|
594684
594683
|
hash: block2.block_hash
|
|
594685
594684
|
};
|
|
594686
594685
|
}
|
|
594686
|
+
async getBalances(address4) {
|
|
594687
|
+
const response = await this.aptosClient.getCurrentFungibleAssetBalances({
|
|
594688
|
+
options: {
|
|
594689
|
+
offset: 0,
|
|
594690
|
+
limit: 1e3,
|
|
594691
|
+
where: {
|
|
594692
|
+
asset_type: { _eq: APTOS_ASSET_ID },
|
|
594693
|
+
// to return all asset balances (native / token) we should remove this filter
|
|
594694
|
+
owner_address: { _eq: address4 }
|
|
594695
|
+
}
|
|
594696
|
+
}
|
|
594697
|
+
});
|
|
594698
|
+
return response.map((x23) => ({
|
|
594699
|
+
asset_type: x23.asset_type ?? "-",
|
|
594700
|
+
amount: (0, import_bignumber55.default)(x23.amount)
|
|
594701
|
+
}));
|
|
594702
|
+
}
|
|
594687
594703
|
};
|
|
594688
594704
|
|
|
594689
594705
|
// ../../libs/coin-modules/coin-aptos/lib-es/network/index.js
|
|
@@ -661695,13 +661711,16 @@ var DmkSignerEth = class {
|
|
|
661695
661711
|
chainCode: result2.chainCode
|
|
661696
661712
|
};
|
|
661697
661713
|
}
|
|
661698
|
-
signTransaction(path4, rawTxHex,
|
|
661714
|
+
signTransaction(path4, rawTxHex, resolution) {
|
|
661699
661715
|
const buffer2 = e11(rawTxHex);
|
|
661700
661716
|
if (!buffer2) {
|
|
661701
661717
|
throw new Error("Invalid transaction");
|
|
661702
661718
|
}
|
|
661703
661719
|
return new import_rxjs32.Observable((observer) => {
|
|
661704
|
-
this.signer.signTransaction(path4, buffer2, {
|
|
661720
|
+
this.signer.signTransaction(path4, buffer2, {
|
|
661721
|
+
skipOpenApp: true,
|
|
661722
|
+
domain: resolution?.domains?.[0]?.domain
|
|
661723
|
+
}).observable.subscribe({
|
|
661705
661724
|
next: (result2) => {
|
|
661706
661725
|
if (result2.status === t40.Error) {
|
|
661707
661726
|
observer.error(this._mapError(result2.error));
|
|
@@ -661762,8 +661781,8 @@ var DmkSignerEth = class {
|
|
|
661762
661781
|
}
|
|
661763
661782
|
setLoadConfig(_config) {
|
|
661764
661783
|
}
|
|
661765
|
-
clearSignTransaction(path4, rawTxHex,
|
|
661766
|
-
return this.signTransaction(path4, rawTxHex);
|
|
661784
|
+
clearSignTransaction(path4, rawTxHex, resolutionConfig, _throwOnError) {
|
|
661785
|
+
return this.signTransaction(path4, rawTxHex, resolutionConfig);
|
|
661767
661786
|
}
|
|
661768
661787
|
signEIP712HashedMessage(_path, _domainSeparatorHex, _hashStructMessageHex) {
|
|
661769
661788
|
throw new Error("Method not implemented.");
|
|
@@ -699524,6 +699543,14 @@ async function calculateAmount2({ account: account3, transaction }) {
|
|
|
699524
699543
|
function base64ToUrlSafeBase64(data6) {
|
|
699525
699544
|
return data6.replace(/\//g, "_").replace(/\+/g, "-");
|
|
699526
699545
|
}
|
|
699546
|
+
function patchOperationWithExtra(operation, extra) {
|
|
699547
|
+
return {
|
|
699548
|
+
...operation,
|
|
699549
|
+
extra,
|
|
699550
|
+
subOperations: (operation.subOperations ?? []).map((op) => ({ ...op, extra })),
|
|
699551
|
+
nftOperations: (operation.nftOperations ?? []).map((op) => ({ ...op, extra }))
|
|
699552
|
+
};
|
|
699553
|
+
}
|
|
699527
699554
|
|
|
699528
699555
|
// ../../libs/coin-modules/coin-hedera/lib-es/bridge/getTransactionStatus.js
|
|
699529
699556
|
var getTransactionStatus8 = async (account3, transaction) => {
|
|
@@ -699675,7 +699702,7 @@ async function getOperationsForAccount(ledgerAccountId, address4, latestOperatio
|
|
|
699675
699702
|
const rawOperations = await getAccountTransactions2(address4, latestOperationTimestamp);
|
|
699676
699703
|
const operations = [];
|
|
699677
699704
|
for (const raw of rawOperations) {
|
|
699678
|
-
const { consensus_timestamp } = raw;
|
|
699705
|
+
const { consensus_timestamp, transaction_id } = raw;
|
|
699679
699706
|
const timestamp = new Date(parseInt(consensus_timestamp.split(".")[0], 10) * 1e3);
|
|
699680
699707
|
const senders = [];
|
|
699681
699708
|
const recipients = [];
|
|
@@ -699722,7 +699749,10 @@ async function getOperationsForAccount(ledgerAccountId, address4, latestOperatio
|
|
|
699722
699749
|
// Set a value just so that it's considered confirmed according to isConfirmedOperation
|
|
699723
699750
|
blockHeight: 5,
|
|
699724
699751
|
blockHash: null,
|
|
699725
|
-
extra: {
|
|
699752
|
+
extra: {
|
|
699753
|
+
consensusTimestamp: consensus_timestamp,
|
|
699754
|
+
transactionId: transaction_id
|
|
699755
|
+
},
|
|
699726
699756
|
fee,
|
|
699727
699757
|
hash: hash12,
|
|
699728
699758
|
recipients,
|
|
@@ -699850,7 +699880,13 @@ var broadcast9 = async ({ signedOperation }) => {
|
|
|
699850
699880
|
const response = await broadcastTransaction4(hederaTransaction);
|
|
699851
699881
|
const base64Hash = Buffer.from(response.transactionHash).toString("base64");
|
|
699852
699882
|
const base64HashUrlSafe = base64ToUrlSafeBase64(base64Hash);
|
|
699853
|
-
|
|
699883
|
+
const extra = {
|
|
699884
|
+
transactionId: response.transactionId.toString()
|
|
699885
|
+
};
|
|
699886
|
+
let patchedOperation = operation;
|
|
699887
|
+
patchedOperation = patchOperationWithHash(patchedOperation, base64HashUrlSafe);
|
|
699888
|
+
patchedOperation = patchOperationWithExtra(patchedOperation, extra);
|
|
699889
|
+
return patchedOperation;
|
|
699854
699890
|
};
|
|
699855
699891
|
|
|
699856
699892
|
// ../../libs/coin-modules/coin-hedera/lib-es/bridge/receive.js
|
|
@@ -777372,6 +777408,15 @@ var SWAP_DATA_CDN = {
|
|
|
777372
777408
|
mainUrl: "https://changelly.com/",
|
|
777373
777409
|
needsKYC: false
|
|
777374
777410
|
},
|
|
777411
|
+
changelly_v2: {
|
|
777412
|
+
type: "CEX",
|
|
777413
|
+
useInExchangeApp: true,
|
|
777414
|
+
displayName: "Changelly",
|
|
777415
|
+
termsOfUseUrl: "https://changelly.com/terms-of-use",
|
|
777416
|
+
supportUrl: "https://support.changelly.com/en/support/home",
|
|
777417
|
+
mainUrl: "https://changelly.com/",
|
|
777418
|
+
needsKYC: false
|
|
777419
|
+
},
|
|
777375
777420
|
cic: {
|
|
777376
777421
|
needsKYC: false,
|
|
777377
777422
|
displayName: "CIC",
|