@gvnrdao/dh-mcp 0.4.0 → 0.5.0

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
@@ -11,13 +11,13 @@ so there is **nothing to install first** (no Node, no npm):
11
11
 
12
12
  | You are on | Install path |
13
13
  |---|---|
14
- | **Claude Desktop (macOS / Windows)** | Download the bundle and open it (double-click / drag into Settings → Extensions): `https://assets.gvnr.xyz/dh-mcp/v0.4.0/dh-mcp-0.4.0.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.4.0 sh` |
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.0/dh-mcp-0.5.0.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.0 sh` |
16
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
17
 
18
18
  Downloads landing page (which file is for which system, checksums, security notes):
19
19
  **https://assets.gvnr.xyz/dh-mcp/** — all artifacts and `SHA256SUMS` live under it
20
- (`latest/` and `v<version>/` — e.g. `v0.4.0/`).
20
+ (`latest/` and `v<version>/` — e.g. `v0.5.0/`).
21
21
 
22
22
  Local installs serve local MCP hosts only — **claude.ai web / mobile / Cowork cannot
23
23
  reach them** (a hosted remote connector is a separate, upcoming tier).
@@ -56,7 +56,7 @@ paste-code) or a local encrypted keystore. Safe smart-account and delegation mod
56
56
 
57
57
  | Network | Reads (public) | Reads (authenticated) | Writes |
58
58
  |---|---|---|---|
59
- | **sepolia** (default — the real protocol, practice money) | always, no setup | after a login: keystore env pair, or "connect my wallet" (`signer_setup`) | signer modes **keystore** and **external** (your own wallet). External-mode BTC withdrawal is not shipped yet — it refuses with that true reason; keystore withdrawal works |
59
+ | **sepolia** (default — the real protocol, practice money) | always, no setup | after a login: keystore env pair, or "connect my wallet" (`signer_setup`) | signer modes **keystore** and **external** (your own wallet). External-mode BTC withdrawal signs the SDK's bare auth hashes **blind** — same as the web app; the approval page says so loudly |
60
60
  | **mainnet** (real money) | always (indexer gaps are reported honestly) | after a login (the broker throttles logins per address) | signer modes **keystore** and **external**, same as sepolia — every operation moves REAL funds behind your confirmation + signature; PSM writes refuse (sepolia-only) |
61
61
  | **mock** (`DH_ADAPTER=mock` — offline practice sandbox) | always | always | all modes, including the simulated Safe and delegation planes |
62
62
 
@@ -153,8 +153,9 @@ diagrams, data contracts, scenario catalog) live in the repository:
153
153
  (missing config, uncollateralized operations, source divergence, upstream outages).
154
154
  - Current stage: **real adapter (sepolia AND mainnet, reads and writes) + mock
155
155
  simulator**, all behind the same boundary contract and the same scenario suites.
156
- External-wallet signing runs on the real adapter; external-mode BTC withdrawal is the
157
- one remaining refusal (its true reason is stated; keystore withdrawal works).
156
+ External-wallet signing runs on the real adapter, including BTC withdrawal (blind
157
+ hash signatures, site-parity — the approval card states the contents are not
158
+ decodable; keystore withdrawal signs locally).
158
159
  - Reads are unrestricted, with indexer gaps reported honestly.
159
160
 
160
161
  ## Security model
package/dist/boundary.js CHANGED
@@ -87369,7 +87369,13 @@ var PERSONAL_SIGN_LAYOUTS = {
87369
87369
  hashUtf8Fields: ["action"]
87370
87370
  }
87371
87371
  };
87372
+ var RAW_HASH_LAYOUT = "dh-raw-hash-v1";
87372
87373
  function hashForLayout(layout, fields) {
87374
+ if (layout === RAW_HASH_LAYOUT) {
87375
+ const raw = fields["hash"];
87376
+ if (!/^0x[0-9a-fA-F]{64}$/.test(raw ?? "")) throw new Error(`page-crypto: layout "${layout}" needs a 32-byte 0x-hex "hash" field`);
87377
+ return raw.toLowerCase();
87378
+ }
87373
87379
  const def = PERSONAL_SIGN_LAYOUTS[layout];
87374
87380
  if (!def) throw new Error(`page-crypto: unknown layout "${layout}"`);
87375
87381
  const hashUtf8 = new Set(def.hashUtf8Fields);
@@ -87537,6 +87543,15 @@ var PAGE_CRYPTO_JS = `"use strict";
87537
87543
  var PERSONAL_SIGN_LAYOUTS = ${JSON.stringify(PERSONAL_SIGN_LAYOUTS)};
87538
87544
 
87539
87545
  function packAndHash(layout, fields) {
87546
+ // SITE-PARITY blind-sign layout: identity \u2014 the hash field IS the hash (see the
87547
+ // RAW_HASH_LAYOUT note in page-crypto.ts; both sides special-case identically).
87548
+ if (layout === "dh-raw-hash-v1") {
87549
+ var rawHash = fields ? fields.hash : undefined;
87550
+ if (!rawHash || !/^0x[0-9a-fA-F]{64}$/.test(rawHash)) {
87551
+ throw new Error("dhPageCrypto: layout \\"dh-raw-hash-v1\\" needs a 32-byte 0x-hex hash field");
87552
+ }
87553
+ return rawHash.toLowerCase();
87554
+ }
87540
87555
  var def = PERSONAL_SIGN_LAYOUTS[layout];
87541
87556
  if (!def) {
87542
87557
  throw new Error("dhPageCrypto: unknown layout \\"" + layout + "\\"");
@@ -87755,6 +87770,11 @@ function buildWriteOps(deps) {
87755
87770
  createPosition: async (p) => {
87756
87771
  const sdk = deps.getWriteSdk();
87757
87772
  if (!sdk) return upFail({ kind: "unavailable", source: SOURCE5, message: "write SDK is not initialized (its boot-time construction failed)" });
87773
+ try {
87774
+ await deps.assertValidatorConfigured();
87775
+ } catch (e) {
87776
+ return upFail({ kind: "rejected", source: SOURCE5, message: `createPosition preflight: ${e.message}` });
87777
+ }
87758
87778
  let result;
87759
87779
  try {
87760
87780
  result = await sdk.createLoan({ selectedTerm: p.selectedTerm });
@@ -88277,10 +88297,37 @@ var BridgeEthersSigner = class _BridgeEthersSigner extends import_ethers36.ether
88277
88297
  async getAddress() {
88278
88298
  return this.deps.borrower;
88279
88299
  }
88280
- async signMessage(_message) {
88281
- throw new Error(
88282
- "external-wallet mode cannot sign this operation yet: it needs a raw message signature whose fields are built inside the SDK (BTC withdrawal). That is the plan-10 Phase A-2 signing-context seam \u2014 use the keystore signer for this operation until it lands."
88283
- );
88300
+ async signMessage(message) {
88301
+ const bytes = typeof message === "string" ? import_ethers36.ethers.toUtf8Bytes(message) : message;
88302
+ if (bytes.length !== 32) {
88303
+ throw new Error(
88304
+ `external-wallet signMessage accepts only the SDK's bare 32-byte auth hashes (got ${bytes.length} bytes) \u2014 no other raw-message signing rides this path.`
88305
+ );
88306
+ }
88307
+ const hashHex = import_ethers36.ethers.hexlify(bytes).toLowerCase();
88308
+ const outcome = await this.deps.bridge.requestSignature({
88309
+ id: (0, import_node_crypto5.randomUUID)(),
88310
+ kind: "personal-sign",
88311
+ action: "btc-withdrawal authorization (blind hash)",
88312
+ card: [
88313
+ "BLIND SIGNATURE \u2014 BTC withdrawal authorization step",
88314
+ `hash: ${hashHex}`,
88315
+ "This hash is built inside the SDK and its contents CANNOT be decoded or verified by this page",
88316
+ "(identical to how diamondhands.credit signs withdrawals).",
88317
+ "Approve ONLY if you initiated this exact BTC withdrawal in the conversation."
88318
+ ],
88319
+ expectedSigner: this.deps.borrower,
88320
+ chainId: this.deps.chainId,
88321
+ personalSign: { layout: RAW_HASH_LAYOUT, fields: { hash: hashHex }, hashHex }
88322
+ });
88323
+ if (outcome.status !== "approved" || !outcome.signature) {
88324
+ throw new OperationDeclined(`the btc-withdrawal authorization was not signed: ${describeOutcome(outcome)}`);
88325
+ }
88326
+ const recovered = import_ethers36.ethers.verifyMessage(bytes, outcome.signature);
88327
+ if (recovered.toLowerCase() !== this.deps.borrower.toLowerCase()) {
88328
+ throw new Error(`the btc-withdrawal authorization was signed by ${recovered}, not the borrower ${this.deps.borrower}`);
88329
+ }
88330
+ return outcome.signature;
88284
88331
  }
88285
88332
  async signTypedData(domain, types, value) {
88286
88333
  const typedData = {
@@ -88668,9 +88715,33 @@ var RealUpstreamPlugin = class {
88668
88715
  session,
88669
88716
  getWriteSdk: () => this.sdkCache.get(key) ?? null,
88670
88717
  readDetails: (id) => this.readPositionDetails(id),
88671
- psm: () => this.psmCalls()
88718
+ psm: () => this.psmCalls(),
88719
+ assertValidatorConfigured: () => this.assertValidatorConfigured()
88672
88720
  });
88673
88721
  }
88722
+ /** Live preflight (field bug, 2026-08-05): the configured validator generation must be
88723
+ * registered on-chain — on mainnet only version 3 exists, and a wrong version makes
88724
+ * createPosition revert ValidatorNotConfigured, which the user's wallet can only show
88725
+ * as an illegible "likely to fail". One eth_call turns that into a legible refusal. */
88726
+ async assertValidatorConfigured() {
88727
+ const version2 = this.config.validatorVersion ?? 1;
88728
+ const pkpValidation = this.contracts["PKPValidation"];
88729
+ if (!pkpValidation) {
88730
+ throw new Error(`the SDK's ${this.config.network} deployment table has no PKPValidation address \u2014 cannot verify validator version ${version2}.`);
88731
+ }
88732
+ const registry = new import_ethers37.ethers.Contract(pkpValidation, ["function validatorForVersion(uint256) view returns (address)"], this.provider);
88733
+ let validator;
88734
+ try {
88735
+ validator = await registry.validatorForVersion(version2);
88736
+ } catch (e) {
88737
+ throw new Error(`could not verify validator version ${version2} on-chain (PKPValidation ${pkpValidation}): ${e.message}`);
88738
+ }
88739
+ if (validator === import_ethers37.ethers.ZeroAddress) {
88740
+ throw new Error(
88741
+ `validator version ${version2} is NOT registered on ${this.config.network} (PKPValidation ${pkpValidation} returns the zero address) \u2014 the transaction would revert ValidatorNotConfigured. Set DH_VALIDATOR_VERSION to the network's registered generation.`
88742
+ );
88743
+ }
88744
+ }
88674
88745
  sessionFor(key, signer) {
88675
88746
  let s = this.sessionCache.get(key);
88676
88747
  if (!s) {
@@ -88777,7 +88848,8 @@ var RealUpstreamPlugin = class {
88777
88848
  session,
88778
88849
  getWriteSdk: () => this.sdkCache.get(key) ?? null,
88779
88850
  readDetails: (id) => this.readPositionDetails(id),
88780
- psm: () => this.psmCalls()
88851
+ psm: () => this.psmCalls(),
88852
+ assertValidatorConfigured: () => this.assertValidatorConfigured()
88781
88853
  });
88782
88854
  this.opsGatewayCache.set(key, gateway);
88783
88855
  }
@@ -90018,7 +90090,11 @@ var NETWORK_DEFAULTS = {
90018
90090
  mainnet: {
90019
90091
  rpcUrl: "https://ethereum-rpc.publicnode.com",
90020
90092
  serviceEndpoint: "https://ops.gvnr.xyz",
90021
- litNetwork: "chipotle"
90093
+ litNetwork: "chipotle",
90094
+ // On-chain PKPValidation generation, mainnet (validatorForVersion(3) is the ONLY
90095
+ // registered validator — verified live 2026-08-05). Without this the SDK defaults
90096
+ // to 1 and createPosition reverts ValidatorNotConfigured in wallet simulation.
90097
+ validatorVersion: 3
90022
90098
  }
90023
90099
  };
90024
90100
  function resolveBoundaryConfig(env) {
package/dist/index.js CHANGED
@@ -52072,7 +52072,11 @@ var NETWORK_DEFAULTS = {
52072
52072
  mainnet: {
52073
52073
  rpcUrl: "https://ethereum-rpc.publicnode.com",
52074
52074
  serviceEndpoint: "https://ops.gvnr.xyz",
52075
- litNetwork: "chipotle"
52075
+ litNetwork: "chipotle",
52076
+ // On-chain PKPValidation generation, mainnet (validatorForVersion(3) is the ONLY
52077
+ // registered validator — verified live 2026-08-05). Without this the SDK defaults
52078
+ // to 1 and createPosition reverts ValidatorNotConfigured in wallet simulation.
52079
+ validatorVersion: 3
52076
52080
  }
52077
52081
  };
52078
52082
  function resolveBoundaryConfig(env) {
@@ -87567,7 +87571,13 @@ var PERSONAL_SIGN_LAYOUTS = {
87567
87571
  hashUtf8Fields: ["action"]
87568
87572
  }
87569
87573
  };
87574
+ var RAW_HASH_LAYOUT = "dh-raw-hash-v1";
87570
87575
  function hashForLayout(layout, fields) {
87576
+ if (layout === RAW_HASH_LAYOUT) {
87577
+ const raw = fields["hash"];
87578
+ if (!/^0x[0-9a-fA-F]{64}$/.test(raw ?? "")) throw new Error(`page-crypto: layout "${layout}" needs a 32-byte 0x-hex "hash" field`);
87579
+ return raw.toLowerCase();
87580
+ }
87571
87581
  const def = PERSONAL_SIGN_LAYOUTS[layout];
87572
87582
  if (!def) throw new Error(`page-crypto: unknown layout "${layout}"`);
87573
87583
  const hashUtf8 = new Set(def.hashUtf8Fields);
@@ -87735,6 +87745,15 @@ var PAGE_CRYPTO_JS = `"use strict";
87735
87745
  var PERSONAL_SIGN_LAYOUTS = ${JSON.stringify(PERSONAL_SIGN_LAYOUTS)};
87736
87746
 
87737
87747
  function packAndHash(layout, fields) {
87748
+ // SITE-PARITY blind-sign layout: identity \u2014 the hash field IS the hash (see the
87749
+ // RAW_HASH_LAYOUT note in page-crypto.ts; both sides special-case identically).
87750
+ if (layout === "dh-raw-hash-v1") {
87751
+ var rawHash = fields ? fields.hash : undefined;
87752
+ if (!rawHash || !/^0x[0-9a-fA-F]{64}$/.test(rawHash)) {
87753
+ throw new Error("dhPageCrypto: layout \\"dh-raw-hash-v1\\" needs a 32-byte 0x-hex hash field");
87754
+ }
87755
+ return rawHash.toLowerCase();
87756
+ }
87738
87757
  var def = PERSONAL_SIGN_LAYOUTS[layout];
87739
87758
  if (!def) {
87740
87759
  throw new Error("dhPageCrypto: unknown layout \\"" + layout + "\\"");
@@ -87953,6 +87972,11 @@ function buildWriteOps(deps) {
87953
87972
  createPosition: async (p) => {
87954
87973
  const sdk = deps.getWriteSdk();
87955
87974
  if (!sdk) return upFail({ kind: "unavailable", source: SOURCE5, message: "write SDK is not initialized (its boot-time construction failed)" });
87975
+ try {
87976
+ await deps.assertValidatorConfigured();
87977
+ } catch (e) {
87978
+ return upFail({ kind: "rejected", source: SOURCE5, message: `createPosition preflight: ${e.message}` });
87979
+ }
87956
87980
  let result;
87957
87981
  try {
87958
87982
  result = await sdk.createLoan({ selectedTerm: p.selectedTerm });
@@ -88475,10 +88499,37 @@ var BridgeEthersSigner = class _BridgeEthersSigner extends import_ethers36.ether
88475
88499
  async getAddress() {
88476
88500
  return this.deps.borrower;
88477
88501
  }
88478
- async signMessage(_message) {
88479
- throw new Error(
88480
- "external-wallet mode cannot sign this operation yet: it needs a raw message signature whose fields are built inside the SDK (BTC withdrawal). That is the plan-10 Phase A-2 signing-context seam \u2014 use the keystore signer for this operation until it lands."
88481
- );
88502
+ async signMessage(message) {
88503
+ const bytes = typeof message === "string" ? import_ethers36.ethers.toUtf8Bytes(message) : message;
88504
+ if (bytes.length !== 32) {
88505
+ throw new Error(
88506
+ `external-wallet signMessage accepts only the SDK's bare 32-byte auth hashes (got ${bytes.length} bytes) \u2014 no other raw-message signing rides this path.`
88507
+ );
88508
+ }
88509
+ const hashHex = import_ethers36.ethers.hexlify(bytes).toLowerCase();
88510
+ const outcome = await this.deps.bridge.requestSignature({
88511
+ id: (0, import_node_crypto5.randomUUID)(),
88512
+ kind: "personal-sign",
88513
+ action: "btc-withdrawal authorization (blind hash)",
88514
+ card: [
88515
+ "BLIND SIGNATURE \u2014 BTC withdrawal authorization step",
88516
+ `hash: ${hashHex}`,
88517
+ "This hash is built inside the SDK and its contents CANNOT be decoded or verified by this page",
88518
+ "(identical to how diamondhands.credit signs withdrawals).",
88519
+ "Approve ONLY if you initiated this exact BTC withdrawal in the conversation."
88520
+ ],
88521
+ expectedSigner: this.deps.borrower,
88522
+ chainId: this.deps.chainId,
88523
+ personalSign: { layout: RAW_HASH_LAYOUT, fields: { hash: hashHex }, hashHex }
88524
+ });
88525
+ if (outcome.status !== "approved" || !outcome.signature) {
88526
+ throw new OperationDeclined(`the btc-withdrawal authorization was not signed: ${describeOutcome(outcome)}`);
88527
+ }
88528
+ const recovered = import_ethers36.ethers.verifyMessage(bytes, outcome.signature);
88529
+ if (recovered.toLowerCase() !== this.deps.borrower.toLowerCase()) {
88530
+ throw new Error(`the btc-withdrawal authorization was signed by ${recovered}, not the borrower ${this.deps.borrower}`);
88531
+ }
88532
+ return outcome.signature;
88482
88533
  }
88483
88534
  async signTypedData(domain, types, value) {
88484
88535
  const typedData = {
@@ -88866,9 +88917,33 @@ var RealUpstreamPlugin = class {
88866
88917
  session,
88867
88918
  getWriteSdk: () => this.sdkCache.get(key) ?? null,
88868
88919
  readDetails: (id) => this.readPositionDetails(id),
88869
- psm: () => this.psmCalls()
88920
+ psm: () => this.psmCalls(),
88921
+ assertValidatorConfigured: () => this.assertValidatorConfigured()
88870
88922
  });
88871
88923
  }
88924
+ /** Live preflight (field bug, 2026-08-05): the configured validator generation must be
88925
+ * registered on-chain — on mainnet only version 3 exists, and a wrong version makes
88926
+ * createPosition revert ValidatorNotConfigured, which the user's wallet can only show
88927
+ * as an illegible "likely to fail". One eth_call turns that into a legible refusal. */
88928
+ async assertValidatorConfigured() {
88929
+ const version2 = this.config.validatorVersion ?? 1;
88930
+ const pkpValidation = this.contracts["PKPValidation"];
88931
+ if (!pkpValidation) {
88932
+ throw new Error(`the SDK's ${this.config.network} deployment table has no PKPValidation address \u2014 cannot verify validator version ${version2}.`);
88933
+ }
88934
+ const registry = new import_ethers37.ethers.Contract(pkpValidation, ["function validatorForVersion(uint256) view returns (address)"], this.provider);
88935
+ let validator;
88936
+ try {
88937
+ validator = await registry.validatorForVersion(version2);
88938
+ } catch (e) {
88939
+ throw new Error(`could not verify validator version ${version2} on-chain (PKPValidation ${pkpValidation}): ${e.message}`);
88940
+ }
88941
+ if (validator === import_ethers37.ethers.ZeroAddress) {
88942
+ throw new Error(
88943
+ `validator version ${version2} is NOT registered on ${this.config.network} (PKPValidation ${pkpValidation} returns the zero address) \u2014 the transaction would revert ValidatorNotConfigured. Set DH_VALIDATOR_VERSION to the network's registered generation.`
88944
+ );
88945
+ }
88946
+ }
88872
88947
  sessionFor(key, signer) {
88873
88948
  let s = this.sessionCache.get(key);
88874
88949
  if (!s) {
@@ -88975,7 +89050,8 @@ var RealUpstreamPlugin = class {
88975
89050
  session,
88976
89051
  getWriteSdk: () => this.sdkCache.get(key) ?? null,
88977
89052
  readDetails: (id) => this.readPositionDetails(id),
88978
- psm: () => this.psmCalls()
89053
+ psm: () => this.psmCalls(),
89054
+ assertValidatorConfigured: () => this.assertValidatorConfigured()
88979
89055
  });
88980
89056
  this.opsGatewayCache.set(key, gateway);
88981
89057
  }
@@ -91539,14 +91615,16 @@ the mock.
91539
91615
  authenticated call refuses with the same remedy \u2014 an explicit reconnect, never a
91540
91616
  surprise popup. On mainnet the broker also throttles logins per address \u2014 a throttled
91541
91617
  login means "wait and retry", not a wallet failure.
91542
- - **Withdraw-BTC under external mode is not shipped yet** (the SDK signing-context seam
91543
- is pending) \u2014 it refuses with that true reason; keystore-mode withdraw works.
91618
+ - **Withdraw-BTC under external mode is a BLIND signature** \u2014 the SDK builds the two
91619
+ withdrawal auth hashes internally, so the approval page shows the bare hash and says
91620
+ plainly it cannot decode the contents (the production web app signs the same way).
91621
+ Tell the user this before the popups: two hash signatures, then the BTC moves.
91544
91622
  - **The allowlist delay is read LIVE from the chain.** A new BTC withdrawal destination
91545
91623
  (\`loan_allowlist_destination\`) becomes usable only after the chain's own delay \u2014 24
91546
91624
  hours on mainnet, so allowlisting and withdrawing happen on DIFFERENT DAYS there. The
91547
91625
  card states the live figure.
91548
- - **Mainnet:** writes are disabled unless the operator explicitly arms them, and the
91549
- minimum mint is 10 UCD.`,
91626
+ - **Mainnet:** every fund-moving operation spends REAL money, and the minimum mint is
91627
+ 10 UCD.`,
91550
91628
  lifecycle: `# The full lifecycle \u2014 exact calls
91551
91629
 
91552
91630
  1. **Create** \u2014 \`loan_create {selectedTerm, confirmed:true}\` \u2192 position id, vault address.
@@ -91802,8 +91880,9 @@ reality in your next message. The user must never have to ask which world they a
91802
91880
  - **"Wrong network" / wants mainnet or sepolia** \u2014 real adapter: \`network_switch\`
91803
91881
  (human-confirmed card; nothing carries across networks). Mock: the world is pinned by
91804
91882
  config \u2014 no switch exists there.
91805
- - **External-mode withdraw refused** \u2014 withdraw-BTC under external mode is not shipped
91806
- yet (the SDK signing-context seam is pending); keystore-mode withdraw works.
91883
+ - **External-mode withdraw shows a bare hash** \u2014 that is by design (site parity): the
91884
+ SDK builds the withdrawal auth hashes internally, so the page cannot decode them.
91885
+ Two blind hash signatures per withdrawal; warn the user before triggering them.
91807
91886
  - **Login throttled (mainnet)** \u2014 the broker limits logins per address; wait and retry.
91808
91887
  That is the broker throttle, not a wallet failure.
91809
91888
  - **VALIDATION_FAILED** \u2014 the input itself is off (bad address format, too many decimals,
@@ -92150,7 +92229,7 @@ function registerBoundaryInfoResource(server, getB) {
92150
92229
  }
92151
92230
 
92152
92231
  // src/server.ts
92153
- var SERVER_VERSION = "0.4.0";
92232
+ var SERVER_VERSION = "0.5.0";
92154
92233
  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.";
92155
92234
  function createServer2(deps) {
92156
92235
  const server = new import_mcp2.McpServer(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gvnrdao/dh-mcp",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "MCP server for the Diamond Hands protocol — Bitcoin-collateralized UCD lending with human-approved signing (sepolia practice by default; mainnet fully enabled)",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {