@ledgerhq/live-cli 24.18.4-nightly.1 → 24.18.4-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 +49 -7
- package/package.json +3 -3
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.2",
|
|
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.2",
|
|
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
|
|
@@ -699524,6 +699540,14 @@ async function calculateAmount2({ account: account3, transaction }) {
|
|
|
699524
699540
|
function base64ToUrlSafeBase64(data6) {
|
|
699525
699541
|
return data6.replace(/\//g, "_").replace(/\+/g, "-");
|
|
699526
699542
|
}
|
|
699543
|
+
function patchOperationWithExtra(operation, extra) {
|
|
699544
|
+
return {
|
|
699545
|
+
...operation,
|
|
699546
|
+
extra,
|
|
699547
|
+
subOperations: (operation.subOperations ?? []).map((op) => ({ ...op, extra })),
|
|
699548
|
+
nftOperations: (operation.nftOperations ?? []).map((op) => ({ ...op, extra }))
|
|
699549
|
+
};
|
|
699550
|
+
}
|
|
699527
699551
|
|
|
699528
699552
|
// ../../libs/coin-modules/coin-hedera/lib-es/bridge/getTransactionStatus.js
|
|
699529
699553
|
var getTransactionStatus8 = async (account3, transaction) => {
|
|
@@ -699675,7 +699699,7 @@ async function getOperationsForAccount(ledgerAccountId, address4, latestOperatio
|
|
|
699675
699699
|
const rawOperations = await getAccountTransactions2(address4, latestOperationTimestamp);
|
|
699676
699700
|
const operations = [];
|
|
699677
699701
|
for (const raw of rawOperations) {
|
|
699678
|
-
const { consensus_timestamp } = raw;
|
|
699702
|
+
const { consensus_timestamp, transaction_id } = raw;
|
|
699679
699703
|
const timestamp = new Date(parseInt(consensus_timestamp.split(".")[0], 10) * 1e3);
|
|
699680
699704
|
const senders = [];
|
|
699681
699705
|
const recipients = [];
|
|
@@ -699722,7 +699746,10 @@ async function getOperationsForAccount(ledgerAccountId, address4, latestOperatio
|
|
|
699722
699746
|
// Set a value just so that it's considered confirmed according to isConfirmedOperation
|
|
699723
699747
|
blockHeight: 5,
|
|
699724
699748
|
blockHash: null,
|
|
699725
|
-
extra: {
|
|
699749
|
+
extra: {
|
|
699750
|
+
consensusTimestamp: consensus_timestamp,
|
|
699751
|
+
transactionId: transaction_id
|
|
699752
|
+
},
|
|
699726
699753
|
fee,
|
|
699727
699754
|
hash: hash12,
|
|
699728
699755
|
recipients,
|
|
@@ -699850,7 +699877,13 @@ var broadcast9 = async ({ signedOperation }) => {
|
|
|
699850
699877
|
const response = await broadcastTransaction4(hederaTransaction);
|
|
699851
699878
|
const base64Hash = Buffer.from(response.transactionHash).toString("base64");
|
|
699852
699879
|
const base64HashUrlSafe = base64ToUrlSafeBase64(base64Hash);
|
|
699853
|
-
|
|
699880
|
+
const extra = {
|
|
699881
|
+
transactionId: response.transactionId.toString()
|
|
699882
|
+
};
|
|
699883
|
+
let patchedOperation = operation;
|
|
699884
|
+
patchedOperation = patchOperationWithHash(patchedOperation, base64HashUrlSafe);
|
|
699885
|
+
patchedOperation = patchOperationWithExtra(patchedOperation, extra);
|
|
699886
|
+
return patchedOperation;
|
|
699854
699887
|
};
|
|
699855
699888
|
|
|
699856
699889
|
// ../../libs/coin-modules/coin-hedera/lib-es/bridge/receive.js
|
|
@@ -777372,6 +777405,15 @@ var SWAP_DATA_CDN = {
|
|
|
777372
777405
|
mainUrl: "https://changelly.com/",
|
|
777373
777406
|
needsKYC: false
|
|
777374
777407
|
},
|
|
777408
|
+
changelly_v2: {
|
|
777409
|
+
type: "CEX",
|
|
777410
|
+
useInExchangeApp: true,
|
|
777411
|
+
displayName: "Changelly",
|
|
777412
|
+
termsOfUseUrl: "https://changelly.com/terms-of-use",
|
|
777413
|
+
supportUrl: "https://support.changelly.com/en/support/home",
|
|
777414
|
+
mainUrl: "https://changelly.com/",
|
|
777415
|
+
needsKYC: false
|
|
777416
|
+
},
|
|
777375
777417
|
cic: {
|
|
777376
777418
|
needsKYC: false,
|
|
777377
777419
|
displayName: "CIC",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/live-cli",
|
|
3
|
-
"version": "24.18.4-nightly.
|
|
3
|
+
"version": "24.18.4-nightly.2",
|
|
4
4
|
"description": "ledger-live CLI version",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
"@types/ws": "8.5.10",
|
|
56
56
|
"ts-node": "10.9.2",
|
|
57
57
|
"tsup": "7.3.0",
|
|
58
|
-
"@ledgerhq/types-
|
|
59
|
-
"@ledgerhq/types-
|
|
58
|
+
"@ledgerhq/types-live": "^6.71.0-nightly.1",
|
|
59
|
+
"@ledgerhq/types-cryptoassets": "^7.23.0"
|
|
60
60
|
},
|
|
61
61
|
"publishConfig": {
|
|
62
62
|
"directory": "dist"
|