@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 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
- execSync("npm install -g @open-wallet-standard/core", { stdio: "pipe" });
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 _r = cr(import.meta.url);
168
- owsSdk = _r("@open-wallet-standard/core");
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-ZIAXZNTD.js");
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-RZA4HEUI.js");
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-ANCFIWD6.js");
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-ZIAXZNTD.js");
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-ZIAXZNTD.js");
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-ZIAXZNTD.js");
581
+ const { startChatSession } = await import("./session-52D3R73Y.js");
574
582
  await startChatSession(cfg);
575
583
  } else {
576
584
  await startServer();
@@ -4,7 +4,7 @@ import {
4
4
  getBalance,
5
5
  getConversionRate,
6
6
  getRuntime
7
- } from "./chunk-WMGNTYBF.js";
7
+ } from "./chunk-XSQE6QAD.js";
8
8
 
9
9
  // src/tools/bridge.ts
10
10
  import { formatEther, parseEther, parseAbi } from "viem";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  applySettingsUpdate,
4
4
  getRuntime
5
- } from "./chunk-WMGNTYBF.js";
5
+ } from "./chunk-XSQE6QAD.js";
6
6
  import {
7
7
  loadConfig,
8
8
  redactedConfig
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  getRuntime
4
- } from "./chunk-WMGNTYBF.js";
4
+ } from "./chunk-XSQE6QAD.js";
5
5
 
6
6
  // src/tools/unstake.ts
7
7
  import { parseEther, formatEther } from "viem";
@@ -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
- throw new Error("OWS SDK not installed. Run: npm install @open-wallet-standard/core");
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-C7R33HEF.js";
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-WMGNTYBF.js";
17
+ } from "./chunk-XSQE6QAD.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-LRR663PB.js";
5
- import "./chunk-WMGNTYBF.js";
4
+ } from "./chunk-27PRUUR7.js";
5
+ import "./chunk-XSQE6QAD.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-ZX6OYPKV.js";
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-C7R33HEF.js";
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-LRR663PB.js";
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-WMGNTYBF.js";
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-ZX6OYPKV.js";
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-C7R33HEF.js";
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-LRR663PB.js";
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-WMGNTYBF.js";
36
+ } from "./chunk-XSQE6QAD.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.2",
3
+ "version": "1.1.3",
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",