@ledgerhq/live-cli 21.32.2-nightly.0
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/README.md +520 -0
- package/bin/index.js +2 -0
- package/lib/cli.d.ts +2 -0
- package/lib/cli.d.ts.map +1 -0
- package/lib/cli.js +137 -0
- package/lib/cli.js.map +1 -0
- package/lib/commands/app.d.ts +45 -0
- package/lib/commands/app.d.ts.map +1 -0
- package/lib/commands/app.js +131 -0
- package/lib/commands/app.js.map +1 -0
- package/lib/commands/appUninstallAll.d.ts +15 -0
- package/lib/commands/appUninstallAll.d.ts.map +1 -0
- package/lib/commands/appUninstallAll.js +31 -0
- package/lib/commands/appUninstallAll.js.map +1 -0
- package/lib/commands/appsCheckAllAppVersions.d.ts +20 -0
- package/lib/commands/appsCheckAllAppVersions.d.ts.map +1 -0
- package/lib/commands/appsCheckAllAppVersions.js +484 -0
- package/lib/commands/appsCheckAllAppVersions.js.map +1 -0
- package/lib/commands/appsInstallAll.d.ts +15 -0
- package/lib/commands/appsInstallAll.d.ts.map +1 -0
- package/lib/commands/appsInstallAll.js +34 -0
- package/lib/commands/appsInstallAll.js.map +1 -0
- package/lib/commands/appsUpdateTestAll.d.ts +20 -0
- package/lib/commands/appsUpdateTestAll.d.ts.map +1 -0
- package/lib/commands/appsUpdateTestAll.js +101 -0
- package/lib/commands/appsUpdateTestAll.js.map +1 -0
- package/lib/commands/balanceHistory.d.ts +50 -0
- package/lib/commands/balanceHistory.d.ts.map +1 -0
- package/lib/commands/balanceHistory.js +110 -0
- package/lib/commands/balanceHistory.js.map +1 -0
- package/lib/commands/bot.d.ts +12 -0
- package/lib/commands/bot.d.ts.map +1 -0
- package/lib/commands/bot.js +33 -0
- package/lib/commands/bot.js.map +1 -0
- package/lib/commands/botPortfolio.d.ts +15 -0
- package/lib/commands/botPortfolio.d.ts.map +1 -0
- package/lib/commands/botPortfolio.js +41 -0
- package/lib/commands/botPortfolio.js.map +1 -0
- package/lib/commands/botTransfer.d.ts +7 -0
- package/lib/commands/botTransfer.d.ts.map +1 -0
- package/lib/commands/botTransfer.js +376 -0
- package/lib/commands/botTransfer.js.map +1 -0
- package/lib/commands/broadcast.d.ts +42 -0
- package/lib/commands/broadcast.d.ts.map +1 -0
- package/lib/commands/broadcast.js +48 -0
- package/lib/commands/broadcast.js.map +1 -0
- package/lib/commands/cleanSpeculos.d.ts +7 -0
- package/lib/commands/cleanSpeculos.d.ts.map +1 -0
- package/lib/commands/cleanSpeculos.js +20 -0
- package/lib/commands/cleanSpeculos.js.map +1 -0
- package/lib/commands/countervalues.d.ts +84 -0
- package/lib/commands/countervalues.d.ts.map +1 -0
- package/lib/commands/countervalues.js +302 -0
- package/lib/commands/countervalues.js.map +1 -0
- package/lib/commands/derivation.d.ts +6 -0
- package/lib/commands/derivation.d.ts.map +1 -0
- package/lib/commands/derivation.js +44 -0
- package/lib/commands/derivation.js.map +1 -0
- package/lib/commands/devDeviceAppsScenario.d.ts +24 -0
- package/lib/commands/devDeviceAppsScenario.d.ts.map +1 -0
- package/lib/commands/devDeviceAppsScenario.js +97 -0
- package/lib/commands/devDeviceAppsScenario.js.map +1 -0
- package/lib/commands/deviceAppVersion.d.ts +19 -0
- package/lib/commands/deviceAppVersion.d.ts.map +1 -0
- package/lib/commands/deviceAppVersion.js +17 -0
- package/lib/commands/deviceAppVersion.js.map +1 -0
- package/lib/commands/deviceInfo.d.ts +14 -0
- package/lib/commands/deviceInfo.d.ts.map +1 -0
- package/lib/commands/deviceInfo.js +17 -0
- package/lib/commands/deviceInfo.js.map +1 -0
- package/lib/commands/deviceVersion.d.ts +14 -0
- package/lib/commands/deviceVersion.d.ts.map +1 -0
- package/lib/commands/deviceVersion.js +17 -0
- package/lib/commands/deviceVersion.js.map +1 -0
- package/lib/commands/discoverDevices.d.ts +23 -0
- package/lib/commands/discoverDevices.d.ts.map +1 -0
- package/lib/commands/discoverDevices.js +86 -0
- package/lib/commands/discoverDevices.js.map +1 -0
- package/lib/commands/envs.d.ts +7 -0
- package/lib/commands/envs.d.ts.map +1 -0
- package/lib/commands/envs.js +15 -0
- package/lib/commands/envs.js.map +1 -0
- package/lib/commands/estimateMaxSpendable.d.ts +41 -0
- package/lib/commands/estimateMaxSpendable.d.ts.map +1 -0
- package/lib/commands/estimateMaxSpendable.js +65 -0
- package/lib/commands/estimateMaxSpendable.js.map +1 -0
- package/lib/commands/exportAccounts.d.ts +48 -0
- package/lib/commands/exportAccounts.d.ts.map +1 -0
- package/lib/commands/exportAccounts.js +69 -0
- package/lib/commands/exportAccounts.js.map +1 -0
- package/lib/commands/firmwareRepair.d.ts +22 -0
- package/lib/commands/firmwareRepair.d.ts.map +1 -0
- package/lib/commands/firmwareRepair.js +23 -0
- package/lib/commands/firmwareRepair.js.map +1 -0
- package/lib/commands/firmwareUpdate.d.ts +26 -0
- package/lib/commands/firmwareUpdate.d.ts.map +1 -0
- package/lib/commands/firmwareUpdate.js +154 -0
- package/lib/commands/firmwareUpdate.js.map +1 -0
- package/lib/commands/generateAppJsonFromDataset.d.ts +7 -0
- package/lib/commands/generateAppJsonFromDataset.d.ts.map +1 -0
- package/lib/commands/generateAppJsonFromDataset.js +212 -0
- package/lib/commands/generateAppJsonFromDataset.js.map +1 -0
- package/lib/commands/generateTestScanAccounts.d.ts +49 -0
- package/lib/commands/generateTestScanAccounts.d.ts.map +1 -0
- package/lib/commands/generateTestScanAccounts.js +60 -0
- package/lib/commands/generateTestScanAccounts.js.map +1 -0
- package/lib/commands/generateTestTransaction.d.ts +44 -0
- package/lib/commands/generateTestTransaction.d.ts.map +1 -0
- package/lib/commands/generateTestTransaction.js +118 -0
- package/lib/commands/generateTestTransaction.js.map +1 -0
- package/lib/commands/genuineCheck.d.ts +15 -0
- package/lib/commands/genuineCheck.d.ts.map +1 -0
- package/lib/commands/genuineCheck.js +22 -0
- package/lib/commands/genuineCheck.js.map +1 -0
- package/lib/commands/getAddress.d.ts +28 -0
- package/lib/commands/getAddress.d.ts.map +1 -0
- package/lib/commands/getAddress.js +53 -0
- package/lib/commands/getAddress.js.map +1 -0
- package/lib/commands/getTransactionStatus.d.ts +52 -0
- package/lib/commands/getTransactionStatus.d.ts.map +1 -0
- package/lib/commands/getTransactionStatus.js +86 -0
- package/lib/commands/getTransactionStatus.js.map +1 -0
- package/lib/commands/liveData.d.ts +49 -0
- package/lib/commands/liveData.d.ts.map +1 -0
- package/lib/commands/liveData.js +82 -0
- package/lib/commands/liveData.js.map +1 -0
- package/lib/commands/makeCompoundSummary.d.ts +54 -0
- package/lib/commands/makeCompoundSummary.d.ts.map +1 -0
- package/lib/commands/makeCompoundSummary.js +190 -0
- package/lib/commands/makeCompoundSummary.js.map +1 -0
- package/lib/commands/managerListApps.d.ts +21 -0
- package/lib/commands/managerListApps.d.ts.map +1 -0
- package/lib/commands/managerListApps.js +47 -0
- package/lib/commands/managerListApps.js.map +1 -0
- package/lib/commands/portfolio.d.ts +66 -0
- package/lib/commands/portfolio.d.ts.map +1 -0
- package/lib/commands/portfolio.js +138 -0
- package/lib/commands/portfolio.js.map +1 -0
- package/lib/commands/proxy.d.ts +36 -0
- package/lib/commands/proxy.d.ts.map +1 -0
- package/lib/commands/proxy.js +413 -0
- package/lib/commands/proxy.js.map +1 -0
- package/lib/commands/receive.d.ts +48 -0
- package/lib/commands/receive.d.ts.map +1 -0
- package/lib/commands/receive.js +68 -0
- package/lib/commands/receive.js.map +1 -0
- package/lib/commands/repl.d.ts +22 -0
- package/lib/commands/repl.d.ts.map +1 -0
- package/lib/commands/repl.js +26 -0
- package/lib/commands/repl.js.map +1 -0
- package/lib/commands/satstack.d.ts +37 -0
- package/lib/commands/satstack.d.ts.map +1 -0
- package/lib/commands/satstack.js +110 -0
- package/lib/commands/satstack.js.map +1 -0
- package/lib/commands/satstackStatus.d.ts +13 -0
- package/lib/commands/satstackStatus.d.ts.map +1 -0
- package/lib/commands/satstackStatus.js +24 -0
- package/lib/commands/satstackStatus.js.map +1 -0
- package/lib/commands/scanDescriptors.d.ts +15 -0
- package/lib/commands/scanDescriptors.d.ts.map +1 -0
- package/lib/commands/scanDescriptors.js +18 -0
- package/lib/commands/scanDescriptors.js.map +1 -0
- package/lib/commands/send.d.ts +48 -0
- package/lib/commands/send.d.ts.map +1 -0
- package/lib/commands/send.js +116 -0
- package/lib/commands/send.js.map +1 -0
- package/lib/commands/signMessage.d.ts +16 -0
- package/lib/commands/signMessage.d.ts.map +1 -0
- package/lib/commands/signMessage.js +58 -0
- package/lib/commands/signMessage.js.map +1 -0
- package/lib/commands/speculosList.d.ts +7 -0
- package/lib/commands/speculosList.d.ts.map +1 -0
- package/lib/commands/speculosList.js +71 -0
- package/lib/commands/speculosList.js.map +1 -0
- package/lib/commands/swap.d.ts +55 -0
- package/lib/commands/swap.d.ts.map +1 -0
- package/lib/commands/swap.js +341 -0
- package/lib/commands/swap.js.map +1 -0
- package/lib/commands/sync.d.ts +49 -0
- package/lib/commands/sync.d.ts.map +1 -0
- package/lib/commands/sync.js +135 -0
- package/lib/commands/sync.js.map +1 -0
- package/lib/commands/testDetectOpCollision.d.ts +41 -0
- package/lib/commands/testDetectOpCollision.d.ts.map +1 -0
- package/lib/commands/testDetectOpCollision.js +57 -0
- package/lib/commands/testDetectOpCollision.js.map +1 -0
- package/lib/commands/testGetTrustedInputFromTxHash.d.ts +23 -0
- package/lib/commands/testGetTrustedInputFromTxHash.d.ts.map +1 -0
- package/lib/commands/testGetTrustedInputFromTxHash.js +114 -0
- package/lib/commands/testGetTrustedInputFromTxHash.js.map +1 -0
- package/lib/commands/user.d.ts +6 -0
- package/lib/commands/user.d.ts.map +1 -0
- package/lib/commands/user.js +9 -0
- package/lib/commands/user.js.map +1 -0
- package/lib/commands/version.d.ts +7 -0
- package/lib/commands/version.d.ts.map +1 -0
- package/lib/commands/version.js +12 -0
- package/lib/commands/version.js.map +1 -0
- package/lib/commands/walletconnect.d.ts +62 -0
- package/lib/commands/walletconnect.d.ts.map +1 -0
- package/lib/commands/walletconnect.js +272 -0
- package/lib/commands/walletconnect.js.map +1 -0
- package/lib/commands-index.d.ts +1511 -0
- package/lib/commands-index.d.ts.map +1 -0
- package/lib/commands-index.js +106 -0
- package/lib/commands-index.js.map +1 -0
- package/lib/live-common-setup-base.d.ts +2 -0
- package/lib/live-common-setup-base.d.ts.map +1 -0
- package/lib/live-common-setup-base.js +131 -0
- package/lib/live-common-setup-base.js.map +1 -0
- package/lib/live-common-setup.d.ts +5 -0
- package/lib/live-common-setup.d.ts.map +1 -0
- package/lib/live-common-setup.js +318 -0
- package/lib/live-common-setup.js.map +1 -0
- package/lib/qr.d.ts +3 -0
- package/lib/qr.d.ts.map +1 -0
- package/lib/qr.js +18 -0
- package/lib/qr.js.map +1 -0
- package/lib/scan.d.ts +71 -0
- package/lib/scan.d.ts.map +1 -0
- package/lib/scan.js +299 -0
- package/lib/scan.js.map +1 -0
- package/lib/signedOperation.d.ts +13 -0
- package/lib/signedOperation.d.ts.map +1 -0
- package/lib/signedOperation.js +31 -0
- package/lib/signedOperation.js.map +1 -0
- package/lib/stream.d.ts +7 -0
- package/lib/stream.d.ts.map +1 -0
- package/lib/stream.js +82 -0
- package/lib/stream.js.map +1 -0
- package/lib/transaction.d.ts +31 -0
- package/lib/transaction.d.ts.map +1 -0
- package/lib/transaction.js +202 -0
- package/lib/transaction.js.map +1 -0
- package/package.json +63 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import type { ScanCommonOpts } from "../scan";
|
|
3
|
+
import type { InferTransactionsOpts } from "../transaction";
|
|
4
|
+
declare const _default: {
|
|
5
|
+
description: string;
|
|
6
|
+
args: ({
|
|
7
|
+
name: string;
|
|
8
|
+
alias: string;
|
|
9
|
+
type: StringConstructor;
|
|
10
|
+
desc: string;
|
|
11
|
+
} | {
|
|
12
|
+
name: string;
|
|
13
|
+
alias: string;
|
|
14
|
+
type: NumberConstructor;
|
|
15
|
+
desc: string;
|
|
16
|
+
multiple?: undefined;
|
|
17
|
+
typeDesc?: undefined;
|
|
18
|
+
} | {
|
|
19
|
+
name: string;
|
|
20
|
+
type: NumberConstructor;
|
|
21
|
+
desc: string;
|
|
22
|
+
multiple?: undefined;
|
|
23
|
+
typeDesc?: undefined;
|
|
24
|
+
alias?: undefined;
|
|
25
|
+
} | {
|
|
26
|
+
name: string;
|
|
27
|
+
type: BooleanConstructor;
|
|
28
|
+
desc: string;
|
|
29
|
+
multiple?: undefined;
|
|
30
|
+
} | {
|
|
31
|
+
name: string;
|
|
32
|
+
type: StringConstructor;
|
|
33
|
+
desc: string;
|
|
34
|
+
multiple: boolean;
|
|
35
|
+
} | {
|
|
36
|
+
name: string;
|
|
37
|
+
type: StringConstructor;
|
|
38
|
+
desc: string;
|
|
39
|
+
multiple?: undefined;
|
|
40
|
+
} | {
|
|
41
|
+
name: string;
|
|
42
|
+
alias: string;
|
|
43
|
+
type: StringConstructor;
|
|
44
|
+
typeDesc: string;
|
|
45
|
+
desc: string;
|
|
46
|
+
})[];
|
|
47
|
+
job: (opts: ScanCommonOpts & InferTransactionsOpts & {
|
|
48
|
+
format: string;
|
|
49
|
+
}) => Observable<any>;
|
|
50
|
+
};
|
|
51
|
+
export default _default;
|
|
52
|
+
//# sourceMappingURL=getTransactionStatus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getTransactionStatus.d.ts","sourceRoot":"","sources":["../../src/commands/getTransactionStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,UAAU,EAAE,MAAM,MAAM,CAAC;AAS3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAgClD,cAAc,GAClB,qBAAqB,GAAG;QACtB,MAAM,EAAE,MAAM,CAAC;KAChB;;AAlBP,wBAqDE"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
3
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
4
|
+
if (!m) return o;
|
|
5
|
+
var i = m.call(o), r, ar = [], e;
|
|
6
|
+
try {
|
|
7
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
8
|
+
}
|
|
9
|
+
catch (error) { e = { error: error }; }
|
|
10
|
+
finally {
|
|
11
|
+
try {
|
|
12
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
13
|
+
}
|
|
14
|
+
finally { if (e) throw e.error; }
|
|
15
|
+
}
|
|
16
|
+
return ar;
|
|
17
|
+
};
|
|
18
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
19
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
20
|
+
if (ar || !(i in from)) {
|
|
21
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
22
|
+
ar[i] = from[i];
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
26
|
+
};
|
|
27
|
+
exports.__esModule = true;
|
|
28
|
+
var rxjs_1 = require("rxjs");
|
|
29
|
+
var operators_1 = require("rxjs/operators");
|
|
30
|
+
var transaction_1 = require("@ledgerhq/live-common/lib/transaction");
|
|
31
|
+
var scan_1 = require("../scan");
|
|
32
|
+
var transaction_2 = require("../transaction");
|
|
33
|
+
var getTransactionStatusFormatters = {
|
|
34
|
+
"default": function (_a) {
|
|
35
|
+
var status = _a.status, transaction = _a.transaction, account = _a.account;
|
|
36
|
+
return "TRANSACTION " +
|
|
37
|
+
((0, transaction_1.formatTransaction)(transaction, account) ||
|
|
38
|
+
JSON.stringify((0, transaction_1.toTransactionRaw)(transaction))) +
|
|
39
|
+
"\n" +
|
|
40
|
+
"STATUS " +
|
|
41
|
+
(0, transaction_1.formatTransactionStatus)(transaction, status, account);
|
|
42
|
+
},
|
|
43
|
+
json: function (_a) {
|
|
44
|
+
var status = _a.status, transaction = _a.transaction;
|
|
45
|
+
return "TRANSACTION " +
|
|
46
|
+
JSON.stringify((0, transaction_1.toTransactionRaw)(transaction)) +
|
|
47
|
+
"\n" +
|
|
48
|
+
"STATUS " +
|
|
49
|
+
JSON.stringify((0, transaction_1.toTransactionStatusRaw)(status));
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
exports["default"] = {
|
|
53
|
+
description: "Prepare a transaction and returns 'TransactionStatus' meta information",
|
|
54
|
+
args: __spreadArray(__spreadArray(__spreadArray([], __read(scan_1.scanCommonOpts), false), __read(transaction_2.inferTransactionsOpts), false), [
|
|
55
|
+
{
|
|
56
|
+
name: "format",
|
|
57
|
+
alias: "f",
|
|
58
|
+
type: String,
|
|
59
|
+
typeDesc: Object.keys(getTransactionStatusFormatters).join(" | "),
|
|
60
|
+
desc: "how to display the data"
|
|
61
|
+
},
|
|
62
|
+
], false),
|
|
63
|
+
job: function (opts) {
|
|
64
|
+
return (0, scan_1.scan)(opts).pipe((0, operators_1.concatMap)(function (account) {
|
|
65
|
+
return (0, rxjs_1.from)((0, transaction_2.inferTransactions)(account, opts)).pipe((0, operators_1.mergeMap)(function (inferred) {
|
|
66
|
+
return inferred.reduce(function (acc, _a) {
|
|
67
|
+
var _b = __read(_a, 2), transaction = _b[0], status = _b[1];
|
|
68
|
+
return (0, rxjs_1.concat)(acc, (0, rxjs_1.of)({
|
|
69
|
+
transaction: transaction,
|
|
70
|
+
status: status,
|
|
71
|
+
account: account
|
|
72
|
+
}));
|
|
73
|
+
}, rxjs_1.EMPTY);
|
|
74
|
+
}), (0, operators_1.map)(function (e) {
|
|
75
|
+
var f = getTransactionStatusFormatters[opts.format || "default"];
|
|
76
|
+
if (!f) {
|
|
77
|
+
throw new Error("getTransactionStatusFormatters: no such formatter '" +
|
|
78
|
+
opts.format +
|
|
79
|
+
"'");
|
|
80
|
+
}
|
|
81
|
+
return f(e);
|
|
82
|
+
}));
|
|
83
|
+
}));
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
//# sourceMappingURL=getTransactionStatus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getTransactionStatus.js","sourceRoot":"","sources":["../../src/commands/getTransactionStatus.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6BAA2D;AAC3D,4CAA0D;AAC1D,qEAK+C;AAC/C,gCAA+C;AAG/C,8CAA0E;AAC1E,IAAM,8BAA8B,GAAG;IACrC,SAAO,EAAE,UAAC,EAAgC;YAA9B,MAAM,YAAA,EAAE,WAAW,iBAAA,EAAE,OAAO,aAAA;QACtC,OAAA,cAAc;YACd,CAAC,IAAA,+BAAiB,EAAC,WAAW,EAAE,OAAO,CAAC;gBACtC,IAAI,CAAC,SAAS,CAAC,IAAA,8BAAgB,EAAC,WAAW,CAAC,CAAC,CAAC;YAChD,IAAI;YACJ,SAAS;YACT,IAAA,qCAAuB,EAAC,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC;IALrD,CAKqD;IACvD,IAAI,EAAE,UAAC,EAAuB;YAArB,MAAM,YAAA,EAAE,WAAW,iBAAA;QAC1B,OAAA,cAAc;YACd,IAAI,CAAC,SAAS,CAAC,IAAA,8BAAgB,EAAC,WAAW,CAAC,CAAC;YAC7C,IAAI;YACJ,SAAS;YACT,IAAI,CAAC,SAAS,CAAC,IAAA,oCAAsB,EAAC,MAAM,CAAC,CAAC;IAJ9C,CAI8C;CACjD,CAAC;AACF,qBAAe;IACb,WAAW,EACT,wEAAwE;IAC1E,IAAI,uDACC,qBAAc,kBACd,mCAAqB;QACxB;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,GAAG;YACV,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;YACjE,IAAI,EAAE,yBAAyB;SAChC;aACF;IACD,GAAG,EAAE,UACH,IAGG;QAEH,OAAA,IAAA,WAAI,EAAC,IAAI,CAAC,CAAC,IAAI,CACb,IAAA,qBAAS,EAAC,UAAC,OAAO;YAChB,OAAA,IAAA,WAAI,EAAC,IAAA,+BAAiB,EAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CACzC,IAAA,oBAAQ,EAAC,UAAC,QAAQ;gBAChB,OAAA,QAAQ,CAAC,MAAM,CACb,UAAC,GAAG,EAAE,EAAqB;wBAArB,KAAA,aAAqB,EAApB,WAAW,QAAA,EAAE,MAAM,QAAA;oBACxB,OAAA,IAAA,aAAM,EACJ,GAAG,EACH,IAAA,SAAE,EAAC;wBACD,WAAW,aAAA;wBACX,MAAM,QAAA;wBACN,OAAO,SAAA;qBACR,CAAC,CACH;gBAPD,CAOC,EACH,YAAwB,CACzB;YAXD,CAWC,CACF,EACD,IAAA,eAAG,EAAC,UAAC,CAAC;gBACJ,IAAM,CAAC,GAAG,8BAA8B,CAAC,IAAI,CAAC,MAAM,IAAI,SAAS,CAAC,CAAC;gBAEnE,IAAI,CAAC,CAAC,EAAE;oBACN,MAAM,IAAI,KAAK,CACb,qDAAqD;wBACnD,IAAI,CAAC,MAAM;wBACX,GAAG,CACN,CAAC;iBACH;gBAED,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;YACd,CAAC,CAAC,CACH;QA5BD,CA4BC,CACF,CACF;IAhCD,CAgCC;CACJ,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { ScanCommonOpts } from "../scan";
|
|
2
|
+
declare const _default: {
|
|
3
|
+
description: string;
|
|
4
|
+
args: ({
|
|
5
|
+
name: string;
|
|
6
|
+
alias: string;
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
desc: string;
|
|
9
|
+
} | {
|
|
10
|
+
name: string;
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
desc: string;
|
|
13
|
+
multiple: boolean;
|
|
14
|
+
typeDesc?: undefined;
|
|
15
|
+
alias?: undefined;
|
|
16
|
+
} | {
|
|
17
|
+
name: string;
|
|
18
|
+
type: StringConstructor;
|
|
19
|
+
typeDesc: string;
|
|
20
|
+
desc: string;
|
|
21
|
+
multiple?: undefined;
|
|
22
|
+
alias?: undefined;
|
|
23
|
+
} | {
|
|
24
|
+
name: string;
|
|
25
|
+
alias: string;
|
|
26
|
+
type: NumberConstructor;
|
|
27
|
+
desc: string;
|
|
28
|
+
multiple?: undefined;
|
|
29
|
+
typeDesc?: undefined;
|
|
30
|
+
} | {
|
|
31
|
+
name: string;
|
|
32
|
+
type: NumberConstructor;
|
|
33
|
+
desc: string;
|
|
34
|
+
multiple?: undefined;
|
|
35
|
+
typeDesc?: undefined;
|
|
36
|
+
alias?: undefined;
|
|
37
|
+
} | {
|
|
38
|
+
name: string;
|
|
39
|
+
alias: string;
|
|
40
|
+
type: BooleanConstructor;
|
|
41
|
+
desc: string;
|
|
42
|
+
})[];
|
|
43
|
+
job: (opts: ScanCommonOpts & Partial<{
|
|
44
|
+
appjson: string;
|
|
45
|
+
add: boolean;
|
|
46
|
+
}>) => import("rxjs").Observable<string>;
|
|
47
|
+
};
|
|
48
|
+
export default _default;
|
|
49
|
+
//# sourceMappingURL=liveData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"liveData.d.ts","sourceRoot":"","sources":["../../src/commands/liveData.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAqBpC,cAAc,GAClB,QAAQ;QACN,OAAO,EAAE,MAAM,CAAC;QAChB,GAAG,EAAE,OAAO,CAAC;KACd,CAAC;;AAtBR,wBA6DE"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
3
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
4
|
+
if (!m) return o;
|
|
5
|
+
var i = m.call(o), r, ar = [], e;
|
|
6
|
+
try {
|
|
7
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
8
|
+
}
|
|
9
|
+
catch (error) { e = { error: error }; }
|
|
10
|
+
finally {
|
|
11
|
+
try {
|
|
12
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
13
|
+
}
|
|
14
|
+
finally { if (e) throw e.error; }
|
|
15
|
+
}
|
|
16
|
+
return ar;
|
|
17
|
+
};
|
|
18
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
19
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
20
|
+
if (ar || !(i in from)) {
|
|
21
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
22
|
+
ar[i] = from[i];
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
26
|
+
};
|
|
27
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
28
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
29
|
+
};
|
|
30
|
+
exports.__esModule = true;
|
|
31
|
+
var rxjs_1 = require("rxjs");
|
|
32
|
+
var operators_1 = require("rxjs/operators");
|
|
33
|
+
var fs_1 = __importDefault(require("fs"));
|
|
34
|
+
var scan_1 = require("../scan");
|
|
35
|
+
var serialization_1 = require("@ledgerhq/live-common/lib/account/serialization");
|
|
36
|
+
exports["default"] = {
|
|
37
|
+
description: "utility for Ledger Live app.json file",
|
|
38
|
+
args: __spreadArray(__spreadArray([], __read(scan_1.scanCommonOpts), false), [
|
|
39
|
+
{
|
|
40
|
+
name: "appjson",
|
|
41
|
+
type: String,
|
|
42
|
+
typeDesc: "filename",
|
|
43
|
+
desc: "path to a live desktop app.json"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: "add",
|
|
47
|
+
alias: "a",
|
|
48
|
+
type: Boolean,
|
|
49
|
+
desc: "add accounts to live data"
|
|
50
|
+
},
|
|
51
|
+
], false),
|
|
52
|
+
job: function (opts) {
|
|
53
|
+
return (0, scan_1.scan)(opts).pipe((0, operators_1.reduce)(function (accounts, account) { return accounts.concat(account); }, []), (0, operators_1.mergeMap)(function (accounts) {
|
|
54
|
+
var appjsondata = opts.appjson
|
|
55
|
+
? JSON.parse(fs_1["default"].readFileSync(opts.appjson, "utf-8"))
|
|
56
|
+
: {
|
|
57
|
+
data: {
|
|
58
|
+
accounts: []
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
if (typeof appjsondata.data.accounts === "string") {
|
|
62
|
+
return (0, rxjs_1.throwError)(new Error("encrypted ledger live data is not supported"));
|
|
63
|
+
}
|
|
64
|
+
var existingIds = appjsondata.data.accounts.map(function (a) { return a.data.id; });
|
|
65
|
+
var append = accounts
|
|
66
|
+
.filter(function (a) { return !existingIds.includes(a.id); })
|
|
67
|
+
.map(function (account) { return ({
|
|
68
|
+
data: (0, serialization_1.toAccountRaw)(account),
|
|
69
|
+
version: 1
|
|
70
|
+
}); });
|
|
71
|
+
appjsondata.data.accounts = appjsondata.data.accounts.concat(append);
|
|
72
|
+
if (opts.appjson) {
|
|
73
|
+
fs_1["default"].writeFileSync(opts.appjson, JSON.stringify(appjsondata), "utf-8");
|
|
74
|
+
return (0, rxjs_1.of)(append.length + " accounts added.");
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
return (0, rxjs_1.of)(JSON.stringify(appjsondata));
|
|
78
|
+
}
|
|
79
|
+
}));
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
//# sourceMappingURL=liveData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"liveData.js","sourceRoot":"","sources":["../../src/commands/liveData.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA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AAQ,CAAC,CAAC,CAAC,EAAE,CAAC,EAA3B,CAA2B,CAAC;iBAC1C,GAAG,CAAC,UAAC,OAAO,IAAK,OAAA,CAAC;gBACjB,IAAI,EAAE,IAAA,4BAAY,EAAC,OAAO,CAAC;gBAC3B,OAAO,EAAE,CAAC;aACX,CAAC,EAHgB,CAGhB,CAAC,CAAC;YACN,WAAW,CAAC,IAAI,CAAC,QAAQ,GAAG,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YAErE,IAAI,IAAI,CAAC,OAAO,EAAE;gBAChB,eAAE,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC,CAAC;gBACrE,OAAO,IAAA,SAAE,EAAC,MAAM,CAAC,MAAM,GAAG,kBAAkB,CAAC,CAAC;aAC/C;iBAAM;gBACL,OAAO,IAAA,SAAE,EAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC;aACxC;QACH,CAAC,CAAC,CACH;IApCD,CAoCC;CACJ,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { CompoundAccountSummary } from "@ledgerhq/live-common/lib/compound/types";
|
|
2
|
+
import type { ScanCommonOpts } from "../scan";
|
|
3
|
+
declare const compoundSummaryFormatter: {
|
|
4
|
+
summary: (summary: CompoundAccountSummary) => string;
|
|
5
|
+
default: (summary: CompoundAccountSummary) => string;
|
|
6
|
+
};
|
|
7
|
+
declare const _default: {
|
|
8
|
+
description: string;
|
|
9
|
+
args: ({
|
|
10
|
+
name: string;
|
|
11
|
+
alias: string;
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
desc: string;
|
|
14
|
+
} | {
|
|
15
|
+
name: string;
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
desc: string;
|
|
18
|
+
multiple: boolean;
|
|
19
|
+
typeDesc?: undefined;
|
|
20
|
+
alias?: undefined;
|
|
21
|
+
} | {
|
|
22
|
+
name: string;
|
|
23
|
+
type: StringConstructor;
|
|
24
|
+
typeDesc: string;
|
|
25
|
+
desc: string;
|
|
26
|
+
multiple?: undefined;
|
|
27
|
+
alias?: undefined;
|
|
28
|
+
} | {
|
|
29
|
+
name: string;
|
|
30
|
+
alias: string;
|
|
31
|
+
type: NumberConstructor;
|
|
32
|
+
desc: string;
|
|
33
|
+
multiple?: undefined;
|
|
34
|
+
typeDesc?: undefined;
|
|
35
|
+
} | {
|
|
36
|
+
name: string;
|
|
37
|
+
type: NumberConstructor;
|
|
38
|
+
desc: string;
|
|
39
|
+
multiple?: undefined;
|
|
40
|
+
typeDesc?: undefined;
|
|
41
|
+
alias?: undefined;
|
|
42
|
+
} | {
|
|
43
|
+
name: string;
|
|
44
|
+
alias: string;
|
|
45
|
+
type: StringConstructor;
|
|
46
|
+
typeDesc: string;
|
|
47
|
+
desc: string;
|
|
48
|
+
})[];
|
|
49
|
+
job: (opts: ScanCommonOpts & {
|
|
50
|
+
format: keyof typeof compoundSummaryFormatter;
|
|
51
|
+
}) => import("rxjs").Observable<string>;
|
|
52
|
+
};
|
|
53
|
+
export default _default;
|
|
54
|
+
//# sourceMappingURL=makeCompoundSummary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"makeCompoundSummary.d.ts","sourceRoot":"","sources":["../../src/commands/makeCompoundSummary.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,sBAAsB,EAEvB,MAAM,0CAA0C,CAAC;AAQlD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAgH9C,QAAA,MAAM,wBAAwB;uBACT,sBAAsB,KAAG,MAAM;uBA6B/B,sBAAsB,KAAG,MAAM;CAUnD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAcQ,cAAc,GAAG;QACrB,MAAM,EAAE,MAAM,+BAA+B,CAAC;KAC/C;;AAfL,wBAiCE"}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
14
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
15
|
+
if (!m) return o;
|
|
16
|
+
var i = m.call(o), r, ar = [], e;
|
|
17
|
+
try {
|
|
18
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
19
|
+
}
|
|
20
|
+
catch (error) { e = { error: error }; }
|
|
21
|
+
finally {
|
|
22
|
+
try {
|
|
23
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
24
|
+
}
|
|
25
|
+
finally { if (e) throw e.error; }
|
|
26
|
+
}
|
|
27
|
+
return ar;
|
|
28
|
+
};
|
|
29
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
30
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
31
|
+
if (ar || !(i in from)) {
|
|
32
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
33
|
+
ar[i] = from[i];
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
37
|
+
};
|
|
38
|
+
exports.__esModule = true;
|
|
39
|
+
var operators_1 = require("rxjs/operators");
|
|
40
|
+
var currencies_1 = require("@ledgerhq/live-common/lib/currencies");
|
|
41
|
+
var logic_1 = require("@ledgerhq/live-common/lib/compound/logic");
|
|
42
|
+
var scan_1 = require("../scan");
|
|
43
|
+
var formatDate = function (date) {
|
|
44
|
+
var ye = new Intl.DateTimeFormat("en", {
|
|
45
|
+
year: "numeric"
|
|
46
|
+
}).format(date);
|
|
47
|
+
var mo = new Intl.DateTimeFormat("en", {
|
|
48
|
+
month: "short"
|
|
49
|
+
}).format(date);
|
|
50
|
+
var da = new Intl.DateTimeFormat("en", {
|
|
51
|
+
day: "2-digit"
|
|
52
|
+
}).format(date);
|
|
53
|
+
return "".concat(da, "-").concat(mo, "-").concat(ye);
|
|
54
|
+
};
|
|
55
|
+
var createLoanHeader = function (summary, strings, account, parentAccount) {
|
|
56
|
+
var totalSupplied = summary.totalSupplied, allTimeEarned = summary.allTimeEarned, status = summary.status;
|
|
57
|
+
strings.push("\n");
|
|
58
|
+
strings.push("Compound Summary for account ".concat(parentAccount ? parentAccount.id : account ? account.id : ""));
|
|
59
|
+
strings.push("\n");
|
|
60
|
+
if (status) {
|
|
61
|
+
strings.push("Status: ".concat(status));
|
|
62
|
+
strings.push("\n");
|
|
63
|
+
}
|
|
64
|
+
strings.push("-------------------------------");
|
|
65
|
+
strings.push("\n");
|
|
66
|
+
strings.push("".concat(account.token.ticker, " supplied").padStart(16));
|
|
67
|
+
strings.push(" | ");
|
|
68
|
+
strings.push("".concat(account.token.ticker, " earned").padStart(16));
|
|
69
|
+
strings.push(" | ");
|
|
70
|
+
strings.push("\n");
|
|
71
|
+
strings.push("".concat((0, currencies_1.formatCurrencyUnit)(account.token.units[0], totalSupplied)).padStart(16));
|
|
72
|
+
strings.push(" | ");
|
|
73
|
+
strings.push("".concat((0, currencies_1.formatCurrencyUnit)(account.token.units[0], allTimeEarned)).padStart(16));
|
|
74
|
+
strings.push(" | ");
|
|
75
|
+
strings.push("\n");
|
|
76
|
+
strings.push("-------------------------------");
|
|
77
|
+
strings.push("\n");
|
|
78
|
+
return strings;
|
|
79
|
+
};
|
|
80
|
+
var createLoanDisplay = function (loans, strings, title, account) {
|
|
81
|
+
strings.push(title);
|
|
82
|
+
strings.push("\n");
|
|
83
|
+
strings.push("Starting Date".padStart(16));
|
|
84
|
+
strings.push(" | ");
|
|
85
|
+
strings.push("Ending Date".padStart(16));
|
|
86
|
+
strings.push(" | ");
|
|
87
|
+
strings.push("".concat(account.token.ticker).padStart(16));
|
|
88
|
+
strings.push(" | ");
|
|
89
|
+
strings.push("".concat(account.token.ticker, " Earned").padStart(16));
|
|
90
|
+
strings.push(" | ");
|
|
91
|
+
strings.push("Interests Accrued (%)".padStart(22));
|
|
92
|
+
strings.push(" | ");
|
|
93
|
+
strings.push("\n");
|
|
94
|
+
loans.forEach(function (_a) {
|
|
95
|
+
var startingDate = _a.startingDate,
|
|
96
|
+
// @ts-expect-error composite type, endDate doesn't exist on one subtype
|
|
97
|
+
endDate = _a.endDate, amountSupplied = _a.amountSupplied, interestsEarned = _a.interestsEarned, percentageEarned = _a.percentageEarned;
|
|
98
|
+
strings.push(formatDate(startingDate).padStart(16));
|
|
99
|
+
strings.push(" | ");
|
|
100
|
+
strings.push((endDate ? formatDate(endDate) : "-").padStart(16));
|
|
101
|
+
strings.push(" | ");
|
|
102
|
+
strings.push("".concat((0, currencies_1.formatCurrencyUnit)(account.token.units[0], amountSupplied)).padStart(16));
|
|
103
|
+
strings.push(" | ");
|
|
104
|
+
strings.push("".concat((0, currencies_1.formatCurrencyUnit)(account.token.units[0], interestsEarned)).padStart(16));
|
|
105
|
+
strings.push(" | ");
|
|
106
|
+
strings.push("".concat(Math.round(percentageEarned * 100) / 100).padStart(22));
|
|
107
|
+
strings.push(" | ");
|
|
108
|
+
strings.push("\n");
|
|
109
|
+
});
|
|
110
|
+
strings.push("-------------------------------");
|
|
111
|
+
strings.push("\n");
|
|
112
|
+
return strings;
|
|
113
|
+
};
|
|
114
|
+
var compoundSummaryFormatter = {
|
|
115
|
+
summary: function (summary) {
|
|
116
|
+
if (!summary)
|
|
117
|
+
return "";
|
|
118
|
+
var account = summary.account, totalSupplied = summary.totalSupplied, allTimeEarned = summary.allTimeEarned, accruedInterests = summary.accruedInterests, opened = summary.opened, closed = summary.closed;
|
|
119
|
+
return JSON.stringify({
|
|
120
|
+
accountId: account.id,
|
|
121
|
+
totalSupplied: totalSupplied.toString(),
|
|
122
|
+
allTimeEarned: allTimeEarned.toString(),
|
|
123
|
+
accruedInterests: accruedInterests.toString(),
|
|
124
|
+
opened: opened.map(function (_a) {
|
|
125
|
+
var op = __rest(_a, []);
|
|
126
|
+
return ({
|
|
127
|
+
startingDate: op.startingDate.toString(),
|
|
128
|
+
interestsEarned: op.interestsEarned.toString(),
|
|
129
|
+
amountSupplied: op.amountSupplied.toString(),
|
|
130
|
+
percentageEarned: op.percentageEarned.toString()
|
|
131
|
+
});
|
|
132
|
+
}),
|
|
133
|
+
closed: closed.map(function (_a) {
|
|
134
|
+
var op = __rest(_a, []);
|
|
135
|
+
return ({
|
|
136
|
+
startingDate: op.startingDate.toString(),
|
|
137
|
+
amountSupplied: op.amountSupplied.toString(),
|
|
138
|
+
interestsEarned: op.interestsEarned.toString(),
|
|
139
|
+
percentageEarned: op.percentageEarned.toString()
|
|
140
|
+
});
|
|
141
|
+
})
|
|
142
|
+
});
|
|
143
|
+
},
|
|
144
|
+
"default": function (summary) {
|
|
145
|
+
var opened = summary.opened, closed = summary.closed, account = summary.account, parentAccount = summary.parentAccount;
|
|
146
|
+
if (opened.length === 0 && closed.length === 0)
|
|
147
|
+
return "";
|
|
148
|
+
if (account.type !== "TokenAccount")
|
|
149
|
+
return "";
|
|
150
|
+
var strings = [];
|
|
151
|
+
createLoanHeader(summary, strings, account, parentAccount);
|
|
152
|
+
createLoanDisplay(opened, strings, "OPENED LOANS", account);
|
|
153
|
+
createLoanDisplay(closed, strings, "CLOSED LOANS", account);
|
|
154
|
+
return strings.join("");
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
exports["default"] = {
|
|
158
|
+
description: "Create a summary of compound operations (ETH)",
|
|
159
|
+
args: __spreadArray(__spreadArray([], __read(scan_1.scanCommonOpts), false), [
|
|
160
|
+
{
|
|
161
|
+
name: "format",
|
|
162
|
+
alias: "f",
|
|
163
|
+
type: String,
|
|
164
|
+
typeDesc: Object.keys(compoundSummaryFormatter).join(" | "),
|
|
165
|
+
desc: "how to display the data"
|
|
166
|
+
},
|
|
167
|
+
], false),
|
|
168
|
+
job: function (opts) {
|
|
169
|
+
return (0, scan_1.scan)(opts).pipe((0, operators_1.map)(function (account) {
|
|
170
|
+
var _a;
|
|
171
|
+
var result = [];
|
|
172
|
+
if (!((_a = account === null || account === void 0 ? void 0 : account.subAccounts) === null || _a === void 0 ? void 0 : _a.length))
|
|
173
|
+
return "";
|
|
174
|
+
var formatter = compoundSummaryFormatter[opts.format || "default"];
|
|
175
|
+
account.subAccounts.forEach(function (s) {
|
|
176
|
+
if (s.type !== "TokenAccount")
|
|
177
|
+
return;
|
|
178
|
+
if (!(0, currencies_1.findCompoundToken)(s.token))
|
|
179
|
+
return;
|
|
180
|
+
var sum = (0, logic_1.makeCompoundSummaryForAccount)(s, account);
|
|
181
|
+
if (!sum)
|
|
182
|
+
return;
|
|
183
|
+
var summary = formatter(sum);
|
|
184
|
+
result.push(summary);
|
|
185
|
+
});
|
|
186
|
+
return result.join("");
|
|
187
|
+
}));
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
//# sourceMappingURL=makeCompoundSummary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"makeCompoundSummary.js","sourceRoot":"","sources":["../../src/commands/makeCompoundSummary.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAAqC;AAKrC,mEAG8C;AAC9C,kEAAyF;AAEzF,gCAA+C;AAG/C,IAAM,UAAU,GAAG,UAAC,IAAU;IAC5B,IAAM,EAAE,GAA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,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC,CAAC,CAAC;YACH,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACzB,CAAC,CAAC,CACH;IAfD,CAeC;CACJ,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
description: string;
|
|
3
|
+
args: ({
|
|
4
|
+
name: string;
|
|
5
|
+
alias: string;
|
|
6
|
+
type: StringConstructor;
|
|
7
|
+
descOpt: string;
|
|
8
|
+
desc: string;
|
|
9
|
+
} | {
|
|
10
|
+
name: string;
|
|
11
|
+
alias: string;
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
typeDesc: string;
|
|
14
|
+
})[];
|
|
15
|
+
job: ({ device, format, }: Partial<{
|
|
16
|
+
device: string;
|
|
17
|
+
format: string;
|
|
18
|
+
}>) => import("rxjs").Observable<any>;
|
|
19
|
+
};
|
|
20
|
+
export default _default;
|
|
21
|
+
//# sourceMappingURL=managerListApps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"managerListApps.d.ts","sourceRoot":"","sources":["../../src/commands/managerListApps.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;gBAqBY,MAAM;gBACN,MAAM;;;AAhBlB,wBA6CE"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
exports.__esModule = true;
|
|
6
|
+
var rxjs_1 = require("rxjs");
|
|
7
|
+
var operators_1 = require("rxjs/operators");
|
|
8
|
+
var deviceAccess_1 = require("@ledgerhq/live-common/lib/hw/deviceAccess");
|
|
9
|
+
var getDeviceInfo_1 = __importDefault(require("@ledgerhq/live-common/lib/hw/getDeviceInfo"));
|
|
10
|
+
var hw_1 = require("@ledgerhq/live-common/lib/apps/hw");
|
|
11
|
+
var scan_1 = require("../scan");
|
|
12
|
+
exports["default"] = {
|
|
13
|
+
description: "List apps that can be installed on the device",
|
|
14
|
+
args: [
|
|
15
|
+
scan_1.deviceOpt,
|
|
16
|
+
{
|
|
17
|
+
name: "format",
|
|
18
|
+
alias: "f",
|
|
19
|
+
type: String,
|
|
20
|
+
typeDesc: "raw | json | default"
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
job: function (_a) {
|
|
24
|
+
var device = _a.device, format = _a.format;
|
|
25
|
+
return (0, deviceAccess_1.withDevice)(device || "")(function (t) {
|
|
26
|
+
return (0, rxjs_1.from)((0, getDeviceInfo_1["default"])(t)).pipe((0, operators_1.mergeMap)(function (deviceInfo) {
|
|
27
|
+
return (0, hw_1.listApps)(t, deviceInfo).pipe((0, operators_1.filter)(function (e) { return e.type === "result"; }),
|
|
28
|
+
// @ts-expect-error we need better typings and safe guard to infer types
|
|
29
|
+
(0, operators_1.map)(function (e) { return e.result; }));
|
|
30
|
+
}), (0, operators_1.map)(function (r) {
|
|
31
|
+
return format === "raw"
|
|
32
|
+
? r
|
|
33
|
+
: format === "json"
|
|
34
|
+
? JSON.stringify(r)
|
|
35
|
+
: r.appsListNames
|
|
36
|
+
.map(function (name) {
|
|
37
|
+
var item = r.appByName[name];
|
|
38
|
+
var ins = r.installed.find(function (i) { return i.name === item.name; });
|
|
39
|
+
return ("- ".concat(item.name, " ").concat(item.version) +
|
|
40
|
+
(ins ? (ins.updated ? " (installed)" : " (outdated!)") : ""));
|
|
41
|
+
})
|
|
42
|
+
.join("\n");
|
|
43
|
+
}));
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=managerListApps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"managerListApps.js","sourceRoot":"","sources":["../../src/commands/managerListApps.ts"],"names":[],"mappings":";;;;;AAAA,6BAA4B;AAC5B,4CAAuD;AACvD,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