@gvnrdao/dh-mcp 0.5.17 → 0.5.18

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/README.md CHANGED
@@ -6,49 +6,41 @@ lending on a user's behalf, with a human approving every fund-moving step.
6
6
 
7
7
  ## Install
8
8
 
9
- Pick the row that matches your machine — the first two paths carry their own runtime,
10
- so there is **nothing to install first** (no Node, no npm):
9
+ Two paths, and **neither downloads a file**:
11
10
 
12
- | You are on | Install path |
11
+ | You want | How |
13
12
  |---|---|
14
- | **Claude Desktop (macOS / Windows)** | Download the bundle and open it (double-click / drag into Settings → Extensions): `https://assets.gvnr.xyz/dh-mcp/v0.5.2/dh-mcp-0.5.2.mcpb` — Claude Desktop runs it on its own embedded runtime; network and optional keystore are configured in the extension's settings UI (the password is held by the OS credential store, never written to a config file). |
15
- | **Linux — including Claude Desktop builds on Linux — or any other MCP host** | One line, no sudo: `curl -fsSL https://assets.gvnr.xyz/dh-mcp/install.sh \| sh` — installs a self-contained binary (its own Node runtime inside) to `~/.dh-mcp/bin/dh-mcp`, verifies its SHA-256, and prints the exact `mcpServers` snippet. **Then wire the host:** Claude Code: `claude mcp add diamond-hands -- $HOME/.dh-mcp/bin/dh-mcp` (new session); Claude Desktop (Linux builds): the snippet in `~/.config/Claude/claude_desktop_config.json`, full quit + relaunch; other hosts: the snippet in their MCP config. Pin a version: `curl -fsSL https://assets.gvnr.xyz/dh-mcp/install.sh \| DH_VERSION=0.5.2 sh` |
16
- | **Developers** (requires **Node ≥ 18 on PATH** — this path does NOT work on a bare machine) | Claude Code: `claude mcp add diamond-hands -- npx -y @gvnrdao/dh-mcp` · any host JSON: `{ "mcpServers": { "diamond-hands": { "command": "npx", "args": ["-y", "@gvnrdao/dh-mcp"] } } }` |
17
-
18
- Downloads landing page (which file is for which system, checksums, security notes):
19
- **https://assets.gvnr.xyz/dh-mcp/** — all artifacts and `SHA256SUMS` live under it
20
- (`latest/` and `v<version>/` — e.g. `v0.5.2/`).
21
-
22
- Local installs serve local MCP hosts only — **claude.ai web / mobile / Cowork cannot
23
- reach them**. A hosted remote connector (paste-a-URL, wallet-only: OAuth 2.1 + Sign-In-
24
- with-Ethereum, external-wallet signing, no keystore mode in that build) is IMPLEMENTED;
25
- whether it is publicly served, and on which networks, is the operator's rollout decision
26
- (security audit first) and is stated by the running deployment itself — its `guide
27
- connector` topic and `boundary://info` capabilities. This file cannot know: if you have
28
- not been given a URL, use the install paths above.
29
-
30
- Unsigned-binary honesty: the macOS and Windows binaries are **not yet code-signed** —
31
- macOS Gatekeeper may quarantine the download (right-click → Open, or
32
- `xattr -d com.apple.quarantine <file>`) and Windows SmartScreen will warn. Verify the
33
- `SHA256SUMS` file from the same release if in doubt. On macOS/Windows the `.mcpb` path
34
- avoids this entirely.
13
+ | **The hosted connector** — nothing to install, no Node | Paste `https://mcp.diamondhands.credit/mcp` into any host that accepts a remote MCP server URL: claude.ai and Claude Desktop (Settings → Connectors → Add custom connector), Cursor, VS Code, Codex, Gemini CLI, OpenCode, Grok. Sign in with your wallet — OAuth 2.1 + Sign-In-with-Ethereum, dynamic client registration, so there is no client ID or secret to configure. **External-wallet signing only: that build has no keystore mode.** Serves **mainnet**. |
14
+ | **Run it yourself** — requires **Node ≥ 18 on PATH** | Claude Code: `claude mcp add diamond-hands -- npx -y @gvnrdao/dh-mcp` · any host JSON: `{ "mcpServers": { "diamond-hands": { "command": "npx", "args": ["-y", "@gvnrdao/dh-mcp"] } } }`. Defaults to **mainnet**, read-only until you configure a signer; keystore signing is available here, and `network_switch` (or `DH_NETWORK=sepolia`) moves you to the test network. |
15
+
16
+ Per-client setup instructions: <https://app.diamondhands.credit/connect>
17
+
18
+ > **There are no downloadable builds.** The self-contained binaries, the Claude Desktop
19
+ > `.mcpb` bundle, `install.sh` and `SHA256SUMS` under `assets.gvnr.xyz/dh-mcp` were
20
+ > **withdrawn on 2026-09-18** and every path there now returns 404. The hosted connector
21
+ > replaces them for machines without Node — including Claude Desktop, which takes a
22
+ > remote server URL directly — and `npx` replaces them everywhere else. Treat any
23
+ > surviving link to that host, anywhere, as stale.
35
24
 
36
25
  **Troubleshooting `spawn npx ENOENT`:** your MCP host searched the system PATH and found
37
26
  no `npx` — the machine has no Node.js (or the host, e.g. an Electron app, cannot see
38
27
  your shell's version manager). That is the npx path's stated precondition, not a bug in
39
- the server. Remedies: use the one-line installer above (the printed snippet uses an
40
- absolute path to a binary that carries its own runtime), or on macOS/Windows Claude
41
- Desktop install the `.mcpb`.
28
+ the server. Use the hosted connector instead: it needs no local runtime at all.
29
+
30
+ **Zero configuration boots the real protocol on ETHEREUM MAINNET** with public endpoints
31
+ — the same network the hosted connector serves, so a local install and a hosted one agree
32
+ about where your money is. It starts **read-only**: with no signer configured every write
33
+ answers with a setup invitation instead of acting, and moving value always needs a signer,
34
+ an explicit confirmation, and a fresh signature from your own wallet.
42
35
 
43
- **Zero configuration boots the real protocol on SEPOLIA**
44
- (the test network — real contracts, test funds) with public endpoints. Everything is
45
- overridable by environment variables:
36
+ To rehearse on the test network, say so — `network_switch` takes you to sepolia in one
37
+ sentence, or set `DH_NETWORK=sepolia`. Everything is overridable by environment variable:
46
38
 
47
39
  | Variable | Default | Meaning |
48
40
  |---|---|---|
49
41
  | `DH_ADAPTER` | `real` | `real` protocol, or `mock` (offline practice sandbox; needs `DH_MOCK_DB` + `DH_MOCK_LATENCY`) |
50
- | `DH_NETWORK` | `sepolia` | `sepolia` (practice) or `mainnet` (REAL money — reads and writes both work out of the box) |
51
- | `ETH_RPC_URL` | public node per network | your own RPC if preferred |
42
+ | `DH_NETWORK` | `mainnet` | `mainnet` (REAL money — reads and writes both work out of the box) or `sepolia` (practice) |
43
+ | `ETH_RPC_URL` | our RPC proxy per network (`api.gvnr.xyz/v1/proxy/rpc/<chainId>` — dRPC upstream, keys held server-side, no credential needed here) | your own RPC if preferred |
52
44
  | `DH_SERVICE_ENDPOINT` | per network | Diamond Hands ops service |
53
45
  | `DH_KEYSTORE_PATH` + `DH_KEYSTORE_PASSWORD` | unset | optional: encrypted keystore for automatic signing (both or neither) |
54
46
 
package/dist/boundary.js CHANGED
@@ -43276,9 +43276,25 @@ var SignerManager = class {
43276
43276
  pendingCeremonies: this.deps.pendingCeremonies()
43277
43277
  };
43278
43278
  }
43279
- /** The conversational first-run text every write answers with under mode `none`. */
43279
+ /**
43280
+ * The conversational first-run text every write answers with under mode `none`.
43281
+ *
43282
+ * It states the SCOPE of the refusal first, because the tool list does not change with
43283
+ * signer mode: an assistant that meets this on `loan_mint` still sees `loan_pay`,
43284
+ * `loan_withdraw` and `psm_swap` advertised, and its natural next move is to try one
43285
+ * rather than to run setup. Every one of them refuses identically here
43286
+ * (`BoundaryCore.requireBorrower`), so without that sentence the model rediscovers the
43287
+ * same wall N times and the user watches it flail. Naming the scope converts N refusals
43288
+ * into one instruction.
43289
+ *
43290
+ * It also says reads still work, so "no signer" is not misread as "server broken", and
43291
+ * it offers ONLY the modes this composition can actually construct — a build with no
43292
+ * keystore runtime must not suggest one (the same rule G-CONN-14 holds the guide to).
43293
+ */
43280
43294
  invitation() {
43281
- return "No authorization mode is chosen yet. Choose how to approve operations that move funds: (1) 'use my own wallet' \u2014 you approve each operation in YOUR wallet (MetaMask popup, or a mobile wallet via WalletConnect); (2) 'sign automatically' \u2014 a local keystore signs after each confirmation. Tell the agent which you prefer (it calls signer_setup), or ask for 'guide first-setup'.";
43295
+ const keystoreOffered = this.deps.keystore !== null;
43296
+ const options = keystoreOffered ? "(1) 'use my own wallet' \u2014 you approve each operation in YOUR wallet (MetaMask popup, or a mobile wallet via WalletConnect); (2) 'sign automatically' \u2014 a local keystore signs after each confirmation. " : "'use my own wallet' \u2014 you approve each operation in YOUR wallet. It is the only mode this build offers. ";
43297
+ return `No authorization mode is chosen yet, so EVERY fund-moving tool will refuse with this same message until one is \u2014 trying a different write tool will not get past it. Reading is unaffected: prices, protocol terms and position data all work right now. To move funds, choose how to approve it: ${options}Tell the agent which you prefer (it calls signer_setup), or ask for 'guide first-setup'.`;
43282
43298
  }
43283
43299
  };
43284
43300
  var KeystoreProvider = class {
@@ -81605,7 +81621,7 @@ var RealUpstreamPlugin = class {
81605
81621
  })
81606
81622
  )
81607
81623
  };
81608
- const writeRefusalReason = !this.wallet ? `no signer is configured (SIGNER_UNAVAILABLE) \u2014 writes need the keystore env pair (DH_KEYSTORE_PATH + DH_KEYSTORE_PASSWORD), or run signer_setup.` : `the lit-ops login session is unavailable \u2014 the keystore is configured but EIP-712 login did not complete; check the broker endpoint and retry.`;
81624
+ const writeRefusalReason = !this.wallet ? `no signer is configured (SIGNER_UNAVAILABLE) \u2014 EVERY write refuses for this same reason until one is, so trying a different write tool will not get past it (reads are unaffected). Writes need the keystore env pair (DH_KEYSTORE_PATH + DH_KEYSTORE_PASSWORD), or run signer_setup.` : `the lit-ops login session is unavailable \u2014 the keystore is configured but EIP-712 login did not complete; check the broker endpoint and retry.`;
81609
81625
  const readOnly = (op) => Promise.resolve(
81610
81626
  upFail({
81611
81627
  kind: "unavailable",
@@ -81833,7 +81849,7 @@ var RealUpstreamPlugin = class {
81833
81849
  failure: {
81834
81850
  kind: "signer-missing",
81835
81851
  source: "real-ops",
81836
- message: "no authorization mode is chosen (SIGNER_UNAVAILABLE) \u2014 pick one via signer_setup ('external' = approve in your own wallet, 'keystore' = automatic signing), or set DH_KEYSTORE_PATH and DH_KEYSTORE_PASSWORD in the server environment."
81852
+ message: "no authorization mode is chosen (SIGNER_UNAVAILABLE) \u2014 EVERY fund-moving tool refuses with this same message until one is, so trying a different write tool will not get past it. Reads are unaffected. Pick a mode via signer_setup ('external' = approve in your own wallet, 'keystore' = automatic signing), or set DH_KEYSTORE_PATH and DH_KEYSTORE_PASSWORD in the server environment."
81837
81853
  }
81838
81854
  };
81839
81855
  }
@@ -83800,16 +83816,18 @@ function resolveWcProjectId(raw, problems) {
83800
83816
  }
83801
83817
  return raw;
83802
83818
  }
83819
+ var RPC_PROXY_ORIGIN = "https://api.gvnr.xyz";
83820
+ var rpcProxy = (chainId) => `${RPC_PROXY_ORIGIN}/v1/proxy/rpc/${chainId}`;
83803
83821
  var NETWORK_DEFAULTS = {
83804
83822
  sepolia: {
83805
- rpcUrl: "https://ethereum-sepolia-rpc.publicnode.com",
83823
+ rpcUrl: rpcProxy(11155111),
83806
83824
  serviceEndpoint: "https://ops-test.gvnr.xyz",
83807
83825
  litNetwork: "chipotle",
83808
83826
  validatorVersion: 3
83809
83827
  // on-chain validator generation, sepolia (2026-07-30)
83810
83828
  },
83811
83829
  mainnet: {
83812
- rpcUrl: "https://ethereum-rpc.publicnode.com",
83830
+ rpcUrl: rpcProxy(1),
83813
83831
  // Cutover 2026-09-08 — see sdk/src/constants/chunks/network-configs.ts for the full
83814
83832
  // reasoning. Widening, not a rename: ops.gvnr.xyz serves the same broker and cannot be
83815
83833
  // retired while installed copies call it. The sepolia entry above deliberately stays on
@@ -83927,11 +83945,11 @@ function resolveRealConfig(env) {
83927
83945
  problems.push(`DH_SIGNER='${signer}' is not supported for the real adapter. Allowed: external | keystore (or unset).`);
83928
83946
  }
83929
83947
  }
83930
- const network = env["DH_NETWORK"] === void 0 || env["DH_NETWORK"] === "" ? "sepolia" : env["DH_NETWORK"];
83948
+ const network = env["DH_NETWORK"] === void 0 || env["DH_NETWORK"] === "" ? "mainnet" : env["DH_NETWORK"];
83931
83949
  if (NETWORKS[network] === void 0) {
83932
83950
  problems.push(`DH_NETWORK='${network}' is not supported. Allowed: ${Object.keys(NETWORKS).join(" | ")}.`);
83933
83951
  }
83934
- const defaults2 = NETWORK_DEFAULTS[network] ?? NETWORK_DEFAULTS.sepolia;
83952
+ const defaults2 = NETWORK_DEFAULTS[network] ?? NETWORK_DEFAULTS.mainnet;
83935
83953
  const rpcUrl = env["ETH_RPC_URL"] || defaults2.rpcUrl;
83936
83954
  const serviceEndpoint = env["DH_SERVICE_ENDPOINT"] || defaults2.serviceEndpoint;
83937
83955
  if (!/^https:\/\//.test(serviceEndpoint) && !/^http:\/\/(localhost|127\.0\.0\.1)/.test(serviceEndpoint)) {
@@ -40840,8 +40840,10 @@ An agent on the user's own machine can skip this service and talk to the protoco
40840
40840
  directly through the published MCP server, which carries the same tools:
40841
40841
 
40842
40842
  - \`npx -y @gvnrdao/dh-mcp\` (requires Node \u2265 18)
40843
- - \`curl -fsSL https://assets.gvnr.xyz/dh-mcp/install.sh | sh\` (self-contained binary)
40844
- - Claude Desktop bundle and checksums: <https://assets.gvnr.xyz/dh-mcp/>
40843
+
40844
+ That is the only self-hosted path. The downloadable binaries and Claude Desktop bundle
40845
+ that this document used to list were withdrawn on 2026-09-18; nothing is served under
40846
+ \`assets.gvnr.xyz/dh-mcp\` any more.
40845
40847
 
40846
40848
  ## Contact
40847
40849
 
@@ -40860,31 +40862,10 @@ var FAVICON_DATA_URI = `data:image/svg+xml,${encodeURIComponent(FAVICON_SVG).rep
40860
40862
  var BACKGROUND_IMAGE_ORIGIN = "https://images.gvnr.xyz";
40861
40863
  var BACKGROUND_IMAGE_URL = `${BACKGROUND_IMAGE_ORIGIN}/images/layout/backgroundCorleoneb.jpg`;
40862
40864
  var escapeHtml = (s) => s.replace(/[&<>"']/g, (c) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" })[c]);
40863
- function moneyReality(networks2) {
40864
- const mainnet = networks2.includes("mainnet");
40865
- const sepolia = networks2.includes("sepolia");
40866
- if (mainnet && sepolia) {
40867
- return {
40868
- label: "REAL MONEY on mainnet \xB7 practice funds on sepolia",
40869
- detail: "This deployment serves both networks. Mainnet moves real BTC and real UCD; sepolia is the test network and its funds are not real. Ask which network you are on before acting."
40870
- };
40871
- }
40872
- if (mainnet) {
40873
- return {
40874
- label: "REAL MONEY \u2014 Ethereum mainnet",
40875
- detail: "This deployment serves mainnet only. Every fund-moving operation moves real BTC and real UCD, and each one needs a fresh signature from your own wallet."
40876
- };
40877
- }
40878
- return {
40879
- label: "PRACTICE FUNDS \u2014 sepolia test network",
40880
- detail: "This deployment serves sepolia only. The contracts and ceremonies are real, the money is not. Nothing here can move mainnet funds."
40881
- };
40882
- }
40865
+ var CONNECT_URL = "https://app.diamondhands.credit/connect";
40883
40866
  function renderLandingPage(input) {
40884
- const { publicOrigin, networks: networks2, version: version2, nonce } = input;
40867
+ const { publicOrigin, version: version2 } = input;
40885
40868
  const origin2 = escapeHtml(publicOrigin);
40886
- const money = moneyReality(networks2);
40887
- const config = JSON.stringify({ mcpServers: { "diamond-hands": { type: "http", url: `${publicOrigin}/mcp` } } }, null, 2);
40888
40869
  return `<!doctype html>
40889
40870
  <html lang="en">
40890
40871
  <head>
@@ -40909,135 +40890,34 @@ function renderLandingPage(input) {
40909
40890
  .scroll { height:100%; overflow-y:auto; overscroll-behavior:contain; }
40910
40891
  main { max-width:41rem; margin:0 auto; padding:1.9rem 1.25rem 2rem;
40911
40892
  text-shadow:0 1px 3px rgba(0,0,0,.85); }
40912
- /* Wide viewports: the lower half goes side-by-side so the whole page fits without the
40913
- viewport scrolling \u2014 the house treatment is a full-bleed image, not a long page. */
40914
- @media (min-width: 62rem) and (min-height: 34rem) {
40915
- main { max-width:62rem; }
40916
- .cols { display:grid; grid-template-columns:1fr 1fr; gap:0 1.6rem; align-items:start; }
40917
- .cols h2:first-child { margin-top:0; }
40918
- }
40919
40893
  h1 { font-size:1.35rem; margin:0 0 .25rem; letter-spacing:-.01em; }
40920
40894
  .sub { color:#dfe3ea; margin:0 0 1.1rem; font-size:14px; }
40921
- .card { background:rgba(6,8,12,.62); border:1px solid rgba(255,255,255,.16);
40922
- border-radius:10px; padding:.75rem .95rem; margin:0 0 .8rem;
40923
- backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px); }
40924
- .money { border-left:3px solid #f59e0b; }
40925
- .money strong { display:block; margin-bottom:.15rem; }
40926
- h2 { font-size:.72rem; text-transform:uppercase; letter-spacing:.08em; color:#cbd2dc;
40927
- margin:1.1rem 0 .45rem; font-weight:600; }
40928
- pre { margin:0; padding:.7rem .9rem; background:rgba(0,0,0,.66);
40929
- border:1px solid rgba(255,255,255,.16); border-radius:8px; overflow-x:auto;
40930
- font-size:12.5px; line-height:1.45; text-shadow:none;
40931
- font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; }
40932
40895
  code { font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size:.92em; }
40933
- table { border-collapse:collapse; width:100%; font-size:13.5px; }
40934
- td { padding:.3rem .6rem .3rem 0; border-bottom:1px solid rgba(255,255,255,.12); vertical-align:top; }
40935
- td:first-child { color:#cbd2dc; white-space:nowrap; width:10.5rem; }
40936
- tr:last-child td { border-bottom:0; }
40937
40896
  a { color:inherit; text-decoration:underline; text-underline-offset:2px; }
40938
- .row { display:flex; align-items:center; gap:.6rem; margin-bottom:.4rem; font-size:13px; }
40939
- button { font:inherit; font-size:12.5px; padding:.25rem .65rem;
40940
- border:1px solid rgba(255,255,255,.24); border-radius:6px;
40941
- background:rgba(0,0,0,.55); color:#f3f4f6; cursor:pointer; text-shadow:none; }
40942
- button:hover { background:rgba(0,0,0,.75); }
40943
40897
  footer { color:#cbd2dc; font-size:12.5px; margin-top:1.1rem; padding-top:.7rem;
40944
40898
  border-top:1px solid rgba(255,255,255,.14); }
40945
- [hidden] { display:none !important; }
40946
- #reveal-wrap { margin:0 0 .4rem; }
40947
- #reveal { display:inline-block; padding:.4rem .85rem; border-radius:6px;
40948
- border:1px solid rgba(255,255,255,.26); background:rgba(6,8,12,.62);
40949
- backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px);
40950
- text-decoration:none; font-size:13.5px; text-shadow:none; cursor:pointer; }
40951
- #reveal:hover { background:rgba(6,8,12,.85); border-color:rgba(255,255,255,.4); }
40952
- #reveal::after { content:" \u2193"; opacity:.7; }
40899
+ #cta-wrap { margin:.2rem 0 0; }
40900
+ #cta { display:inline-block; padding:.4rem .85rem; border-radius:6px;
40901
+ border:1px solid rgba(255,255,255,.26); background:rgba(6,8,12,.62);
40902
+ backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px);
40903
+ text-decoration:none; font-size:13.5px; text-shadow:none; cursor:pointer; }
40904
+ #cta:hover { background:rgba(6,8,12,.85); border-color:rgba(255,255,255,.4); }
40905
+ #cta::after { content:" \u2192"; opacity:.7; }
40953
40906
  </style>
40954
40907
  </head>
40955
40908
  <body>
40956
40909
  <div class="scroll">
40957
40910
  <main>
40958
40911
  <h1>Diamond Hands \u2014 MCP endpoint</h1>
40959
- <p class="sub">This host is a <strong>Model Context Protocol</strong> server, not a website.
40960
- There is no app to use here. If you are a person, the app is at
40961
- <a href="https://app.diamondhands.credit/">app.diamondhands.credit</a>.</p>
40962
-
40963
- <!-- Revealed BY SCRIPT, hidden in the served markup \u2014 the inverse of #details below.
40964
- With no JS this stays hidden and the details stay open, so the page degrades to
40965
- everything-visible rather than to a trigger that does nothing. -->
40966
- <p id="reveal-wrap" hidden><a href="#details" id="reveal" role="button">View MCP installation details</a></p>
40967
-
40968
- <div id="details">
40969
- <div class="card money">
40970
- <strong>${escapeHtml(money.label)}</strong>
40971
- ${escapeHtml(money.detail)}
40972
- </div>
40973
-
40974
- <div class="cols">
40975
- <section>
40976
- <h2>Connect an agent</h2>
40977
- <div class="row">
40978
- <span style="color:var(--muted);font-size:13px">Add this to your MCP client configuration:</span>
40979
- <button id="copy" type="button">Copy</button>
40980
- </div>
40981
- <pre id="cfg">${escapeHtml(config)}</pre>
40912
+ <p class="sub">Welcome to the Diamond Hands <strong>Model Context Protocol</strong> server.</p>
40982
40913
 
40983
- <h2>How authorization works</h2>
40984
- <div class="card">
40985
- Identity is a <strong>wallet</strong>, not an account: OAuth 2.1 with dynamic client
40986
- registration (RFC 7591) and PKCE, where the login is an Ethereum signature (EIP-4361).
40987
- No passwords, no user database. The bearer token proves <em>session identity only</em> \u2014
40988
- it signs nothing and can never move funds; every fund-moving step raises its own approval
40989
- in your own wallet. Session state is in memory, so a restart means signing in again.
40990
- </div>
40991
- </section>
40992
-
40993
- <section>
40994
- <h2>Endpoints</h2>
40995
- <div class="card">
40996
- <table>
40997
- <tr><td>MCP</td><td><code>${origin2}/mcp</code> \u2014 streamable HTTP</td></tr>
40998
- <tr><td>Networks served</td><td><code>${escapeHtml(networks2.join(", "))}</code></td></tr>
40999
- <tr><td>Registration</td><td><a href="/auth.md">/auth.md</a> \u2014 how an agent registers and signs in</td></tr>
41000
- <tr><td>Resource metadata</td><td><a href="/.well-known/oauth-protected-resource">/.well-known/oauth-protected-resource</a></td></tr>
41001
- <tr><td>Auth server metadata</td><td><a href="/.well-known/oauth-authorization-server">/.well-known/oauth-authorization-server</a></td></tr>
41002
- </table>
41003
- </div>
41004
-
41005
- </section>
41006
- </div>
40914
+ <p id="cta-wrap"><a href="${CONNECT_URL}" id="cta" role="button">View MCP installation details</a></p>
41007
40915
 
41008
40916
  <footer>
41009
40917
  <code>@gvnrdao/dh-mcp</code> v${escapeHtml(version2)} \xB7 origin <code>${origin2}</code>
41010
40918
  </footer>
41011
- </div>
41012
40919
  </main>
41013
40920
  </div>
41014
- <script nonce="${escapeHtml(nonce)}">
41015
- // Progressive disclosure, applied by SCRIPT rather than baked into the markup: the
41016
- // details ship visible, and only a browser that can re-open them is allowed to close
41017
- // them. A page whose whole content sits behind a trigger that needs JS is a page that
41018
- // shows two sentences and nothing else when the script does not run.
41019
- (function () {
41020
- var details = document.getElementById('details');
41021
- var wrap = document.getElementById('reveal-wrap');
41022
- var link = document.getElementById('reveal');
41023
- if (!details || !wrap || !link) return;
41024
- details.hidden = true;
41025
- wrap.hidden = false;
41026
- link.addEventListener('click', function (e) {
41027
- e.preventDefault();
41028
- wrap.hidden = true;
41029
- details.hidden = false;
41030
- });
41031
- })();
41032
-
41033
- document.getElementById('copy').addEventListener('click', function () {
41034
- var t = document.getElementById('cfg').textContent;
41035
- navigator.clipboard.writeText(t).then(function () {
41036
- var b = document.getElementById('copy');
41037
- b.textContent = 'Copied'; setTimeout(function () { b.textContent = 'Copy'; }, 1400);
41038
- });
41039
- });
41040
- </script>
41041
40921
  </body>
41042
40922
  </html>
41043
40923
  `;
@@ -41072,7 +40952,7 @@ function htmlPageSecurityHeaders(extra) {
41072
40952
  }
41073
40953
 
41074
40954
  // src/version.ts
41075
- var SERVER_VERSION = "0.5.17";
40955
+ var SERVER_VERSION = "0.5.18";
41076
40956
 
41077
40957
  // src/connector/siwe-oauth.ts
41078
40958
  var import_node_crypto2 = require("crypto");
@@ -41594,16 +41474,18 @@ function resolveWcProjectId(raw, problems) {
41594
41474
  }
41595
41475
  return raw;
41596
41476
  }
41477
+ var RPC_PROXY_ORIGIN = "https://api.gvnr.xyz";
41478
+ var rpcProxy = (chainId) => `${RPC_PROXY_ORIGIN}/v1/proxy/rpc/${chainId}`;
41597
41479
  var NETWORK_DEFAULTS = {
41598
41480
  sepolia: {
41599
- rpcUrl: "https://ethereum-sepolia-rpc.publicnode.com",
41481
+ rpcUrl: rpcProxy(11155111),
41600
41482
  serviceEndpoint: "https://ops-test.gvnr.xyz",
41601
41483
  litNetwork: "chipotle",
41602
41484
  validatorVersion: 3
41603
41485
  // on-chain validator generation, sepolia (2026-07-30)
41604
41486
  },
41605
41487
  mainnet: {
41606
- rpcUrl: "https://ethereum-rpc.publicnode.com",
41488
+ rpcUrl: rpcProxy(1),
41607
41489
  // Cutover 2026-09-08 — see sdk/src/constants/chunks/network-configs.ts for the full
41608
41490
  // reasoning. Widening, not a rename: ops.gvnr.xyz serves the same broker and cannot be
41609
41491
  // retired while installed copies call it. The sepolia entry above deliberately stays on
@@ -41721,11 +41603,11 @@ function resolveRealConfig(env) {
41721
41603
  problems.push(`DH_SIGNER='${signer}' is not supported for the real adapter. Allowed: external | keystore (or unset).`);
41722
41604
  }
41723
41605
  }
41724
- const network = env["DH_NETWORK"] === void 0 || env["DH_NETWORK"] === "" ? "sepolia" : env["DH_NETWORK"];
41606
+ const network = env["DH_NETWORK"] === void 0 || env["DH_NETWORK"] === "" ? "mainnet" : env["DH_NETWORK"];
41725
41607
  if (NETWORKS[network] === void 0) {
41726
41608
  problems.push(`DH_NETWORK='${network}' is not supported. Allowed: ${Object.keys(NETWORKS).join(" | ")}.`);
41727
41609
  }
41728
- const defaults2 = NETWORK_DEFAULTS[network] ?? NETWORK_DEFAULTS.sepolia;
41610
+ const defaults2 = NETWORK_DEFAULTS[network] ?? NETWORK_DEFAULTS.mainnet;
41729
41611
  const rpcUrl = env["ETH_RPC_URL"] || defaults2.rpcUrl;
41730
41612
  const serviceEndpoint = env["DH_SERVICE_ENDPOINT"] || defaults2.serviceEndpoint;
41731
41613
  if (!/^https:\/\//.test(serviceEndpoint) && !/^http:\/\/(localhost|127\.0\.0\.1)/.test(serviceEndpoint)) {
@@ -44415,9 +44297,25 @@ var SignerManager = class {
44415
44297
  pendingCeremonies: this.deps.pendingCeremonies()
44416
44298
  };
44417
44299
  }
44418
- /** The conversational first-run text every write answers with under mode `none`. */
44300
+ /**
44301
+ * The conversational first-run text every write answers with under mode `none`.
44302
+ *
44303
+ * It states the SCOPE of the refusal first, because the tool list does not change with
44304
+ * signer mode: an assistant that meets this on `loan_mint` still sees `loan_pay`,
44305
+ * `loan_withdraw` and `psm_swap` advertised, and its natural next move is to try one
44306
+ * rather than to run setup. Every one of them refuses identically here
44307
+ * (`BoundaryCore.requireBorrower`), so without that sentence the model rediscovers the
44308
+ * same wall N times and the user watches it flail. Naming the scope converts N refusals
44309
+ * into one instruction.
44310
+ *
44311
+ * It also says reads still work, so "no signer" is not misread as "server broken", and
44312
+ * it offers ONLY the modes this composition can actually construct — a build with no
44313
+ * keystore runtime must not suggest one (the same rule G-CONN-14 holds the guide to).
44314
+ */
44419
44315
  invitation() {
44420
- return "No authorization mode is chosen yet. Choose how to approve operations that move funds: (1) 'use my own wallet' \u2014 you approve each operation in YOUR wallet (MetaMask popup, or a mobile wallet via WalletConnect); (2) 'sign automatically' \u2014 a local keystore signs after each confirmation. Tell the agent which you prefer (it calls signer_setup), or ask for 'guide first-setup'.";
44316
+ const keystoreOffered = this.deps.keystore !== null;
44317
+ const options = keystoreOffered ? "(1) 'use my own wallet' \u2014 you approve each operation in YOUR wallet (MetaMask popup, or a mobile wallet via WalletConnect); (2) 'sign automatically' \u2014 a local keystore signs after each confirmation. " : "'use my own wallet' \u2014 you approve each operation in YOUR wallet. It is the only mode this build offers. ";
44318
+ return `No authorization mode is chosen yet, so EVERY fund-moving tool will refuse with this same message until one is \u2014 trying a different write tool will not get past it. Reading is unaffected: prices, protocol terms and position data all work right now. To move funds, choose how to approve it: ${options}Tell the agent which you prefer (it calls signer_setup), or ask for 'guide first-setup'.`;
44421
44319
  }
44422
44320
  };
44423
44321
  var KeystoreProvider = class {
@@ -82744,7 +82642,7 @@ var RealUpstreamPlugin = class {
82744
82642
  })
82745
82643
  )
82746
82644
  };
82747
- const writeRefusalReason = !this.wallet ? `no signer is configured (SIGNER_UNAVAILABLE) \u2014 writes need the keystore env pair (DH_KEYSTORE_PATH + DH_KEYSTORE_PASSWORD), or run signer_setup.` : `the lit-ops login session is unavailable \u2014 the keystore is configured but EIP-712 login did not complete; check the broker endpoint and retry.`;
82645
+ const writeRefusalReason = !this.wallet ? `no signer is configured (SIGNER_UNAVAILABLE) \u2014 EVERY write refuses for this same reason until one is, so trying a different write tool will not get past it (reads are unaffected). Writes need the keystore env pair (DH_KEYSTORE_PATH + DH_KEYSTORE_PASSWORD), or run signer_setup.` : `the lit-ops login session is unavailable \u2014 the keystore is configured but EIP-712 login did not complete; check the broker endpoint and retry.`;
82748
82646
  const readOnly = (op) => Promise.resolve(
82749
82647
  upFail({
82750
82648
  kind: "unavailable",
@@ -82972,7 +82870,7 @@ var RealUpstreamPlugin = class {
82972
82870
  failure: {
82973
82871
  kind: "signer-missing",
82974
82872
  source: "real-ops",
82975
- message: "no authorization mode is chosen (SIGNER_UNAVAILABLE) \u2014 pick one via signer_setup ('external' = approve in your own wallet, 'keystore' = automatic signing), or set DH_KEYSTORE_PATH and DH_KEYSTORE_PASSWORD in the server environment."
82873
+ message: "no authorization mode is chosen (SIGNER_UNAVAILABLE) \u2014 EVERY fund-moving tool refuses with this same message until one is, so trying a different write tool will not get past it. Reads are unaffected. Pick a mode via signer_setup ('external' = approve in your own wallet, 'keystore' = automatic signing), or set DH_KEYSTORE_PATH and DH_KEYSTORE_PASSWORD in the server environment."
82976
82874
  }
82977
82875
  };
82978
82876
  }
@@ -88103,9 +88001,9 @@ function composeConnector(opts, rawPublicOrigin) {
88103
88001
  }
88104
88002
  if (opts.serveLandingPage) {
88105
88003
  app.get("/", (_req, res) => {
88106
- const { nonce, headers } = htmlPageSecurityHeaders({ "img-src": [BACKGROUND_IMAGE_ORIGIN, "data:"] });
88004
+ const { headers } = htmlPageSecurityHeaders({ "img-src": [BACKGROUND_IMAGE_ORIGIN, "data:"] });
88107
88005
  for (const [k, v] of Object.entries(headers)) res.setHeader(k, v);
88108
- res.type("text/html; charset=utf-8").send(renderLandingPage({ publicOrigin, networks: allowedNetworks, version: SERVER_VERSION, nonce }));
88006
+ res.type("text/html; charset=utf-8").send(renderLandingPage({ publicOrigin, version: SERVER_VERSION }));
88109
88007
  });
88110
88008
  }
88111
88009
  app.use((_req, res) => deny(res, 404, "not found \u2014 the MCP endpoint is /mcp"));
package/dist/connector.js CHANGED
@@ -40834,8 +40834,10 @@ An agent on the user's own machine can skip this service and talk to the protoco
40834
40834
  directly through the published MCP server, which carries the same tools:
40835
40835
 
40836
40836
  - \`npx -y @gvnrdao/dh-mcp\` (requires Node \u2265 18)
40837
- - \`curl -fsSL https://assets.gvnr.xyz/dh-mcp/install.sh | sh\` (self-contained binary)
40838
- - Claude Desktop bundle and checksums: <https://assets.gvnr.xyz/dh-mcp/>
40837
+
40838
+ That is the only self-hosted path. The downloadable binaries and Claude Desktop bundle
40839
+ that this document used to list were withdrawn on 2026-09-18; nothing is served under
40840
+ \`assets.gvnr.xyz/dh-mcp\` any more.
40839
40841
 
40840
40842
  ## Contact
40841
40843
 
@@ -40854,31 +40856,10 @@ var FAVICON_DATA_URI = `data:image/svg+xml,${encodeURIComponent(FAVICON_SVG).rep
40854
40856
  var BACKGROUND_IMAGE_ORIGIN = "https://images.gvnr.xyz";
40855
40857
  var BACKGROUND_IMAGE_URL = `${BACKGROUND_IMAGE_ORIGIN}/images/layout/backgroundCorleoneb.jpg`;
40856
40858
  var escapeHtml = (s) => s.replace(/[&<>"']/g, (c) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" })[c]);
40857
- function moneyReality(networks2) {
40858
- const mainnet = networks2.includes("mainnet");
40859
- const sepolia = networks2.includes("sepolia");
40860
- if (mainnet && sepolia) {
40861
- return {
40862
- label: "REAL MONEY on mainnet \xB7 practice funds on sepolia",
40863
- detail: "This deployment serves both networks. Mainnet moves real BTC and real UCD; sepolia is the test network and its funds are not real. Ask which network you are on before acting."
40864
- };
40865
- }
40866
- if (mainnet) {
40867
- return {
40868
- label: "REAL MONEY \u2014 Ethereum mainnet",
40869
- detail: "This deployment serves mainnet only. Every fund-moving operation moves real BTC and real UCD, and each one needs a fresh signature from your own wallet."
40870
- };
40871
- }
40872
- return {
40873
- label: "PRACTICE FUNDS \u2014 sepolia test network",
40874
- detail: "This deployment serves sepolia only. The contracts and ceremonies are real, the money is not. Nothing here can move mainnet funds."
40875
- };
40876
- }
40859
+ var CONNECT_URL = "https://app.diamondhands.credit/connect";
40877
40860
  function renderLandingPage(input) {
40878
- const { publicOrigin, networks: networks2, version: version2, nonce } = input;
40861
+ const { publicOrigin, version: version2 } = input;
40879
40862
  const origin2 = escapeHtml(publicOrigin);
40880
- const money = moneyReality(networks2);
40881
- const config = JSON.stringify({ mcpServers: { "diamond-hands": { type: "http", url: `${publicOrigin}/mcp` } } }, null, 2);
40882
40863
  return `<!doctype html>
40883
40864
  <html lang="en">
40884
40865
  <head>
@@ -40903,135 +40884,34 @@ function renderLandingPage(input) {
40903
40884
  .scroll { height:100%; overflow-y:auto; overscroll-behavior:contain; }
40904
40885
  main { max-width:41rem; margin:0 auto; padding:1.9rem 1.25rem 2rem;
40905
40886
  text-shadow:0 1px 3px rgba(0,0,0,.85); }
40906
- /* Wide viewports: the lower half goes side-by-side so the whole page fits without the
40907
- viewport scrolling \u2014 the house treatment is a full-bleed image, not a long page. */
40908
- @media (min-width: 62rem) and (min-height: 34rem) {
40909
- main { max-width:62rem; }
40910
- .cols { display:grid; grid-template-columns:1fr 1fr; gap:0 1.6rem; align-items:start; }
40911
- .cols h2:first-child { margin-top:0; }
40912
- }
40913
40887
  h1 { font-size:1.35rem; margin:0 0 .25rem; letter-spacing:-.01em; }
40914
40888
  .sub { color:#dfe3ea; margin:0 0 1.1rem; font-size:14px; }
40915
- .card { background:rgba(6,8,12,.62); border:1px solid rgba(255,255,255,.16);
40916
- border-radius:10px; padding:.75rem .95rem; margin:0 0 .8rem;
40917
- backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px); }
40918
- .money { border-left:3px solid #f59e0b; }
40919
- .money strong { display:block; margin-bottom:.15rem; }
40920
- h2 { font-size:.72rem; text-transform:uppercase; letter-spacing:.08em; color:#cbd2dc;
40921
- margin:1.1rem 0 .45rem; font-weight:600; }
40922
- pre { margin:0; padding:.7rem .9rem; background:rgba(0,0,0,.66);
40923
- border:1px solid rgba(255,255,255,.16); border-radius:8px; overflow-x:auto;
40924
- font-size:12.5px; line-height:1.45; text-shadow:none;
40925
- font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; }
40926
40889
  code { font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size:.92em; }
40927
- table { border-collapse:collapse; width:100%; font-size:13.5px; }
40928
- td { padding:.3rem .6rem .3rem 0; border-bottom:1px solid rgba(255,255,255,.12); vertical-align:top; }
40929
- td:first-child { color:#cbd2dc; white-space:nowrap; width:10.5rem; }
40930
- tr:last-child td { border-bottom:0; }
40931
40890
  a { color:inherit; text-decoration:underline; text-underline-offset:2px; }
40932
- .row { display:flex; align-items:center; gap:.6rem; margin-bottom:.4rem; font-size:13px; }
40933
- button { font:inherit; font-size:12.5px; padding:.25rem .65rem;
40934
- border:1px solid rgba(255,255,255,.24); border-radius:6px;
40935
- background:rgba(0,0,0,.55); color:#f3f4f6; cursor:pointer; text-shadow:none; }
40936
- button:hover { background:rgba(0,0,0,.75); }
40937
40891
  footer { color:#cbd2dc; font-size:12.5px; margin-top:1.1rem; padding-top:.7rem;
40938
40892
  border-top:1px solid rgba(255,255,255,.14); }
40939
- [hidden] { display:none !important; }
40940
- #reveal-wrap { margin:0 0 .4rem; }
40941
- #reveal { display:inline-block; padding:.4rem .85rem; border-radius:6px;
40942
- border:1px solid rgba(255,255,255,.26); background:rgba(6,8,12,.62);
40943
- backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px);
40944
- text-decoration:none; font-size:13.5px; text-shadow:none; cursor:pointer; }
40945
- #reveal:hover { background:rgba(6,8,12,.85); border-color:rgba(255,255,255,.4); }
40946
- #reveal::after { content:" \u2193"; opacity:.7; }
40893
+ #cta-wrap { margin:.2rem 0 0; }
40894
+ #cta { display:inline-block; padding:.4rem .85rem; border-radius:6px;
40895
+ border:1px solid rgba(255,255,255,.26); background:rgba(6,8,12,.62);
40896
+ backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px);
40897
+ text-decoration:none; font-size:13.5px; text-shadow:none; cursor:pointer; }
40898
+ #cta:hover { background:rgba(6,8,12,.85); border-color:rgba(255,255,255,.4); }
40899
+ #cta::after { content:" \u2192"; opacity:.7; }
40947
40900
  </style>
40948
40901
  </head>
40949
40902
  <body>
40950
40903
  <div class="scroll">
40951
40904
  <main>
40952
40905
  <h1>Diamond Hands \u2014 MCP endpoint</h1>
40953
- <p class="sub">This host is a <strong>Model Context Protocol</strong> server, not a website.
40954
- There is no app to use here. If you are a person, the app is at
40955
- <a href="https://app.diamondhands.credit/">app.diamondhands.credit</a>.</p>
40956
-
40957
- <!-- Revealed BY SCRIPT, hidden in the served markup \u2014 the inverse of #details below.
40958
- With no JS this stays hidden and the details stay open, so the page degrades to
40959
- everything-visible rather than to a trigger that does nothing. -->
40960
- <p id="reveal-wrap" hidden><a href="#details" id="reveal" role="button">View MCP installation details</a></p>
40961
-
40962
- <div id="details">
40963
- <div class="card money">
40964
- <strong>${escapeHtml(money.label)}</strong>
40965
- ${escapeHtml(money.detail)}
40966
- </div>
40967
-
40968
- <div class="cols">
40969
- <section>
40970
- <h2>Connect an agent</h2>
40971
- <div class="row">
40972
- <span style="color:var(--muted);font-size:13px">Add this to your MCP client configuration:</span>
40973
- <button id="copy" type="button">Copy</button>
40974
- </div>
40975
- <pre id="cfg">${escapeHtml(config)}</pre>
40906
+ <p class="sub">Welcome to the Diamond Hands <strong>Model Context Protocol</strong> server.</p>
40976
40907
 
40977
- <h2>How authorization works</h2>
40978
- <div class="card">
40979
- Identity is a <strong>wallet</strong>, not an account: OAuth 2.1 with dynamic client
40980
- registration (RFC 7591) and PKCE, where the login is an Ethereum signature (EIP-4361).
40981
- No passwords, no user database. The bearer token proves <em>session identity only</em> \u2014
40982
- it signs nothing and can never move funds; every fund-moving step raises its own approval
40983
- in your own wallet. Session state is in memory, so a restart means signing in again.
40984
- </div>
40985
- </section>
40986
-
40987
- <section>
40988
- <h2>Endpoints</h2>
40989
- <div class="card">
40990
- <table>
40991
- <tr><td>MCP</td><td><code>${origin2}/mcp</code> \u2014 streamable HTTP</td></tr>
40992
- <tr><td>Networks served</td><td><code>${escapeHtml(networks2.join(", "))}</code></td></tr>
40993
- <tr><td>Registration</td><td><a href="/auth.md">/auth.md</a> \u2014 how an agent registers and signs in</td></tr>
40994
- <tr><td>Resource metadata</td><td><a href="/.well-known/oauth-protected-resource">/.well-known/oauth-protected-resource</a></td></tr>
40995
- <tr><td>Auth server metadata</td><td><a href="/.well-known/oauth-authorization-server">/.well-known/oauth-authorization-server</a></td></tr>
40996
- </table>
40997
- </div>
40998
-
40999
- </section>
41000
- </div>
40908
+ <p id="cta-wrap"><a href="${CONNECT_URL}" id="cta" role="button">View MCP installation details</a></p>
41001
40909
 
41002
40910
  <footer>
41003
40911
  <code>@gvnrdao/dh-mcp</code> v${escapeHtml(version2)} \xB7 origin <code>${origin2}</code>
41004
40912
  </footer>
41005
- </div>
41006
40913
  </main>
41007
40914
  </div>
41008
- <script nonce="${escapeHtml(nonce)}">
41009
- // Progressive disclosure, applied by SCRIPT rather than baked into the markup: the
41010
- // details ship visible, and only a browser that can re-open them is allowed to close
41011
- // them. A page whose whole content sits behind a trigger that needs JS is a page that
41012
- // shows two sentences and nothing else when the script does not run.
41013
- (function () {
41014
- var details = document.getElementById('details');
41015
- var wrap = document.getElementById('reveal-wrap');
41016
- var link = document.getElementById('reveal');
41017
- if (!details || !wrap || !link) return;
41018
- details.hidden = true;
41019
- wrap.hidden = false;
41020
- link.addEventListener('click', function (e) {
41021
- e.preventDefault();
41022
- wrap.hidden = true;
41023
- details.hidden = false;
41024
- });
41025
- })();
41026
-
41027
- document.getElementById('copy').addEventListener('click', function () {
41028
- var t = document.getElementById('cfg').textContent;
41029
- navigator.clipboard.writeText(t).then(function () {
41030
- var b = document.getElementById('copy');
41031
- b.textContent = 'Copied'; setTimeout(function () { b.textContent = 'Copy'; }, 1400);
41032
- });
41033
- });
41034
- </script>
41035
40915
  </body>
41036
40916
  </html>
41037
40917
  `;
@@ -41066,7 +40946,7 @@ function htmlPageSecurityHeaders(extra) {
41066
40946
  }
41067
40947
 
41068
40948
  // src/version.ts
41069
- var SERVER_VERSION = "0.5.17";
40949
+ var SERVER_VERSION = "0.5.18";
41070
40950
 
41071
40951
  // src/connector/siwe-oauth.ts
41072
40952
  var import_node_crypto2 = require("crypto");
@@ -41588,16 +41468,18 @@ function resolveWcProjectId(raw, problems) {
41588
41468
  }
41589
41469
  return raw;
41590
41470
  }
41471
+ var RPC_PROXY_ORIGIN = "https://api.gvnr.xyz";
41472
+ var rpcProxy = (chainId) => `${RPC_PROXY_ORIGIN}/v1/proxy/rpc/${chainId}`;
41591
41473
  var NETWORK_DEFAULTS = {
41592
41474
  sepolia: {
41593
- rpcUrl: "https://ethereum-sepolia-rpc.publicnode.com",
41475
+ rpcUrl: rpcProxy(11155111),
41594
41476
  serviceEndpoint: "https://ops-test.gvnr.xyz",
41595
41477
  litNetwork: "chipotle",
41596
41478
  validatorVersion: 3
41597
41479
  // on-chain validator generation, sepolia (2026-07-30)
41598
41480
  },
41599
41481
  mainnet: {
41600
- rpcUrl: "https://ethereum-rpc.publicnode.com",
41482
+ rpcUrl: rpcProxy(1),
41601
41483
  // Cutover 2026-09-08 — see sdk/src/constants/chunks/network-configs.ts for the full
41602
41484
  // reasoning. Widening, not a rename: ops.gvnr.xyz serves the same broker and cannot be
41603
41485
  // retired while installed copies call it. The sepolia entry above deliberately stays on
@@ -41715,11 +41597,11 @@ function resolveRealConfig(env) {
41715
41597
  problems.push(`DH_SIGNER='${signer}' is not supported for the real adapter. Allowed: external | keystore (or unset).`);
41716
41598
  }
41717
41599
  }
41718
- const network = env["DH_NETWORK"] === void 0 || env["DH_NETWORK"] === "" ? "sepolia" : env["DH_NETWORK"];
41600
+ const network = env["DH_NETWORK"] === void 0 || env["DH_NETWORK"] === "" ? "mainnet" : env["DH_NETWORK"];
41719
41601
  if (NETWORKS[network] === void 0) {
41720
41602
  problems.push(`DH_NETWORK='${network}' is not supported. Allowed: ${Object.keys(NETWORKS).join(" | ")}.`);
41721
41603
  }
41722
- const defaults2 = NETWORK_DEFAULTS[network] ?? NETWORK_DEFAULTS.sepolia;
41604
+ const defaults2 = NETWORK_DEFAULTS[network] ?? NETWORK_DEFAULTS.mainnet;
41723
41605
  const rpcUrl = env["ETH_RPC_URL"] || defaults2.rpcUrl;
41724
41606
  const serviceEndpoint = env["DH_SERVICE_ENDPOINT"] || defaults2.serviceEndpoint;
41725
41607
  if (!/^https:\/\//.test(serviceEndpoint) && !/^http:\/\/(localhost|127\.0\.0\.1)/.test(serviceEndpoint)) {
@@ -44409,9 +44291,25 @@ var SignerManager = class {
44409
44291
  pendingCeremonies: this.deps.pendingCeremonies()
44410
44292
  };
44411
44293
  }
44412
- /** The conversational first-run text every write answers with under mode `none`. */
44294
+ /**
44295
+ * The conversational first-run text every write answers with under mode `none`.
44296
+ *
44297
+ * It states the SCOPE of the refusal first, because the tool list does not change with
44298
+ * signer mode: an assistant that meets this on `loan_mint` still sees `loan_pay`,
44299
+ * `loan_withdraw` and `psm_swap` advertised, and its natural next move is to try one
44300
+ * rather than to run setup. Every one of them refuses identically here
44301
+ * (`BoundaryCore.requireBorrower`), so without that sentence the model rediscovers the
44302
+ * same wall N times and the user watches it flail. Naming the scope converts N refusals
44303
+ * into one instruction.
44304
+ *
44305
+ * It also says reads still work, so "no signer" is not misread as "server broken", and
44306
+ * it offers ONLY the modes this composition can actually construct — a build with no
44307
+ * keystore runtime must not suggest one (the same rule G-CONN-14 holds the guide to).
44308
+ */
44413
44309
  invitation() {
44414
- return "No authorization mode is chosen yet. Choose how to approve operations that move funds: (1) 'use my own wallet' \u2014 you approve each operation in YOUR wallet (MetaMask popup, or a mobile wallet via WalletConnect); (2) 'sign automatically' \u2014 a local keystore signs after each confirmation. Tell the agent which you prefer (it calls signer_setup), or ask for 'guide first-setup'.";
44310
+ const keystoreOffered = this.deps.keystore !== null;
44311
+ const options = keystoreOffered ? "(1) 'use my own wallet' \u2014 you approve each operation in YOUR wallet (MetaMask popup, or a mobile wallet via WalletConnect); (2) 'sign automatically' \u2014 a local keystore signs after each confirmation. " : "'use my own wallet' \u2014 you approve each operation in YOUR wallet. It is the only mode this build offers. ";
44312
+ return `No authorization mode is chosen yet, so EVERY fund-moving tool will refuse with this same message until one is \u2014 trying a different write tool will not get past it. Reading is unaffected: prices, protocol terms and position data all work right now. To move funds, choose how to approve it: ${options}Tell the agent which you prefer (it calls signer_setup), or ask for 'guide first-setup'.`;
44415
44313
  }
44416
44314
  };
44417
44315
  var KeystoreProvider = class {
@@ -82738,7 +82636,7 @@ var RealUpstreamPlugin = class {
82738
82636
  })
82739
82637
  )
82740
82638
  };
82741
- const writeRefusalReason = !this.wallet ? `no signer is configured (SIGNER_UNAVAILABLE) \u2014 writes need the keystore env pair (DH_KEYSTORE_PATH + DH_KEYSTORE_PASSWORD), or run signer_setup.` : `the lit-ops login session is unavailable \u2014 the keystore is configured but EIP-712 login did not complete; check the broker endpoint and retry.`;
82639
+ const writeRefusalReason = !this.wallet ? `no signer is configured (SIGNER_UNAVAILABLE) \u2014 EVERY write refuses for this same reason until one is, so trying a different write tool will not get past it (reads are unaffected). Writes need the keystore env pair (DH_KEYSTORE_PATH + DH_KEYSTORE_PASSWORD), or run signer_setup.` : `the lit-ops login session is unavailable \u2014 the keystore is configured but EIP-712 login did not complete; check the broker endpoint and retry.`;
82742
82640
  const readOnly = (op) => Promise.resolve(
82743
82641
  upFail({
82744
82642
  kind: "unavailable",
@@ -82966,7 +82864,7 @@ var RealUpstreamPlugin = class {
82966
82864
  failure: {
82967
82865
  kind: "signer-missing",
82968
82866
  source: "real-ops",
82969
- message: "no authorization mode is chosen (SIGNER_UNAVAILABLE) \u2014 pick one via signer_setup ('external' = approve in your own wallet, 'keystore' = automatic signing), or set DH_KEYSTORE_PATH and DH_KEYSTORE_PASSWORD in the server environment."
82867
+ message: "no authorization mode is chosen (SIGNER_UNAVAILABLE) \u2014 EVERY fund-moving tool refuses with this same message until one is, so trying a different write tool will not get past it. Reads are unaffected. Pick a mode via signer_setup ('external' = approve in your own wallet, 'keystore' = automatic signing), or set DH_KEYSTORE_PATH and DH_KEYSTORE_PASSWORD in the server environment."
82970
82868
  }
82971
82869
  };
82972
82870
  }
@@ -88097,9 +87995,9 @@ function composeConnector(opts, rawPublicOrigin) {
88097
87995
  }
88098
87996
  if (opts.serveLandingPage) {
88099
87997
  app.get("/", (_req, res) => {
88100
- const { nonce, headers } = htmlPageSecurityHeaders({ "img-src": [BACKGROUND_IMAGE_ORIGIN, "data:"] });
87998
+ const { headers } = htmlPageSecurityHeaders({ "img-src": [BACKGROUND_IMAGE_ORIGIN, "data:"] });
88101
87999
  for (const [k, v] of Object.entries(headers)) res.setHeader(k, v);
88102
- res.type("text/html; charset=utf-8").send(renderLandingPage({ publicOrigin, networks: allowedNetworks, version: SERVER_VERSION, nonce }));
88000
+ res.type("text/html; charset=utf-8").send(renderLandingPage({ publicOrigin, version: SERVER_VERSION }));
88103
88001
  });
88104
88002
  }
88105
88003
  app.use((_req, res) => deny(res, 404, "not found \u2014 the MCP endpoint is /mcp"));
package/dist/index.js CHANGED
@@ -40685,16 +40685,18 @@ function resolveWcProjectId(raw, problems) {
40685
40685
  }
40686
40686
  return raw;
40687
40687
  }
40688
+ var RPC_PROXY_ORIGIN = "https://api.gvnr.xyz";
40689
+ var rpcProxy = (chainId) => `${RPC_PROXY_ORIGIN}/v1/proxy/rpc/${chainId}`;
40688
40690
  var NETWORK_DEFAULTS = {
40689
40691
  sepolia: {
40690
- rpcUrl: "https://ethereum-sepolia-rpc.publicnode.com",
40692
+ rpcUrl: rpcProxy(11155111),
40691
40693
  serviceEndpoint: "https://ops-test.gvnr.xyz",
40692
40694
  litNetwork: "chipotle",
40693
40695
  validatorVersion: 3
40694
40696
  // on-chain validator generation, sepolia (2026-07-30)
40695
40697
  },
40696
40698
  mainnet: {
40697
- rpcUrl: "https://ethereum-rpc.publicnode.com",
40699
+ rpcUrl: rpcProxy(1),
40698
40700
  // Cutover 2026-09-08 — see sdk/src/constants/chunks/network-configs.ts for the full
40699
40701
  // reasoning. Widening, not a rename: ops.gvnr.xyz serves the same broker and cannot be
40700
40702
  // retired while installed copies call it. The sepolia entry above deliberately stays on
@@ -40812,11 +40814,11 @@ function resolveRealConfig(env) {
40812
40814
  problems.push(`DH_SIGNER='${signer}' is not supported for the real adapter. Allowed: external | keystore (or unset).`);
40813
40815
  }
40814
40816
  }
40815
- const network = env["DH_NETWORK"] === void 0 || env["DH_NETWORK"] === "" ? "sepolia" : env["DH_NETWORK"];
40817
+ const network = env["DH_NETWORK"] === void 0 || env["DH_NETWORK"] === "" ? "mainnet" : env["DH_NETWORK"];
40816
40818
  if (NETWORKS[network] === void 0) {
40817
40819
  problems.push(`DH_NETWORK='${network}' is not supported. Allowed: ${Object.keys(NETWORKS).join(" | ")}.`);
40818
40820
  }
40819
- const defaults2 = NETWORK_DEFAULTS[network] ?? NETWORK_DEFAULTS.sepolia;
40821
+ const defaults2 = NETWORK_DEFAULTS[network] ?? NETWORK_DEFAULTS.mainnet;
40820
40822
  const rpcUrl = env["ETH_RPC_URL"] || defaults2.rpcUrl;
40821
40823
  const serviceEndpoint = env["DH_SERVICE_ENDPOINT"] || defaults2.serviceEndpoint;
40822
40824
  if (!/^https:\/\//.test(serviceEndpoint) && !/^http:\/\/(localhost|127\.0\.0\.1)/.test(serviceEndpoint)) {
@@ -43497,9 +43499,25 @@ var SignerManager = class {
43497
43499
  pendingCeremonies: this.deps.pendingCeremonies()
43498
43500
  };
43499
43501
  }
43500
- /** The conversational first-run text every write answers with under mode `none`. */
43502
+ /**
43503
+ * The conversational first-run text every write answers with under mode `none`.
43504
+ *
43505
+ * It states the SCOPE of the refusal first, because the tool list does not change with
43506
+ * signer mode: an assistant that meets this on `loan_mint` still sees `loan_pay`,
43507
+ * `loan_withdraw` and `psm_swap` advertised, and its natural next move is to try one
43508
+ * rather than to run setup. Every one of them refuses identically here
43509
+ * (`BoundaryCore.requireBorrower`), so without that sentence the model rediscovers the
43510
+ * same wall N times and the user watches it flail. Naming the scope converts N refusals
43511
+ * into one instruction.
43512
+ *
43513
+ * It also says reads still work, so "no signer" is not misread as "server broken", and
43514
+ * it offers ONLY the modes this composition can actually construct — a build with no
43515
+ * keystore runtime must not suggest one (the same rule G-CONN-14 holds the guide to).
43516
+ */
43501
43517
  invitation() {
43502
- return "No authorization mode is chosen yet. Choose how to approve operations that move funds: (1) 'use my own wallet' \u2014 you approve each operation in YOUR wallet (MetaMask popup, or a mobile wallet via WalletConnect); (2) 'sign automatically' \u2014 a local keystore signs after each confirmation. Tell the agent which you prefer (it calls signer_setup), or ask for 'guide first-setup'.";
43518
+ const keystoreOffered = this.deps.keystore !== null;
43519
+ const options = keystoreOffered ? "(1) 'use my own wallet' \u2014 you approve each operation in YOUR wallet (MetaMask popup, or a mobile wallet via WalletConnect); (2) 'sign automatically' \u2014 a local keystore signs after each confirmation. " : "'use my own wallet' \u2014 you approve each operation in YOUR wallet. It is the only mode this build offers. ";
43520
+ return `No authorization mode is chosen yet, so EVERY fund-moving tool will refuse with this same message until one is \u2014 trying a different write tool will not get past it. Reading is unaffected: prices, protocol terms and position data all work right now. To move funds, choose how to approve it: ${options}Tell the agent which you prefer (it calls signer_setup), or ask for 'guide first-setup'.`;
43503
43521
  }
43504
43522
  };
43505
43523
  var KeystoreProvider = class {
@@ -81826,7 +81844,7 @@ var RealUpstreamPlugin = class {
81826
81844
  })
81827
81845
  )
81828
81846
  };
81829
- const writeRefusalReason = !this.wallet ? `no signer is configured (SIGNER_UNAVAILABLE) \u2014 writes need the keystore env pair (DH_KEYSTORE_PATH + DH_KEYSTORE_PASSWORD), or run signer_setup.` : `the lit-ops login session is unavailable \u2014 the keystore is configured but EIP-712 login did not complete; check the broker endpoint and retry.`;
81847
+ const writeRefusalReason = !this.wallet ? `no signer is configured (SIGNER_UNAVAILABLE) \u2014 EVERY write refuses for this same reason until one is, so trying a different write tool will not get past it (reads are unaffected). Writes need the keystore env pair (DH_KEYSTORE_PATH + DH_KEYSTORE_PASSWORD), or run signer_setup.` : `the lit-ops login session is unavailable \u2014 the keystore is configured but EIP-712 login did not complete; check the broker endpoint and retry.`;
81830
81848
  const readOnly = (op) => Promise.resolve(
81831
81849
  upFail({
81832
81850
  kind: "unavailable",
@@ -82054,7 +82072,7 @@ var RealUpstreamPlugin = class {
82054
82072
  failure: {
82055
82073
  kind: "signer-missing",
82056
82074
  source: "real-ops",
82057
- message: "no authorization mode is chosen (SIGNER_UNAVAILABLE) \u2014 pick one via signer_setup ('external' = approve in your own wallet, 'keystore' = automatic signing), or set DH_KEYSTORE_PATH and DH_KEYSTORE_PASSWORD in the server environment."
82075
+ message: "no authorization mode is chosen (SIGNER_UNAVAILABLE) \u2014 EVERY fund-moving tool refuses with this same message until one is, so trying a different write tool will not get past it. Reads are unaffected. Pick a mode via signer_setup ('external' = approve in your own wallet, 'keystore' = automatic signing), or set DH_KEYSTORE_PATH and DH_KEYSTORE_PASSWORD in the server environment."
82058
82076
  }
82059
82077
  };
82060
82078
  }
@@ -86688,7 +86706,7 @@ function registerBoundaryInfoResource(server, getB) {
86688
86706
  }
86689
86707
 
86690
86708
  // src/version.ts
86691
- var SERVER_VERSION = "0.5.17";
86709
+ var SERVER_VERSION = "0.5.18";
86692
86710
 
86693
86711
  // src/server.ts
86694
86712
  var SERVER_INSTRUCTIONS = "Diamond Hands MCP \u2014 Bitcoin-collateralized borrowing. Before promising ANY flow, read the boundary://info resource and honor its `capabilities` block: it states which network this server is on, whether money is real (practiceWorld), whether writes are enabled (and the true reason when they are not), and which signer modes this build actually offers \u2014 never describe a flow outside it. State the network and whether funds are real when the user first acts. Authorization is chosen by conversation via the signer_setup tool (when listed); writes always require confirmed:true after showing the human-readable card. For walkthroughs consult the guide tool / guide:// resources instead of inventing steps; when a tool refuses, relay its stated reason and remedy \u2014 do not improvise alternatives. When a network_switch tool is listed, the network can change mid-session \u2014 after ANY switch, re-read boundary://info and state the new network and money reality to the user before doing anything else. When the user asks to disconnect / log out / sign out / forget or remove their wallet, call signer_setup action 'disconnect' (the full flush) \u2014 never treat 'reset-borrower' as a disconnect; it only swaps identity. READING DATA: a payload's fields and notes are authoritative \u2014 state what they say, never speculate past them, and when the data does not carry something, say 'the data does not carry X'. Field meanings live in guide topic 'reading-data'; `reading` notes inside a result are interpretation instructions for that exact payload \u2014 follow them over any prior assumption.";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gvnrdao/dh-mcp",
3
- "version": "0.5.17",
3
+ "version": "0.5.18",
4
4
  "description": "MCP server for the Diamond Hands protocol",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {