@gvnrdao/dh-sdk 0.0.317 → 0.0.319

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/index.mjs CHANGED
@@ -100,11 +100,11 @@ var init_deployment_addresses = __esm({
100
100
  },
101
101
  upgraded: {
102
102
  PositionManager: {
103
- previousImplementation: "0x3a493909920DF104D4048c2c20270B9DAFC81716",
104
- newImplementation: "0x607a80aee6eF425C7eC7bA5230E5FAFC95B0388F",
105
- upgradedAt: "2026-07-23T23:55:25.994Z",
103
+ previousImplementation: "0xb1885Be99BA64Bba773Bf423783A0334B7109409",
104
+ newImplementation: "0xfA7413a4547F496BF223ed25DF443c17ef6D4668",
105
+ upgradedAt: "2026-07-30T17:55:25.314Z",
106
106
  upgradedBy: "0xF20986F02420EF443AE9BE5092FB8A4975cF3aA6",
107
- reason: "Shared upgrade script: PositionManager implementation update"
107
+ reason: "Add setViews escape hatch so PositionManagerViews can be repointed (mainnet Views is a frozen non-proxy)"
108
108
  },
109
109
  LoanOperationsManagerModule: {
110
110
  previousImplementation: "0x8c20e9Edf44146718F2EF15eEF47A201CaC229B8",
@@ -128,16 +128,16 @@ var init_deployment_addresses = __esm({
128
128
  reason: "Shared upgrade script: TermManagerModule implementation update"
129
129
  },
130
130
  CircuitBreakerModule: {
131
- previousImplementation: "0xA5b11b895fB5a49731ab81BF9FC807b9029c8C98",
132
- newImplementation: "0xF6277dEF72D51312CC99616B5380f34Eb7603D75",
133
- upgradedAt: "2026-05-17T19:22:13.051Z",
131
+ previousImplementation: "0xF6277dEF72D51312CC99616B5380f34Eb7603D75",
132
+ newImplementation: "0x4b28F1d4ecBcc13b51a8d0f890e6d5bF4966EEB4",
133
+ upgradedAt: "2026-07-30T09:28:12.835Z",
134
134
  upgradedBy: "0xF20986F02420EF443AE9BE5092FB8A4975cF3aA6",
135
135
  reason: "Shared upgrade script: CircuitBreakerModule implementation update"
136
136
  },
137
137
  AdminModule: {
138
- previousImplementation: "0xF94A1801Fcc416e621Ae83B8030D1fE08b2DeB41",
139
- newImplementation: "0xBBA86246169f81a307Fafff02C1e3D8456aab973",
140
- upgradedAt: "2026-05-18T21:20:49.009Z",
138
+ previousImplementation: "0xBBA86246169f81a307Fafff02C1e3D8456aab973",
139
+ newImplementation: "0x2905964e27BD78595cf8fFa6FFc5A99E54F399c4",
140
+ upgradedAt: "2026-07-30T09:02:25.915Z",
141
141
  upgradedBy: "0xF20986F02420EF443AE9BE5092FB8A4975cF3aA6",
142
142
  reason: "Shared upgrade script: AdminModule implementation update"
143
143
  },
@@ -198,21 +198,18 @@ var init_deployment_addresses = __esm({
198
198
  reason: "Shared upgrade script: SimplePSMV2 implementation update"
199
199
  },
200
200
  UpgradeValidator: {
201
- previousImplementation: "0x535c9d66F9CFa4f2337cF6074BFc8fdcBBb9cFC4",
202
- newImplementation: "0x2Dd375041Be067E7d12bAB2106911Ce209EbD12f",
203
- upgradedAt: "2026-05-17T15:58:37.805Z",
201
+ previousImplementation: "0x2Dd375041Be067E7d12bAB2106911Ce209EbD12f",
202
+ newImplementation: "0x9E70e1D07AB11ac9dD37B67AA091Efe97d7Ed84b",
203
+ upgradedAt: "2026-07-30T09:32:13.726Z",
204
204
  upgradedBy: "0xF20986F02420EF443AE9BE5092FB8A4975cF3aA6",
205
205
  reason: "Shared upgrade script: UpgradeValidator implementation update"
206
206
  },
207
207
  LITActionValidator: {
208
- proxy: "0x54eECd7C90F8A8fac27749Ba30BbE8AFBAccc856",
209
- previousImplementation: "0xc71935a9B7A54e9D1FD266ab4D216644974A154d",
210
- implementation: "0xE2f99EA35b4DA01A66338427EC9077581d28FDb5",
211
- version: "2.3.0",
212
- upgradedAt: "2026-05-18T21:30:13.008Z",
208
+ previousImplementation: "0xE2f99EA35b4DA01A66338427EC9077581d28FDb5",
209
+ newImplementation: "0x8FF30Fab0cC09C67dF6DF0ee017f817d5B101457",
210
+ upgradedAt: "2026-07-30T09:30:13.928Z",
213
211
  upgradedBy: "0xF20986F02420EF443AE9BE5092FB8A4975cF3aA6",
214
- upgradeTx: "0xf287387ea7190138d0fd183d9381d8c051d3521569bb9d0e7d6c3dcb46d65964",
215
- note: "M-03: removed validateLITActionSignature, LIT_PROTOCOL_ROLE, isValidatedPKP, getValidationProof, helpers"
212
+ reason: "Shared upgrade script: LITActionValidator implementation update"
216
213
  },
217
214
  ContractVersionRegistry: {
218
215
  previousImplementation: "0x327Ced106C2804283994F0C0e2436E4B76AA7dAD",
@@ -222,11 +219,11 @@ var init_deployment_addresses = __esm({
222
219
  reason: "Shared upgrade script: ContractVersionRegistry implementation update"
223
220
  },
224
221
  PositionDelegateRegistry: {
225
- previousImplementation: "0xAE227De03D5aeDC870d6e096D9C6652E001a92aF",
226
- newImplementation: "0x301fa9AA527016D033e151b982C64cD8670a39E3",
227
- upgradedAt: "2026-05-17T16:00:25.211Z",
222
+ previousImplementation: "0x301fa9AA527016D033e151b982C64cD8670a39E3",
223
+ newImplementation: "0xc681c48688cdAA966119E265e4a378ef8Fe0eBcA",
224
+ upgradedAt: "2026-07-30T09:02:27.050Z",
228
225
  upgradedBy: "0xF20986F02420EF443AE9BE5092FB8A4975cF3aA6",
229
- reason: "Shared upgrade script: PositionDelegateRegistry implementation update"
226
+ reason: "Reconciled implementation from chain"
230
227
  },
231
228
  OperationAuthorizationRegistry: {
232
229
  previousImplementation: "0xF56090039c268B90f1867075813B5B36C40092B4",
@@ -236,18 +233,18 @@ var init_deployment_addresses = __esm({
236
233
  reason: "Shared upgrade script: OperationAuthorizationRegistry implementation update"
237
234
  },
238
235
  FeeRecipientRegistry: {
239
- previousImplementation: "0x974a0f64d572a4F4e1395aaeB22d1c2685D22459",
240
- newImplementation: "0xd08513a7cB2dd354B26cDDf549616F12054c34c9",
241
- upgradedAt: "2026-05-15T17:52:37.448Z",
236
+ previousImplementation: "0xd08513a7cB2dd354B26cDDf549616F12054c34c9",
237
+ newImplementation: "0x44057f5Ca13B1C3a74E5507c372704F3c8c5834f",
238
+ upgradedAt: "2026-07-30T09:23:25.934Z",
242
239
  upgradedBy: "0xF20986F02420EF443AE9BE5092FB8A4975cF3aA6",
243
- reason: "Shared upgrade script: FeeRecipientRegistry v1.1.0 \u2014 _authorizeUpgrade gated by onlyAdminModule + AccessControlEnumerable base"
240
+ reason: "Shared upgrade script: FeeRecipientRegistry implementation update"
244
241
  },
245
242
  BitcoinProviderRegistry: {
246
- previousImplementation: "0x225309A4ae6D146ba93A3278A7b40224FfC81448",
247
- newImplementation: "0xc5899d53426aD9354CEdAFe3002cbd3aBfAC46ab",
248
- upgradedAt: "2026-05-27T12:16:13.356Z",
243
+ previousImplementation: "0xc5899d53426aD9354CEdAFe3002cbd3aBfAC46ab",
244
+ newImplementation: "0x37A8D9a57f9dEa7ae7D5B7BC7B1BB61a80960eB7",
245
+ upgradedAt: "2026-07-30T09:26:01.725Z",
249
246
  upgradedBy: "0xF20986F02420EF443AE9BE5092FB8A4975cF3aA6",
250
- reason: "Audit C-7: BitcoinProviderRegistry v1.0.0 \u2192 v1.1.0 \u2014 per-chainId CID allowlist (addAllowedCid / removeAllowedCid / isAllowedCid views). Storage gap 46 \u2192 43."
247
+ reason: "Shared upgrade script: BitcoinProviderRegistry implementation update"
251
248
  },
252
249
  BitcoinWithdrawalAddressRegistry: {
253
250
  previousImplementation: "0xFF270BC4470dBA80430Bd1a3a66EB691599354fA",
@@ -326,27 +323,27 @@ var init_deployment_addresses = __esm({
326
323
  UCD_CONTROLLER_IMPL: "0x91204831bBCfcDCEa5fEE09B0d875778E9651690",
327
324
  LOAN_OPERATIONS_MANAGER_MODULE_IMPL: "0x6Ad08177F264f441074921C437670D1fA5934676",
328
325
  TERM_MANAGER_MODULE_IMPL: "0xA2D6543faFA9d84C16Cd5e5E34F746B6e138F54d",
329
- CIRCUIT_BREAKER_MODULE_IMPL: "0xF6277dEF72D51312CC99616B5380f34Eb7603D75",
330
- ADMIN_MODULE_IMPL: "0xBBA86246169f81a307Fafff02C1e3D8456aab973",
326
+ CIRCUIT_BREAKER_MODULE_IMPL: "0x4b28F1d4ecBcc13b51a8d0f890e6d5bF4966EEB4",
327
+ ADMIN_MODULE_IMPL: "0x2905964e27BD78595cf8fFa6FFc5A99E54F399c4",
331
328
  POSITION_MANAGER_VIEWS_IMPL: "0xA455B542cFb36AF8451fc420dB89e590E5c87cef",
332
- POSITION_MANAGER_IMPL: "0x607a80aee6eF425C7eC7bA5230E5FAFC95B0388F",
329
+ POSITION_MANAGER_IMPL: "0xfA7413a4547F496BF223ed25DF443c17ef6D4668",
333
330
  SIMPLE_PSM_V2: "0x19EcF7BA26e054fd4Ff06009A03070103dbBB058",
334
331
  SIMPLE_PSM_V2_IMPL: "0xE38010BE47B389922A1cd4b533470F0af7d20101",
335
332
  UCD_TOKEN_IMPL: "0xa6C8C4cfc7DD3dCE5F1259A4a1eAf8461aA8CeC8",
336
333
  POSITION_MANAGER_CORE_MODULE: "0xfFAA39a08887FeFB697eBC8691A8630CbCC33391",
337
334
  POSITION_MANAGER_CORE_MODULE_IMPL: "0x0E721048c066C5589C41f97785f7E5737ac2BEB3",
338
335
  COLLATERAL_MANAGER_MODULE: "0x967E92c976Fc0fa8268D37D4d6B7245d912aA7dB",
339
- COLLATERAL_MANAGER_MODULE_IMPL: "0xC232E95951303828CF66eaf76181A7956144d27a",
336
+ COLLATERAL_MANAGER_MODULE_IMPL: "0xF57BBbb4818371605e308228A04F8Ec4Dcc5E7Ba",
340
337
  LIQUIDATION_MANAGER_MODULE: "0xC4AB00f39e7ceD812F5C67058C9fa44e15d40e76",
341
338
  LIQUIDATION_MANAGER_MODULE_IMPL: "0xCe7587C47094BBb3dCa13D7a2299Ec9beA6cd759",
342
339
  BTC_SPEND_AUTHORIZER: "0xd7E9Eb5eE53f1d9ee55Dc162bBC7486bE437B6bD",
343
340
  BTC_SPEND_AUTHORIZER_IMPL: "0xdd3DFaEc50d6214d57eA64e8b76ff318b501607b",
344
341
  UPGRADE_VALIDATOR: "0x592e650edD9bA26ecc407989fdd6F9cdcDeC27A6",
345
- UPGRADE_VALIDATOR_IMPL: "0x2Dd375041Be067E7d12bAB2106911Ce209EbD12f",
342
+ UPGRADE_VALIDATOR_IMPL: "0x9E70e1D07AB11ac9dD37B67AA091Efe97d7Ed84b",
346
343
  BITCOIN_PROVIDER_REGISTRY: "0xbfA0c48B070D0a9A9CD27469AeacFD2d4261cEE2",
347
- BITCOIN_PROVIDER_REGISTRY_IMPL: "0xc5899d53426aD9354CEdAFe3002cbd3aBfAC46ab",
344
+ BITCOIN_PROVIDER_REGISTRY_IMPL: "0x37A8D9a57f9dEa7ae7D5B7BC7B1BB61a80960eB7",
348
345
  LIT_ACTION_VALIDATOR: "0x54eECd7C90F8A8fac27749Ba30BbE8AFBAccc856",
349
- LIT_ACTION_VALIDATOR_IMPL: "0xE2f99EA35b4DA01A66338427EC9077581d28FDb5",
346
+ LIT_ACTION_VALIDATOR_IMPL: "0x8FF30Fab0cC09C67dF6DF0ee017f817d5B101457",
350
347
  CONTRACT_VERSION_REGISTRY: "0x97E43AA6aFF2C0cf659d3aE501658D2Ef6777522",
351
348
  CONTRACT_VERSION_REGISTRY_IMPL: "0xF3389De4bCeC735e4F6d35b9f71170D96037D1B7",
352
349
  MOCK_USDC_TOKEN: "0x96409A98e0D322d6566b7F44a0fAbD1BD4ce2AEc",
@@ -355,10 +352,10 @@ var init_deployment_addresses = __esm({
355
352
  POSITION_DELEGATE_REGISTRY_IMPL: "0xc681c48688cdAA966119E265e4a378ef8Fe0eBcA",
356
353
  AGENT_MODULE: "0xefb8C29C1e7e92ed7d81a52dbedaed74e37fe380",
357
354
  FEE_RECIPIENT_REGISTRY: "0x95795F8403DDb629E8527B2934C4e71f5fC0C374",
358
- FEE_RECIPIENT_REGISTRY_IMPL: "0xd08513a7cB2dd354B26cDDf549616F12054c34c9",
355
+ FEE_RECIPIENT_REGISTRY_IMPL: "0x44057f5Ca13B1C3a74E5507c372704F3c8c5834f",
359
356
  OPERATION_AUTHORIZATION_REGISTRY_IMPL: "0xe0D981B60351f0f8fFDA2b50C8180Fb37CeF3883",
360
357
  BITCOIN_WITHDRAWAL_ADDRESS_REGISTRY: "0x6376D392097F0A81e51BD83960A97EA20eaf1dbe",
361
- BITCOIN_WITHDRAWAL_ADDRESS_REGISTRY_IMPL: "0xFF270BC4470dBA80430Bd1a3a66EB691599354fA",
358
+ BITCOIN_WITHDRAWAL_ADDRESS_REGISTRY_IMPL: "0x76E0a2c9d89562fD7c50b5f554d7fa25957e39Db",
362
359
  CARRY_AGENT_REGISTRY: "0x5595CB538D44E6Cf179D20364fD631D0477e69f7",
363
360
  CARRY_AGENT_REGISTRY_IMPL: "0x1b11a3D5e46F3672E643c997f0d569DFf0b64a01",
364
361
  AGENT_DELEGATION_REGISTRY: "0x6AE7fc6bE0925126b9D25b1B7Ce5AD5d127ec025",
@@ -415,7 +412,7 @@ var init_deployment_addresses = __esm({
415
412
  LiquidationManagerModule: "0x74B28695352E7bf736D6c9F76ccb7B4439477De9",
416
413
  CircuitBreakerModule: "0xF7b545d3a4Ee056D06909AB367E2F7bFFE3cB1BC",
417
414
  AdminModule: "0x0023B71B586795eE5fa4E83E384345C1EC8Bb946",
418
- PositionManagerViews: "0x9225647a30bbACA4Acc0491B786869036914242e",
415
+ PositionManagerViews: "0x8B57954eA338c6A6bfF1457f71080e25baFF3937",
419
416
  PositionManager: "0x12A1836e56139ccaD8722B89519d84233efc224B",
420
417
  OperationAuthorizationRegistry: "0xD4505645b724754f5170a2027804a4265e860d44",
421
418
  ContractVersionRegistry: "0x5e18f77d01940dA5B1D986D373D9A6ad0767008d",
@@ -424,7 +421,9 @@ var init_deployment_addresses = __esm({
424
421
  BitcoinProviderRegistry: "0x4ab3Fb96e02893Ed6FAa61bad1918390c8DbbFFC",
425
422
  BitcoinWithdrawalAddressRegistry: "0xf667f77FDba7458345f227eB6Bfe4148243E7270",
426
423
  SimplePSMV2: "0xfE0C14B4E614f40Bf58845b4B04CeD17fd116532",
427
- PKPValidation: "0x29922d3ccb86516f6C24F89f1eb3068655ca7Fa0"
424
+ PKPValidation: "0x29922d3ccb86516f6C24F89f1eb3068655ca7Fa0",
425
+ AgentDelegationRegistry: "0x54853b7E91ce2Be34ce65655D80c4447e67187Fa",
426
+ DHAgentDelegate: "0x70232d0caBe529e29a01A442423d7e03BBd414c8"
428
427
  },
429
428
  upgraded: {
430
429
  SimplePSMV2: {
@@ -439,16 +438,20 @@ var init_deployment_addresses = __esm({
439
438
  CollateralManagerModule: {
440
439
  previousImplementation: "0x1919860e528Cd2AbbD31a17858c986b8aCc8C185",
441
440
  newImplementation: "0x55110B9dd6B2c9f812564e7a1ef42b3c76E1A3Bb",
442
- upgradedAt: "2026-07-08T20:33:59Z",
443
- upgradedBy: "AdminModule generic-op 0x740efe0cfe85044479cbd8ee3058aa244057d90703dd2b37044dd6787cbf3485 (3-of-5 ADMIN_ROLE Safes, 24h timelock; executed by 0xfb3B8cbeFB7D666A6Af34C53e189EdC31862a7be in tx 0x430c8e450f12d3d9359cde356ac5e2ef39661d7a89884b5674a596c1090f6cff)",
444
- reason: "Validator gas fix (#420): BitcoinAddressValidator packed-table lookups; VERSION 1.3.0 -> 1.3.1"
441
+ upgradedAt: "2026-07-08T20:33:59.000Z",
442
+ upgradedBy: "AdminModule generic-op 0x740efe0cfe85044479cbd8ee3058aa244057d90703dd2b37044dd6787cbf3485 (3-of-5 ADMIN_ROLE Safes, 24h timelock; executed via Safe 0xfb3B8cbeFB7D666A6Af34C53e189EdC31862a7be, submitted by EOA 0x2002827d34A781883Ec4c83c36ECC140c3911F2B, tx 0x430c8e450f12d3d9359cde356ac5e2ef39661d7a89884b5674a596c1090f6cff, block 25490267)",
443
+ reason: "Validator gas fix (#420): BitcoinAddressValidator packed-table lookups; VERSION 1.3.0 -> 1.3.1. NOTE: not part of the audit rollout batch \u2014 reconcile-deployment-record.ts --write templates every row as 'audit rollout batch'; this hand-authored provenance is the accurate one, restore it if --write flattens it again.",
444
+ executeTx: "0x430c8e450f12d3d9359cde356ac5e2ef39661d7a89884b5674a596c1090f6cff",
445
+ block: 25490267
445
446
  },
446
447
  BitcoinWithdrawalAddressRegistry: {
447
448
  previousImplementation: "0x11731bFEC3068F2cc19D016381dfEA3B93013b1C",
448
449
  newImplementation: "0x190c08300Ae650fb88ed8156445BBeb13bE9E8a3",
449
- upgradedAt: "2026-07-08T20:33:59Z",
450
- upgradedBy: "AdminModule generic-op 0x2603a486c0f34554b864cc1d909b325c7e105331da10ec0fd7e0b9373fa76207 (3-of-5 ADMIN_ROLE Safes, 24h timelock; executed by 0xfb3B8cbeFB7D666A6Af34C53e189EdC31862a7be in tx 0x430c8e450f12d3d9359cde356ac5e2ef39661d7a89884b5674a596c1090f6cff)",
451
- reason: "Validator gas fix (#420): BitcoinAddressValidator packed-table lookups; VERSION 1.0.0 -> 1.0.1"
450
+ upgradedAt: "2026-07-08T20:33:59.000Z",
451
+ upgradedBy: "AdminModule generic-op 0x2603a486c0f34554b864cc1d909b325c7e105331da10ec0fd7e0b9373fa76207 (3-of-5 ADMIN_ROLE Safes, 24h timelock; executed via Safe 0xfb3B8cbeFB7D666A6Af34C53e189EdC31862a7be, submitted by EOA 0x2002827d34A781883Ec4c83c36ECC140c3911F2B, tx 0x430c8e450f12d3d9359cde356ac5e2ef39661d7a89884b5674a596c1090f6cff, block 25490267)",
452
+ reason: "Validator gas fix (#420): BitcoinAddressValidator packed-table lookups; VERSION 1.0.0 -> 1.0.1. NOTE: not part of the audit rollout batch \u2014 see the CollateralManagerModule row above.",
453
+ executeTx: "0x430c8e450f12d3d9359cde356ac5e2ef39661d7a89884b5674a596c1090f6cff",
454
+ block: 25490267
452
455
  },
453
456
  UCDController: {
454
457
  previousImplementation: "0x16f94AcC78cE87bEeBCfF90552091B3EfC071E48",
@@ -487,13 +490,13 @@ var init_deployment_addresses = __esm({
487
490
  block: 25472957
488
491
  },
489
492
  PositionManager: {
490
- previousImplementation: "0x9f52BaBB40FbFC5863e45B1A4014cB433950c684",
491
- newImplementation: "0x600Dc0D1C2c0F94882B6Bc09172f8650047Ad5B1",
492
- upgradedAt: "2026-07-06T08:42:47.000Z",
493
- upgradedBy: "AdminModule/Safe audit-batch upgradeToAndCall; executed by 0x2002827d34A781883Ec4c83c36ECC140c3911F2B in tx 0xa1fbe31cb71736514a868e681573dff22c9fab91d69cec157a24a30e29eadbe6 (block 25472368)",
494
- reason: "Reconciled from chain \u2014 mainnet audit rollout batch (cross-ref onchain-auth/.safe-batches/mainnet-audit-execute.json)",
495
- executeTx: "0xa1fbe31cb71736514a868e681573dff22c9fab91d69cec157a24a30e29eadbe6",
496
- block: 25472368
493
+ previousImplementation: "0x600Dc0D1C2c0F94882B6Bc09172f8650047Ad5B1",
494
+ newImplementation: "0x2e7170d6Fb15A876dB726732e72e63109bcB916d",
495
+ upgradedAt: "2026-08-03T08:34:23.000Z",
496
+ upgradedBy: "AdminModule generic-op 0x69b79a906ed2 (3-of-3 signatures, 24h timelock; proposed by 0xEba7BfAeB35ee18408b424Ee0BB45AdDf776589f, executed in the release batch onchain-auth/.safe-batches/mainnet-release-execute-B.json, submitted by EOA 0x2002827d34A781883Ec4c83c36ECC140c3911F2B, tx 0xf1f8d5fc13f45d7a3f932bf1a2d6e29381fdd41cd31298ad785bf7688df07fe6, block 25673200)",
497
+ reason: "2026-08 agent-stack release, Execute B: agent-delegation digest rebind. makePayment/mintUCD/extendPosition now bind their EIP-712 digest to the STORED borrower rather than msg.sender, so a scoped AgentDelegationRegistry grant can submit; withdrawBTC still binds msg.sender and stays non-delegable. Also adds setViews(address), which the same batch used to repoint PM at the replacement PositionManagerViews. NOTE: VERSION reads 1.5.4 on BOTH sides of this upgrade \u2014 verify by implementation ADDRESS, never by VERSION(). NOTE: not the July audit rollout batch \u2014 reconcile-deployment-record.ts --write templates every row with that text; this hand-authored provenance is the accurate one, restore it if --write flattens it again.",
498
+ executeTx: "0xf1f8d5fc13f45d7a3f932bf1a2d6e29381fdd41cd31298ad785bf7688df07fe6",
499
+ block: 25673200
497
500
  },
498
501
  LoanOperationsManagerModule: {
499
502
  previousImplementation: "0x56671D671e492Dae625413d463D47605Cf54edf6",
@@ -512,6 +515,41 @@ var init_deployment_addresses = __esm({
512
515
  reason: "Reconciled from chain \u2014 mainnet audit rollout batch (cross-ref onchain-auth/.safe-batches/mainnet-audit-execute.json)",
513
516
  executeTx: "0x9820e259700865a281b8376e248044048ba2fed1d17c811ac66ac54d36711a5b",
514
517
  block: 25472961
518
+ },
519
+ BitcoinProviderRegistry: {
520
+ newImplementation: "0x7Bc9473E45fb3EA594e8b13992F57D0444902ddB",
521
+ upgradedAt: "2026-06-16T17:51:11.000Z",
522
+ upgradedBy: "AdminModule/Safe audit-batch upgradeToAndCall; executed by 0xEba7BfAeB35ee18408b424Ee0BB45AdDf776589f in tx 0xf97e21ce2bc23876d60414c24ce6f45b2f0dd5e1ce42aca84f245f90f18ea17d (block 25331694)",
523
+ reason: "Reconciled from chain \u2014 mainnet audit rollout batch (cross-ref onchain-auth/.safe-batches/mainnet-audit-execute.json)",
524
+ executeTx: "0xf97e21ce2bc23876d60414c24ce6f45b2f0dd5e1ce42aca84f245f90f18ea17d",
525
+ block: 25331694
526
+ },
527
+ FeeRecipientRegistry: {
528
+ newImplementation: "0xEfAeB37faAdc2D420dC6F99128296B79fDDe74bE",
529
+ upgradedAt: "2026-06-16T17:30:35.000Z",
530
+ upgradedBy: "AdminModule/Safe audit-batch upgradeToAndCall; executed by 0xEba7BfAeB35ee18408b424Ee0BB45AdDf776589f in tx 0xc8f592166923f83b9b0cfc44e67c2ec75f79ca95be4f8ffa01654f702eaac502 (block 25331591)",
531
+ reason: "Reconciled from chain \u2014 mainnet audit rollout batch (cross-ref onchain-auth/.safe-batches/mainnet-audit-execute.json)",
532
+ executeTx: "0xc8f592166923f83b9b0cfc44e67c2ec75f79ca95be4f8ffa01654f702eaac502",
533
+ block: 25331591
534
+ },
535
+ PositionDelegateRegistry: {
536
+ previousImplementation: "0x3c7B975c03F549fe0656D9cbbA218BcF1C7092af",
537
+ newImplementation: "0x560a87251b3D306116F32D6e197FD068577e5349",
538
+ upgradedAt: "2026-08-02T18:34:35.000Z",
539
+ upgradedBy: "AdminModule generic-op 0x9acc88e33647ed5158ea161728c60ee4afecea7e3767735e7c1af0bb10ee0cb5 (3-of-3 signatures, 24h timelock; proposed by 0xEba7BfAeB35ee18408b424Ee0BB45AdDf776589f, executed in the release batch onchain-auth/.safe-batches/mainnet-release-execute-A.json, submitted by EOA 0x2002827d34A781883Ec4c83c36ECC140c3911F2B, tx 0xf0f237f6c4e958c37de556571908283c59c3fba6ebf9fa3cefb956f37e315a10, block 25669024)",
540
+ reason: "2026-08 agent-stack release: PositionDelegateRegistry VERSION 1.1.0 -> 2.0.0 via upgradeToAndCall + initializeV2(AdminModule, registrar 0x5D54E0BE\u2026, pauser 0xC205Ae99\u2026) \u2014 kill-switch, deny-only registrar, permanent delegate burn. NOTE: not the July audit rollout batch \u2014 reconcile-deployment-record.ts --write templates every row with that text; this hand-authored provenance is the accurate one, restore it if --write flattens it again.",
541
+ executeTx: "0xf0f237f6c4e958c37de556571908283c59c3fba6ebf9fa3cefb956f37e315a10",
542
+ block: 25669024
543
+ },
544
+ PositionManagerViews: {
545
+ previousImplementation: "0x9225647a30bbACA4Acc0491B786869036914242e",
546
+ newImplementation: "0xE68DC096A65Ecddbc6A9b5c6e5f878e2CE143Bfe",
547
+ proxy: "0x8B57954eA338c6A6bfF1457f71080e25baFF3937",
548
+ upgradedAt: "2026-08-03T08:34:23.000Z",
549
+ upgradedBy: "REPLACED, not upgraded. Fresh ERC1967Proxy (atomically initialized) + AdminModule generic-op 0x848a97186f0d PositionManager.setViews(proxy) \u2014 3-of-3, 24h timelock, executed in onchain-auth/.safe-batches/mainnet-release-execute-B.json",
550
+ reason: "2026-08 agent-stack release. The mainnet PositionManagerViews at 0x9225647a was deployed as a BARE implementation (EIP-1967 slot 0x00), so upgradeToAndCall reverts UUPSUnauthorizedCallContext \u2014 it could never be upgraded. PositionManager.setViews (added in the same Execute B batch) removed the repoint blocker, so Views was replaced behind a new proxy rather than upgraded. This makes the Pashov F3 renewal debt-ceiling check REACHABLE for the first time: ExceedsMaxLoan (0x499e7985) is present in 0xE68DC096 and absent from 0x9225647a. Views holds no protocol state (8 wiring slots + roles + pause), which is what made replacement safe. The old contract is ABANDONED, not decommissioned \u2014 it stays live and callable as the rollback target for setViews. NOTE: VERSION reads 1.1.1 on both sides; verify by address.",
551
+ executeTx: "0xf1f8d5fc13f45d7a3f932bf1a2d6e29381fdd41cd31298ad785bf7688df07fe6",
552
+ block: 25673200
515
553
  }
516
554
  },
517
555
  latestEnv: {
@@ -520,7 +558,7 @@ var init_deployment_addresses = __esm({
520
558
  FEE_RECIPIENT_REGISTRY: "0x8fbCAAdA198E1C246ecEb2fB021C5A3d8050c6B3",
521
559
  FEE_RECIPIENT_REGISTRY_IMPL: "0xEfAeB37faAdc2D420dC6F99128296B79fDDe74bE",
522
560
  POSITION_DELEGATE_REGISTRY: "0xf0aa2678aD4F60f49e8F7725089B5E86B7F8FE4C",
523
- POSITION_DELEGATE_REGISTRY_IMPL: "0x3c7B975c03F549fe0656D9cbbA218BcF1C7092af",
561
+ POSITION_DELEGATE_REGISTRY_IMPL: "0x560a87251b3D306116F32D6e197FD068577e5349",
524
562
  BITCOIN_PROVIDER_REGISTRY: "0x4ab3Fb96e02893Ed6FAa61bad1918390c8DbbFFC",
525
563
  BITCOIN_PROVIDER_REGISTRY_IMPL: "0x7Bc9473E45fb3EA594e8b13992F57D0444902ddB",
526
564
  BITCOIN_WITHDRAWAL_ADDRESS_REGISTRY: "0xf667f77FDba7458345f227eB6Bfe4148243E7270",
@@ -545,16 +583,19 @@ var init_deployment_addresses = __esm({
545
583
  ADMIN_MODULE_IMPL: "0xb4C5C7E051A1e672F014B25CB5D55B225Aa0D512",
546
584
  BTC_SPEND_AUTHORIZER: "0xfBbF108486fa07F1B06a811C5b66ed68DD9c508a",
547
585
  BTC_SPEND_AUTHORIZER_IMPL: "0x40c9e8C46C65E0A57BB63da5368868A9E8Df81A5",
548
- POSITION_MANAGER_VIEWS: "0x9225647a30bbACA4Acc0491B786869036914242e",
549
- POSITION_MANAGER_VIEWS_IMPL: "0x9225647a30bbACA4Acc0491B786869036914242e",
586
+ POSITION_MANAGER_VIEWS: "0x8B57954eA338c6A6bfF1457f71080e25baFF3937",
587
+ POSITION_MANAGER_VIEWS_IMPL: "0xE68DC096A65Ecddbc6A9b5c6e5f878e2CE143Bfe",
550
588
  POSITION_MANAGER: "0x12A1836e56139ccaD8722B89519d84233efc224B",
551
- POSITION_MANAGER_IMPL: "0x600Dc0D1C2c0F94882B6Bc09172f8650047Ad5B1",
589
+ POSITION_MANAGER_IMPL: "0x2e7170d6Fb15A876dB726732e72e63109bcB916d",
552
590
  LOAN_OPERATIONS_MANAGER_MODULE: "0x2561974A40F1AEed1251d0A090A83cF8536FB9E9",
553
591
  LOAN_OPERATIONS_MANAGER_MODULE_IMPL: "0x7d90aAB4466f59BA9aC9C7a9BF14dC53734336e7",
554
592
  UPGRADE_VALIDATOR: "0xC46Ae71F22e3741A6CF46E399aE914C4868fEbed",
555
593
  UPGRADE_VALIDATOR_IMPL: "0x4f835e77D1211299a1cbb8Aa2b42d9B390cC95CA",
556
594
  OPERATION_AUTHORIZATION_REGISTRY: "0xD4505645b724754f5170a2027804a4265e860d44",
557
- OPERATION_AUTHORIZATION_REGISTRY_IMPL: "0x493118746840EDB2D396E71632D2E774CA14070e"
595
+ OPERATION_AUTHORIZATION_REGISTRY_IMPL: "0x493118746840EDB2D396E71632D2E774CA14070e",
596
+ AGENT_DELEGATION_REGISTRY: "0x54853b7E91ce2Be34ce65655D80c4447e67187Fa",
597
+ AGENT_DELEGATION_REGISTRY_IMPL: "0xa9fF405Edd4329fc3159a64F56B37EBD253e4928",
598
+ DH_AGENT_DELEGATE: "0x70232d0caBe529e29a01A442423d7e03BBd414c8"
558
599
  }
559
600
  };
560
601
  MAINNET_CONTRACTS = {
@@ -571,7 +612,7 @@ var init_deployment_addresses = __esm({
571
612
  LiquidationManagerModule: "0x74B28695352E7bf736D6c9F76ccb7B4439477De9",
572
613
  CircuitBreakerModule: "0xF7b545d3a4Ee056D06909AB367E2F7bFFE3cB1BC",
573
614
  AdminModule: "0x0023B71B586795eE5fa4E83E384345C1EC8Bb946",
574
- PositionManagerViews: "0x9225647a30bbACA4Acc0491B786869036914242e",
615
+ PositionManagerViews: "0x8B57954eA338c6A6bfF1457f71080e25baFF3937",
575
616
  PositionManager: "0x12A1836e56139ccaD8722B89519d84233efc224B",
576
617
  OperationAuthorizationRegistry: "0xD4505645b724754f5170a2027804a4265e860d44",
577
618
  ContractVersionRegistry: "0x5e18f77d01940dA5B1D986D373D9A6ad0767008d",
@@ -580,7 +621,9 @@ var init_deployment_addresses = __esm({
580
621
  BitcoinProviderRegistry: "0x4ab3Fb96e02893Ed6FAa61bad1918390c8DbbFFC",
581
622
  BitcoinWithdrawalAddressRegistry: "0xf667f77FDba7458345f227eB6Bfe4148243E7270",
582
623
  SimplePSMV2: "0xfE0C14B4E614f40Bf58845b4B04CeD17fd116532",
583
- PKPValidation: "0x29922d3ccb86516f6C24F89f1eb3068655ca7Fa0"
624
+ PKPValidation: "0x29922d3ccb86516f6C24F89f1eb3068655ca7Fa0",
625
+ AgentDelegationRegistry: "0x54853b7E91ce2Be34ce65655D80c4447e67187Fa",
626
+ DHAgentDelegate: "0x70232d0caBe529e29a01A442423d7e03BBd414c8"
584
627
  };
585
628
  LOCALHOST_DEPLOYMENT = {
586
629
  network: "localhost",
@@ -1389,7 +1432,11 @@ var require_pkg_src = __commonJS({
1389
1432
  ),
1390
1433
  name: "Btc Withdrawal",
1391
1434
  description: "Production Btc Withdrawal",
1392
- version: "1.2.1",
1435
+ // Monotonic per action, NOT a shared release train — the EIP-1271 rotation
1436
+ // stamped its cohort 1.2.1, but this action was already at 1.2.3 from the vout
1437
+ // canonicalization fix. Reusing the cohort stamp made a newer CID read as older
1438
+ // than the one it replaced, which a rotation ceremony would treat as a rollback.
1439
+ version: "1.2.4",
1393
1440
  deployed: true,
1394
1441
  deployedAt: 1785226412397,
1395
1442
  size: 92754,
@@ -6484,6 +6531,7 @@ function sessionStoreKey(address, chainId, endpoint) {
6484
6531
  return STORE_PREFIX + `${address.trim().toLowerCase()}:${chainId}:${endpoint.replace(/\/+$/, "")}`;
6485
6532
  }
6486
6533
  var PENDING_ENVELOPE_TTL_SECONDS = 8 * 60;
6534
+ var EOA_PENDING_ENVELOPE_TTL_SECONDS = 60;
6487
6535
  function pendingEnvelopeKey(sessionKey) {
6488
6536
  return sessionKey + ":pending";
6489
6537
  }
@@ -6531,7 +6579,7 @@ var LocalStorageSessionStore = class {
6531
6579
  } catch {
6532
6580
  }
6533
6581
  }
6534
- loadPending(key) {
6582
+ loadPending(key, maxAgeSeconds = PENDING_ENVELOPE_TTL_SECONDS) {
6535
6583
  let raw;
6536
6584
  try {
6537
6585
  raw = window.localStorage.getItem(pendingEnvelopeKey(key));
@@ -6548,7 +6596,7 @@ var LocalStorageSessionStore = class {
6548
6596
  return null;
6549
6597
  }
6550
6598
  const nowSec = Math.floor(Date.now() / 1e3);
6551
- if (!isPendingEnvelopeShape(parsed) || nowSec >= parsed.issuedAt + PENDING_ENVELOPE_TTL_SECONDS) {
6599
+ if (!isPendingEnvelopeShape(parsed) || nowSec >= parsed.issuedAt + maxAgeSeconds) {
6552
6600
  this.clearPending(key);
6553
6601
  return null;
6554
6602
  }
@@ -6582,12 +6630,12 @@ var MemorySessionStore = class {
6582
6630
  clear(key) {
6583
6631
  this.entries.delete(key);
6584
6632
  }
6585
- loadPending(key) {
6633
+ loadPending(key, maxAgeSeconds = PENDING_ENVELOPE_TTL_SECONDS) {
6586
6634
  const envelope = this.pending.get(key);
6587
6635
  if (!envelope)
6588
6636
  return null;
6589
6637
  const nowSec = Math.floor(Date.now() / 1e3);
6590
- if (nowSec >= envelope.issuedAt + PENDING_ENVELOPE_TTL_SECONDS) {
6638
+ if (nowSec >= envelope.issuedAt + maxAgeSeconds) {
6591
6639
  this.pending.delete(key);
6592
6640
  return null;
6593
6641
  }
@@ -6621,15 +6669,23 @@ var REFRESH_LEEWAY_SECONDS = 30;
6621
6669
  var LOGIN_RETRY_BASE_MS = 3e4;
6622
6670
  var LOGIN_RETRY_MAX_MS = 5 * 6e4;
6623
6671
  var ServerLoginError = class extends Error {
6624
- constructor(message, status) {
6672
+ constructor(message, status, reason) {
6625
6673
  super(message);
6626
6674
  this.status = status;
6675
+ this.reason = reason;
6627
6676
  this.name = "ServerLoginError";
6628
6677
  }
6629
6678
  };
6630
6679
  function isLoginRejection(error) {
6631
6680
  return error instanceof ServerLoginError && error.status >= 400 && error.status < 500 && error.status !== 429;
6632
6681
  }
6682
+ var SPENT_ENVELOPE_REASONS = /* @__PURE__ */ new Set(["replayed_nonce", "expired_issuedAt"]);
6683
+ function isSpentEnvelope(error) {
6684
+ if (!isLoginRejection(error))
6685
+ return false;
6686
+ const { reason, status } = error;
6687
+ return reason ? SPENT_ENVELOPE_REASONS.has(reason) : status === 409;
6688
+ }
6633
6689
  var ServerSession = class {
6634
6690
  signer;
6635
6691
  serviceEndpoint;
@@ -6660,6 +6716,12 @@ var ServerSession = class {
6660
6716
  * `clear()` can drop the persisted token without an async address lookup.
6661
6717
  */
6662
6718
  lastStoreKey = null;
6719
+ /**
6720
+ * Whether the signer is a smart-contract wallet, memoized after the first
6721
+ * `eth_getCode`. Decides which of the server's two first-use windows bounds
6722
+ * envelope reuse; a signer cannot change kind for the life of the session.
6723
+ */
6724
+ contractSigner = null;
6663
6725
  constructor(opts) {
6664
6726
  assertSafeServiceEndpoint(opts.serviceEndpoint);
6665
6727
  this.signer = opts.signer;
@@ -6858,6 +6920,34 @@ var ServerSession = class {
6858
6920
  return null;
6859
6921
  }
6860
6922
  }
6923
+ /**
6924
+ * How long a pending envelope for THIS signer may be reused, in seconds.
6925
+ *
6926
+ * The server grants an EOA 120s to make an envelope's first use and a contract
6927
+ * wallet 600s, so one local TTL is necessarily wrong for one of them. Deployed
6928
+ * code has bytecode; an EOA does not — one `eth_getCode`, memoized, settles it.
6929
+ *
6930
+ * Reports the CONTRACT window when it cannot tell, which is the behavior that
6931
+ * shipped before the split. The asymmetry is intended: guessing "EOA" for a
6932
+ * Safe hands it a new message and orphans the owner signatures already
6933
+ * collected, while guessing "contract" for an EOA now costs one rejected
6934
+ * attempt, because a rejection clears the envelope.
6935
+ */
6936
+ async pendingEnvelopeTtl() {
6937
+ if (this.contractSigner === null) {
6938
+ try {
6939
+ const provider = this.signer.provider;
6940
+ if (!provider)
6941
+ return PENDING_ENVELOPE_TTL_SECONDS;
6942
+ const address = await this.signer.getAddress();
6943
+ const code = await provider.getCode(address);
6944
+ this.contractSigner = typeof code === "string" && code !== "0x";
6945
+ } catch {
6946
+ return PENDING_ENVELOPE_TTL_SECONDS;
6947
+ }
6948
+ }
6949
+ return this.contractSigner ? PENDING_ENVELOPE_TTL_SECONDS : EOA_PENDING_ENVELOPE_TTL_SECONDS;
6950
+ }
6861
6951
  async getOrRefresh() {
6862
6952
  const nowSec = this.now();
6863
6953
  if (this.cached && this.cached.expiresAt - REFRESH_LEEWAY_SECONDS > nowSec) {
@@ -6879,10 +6969,10 @@ var ServerSession = class {
6879
6969
  }
6880
6970
  this.onSignaturePrompt?.();
6881
6971
  let session;
6972
+ const store = this.store;
6973
+ const storeKey = store ? this.lastStoreKey : null;
6882
6974
  try {
6883
- const store = this.store;
6884
- const storeKey = store ? this.lastStoreKey : null;
6885
- const reuse = storeKey ? store.loadPending?.(storeKey) ?? void 0 : void 0;
6975
+ const reuse = storeKey ? store.loadPending?.(storeKey, await this.pendingEnvelopeTtl()) ?? void 0 : void 0;
6886
6976
  const payload = await buildSignedLoginPayload(
6887
6977
  this.signer,
6888
6978
  this.chainId,
@@ -6905,6 +6995,9 @@ var ServerSession = class {
6905
6995
  this.onSignatureResolved?.(true);
6906
6996
  } catch (error) {
6907
6997
  this.onSignatureResolved?.(false);
6998
+ if (storeKey && isSpentEnvelope(error)) {
6999
+ store.clearPending?.(storeKey);
7000
+ }
6908
7001
  const failures = (this.promptBackoff?.failures ?? 0) + 1;
6909
7002
  this.promptBackoff = {
6910
7003
  failures,
@@ -6933,9 +7026,17 @@ var ServerSession = class {
6933
7026
  });
6934
7027
  if (!res.ok) {
6935
7028
  const detail = await res.text().catch(() => "");
7029
+ let reason;
7030
+ try {
7031
+ const parsed = JSON.parse(detail);
7032
+ if (typeof parsed?.reason === "string")
7033
+ reason = parsed.reason;
7034
+ } catch {
7035
+ }
6936
7036
  throw new ServerLoginError(
6937
7037
  `lit-ops-server login failed: HTTP ${res.status} ${detail.slice(0, 200)}`,
6938
- res.status
7038
+ res.status,
7039
+ reason
6939
7040
  );
6940
7041
  }
6941
7042
  const body = await res.json();
@@ -7974,9 +8075,6 @@ var UCD_CONTROLLER_ABI = [
7974
8075
  "function balanceOf(address account) external view returns (uint256)",
7975
8076
  "function transfer(address to, uint256 amount) external returns (bool)"
7976
8077
  ];
7977
- var PRICE_FEED_ABI = [
7978
- "function getLatestPrice() external view returns (int256)"
7979
- ];
7980
8078
  var TERM_MANAGER_ABI = [
7981
8079
  "function getAvailableTerms() external view returns (uint256[] memory termIds, uint256[] memory durationDays, uint256[] memory interestRateBps)",
7982
8080
  "function getValidTermsWithFees() external view returns (uint256[] terms, uint88[] originationFees, uint88[] extensionFees)"
@@ -8044,11 +8142,6 @@ var ContractManager = class {
8044
8142
  UCD_CONTROLLER_ABI,
8045
8143
  contractRunner
8046
8144
  ),
8047
- priceFeed: new Contract2(
8048
- contractAddresses.priceFeedConsumer || ZeroAddress,
8049
- PRICE_FEED_ABI,
8050
- contractRunner
8051
- ),
8052
8145
  termManager: new Contract2(
8053
8146
  contractAddresses.termManager || ZeroAddress,
8054
8147
  TERM_MANAGER_ABI,
@@ -8094,7 +8187,6 @@ var ContractManager = class {
8094
8187
  "ucdToken"
8095
8188
  ];
8096
8189
  const optionalAddresses = [
8097
- "priceFeedConsumer",
8098
8190
  "loanOperationsManager",
8099
8191
  "termManager",
8100
8192
  "circuitBreaker",
@@ -8180,16 +8272,6 @@ var ContractManager = class {
8180
8272
  }
8181
8273
  return success(contractsResult.value.ucdController);
8182
8274
  }
8183
- /**
8184
- * Get Price Feed contract
8185
- */
8186
- getPriceFeed() {
8187
- const contractsResult = this.getContracts();
8188
- if (!contractsResult.success) {
8189
- return contractsResult;
8190
- }
8191
- return success(contractsResult.value.priceFeed);
8192
- }
8193
8275
  /**
8194
8276
  * Get Term Manager contract
8195
8277
  */
@@ -17860,6 +17942,7 @@ var DelegateDenyReason = /* @__PURE__ */ ((DelegateDenyReason2) => {
17860
17942
  DelegateDenyReason2[DelegateDenyReason2["PAUSED"] = 1] = "PAUSED";
17861
17943
  DelegateDenyReason2[DelegateDenyReason2["NO_DELEGATE"] = 2] = "NO_DELEGATE";
17862
17944
  DelegateDenyReason2[DelegateDenyReason2["NOT_DELEGATE"] = 3] = "NOT_DELEGATE";
17945
+ DelegateDenyReason2[DelegateDenyReason2["BURNED"] = 4] = "BURNED";
17863
17946
  return DelegateDenyReason2;
17864
17947
  })(DelegateDenyReason || {});
17865
17948
  var DELEGATE_STATUS_ABI = [
@@ -24552,22 +24635,28 @@ Message: ${causeMessage}${quantumContext}${mintDebtDiagnostics}`
24552
24635
  * @throws if timeout is reached before subgraph catches up
24553
24636
  */
24554
24637
  // ============================================================================
24555
- // HIGH-LEVEL API - Agent Delegation (auto-renew) — SEPOLIA ONLY
24638
+ // HIGH-LEVEL API - Agent Delegation (auto-renew)
24556
24639
  // ============================================================================
24557
- /** Guard: the AgentDelegationRegistry MVP is deployed on Sepolia only. */
24558
- async assertAgentDelegationSepolia() {
24559
- const chainId = Number((await this.getProviderOrThrow().getNetwork()).chainId);
24560
- if (chainId !== 11155111) {
24561
- throw new SDKError({
24562
- message: `Agent auto-renew delegation is Sepolia-only (chainId 11155111); got ${chainId}`,
24563
- category: "NETWORK" /* NETWORK */,
24564
- severity: "HIGH" /* HIGH */
24565
- });
24566
- }
24640
+ /**
24641
+ * Guard: resolve the AgentDelegationRegistry for the configured network.
24642
+ *
24643
+ * Deployment presence IS the availability test — there is deliberately no chainId
24644
+ * allow-list here. The registry is deployed per network (Sepolia 2026-07, mainnet
24645
+ * 2026-08 agent-stack release) and `getNetworkConfig` populates the address from the
24646
+ * generated deployment table, so a chain without a deployment resolves to `""` and
24647
+ * fails closed below. Adding a chain therefore needs no SDK code change — which is
24648
+ * exactly how the previous hardcoded `chainId !== 11155111` gate went stale and kept
24649
+ * the mainnet toggle dark after the registry shipped.
24650
+ *
24651
+ * Callers that need the availability answer WITHOUT throwing (e.g. to decide whether to
24652
+ * render a toggle at all) should ask the deployment table directly rather than calling this
24653
+ * and catching — `ALL_DEPLOYMENTS` is published on the `@gvnrdao/dh-sdk/deployments` subpath.
24654
+ */
24655
+ agentDelegationRegistryOrThrow() {
24567
24656
  const addr = this.config.contractAddresses?.agentDelegationRegistry;
24568
24657
  if (!addr) {
24569
24658
  throw new SDKError({
24570
- message: "AgentDelegationRegistry address not configured \u2014 provide contractAddresses.agentDelegationRegistry",
24659
+ message: "AgentDelegationRegistry is not available on this network \u2014 no deployment address is configured (contractAddresses.agentDelegationRegistry)",
24571
24660
  category: "CONFIGURATION" /* CONFIGURATION */,
24572
24661
  severity: "HIGH" /* HIGH */
24573
24662
  });
@@ -24579,7 +24668,7 @@ Message: ${causeMessage}${quantumContext}${mintDebtDiagnostics}`
24579
24668
  * Pure view — no signer required.
24580
24669
  */
24581
24670
  async getAutoRenewStatus(positionId, user) {
24582
- const addr = await this.assertAgentDelegationSepolia();
24671
+ const addr = this.agentDelegationRegistryOrThrow();
24583
24672
  const registry = AgentDelegationRegistry__factory.connect(addr, this.getProviderOrThrow());
24584
24673
  const pid = this.toBytes32(positionId);
24585
24674
  const grant = await registry.getLoanGrant(pid);
@@ -24599,7 +24688,7 @@ Message: ${causeMessage}${quantumContext}${mintDebtDiagnostics}`
24599
24688
  * registers it, then records the position's renew grant. Borrower-signed.
24600
24689
  */
24601
24690
  async enableAutoRenew(positionId, options) {
24602
- const addr = await this.assertAgentDelegationSepolia();
24691
+ const addr = this.agentDelegationRegistryOrThrow();
24603
24692
  const pdrAddr = this.config.contractAddresses?.positionDelegateRegistry;
24604
24693
  if (!pdrAddr) {
24605
24694
  throw new SDKError({
@@ -24639,7 +24728,7 @@ Message: ${causeMessage}${quantumContext}${mintDebtDiagnostics}`
24639
24728
  }
24640
24729
  /** Disable auto-renew delegation for a position (clears the grant). Borrower-signed. */
24641
24730
  async disableAutoRenew(positionId) {
24642
- const addr = await this.assertAgentDelegationSepolia();
24731
+ const addr = this.agentDelegationRegistryOrThrow();
24643
24732
  const signer = this.getSignerOrThrow();
24644
24733
  const user = await signer.getAddress();
24645
24734
  const registry = AgentDelegationRegistry__factory.connect(addr, signer);
@@ -20,7 +20,14 @@ export interface ContractAddresses {
20
20
  circuitBreaker?: string;
21
21
  liquidationManager?: string;
22
22
  ucdToken: string;
23
- /** Optional when priceProviders is used (LIT actions fetch prices) */
23
+ /**
24
+ * @deprecated Unused since 2026-07-30 and ignored by the SDK. Kept only so existing callers that
25
+ * still pass it do not fail to typecheck; it will be dropped at the next breaking release.
26
+ *
27
+ * No deployed contract references the address, the Solidity source was deleted in Feb 2026, and
28
+ * the SDK no longer builds a contract from it. Prices arrive via the Chainlink aggregator on
29
+ * `LoanOperationsManager.btcUsdPriceFeed` and the LIT actions' encrypted `priceProviders`.
30
+ */
24
31
  priceFeedConsumer?: string;
25
32
  operationAuthorizationRegistry?: string;
26
33
  btcProofValidator?: string;