@moly-mcp/lido 1.1.5 → 1.1.6

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 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
- privateKey = pk.trim() || null;
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
- privateKey = pk.trim() || null;
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
- privateKey = pk.trim() || null;
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-T6P233LY.js");
355
+ const { startChatSession } = await import("./session-TQ2F7RWC.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-NJPRW5QY.js");
435
+ const { runDaemon } = await import("./daemon-QQW5XDFW.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-34UYMKRX.js");
593
+ const { getTotalPosition } = await import("./position-7UQ3RE3M.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-T6P233LY.js");
604
+ const { startChatSession } = await import("./session-TQ2F7RWC.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-T6P233LY.js");
611
+ const { startChatSession } = await import("./session-TQ2F7RWC.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-T6P233LY.js");
683
+ const { startChatSession } = await import("./session-TQ2F7RWC.js");
630
684
  await startChatSession(cfg);
631
685
  } else {
632
686
  await startServer();
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  getRuntime
4
- } from "./chunk-Y3E5B4L2.js";
4
+ } from "./chunk-TISPNEN6.js";
5
5
 
6
6
  // src/tools/unstake.ts
7
7
  import { parseEther, formatEther } from "viem";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  applySettingsUpdate,
4
4
  getRuntime
5
- } from "./chunk-Y3E5B4L2.js";
5
+ } from "./chunk-TISPNEN6.js";
6
6
  import {
7
7
  loadConfig,
8
8
  redactedConfig
@@ -4,7 +4,7 @@ import {
4
4
  getBalance,
5
5
  getConversionRate,
6
6
  getRuntime
7
- } from "./chunk-Y3E5B4L2.js";
7
+ } from "./chunk-TISPNEN6.js";
8
8
 
9
9
  // src/tools/bridge.ts
10
10
  import { formatEther, parseEther, parseAbi } from "viem";
@@ -94,8 +94,9 @@ function buildRuntime() {
94
94
  _resolvedAccount = privateKeyToAccount(pk2);
95
95
  return _resolvedAccount;
96
96
  }
97
- const pk = config.privateKey;
98
- if (!pk) throw new Error("No key configured. Run: moly setup");
97
+ const rawKey = config.privateKey;
98
+ if (!rawKey) throw new Error("No key configured. Run: moly setup");
99
+ const pk = rawKey.startsWith("0x") ? rawKey : "0x" + rawKey;
99
100
  _resolvedAccount = privateKeyToAccount(pk);
100
101
  return _resolvedAccount;
101
102
  }
@@ -3,7 +3,7 @@ import {
3
3
  getProposals,
4
4
  getWithdrawalRequests,
5
5
  getWithdrawalStatus
6
- } from "./chunk-TZX6FGR2.js";
6
+ } from "./chunk-6ZOV6GSP.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-Y3E5B4L2.js";
17
+ } from "./chunk-TISPNEN6.js";
18
18
  import "./chunk-P6VFMSPM.js";
19
19
  import "./chunk-PDX44BCA.js";
20
20
 
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  getTotalPosition
4
- } from "./chunk-KQV7TVTQ.js";
5
- import "./chunk-Y3E5B4L2.js";
4
+ } from "./chunk-F4OVF3FT.js";
5
+ import "./chunk-TISPNEN6.js";
6
6
  import "./chunk-P6VFMSPM.js";
7
7
  import "./chunk-PDX44BCA.js";
8
8
  export {
@@ -3,7 +3,7 @@ import {
3
3
  getSettings,
4
4
  stakeEth,
5
5
  updateSettings
6
- } from "../chunk-LEW3UC2K.js";
6
+ } from "../chunk-DEQ35QKH.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-TZX6FGR2.js";
15
+ } from "../chunk-6ZOV6GSP.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-KQV7TVTQ.js";
29
+ } from "../chunk-F4OVF3FT.js";
30
30
  import {
31
31
  getBalance,
32
32
  getConversionRate,
33
33
  getRewards,
34
34
  unwrapWsteth,
35
35
  wrapSteth
36
- } from "../chunk-Y3E5B4L2.js";
36
+ } from "../chunk-TISPNEN6.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-LEW3UC2K.js";
6
+ } from "./chunk-DEQ35QKH.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-TZX6FGR2.js";
15
+ } from "./chunk-6ZOV6GSP.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-KQV7TVTQ.js";
29
+ } from "./chunk-F4OVF3FT.js";
30
30
  import {
31
31
  getBalance,
32
32
  getConversionRate,
33
33
  getRewards,
34
34
  unwrapWsteth,
35
35
  wrapSteth
36
- } from "./chunk-Y3E5B4L2.js";
36
+ } from "./chunk-TISPNEN6.js";
37
37
  import "./chunk-P6VFMSPM.js";
38
38
  import {
39
39
  loadBounds,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moly-mcp/lido",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "description": "Lido MCP Server — stake, unstake, wrap, govern. Works with Claude Desktop, Cursor, Windsurf, and any MCP client.",
5
5
  "license": "MIT",
6
6
  "type": "module",