@moly-mcp/lido 1.1.5 → 1.1.7
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 +63 -9
- package/dist/{chunk-TZX6FGR2.js → chunk-4VFTMLNC.js} +1 -1
- package/dist/{chunk-LEW3UC2K.js → chunk-EGPNTAOB.js} +1 -1
- package/dist/{chunk-KQV7TVTQ.js → chunk-M5H5IPOL.js} +1 -1
- package/dist/{chunk-Y3E5B4L2.js → chunk-RMJKM6MY.js} +11 -3
- package/dist/{daemon-NJPRW5QY.js → daemon-7RRWSIRO.js} +2 -2
- package/dist/{position-34UYMKRX.js → position-KAQOSX2P.js} +2 -2
- package/dist/server/index.js +4 -4
- package/dist/{session-T6P233LY.js → session-3DBQ42LL.js} +4 -4
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -227,7 +227,8 @@ async function runWizard() {
|
|
|
227
227
|
const pk = check(
|
|
228
228
|
await password({ message: "Private key (0x...):", mask: "*" })
|
|
229
229
|
);
|
|
230
|
-
|
|
230
|
+
const t = pk.trim();
|
|
231
|
+
privateKey = t ? t.startsWith("0x") ? t : "0x" + t : null;
|
|
231
232
|
}
|
|
232
233
|
} else {
|
|
233
234
|
const passphrase = check(
|
|
@@ -266,7 +267,8 @@ async function runWizard() {
|
|
|
266
267
|
const pk = check(
|
|
267
268
|
await password({ message: "Private key (0x...):", mask: "*" })
|
|
268
269
|
);
|
|
269
|
-
|
|
270
|
+
const t = pk.trim();
|
|
271
|
+
privateKey = t ? t.startsWith("0x") ? t : "0x" + t : null;
|
|
270
272
|
}
|
|
271
273
|
}
|
|
272
274
|
} else if (keySource === "raw") {
|
|
@@ -276,7 +278,8 @@ async function runWizard() {
|
|
|
276
278
|
mask: "*"
|
|
277
279
|
})
|
|
278
280
|
);
|
|
279
|
-
|
|
281
|
+
const trimmed = pk.trim();
|
|
282
|
+
privateKey = trimmed ? trimmed.startsWith("0x") ? trimmed : "0x" + trimmed : null;
|
|
280
283
|
}
|
|
281
284
|
const providerChoice = check(
|
|
282
285
|
await select({
|
|
@@ -349,7 +352,7 @@ async function main() {
|
|
|
349
352
|
case "setup": {
|
|
350
353
|
const { cfg, terminalMode } = await runWizard();
|
|
351
354
|
if (terminalMode) {
|
|
352
|
-
const { startChatSession } = await import("./session-
|
|
355
|
+
const { startChatSession } = await import("./session-3DBQ42LL.js");
|
|
353
356
|
await startChatSession(cfg);
|
|
354
357
|
} else {
|
|
355
358
|
await startServer();
|
|
@@ -429,7 +432,7 @@ async function main() {
|
|
|
429
432
|
console.log("No config. Run: moly setup");
|
|
430
433
|
process.exit(1);
|
|
431
434
|
}
|
|
432
|
-
const { runDaemon } = await import("./daemon-
|
|
435
|
+
const { runDaemon } = await import("./daemon-7RRWSIRO.js");
|
|
433
436
|
await runDaemon();
|
|
434
437
|
break;
|
|
435
438
|
}
|
|
@@ -587,7 +590,7 @@ async function main() {
|
|
|
587
590
|
console.log("No config. Run: moly setup");
|
|
588
591
|
process.exit(1);
|
|
589
592
|
}
|
|
590
|
-
const { getTotalPosition } = await import("./position-
|
|
593
|
+
const { getTotalPosition } = await import("./position-KAQOSX2P.js");
|
|
591
594
|
const address = args[1];
|
|
592
595
|
const pos = await getTotalPosition(address);
|
|
593
596
|
console.log(JSON.stringify(pos, null, 2));
|
|
@@ -598,18 +601,69 @@ async function main() {
|
|
|
598
601
|
if (!configExists()) {
|
|
599
602
|
const { cfg, terminalMode } = await runWizard();
|
|
600
603
|
if (terminalMode) {
|
|
601
|
-
const { startChatSession } = await import("./session-
|
|
604
|
+
const { startChatSession } = await import("./session-3DBQ42LL.js");
|
|
602
605
|
await startChatSession(cfg);
|
|
603
606
|
} else {
|
|
604
607
|
await startServer();
|
|
605
608
|
}
|
|
606
609
|
} else {
|
|
607
610
|
const cfg = loadConfig();
|
|
608
|
-
const { startChatSession } = await import("./session-
|
|
611
|
+
const { startChatSession } = await import("./session-3DBQ42LL.js");
|
|
609
612
|
await startChatSession(cfg);
|
|
610
613
|
}
|
|
611
614
|
break;
|
|
612
615
|
}
|
|
616
|
+
// ── moly --help / help / -h ─────────────────────────────────────────
|
|
617
|
+
case "--help":
|
|
618
|
+
case "-h":
|
|
619
|
+
case "help": {
|
|
620
|
+
console.log(`
|
|
621
|
+
moly \u2014 Lido MCP Server CLI
|
|
622
|
+
|
|
623
|
+
Commands:
|
|
624
|
+
setup Run the setup wizard
|
|
625
|
+
config Show current configuration
|
|
626
|
+
reset Delete configuration
|
|
627
|
+
terminal Start interactive chat session
|
|
628
|
+
--server Start MCP server (used in AI client configs)
|
|
629
|
+
|
|
630
|
+
alert Manage price/balance alerts
|
|
631
|
+
add <cond> Add alert (e.g. "eth_below 2000")
|
|
632
|
+
list List active alerts
|
|
633
|
+
remove <id> Remove alert by ID
|
|
634
|
+
channels Configure alert channels
|
|
635
|
+
start Start alert daemon in background
|
|
636
|
+
|
|
637
|
+
monitor Daemon management
|
|
638
|
+
start Start monitor daemon
|
|
639
|
+
status Show daemon status
|
|
640
|
+
stop Stop daemon
|
|
641
|
+
|
|
642
|
+
bounds Transaction safety bounds
|
|
643
|
+
show Show current bounds
|
|
644
|
+
set Set bounds (flags: --max-stake-per-tx, --max-daily-stake, --min-eth-reserve)
|
|
645
|
+
reset Reset to defaults
|
|
646
|
+
|
|
647
|
+
ledger Transaction history
|
|
648
|
+
list List entries (--tool, --since, --limit)
|
|
649
|
+
stats Show statistics
|
|
650
|
+
export Export (--format json|csv)
|
|
651
|
+
|
|
652
|
+
position [addr] Show total staking position
|
|
653
|
+
|
|
654
|
+
help, --help Show this help
|
|
655
|
+
--version Show version
|
|
656
|
+
`);
|
|
657
|
+
break;
|
|
658
|
+
}
|
|
659
|
+
// ── moly --version / -v ──────────────────────────────────────────
|
|
660
|
+
case "--version":
|
|
661
|
+
case "-v": {
|
|
662
|
+
const { createRequire } = await import("module");
|
|
663
|
+
const pkg = createRequire(import.meta.url)("../package.json");
|
|
664
|
+
console.log(`@moly-mcp/lido v${pkg.version}`);
|
|
665
|
+
break;
|
|
666
|
+
}
|
|
613
667
|
// ── moly --server (force-start, used in AI client configs) ────────
|
|
614
668
|
case "--server": {
|
|
615
669
|
if (!configExists()) {
|
|
@@ -626,7 +680,7 @@ async function main() {
|
|
|
626
680
|
if (!configExists()) {
|
|
627
681
|
const { cfg, terminalMode } = await runWizard();
|
|
628
682
|
if (terminalMode) {
|
|
629
|
-
const { startChatSession } = await import("./session-
|
|
683
|
+
const { startChatSession } = await import("./session-3DBQ42LL.js");
|
|
630
684
|
await startChatSession(cfg);
|
|
631
685
|
} else {
|
|
632
686
|
await startServer();
|
|
@@ -89,13 +89,21 @@ function buildRuntime() {
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
if (!owsSdk) throw new Error("OWS SDK not installed. Run: npm install -g @open-wallet-standard/core");
|
|
92
|
-
const
|
|
92
|
+
const exported = owsSdk.exportWallet(config.ows.walletName, config.ows.passphrase ?? void 0);
|
|
93
|
+
let keyHex;
|
|
94
|
+
try {
|
|
95
|
+
const parsed = JSON.parse(exported);
|
|
96
|
+
keyHex = parsed.secp256k1 ?? parsed;
|
|
97
|
+
} catch {
|
|
98
|
+
keyHex = exported;
|
|
99
|
+
}
|
|
93
100
|
const pk2 = keyHex.startsWith("0x") ? keyHex : "0x" + keyHex;
|
|
94
101
|
_resolvedAccount = privateKeyToAccount(pk2);
|
|
95
102
|
return _resolvedAccount;
|
|
96
103
|
}
|
|
97
|
-
const
|
|
98
|
-
if (!
|
|
104
|
+
const rawKey = config.privateKey;
|
|
105
|
+
if (!rawKey) throw new Error("No key configured. Run: moly setup");
|
|
106
|
+
const pk = rawKey.startsWith("0x") ? rawKey : "0x" + rawKey;
|
|
99
107
|
_resolvedAccount = privateKeyToAccount(pk);
|
|
100
108
|
return _resolvedAccount;
|
|
101
109
|
}
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
getProposals,
|
|
4
4
|
getWithdrawalRequests,
|
|
5
5
|
getWithdrawalStatus
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-4VFTMLNC.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-RMJKM6MY.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-EGPNTAOB.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-4VFTMLNC.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-M5H5IPOL.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-RMJKM6MY.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-EGPNTAOB.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-4VFTMLNC.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-M5H5IPOL.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-RMJKM6MY.js";
|
|
37
37
|
import "./chunk-P6VFMSPM.js";
|
|
38
38
|
import {
|
|
39
39
|
loadBounds,
|
package/package.json
CHANGED