@moly-mcp/lido 1.1.1 → 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
@@ -157,7 +157,28 @@ async function runWizard() {
157
157
  owsSdk = _req("@open-wallet-standard/core");
158
158
  wallets = owsSdk.listWallets();
159
159
  } catch {
160
- note("OWS SDK not found. Install it first:\ncurl -fsSL https://openwallet.sh/install.sh | bash\nnpm install @open-wallet-standard/core\nFalling back to raw key storage.", "OWS not available");
160
+ const s = spinner();
161
+ s.start("Installing @open-wallet-standard/core...");
162
+ try {
163
+ const { execSync } = await import("child_process");
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 });
173
+ s.stop("OWS SDK installed.");
174
+ const { createRequire: cr } = await import("module");
175
+ const owsRequire = cr(join(owsDir, "package.json"));
176
+ owsSdk = owsRequire("@open-wallet-standard/core");
177
+ wallets = owsSdk.listWallets();
178
+ } catch (installErr) {
179
+ s.stop("Auto-install failed: " + installErr.message);
180
+ note("Could not install OWS SDK automatically.\nFalling back to raw key storage.", "OWS not available");
181
+ }
161
182
  }
162
183
  if (owsSdk && wallets.length > 0) {
163
184
  const walletName = check(
@@ -280,7 +301,7 @@ async function main() {
280
301
  case "setup": {
281
302
  const { cfg, terminalMode } = await runWizard();
282
303
  if (terminalMode) {
283
- const { startChatSession } = await import("./session-ZIAXZNTD.js");
304
+ const { startChatSession } = await import("./session-52D3R73Y.js");
284
305
  await startChatSession(cfg);
285
306
  } else {
286
307
  await startServer();
@@ -360,7 +381,7 @@ async function main() {
360
381
  console.log("No config. Run: moly setup");
361
382
  process.exit(1);
362
383
  }
363
- const { runDaemon } = await import("./daemon-RZA4HEUI.js");
384
+ const { runDaemon } = await import("./daemon-XWJQH7IB.js");
364
385
  await runDaemon();
365
386
  break;
366
387
  }
@@ -518,7 +539,7 @@ async function main() {
518
539
  console.log("No config. Run: moly setup");
519
540
  process.exit(1);
520
541
  }
521
- const { getTotalPosition } = await import("./position-ANCFIWD6.js");
542
+ const { getTotalPosition } = await import("./position-WDLPRIE7.js");
522
543
  const address = args[1];
523
544
  const pos = await getTotalPosition(address);
524
545
  console.log(JSON.stringify(pos, null, 2));
@@ -529,14 +550,14 @@ async function main() {
529
550
  if (!configExists()) {
530
551
  const { cfg, terminalMode } = await runWizard();
531
552
  if (terminalMode) {
532
- const { startChatSession } = await import("./session-ZIAXZNTD.js");
553
+ const { startChatSession } = await import("./session-52D3R73Y.js");
533
554
  await startChatSession(cfg);
534
555
  } else {
535
556
  await startServer();
536
557
  }
537
558
  } else {
538
559
  const cfg = loadConfig();
539
- const { startChatSession } = await import("./session-ZIAXZNTD.js");
560
+ const { startChatSession } = await import("./session-52D3R73Y.js");
540
561
  await startChatSession(cfg);
541
562
  }
542
563
  break;
@@ -557,7 +578,7 @@ async function main() {
557
578
  if (!configExists()) {
558
579
  const { cfg, terminalMode } = await runWizard();
559
580
  if (terminalMode) {
560
- const { startChatSession } = await import("./session-ZIAXZNTD.js");
581
+ const { startChatSession } = await import("./session-52D3R73Y.js");
561
582
  await startChatSession(cfg);
562
583
  } else {
563
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.1",
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",