@gvnrdao/dh-sdk 0.0.221 → 0.0.223
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.js +122 -79
- package/dist/index.mjs +122 -79
- package/dist/interfaces/chunks/config.i.d.ts +13 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -13359,30 +13359,30 @@ var require_pkg_src = __commonJS({
|
|
|
13359
13359
|
}
|
|
13360
13360
|
},
|
|
13361
13361
|
btcTransactionSigner: {
|
|
13362
|
-
cid: "
|
|
13362
|
+
cid: "QmZyn4MjYwrtVHfHJJ8cDnQLaQxkWKArnKzx5UaDV26rmt",
|
|
13363
13363
|
authorizedCidHex: cidToHex(
|
|
13364
|
-
"
|
|
13364
|
+
"QmZyn4MjYwrtVHfHJJ8cDnQLaQxkWKArnKzx5UaDV26rmt"
|
|
13365
13365
|
),
|
|
13366
13366
|
name: "Btc Transaction Signer",
|
|
13367
13367
|
description: "Production Btc Transaction Signer",
|
|
13368
13368
|
version: "1.0.0",
|
|
13369
13369
|
deployed: true,
|
|
13370
|
-
deployedAt:
|
|
13371
|
-
size:
|
|
13372
|
-
hash: "
|
|
13370
|
+
deployedAt: 1777493882468,
|
|
13371
|
+
size: 25656,
|
|
13372
|
+
hash: "c1dc107c830449d55e05a2777c072d7e0c62e2bfec4406d5d1bc8dab61eadf91"
|
|
13373
13373
|
},
|
|
13374
13374
|
ucdMintValidator: {
|
|
13375
|
-
cid: "
|
|
13375
|
+
cid: "QmUuQHr21xq7EVBVS4AM3TxU1LBC7G9yvsXdXjPFHJQVw7",
|
|
13376
13376
|
authorizedCidHex: cidToHex(
|
|
13377
|
-
"
|
|
13377
|
+
"QmUuQHr21xq7EVBVS4AM3TxU1LBC7G9yvsXdXjPFHJQVw7"
|
|
13378
13378
|
),
|
|
13379
13379
|
name: "Ucd Mint Validator",
|
|
13380
13380
|
description: "Production Ucd Mint Validator",
|
|
13381
13381
|
version: "1.0.0",
|
|
13382
13382
|
deployed: true,
|
|
13383
|
-
deployedAt:
|
|
13384
|
-
size:
|
|
13385
|
-
hash: "
|
|
13383
|
+
deployedAt: 1777493891124,
|
|
13384
|
+
size: 65506,
|
|
13385
|
+
hash: "a42096083c705332dda82d5e669e5e1e258c1d9da0203593f6502a14d61f1fb7",
|
|
13386
13386
|
validatorWalletAddress: "0x36f3dd61c4c08a56d29ed2fd6d5f111b67b6a7a1",
|
|
13387
13387
|
pkp: {
|
|
13388
13388
|
publicKey: "0x041ab17cd91fc5c0b761eea6092d032807561b621b82c488826776e04a9158d61ba64d809a4729f0501289d980732cb06d8dfd06999dd9c8efd2f495dad78b31bb",
|
|
@@ -13390,17 +13390,17 @@ var require_pkg_src = __commonJS({
|
|
|
13390
13390
|
}
|
|
13391
13391
|
},
|
|
13392
13392
|
processPaymentValidator: {
|
|
13393
|
-
cid: "
|
|
13393
|
+
cid: "QmWb6MxjnfCe2KboAEF83za8u528hLeuoAqE6JCTKcAqMZ",
|
|
13394
13394
|
authorizedCidHex: cidToHex(
|
|
13395
|
-
"
|
|
13395
|
+
"QmWb6MxjnfCe2KboAEF83za8u528hLeuoAqE6JCTKcAqMZ"
|
|
13396
13396
|
),
|
|
13397
13397
|
name: "Process Payment Validator",
|
|
13398
13398
|
description: "Production Process Payment Validator",
|
|
13399
13399
|
version: "1.0.0",
|
|
13400
13400
|
deployed: true,
|
|
13401
|
-
deployedAt:
|
|
13402
|
-
size:
|
|
13403
|
-
hash: "
|
|
13401
|
+
deployedAt: 1777493900466,
|
|
13402
|
+
size: 61412,
|
|
13403
|
+
hash: "c77a28d80a8122c73b634229b9024e3974eedf696e5db29db7b40dc9a53f9165",
|
|
13404
13404
|
validatorWalletAddress: "0xc2ed5a59bd81eb4d1a19a0147b86ab69aa4c28ba",
|
|
13405
13405
|
pkp: {
|
|
13406
13406
|
publicKey: "0x04cfccb9b6c7addc79469c0e9fafebef4c70801302c62cdb26b610723a9b8527d23f98a40158c7340d83fd0e62d02b5ec74c12f7a86d98e8c6973b4811110f19ad",
|
|
@@ -13408,17 +13408,17 @@ var require_pkg_src = __commonJS({
|
|
|
13408
13408
|
}
|
|
13409
13409
|
},
|
|
13410
13410
|
extendPositionValidator: {
|
|
13411
|
-
cid: "
|
|
13411
|
+
cid: "QmV2uyKWNY54HHoC5FggF4nFqGNoDydQ6ceExA8ztmjHwz",
|
|
13412
13412
|
authorizedCidHex: cidToHex(
|
|
13413
|
-
"
|
|
13413
|
+
"QmV2uyKWNY54HHoC5FggF4nFqGNoDydQ6ceExA8ztmjHwz"
|
|
13414
13414
|
),
|
|
13415
13415
|
name: "Extend Position Validator",
|
|
13416
13416
|
description: "Production Extend Position Validator",
|
|
13417
13417
|
version: "1.0.0",
|
|
13418
13418
|
deployed: true,
|
|
13419
|
-
deployedAt:
|
|
13420
|
-
size:
|
|
13421
|
-
hash: "
|
|
13419
|
+
deployedAt: 1777496426914,
|
|
13420
|
+
size: 60611,
|
|
13421
|
+
hash: "d2ee66d7fd30762d637d54f1dedb40d5d7bfe7dac9a92201e60b62de30e6aa80",
|
|
13422
13422
|
validatorWalletAddress: "0xb3f4271c475887a86a2f21446f0968c30cc74c97",
|
|
13423
13423
|
pkp: {
|
|
13424
13424
|
publicKey: "0x04e52338f6a0c3362800f1a94c4c8f08be5030dde0fa217388c53d1c1a4790f4443c9f2886b2d2d8f4b75a9a156e9b028011b1a1cf7648da0e556aa980ec692836",
|
|
@@ -13426,17 +13426,17 @@ var require_pkg_src = __commonJS({
|
|
|
13426
13426
|
}
|
|
13427
13427
|
},
|
|
13428
13428
|
btcWithdrawal: {
|
|
13429
|
-
cid: "
|
|
13429
|
+
cid: "QmdaeZ3inL9LiSkSAYV81ohqdYJ24n7awEpitHDHXKaJUm",
|
|
13430
13430
|
authorizedCidHex: cidToHex(
|
|
13431
|
-
"
|
|
13431
|
+
"QmdaeZ3inL9LiSkSAYV81ohqdYJ24n7awEpitHDHXKaJUm"
|
|
13432
13432
|
),
|
|
13433
13433
|
name: "Btc Withdrawal",
|
|
13434
13434
|
description: "Production Btc Withdrawal",
|
|
13435
|
-
version: "1.0.
|
|
13435
|
+
version: "1.0.0",
|
|
13436
13436
|
deployed: true,
|
|
13437
|
-
deployedAt:
|
|
13438
|
-
size:
|
|
13439
|
-
hash: "
|
|
13437
|
+
deployedAt: 1777551892935,
|
|
13438
|
+
size: 72300,
|
|
13439
|
+
hash: "888eef2c01d71a20fc6734fab41ec9f4eda4941774fe23ac44d1fcb6c21a8807",
|
|
13440
13440
|
validatorWalletAddress: "0xbb137fbda353199e9419b698c57a742124d4987d",
|
|
13441
13441
|
pkp: {
|
|
13442
13442
|
publicKey: "0x043616787c5432415c24378c4ef48de2bcd6bb7b575b837e3cff09171802662da7105d79586c7659677a0ecbaddac4cce06cb2a11f69a16fa0c4d7002ac7d51a4d",
|
|
@@ -13444,17 +13444,17 @@ var require_pkg_src = __commonJS({
|
|
|
13444
13444
|
}
|
|
13445
13445
|
},
|
|
13446
13446
|
liquidationValidator: {
|
|
13447
|
-
cid: "
|
|
13447
|
+
cid: "QmaDsh5t5J6s1TgYeoW8PPZXM1gniZWW3jfPyg1MHjPQ7Q",
|
|
13448
13448
|
authorizedCidHex: cidToHex(
|
|
13449
|
-
"
|
|
13449
|
+
"QmaDsh5t5J6s1TgYeoW8PPZXM1gniZWW3jfPyg1MHjPQ7Q"
|
|
13450
13450
|
),
|
|
13451
13451
|
name: "Liquidation Validator",
|
|
13452
13452
|
description: "Production Liquidation Validator",
|
|
13453
13453
|
version: "1.0.0",
|
|
13454
13454
|
deployed: true,
|
|
13455
|
-
deployedAt:
|
|
13456
|
-
size:
|
|
13457
|
-
hash: "
|
|
13455
|
+
deployedAt: 1777493931019,
|
|
13456
|
+
size: 54906,
|
|
13457
|
+
hash: "ffe0b955b64973aa155cc29dc9aeceb72a36459d5a2c734dca872ba936db6f8e",
|
|
13458
13458
|
validatorWalletAddress: "0x1542f863ee0340f6a067573e80ae66dd9b3838fa",
|
|
13459
13459
|
pkp: {
|
|
13460
13460
|
publicKey: "0x041a241de58976c13e3d7ca5a18e494f7330151e3818706135d50176e78ffb673e58b11f0b67a87c73fade6c6b27d6e7a7377ea9f4c10bf31880f1d725f18cc6f8",
|
|
@@ -13498,17 +13498,17 @@ var require_pkg_src = __commonJS({
|
|
|
13498
13498
|
}
|
|
13499
13499
|
},
|
|
13500
13500
|
adminLiquidationValidator: {
|
|
13501
|
-
cid: "
|
|
13501
|
+
cid: "QmdeeDPqjh59HG3AF8LrvQkM8n3wbirRyyKBoY3XAzmi6b",
|
|
13502
13502
|
authorizedCidHex: cidToHex(
|
|
13503
|
-
"
|
|
13503
|
+
"QmdeeDPqjh59HG3AF8LrvQkM8n3wbirRyyKBoY3XAzmi6b"
|
|
13504
13504
|
),
|
|
13505
13505
|
name: "Admin Liquidation Validator",
|
|
13506
13506
|
description: "Production Admin Liquidation Validator",
|
|
13507
13507
|
version: "1.0.0",
|
|
13508
13508
|
deployed: true,
|
|
13509
|
-
deployedAt:
|
|
13510
|
-
size:
|
|
13511
|
-
hash: "
|
|
13509
|
+
deployedAt: 1777493941746,
|
|
13510
|
+
size: 51555,
|
|
13511
|
+
hash: "404fc4620f6b2ff31f233cdbe18290992498e63e45f38da76e3b6e7826e435b4",
|
|
13512
13512
|
validatorWalletAddress: "0x2a83b78842d75358877deb8854ccc5bbbaa5012e",
|
|
13513
13513
|
pkp: {
|
|
13514
13514
|
publicKey: "0x04ee4316afb8538280ede6c56def9cbe791f18f96ccba97768b28e2966d9c46a9493a6b81f4571495c3ce56c2d0b33fe8cf63726cd12d395832ea54162b5c67801",
|
|
@@ -14325,16 +14325,16 @@ var init_deployment_addresses = __esm({
|
|
|
14325
14325
|
},
|
|
14326
14326
|
upgraded: {
|
|
14327
14327
|
PositionManager: {
|
|
14328
|
-
previousImplementation: "
|
|
14329
|
-
newImplementation: "
|
|
14330
|
-
upgradedAt: "2026-04-
|
|
14328
|
+
previousImplementation: "0x0e40B4D1708f49319f32d51AF01674c26acACeBF",
|
|
14329
|
+
newImplementation: "0x94096F14f58Cb427B36f2a5aeE24348a26534C74",
|
|
14330
|
+
upgradedAt: "2026-04-30T16:23:00.805Z",
|
|
14331
14331
|
upgradedBy: "0xF20986F02420EF443AE9BE5092FB8A4975cF3aA6",
|
|
14332
14332
|
reason: "Shared upgrade script: PositionManager implementation update"
|
|
14333
14333
|
},
|
|
14334
14334
|
LoanOperationsManagerModule: {
|
|
14335
|
-
previousImplementation: "
|
|
14336
|
-
newImplementation: "
|
|
14337
|
-
upgradedAt: "2026-04-
|
|
14335
|
+
previousImplementation: "0xCf8998a639cC48139C4c61C8B1005EaC40419b88",
|
|
14336
|
+
newImplementation: "0xF79384d5186B6081124a560e181dC5E0Cf0444dD",
|
|
14337
|
+
upgradedAt: "2026-04-30T16:40:12.746Z",
|
|
14338
14338
|
upgradedBy: "0xF20986F02420EF443AE9BE5092FB8A4975cF3aA6",
|
|
14339
14339
|
reason: "Shared upgrade script: LoanOperationsManagerModule implementation update"
|
|
14340
14340
|
},
|
|
@@ -14346,25 +14346,25 @@ var init_deployment_addresses = __esm({
|
|
|
14346
14346
|
reason: "Shared upgrade script: UCDController implementation update"
|
|
14347
14347
|
},
|
|
14348
14348
|
TermManagerModule: {
|
|
14349
|
-
previousImplementation: "
|
|
14350
|
-
newImplementation: "
|
|
14351
|
-
upgradedAt: "2026-04-
|
|
14349
|
+
previousImplementation: "0x2EaF1052706120CAa6B6F75354F70f77ef2261eB",
|
|
14350
|
+
newImplementation: "0xcc3D2dD7aAfaE5DE923dfd53833a40077178dd75",
|
|
14351
|
+
upgradedAt: "2026-04-30T16:06:36.895Z",
|
|
14352
14352
|
upgradedBy: "0xF20986F02420EF443AE9BE5092FB8A4975cF3aA6",
|
|
14353
14353
|
reason: "Shared upgrade script: TermManagerModule implementation update"
|
|
14354
14354
|
},
|
|
14355
14355
|
CircuitBreakerModule: {
|
|
14356
|
-
previousImplementation: "
|
|
14357
|
-
newImplementation: "
|
|
14358
|
-
upgradedAt: "2026-04-
|
|
14356
|
+
previousImplementation: "0x8e9e10B14E6a91ec271FBEb4FD3fB1FE06b545dD",
|
|
14357
|
+
newImplementation: "0x485F5E93E479830698Ffdc36957edfcf0084E4c6",
|
|
14358
|
+
upgradedAt: "2026-04-30T16:11:25.723Z",
|
|
14359
14359
|
upgradedBy: "0xF20986F02420EF443AE9BE5092FB8A4975cF3aA6",
|
|
14360
14360
|
reason: "Shared upgrade script: CircuitBreakerModule implementation update"
|
|
14361
14361
|
},
|
|
14362
14362
|
AdminModule: {
|
|
14363
|
-
previousImplementation: "
|
|
14364
|
-
newImplementation: "
|
|
14365
|
-
upgradedAt: "2026-04-
|
|
14363
|
+
previousImplementation: "0x67AE2F872c37f33db9bC631e135432B2845d308b",
|
|
14364
|
+
newImplementation: "0xaC7c227EddCE4F03590Ad10e773219Ffc07f9277",
|
|
14365
|
+
upgradedAt: "2026-04-30T16:24:49.030Z",
|
|
14366
14366
|
upgradedBy: "0xF20986F02420EF443AE9BE5092FB8A4975cF3aA6",
|
|
14367
|
-
reason: "
|
|
14367
|
+
reason: "Bulk-pause functions and network-aware operationDelay"
|
|
14368
14368
|
},
|
|
14369
14369
|
PositionManagerViews: {
|
|
14370
14370
|
previousImplementation: "0xE8b4D4b6E3163EdfF8958da4cF8267ACa369D486",
|
|
@@ -14388,30 +14388,30 @@ var init_deployment_addresses = __esm({
|
|
|
14388
14388
|
reason: "Shared upgrade script: UCDToken implementation update"
|
|
14389
14389
|
},
|
|
14390
14390
|
PositionManagerCoreModule: {
|
|
14391
|
-
previousImplementation: "
|
|
14392
|
-
newImplementation: "
|
|
14393
|
-
upgradedAt: "2026-04-
|
|
14391
|
+
previousImplementation: "0xED380dDdc919b94924cCd5697bEEfdc347Daa9A6",
|
|
14392
|
+
newImplementation: "0x9c7EF89F1F66F78522AA9D45F894f75583edEC3d",
|
|
14393
|
+
upgradedAt: "2026-04-30T16:21:05.763Z",
|
|
14394
14394
|
upgradedBy: "0xF20986F02420EF443AE9BE5092FB8A4975cF3aA6",
|
|
14395
14395
|
reason: "Shared upgrade script: PositionManagerCoreModule implementation update"
|
|
14396
14396
|
},
|
|
14397
14397
|
CollateralManagerModule: {
|
|
14398
|
-
previousImplementation: "
|
|
14399
|
-
newImplementation: "
|
|
14400
|
-
upgradedAt: "2026-04-
|
|
14398
|
+
previousImplementation: "0xd021ca6Dc2377F361E3c64f60C93E0e4075c2840",
|
|
14399
|
+
newImplementation: "0x920e4f52c251B758e351c0d14c4418ad4E5B77ed",
|
|
14400
|
+
upgradedAt: "2026-04-30T16:03:49.056Z",
|
|
14401
14401
|
upgradedBy: "0xF20986F02420EF443AE9BE5092FB8A4975cF3aA6",
|
|
14402
14402
|
reason: "Shared upgrade script: CollateralManagerModule implementation update"
|
|
14403
14403
|
},
|
|
14404
14404
|
LiquidationManagerModule: {
|
|
14405
|
-
previousImplementation: "
|
|
14406
|
-
newImplementation: "
|
|
14407
|
-
upgradedAt: "2026-04-
|
|
14405
|
+
previousImplementation: "0xf74d5437691df92087170861213e26064358A7fb",
|
|
14406
|
+
newImplementation: "0xcdd426D27bB2f54Dba76dF60EF3D14fD5776CEc7",
|
|
14407
|
+
upgradedAt: "2026-04-30T16:09:01.899Z",
|
|
14408
14408
|
upgradedBy: "0xF20986F02420EF443AE9BE5092FB8A4975cF3aA6",
|
|
14409
14409
|
reason: "Shared upgrade script: LiquidationManagerModule implementation update"
|
|
14410
14410
|
},
|
|
14411
14411
|
BTCSpendAuthorizer: {
|
|
14412
|
-
previousImplementation: "
|
|
14413
|
-
newImplementation: "
|
|
14414
|
-
upgradedAt: "2026-04-
|
|
14412
|
+
previousImplementation: "0xe7337422e2A4AE7709EFc01fB6C681C8899e673C",
|
|
14413
|
+
newImplementation: "0x605bf1C988bb307AFA07326954D593A71580e99d",
|
|
14414
|
+
upgradedAt: "2026-04-30T20:22:12.956Z",
|
|
14415
14415
|
upgradedBy: "0xF20986F02420EF443AE9BE5092FB8A4975cF3aA6",
|
|
14416
14416
|
reason: "Shared upgrade script: BTCSpendAuthorizer implementation update"
|
|
14417
14417
|
},
|
|
@@ -14423,9 +14423,9 @@ var init_deployment_addresses = __esm({
|
|
|
14423
14423
|
reason: "Shared upgrade script: SimplePSMV2 implementation update"
|
|
14424
14424
|
},
|
|
14425
14425
|
UpgradeValidator: {
|
|
14426
|
-
previousImplementation: "
|
|
14427
|
-
newImplementation: "
|
|
14428
|
-
upgradedAt: "2026-04-
|
|
14426
|
+
previousImplementation: "0x974C6F4e0F67Fa9d7Ab1aee8C10Bd85B201ec5D7",
|
|
14427
|
+
newImplementation: "0xEFf189e5872bC7158191eD39d31E745aF2A6FDa7",
|
|
14428
|
+
upgradedAt: "2026-04-30T16:47:01.406Z",
|
|
14429
14429
|
upgradedBy: "0xF20986F02420EF443AE9BE5092FB8A4975cF3aA6",
|
|
14430
14430
|
reason: "Shared upgrade script: UpgradeValidator implementation update"
|
|
14431
14431
|
},
|
|
@@ -14503,12 +14503,12 @@ var init_deployment_addresses = __esm({
|
|
|
14503
14503
|
CIRCUIT_BREAKER_MODULE: "0x3D0B2cAE481821E57BA9CC3807bCC0d0D7F18bd8",
|
|
14504
14504
|
ADMIN_MODULE: "0xAcd1f07915b17CA3727e7fE89BdF618A1545a1ed",
|
|
14505
14505
|
UCD_CONTROLLER_IMPL: "0x2d4d689A70B56b6E0B9F70BffA6265A55173A4A1",
|
|
14506
|
-
LOAN_OPERATIONS_MANAGER_MODULE_IMPL: "
|
|
14507
|
-
TERM_MANAGER_MODULE_IMPL: "
|
|
14506
|
+
LOAN_OPERATIONS_MANAGER_MODULE_IMPL: "0xF79384d5186B6081124a560e181dC5E0Cf0444dD",
|
|
14507
|
+
TERM_MANAGER_MODULE_IMPL: "0xcc3D2dD7aAfaE5DE923dfd53833a40077178dd75",
|
|
14508
14508
|
CIRCUIT_BREAKER_MODULE_IMPL: "0x8e9e10B14E6a91ec271FBEb4FD3fB1FE06b545dD",
|
|
14509
14509
|
ADMIN_MODULE_IMPL: "0x67AE2F872c37f33db9bC631e135432B2845d308b",
|
|
14510
14510
|
POSITION_MANAGER_VIEWS_IMPL: "0xadF8e0F34082a8fC23e727276e0aEf3af183C8Fd",
|
|
14511
|
-
POSITION_MANAGER_IMPL: "
|
|
14511
|
+
POSITION_MANAGER_IMPL: "0x94096F14f58Cb427B36f2a5aeE24348a26534C74",
|
|
14512
14512
|
SIMPLE_PSM_V2: "0x19EcF7BA26e054fd4Ff06009A03070103dbBB058",
|
|
14513
14513
|
SIMPLE_PSM_V2_IMPL: "0x4107104fDF61AACC674f1F168c275f034c8112BF",
|
|
14514
14514
|
UCD_TOKEN_IMPL: "0x155Da00Ee0beb1d9D5BA34Aeb62c9ad4E8227d5D",
|
|
@@ -14521,7 +14521,7 @@ var init_deployment_addresses = __esm({
|
|
|
14521
14521
|
BTC_SPEND_AUTHORIZER: "0xd7E9Eb5eE53f1d9ee55Dc162bBC7486bE437B6bD",
|
|
14522
14522
|
BTC_SPEND_AUTHORIZER_IMPL: "0x4CD021181bD2583d10aB37D27FE2994b75c41b77",
|
|
14523
14523
|
UPGRADE_VALIDATOR: "0x592e650edD9bA26ecc407989fdd6F9cdcDeC27A6",
|
|
14524
|
-
UPGRADE_VALIDATOR_IMPL: "
|
|
14524
|
+
UPGRADE_VALIDATOR_IMPL: "0xEFf189e5872bC7158191eD39d31E745aF2A6FDa7",
|
|
14525
14525
|
BITCOIN_PROVIDER_REGISTRY: "0xbfA0c48B070D0a9A9CD27469AeacFD2d4261cEE2",
|
|
14526
14526
|
BITCOIN_PROVIDER_REGISTRY_IMPL: "0x225309A4ae6D146ba93A3278A7b40224FfC81448",
|
|
14527
14527
|
LIT_ACTION_VALIDATOR: "0x54eECd7C90F8A8fac27749Ba30BbE8AFBAccc856",
|
|
@@ -37702,6 +37702,18 @@ var DiamondHandsSDK = class _DiamondHandsSDK {
|
|
|
37702
37702
|
* Check if SDK is ready for operations
|
|
37703
37703
|
*/
|
|
37704
37704
|
async _relayNotification(message) {
|
|
37705
|
+
const handler = this.config.notificationHandler;
|
|
37706
|
+
if (typeof handler === "function") {
|
|
37707
|
+
try {
|
|
37708
|
+
await handler(message);
|
|
37709
|
+
} catch (err) {
|
|
37710
|
+
if (this.config.debug) {
|
|
37711
|
+
log.warn("notificationHandler threw", {
|
|
37712
|
+
error: err instanceof Error ? err.message : String(err)
|
|
37713
|
+
});
|
|
37714
|
+
}
|
|
37715
|
+
}
|
|
37716
|
+
}
|
|
37705
37717
|
if (this.config.mode !== "service")
|
|
37706
37718
|
return;
|
|
37707
37719
|
const endpoint = this.config.serviceEndpoint;
|
|
@@ -40299,7 +40311,14 @@ Error data: ${errorData || "none"}`
|
|
|
40299
40311
|
LoanOperationsManagerModule: this.config.contractAddresses?.loanOperationsManager || "",
|
|
40300
40312
|
TermManagerModule: this.config.contractAddresses?.termManager || "",
|
|
40301
40313
|
LiquidationManagerModule: this.config.contractAddresses?.liquidationManager || "",
|
|
40302
|
-
...this.config.contractAddresses?.btcSpendAuthorizer ? { BTCSpendAuthorizer: this.config.contractAddresses.btcSpendAuthorizer } : {}
|
|
40314
|
+
...this.config.contractAddresses?.btcSpendAuthorizer ? { BTCSpendAuthorizer: this.config.contractAddresses.btcSpendAuthorizer } : {},
|
|
40315
|
+
// Required on non-hardhat chains by Lit Actions after audit C-1/H-6:
|
|
40316
|
+
// the Bitcoin provider whitelist now lives on-chain. Other SDK paths
|
|
40317
|
+
// (mintUCD, extendPosition, withdrawBTC) already forward this; keep
|
|
40318
|
+
// confirmBalance aligned so Sepolia behaves identically to Hardhat.
|
|
40319
|
+
...this.config.contractAddresses?.bitcoinProviderRegistry ? {
|
|
40320
|
+
BitcoinProviderRegistry: this.config.contractAddresses.bitcoinProviderRegistry
|
|
40321
|
+
} : {}
|
|
40303
40322
|
};
|
|
40304
40323
|
const chainId = await this.config.provider?.getNetwork().then((n) => n.chainId) || 11155111;
|
|
40305
40324
|
const chain = chainId === 11155111 ? "sepolia" : chainId === 1337 ? "hardhat" : "sepolia";
|
|
@@ -42023,13 +42042,37 @@ Error data: ${errorData || "none"}`
|
|
|
42023
42042
|
if (utxoListResponse.ok) {
|
|
42024
42043
|
const utxoList = await utxoListResponse.json();
|
|
42025
42044
|
if (Array.isArray(utxoList)) {
|
|
42026
|
-
|
|
42027
|
-
|
|
42028
|
-
|
|
42029
|
-
|
|
42030
|
-
|
|
42031
|
-
|
|
42032
|
-
|
|
42045
|
+
const confirmed = utxoList.filter((u) => u.status?.confirmed === true);
|
|
42046
|
+
const verified = [];
|
|
42047
|
+
for (const u of confirmed) {
|
|
42048
|
+
try {
|
|
42049
|
+
const txResp = await fetch(`${bitcoinRpcUrl}/tx/${u.txid}`);
|
|
42050
|
+
if (!txResp.ok)
|
|
42051
|
+
continue;
|
|
42052
|
+
const txData = await txResp.json();
|
|
42053
|
+
if (!Array.isArray(txData.vout))
|
|
42054
|
+
continue;
|
|
42055
|
+
let voutIdx = u.vout;
|
|
42056
|
+
const voutData = txData.vout[voutIdx];
|
|
42057
|
+
const spk = voutData?.scriptpubkey || voutData?.scriptPubKey || voutData?.scriptpubkey_hex;
|
|
42058
|
+
if (spk !== derivedScriptPubKey) {
|
|
42059
|
+
const correctIdx = txData.vout.findIndex(
|
|
42060
|
+
(v) => (v.scriptpubkey || v.scriptPubKey || v.scriptpubkey_hex) === derivedScriptPubKey
|
|
42061
|
+
);
|
|
42062
|
+
if (correctIdx < 0)
|
|
42063
|
+
continue;
|
|
42064
|
+
voutIdx = correctIdx;
|
|
42065
|
+
}
|
|
42066
|
+
verified.push({
|
|
42067
|
+
txid: u.txid,
|
|
42068
|
+
vout: voutIdx,
|
|
42069
|
+
value: txData.vout[voutIdx].value,
|
|
42070
|
+
scriptPubKey: derivedScriptPubKey
|
|
42071
|
+
});
|
|
42072
|
+
} catch {
|
|
42073
|
+
}
|
|
42074
|
+
}
|
|
42075
|
+
allUTXOs = verified;
|
|
42033
42076
|
if (this.config.debug) {
|
|
42034
42077
|
log.info(`\u2705 Fetched ${allUTXOs.length} confirmed UTXO(s) for consolidation`, {
|
|
42035
42078
|
vaultAddress,
|
package/dist/index.mjs
CHANGED
|
@@ -13365,30 +13365,30 @@ var require_pkg_src = __commonJS({
|
|
|
13365
13365
|
}
|
|
13366
13366
|
},
|
|
13367
13367
|
btcTransactionSigner: {
|
|
13368
|
-
cid: "
|
|
13368
|
+
cid: "QmZyn4MjYwrtVHfHJJ8cDnQLaQxkWKArnKzx5UaDV26rmt",
|
|
13369
13369
|
authorizedCidHex: cidToHex(
|
|
13370
|
-
"
|
|
13370
|
+
"QmZyn4MjYwrtVHfHJJ8cDnQLaQxkWKArnKzx5UaDV26rmt"
|
|
13371
13371
|
),
|
|
13372
13372
|
name: "Btc Transaction Signer",
|
|
13373
13373
|
description: "Production Btc Transaction Signer",
|
|
13374
13374
|
version: "1.0.0",
|
|
13375
13375
|
deployed: true,
|
|
13376
|
-
deployedAt:
|
|
13377
|
-
size:
|
|
13378
|
-
hash: "
|
|
13376
|
+
deployedAt: 1777493882468,
|
|
13377
|
+
size: 25656,
|
|
13378
|
+
hash: "c1dc107c830449d55e05a2777c072d7e0c62e2bfec4406d5d1bc8dab61eadf91"
|
|
13379
13379
|
},
|
|
13380
13380
|
ucdMintValidator: {
|
|
13381
|
-
cid: "
|
|
13381
|
+
cid: "QmUuQHr21xq7EVBVS4AM3TxU1LBC7G9yvsXdXjPFHJQVw7",
|
|
13382
13382
|
authorizedCidHex: cidToHex(
|
|
13383
|
-
"
|
|
13383
|
+
"QmUuQHr21xq7EVBVS4AM3TxU1LBC7G9yvsXdXjPFHJQVw7"
|
|
13384
13384
|
),
|
|
13385
13385
|
name: "Ucd Mint Validator",
|
|
13386
13386
|
description: "Production Ucd Mint Validator",
|
|
13387
13387
|
version: "1.0.0",
|
|
13388
13388
|
deployed: true,
|
|
13389
|
-
deployedAt:
|
|
13390
|
-
size:
|
|
13391
|
-
hash: "
|
|
13389
|
+
deployedAt: 1777493891124,
|
|
13390
|
+
size: 65506,
|
|
13391
|
+
hash: "a42096083c705332dda82d5e669e5e1e258c1d9da0203593f6502a14d61f1fb7",
|
|
13392
13392
|
validatorWalletAddress: "0x36f3dd61c4c08a56d29ed2fd6d5f111b67b6a7a1",
|
|
13393
13393
|
pkp: {
|
|
13394
13394
|
publicKey: "0x041ab17cd91fc5c0b761eea6092d032807561b621b82c488826776e04a9158d61ba64d809a4729f0501289d980732cb06d8dfd06999dd9c8efd2f495dad78b31bb",
|
|
@@ -13396,17 +13396,17 @@ var require_pkg_src = __commonJS({
|
|
|
13396
13396
|
}
|
|
13397
13397
|
},
|
|
13398
13398
|
processPaymentValidator: {
|
|
13399
|
-
cid: "
|
|
13399
|
+
cid: "QmWb6MxjnfCe2KboAEF83za8u528hLeuoAqE6JCTKcAqMZ",
|
|
13400
13400
|
authorizedCidHex: cidToHex(
|
|
13401
|
-
"
|
|
13401
|
+
"QmWb6MxjnfCe2KboAEF83za8u528hLeuoAqE6JCTKcAqMZ"
|
|
13402
13402
|
),
|
|
13403
13403
|
name: "Process Payment Validator",
|
|
13404
13404
|
description: "Production Process Payment Validator",
|
|
13405
13405
|
version: "1.0.0",
|
|
13406
13406
|
deployed: true,
|
|
13407
|
-
deployedAt:
|
|
13408
|
-
size:
|
|
13409
|
-
hash: "
|
|
13407
|
+
deployedAt: 1777493900466,
|
|
13408
|
+
size: 61412,
|
|
13409
|
+
hash: "c77a28d80a8122c73b634229b9024e3974eedf696e5db29db7b40dc9a53f9165",
|
|
13410
13410
|
validatorWalletAddress: "0xc2ed5a59bd81eb4d1a19a0147b86ab69aa4c28ba",
|
|
13411
13411
|
pkp: {
|
|
13412
13412
|
publicKey: "0x04cfccb9b6c7addc79469c0e9fafebef4c70801302c62cdb26b610723a9b8527d23f98a40158c7340d83fd0e62d02b5ec74c12f7a86d98e8c6973b4811110f19ad",
|
|
@@ -13414,17 +13414,17 @@ var require_pkg_src = __commonJS({
|
|
|
13414
13414
|
}
|
|
13415
13415
|
},
|
|
13416
13416
|
extendPositionValidator: {
|
|
13417
|
-
cid: "
|
|
13417
|
+
cid: "QmV2uyKWNY54HHoC5FggF4nFqGNoDydQ6ceExA8ztmjHwz",
|
|
13418
13418
|
authorizedCidHex: cidToHex(
|
|
13419
|
-
"
|
|
13419
|
+
"QmV2uyKWNY54HHoC5FggF4nFqGNoDydQ6ceExA8ztmjHwz"
|
|
13420
13420
|
),
|
|
13421
13421
|
name: "Extend Position Validator",
|
|
13422
13422
|
description: "Production Extend Position Validator",
|
|
13423
13423
|
version: "1.0.0",
|
|
13424
13424
|
deployed: true,
|
|
13425
|
-
deployedAt:
|
|
13426
|
-
size:
|
|
13427
|
-
hash: "
|
|
13425
|
+
deployedAt: 1777496426914,
|
|
13426
|
+
size: 60611,
|
|
13427
|
+
hash: "d2ee66d7fd30762d637d54f1dedb40d5d7bfe7dac9a92201e60b62de30e6aa80",
|
|
13428
13428
|
validatorWalletAddress: "0xb3f4271c475887a86a2f21446f0968c30cc74c97",
|
|
13429
13429
|
pkp: {
|
|
13430
13430
|
publicKey: "0x04e52338f6a0c3362800f1a94c4c8f08be5030dde0fa217388c53d1c1a4790f4443c9f2886b2d2d8f4b75a9a156e9b028011b1a1cf7648da0e556aa980ec692836",
|
|
@@ -13432,17 +13432,17 @@ var require_pkg_src = __commonJS({
|
|
|
13432
13432
|
}
|
|
13433
13433
|
},
|
|
13434
13434
|
btcWithdrawal: {
|
|
13435
|
-
cid: "
|
|
13435
|
+
cid: "QmdaeZ3inL9LiSkSAYV81ohqdYJ24n7awEpitHDHXKaJUm",
|
|
13436
13436
|
authorizedCidHex: cidToHex(
|
|
13437
|
-
"
|
|
13437
|
+
"QmdaeZ3inL9LiSkSAYV81ohqdYJ24n7awEpitHDHXKaJUm"
|
|
13438
13438
|
),
|
|
13439
13439
|
name: "Btc Withdrawal",
|
|
13440
13440
|
description: "Production Btc Withdrawal",
|
|
13441
|
-
version: "1.0.
|
|
13441
|
+
version: "1.0.0",
|
|
13442
13442
|
deployed: true,
|
|
13443
|
-
deployedAt:
|
|
13444
|
-
size:
|
|
13445
|
-
hash: "
|
|
13443
|
+
deployedAt: 1777551892935,
|
|
13444
|
+
size: 72300,
|
|
13445
|
+
hash: "888eef2c01d71a20fc6734fab41ec9f4eda4941774fe23ac44d1fcb6c21a8807",
|
|
13446
13446
|
validatorWalletAddress: "0xbb137fbda353199e9419b698c57a742124d4987d",
|
|
13447
13447
|
pkp: {
|
|
13448
13448
|
publicKey: "0x043616787c5432415c24378c4ef48de2bcd6bb7b575b837e3cff09171802662da7105d79586c7659677a0ecbaddac4cce06cb2a11f69a16fa0c4d7002ac7d51a4d",
|
|
@@ -13450,17 +13450,17 @@ var require_pkg_src = __commonJS({
|
|
|
13450
13450
|
}
|
|
13451
13451
|
},
|
|
13452
13452
|
liquidationValidator: {
|
|
13453
|
-
cid: "
|
|
13453
|
+
cid: "QmaDsh5t5J6s1TgYeoW8PPZXM1gniZWW3jfPyg1MHjPQ7Q",
|
|
13454
13454
|
authorizedCidHex: cidToHex(
|
|
13455
|
-
"
|
|
13455
|
+
"QmaDsh5t5J6s1TgYeoW8PPZXM1gniZWW3jfPyg1MHjPQ7Q"
|
|
13456
13456
|
),
|
|
13457
13457
|
name: "Liquidation Validator",
|
|
13458
13458
|
description: "Production Liquidation Validator",
|
|
13459
13459
|
version: "1.0.0",
|
|
13460
13460
|
deployed: true,
|
|
13461
|
-
deployedAt:
|
|
13462
|
-
size:
|
|
13463
|
-
hash: "
|
|
13461
|
+
deployedAt: 1777493931019,
|
|
13462
|
+
size: 54906,
|
|
13463
|
+
hash: "ffe0b955b64973aa155cc29dc9aeceb72a36459d5a2c734dca872ba936db6f8e",
|
|
13464
13464
|
validatorWalletAddress: "0x1542f863ee0340f6a067573e80ae66dd9b3838fa",
|
|
13465
13465
|
pkp: {
|
|
13466
13466
|
publicKey: "0x041a241de58976c13e3d7ca5a18e494f7330151e3818706135d50176e78ffb673e58b11f0b67a87c73fade6c6b27d6e7a7377ea9f4c10bf31880f1d725f18cc6f8",
|
|
@@ -13504,17 +13504,17 @@ var require_pkg_src = __commonJS({
|
|
|
13504
13504
|
}
|
|
13505
13505
|
},
|
|
13506
13506
|
adminLiquidationValidator: {
|
|
13507
|
-
cid: "
|
|
13507
|
+
cid: "QmdeeDPqjh59HG3AF8LrvQkM8n3wbirRyyKBoY3XAzmi6b",
|
|
13508
13508
|
authorizedCidHex: cidToHex(
|
|
13509
|
-
"
|
|
13509
|
+
"QmdeeDPqjh59HG3AF8LrvQkM8n3wbirRyyKBoY3XAzmi6b"
|
|
13510
13510
|
),
|
|
13511
13511
|
name: "Admin Liquidation Validator",
|
|
13512
13512
|
description: "Production Admin Liquidation Validator",
|
|
13513
13513
|
version: "1.0.0",
|
|
13514
13514
|
deployed: true,
|
|
13515
|
-
deployedAt:
|
|
13516
|
-
size:
|
|
13517
|
-
hash: "
|
|
13515
|
+
deployedAt: 1777493941746,
|
|
13516
|
+
size: 51555,
|
|
13517
|
+
hash: "404fc4620f6b2ff31f233cdbe18290992498e63e45f38da76e3b6e7826e435b4",
|
|
13518
13518
|
validatorWalletAddress: "0x2a83b78842d75358877deb8854ccc5bbbaa5012e",
|
|
13519
13519
|
pkp: {
|
|
13520
13520
|
publicKey: "0x04ee4316afb8538280ede6c56def9cbe791f18f96ccba97768b28e2966d9c46a9493a6b81f4571495c3ce56c2d0b33fe8cf63726cd12d395832ea54162b5c67801",
|
|
@@ -14331,16 +14331,16 @@ var init_deployment_addresses = __esm({
|
|
|
14331
14331
|
},
|
|
14332
14332
|
upgraded: {
|
|
14333
14333
|
PositionManager: {
|
|
14334
|
-
previousImplementation: "
|
|
14335
|
-
newImplementation: "
|
|
14336
|
-
upgradedAt: "2026-04-
|
|
14334
|
+
previousImplementation: "0x0e40B4D1708f49319f32d51AF01674c26acACeBF",
|
|
14335
|
+
newImplementation: "0x94096F14f58Cb427B36f2a5aeE24348a26534C74",
|
|
14336
|
+
upgradedAt: "2026-04-30T16:23:00.805Z",
|
|
14337
14337
|
upgradedBy: "0xF20986F02420EF443AE9BE5092FB8A4975cF3aA6",
|
|
14338
14338
|
reason: "Shared upgrade script: PositionManager implementation update"
|
|
14339
14339
|
},
|
|
14340
14340
|
LoanOperationsManagerModule: {
|
|
14341
|
-
previousImplementation: "
|
|
14342
|
-
newImplementation: "
|
|
14343
|
-
upgradedAt: "2026-04-
|
|
14341
|
+
previousImplementation: "0xCf8998a639cC48139C4c61C8B1005EaC40419b88",
|
|
14342
|
+
newImplementation: "0xF79384d5186B6081124a560e181dC5E0Cf0444dD",
|
|
14343
|
+
upgradedAt: "2026-04-30T16:40:12.746Z",
|
|
14344
14344
|
upgradedBy: "0xF20986F02420EF443AE9BE5092FB8A4975cF3aA6",
|
|
14345
14345
|
reason: "Shared upgrade script: LoanOperationsManagerModule implementation update"
|
|
14346
14346
|
},
|
|
@@ -14352,25 +14352,25 @@ var init_deployment_addresses = __esm({
|
|
|
14352
14352
|
reason: "Shared upgrade script: UCDController implementation update"
|
|
14353
14353
|
},
|
|
14354
14354
|
TermManagerModule: {
|
|
14355
|
-
previousImplementation: "
|
|
14356
|
-
newImplementation: "
|
|
14357
|
-
upgradedAt: "2026-04-
|
|
14355
|
+
previousImplementation: "0x2EaF1052706120CAa6B6F75354F70f77ef2261eB",
|
|
14356
|
+
newImplementation: "0xcc3D2dD7aAfaE5DE923dfd53833a40077178dd75",
|
|
14357
|
+
upgradedAt: "2026-04-30T16:06:36.895Z",
|
|
14358
14358
|
upgradedBy: "0xF20986F02420EF443AE9BE5092FB8A4975cF3aA6",
|
|
14359
14359
|
reason: "Shared upgrade script: TermManagerModule implementation update"
|
|
14360
14360
|
},
|
|
14361
14361
|
CircuitBreakerModule: {
|
|
14362
|
-
previousImplementation: "
|
|
14363
|
-
newImplementation: "
|
|
14364
|
-
upgradedAt: "2026-04-
|
|
14362
|
+
previousImplementation: "0x8e9e10B14E6a91ec271FBEb4FD3fB1FE06b545dD",
|
|
14363
|
+
newImplementation: "0x485F5E93E479830698Ffdc36957edfcf0084E4c6",
|
|
14364
|
+
upgradedAt: "2026-04-30T16:11:25.723Z",
|
|
14365
14365
|
upgradedBy: "0xF20986F02420EF443AE9BE5092FB8A4975cF3aA6",
|
|
14366
14366
|
reason: "Shared upgrade script: CircuitBreakerModule implementation update"
|
|
14367
14367
|
},
|
|
14368
14368
|
AdminModule: {
|
|
14369
|
-
previousImplementation: "
|
|
14370
|
-
newImplementation: "
|
|
14371
|
-
upgradedAt: "2026-04-
|
|
14369
|
+
previousImplementation: "0x67AE2F872c37f33db9bC631e135432B2845d308b",
|
|
14370
|
+
newImplementation: "0xaC7c227EddCE4F03590Ad10e773219Ffc07f9277",
|
|
14371
|
+
upgradedAt: "2026-04-30T16:24:49.030Z",
|
|
14372
14372
|
upgradedBy: "0xF20986F02420EF443AE9BE5092FB8A4975cF3aA6",
|
|
14373
|
-
reason: "
|
|
14373
|
+
reason: "Bulk-pause functions and network-aware operationDelay"
|
|
14374
14374
|
},
|
|
14375
14375
|
PositionManagerViews: {
|
|
14376
14376
|
previousImplementation: "0xE8b4D4b6E3163EdfF8958da4cF8267ACa369D486",
|
|
@@ -14394,30 +14394,30 @@ var init_deployment_addresses = __esm({
|
|
|
14394
14394
|
reason: "Shared upgrade script: UCDToken implementation update"
|
|
14395
14395
|
},
|
|
14396
14396
|
PositionManagerCoreModule: {
|
|
14397
|
-
previousImplementation: "
|
|
14398
|
-
newImplementation: "
|
|
14399
|
-
upgradedAt: "2026-04-
|
|
14397
|
+
previousImplementation: "0xED380dDdc919b94924cCd5697bEEfdc347Daa9A6",
|
|
14398
|
+
newImplementation: "0x9c7EF89F1F66F78522AA9D45F894f75583edEC3d",
|
|
14399
|
+
upgradedAt: "2026-04-30T16:21:05.763Z",
|
|
14400
14400
|
upgradedBy: "0xF20986F02420EF443AE9BE5092FB8A4975cF3aA6",
|
|
14401
14401
|
reason: "Shared upgrade script: PositionManagerCoreModule implementation update"
|
|
14402
14402
|
},
|
|
14403
14403
|
CollateralManagerModule: {
|
|
14404
|
-
previousImplementation: "
|
|
14405
|
-
newImplementation: "
|
|
14406
|
-
upgradedAt: "2026-04-
|
|
14404
|
+
previousImplementation: "0xd021ca6Dc2377F361E3c64f60C93E0e4075c2840",
|
|
14405
|
+
newImplementation: "0x920e4f52c251B758e351c0d14c4418ad4E5B77ed",
|
|
14406
|
+
upgradedAt: "2026-04-30T16:03:49.056Z",
|
|
14407
14407
|
upgradedBy: "0xF20986F02420EF443AE9BE5092FB8A4975cF3aA6",
|
|
14408
14408
|
reason: "Shared upgrade script: CollateralManagerModule implementation update"
|
|
14409
14409
|
},
|
|
14410
14410
|
LiquidationManagerModule: {
|
|
14411
|
-
previousImplementation: "
|
|
14412
|
-
newImplementation: "
|
|
14413
|
-
upgradedAt: "2026-04-
|
|
14411
|
+
previousImplementation: "0xf74d5437691df92087170861213e26064358A7fb",
|
|
14412
|
+
newImplementation: "0xcdd426D27bB2f54Dba76dF60EF3D14fD5776CEc7",
|
|
14413
|
+
upgradedAt: "2026-04-30T16:09:01.899Z",
|
|
14414
14414
|
upgradedBy: "0xF20986F02420EF443AE9BE5092FB8A4975cF3aA6",
|
|
14415
14415
|
reason: "Shared upgrade script: LiquidationManagerModule implementation update"
|
|
14416
14416
|
},
|
|
14417
14417
|
BTCSpendAuthorizer: {
|
|
14418
|
-
previousImplementation: "
|
|
14419
|
-
newImplementation: "
|
|
14420
|
-
upgradedAt: "2026-04-
|
|
14418
|
+
previousImplementation: "0xe7337422e2A4AE7709EFc01fB6C681C8899e673C",
|
|
14419
|
+
newImplementation: "0x605bf1C988bb307AFA07326954D593A71580e99d",
|
|
14420
|
+
upgradedAt: "2026-04-30T20:22:12.956Z",
|
|
14421
14421
|
upgradedBy: "0xF20986F02420EF443AE9BE5092FB8A4975cF3aA6",
|
|
14422
14422
|
reason: "Shared upgrade script: BTCSpendAuthorizer implementation update"
|
|
14423
14423
|
},
|
|
@@ -14429,9 +14429,9 @@ var init_deployment_addresses = __esm({
|
|
|
14429
14429
|
reason: "Shared upgrade script: SimplePSMV2 implementation update"
|
|
14430
14430
|
},
|
|
14431
14431
|
UpgradeValidator: {
|
|
14432
|
-
previousImplementation: "
|
|
14433
|
-
newImplementation: "
|
|
14434
|
-
upgradedAt: "2026-04-
|
|
14432
|
+
previousImplementation: "0x974C6F4e0F67Fa9d7Ab1aee8C10Bd85B201ec5D7",
|
|
14433
|
+
newImplementation: "0xEFf189e5872bC7158191eD39d31E745aF2A6FDa7",
|
|
14434
|
+
upgradedAt: "2026-04-30T16:47:01.406Z",
|
|
14435
14435
|
upgradedBy: "0xF20986F02420EF443AE9BE5092FB8A4975cF3aA6",
|
|
14436
14436
|
reason: "Shared upgrade script: UpgradeValidator implementation update"
|
|
14437
14437
|
},
|
|
@@ -14509,12 +14509,12 @@ var init_deployment_addresses = __esm({
|
|
|
14509
14509
|
CIRCUIT_BREAKER_MODULE: "0x3D0B2cAE481821E57BA9CC3807bCC0d0D7F18bd8",
|
|
14510
14510
|
ADMIN_MODULE: "0xAcd1f07915b17CA3727e7fE89BdF618A1545a1ed",
|
|
14511
14511
|
UCD_CONTROLLER_IMPL: "0x2d4d689A70B56b6E0B9F70BffA6265A55173A4A1",
|
|
14512
|
-
LOAN_OPERATIONS_MANAGER_MODULE_IMPL: "
|
|
14513
|
-
TERM_MANAGER_MODULE_IMPL: "
|
|
14512
|
+
LOAN_OPERATIONS_MANAGER_MODULE_IMPL: "0xF79384d5186B6081124a560e181dC5E0Cf0444dD",
|
|
14513
|
+
TERM_MANAGER_MODULE_IMPL: "0xcc3D2dD7aAfaE5DE923dfd53833a40077178dd75",
|
|
14514
14514
|
CIRCUIT_BREAKER_MODULE_IMPL: "0x8e9e10B14E6a91ec271FBEb4FD3fB1FE06b545dD",
|
|
14515
14515
|
ADMIN_MODULE_IMPL: "0x67AE2F872c37f33db9bC631e135432B2845d308b",
|
|
14516
14516
|
POSITION_MANAGER_VIEWS_IMPL: "0xadF8e0F34082a8fC23e727276e0aEf3af183C8Fd",
|
|
14517
|
-
POSITION_MANAGER_IMPL: "
|
|
14517
|
+
POSITION_MANAGER_IMPL: "0x94096F14f58Cb427B36f2a5aeE24348a26534C74",
|
|
14518
14518
|
SIMPLE_PSM_V2: "0x19EcF7BA26e054fd4Ff06009A03070103dbBB058",
|
|
14519
14519
|
SIMPLE_PSM_V2_IMPL: "0x4107104fDF61AACC674f1F168c275f034c8112BF",
|
|
14520
14520
|
UCD_TOKEN_IMPL: "0x155Da00Ee0beb1d9D5BA34Aeb62c9ad4E8227d5D",
|
|
@@ -14527,7 +14527,7 @@ var init_deployment_addresses = __esm({
|
|
|
14527
14527
|
BTC_SPEND_AUTHORIZER: "0xd7E9Eb5eE53f1d9ee55Dc162bBC7486bE437B6bD",
|
|
14528
14528
|
BTC_SPEND_AUTHORIZER_IMPL: "0x4CD021181bD2583d10aB37D27FE2994b75c41b77",
|
|
14529
14529
|
UPGRADE_VALIDATOR: "0x592e650edD9bA26ecc407989fdd6F9cdcDeC27A6",
|
|
14530
|
-
UPGRADE_VALIDATOR_IMPL: "
|
|
14530
|
+
UPGRADE_VALIDATOR_IMPL: "0xEFf189e5872bC7158191eD39d31E745aF2A6FDa7",
|
|
14531
14531
|
BITCOIN_PROVIDER_REGISTRY: "0xbfA0c48B070D0a9A9CD27469AeacFD2d4261cEE2",
|
|
14532
14532
|
BITCOIN_PROVIDER_REGISTRY_IMPL: "0x225309A4ae6D146ba93A3278A7b40224FfC81448",
|
|
14533
14533
|
LIT_ACTION_VALIDATOR: "0x54eECd7C90F8A8fac27749Ba30BbE8AFBAccc856",
|
|
@@ -37630,6 +37630,18 @@ var DiamondHandsSDK = class _DiamondHandsSDK {
|
|
|
37630
37630
|
* Check if SDK is ready for operations
|
|
37631
37631
|
*/
|
|
37632
37632
|
async _relayNotification(message) {
|
|
37633
|
+
const handler = this.config.notificationHandler;
|
|
37634
|
+
if (typeof handler === "function") {
|
|
37635
|
+
try {
|
|
37636
|
+
await handler(message);
|
|
37637
|
+
} catch (err) {
|
|
37638
|
+
if (this.config.debug) {
|
|
37639
|
+
log.warn("notificationHandler threw", {
|
|
37640
|
+
error: err instanceof Error ? err.message : String(err)
|
|
37641
|
+
});
|
|
37642
|
+
}
|
|
37643
|
+
}
|
|
37644
|
+
}
|
|
37633
37645
|
if (this.config.mode !== "service")
|
|
37634
37646
|
return;
|
|
37635
37647
|
const endpoint = this.config.serviceEndpoint;
|
|
@@ -40227,7 +40239,14 @@ Error data: ${errorData || "none"}`
|
|
|
40227
40239
|
LoanOperationsManagerModule: this.config.contractAddresses?.loanOperationsManager || "",
|
|
40228
40240
|
TermManagerModule: this.config.contractAddresses?.termManager || "",
|
|
40229
40241
|
LiquidationManagerModule: this.config.contractAddresses?.liquidationManager || "",
|
|
40230
|
-
...this.config.contractAddresses?.btcSpendAuthorizer ? { BTCSpendAuthorizer: this.config.contractAddresses.btcSpendAuthorizer } : {}
|
|
40242
|
+
...this.config.contractAddresses?.btcSpendAuthorizer ? { BTCSpendAuthorizer: this.config.contractAddresses.btcSpendAuthorizer } : {},
|
|
40243
|
+
// Required on non-hardhat chains by Lit Actions after audit C-1/H-6:
|
|
40244
|
+
// the Bitcoin provider whitelist now lives on-chain. Other SDK paths
|
|
40245
|
+
// (mintUCD, extendPosition, withdrawBTC) already forward this; keep
|
|
40246
|
+
// confirmBalance aligned so Sepolia behaves identically to Hardhat.
|
|
40247
|
+
...this.config.contractAddresses?.bitcoinProviderRegistry ? {
|
|
40248
|
+
BitcoinProviderRegistry: this.config.contractAddresses.bitcoinProviderRegistry
|
|
40249
|
+
} : {}
|
|
40231
40250
|
};
|
|
40232
40251
|
const chainId = await this.config.provider?.getNetwork().then((n) => n.chainId) || 11155111;
|
|
40233
40252
|
const chain = chainId === 11155111 ? "sepolia" : chainId === 1337 ? "hardhat" : "sepolia";
|
|
@@ -41951,13 +41970,37 @@ Error data: ${errorData || "none"}`
|
|
|
41951
41970
|
if (utxoListResponse.ok) {
|
|
41952
41971
|
const utxoList = await utxoListResponse.json();
|
|
41953
41972
|
if (Array.isArray(utxoList)) {
|
|
41954
|
-
|
|
41955
|
-
|
|
41956
|
-
|
|
41957
|
-
|
|
41958
|
-
|
|
41959
|
-
|
|
41960
|
-
|
|
41973
|
+
const confirmed = utxoList.filter((u) => u.status?.confirmed === true);
|
|
41974
|
+
const verified = [];
|
|
41975
|
+
for (const u of confirmed) {
|
|
41976
|
+
try {
|
|
41977
|
+
const txResp = await fetch(`${bitcoinRpcUrl}/tx/${u.txid}`);
|
|
41978
|
+
if (!txResp.ok)
|
|
41979
|
+
continue;
|
|
41980
|
+
const txData = await txResp.json();
|
|
41981
|
+
if (!Array.isArray(txData.vout))
|
|
41982
|
+
continue;
|
|
41983
|
+
let voutIdx = u.vout;
|
|
41984
|
+
const voutData = txData.vout[voutIdx];
|
|
41985
|
+
const spk = voutData?.scriptpubkey || voutData?.scriptPubKey || voutData?.scriptpubkey_hex;
|
|
41986
|
+
if (spk !== derivedScriptPubKey) {
|
|
41987
|
+
const correctIdx = txData.vout.findIndex(
|
|
41988
|
+
(v) => (v.scriptpubkey || v.scriptPubKey || v.scriptpubkey_hex) === derivedScriptPubKey
|
|
41989
|
+
);
|
|
41990
|
+
if (correctIdx < 0)
|
|
41991
|
+
continue;
|
|
41992
|
+
voutIdx = correctIdx;
|
|
41993
|
+
}
|
|
41994
|
+
verified.push({
|
|
41995
|
+
txid: u.txid,
|
|
41996
|
+
vout: voutIdx,
|
|
41997
|
+
value: txData.vout[voutIdx].value,
|
|
41998
|
+
scriptPubKey: derivedScriptPubKey
|
|
41999
|
+
});
|
|
42000
|
+
} catch {
|
|
42001
|
+
}
|
|
42002
|
+
}
|
|
42003
|
+
allUTXOs = verified;
|
|
41961
42004
|
if (this.config.debug) {
|
|
41962
42005
|
log.info(`\u2705 Fetched ${allUTXOs.length} confirmed UTXO(s) for consolidation`, {
|
|
41963
42006
|
vaultAddress,
|
|
@@ -138,6 +138,19 @@ interface BaseSDKConfig {
|
|
|
138
138
|
};
|
|
139
139
|
defaultSelectedTermMonths?: number;
|
|
140
140
|
temperSignaturesTest?: boolean;
|
|
141
|
+
/**
|
|
142
|
+
* Optional in-process notification sink invoked alongside the existing service-mode
|
|
143
|
+
* HTTP relay. Fires in BOTH `standalone` and `service` mode so consumers can observe
|
|
144
|
+
* lifecycle events (e.g. loan renewal, mint, payment, withdrawal) without depending
|
|
145
|
+
* on `lit-ops-server`. The SDK already emits messages via `formatLoan*Message` helpers
|
|
146
|
+
* — this hook just exposes them locally. Errors thrown by the handler are swallowed
|
|
147
|
+
* so notification failures cannot break business operations.
|
|
148
|
+
*
|
|
149
|
+
* @example
|
|
150
|
+
* const notifications: string[] = [];
|
|
151
|
+
* sdkConfig.notificationHandler = (msg) => { notifications.push(msg); };
|
|
152
|
+
*/
|
|
153
|
+
notificationHandler?: (message: string) => void | Promise<void>;
|
|
141
154
|
}
|
|
142
155
|
/**
|
|
143
156
|
* Service Mode Configuration
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gvnrdao/dh-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.223",
|
|
4
4
|
"description": "TypeScript SDK for Diamond Hands Protocol - Bitcoin-backed lending with LIT Protocol PKPs",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -70,8 +70,8 @@
|
|
|
70
70
|
},
|
|
71
71
|
"sideEffects": false,
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@gvnrdao/dh-lit-actions": "^0.0.
|
|
74
|
-
"@gvnrdao/dh-lit-ops": "^0.0.
|
|
73
|
+
"@gvnrdao/dh-lit-actions": "^0.0.286",
|
|
74
|
+
"@gvnrdao/dh-lit-ops": "^0.0.259",
|
|
75
75
|
"@noble/hashes": "^1.5.0",
|
|
76
76
|
"axios": "^1.15.2",
|
|
77
77
|
"bech32": "^2.0.0",
|