@gvnrdao/dh-mcp 0.5.31 → 0.5.33

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/connector.js CHANGED
@@ -14501,30 +14501,30 @@ var require_pkg_src = __commonJS({
14501
14501
  }
14502
14502
  },
14503
14503
  btcTransactionSigner: {
14504
- cid: "QmdkwUmLb8QLy2ixRW2db58VsfMS4Y2ydVSAYBvemMJEEc",
14504
+ cid: "QmSTRJ5MzhJQ3mBJHys8mgBfn3yQtP5hu3wo2WzvJxafxs",
14505
14505
  authorizedCidHex: cidToHex(
14506
- "QmdkwUmLb8QLy2ixRW2db58VsfMS4Y2ydVSAYBvemMJEEc"
14506
+ "QmSTRJ5MzhJQ3mBJHys8mgBfn3yQtP5hu3wo2WzvJxafxs"
14507
14507
  ),
14508
14508
  name: "Btc Transaction Signer",
14509
14509
  description: "Production Btc Transaction Signer",
14510
- version: "1.4.1",
14510
+ version: "1.5.0",
14511
14511
  deployed: true,
14512
- deployedAt: 1795347714758,
14513
- size: 83859,
14514
- hash: "45842d33ad4372707b4d9908b1e2a034d625eb14af81bf178426cd565dd73ec0"
14512
+ deployedAt: 1795563786470,
14513
+ size: 83923,
14514
+ hash: "a0b1a1a349d7594a4a8e9b0a360ba3964099d4c35831a530205ec5f0c7fb624c"
14515
14515
  },
14516
14516
  ucdMintValidator: {
14517
- cid: "Qmb8ghjszv5ckgNyBRu9WWQKjWbn8dvbpPBzD7XXQs7UBA",
14517
+ cid: "QmQB3ftrLLfrMs1XVzyzGBuVmCPU7ePfDU9vtFhjFi62pn",
14518
14518
  authorizedCidHex: cidToHex(
14519
- "Qmb8ghjszv5ckgNyBRu9WWQKjWbn8dvbpPBzD7XXQs7UBA"
14519
+ "QmQB3ftrLLfrMs1XVzyzGBuVmCPU7ePfDU9vtFhjFi62pn"
14520
14520
  ),
14521
14521
  name: "Ucd Mint Validator",
14522
14522
  description: "Production Ucd Mint Validator",
14523
- version: "1.6.1",
14523
+ version: "1.7.0",
14524
14524
  deployed: true,
14525
- deployedAt: 1795347723560,
14526
- size: 93011,
14527
- hash: "4648b31b7c8b9687ef997af48dbcb123157eceb628ae81e4a39d48690a5aaa95",
14525
+ deployedAt: 1795563807907,
14526
+ size: 93075,
14527
+ hash: "fd1dba7ba6cab4022b8e7be4b9812a04b2e9baab90c864d57bb51ea7354f426f",
14528
14528
  validatorWalletAddress: "0xEfb258D455a31d061Bbeb3DE3D2143BdFCB67a6C",
14529
14529
  pkp: {
14530
14530
  publicKey: "0x041ab17cd91fc5c0b761eea6092d032807561b621b82c488826776e04a9158d61ba64d809a4729f0501289d980732cb06d8dfd06999dd9c8efd2f495dad78b31bb",
@@ -14532,17 +14532,17 @@ var require_pkg_src = __commonJS({
14532
14532
  }
14533
14533
  },
14534
14534
  processPaymentValidator: {
14535
- cid: "QmVTF8ZsQFcFWWNA24S6hFucARGSzFQC4VoWj5mwRgnUPZ",
14535
+ cid: "Qmeq2rArEzMumTYN8PssuvRUZACk6kjzP9pgMtA7NnpiC7",
14536
14536
  authorizedCidHex: cidToHex(
14537
- "QmVTF8ZsQFcFWWNA24S6hFucARGSzFQC4VoWj5mwRgnUPZ"
14537
+ "Qmeq2rArEzMumTYN8PssuvRUZACk6kjzP9pgMtA7NnpiC7"
14538
14538
  ),
14539
14539
  name: "Process Payment Validator",
14540
14540
  description: "Production Process Payment Validator",
14541
- version: "1.3.6",
14541
+ version: "1.4.0",
14542
14542
  deployed: true,
14543
- deployedAt: 1795347732060,
14544
- size: 88171,
14545
- hash: "00ecd6fafcbb5adf0fb2268b8366f3e03565aa5b930264db71aa07c43cd5dbd2",
14543
+ deployedAt: 1795563821504,
14544
+ size: 88235,
14545
+ hash: "d78862dc1574a04818f2fd824394f2efab70e9674defc88b234a03862982ddda",
14546
14546
  validatorWalletAddress: "0xEfb258D455a31d061Bbeb3DE3D2143BdFCB67a6C",
14547
14547
  pkp: {
14548
14548
  publicKey: "0x04cfccb9b6c7addc79469c0e9fafebef4c70801302c62cdb26b610723a9b8527d23f98a40158c7340d83fd0e62d02b5ec74c12f7a86d98e8c6973b4811110f19ad",
@@ -14550,17 +14550,17 @@ var require_pkg_src = __commonJS({
14550
14550
  }
14551
14551
  },
14552
14552
  extendPositionValidator: {
14553
- cid: "QmeL5EC8SzsgcvT72PMRDPWyE2d8F7CnoQSPiQhbcn3hf2",
14553
+ cid: "QmZsLdkD6VdpBCseW2LsXGW7SYDMezq8NgWUQjVVbDXCLj",
14554
14554
  authorizedCidHex: cidToHex(
14555
- "QmeL5EC8SzsgcvT72PMRDPWyE2d8F7CnoQSPiQhbcn3hf2"
14555
+ "QmZsLdkD6VdpBCseW2LsXGW7SYDMezq8NgWUQjVVbDXCLj"
14556
14556
  ),
14557
14557
  name: "Extend Position Validator",
14558
14558
  description: "Production Extend Position Validator",
14559
- version: "1.3.6",
14559
+ version: "1.4.0",
14560
14560
  deployed: true,
14561
- deployedAt: 1795347740736,
14562
- size: 85447,
14563
- hash: "345d5c4f134b93bc36c345e7cf63fd7eba003138c4f061739ea97f3844d91290",
14561
+ deployedAt: 1795563831913,
14562
+ size: 85511,
14563
+ hash: "44ee02e254b28271a851bd26a12334d0302b27877029c3824eb406e0df697fd1",
14564
14564
  validatorWalletAddress: "0xEfb258D455a31d061Bbeb3DE3D2143BdFCB67a6C",
14565
14565
  pkp: {
14566
14566
  publicKey: "0x04e52338f6a0c3362800f1a94c4c8f08be5030dde0fa217388c53d1c1a4790f4443c9f2886b2d2d8f4b75a9a156e9b028011b1a1cf7648da0e556aa980ec692836",
@@ -14568,17 +14568,17 @@ var require_pkg_src = __commonJS({
14568
14568
  }
14569
14569
  },
14570
14570
  btcWithdrawal: {
14571
- cid: "QmR9ZpRLQPsbZTKyX3AdCLwvgkCeA1wqq4p738ChQ9u7PQ",
14571
+ cid: "QmSzTK5gM9tp1Mp4UGwu7iHQYMkxtyjmtbEDvETG9A38ge",
14572
14572
  authorizedCidHex: cidToHex(
14573
- "QmR9ZpRLQPsbZTKyX3AdCLwvgkCeA1wqq4p738ChQ9u7PQ"
14573
+ "QmSzTK5gM9tp1Mp4UGwu7iHQYMkxtyjmtbEDvETG9A38ge"
14574
14574
  ),
14575
14575
  name: "Btc Withdrawal",
14576
14576
  description: "Production Btc Withdrawal",
14577
- version: "1.5.1",
14577
+ version: "1.6.0",
14578
14578
  deployed: true,
14579
- deployedAt: 1795347749573,
14580
- size: 104338,
14581
- hash: "37fa9caedd6d79ab5ab5bbad68e315571c874254aed852b2e2cee4b052f47f42",
14579
+ deployedAt: 1795563842248,
14580
+ size: 104402,
14581
+ hash: "3539732d8701c7473dbb7a8af0c23a085b7f7dff7171c74bd2587f6e95abb13d",
14582
14582
  validatorWalletAddress: "0xEfb258D455a31d061Bbeb3DE3D2143BdFCB67a6C",
14583
14583
  pkp: {
14584
14584
  publicKey: "0x043616787c5432415c24378c4ef48de2bcd6bb7b575b837e3cff09171802662da7105d79586c7659677a0ecbaddac4cce06cb2a11f69a16fa0c4d7002ac7d51a4d",
@@ -14690,17 +14690,17 @@ var require_pkg_src = __commonJS({
14690
14690
  hash: "03ee5be239c91c735d2c95db89a0d1b77e602cfc18af8eb64b3281fddcd90a72"
14691
14691
  },
14692
14692
  agentModuleExecutor: {
14693
- cid: "QmbiqWXkbWmr12vpLyGjQxyY226rrAu8wmmsTbSsS8VaLn",
14693
+ cid: "QmQ1kQ6BsXALB48Lg1oUpnrfpQ5CtPjet2UG29MwcsRgPV",
14694
14694
  authorizedCidHex: cidToHex(
14695
- "QmbiqWXkbWmr12vpLyGjQxyY226rrAu8wmmsTbSsS8VaLn"
14695
+ "QmQ1kQ6BsXALB48Lg1oUpnrfpQ5CtPjet2UG29MwcsRgPV"
14696
14696
  ),
14697
14697
  name: "Agent Module Executor",
14698
14698
  description: "Production Agent Module Executor",
14699
- version: "1.4.1",
14699
+ version: "1.5.0",
14700
14700
  deployed: true,
14701
- deployedAt: 1795347784951,
14702
- size: 22599,
14703
- hash: "2e83c2ab4742fb3890191bc3dff884371536fc9f764528d098f8d9b2291a7cdf"
14701
+ deployedAt: 1795563851831,
14702
+ size: 22663,
14703
+ hash: "4a7163e7f04ed1477ea36264f85dd698a7f2bdf096b219b60fae0697bbe10f45"
14704
14704
  },
14705
14705
  staleSpendRecoveryValidator: {
14706
14706
  cid: "QmbEwx37vbQ3PNTWbAqMw9UsCcxNaBeYtJUopmjGQdCZ3R",
@@ -14721,47 +14721,47 @@ var require_pkg_src = __commonJS({
14721
14721
  }
14722
14722
  },
14723
14723
  btcUtxoInvalidator: {
14724
- cid: "QmVFmmsAYyvCzbQk8AWW86DhZ5YP5XRroCP8vZK6LXvivm",
14724
+ cid: "QmUNWrxPBzSDiNNN4QjfAz2wCNTDFYSYbYpc46LggdFLSK",
14725
14725
  authorizedCidHex: cidToHex(
14726
- "QmVFmmsAYyvCzbQk8AWW86DhZ5YP5XRroCP8vZK6LXvivm"
14726
+ "QmUNWrxPBzSDiNNN4QjfAz2wCNTDFYSYbYpc46LggdFLSK"
14727
14727
  ),
14728
14728
  name: "Btc Utxo Invalidator",
14729
14729
  description: "Production Btc Utxo Invalidator",
14730
- version: "1.3.1",
14730
+ version: "1.4.0",
14731
14731
  deployed: true,
14732
- deployedAt: 1795347802630,
14733
- size: 75467,
14734
- hash: "67f8698350475df8fd9650ef5fbd8b5594e41faba902a21dfff02f3cfe18c062"
14732
+ deployedAt: 1795563863556,
14733
+ size: 75531,
14734
+ hash: "8f0fc05481bbdecee0355baea69a65052a7d973f6fcd2a8161c2273e7d235c81"
14735
14735
  },
14736
14736
  // 1.2.1 (audit 2026-11-14, H-3): pinned and attached to the Sepolia carry group (8) on 2026-11-15.
14737
14737
  // The 1.2.0 CID QmbGLm5rivPBLeGTuiWyCLAio4WHt8XnmMGxxY3fuEEsxs signs the LIVE vault's domain for `chain: "hardhat"`:
14738
14738
  // it is STILL in group 8 while the api keeper runs it, and MUST be removed from the group as soon as the api is
14739
14739
  // deployed on this CID (tasks/todo.md, H-3 step 4 (a)).
14740
14740
  carryCollateralAttestation: {
14741
- cid: "QmNgDunUjsZcLGGyPHp6FdnRQjjeB3f2joPuCHPYTWre5M",
14741
+ cid: "QmaFKD7F9KPQBEfMhTuunw1L6zEQZijW5j5DPKtSaWqAHa",
14742
14742
  authorizedCidHex: cidToHex(
14743
- "QmNgDunUjsZcLGGyPHp6FdnRQjjeB3f2joPuCHPYTWre5M"
14743
+ "QmaFKD7F9KPQBEfMhTuunw1L6zEQZijW5j5DPKtSaWqAHa"
14744
14744
  ),
14745
14745
  name: "Carry Collateral Attestation",
14746
14746
  description: "LoanCarryVault collateral attestation (borrower, BTC vault, confirmed BTC)",
14747
- version: "1.2.2",
14747
+ version: "1.3.0",
14748
14748
  deployed: true,
14749
- deployedAt: 1795347811143,
14750
- size: 26727,
14751
- hash: "fcdd17308b6938b230c08662dd0dcc16ab7710d5603770d808b0cdf3d46b41f3"
14749
+ deployedAt: 1795563876975,
14750
+ size: 26918,
14751
+ hash: "5edef681e87905ef2e580aa0c29cb2bcd20dc0d9e9fe9cd668d9a61dcb596e2e"
14752
14752
  },
14753
14753
  backingAttestation: {
14754
- cid: "QmakPwP4Yn4cam1Nmp537acNEVMznkM5F5UivLncZhAKDd",
14754
+ cid: "Qma2CvUCvCfPxpskFwCac9ngfRZRnnTvTtSVi5BMLKaYxj",
14755
14755
  authorizedCidHex: cidToHex(
14756
- "QmakPwP4Yn4cam1Nmp537acNEVMznkM5F5UivLncZhAKDd"
14756
+ "Qma2CvUCvCfPxpskFwCac9ngfRZRnnTvTtSVi5BMLKaYxj"
14757
14757
  ),
14758
14758
  name: "Backing Attestation",
14759
14759
  description: "BackingOracle report: BTC collateral over loan UCD at a pinned block, from a keeper snapshot the action verifies",
14760
- version: "1.0.3",
14760
+ version: "2.0.0",
14761
14761
  deployed: true,
14762
- deployedAt: 1795347819805,
14763
- size: 21099,
14764
- hash: "de7ba37e362c844854873e944d75cec7058f9465803113b14f048ae6536a28d0"
14762
+ deployedAt: 1795632828899,
14763
+ size: 22464,
14764
+ hash: "79abbd41198c38a5d22cab235ef8d372699d1f4606b0be093c78d6d41a19b8bc"
14765
14765
  },
14766
14766
  // Carry capital lock plan, Step 4: its own wallet in the Sepolia carry group (8), registered in OAR for the
14767
14767
  // makePaymentFrom selector. 1.0.1 (audit 2026-11-14: the RPC must report the policy chain) pinned and attached to
@@ -14790,17 +14790,17 @@ var require_pkg_src = __commonJS({
14790
14790
  // the automation group (SEPOLIA_LIT_AGENT_AUTOMATION_GROUP_ID) — and to no other. It signs with each borrower's
14791
14791
  // AGENT key (no wallet of its own).
14792
14792
  agentAutomation: {
14793
- cid: "QmRWm2RqDapvvSapLS9VHuc1hj3m9SdmQFoYgpAeSh7HQM",
14793
+ cid: "QmXZT3ciN66puZPuQrXqNmST6jWAHeBjZiAiEPMDYdhTkk",
14794
14794
  authorizedCidHex: cidToHex(
14795
- "QmRWm2RqDapvvSapLS9VHuc1hj3m9SdmQFoYgpAeSh7HQM"
14795
+ "QmXZT3ciN66puZPuQrXqNmST6jWAHeBjZiAiEPMDYdhTkk"
14796
14796
  ),
14797
14797
  name: "Agent Automation",
14798
14798
  description: "Signs the one loan or hedge operation a delegated agent owes (rescue repay, renew, hedge top-up, release)",
14799
- version: "1.0.0",
14799
+ version: "1.1.0",
14800
14800
  deployed: true,
14801
- deployedAt: 1795361858163,
14802
- size: 43675,
14803
- hash: "a447a70db5cdd8d8c8c98717c78bc44835a00510465886d6df5d935a2b85cb3d"
14801
+ deployedAt: 1795563899351,
14802
+ size: 45461,
14803
+ hash: "be49824356466e6c3bbcfc02708e3bd9819607b9c9b0543403bc0f2d5d54944d"
14804
14804
  }
14805
14805
  };
14806
14806
  function getDeploymentsForNetwork(network) {
@@ -26649,6 +26649,24 @@ var require_async_request_util = __commonJS({
26649
26649
  }
26650
26650
  });
26651
26651
 
26652
+ // node_modules/@gvnrdao/dh-lit-ops/dist/utils/lit-core-host.js
26653
+ var require_lit_core_host = __commonJS({
26654
+ "node_modules/@gvnrdao/dh-lit-ops/dist/utils/lit-core-host.js"(exports2) {
26655
+ "use strict";
26656
+ Object.defineProperty(exports2, "__esModule", { value: true });
26657
+ exports2.DEFAULT_LIT_CORE_HOST = void 0;
26658
+ exports2.litCoreHost = litCoreHost;
26659
+ exports2.litCoreApiBase = litCoreApiBase;
26660
+ exports2.DEFAULT_LIT_CORE_HOST = "https://api2.chipotle.litprotocol.com";
26661
+ function litCoreHost(explicit) {
26662
+ return (explicit || process.env.LIT_CORE_API_BASE_URL || exports2.DEFAULT_LIT_CORE_HOST).replace(/\/+$/, "");
26663
+ }
26664
+ function litCoreApiBase(explicit) {
26665
+ return `${litCoreHost(explicit)}/core/v1`;
26666
+ }
26667
+ }
26668
+ });
26669
+
26652
26670
  // node_modules/@gvnrdao/dh-lit-ops/dist/utils/lit-core-lit-action-client.js
26653
26671
  var require_lit_core_lit_action_client = __commonJS({
26654
26672
  "node_modules/@gvnrdao/dh-lit-ops/dist/utils/lit-core-lit-action-client.js"(exports2) {
@@ -26660,6 +26678,7 @@ var require_lit_core_lit_action_client = __commonJS({
26660
26678
  exports2.isCoreApiTransportError = isCoreApiTransportError;
26661
26679
  exports2.executeLitActionViaCoreApi = executeLitActionViaCoreApi;
26662
26680
  var fetch_lit_action_from_ipfs_1 = require_fetch_lit_action_from_ipfs();
26681
+ var lit_core_host_1 = require_lit_core_host();
26663
26682
  function parseResponsePayload(raw) {
26664
26683
  if (raw == null)
26665
26684
  return raw;
@@ -26705,8 +26724,7 @@ var require_lit_core_lit_action_client = __commonJS({
26705
26724
  };
26706
26725
  }
26707
26726
  function resolveLitCoreBaseUrl(explicit) {
26708
- const fromEnv = process.env.LIT_CORE_API_BASE_URL;
26709
- return (explicit || fromEnv || "https://api.chipotle.litprotocol.com").replace(/\/$/, "");
26727
+ return (0, lit_core_host_1.litCoreHost)(explicit);
26710
26728
  }
26711
26729
  exports2.CORE_API_TRANSPORT_FAILURE_MARKER = "Lit Core lit_action transport failure";
26712
26730
  function describeErrorWithCause(e) {
@@ -26857,6 +26875,7 @@ var require_lit_ops_module = __commonJS({
26857
26875
  var mainnet_validator_wallets_1 = require_mainnet_validator_wallets();
26858
26876
  var lane_overrides_1 = require_lane_overrides();
26859
26877
  var async_request_util_1 = require_async_request_util();
26878
+ var lit_core_host_1 = require_lit_core_host();
26860
26879
  var crypto_1 = require("crypto");
26861
26880
  var lit_core_lit_action_client_1 = require_lit_core_lit_action_client();
26862
26881
  var PKP_VAULT_ATTESTATION_TYPES = {
@@ -29670,7 +29689,7 @@ var require_lit_ops_module = __commonJS({
29670
29689
  }
29671
29690
  };
29672
29691
  exports2.LitOps = LitOps2;
29673
- LitOps2.LIT_CORE_API_BASE = "https://api.chipotle.litprotocol.com/core/v1";
29692
+ LitOps2.LIT_CORE_API_BASE = (0, lit_core_host_1.litCoreApiBase)();
29674
29693
  }
29675
29694
  });
29676
29695
 
@@ -43230,9 +43249,6 @@ function registerCarryTools(server, getB) {
43230
43249
  annotations: DESTRUCTIVE_WRITE_ANNOTATIONS3
43231
43250
  },
43232
43251
  async ({ loanId, credit, amountUcd, amountUsdc, confirmed }) => guardedWrite(getB, async () => {
43233
- const size = amountUcd !== void 0 ? `${amountUcd} UCD` : amountUsdc !== void 0 ? `UCD for ${amountUsdc} USDC` : "UCD for the recommended entry margin";
43234
- const gate = requireConfirmation(confirmed, `sell ${size} to the desk and bridge the USDC to loan ${loanId}'s Carry ${credit} (exact-amount approval if needed, then sellAndFund)`);
43235
- if (gate) return gate;
43236
43252
  if (amountUcd !== void 0) {
43237
43253
  const problem = checkUcdAmount(amountUcd, "amountUcd");
43238
43254
  if (problem) return validationFailed(problem);
@@ -43241,6 +43257,9 @@ function registerCarryTools(server, getB) {
43241
43257
  const problem = checkUsdc(amountUsdc, "amountUsdc");
43242
43258
  if (problem) return validationFailed(problem);
43243
43259
  }
43260
+ const size = amountUcd !== void 0 ? `${amountUcd} UCD` : `the UCD that carry_quote loanId ${loanId} credit ${credit}${amountUsdc !== void 0 ? ` amountUsdc ${amountUsdc}` : ""} returns as ucdToSell (show the user that exact figure)`;
43261
+ const gate = requireConfirmation(confirmed, `sell ${size} to the desk and bridge the USDC to loan ${loanId}'s Carry ${credit} (exact-amount approval if needed, then sellAndFund)`);
43262
+ if (gate) return gate;
43244
43263
  const b2 = getB();
43245
43264
  if (!b2.ok) return renderError(b2.error);
43246
43265
  return renderEnvelope(
@@ -44777,6 +44796,9 @@ var import_zod9 = require("zod");
44777
44796
  // src/boundary/config.ts
44778
44797
  function carryEndpoints(config) {
44779
44798
  if (config.network === "mainnet") {
44799
+ if (config.servedNetworks !== void 0 && !config.servedNetworks.includes("sepolia")) {
44800
+ return { ok: false, reason: "Carry is not deployed on mainnet yet, and this connector serves mainnet only \u2014 Carry is not available on this connector" };
44801
+ }
44780
44802
  return { ok: false, reason: "Carry is not deployed on mainnet yet \u2014 the carry_* tools act on sepolia (switch with network_switch)" };
44781
44803
  }
44782
44804
  const apiBase = config.carryApiBase ?? "https://api-test.gvnr.xyz";
@@ -45318,6 +45340,20 @@ var CarryCore = class {
45318
45340
  }
45319
45341
  const auth = await this.deps.requireBorrower();
45320
45342
  if (!auth.ok) return errEnvelope(auth.error);
45343
+ const owned = await this.deps.plugin.chain.getPositionDetails(p.loanId);
45344
+ if (!owned.ok) return errEnvelope(this.deps.failureToError(owned.failure));
45345
+ if (owned.value === null) {
45346
+ return errEnvelope(boundaryError("NOT_FOUND", `Loan ${p.loanId} does not exist on the authoritative source \u2014 nothing was signed. Check the loan id with position_list.`, { source: owned.source.id }));
45347
+ }
45348
+ if (owned.value.borrower.toLowerCase() !== auth.borrower.toLowerCase()) {
45349
+ return errEnvelope(
45350
+ boundaryError(
45351
+ "UPSTREAM_REJECTED",
45352
+ `Loan ${p.loanId} does not belong to the connected wallet ${auth.borrower} \u2014 nothing was signed, and no UCD was sold. Check the loan id with position_list; Carry can only be funded for a loan you own.`,
45353
+ { source: owned.source.id }
45354
+ )
45355
+ );
45356
+ }
45321
45357
  let amountUcdWei;
45322
45358
  let quoteUsdc;
45323
45359
  if (p.amountUcd !== void 0) {
@@ -65020,30 +65056,30 @@ var require_pkg_src2 = __commonJS2({
65020
65056
  }
65021
65057
  },
65022
65058
  btcTransactionSigner: {
65023
- cid: "QmdkwUmLb8QLy2ixRW2db58VsfMS4Y2ydVSAYBvemMJEEc",
65059
+ cid: "QmSTRJ5MzhJQ3mBJHys8mgBfn3yQtP5hu3wo2WzvJxafxs",
65024
65060
  authorizedCidHex: cidToHex(
65025
- "QmdkwUmLb8QLy2ixRW2db58VsfMS4Y2ydVSAYBvemMJEEc"
65061
+ "QmSTRJ5MzhJQ3mBJHys8mgBfn3yQtP5hu3wo2WzvJxafxs"
65026
65062
  ),
65027
65063
  name: "Btc Transaction Signer",
65028
65064
  description: "Production Btc Transaction Signer",
65029
- version: "1.4.1",
65065
+ version: "1.5.0",
65030
65066
  deployed: true,
65031
- deployedAt: 1795347714758,
65032
- size: 83859,
65033
- hash: "45842d33ad4372707b4d9908b1e2a034d625eb14af81bf178426cd565dd73ec0"
65067
+ deployedAt: 1795563786470,
65068
+ size: 83923,
65069
+ hash: "a0b1a1a349d7594a4a8e9b0a360ba3964099d4c35831a530205ec5f0c7fb624c"
65034
65070
  },
65035
65071
  ucdMintValidator: {
65036
- cid: "Qmb8ghjszv5ckgNyBRu9WWQKjWbn8dvbpPBzD7XXQs7UBA",
65072
+ cid: "QmQB3ftrLLfrMs1XVzyzGBuVmCPU7ePfDU9vtFhjFi62pn",
65037
65073
  authorizedCidHex: cidToHex(
65038
- "Qmb8ghjszv5ckgNyBRu9WWQKjWbn8dvbpPBzD7XXQs7UBA"
65074
+ "QmQB3ftrLLfrMs1XVzyzGBuVmCPU7ePfDU9vtFhjFi62pn"
65039
65075
  ),
65040
65076
  name: "Ucd Mint Validator",
65041
65077
  description: "Production Ucd Mint Validator",
65042
- version: "1.6.1",
65078
+ version: "1.7.0",
65043
65079
  deployed: true,
65044
- deployedAt: 1795347723560,
65045
- size: 93011,
65046
- hash: "4648b31b7c8b9687ef997af48dbcb123157eceb628ae81e4a39d48690a5aaa95",
65080
+ deployedAt: 1795563807907,
65081
+ size: 93075,
65082
+ hash: "fd1dba7ba6cab4022b8e7be4b9812a04b2e9baab90c864d57bb51ea7354f426f",
65047
65083
  validatorWalletAddress: "0xEfb258D455a31d061Bbeb3DE3D2143BdFCB67a6C",
65048
65084
  pkp: {
65049
65085
  publicKey: "0x041ab17cd91fc5c0b761eea6092d032807561b621b82c488826776e04a9158d61ba64d809a4729f0501289d980732cb06d8dfd06999dd9c8efd2f495dad78b31bb",
@@ -65051,17 +65087,17 @@ var require_pkg_src2 = __commonJS2({
65051
65087
  }
65052
65088
  },
65053
65089
  processPaymentValidator: {
65054
- cid: "QmVTF8ZsQFcFWWNA24S6hFucARGSzFQC4VoWj5mwRgnUPZ",
65090
+ cid: "Qmeq2rArEzMumTYN8PssuvRUZACk6kjzP9pgMtA7NnpiC7",
65055
65091
  authorizedCidHex: cidToHex(
65056
- "QmVTF8ZsQFcFWWNA24S6hFucARGSzFQC4VoWj5mwRgnUPZ"
65092
+ "Qmeq2rArEzMumTYN8PssuvRUZACk6kjzP9pgMtA7NnpiC7"
65057
65093
  ),
65058
65094
  name: "Process Payment Validator",
65059
65095
  description: "Production Process Payment Validator",
65060
- version: "1.3.6",
65096
+ version: "1.4.0",
65061
65097
  deployed: true,
65062
- deployedAt: 1795347732060,
65063
- size: 88171,
65064
- hash: "00ecd6fafcbb5adf0fb2268b8366f3e03565aa5b930264db71aa07c43cd5dbd2",
65098
+ deployedAt: 1795563821504,
65099
+ size: 88235,
65100
+ hash: "d78862dc1574a04818f2fd824394f2efab70e9674defc88b234a03862982ddda",
65065
65101
  validatorWalletAddress: "0xEfb258D455a31d061Bbeb3DE3D2143BdFCB67a6C",
65066
65102
  pkp: {
65067
65103
  publicKey: "0x04cfccb9b6c7addc79469c0e9fafebef4c70801302c62cdb26b610723a9b8527d23f98a40158c7340d83fd0e62d02b5ec74c12f7a86d98e8c6973b4811110f19ad",
@@ -65069,17 +65105,17 @@ var require_pkg_src2 = __commonJS2({
65069
65105
  }
65070
65106
  },
65071
65107
  extendPositionValidator: {
65072
- cid: "QmeL5EC8SzsgcvT72PMRDPWyE2d8F7CnoQSPiQhbcn3hf2",
65108
+ cid: "QmZsLdkD6VdpBCseW2LsXGW7SYDMezq8NgWUQjVVbDXCLj",
65073
65109
  authorizedCidHex: cidToHex(
65074
- "QmeL5EC8SzsgcvT72PMRDPWyE2d8F7CnoQSPiQhbcn3hf2"
65110
+ "QmZsLdkD6VdpBCseW2LsXGW7SYDMezq8NgWUQjVVbDXCLj"
65075
65111
  ),
65076
65112
  name: "Extend Position Validator",
65077
65113
  description: "Production Extend Position Validator",
65078
- version: "1.3.6",
65114
+ version: "1.4.0",
65079
65115
  deployed: true,
65080
- deployedAt: 1795347740736,
65081
- size: 85447,
65082
- hash: "345d5c4f134b93bc36c345e7cf63fd7eba003138c4f061739ea97f3844d91290",
65116
+ deployedAt: 1795563831913,
65117
+ size: 85511,
65118
+ hash: "44ee02e254b28271a851bd26a12334d0302b27877029c3824eb406e0df697fd1",
65083
65119
  validatorWalletAddress: "0xEfb258D455a31d061Bbeb3DE3D2143BdFCB67a6C",
65084
65120
  pkp: {
65085
65121
  publicKey: "0x04e52338f6a0c3362800f1a94c4c8f08be5030dde0fa217388c53d1c1a4790f4443c9f2886b2d2d8f4b75a9a156e9b028011b1a1cf7648da0e556aa980ec692836",
@@ -65087,17 +65123,17 @@ var require_pkg_src2 = __commonJS2({
65087
65123
  }
65088
65124
  },
65089
65125
  btcWithdrawal: {
65090
- cid: "QmR9ZpRLQPsbZTKyX3AdCLwvgkCeA1wqq4p738ChQ9u7PQ",
65126
+ cid: "QmSzTK5gM9tp1Mp4UGwu7iHQYMkxtyjmtbEDvETG9A38ge",
65091
65127
  authorizedCidHex: cidToHex(
65092
- "QmR9ZpRLQPsbZTKyX3AdCLwvgkCeA1wqq4p738ChQ9u7PQ"
65128
+ "QmSzTK5gM9tp1Mp4UGwu7iHQYMkxtyjmtbEDvETG9A38ge"
65093
65129
  ),
65094
65130
  name: "Btc Withdrawal",
65095
65131
  description: "Production Btc Withdrawal",
65096
- version: "1.5.1",
65132
+ version: "1.6.0",
65097
65133
  deployed: true,
65098
- deployedAt: 1795347749573,
65099
- size: 104338,
65100
- hash: "37fa9caedd6d79ab5ab5bbad68e315571c874254aed852b2e2cee4b052f47f42",
65134
+ deployedAt: 1795563842248,
65135
+ size: 104402,
65136
+ hash: "3539732d8701c7473dbb7a8af0c23a085b7f7dff7171c74bd2587f6e95abb13d",
65101
65137
  validatorWalletAddress: "0xEfb258D455a31d061Bbeb3DE3D2143BdFCB67a6C",
65102
65138
  pkp: {
65103
65139
  publicKey: "0x043616787c5432415c24378c4ef48de2bcd6bb7b575b837e3cff09171802662da7105d79586c7659677a0ecbaddac4cce06cb2a11f69a16fa0c4d7002ac7d51a4d",
@@ -65209,17 +65245,17 @@ var require_pkg_src2 = __commonJS2({
65209
65245
  hash: "03ee5be239c91c735d2c95db89a0d1b77e602cfc18af8eb64b3281fddcd90a72"
65210
65246
  },
65211
65247
  agentModuleExecutor: {
65212
- cid: "QmbiqWXkbWmr12vpLyGjQxyY226rrAu8wmmsTbSsS8VaLn",
65248
+ cid: "QmQ1kQ6BsXALB48Lg1oUpnrfpQ5CtPjet2UG29MwcsRgPV",
65213
65249
  authorizedCidHex: cidToHex(
65214
- "QmbiqWXkbWmr12vpLyGjQxyY226rrAu8wmmsTbSsS8VaLn"
65250
+ "QmQ1kQ6BsXALB48Lg1oUpnrfpQ5CtPjet2UG29MwcsRgPV"
65215
65251
  ),
65216
65252
  name: "Agent Module Executor",
65217
65253
  description: "Production Agent Module Executor",
65218
- version: "1.4.1",
65254
+ version: "1.5.0",
65219
65255
  deployed: true,
65220
- deployedAt: 1795347784951,
65221
- size: 22599,
65222
- hash: "2e83c2ab4742fb3890191bc3dff884371536fc9f764528d098f8d9b2291a7cdf"
65256
+ deployedAt: 1795563851831,
65257
+ size: 22663,
65258
+ hash: "4a7163e7f04ed1477ea36264f85dd698a7f2bdf096b219b60fae0697bbe10f45"
65223
65259
  },
65224
65260
  staleSpendRecoveryValidator: {
65225
65261
  cid: "QmbEwx37vbQ3PNTWbAqMw9UsCcxNaBeYtJUopmjGQdCZ3R",
@@ -65240,47 +65276,47 @@ var require_pkg_src2 = __commonJS2({
65240
65276
  }
65241
65277
  },
65242
65278
  btcUtxoInvalidator: {
65243
- cid: "QmVFmmsAYyvCzbQk8AWW86DhZ5YP5XRroCP8vZK6LXvivm",
65279
+ cid: "QmUNWrxPBzSDiNNN4QjfAz2wCNTDFYSYbYpc46LggdFLSK",
65244
65280
  authorizedCidHex: cidToHex(
65245
- "QmVFmmsAYyvCzbQk8AWW86DhZ5YP5XRroCP8vZK6LXvivm"
65281
+ "QmUNWrxPBzSDiNNN4QjfAz2wCNTDFYSYbYpc46LggdFLSK"
65246
65282
  ),
65247
65283
  name: "Btc Utxo Invalidator",
65248
65284
  description: "Production Btc Utxo Invalidator",
65249
- version: "1.3.1",
65285
+ version: "1.4.0",
65250
65286
  deployed: true,
65251
- deployedAt: 1795347802630,
65252
- size: 75467,
65253
- hash: "67f8698350475df8fd9650ef5fbd8b5594e41faba902a21dfff02f3cfe18c062"
65287
+ deployedAt: 1795563863556,
65288
+ size: 75531,
65289
+ hash: "8f0fc05481bbdecee0355baea69a65052a7d973f6fcd2a8161c2273e7d235c81"
65254
65290
  },
65255
65291
  // 1.2.1 (audit 2026-11-14, H-3): pinned and attached to the Sepolia carry group (8) on 2026-11-15.
65256
65292
  // The 1.2.0 CID QmbGLm5rivPBLeGTuiWyCLAio4WHt8XnmMGxxY3fuEEsxs signs the LIVE vault's domain for `chain: "hardhat"`:
65257
65293
  // it is STILL in group 8 while the api keeper runs it, and MUST be removed from the group as soon as the api is
65258
65294
  // deployed on this CID (tasks/todo.md, H-3 step 4 (a)).
65259
65295
  carryCollateralAttestation: {
65260
- cid: "QmNgDunUjsZcLGGyPHp6FdnRQjjeB3f2joPuCHPYTWre5M",
65296
+ cid: "QmaFKD7F9KPQBEfMhTuunw1L6zEQZijW5j5DPKtSaWqAHa",
65261
65297
  authorizedCidHex: cidToHex(
65262
- "QmNgDunUjsZcLGGyPHp6FdnRQjjeB3f2joPuCHPYTWre5M"
65298
+ "QmaFKD7F9KPQBEfMhTuunw1L6zEQZijW5j5DPKtSaWqAHa"
65263
65299
  ),
65264
65300
  name: "Carry Collateral Attestation",
65265
65301
  description: "LoanCarryVault collateral attestation (borrower, BTC vault, confirmed BTC)",
65266
- version: "1.2.2",
65302
+ version: "1.3.0",
65267
65303
  deployed: true,
65268
- deployedAt: 1795347811143,
65269
- size: 26727,
65270
- hash: "fcdd17308b6938b230c08662dd0dcc16ab7710d5603770d808b0cdf3d46b41f3"
65304
+ deployedAt: 1795563876975,
65305
+ size: 26918,
65306
+ hash: "5edef681e87905ef2e580aa0c29cb2bcd20dc0d9e9fe9cd668d9a61dcb596e2e"
65271
65307
  },
65272
65308
  backingAttestation: {
65273
- cid: "QmakPwP4Yn4cam1Nmp537acNEVMznkM5F5UivLncZhAKDd",
65309
+ cid: "Qma2CvUCvCfPxpskFwCac9ngfRZRnnTvTtSVi5BMLKaYxj",
65274
65310
  authorizedCidHex: cidToHex(
65275
- "QmakPwP4Yn4cam1Nmp537acNEVMznkM5F5UivLncZhAKDd"
65311
+ "Qma2CvUCvCfPxpskFwCac9ngfRZRnnTvTtSVi5BMLKaYxj"
65276
65312
  ),
65277
65313
  name: "Backing Attestation",
65278
65314
  description: "BackingOracle report: BTC collateral over loan UCD at a pinned block, from a keeper snapshot the action verifies",
65279
- version: "1.0.3",
65315
+ version: "2.0.0",
65280
65316
  deployed: true,
65281
- deployedAt: 1795347819805,
65282
- size: 21099,
65283
- hash: "de7ba37e362c844854873e944d75cec7058f9465803113b14f048ae6536a28d0"
65317
+ deployedAt: 1795632828899,
65318
+ size: 22464,
65319
+ hash: "79abbd41198c38a5d22cab235ef8d372699d1f4606b0be093c78d6d41a19b8bc"
65284
65320
  },
65285
65321
  // Carry capital lock plan, Step 4: its own wallet in the Sepolia carry group (8), registered in OAR for the
65286
65322
  // makePaymentFrom selector. 1.0.1 (audit 2026-11-14: the RPC must report the policy chain) pinned and attached to
@@ -65309,17 +65345,17 @@ var require_pkg_src2 = __commonJS2({
65309
65345
  // the automation group (SEPOLIA_LIT_AGENT_AUTOMATION_GROUP_ID) — and to no other. It signs with each borrower's
65310
65346
  // AGENT key (no wallet of its own).
65311
65347
  agentAutomation: {
65312
- cid: "QmRWm2RqDapvvSapLS9VHuc1hj3m9SdmQFoYgpAeSh7HQM",
65348
+ cid: "QmXZT3ciN66puZPuQrXqNmST6jWAHeBjZiAiEPMDYdhTkk",
65313
65349
  authorizedCidHex: cidToHex(
65314
- "QmRWm2RqDapvvSapLS9VHuc1hj3m9SdmQFoYgpAeSh7HQM"
65350
+ "QmXZT3ciN66puZPuQrXqNmST6jWAHeBjZiAiEPMDYdhTkk"
65315
65351
  ),
65316
65352
  name: "Agent Automation",
65317
65353
  description: "Signs the one loan or hedge operation a delegated agent owes (rescue repay, renew, hedge top-up, release)",
65318
- version: "1.0.0",
65354
+ version: "1.1.0",
65319
65355
  deployed: true,
65320
- deployedAt: 1795361858163,
65321
- size: 43675,
65322
- hash: "a447a70db5cdd8d8c8c98717c78bc44835a00510465886d6df5d935a2b85cb3d"
65356
+ deployedAt: 1795563899351,
65357
+ size: 45461,
65358
+ hash: "be49824356466e6c3bbcfc02708e3bd9819607b9c9b0543403bc0f2d5d54944d"
65323
65359
  }
65324
65360
  };
65325
65361
  function getDeploymentsForNetwork(network) {
@@ -87807,6 +87843,10 @@ async function safeWaitForTransaction(tx2, confirmations = 1, timeout = 6e4) {
87807
87843
  }
87808
87844
  throw new Error(`Transaction ${txHash} confirmation timed out after ${timeout}ms`);
87809
87845
  }
87846
+ var SAFE_IDENTITY_ABI = [
87847
+ "function getThreshold() view returns (uint256)",
87848
+ "function getOwners() view returns (address[])"
87849
+ ];
87810
87850
  var POSITION_NOT_FOUND_SELECTOR = "0x6ec9be11";
87811
87851
  var DiamondHandsSDK = class _DiamondHandsSDK {
87812
87852
  config;
@@ -95295,7 +95335,8 @@ Message: ${causeMessage}${quantumContext}${loanCapDiagnostics}${mintDebtDiagnost
95295
95335
  /* HIGH */
95296
95336
  });
95297
95337
  }
95298
- const code = await this.getProviderOrThrow().getCode(borrower);
95338
+ const provider = this.getProviderOrThrow();
95339
+ const code = await provider.getCode(borrower);
95299
95340
  if (!code || code === "0x") {
95300
95341
  throw new SDKError({
95301
95342
  message: `Withdrawal delegation is only available to contract wallets. Borrower ${borrower} is an EOA, and the withdrawal validator has no delegate arm for one \u2014 an EOA can sign inside the withdrawal quantum window itself, so the grant would be recorded on-chain and never honoured.`,
@@ -95304,6 +95345,31 @@ Message: ${causeMessage}${quantumContext}${loanCapDiagnostics}${mintDebtDiagnost
95304
95345
  /* MEDIUM */
95305
95346
  });
95306
95347
  }
95348
+ if (code.toLowerCase().startsWith("0xef0100")) {
95349
+ throw new SDKError({
95350
+ message: `Withdrawal delegation is only available to Safe wallets. Borrower ${borrower} is an EIP-7702-delegated EOA (code ${code}), not a Safe \u2014 the withdrawal validator has no delegate arm for it, so the grant would be recorded on-chain and never honoured.`,
95351
+ category: "VALIDATION",
95352
+ severity: "MEDIUM"
95353
+ /* MEDIUM */
95354
+ });
95355
+ }
95356
+ const safe = new import_ethers27.Contract(borrower, SAFE_IDENTITY_ABI, provider);
95357
+ const answered = await Promise.all([safe.getThreshold(), safe.getOwners()]).then(
95358
+ () => true,
95359
+ (error) => {
95360
+ if ((0, import_ethers27.isError)(error, "CALL_EXCEPTION") || (0, import_ethers27.isError)(error, "BAD_DATA"))
95361
+ return false;
95362
+ throw error;
95363
+ }
95364
+ );
95365
+ if (!answered) {
95366
+ throw new SDKError({
95367
+ message: `Withdrawal delegation is only available to Safe wallets. Borrower ${borrower} has contract code but does not answer getThreshold()/getOwners(), so it is not a Safe \u2014 the withdrawal validator has no delegate arm for it and the grant would never be honoured.`,
95368
+ category: "VALIDATION",
95369
+ severity: "MEDIUM"
95370
+ /* MEDIUM */
95371
+ });
95372
+ }
95307
95373
  }
95308
95374
  /**
95309
95375
  * Pre-flight the registry's `FloorBelowProtocolMin` guard with a message a user can act on.
@@ -102975,7 +103041,8 @@ function createBoundary(config, opts) {
102975
103041
  }
102976
103042
  };
102977
103043
  }
102978
- async function createRealBoundary(config, wallet, overrides) {
103044
+ async function createRealBoundary(bootConfig, wallet, overrides) {
103045
+ const config = overrides?.allowedNetworks ? { ...bootConfig, servedNetworks: overrides.allowedNetworks } : bootConfig;
102979
103046
  const externalOnly = overrides?.externalOnly === true;
102980
103047
  const keystore = externalOnly ? null : new KeystoreProvider({
102981
103048
  ...config.keystorePath ? { keystorePath: config.keystorePath } : {},
@@ -103415,7 +103482,7 @@ function registerBoundaryInfoResource(server, getB) {
103415
103482
  }
103416
103483
 
103417
103484
  // src/version.ts
103418
- var SERVER_VERSION = "0.5.31";
103485
+ var SERVER_VERSION = "0.5.33";
103419
103486
 
103420
103487
  // src/server.ts
103421
103488
  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.";