@moly-mcp/lido 1.1.2 → 1.1.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/dist/bin.js +17 -9
- package/dist/{chunk-LRR663PB.js → chunk-27PRUUR7.js} +1 -1
- package/dist/{chunk-ZX6OYPKV.js → chunk-A27W633R.js} +1 -1
- package/dist/{chunk-C7R33HEF.js → chunk-D5JID4WC.js} +1 -1
- package/dist/{chunk-WMGNTYBF.js → chunk-XSQE6QAD.js} +8 -1
- package/dist/{daemon-RZA4HEUI.js → daemon-XWJQH7IB.js} +2 -2
- package/dist/{position-ANCFIWD6.js → position-WDLPRIE7.js} +2 -2
- package/dist/server/index.js +4 -4
- package/dist/{session-ZIAXZNTD.js → session-52D3R73Y.js} +4 -4
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -161,11 +161,19 @@ async function runWizard() {
|
|
|
161
161
|
s.start("Installing @open-wallet-standard/core...");
|
|
162
162
|
try {
|
|
163
163
|
const { execSync } = await import("child_process");
|
|
164
|
-
|
|
164
|
+
const { homedir } = await import("os");
|
|
165
|
+
const { join } = await import("path");
|
|
166
|
+
const { mkdirSync, existsSync } = await import("fs");
|
|
167
|
+
const owsDir = join(homedir(), ".moly");
|
|
168
|
+
if (!existsSync(owsDir)) mkdirSync(owsDir, { recursive: true });
|
|
169
|
+
if (!existsSync(join(owsDir, "package.json"))) {
|
|
170
|
+
execSync("npm init -y", { stdio: "pipe", cwd: owsDir });
|
|
171
|
+
}
|
|
172
|
+
execSync("npm install @open-wallet-standard/core", { stdio: "pipe", cwd: owsDir });
|
|
165
173
|
s.stop("OWS SDK installed.");
|
|
166
174
|
const { createRequire: cr } = await import("module");
|
|
167
|
-
const
|
|
168
|
-
owsSdk =
|
|
175
|
+
const owsRequire = cr(join(owsDir, "package.json"));
|
|
176
|
+
owsSdk = owsRequire("@open-wallet-standard/core");
|
|
169
177
|
wallets = owsSdk.listWallets();
|
|
170
178
|
} catch (installErr) {
|
|
171
179
|
s.stop("Auto-install failed: " + installErr.message);
|
|
@@ -293,7 +301,7 @@ async function main() {
|
|
|
293
301
|
case "setup": {
|
|
294
302
|
const { cfg, terminalMode } = await runWizard();
|
|
295
303
|
if (terminalMode) {
|
|
296
|
-
const { startChatSession } = await import("./session-
|
|
304
|
+
const { startChatSession } = await import("./session-52D3R73Y.js");
|
|
297
305
|
await startChatSession(cfg);
|
|
298
306
|
} else {
|
|
299
307
|
await startServer();
|
|
@@ -373,7 +381,7 @@ async function main() {
|
|
|
373
381
|
console.log("No config. Run: moly setup");
|
|
374
382
|
process.exit(1);
|
|
375
383
|
}
|
|
376
|
-
const { runDaemon } = await import("./daemon-
|
|
384
|
+
const { runDaemon } = await import("./daemon-XWJQH7IB.js");
|
|
377
385
|
await runDaemon();
|
|
378
386
|
break;
|
|
379
387
|
}
|
|
@@ -531,7 +539,7 @@ async function main() {
|
|
|
531
539
|
console.log("No config. Run: moly setup");
|
|
532
540
|
process.exit(1);
|
|
533
541
|
}
|
|
534
|
-
const { getTotalPosition } = await import("./position-
|
|
542
|
+
const { getTotalPosition } = await import("./position-WDLPRIE7.js");
|
|
535
543
|
const address = args[1];
|
|
536
544
|
const pos = await getTotalPosition(address);
|
|
537
545
|
console.log(JSON.stringify(pos, null, 2));
|
|
@@ -542,14 +550,14 @@ async function main() {
|
|
|
542
550
|
if (!configExists()) {
|
|
543
551
|
const { cfg, terminalMode } = await runWizard();
|
|
544
552
|
if (terminalMode) {
|
|
545
|
-
const { startChatSession } = await import("./session-
|
|
553
|
+
const { startChatSession } = await import("./session-52D3R73Y.js");
|
|
546
554
|
await startChatSession(cfg);
|
|
547
555
|
} else {
|
|
548
556
|
await startServer();
|
|
549
557
|
}
|
|
550
558
|
} else {
|
|
551
559
|
const cfg = loadConfig();
|
|
552
|
-
const { startChatSession } = await import("./session-
|
|
560
|
+
const { startChatSession } = await import("./session-52D3R73Y.js");
|
|
553
561
|
await startChatSession(cfg);
|
|
554
562
|
}
|
|
555
563
|
break;
|
|
@@ -570,7 +578,7 @@ async function main() {
|
|
|
570
578
|
if (!configExists()) {
|
|
571
579
|
const { cfg, terminalMode } = await runWizard();
|
|
572
580
|
if (terminalMode) {
|
|
573
|
-
const { startChatSession } = await import("./session-
|
|
581
|
+
const { startChatSession } = await import("./session-52D3R73Y.js");
|
|
574
582
|
await startChatSession(cfg);
|
|
575
583
|
} else {
|
|
576
584
|
await startServer();
|
|
@@ -10,6 +10,8 @@ import { mainnet, base, arbitrum } from "viem/chains";
|
|
|
10
10
|
import { privateKeyToAccount } from "viem/accounts";
|
|
11
11
|
import { LidoSDK } from "@lidofinance/lido-ethereum-sdk";
|
|
12
12
|
import { createRequire } from "module";
|
|
13
|
+
import { join } from "path";
|
|
14
|
+
import { homedir } from "os";
|
|
13
15
|
|
|
14
16
|
// src/config/types.ts
|
|
15
17
|
var L2_CHAINS = {
|
|
@@ -77,7 +79,12 @@ function buildRuntime() {
|
|
|
77
79
|
try {
|
|
78
80
|
owsSdk = _require("@open-wallet-standard/core");
|
|
79
81
|
} catch {
|
|
80
|
-
|
|
82
|
+
try {
|
|
83
|
+
const molyRequire = createRequire(join(homedir(), ".moly", "package.json"));
|
|
84
|
+
owsSdk = molyRequire("@open-wallet-standard/core");
|
|
85
|
+
} catch {
|
|
86
|
+
throw new Error("OWS SDK not installed. Run: moly setup and select OWS Wallet");
|
|
87
|
+
}
|
|
81
88
|
}
|
|
82
89
|
const exported = owsSdk.exportWallet(config.ows.walletName, config.ows.passphrase);
|
|
83
90
|
const keyHex = exported.secp256k1 ?? exported;
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
getProposals,
|
|
4
4
|
getWithdrawalRequests,
|
|
5
5
|
getWithdrawalStatus
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-D5JID4WC.js";
|
|
7
7
|
import {
|
|
8
8
|
loadAlerts,
|
|
9
9
|
loadChannelConfig,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
getConversionRate,
|
|
15
15
|
getRewards,
|
|
16
16
|
getRuntime
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-XSQE6QAD.js";
|
|
18
18
|
import "./chunk-P6VFMSPM.js";
|
|
19
19
|
import "./chunk-PDX44BCA.js";
|
|
20
20
|
|
package/dist/server/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
getSettings,
|
|
4
4
|
stakeEth,
|
|
5
5
|
updateSettings
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-A27W633R.js";
|
|
7
7
|
import {
|
|
8
8
|
castVote,
|
|
9
9
|
claimWithdrawals,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
getWithdrawalRequests,
|
|
13
13
|
getWithdrawalStatus,
|
|
14
14
|
requestWithdrawal
|
|
15
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-D5JID4WC.js";
|
|
16
16
|
import {
|
|
17
17
|
configureAlertChannels,
|
|
18
18
|
listAlerts,
|
|
@@ -26,14 +26,14 @@ import {
|
|
|
26
26
|
getBridgeStatus,
|
|
27
27
|
getL2Balance,
|
|
28
28
|
getTotalPosition
|
|
29
|
-
} from "../chunk-
|
|
29
|
+
} from "../chunk-27PRUUR7.js";
|
|
30
30
|
import {
|
|
31
31
|
getBalance,
|
|
32
32
|
getConversionRate,
|
|
33
33
|
getRewards,
|
|
34
34
|
unwrapWsteth,
|
|
35
35
|
wrapSteth
|
|
36
|
-
} from "../chunk-
|
|
36
|
+
} from "../chunk-XSQE6QAD.js";
|
|
37
37
|
import {
|
|
38
38
|
loadConfig
|
|
39
39
|
} from "../chunk-P6VFMSPM.js";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
getSettings,
|
|
4
4
|
stakeEth,
|
|
5
5
|
updateSettings
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-A27W633R.js";
|
|
7
7
|
import {
|
|
8
8
|
castVote,
|
|
9
9
|
claimWithdrawals,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
getWithdrawalRequests,
|
|
13
13
|
getWithdrawalStatus,
|
|
14
14
|
requestWithdrawal
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-D5JID4WC.js";
|
|
16
16
|
import {
|
|
17
17
|
configureAlertChannels,
|
|
18
18
|
listAlerts,
|
|
@@ -26,14 +26,14 @@ import {
|
|
|
26
26
|
getBridgeStatus,
|
|
27
27
|
getL2Balance,
|
|
28
28
|
getTotalPosition
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-27PRUUR7.js";
|
|
30
30
|
import {
|
|
31
31
|
getBalance,
|
|
32
32
|
getConversionRate,
|
|
33
33
|
getRewards,
|
|
34
34
|
unwrapWsteth,
|
|
35
35
|
wrapSteth
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-XSQE6QAD.js";
|
|
37
37
|
import "./chunk-P6VFMSPM.js";
|
|
38
38
|
import {
|
|
39
39
|
loadBounds,
|
package/package.json
CHANGED