@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/boundary.js +192 -125
- package/dist/connector-embed.js +196 -129
- package/dist/connector.js +196 -129
- package/dist/index.js +196 -129
- package/package.json +2 -2
package/dist/connector-embed.js
CHANGED
|
@@ -14501,30 +14501,30 @@ var require_pkg_src = __commonJS({
|
|
|
14501
14501
|
}
|
|
14502
14502
|
},
|
|
14503
14503
|
btcTransactionSigner: {
|
|
14504
|
-
cid: "
|
|
14504
|
+
cid: "QmSTRJ5MzhJQ3mBJHys8mgBfn3yQtP5hu3wo2WzvJxafxs",
|
|
14505
14505
|
authorizedCidHex: cidToHex(
|
|
14506
|
-
"
|
|
14506
|
+
"QmSTRJ5MzhJQ3mBJHys8mgBfn3yQtP5hu3wo2WzvJxafxs"
|
|
14507
14507
|
),
|
|
14508
14508
|
name: "Btc Transaction Signer",
|
|
14509
14509
|
description: "Production Btc Transaction Signer",
|
|
14510
|
-
version: "1.
|
|
14510
|
+
version: "1.5.0",
|
|
14511
14511
|
deployed: true,
|
|
14512
|
-
deployedAt:
|
|
14513
|
-
size:
|
|
14514
|
-
hash: "
|
|
14512
|
+
deployedAt: 1795563786470,
|
|
14513
|
+
size: 83923,
|
|
14514
|
+
hash: "a0b1a1a349d7594a4a8e9b0a360ba3964099d4c35831a530205ec5f0c7fb624c"
|
|
14515
14515
|
},
|
|
14516
14516
|
ucdMintValidator: {
|
|
14517
|
-
cid: "
|
|
14517
|
+
cid: "QmQB3ftrLLfrMs1XVzyzGBuVmCPU7ePfDU9vtFhjFi62pn",
|
|
14518
14518
|
authorizedCidHex: cidToHex(
|
|
14519
|
-
"
|
|
14519
|
+
"QmQB3ftrLLfrMs1XVzyzGBuVmCPU7ePfDU9vtFhjFi62pn"
|
|
14520
14520
|
),
|
|
14521
14521
|
name: "Ucd Mint Validator",
|
|
14522
14522
|
description: "Production Ucd Mint Validator",
|
|
14523
|
-
version: "1.
|
|
14523
|
+
version: "1.7.0",
|
|
14524
14524
|
deployed: true,
|
|
14525
|
-
deployedAt:
|
|
14526
|
-
size:
|
|
14527
|
-
hash: "
|
|
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: "
|
|
14535
|
+
cid: "Qmeq2rArEzMumTYN8PssuvRUZACk6kjzP9pgMtA7NnpiC7",
|
|
14536
14536
|
authorizedCidHex: cidToHex(
|
|
14537
|
-
"
|
|
14537
|
+
"Qmeq2rArEzMumTYN8PssuvRUZACk6kjzP9pgMtA7NnpiC7"
|
|
14538
14538
|
),
|
|
14539
14539
|
name: "Process Payment Validator",
|
|
14540
14540
|
description: "Production Process Payment Validator",
|
|
14541
|
-
version: "1.
|
|
14541
|
+
version: "1.4.0",
|
|
14542
14542
|
deployed: true,
|
|
14543
|
-
deployedAt:
|
|
14544
|
-
size:
|
|
14545
|
-
hash: "
|
|
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: "
|
|
14553
|
+
cid: "QmZsLdkD6VdpBCseW2LsXGW7SYDMezq8NgWUQjVVbDXCLj",
|
|
14554
14554
|
authorizedCidHex: cidToHex(
|
|
14555
|
-
"
|
|
14555
|
+
"QmZsLdkD6VdpBCseW2LsXGW7SYDMezq8NgWUQjVVbDXCLj"
|
|
14556
14556
|
),
|
|
14557
14557
|
name: "Extend Position Validator",
|
|
14558
14558
|
description: "Production Extend Position Validator",
|
|
14559
|
-
version: "1.
|
|
14559
|
+
version: "1.4.0",
|
|
14560
14560
|
deployed: true,
|
|
14561
|
-
deployedAt:
|
|
14562
|
-
size:
|
|
14563
|
-
hash: "
|
|
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: "
|
|
14571
|
+
cid: "QmSzTK5gM9tp1Mp4UGwu7iHQYMkxtyjmtbEDvETG9A38ge",
|
|
14572
14572
|
authorizedCidHex: cidToHex(
|
|
14573
|
-
"
|
|
14573
|
+
"QmSzTK5gM9tp1Mp4UGwu7iHQYMkxtyjmtbEDvETG9A38ge"
|
|
14574
14574
|
),
|
|
14575
14575
|
name: "Btc Withdrawal",
|
|
14576
14576
|
description: "Production Btc Withdrawal",
|
|
14577
|
-
version: "1.
|
|
14577
|
+
version: "1.6.0",
|
|
14578
14578
|
deployed: true,
|
|
14579
|
-
deployedAt:
|
|
14580
|
-
size:
|
|
14581
|
-
hash: "
|
|
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: "
|
|
14693
|
+
cid: "QmQ1kQ6BsXALB48Lg1oUpnrfpQ5CtPjet2UG29MwcsRgPV",
|
|
14694
14694
|
authorizedCidHex: cidToHex(
|
|
14695
|
-
"
|
|
14695
|
+
"QmQ1kQ6BsXALB48Lg1oUpnrfpQ5CtPjet2UG29MwcsRgPV"
|
|
14696
14696
|
),
|
|
14697
14697
|
name: "Agent Module Executor",
|
|
14698
14698
|
description: "Production Agent Module Executor",
|
|
14699
|
-
version: "1.
|
|
14699
|
+
version: "1.5.0",
|
|
14700
14700
|
deployed: true,
|
|
14701
|
-
deployedAt:
|
|
14702
|
-
size:
|
|
14703
|
-
hash: "
|
|
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: "
|
|
14724
|
+
cid: "QmUNWrxPBzSDiNNN4QjfAz2wCNTDFYSYbYpc46LggdFLSK",
|
|
14725
14725
|
authorizedCidHex: cidToHex(
|
|
14726
|
-
"
|
|
14726
|
+
"QmUNWrxPBzSDiNNN4QjfAz2wCNTDFYSYbYpc46LggdFLSK"
|
|
14727
14727
|
),
|
|
14728
14728
|
name: "Btc Utxo Invalidator",
|
|
14729
14729
|
description: "Production Btc Utxo Invalidator",
|
|
14730
|
-
version: "1.
|
|
14730
|
+
version: "1.4.0",
|
|
14731
14731
|
deployed: true,
|
|
14732
|
-
deployedAt:
|
|
14733
|
-
size:
|
|
14734
|
-
hash: "
|
|
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: "
|
|
14741
|
+
cid: "QmaFKD7F9KPQBEfMhTuunw1L6zEQZijW5j5DPKtSaWqAHa",
|
|
14742
14742
|
authorizedCidHex: cidToHex(
|
|
14743
|
-
"
|
|
14743
|
+
"QmaFKD7F9KPQBEfMhTuunw1L6zEQZijW5j5DPKtSaWqAHa"
|
|
14744
14744
|
),
|
|
14745
14745
|
name: "Carry Collateral Attestation",
|
|
14746
14746
|
description: "LoanCarryVault collateral attestation (borrower, BTC vault, confirmed BTC)",
|
|
14747
|
-
version: "1.
|
|
14747
|
+
version: "1.3.0",
|
|
14748
14748
|
deployed: true,
|
|
14749
|
-
deployedAt:
|
|
14750
|
-
size:
|
|
14751
|
-
hash: "
|
|
14749
|
+
deployedAt: 1795563876975,
|
|
14750
|
+
size: 26918,
|
|
14751
|
+
hash: "5edef681e87905ef2e580aa0c29cb2bcd20dc0d9e9fe9cd668d9a61dcb596e2e"
|
|
14752
14752
|
},
|
|
14753
14753
|
backingAttestation: {
|
|
14754
|
-
cid: "
|
|
14754
|
+
cid: "Qma2CvUCvCfPxpskFwCac9ngfRZRnnTvTtSVi5BMLKaYxj",
|
|
14755
14755
|
authorizedCidHex: cidToHex(
|
|
14756
|
-
"
|
|
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: "
|
|
14760
|
+
version: "2.0.0",
|
|
14761
14761
|
deployed: true,
|
|
14762
|
-
deployedAt:
|
|
14763
|
-
size:
|
|
14764
|
-
hash: "
|
|
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: "
|
|
14793
|
+
cid: "QmXZT3ciN66puZPuQrXqNmST6jWAHeBjZiAiEPMDYdhTkk",
|
|
14794
14794
|
authorizedCidHex: cidToHex(
|
|
14795
|
-
"
|
|
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.
|
|
14799
|
+
version: "1.1.0",
|
|
14800
14800
|
deployed: true,
|
|
14801
|
-
deployedAt:
|
|
14802
|
-
size:
|
|
14803
|
-
hash: "
|
|
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
|
-
|
|
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 =
|
|
29692
|
+
LitOps2.LIT_CORE_API_BASE = (0, lit_core_host_1.litCoreApiBase)();
|
|
29674
29693
|
}
|
|
29675
29694
|
});
|
|
29676
29695
|
|
|
@@ -43236,9 +43255,6 @@ function registerCarryTools(server, getB) {
|
|
|
43236
43255
|
annotations: DESTRUCTIVE_WRITE_ANNOTATIONS3
|
|
43237
43256
|
},
|
|
43238
43257
|
async ({ loanId, credit, amountUcd, amountUsdc, confirmed }) => guardedWrite(getB, async () => {
|
|
43239
|
-
const size = amountUcd !== void 0 ? `${amountUcd} UCD` : amountUsdc !== void 0 ? `UCD for ${amountUsdc} USDC` : "UCD for the recommended entry margin";
|
|
43240
|
-
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)`);
|
|
43241
|
-
if (gate) return gate;
|
|
43242
43258
|
if (amountUcd !== void 0) {
|
|
43243
43259
|
const problem = checkUcdAmount(amountUcd, "amountUcd");
|
|
43244
43260
|
if (problem) return validationFailed(problem);
|
|
@@ -43247,6 +43263,9 @@ function registerCarryTools(server, getB) {
|
|
|
43247
43263
|
const problem = checkUsdc(amountUsdc, "amountUsdc");
|
|
43248
43264
|
if (problem) return validationFailed(problem);
|
|
43249
43265
|
}
|
|
43266
|
+
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)`;
|
|
43267
|
+
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)`);
|
|
43268
|
+
if (gate) return gate;
|
|
43250
43269
|
const b2 = getB();
|
|
43251
43270
|
if (!b2.ok) return renderError(b2.error);
|
|
43252
43271
|
return renderEnvelope(
|
|
@@ -44783,6 +44802,9 @@ var import_zod9 = require("zod");
|
|
|
44783
44802
|
// src/boundary/config.ts
|
|
44784
44803
|
function carryEndpoints(config) {
|
|
44785
44804
|
if (config.network === "mainnet") {
|
|
44805
|
+
if (config.servedNetworks !== void 0 && !config.servedNetworks.includes("sepolia")) {
|
|
44806
|
+
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" };
|
|
44807
|
+
}
|
|
44786
44808
|
return { ok: false, reason: "Carry is not deployed on mainnet yet \u2014 the carry_* tools act on sepolia (switch with network_switch)" };
|
|
44787
44809
|
}
|
|
44788
44810
|
const apiBase = config.carryApiBase ?? "https://api-test.gvnr.xyz";
|
|
@@ -45324,6 +45346,20 @@ var CarryCore = class {
|
|
|
45324
45346
|
}
|
|
45325
45347
|
const auth = await this.deps.requireBorrower();
|
|
45326
45348
|
if (!auth.ok) return errEnvelope(auth.error);
|
|
45349
|
+
const owned = await this.deps.plugin.chain.getPositionDetails(p.loanId);
|
|
45350
|
+
if (!owned.ok) return errEnvelope(this.deps.failureToError(owned.failure));
|
|
45351
|
+
if (owned.value === null) {
|
|
45352
|
+
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 }));
|
|
45353
|
+
}
|
|
45354
|
+
if (owned.value.borrower.toLowerCase() !== auth.borrower.toLowerCase()) {
|
|
45355
|
+
return errEnvelope(
|
|
45356
|
+
boundaryError(
|
|
45357
|
+
"UPSTREAM_REJECTED",
|
|
45358
|
+
`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.`,
|
|
45359
|
+
{ source: owned.source.id }
|
|
45360
|
+
)
|
|
45361
|
+
);
|
|
45362
|
+
}
|
|
45327
45363
|
let amountUcdWei;
|
|
45328
45364
|
let quoteUsdc;
|
|
45329
45365
|
if (p.amountUcd !== void 0) {
|
|
@@ -65026,30 +65062,30 @@ var require_pkg_src2 = __commonJS2({
|
|
|
65026
65062
|
}
|
|
65027
65063
|
},
|
|
65028
65064
|
btcTransactionSigner: {
|
|
65029
|
-
cid: "
|
|
65065
|
+
cid: "QmSTRJ5MzhJQ3mBJHys8mgBfn3yQtP5hu3wo2WzvJxafxs",
|
|
65030
65066
|
authorizedCidHex: cidToHex(
|
|
65031
|
-
"
|
|
65067
|
+
"QmSTRJ5MzhJQ3mBJHys8mgBfn3yQtP5hu3wo2WzvJxafxs"
|
|
65032
65068
|
),
|
|
65033
65069
|
name: "Btc Transaction Signer",
|
|
65034
65070
|
description: "Production Btc Transaction Signer",
|
|
65035
|
-
version: "1.
|
|
65071
|
+
version: "1.5.0",
|
|
65036
65072
|
deployed: true,
|
|
65037
|
-
deployedAt:
|
|
65038
|
-
size:
|
|
65039
|
-
hash: "
|
|
65073
|
+
deployedAt: 1795563786470,
|
|
65074
|
+
size: 83923,
|
|
65075
|
+
hash: "a0b1a1a349d7594a4a8e9b0a360ba3964099d4c35831a530205ec5f0c7fb624c"
|
|
65040
65076
|
},
|
|
65041
65077
|
ucdMintValidator: {
|
|
65042
|
-
cid: "
|
|
65078
|
+
cid: "QmQB3ftrLLfrMs1XVzyzGBuVmCPU7ePfDU9vtFhjFi62pn",
|
|
65043
65079
|
authorizedCidHex: cidToHex(
|
|
65044
|
-
"
|
|
65080
|
+
"QmQB3ftrLLfrMs1XVzyzGBuVmCPU7ePfDU9vtFhjFi62pn"
|
|
65045
65081
|
),
|
|
65046
65082
|
name: "Ucd Mint Validator",
|
|
65047
65083
|
description: "Production Ucd Mint Validator",
|
|
65048
|
-
version: "1.
|
|
65084
|
+
version: "1.7.0",
|
|
65049
65085
|
deployed: true,
|
|
65050
|
-
deployedAt:
|
|
65051
|
-
size:
|
|
65052
|
-
hash: "
|
|
65086
|
+
deployedAt: 1795563807907,
|
|
65087
|
+
size: 93075,
|
|
65088
|
+
hash: "fd1dba7ba6cab4022b8e7be4b9812a04b2e9baab90c864d57bb51ea7354f426f",
|
|
65053
65089
|
validatorWalletAddress: "0xEfb258D455a31d061Bbeb3DE3D2143BdFCB67a6C",
|
|
65054
65090
|
pkp: {
|
|
65055
65091
|
publicKey: "0x041ab17cd91fc5c0b761eea6092d032807561b621b82c488826776e04a9158d61ba64d809a4729f0501289d980732cb06d8dfd06999dd9c8efd2f495dad78b31bb",
|
|
@@ -65057,17 +65093,17 @@ var require_pkg_src2 = __commonJS2({
|
|
|
65057
65093
|
}
|
|
65058
65094
|
},
|
|
65059
65095
|
processPaymentValidator: {
|
|
65060
|
-
cid: "
|
|
65096
|
+
cid: "Qmeq2rArEzMumTYN8PssuvRUZACk6kjzP9pgMtA7NnpiC7",
|
|
65061
65097
|
authorizedCidHex: cidToHex(
|
|
65062
|
-
"
|
|
65098
|
+
"Qmeq2rArEzMumTYN8PssuvRUZACk6kjzP9pgMtA7NnpiC7"
|
|
65063
65099
|
),
|
|
65064
65100
|
name: "Process Payment Validator",
|
|
65065
65101
|
description: "Production Process Payment Validator",
|
|
65066
|
-
version: "1.
|
|
65102
|
+
version: "1.4.0",
|
|
65067
65103
|
deployed: true,
|
|
65068
|
-
deployedAt:
|
|
65069
|
-
size:
|
|
65070
|
-
hash: "
|
|
65104
|
+
deployedAt: 1795563821504,
|
|
65105
|
+
size: 88235,
|
|
65106
|
+
hash: "d78862dc1574a04818f2fd824394f2efab70e9674defc88b234a03862982ddda",
|
|
65071
65107
|
validatorWalletAddress: "0xEfb258D455a31d061Bbeb3DE3D2143BdFCB67a6C",
|
|
65072
65108
|
pkp: {
|
|
65073
65109
|
publicKey: "0x04cfccb9b6c7addc79469c0e9fafebef4c70801302c62cdb26b610723a9b8527d23f98a40158c7340d83fd0e62d02b5ec74c12f7a86d98e8c6973b4811110f19ad",
|
|
@@ -65075,17 +65111,17 @@ var require_pkg_src2 = __commonJS2({
|
|
|
65075
65111
|
}
|
|
65076
65112
|
},
|
|
65077
65113
|
extendPositionValidator: {
|
|
65078
|
-
cid: "
|
|
65114
|
+
cid: "QmZsLdkD6VdpBCseW2LsXGW7SYDMezq8NgWUQjVVbDXCLj",
|
|
65079
65115
|
authorizedCidHex: cidToHex(
|
|
65080
|
-
"
|
|
65116
|
+
"QmZsLdkD6VdpBCseW2LsXGW7SYDMezq8NgWUQjVVbDXCLj"
|
|
65081
65117
|
),
|
|
65082
65118
|
name: "Extend Position Validator",
|
|
65083
65119
|
description: "Production Extend Position Validator",
|
|
65084
|
-
version: "1.
|
|
65120
|
+
version: "1.4.0",
|
|
65085
65121
|
deployed: true,
|
|
65086
|
-
deployedAt:
|
|
65087
|
-
size:
|
|
65088
|
-
hash: "
|
|
65122
|
+
deployedAt: 1795563831913,
|
|
65123
|
+
size: 85511,
|
|
65124
|
+
hash: "44ee02e254b28271a851bd26a12334d0302b27877029c3824eb406e0df697fd1",
|
|
65089
65125
|
validatorWalletAddress: "0xEfb258D455a31d061Bbeb3DE3D2143BdFCB67a6C",
|
|
65090
65126
|
pkp: {
|
|
65091
65127
|
publicKey: "0x04e52338f6a0c3362800f1a94c4c8f08be5030dde0fa217388c53d1c1a4790f4443c9f2886b2d2d8f4b75a9a156e9b028011b1a1cf7648da0e556aa980ec692836",
|
|
@@ -65093,17 +65129,17 @@ var require_pkg_src2 = __commonJS2({
|
|
|
65093
65129
|
}
|
|
65094
65130
|
},
|
|
65095
65131
|
btcWithdrawal: {
|
|
65096
|
-
cid: "
|
|
65132
|
+
cid: "QmSzTK5gM9tp1Mp4UGwu7iHQYMkxtyjmtbEDvETG9A38ge",
|
|
65097
65133
|
authorizedCidHex: cidToHex(
|
|
65098
|
-
"
|
|
65134
|
+
"QmSzTK5gM9tp1Mp4UGwu7iHQYMkxtyjmtbEDvETG9A38ge"
|
|
65099
65135
|
),
|
|
65100
65136
|
name: "Btc Withdrawal",
|
|
65101
65137
|
description: "Production Btc Withdrawal",
|
|
65102
|
-
version: "1.
|
|
65138
|
+
version: "1.6.0",
|
|
65103
65139
|
deployed: true,
|
|
65104
|
-
deployedAt:
|
|
65105
|
-
size:
|
|
65106
|
-
hash: "
|
|
65140
|
+
deployedAt: 1795563842248,
|
|
65141
|
+
size: 104402,
|
|
65142
|
+
hash: "3539732d8701c7473dbb7a8af0c23a085b7f7dff7171c74bd2587f6e95abb13d",
|
|
65107
65143
|
validatorWalletAddress: "0xEfb258D455a31d061Bbeb3DE3D2143BdFCB67a6C",
|
|
65108
65144
|
pkp: {
|
|
65109
65145
|
publicKey: "0x043616787c5432415c24378c4ef48de2bcd6bb7b575b837e3cff09171802662da7105d79586c7659677a0ecbaddac4cce06cb2a11f69a16fa0c4d7002ac7d51a4d",
|
|
@@ -65215,17 +65251,17 @@ var require_pkg_src2 = __commonJS2({
|
|
|
65215
65251
|
hash: "03ee5be239c91c735d2c95db89a0d1b77e602cfc18af8eb64b3281fddcd90a72"
|
|
65216
65252
|
},
|
|
65217
65253
|
agentModuleExecutor: {
|
|
65218
|
-
cid: "
|
|
65254
|
+
cid: "QmQ1kQ6BsXALB48Lg1oUpnrfpQ5CtPjet2UG29MwcsRgPV",
|
|
65219
65255
|
authorizedCidHex: cidToHex(
|
|
65220
|
-
"
|
|
65256
|
+
"QmQ1kQ6BsXALB48Lg1oUpnrfpQ5CtPjet2UG29MwcsRgPV"
|
|
65221
65257
|
),
|
|
65222
65258
|
name: "Agent Module Executor",
|
|
65223
65259
|
description: "Production Agent Module Executor",
|
|
65224
|
-
version: "1.
|
|
65260
|
+
version: "1.5.0",
|
|
65225
65261
|
deployed: true,
|
|
65226
|
-
deployedAt:
|
|
65227
|
-
size:
|
|
65228
|
-
hash: "
|
|
65262
|
+
deployedAt: 1795563851831,
|
|
65263
|
+
size: 22663,
|
|
65264
|
+
hash: "4a7163e7f04ed1477ea36264f85dd698a7f2bdf096b219b60fae0697bbe10f45"
|
|
65229
65265
|
},
|
|
65230
65266
|
staleSpendRecoveryValidator: {
|
|
65231
65267
|
cid: "QmbEwx37vbQ3PNTWbAqMw9UsCcxNaBeYtJUopmjGQdCZ3R",
|
|
@@ -65246,47 +65282,47 @@ var require_pkg_src2 = __commonJS2({
|
|
|
65246
65282
|
}
|
|
65247
65283
|
},
|
|
65248
65284
|
btcUtxoInvalidator: {
|
|
65249
|
-
cid: "
|
|
65285
|
+
cid: "QmUNWrxPBzSDiNNN4QjfAz2wCNTDFYSYbYpc46LggdFLSK",
|
|
65250
65286
|
authorizedCidHex: cidToHex(
|
|
65251
|
-
"
|
|
65287
|
+
"QmUNWrxPBzSDiNNN4QjfAz2wCNTDFYSYbYpc46LggdFLSK"
|
|
65252
65288
|
),
|
|
65253
65289
|
name: "Btc Utxo Invalidator",
|
|
65254
65290
|
description: "Production Btc Utxo Invalidator",
|
|
65255
|
-
version: "1.
|
|
65291
|
+
version: "1.4.0",
|
|
65256
65292
|
deployed: true,
|
|
65257
|
-
deployedAt:
|
|
65258
|
-
size:
|
|
65259
|
-
hash: "
|
|
65293
|
+
deployedAt: 1795563863556,
|
|
65294
|
+
size: 75531,
|
|
65295
|
+
hash: "8f0fc05481bbdecee0355baea69a65052a7d973f6fcd2a8161c2273e7d235c81"
|
|
65260
65296
|
},
|
|
65261
65297
|
// 1.2.1 (audit 2026-11-14, H-3): pinned and attached to the Sepolia carry group (8) on 2026-11-15.
|
|
65262
65298
|
// The 1.2.0 CID QmbGLm5rivPBLeGTuiWyCLAio4WHt8XnmMGxxY3fuEEsxs signs the LIVE vault's domain for `chain: "hardhat"`:
|
|
65263
65299
|
// 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
|
|
65264
65300
|
// deployed on this CID (tasks/todo.md, H-3 step 4 (a)).
|
|
65265
65301
|
carryCollateralAttestation: {
|
|
65266
|
-
cid: "
|
|
65302
|
+
cid: "QmaFKD7F9KPQBEfMhTuunw1L6zEQZijW5j5DPKtSaWqAHa",
|
|
65267
65303
|
authorizedCidHex: cidToHex(
|
|
65268
|
-
"
|
|
65304
|
+
"QmaFKD7F9KPQBEfMhTuunw1L6zEQZijW5j5DPKtSaWqAHa"
|
|
65269
65305
|
),
|
|
65270
65306
|
name: "Carry Collateral Attestation",
|
|
65271
65307
|
description: "LoanCarryVault collateral attestation (borrower, BTC vault, confirmed BTC)",
|
|
65272
|
-
version: "1.
|
|
65308
|
+
version: "1.3.0",
|
|
65273
65309
|
deployed: true,
|
|
65274
|
-
deployedAt:
|
|
65275
|
-
size:
|
|
65276
|
-
hash: "
|
|
65310
|
+
deployedAt: 1795563876975,
|
|
65311
|
+
size: 26918,
|
|
65312
|
+
hash: "5edef681e87905ef2e580aa0c29cb2bcd20dc0d9e9fe9cd668d9a61dcb596e2e"
|
|
65277
65313
|
},
|
|
65278
65314
|
backingAttestation: {
|
|
65279
|
-
cid: "
|
|
65315
|
+
cid: "Qma2CvUCvCfPxpskFwCac9ngfRZRnnTvTtSVi5BMLKaYxj",
|
|
65280
65316
|
authorizedCidHex: cidToHex(
|
|
65281
|
-
"
|
|
65317
|
+
"Qma2CvUCvCfPxpskFwCac9ngfRZRnnTvTtSVi5BMLKaYxj"
|
|
65282
65318
|
),
|
|
65283
65319
|
name: "Backing Attestation",
|
|
65284
65320
|
description: "BackingOracle report: BTC collateral over loan UCD at a pinned block, from a keeper snapshot the action verifies",
|
|
65285
|
-
version: "
|
|
65321
|
+
version: "2.0.0",
|
|
65286
65322
|
deployed: true,
|
|
65287
|
-
deployedAt:
|
|
65288
|
-
size:
|
|
65289
|
-
hash: "
|
|
65323
|
+
deployedAt: 1795632828899,
|
|
65324
|
+
size: 22464,
|
|
65325
|
+
hash: "79abbd41198c38a5d22cab235ef8d372699d1f4606b0be093c78d6d41a19b8bc"
|
|
65290
65326
|
},
|
|
65291
65327
|
// Carry capital lock plan, Step 4: its own wallet in the Sepolia carry group (8), registered in OAR for the
|
|
65292
65328
|
// makePaymentFrom selector. 1.0.1 (audit 2026-11-14: the RPC must report the policy chain) pinned and attached to
|
|
@@ -65315,17 +65351,17 @@ var require_pkg_src2 = __commonJS2({
|
|
|
65315
65351
|
// the automation group (SEPOLIA_LIT_AGENT_AUTOMATION_GROUP_ID) — and to no other. It signs with each borrower's
|
|
65316
65352
|
// AGENT key (no wallet of its own).
|
|
65317
65353
|
agentAutomation: {
|
|
65318
|
-
cid: "
|
|
65354
|
+
cid: "QmXZT3ciN66puZPuQrXqNmST6jWAHeBjZiAiEPMDYdhTkk",
|
|
65319
65355
|
authorizedCidHex: cidToHex(
|
|
65320
|
-
"
|
|
65356
|
+
"QmXZT3ciN66puZPuQrXqNmST6jWAHeBjZiAiEPMDYdhTkk"
|
|
65321
65357
|
),
|
|
65322
65358
|
name: "Agent Automation",
|
|
65323
65359
|
description: "Signs the one loan or hedge operation a delegated agent owes (rescue repay, renew, hedge top-up, release)",
|
|
65324
|
-
version: "1.
|
|
65360
|
+
version: "1.1.0",
|
|
65325
65361
|
deployed: true,
|
|
65326
|
-
deployedAt:
|
|
65327
|
-
size:
|
|
65328
|
-
hash: "
|
|
65362
|
+
deployedAt: 1795563899351,
|
|
65363
|
+
size: 45461,
|
|
65364
|
+
hash: "be49824356466e6c3bbcfc02708e3bd9819607b9c9b0543403bc0f2d5d54944d"
|
|
65329
65365
|
}
|
|
65330
65366
|
};
|
|
65331
65367
|
function getDeploymentsForNetwork(network) {
|
|
@@ -87813,6 +87849,10 @@ async function safeWaitForTransaction(tx2, confirmations = 1, timeout = 6e4) {
|
|
|
87813
87849
|
}
|
|
87814
87850
|
throw new Error(`Transaction ${txHash} confirmation timed out after ${timeout}ms`);
|
|
87815
87851
|
}
|
|
87852
|
+
var SAFE_IDENTITY_ABI = [
|
|
87853
|
+
"function getThreshold() view returns (uint256)",
|
|
87854
|
+
"function getOwners() view returns (address[])"
|
|
87855
|
+
];
|
|
87816
87856
|
var POSITION_NOT_FOUND_SELECTOR = "0x6ec9be11";
|
|
87817
87857
|
var DiamondHandsSDK = class _DiamondHandsSDK {
|
|
87818
87858
|
config;
|
|
@@ -95301,7 +95341,8 @@ Message: ${causeMessage}${quantumContext}${loanCapDiagnostics}${mintDebtDiagnost
|
|
|
95301
95341
|
/* HIGH */
|
|
95302
95342
|
});
|
|
95303
95343
|
}
|
|
95304
|
-
const
|
|
95344
|
+
const provider = this.getProviderOrThrow();
|
|
95345
|
+
const code = await provider.getCode(borrower);
|
|
95305
95346
|
if (!code || code === "0x") {
|
|
95306
95347
|
throw new SDKError({
|
|
95307
95348
|
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.`,
|
|
@@ -95310,6 +95351,31 @@ Message: ${causeMessage}${quantumContext}${loanCapDiagnostics}${mintDebtDiagnost
|
|
|
95310
95351
|
/* MEDIUM */
|
|
95311
95352
|
});
|
|
95312
95353
|
}
|
|
95354
|
+
if (code.toLowerCase().startsWith("0xef0100")) {
|
|
95355
|
+
throw new SDKError({
|
|
95356
|
+
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.`,
|
|
95357
|
+
category: "VALIDATION",
|
|
95358
|
+
severity: "MEDIUM"
|
|
95359
|
+
/* MEDIUM */
|
|
95360
|
+
});
|
|
95361
|
+
}
|
|
95362
|
+
const safe = new import_ethers27.Contract(borrower, SAFE_IDENTITY_ABI, provider);
|
|
95363
|
+
const answered = await Promise.all([safe.getThreshold(), safe.getOwners()]).then(
|
|
95364
|
+
() => true,
|
|
95365
|
+
(error) => {
|
|
95366
|
+
if ((0, import_ethers27.isError)(error, "CALL_EXCEPTION") || (0, import_ethers27.isError)(error, "BAD_DATA"))
|
|
95367
|
+
return false;
|
|
95368
|
+
throw error;
|
|
95369
|
+
}
|
|
95370
|
+
);
|
|
95371
|
+
if (!answered) {
|
|
95372
|
+
throw new SDKError({
|
|
95373
|
+
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.`,
|
|
95374
|
+
category: "VALIDATION",
|
|
95375
|
+
severity: "MEDIUM"
|
|
95376
|
+
/* MEDIUM */
|
|
95377
|
+
});
|
|
95378
|
+
}
|
|
95313
95379
|
}
|
|
95314
95380
|
/**
|
|
95315
95381
|
* Pre-flight the registry's `FloorBelowProtocolMin` guard with a message a user can act on.
|
|
@@ -102981,7 +103047,8 @@ function createBoundary(config, opts) {
|
|
|
102981
103047
|
}
|
|
102982
103048
|
};
|
|
102983
103049
|
}
|
|
102984
|
-
async function createRealBoundary(
|
|
103050
|
+
async function createRealBoundary(bootConfig, wallet, overrides) {
|
|
103051
|
+
const config = overrides?.allowedNetworks ? { ...bootConfig, servedNetworks: overrides.allowedNetworks } : bootConfig;
|
|
102985
103052
|
const externalOnly = overrides?.externalOnly === true;
|
|
102986
103053
|
const keystore = externalOnly ? null : new KeystoreProvider({
|
|
102987
103054
|
...config.keystorePath ? { keystorePath: config.keystorePath } : {},
|
|
@@ -103421,7 +103488,7 @@ function registerBoundaryInfoResource(server, getB) {
|
|
|
103421
103488
|
}
|
|
103422
103489
|
|
|
103423
103490
|
// src/version.ts
|
|
103424
|
-
var SERVER_VERSION = "0.5.
|
|
103491
|
+
var SERVER_VERSION = "0.5.33";
|
|
103425
103492
|
|
|
103426
103493
|
// src/server.ts
|
|
103427
103494
|
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.";
|