@gvnrdao/dh-sdk 0.0.280 → 0.0.281

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.
@@ -5,7 +5,7 @@
5
5
  * @license MIT
6
6
  */
7
7
 
8
- /*! Axios v1.17.0 Copyright (c) 2026 Matt Zabriskie and contributors */
8
+ /*! Axios v1.18.0 Copyright (c) 2026 Matt Zabriskie and contributors */
9
9
 
10
10
  /*! MIT License. Copyright 2015-2022 Richard Moore <me@ricmoo.com>. See LICENSE.txt. */
11
11
 
@@ -348,9 +348,9 @@ var SEPOLIA_CONTRACTS = {
348
348
  };
349
349
  var LOCALHOST_DEPLOYMENT = {
350
350
  network: "localhost",
351
- chainId: 31337,
352
- timestamp: "2026-03-23T15:33:34.068Z",
353
- deployer: "",
351
+ chainId: 1337,
352
+ timestamp: "2026-06-15T13:32:40.927Z",
353
+ deployer: "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
354
354
  contracts: {
355
355
  MessageHashBuilder: "0xE6E340D132b5f46d1e472DebcD681B2aBc16e57E",
356
356
  UpgradeValidator: "0x8A791620dd6260079BF849Dc5567aDC3F2FdC318",
@@ -359,15 +359,13 @@ var LOCALHOST_DEPLOYMENT = {
359
359
  PositionManagerCoreModule: "0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e",
360
360
  TermManagerModule: "0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82",
361
361
  LoanOperationsManagerModule: "0x68B1D87F95878fE05B998F19b66F4baba5De1aed",
362
- BTCSpendAuthorizer: "0x59b670e9fA9D0A427751Af201D676719a970857b",
363
- CollateralManagerModule: "0xa85233C63b9Ee964Add6F2cffe00Fd84eb32338f",
364
- LiquidationManagerModule: "0x7a2088a1bFc9d81c55368AE168C2C02570cB814F",
362
+ BTCSpendAuthorizer: "0xc6e7DF5E7b4f2A278906862b61205850344D4e7d",
363
+ CollateralManagerModule: "0x322813Fd9A801c5507c9de605d63CEA4f2CE6c44",
364
+ LiquidationManagerModule: "0x4A679253410272dd5232B3Ff7cF5dbB88f295319",
365
365
  CircuitBreakerModule: "0x0B306BF915C4d645ff596e518fAf3F9669b97016",
366
- AdminModule: "0xc5a5C42992dECbae36851359345FE25997F5C42d",
366
+ AdminModule: "0x09635F643e140090A9A8Dcd712eD6285858ceBef",
367
367
  PositionManagerViews: "0x959922bE3CAee4b8Cd9a407cc3ac1C251C2007B1",
368
- PositionManager: "0x84eA74d481Ee0A5332c457a4d796187F6Ba67fEB",
369
- OperationAuthorizationRegistry: "0x7969c5eD335650692Bc04293B07F5BF2e7A673C0",
370
- PKPValidation: "0xcbEAF3BDe82155F56486Fb5a1072cb8baAf547cc"
368
+ PositionManager: "0x84eA74d481Ee0A5332c457a4d796187F6Ba67fEB"
371
369
  },
372
370
  latestEnv: {
373
371
  UCD_TOKEN: "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512",
@@ -400,15 +398,13 @@ var LOCALHOST_CONTRACTS = {
400
398
  PositionManagerCoreModule: "0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e",
401
399
  TermManagerModule: "0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82",
402
400
  LoanOperationsManagerModule: "0x68B1D87F95878fE05B998F19b66F4baba5De1aed",
403
- BTCSpendAuthorizer: "0x59b670e9fA9D0A427751Af201D676719a970857b",
404
- CollateralManagerModule: "0xa85233C63b9Ee964Add6F2cffe00Fd84eb32338f",
405
- LiquidationManagerModule: "0x7a2088a1bFc9d81c55368AE168C2C02570cB814F",
401
+ BTCSpendAuthorizer: "0xc6e7DF5E7b4f2A278906862b61205850344D4e7d",
402
+ CollateralManagerModule: "0x322813Fd9A801c5507c9de605d63CEA4f2CE6c44",
403
+ LiquidationManagerModule: "0x4A679253410272dd5232B3Ff7cF5dbB88f295319",
406
404
  CircuitBreakerModule: "0x0B306BF915C4d645ff596e518fAf3F9669b97016",
407
- AdminModule: "0xc5a5C42992dECbae36851359345FE25997F5C42d",
405
+ AdminModule: "0x09635F643e140090A9A8Dcd712eD6285858ceBef",
408
406
  PositionManagerViews: "0x959922bE3CAee4b8Cd9a407cc3ac1C251C2007B1",
409
- PositionManager: "0x84eA74d481Ee0A5332c457a4d796187F6Ba67fEB",
410
- OperationAuthorizationRegistry: "0x7969c5eD335650692Bc04293B07F5BF2e7A673C0",
411
- PKPValidation: "0xcbEAF3BDe82155F56486Fb5a1072cb8baAf547cc"
407
+ PositionManager: "0x84eA74d481Ee0A5332c457a4d796187F6Ba67fEB"
412
408
  };
413
409
  var ALL_DEPLOYMENTS = {
414
410
  sepolia: SEPOLIA_DEPLOYMENT,
@@ -315,9 +315,9 @@ var SEPOLIA_CONTRACTS = {
315
315
  };
316
316
  var LOCALHOST_DEPLOYMENT = {
317
317
  network: "localhost",
318
- chainId: 31337,
319
- timestamp: "2026-03-23T15:33:34.068Z",
320
- deployer: "",
318
+ chainId: 1337,
319
+ timestamp: "2026-06-15T13:32:40.927Z",
320
+ deployer: "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
321
321
  contracts: {
322
322
  MessageHashBuilder: "0xE6E340D132b5f46d1e472DebcD681B2aBc16e57E",
323
323
  UpgradeValidator: "0x8A791620dd6260079BF849Dc5567aDC3F2FdC318",
@@ -326,15 +326,13 @@ var LOCALHOST_DEPLOYMENT = {
326
326
  PositionManagerCoreModule: "0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e",
327
327
  TermManagerModule: "0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82",
328
328
  LoanOperationsManagerModule: "0x68B1D87F95878fE05B998F19b66F4baba5De1aed",
329
- BTCSpendAuthorizer: "0x59b670e9fA9D0A427751Af201D676719a970857b",
330
- CollateralManagerModule: "0xa85233C63b9Ee964Add6F2cffe00Fd84eb32338f",
331
- LiquidationManagerModule: "0x7a2088a1bFc9d81c55368AE168C2C02570cB814F",
329
+ BTCSpendAuthorizer: "0xc6e7DF5E7b4f2A278906862b61205850344D4e7d",
330
+ CollateralManagerModule: "0x322813Fd9A801c5507c9de605d63CEA4f2CE6c44",
331
+ LiquidationManagerModule: "0x4A679253410272dd5232B3Ff7cF5dbB88f295319",
332
332
  CircuitBreakerModule: "0x0B306BF915C4d645ff596e518fAf3F9669b97016",
333
- AdminModule: "0xc5a5C42992dECbae36851359345FE25997F5C42d",
333
+ AdminModule: "0x09635F643e140090A9A8Dcd712eD6285858ceBef",
334
334
  PositionManagerViews: "0x959922bE3CAee4b8Cd9a407cc3ac1C251C2007B1",
335
- PositionManager: "0x84eA74d481Ee0A5332c457a4d796187F6Ba67fEB",
336
- OperationAuthorizationRegistry: "0x7969c5eD335650692Bc04293B07F5BF2e7A673C0",
337
- PKPValidation: "0xcbEAF3BDe82155F56486Fb5a1072cb8baAf547cc"
335
+ PositionManager: "0x84eA74d481Ee0A5332c457a4d796187F6Ba67fEB"
338
336
  },
339
337
  latestEnv: {
340
338
  UCD_TOKEN: "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512",
@@ -367,15 +365,13 @@ var LOCALHOST_CONTRACTS = {
367
365
  PositionManagerCoreModule: "0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e",
368
366
  TermManagerModule: "0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82",
369
367
  LoanOperationsManagerModule: "0x68B1D87F95878fE05B998F19b66F4baba5De1aed",
370
- BTCSpendAuthorizer: "0x59b670e9fA9D0A427751Af201D676719a970857b",
371
- CollateralManagerModule: "0xa85233C63b9Ee964Add6F2cffe00Fd84eb32338f",
372
- LiquidationManagerModule: "0x7a2088a1bFc9d81c55368AE168C2C02570cB814F",
368
+ BTCSpendAuthorizer: "0xc6e7DF5E7b4f2A278906862b61205850344D4e7d",
369
+ CollateralManagerModule: "0x322813Fd9A801c5507c9de605d63CEA4f2CE6c44",
370
+ LiquidationManagerModule: "0x4A679253410272dd5232B3Ff7cF5dbB88f295319",
373
371
  CircuitBreakerModule: "0x0B306BF915C4d645ff596e518fAf3F9669b97016",
374
- AdminModule: "0xc5a5C42992dECbae36851359345FE25997F5C42d",
372
+ AdminModule: "0x09635F643e140090A9A8Dcd712eD6285858ceBef",
375
373
  PositionManagerViews: "0x959922bE3CAee4b8Cd9a407cc3ac1C251C2007B1",
376
- PositionManager: "0x84eA74d481Ee0A5332c457a4d796187F6Ba67fEB",
377
- OperationAuthorizationRegistry: "0x7969c5eD335650692Bc04293B07F5BF2e7A673C0",
378
- PKPValidation: "0xcbEAF3BDe82155F56486Fb5a1072cb8baAf547cc"
374
+ PositionManager: "0x84eA74d481Ee0A5332c457a4d796187F6Ba67fEB"
379
375
  };
380
376
  var ALL_DEPLOYMENTS = {
381
377
  sepolia: SEPOLIA_DEPLOYMENT,
package/dist/index.js CHANGED
@@ -3958,9 +3958,9 @@ var init_deployment_addresses = __esm({
3958
3958
  };
3959
3959
  LOCALHOST_DEPLOYMENT = {
3960
3960
  network: "localhost",
3961
- chainId: 31337,
3962
- timestamp: "2026-03-23T15:33:34.068Z",
3963
- deployer: "",
3961
+ chainId: 1337,
3962
+ timestamp: "2026-06-15T13:32:40.927Z",
3963
+ deployer: "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
3964
3964
  contracts: {
3965
3965
  MessageHashBuilder: "0xE6E340D132b5f46d1e472DebcD681B2aBc16e57E",
3966
3966
  UpgradeValidator: "0x8A791620dd6260079BF849Dc5567aDC3F2FdC318",
@@ -3969,15 +3969,13 @@ var init_deployment_addresses = __esm({
3969
3969
  PositionManagerCoreModule: "0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e",
3970
3970
  TermManagerModule: "0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82",
3971
3971
  LoanOperationsManagerModule: "0x68B1D87F95878fE05B998F19b66F4baba5De1aed",
3972
- BTCSpendAuthorizer: "0x59b670e9fA9D0A427751Af201D676719a970857b",
3973
- CollateralManagerModule: "0xa85233C63b9Ee964Add6F2cffe00Fd84eb32338f",
3974
- LiquidationManagerModule: "0x7a2088a1bFc9d81c55368AE168C2C02570cB814F",
3972
+ BTCSpendAuthorizer: "0xc6e7DF5E7b4f2A278906862b61205850344D4e7d",
3973
+ CollateralManagerModule: "0x322813Fd9A801c5507c9de605d63CEA4f2CE6c44",
3974
+ LiquidationManagerModule: "0x4A679253410272dd5232B3Ff7cF5dbB88f295319",
3975
3975
  CircuitBreakerModule: "0x0B306BF915C4d645ff596e518fAf3F9669b97016",
3976
- AdminModule: "0xc5a5C42992dECbae36851359345FE25997F5C42d",
3976
+ AdminModule: "0x09635F643e140090A9A8Dcd712eD6285858ceBef",
3977
3977
  PositionManagerViews: "0x959922bE3CAee4b8Cd9a407cc3ac1C251C2007B1",
3978
- PositionManager: "0x84eA74d481Ee0A5332c457a4d796187F6Ba67fEB",
3979
- OperationAuthorizationRegistry: "0x7969c5eD335650692Bc04293B07F5BF2e7A673C0",
3980
- PKPValidation: "0xcbEAF3BDe82155F56486Fb5a1072cb8baAf547cc"
3978
+ PositionManager: "0x84eA74d481Ee0A5332c457a4d796187F6Ba67fEB"
3981
3979
  },
3982
3980
  latestEnv: {
3983
3981
  UCD_TOKEN: "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512",
@@ -4010,15 +4008,13 @@ var init_deployment_addresses = __esm({
4010
4008
  PositionManagerCoreModule: "0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e",
4011
4009
  TermManagerModule: "0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82",
4012
4010
  LoanOperationsManagerModule: "0x68B1D87F95878fE05B998F19b66F4baba5De1aed",
4013
- BTCSpendAuthorizer: "0x59b670e9fA9D0A427751Af201D676719a970857b",
4014
- CollateralManagerModule: "0xa85233C63b9Ee964Add6F2cffe00Fd84eb32338f",
4015
- LiquidationManagerModule: "0x7a2088a1bFc9d81c55368AE168C2C02570cB814F",
4011
+ BTCSpendAuthorizer: "0xc6e7DF5E7b4f2A278906862b61205850344D4e7d",
4012
+ CollateralManagerModule: "0x322813Fd9A801c5507c9de605d63CEA4f2CE6c44",
4013
+ LiquidationManagerModule: "0x4A679253410272dd5232B3Ff7cF5dbB88f295319",
4016
4014
  CircuitBreakerModule: "0x0B306BF915C4d645ff596e518fAf3F9669b97016",
4017
- AdminModule: "0xc5a5C42992dECbae36851359345FE25997F5C42d",
4015
+ AdminModule: "0x09635F643e140090A9A8Dcd712eD6285858ceBef",
4018
4016
  PositionManagerViews: "0x959922bE3CAee4b8Cd9a407cc3ac1C251C2007B1",
4019
- PositionManager: "0x84eA74d481Ee0A5332c457a4d796187F6Ba67fEB",
4020
- OperationAuthorizationRegistry: "0x7969c5eD335650692Bc04293B07F5BF2e7A673C0",
4021
- PKPValidation: "0xcbEAF3BDe82155F56486Fb5a1072cb8baAf547cc"
4017
+ PositionManager: "0x84eA74d481Ee0A5332c457a4d796187F6Ba67fEB"
4022
4018
  };
4023
4019
  ALL_DEPLOYMENTS = {
4024
4020
  sepolia: SEPOLIA_DEPLOYMENT,
@@ -31382,103 +31378,103 @@ var require_pkg_src = __commonJS({
31382
31378
  }
31383
31379
  },
31384
31380
  btcTransactionSigner: {
31385
- cid: "QmTrtAnUFpAi6tpw74UPCiULqe9Z4SBE4b4neekY8evK5Y",
31381
+ cid: "QmZs56sVTCJv7mgvyRYfpYHFvFLcSeXa4H44qUYT7z14QP",
31386
31382
  authorizedCidHex: cidToHex(
31387
- "QmTrtAnUFpAi6tpw74UPCiULqe9Z4SBE4b4neekY8evK5Y"
31383
+ "QmZs56sVTCJv7mgvyRYfpYHFvFLcSeXa4H44qUYT7z14QP"
31388
31384
  ),
31389
31385
  name: "Btc Transaction Signer",
31390
31386
  description: "Production Btc Transaction Signer",
31391
31387
  version: "1.0.0",
31392
31388
  deployed: true,
31393
- deployedAt: 1780976122896,
31394
- size: 41048,
31395
- hash: "93725b2020e1914e93f1e21bdcc75d9cb28bc0b6bc4ea9b470f112e1f068998f"
31389
+ deployedAt: 1781542204806,
31390
+ size: 42376,
31391
+ hash: "f4aed3d88f6fbff6623ed2047436cecd4f561a74883171ea6f4ebe0a1129973c"
31396
31392
  },
31397
31393
  ucdMintValidator: {
31398
- cid: "QmTWKgfSHfYWTosPJBzu2s4sM2U6qhvmA9pXbkUzDxdQTJ",
31394
+ cid: "QmPir8F8jmJ4ssQpEC3xFxkEnZxMHcgS6VxBQE1jkTLj5K",
31399
31395
  authorizedCidHex: cidToHex(
31400
- "QmTWKgfSHfYWTosPJBzu2s4sM2U6qhvmA9pXbkUzDxdQTJ"
31396
+ "QmPir8F8jmJ4ssQpEC3xFxkEnZxMHcgS6VxBQE1jkTLj5K"
31401
31397
  ),
31402
31398
  name: "Ucd Mint Validator",
31403
31399
  description: "Production Ucd Mint Validator",
31404
31400
  version: "1.0.0",
31405
31401
  deployed: true,
31406
- deployedAt: 1781116591564,
31407
- size: 68521,
31408
- hash: "5a955863b32c003314ab29c37b157e06d00a2f93c2d9085a02ca73b71838a72f",
31409
- validatorWalletAddress: "0x82db9f515957aa380b596c6ea2bd30cef181f236",
31402
+ deployedAt: 1781542207366,
31403
+ size: 72074,
31404
+ hash: "567a51d3beaedbda4f0af2636835ca8a2af89c2264e91f8dc31f522c1a424b7b",
31405
+ validatorWalletAddress: "0x82DB9F515957aA380B596C6eA2Bd30CEF181f236",
31410
31406
  pkp: {
31411
31407
  publicKey: "0x041ab17cd91fc5c0b761eea6092d032807561b621b82c488826776e04a9158d61ba64d809a4729f0501289d980732cb06d8dfd06999dd9c8efd2f495dad78b31bb",
31412
31408
  ethAddress: "0xc7e1588Db94Bbe92Ab209B833235144Fc5b97607"
31413
31409
  }
31414
31410
  },
31415
31411
  processPaymentValidator: {
31416
- cid: "QmVJ9UaUz8vfvHCEwVY584e9RTEcqy3f3T89UNtzzFSdcz",
31412
+ cid: "QmVq19NXJEpMMvaWQdsU5czLoqh28WGWoGgKMSYFaCmfa9",
31417
31413
  authorizedCidHex: cidToHex(
31418
- "QmVJ9UaUz8vfvHCEwVY584e9RTEcqy3f3T89UNtzzFSdcz"
31414
+ "QmVq19NXJEpMMvaWQdsU5czLoqh28WGWoGgKMSYFaCmfa9"
31419
31415
  ),
31420
31416
  name: "Process Payment Validator",
31421
31417
  description: "Production Process Payment Validator",
31422
31418
  version: "1.0.0",
31423
31419
  deployed: true,
31424
- deployedAt: 1780976120346,
31425
- size: 64473,
31426
- hash: "8cf2ea8e2bf39ab02c6ac1706d8bec2aa16aa1f04f4789b11fa8215e04ac2d7e",
31427
- validatorWalletAddress: "0x82db9f515957aa380b596c6ea2bd30cef181f236",
31420
+ deployedAt: 1781542209526,
31421
+ size: 68239,
31422
+ hash: "ada27fea57aa3f3b861c49e75ed1f80b72500fdccc1d6e88ee1a3c1396b81867",
31423
+ validatorWalletAddress: "0x82DB9F515957aA380B596C6eA2Bd30CEF181f236",
31428
31424
  pkp: {
31429
31425
  publicKey: "0x04cfccb9b6c7addc79469c0e9fafebef4c70801302c62cdb26b610723a9b8527d23f98a40158c7340d83fd0e62d02b5ec74c12f7a86d98e8c6973b4811110f19ad",
31430
31426
  ethAddress: "0xc7e1588Db94Bbe92Ab209B833235144Fc5b97607"
31431
31427
  }
31432
31428
  },
31433
31429
  extendPositionValidator: {
31434
- cid: "QmW2zjWbsVzm8q4oMEHZ1SCeijygZFMvvi9zHqUQWm3jut",
31430
+ cid: "QmP2u3bgKLtfqsFMp6Li72zMY8ZZH3ttAqp9W2wwonUmcb",
31435
31431
  authorizedCidHex: cidToHex(
31436
- "QmW2zjWbsVzm8q4oMEHZ1SCeijygZFMvvi9zHqUQWm3jut"
31432
+ "QmP2u3bgKLtfqsFMp6Li72zMY8ZZH3ttAqp9W2wwonUmcb"
31437
31433
  ),
31438
31434
  name: "Extend Position Validator",
31439
31435
  description: "Production Extend Position Validator",
31440
31436
  version: "1.0.1",
31441
31437
  deployed: true,
31442
- deployedAt: 1781116610064,
31443
- size: 63508,
31444
- hash: "187c71046858bde0753fe479634bd2901e3d7f3689b5f39a82b3c5fa3a47b53d",
31445
- validatorWalletAddress: "0x82db9f515957aa380b596c6ea2bd30cef181f236",
31438
+ deployedAt: 1781542211640,
31439
+ size: 66543,
31440
+ hash: "0db666fa2888e9acea13d8e4d79edd4ca252f5a4bb06d97e53aa14a9a34b7143",
31441
+ validatorWalletAddress: "0x82DB9F515957aA380B596C6eA2Bd30CEF181f236",
31446
31442
  pkp: {
31447
31443
  publicKey: "0x04e52338f6a0c3362800f1a94c4c8f08be5030dde0fa217388c53d1c1a4790f4443c9f2886b2d2d8f4b75a9a156e9b028011b1a1cf7648da0e556aa980ec692836",
31448
31444
  ethAddress: "0xc7e1588Db94Bbe92Ab209B833235144Fc5b97607"
31449
31445
  }
31450
31446
  },
31451
31447
  btcWithdrawal: {
31452
- cid: "QmcxHLCcXpx5Jstd1hQmwjU2KPDzP2KYEdMgbZVn84nY6n",
31448
+ cid: "QmXtmLdGuEqMKKAtV7d8sHpUV32Kt74na4dRQdpWLasbHJ",
31453
31449
  authorizedCidHex: cidToHex(
31454
- "QmcxHLCcXpx5Jstd1hQmwjU2KPDzP2KYEdMgbZVn84nY6n"
31450
+ "QmXtmLdGuEqMKKAtV7d8sHpUV32Kt74na4dRQdpWLasbHJ"
31455
31451
  ),
31456
31452
  name: "Btc Withdrawal",
31457
31453
  description: "Production Btc Withdrawal",
31458
31454
  version: "1.0.0",
31459
31455
  deployed: true,
31460
- deployedAt: 1781116627244,
31461
- size: 76218,
31462
- hash: "1e686e517ab1b8163904a27d3e1962cecb2f49b3cc7ecdc8f2ff5e5847fe3762",
31463
- validatorWalletAddress: "0x82db9f515957aa380b596c6ea2bd30cef181f236",
31456
+ deployedAt: 1781542212709,
31457
+ size: 79782,
31458
+ hash: "e824eb473df8eba3a025ac3adc46730dbf89f90884d7c05a78cc07b90d6bc4df",
31459
+ validatorWalletAddress: "0x82DB9F515957aA380B596C6eA2Bd30CEF181f236",
31464
31460
  pkp: {
31465
31461
  publicKey: "0x043616787c5432415c24378c4ef48de2bcd6bb7b575b837e3cff09171802662da7105d79586c7659677a0ecbaddac4cce06cb2a11f69a16fa0c4d7002ac7d51a4d",
31466
31462
  ethAddress: "0xc7e1588Db94Bbe92Ab209B833235144Fc5b97607"
31467
31463
  }
31468
31464
  },
31469
31465
  liquidationValidator: {
31470
- cid: "QmZv8cRhvQqEGscWufU4rYPrKNt3ruAhQWK2ei3ohJBiZA",
31466
+ cid: "QmVicBXuZVY8t4DXLPjvXjzLqnBtnogAh5HT7BaL9VeDwF",
31471
31467
  authorizedCidHex: cidToHex(
31472
- "QmZv8cRhvQqEGscWufU4rYPrKNt3ruAhQWK2ei3ohJBiZA"
31468
+ "QmVicBXuZVY8t4DXLPjvXjzLqnBtnogAh5HT7BaL9VeDwF"
31473
31469
  ),
31474
31470
  name: "Liquidation Validator",
31475
31471
  description: "Production Liquidation Validator",
31476
31472
  version: "1.0.0",
31477
31473
  deployed: true,
31478
- deployedAt: 1781116646357,
31479
- size: 54901,
31480
- hash: "017ec04899089b98991a5aab6eeae5e3214c2cc9de7ef9b3fc0cd5ad85c3556c",
31481
- validatorWalletAddress: "0x82db9f515957aa380b596c6ea2bd30cef181f236",
31474
+ deployedAt: 1781542213421,
31475
+ size: 58444,
31476
+ hash: "0f42e9f8984433fef95875d35eb3c8d985e7ce15ad309e6aa1093d6fd1ba0bb5",
31477
+ validatorWalletAddress: "0x82DB9F515957aA380B596C6eA2Bd30CEF181f236",
31482
31478
  pkp: {
31483
31479
  publicKey: "0x041a241de58976c13e3d7ca5a18e494f7330151e3818706135d50176e78ffb673e58b11f0b67a87c73fade6c6b27d6e7a7377ea9f4c10bf31880f1d725f18cc6f8",
31484
31480
  ethAddress: "0xc7e1588Db94Bbe92Ab209B833235144Fc5b97607"
@@ -31503,18 +31499,18 @@ var require_pkg_src = __commonJS({
31503
31499
  }
31504
31500
  },
31505
31501
  loanVaultBtcBalance: {
31506
- cid: "Qmd7ZAWQzxjbFXjk39HuyRCN18FDG1LDifXceaikNFYRbm",
31502
+ cid: "QmUmqL4LcjDSpw2TtuWMcw8xYk8hPxgagY2qHDU8Mx1PLG",
31507
31503
  authorizedCidHex: cidToHex(
31508
- "Qmd7ZAWQzxjbFXjk39HuyRCN18FDG1LDifXceaikNFYRbm"
31504
+ "QmUmqL4LcjDSpw2TtuWMcw8xYk8hPxgagY2qHDU8Mx1PLG"
31509
31505
  ),
31510
31506
  name: "Loan Vault Btc Balance",
31511
31507
  description: "Production Loan Vault Btc Balance",
31512
31508
  version: "1.0.0",
31513
31509
  deployed: true,
31514
- deployedAt: 1780976125009,
31515
- size: 44634,
31516
- hash: "f7ba0f8778a15f349122237c44391800bb082d2090a87cc1631f0a764439d029",
31517
- validatorWalletAddress: "0x82db9f515957aa380b596c6ea2bd30cef181f236",
31510
+ deployedAt: 1781542215432,
31511
+ size: 48397,
31512
+ hash: "da3750a70e532b87f3590a3e2d8c2d51e700589f6e111bb291384ab01304af35",
31513
+ validatorWalletAddress: "0x82DB9F515957aA380B596C6eA2Bd30CEF181f236",
31518
31514
  pkp: {
31519
31515
  publicKey: "0x043616787c5432415c24378c4ef48de2bcd6bb7b575b837e3cff09171802662da7105d79586c7659677a0ecbaddac4cce06cb2a11f69a16fa0c4d7002ac7d51a4d",
31520
31516
  ethAddress: "0xc7e1588Db94Bbe92Ab209B833235144Fc5b97607"
@@ -31527,18 +31523,18 @@ var require_pkg_src = __commonJS({
31527
31523
  // Requires BitcoinProviderRegistry.addAllowedCid(chainId, keccak256(utf8(cid)))
31528
31524
  // on each target chain (the action decrypts registry slots). No OAR entry.
31529
31525
  btcAddressBalance: {
31530
- cid: "QmVmF9CHFDhhV51bNX87tVyd95oQS56u78ThFYKzMwEbFS",
31526
+ cid: "QmWRDAg7ZCBFFhGfdXR7aUtQsG5qqBb1yVdLCxh8dPD7G5",
31531
31527
  authorizedCidHex: cidToHex(
31532
- "QmVmF9CHFDhhV51bNX87tVyd95oQS56u78ThFYKzMwEbFS"
31528
+ "QmWRDAg7ZCBFFhGfdXR7aUtQsG5qqBb1yVdLCxh8dPD7G5"
31533
31529
  ),
31534
31530
  name: "Btc Address Balance",
31535
31531
  description: "Address-only signed total BTC balance via registry consensus (no positionId, no price)",
31536
31532
  version: "0.1.0",
31537
31533
  deployed: true,
31538
- deployedAt: 1781116681558,
31539
- size: 21957,
31540
- hash: "b17977304be6b117bcb29feafc3bb654113d72d5147ceeba92e91b4d7f5c0327",
31541
- validatorWalletAddress: "0x82db9f515957aa380b596c6ea2bd30cef181f236",
31534
+ deployedAt: 1781542217452,
31535
+ size: 25519,
31536
+ hash: "000e2f8bdbccdc95b0db0fb3f12412e2e76eea16a8456d37914d324437ae291c",
31537
+ validatorWalletAddress: "0x82DB9F515957aA380B596C6eA2Bd30CEF181f236",
31542
31538
  pkp: {
31543
31539
  publicKey: "0x0498cbb31facfa26e3ec83ccdabfe4fe341ca0282e0c3cb81da7113723b9726e1e49efa92165cc3faa66ced4454cea56dbab12267852d6525a55d7c4f128b912cd",
31544
31540
  ethAddress: "0xc7e1588Db94Bbe92Ab209B833235144Fc5b97607"
@@ -31571,18 +31567,18 @@ var require_pkg_src = __commonJS({
31571
31567
  hash: "03ee5be239c91c735d2c95db89a0d1b77e602cfc18af8eb64b3281fddcd90a72"
31572
31568
  },
31573
31569
  staleSpendRecoveryValidator: {
31574
- cid: "QmRZuRrxzsbp3WejuMfJJgws1iteRk87p1nGna82Cgun2k",
31570
+ cid: "QmWqJZqoKUqMaGTXe9WUSwdDyeBwXJ9dnR3ioFnVK4RkN5",
31575
31571
  authorizedCidHex: cidToHex(
31576
- "QmRZuRrxzsbp3WejuMfJJgws1iteRk87p1nGna82Cgun2k"
31572
+ "QmWqJZqoKUqMaGTXe9WUSwdDyeBwXJ9dnR3ioFnVK4RkN5"
31577
31573
  ),
31578
31574
  name: "Stale Spend Recovery Validator",
31579
31575
  description: "Production Stale Spend Recovery Validator",
31580
31576
  version: "1.0.0",
31581
31577
  deployed: true,
31582
- deployedAt: 1781116700324,
31583
- size: 31148,
31584
- hash: "c93591c7c7f51b519243499d78bd5ac0df1e368caa76c08d6a5d7aea9e3a49cc",
31585
- validatorWalletAddress: "0x82db9f515957aa380b596c6ea2bd30cef181f236",
31578
+ deployedAt: 1781542219438,
31579
+ size: 34413,
31580
+ hash: "26b11730cf5d9eb4af0b1fe65192d26ccee50369c0472211a0ea11e26ef51cc5",
31581
+ validatorWalletAddress: "0x82DB9F515957aA380B596C6eA2Bd30CEF181f236",
31586
31582
  pkp: {
31587
31583
  publicKey: "0x046da0ad6da7dd4a0063cbeac6f2bdb6a9889c2178b23470833356a8ee5630f7f0eee0db348d9d9aaaadd23eccf0063c8f68ee5e446abe30b882bf1de4c932bc21",
31588
31584
  ethAddress: "0xc7e1588Db94Bbe92Ab209B833235144Fc5b97607"
@@ -33329,12 +33325,83 @@ ${errorReport}`);
33329
33325
  function isAbortError(error2) {
33330
33326
  return error2 instanceof Error && error2.name === "AbortError";
33331
33327
  }
33328
+ var BLOCKSTREAM_TOKEN_URL = "https://login.blockstream.com/realms/blockstream-public/protocol/openid-connect/token";
33329
+ var oauthTokenCache = /* @__PURE__ */ new Map();
33330
+ var OAUTH_TOKEN_TIMEOUT_MS = 1e4;
33331
+ async function getBlockstreamBearerToken(auth, timeoutMs) {
33332
+ const tokenUrl = auth.tokenUrl || BLOCKSTREAM_TOKEN_URL;
33333
+ const key = `${tokenUrl}
33334
+ ${auth.clientId}`;
33335
+ const cached = oauthTokenCache.get(key);
33336
+ if (cached)
33337
+ return cached;
33338
+ const promise = (async () => {
33339
+ const body = `grant_type=client_credentials&client_id=${encodeURIComponent(auth.clientId)}&client_secret=${encodeURIComponent(auth.clientSecret)}&scope=openid`;
33340
+ const controller = new AbortController();
33341
+ const timeoutId = setTimeout(
33342
+ () => controller.abort(),
33343
+ timeoutMs && timeoutMs > 0 ? timeoutMs : OAUTH_TOKEN_TIMEOUT_MS
33344
+ );
33345
+ let resp;
33346
+ try {
33347
+ resp = await fetch(tokenUrl, {
33348
+ method: "POST",
33349
+ headers: { "Content-Type": "application/x-www-form-urlencoded" },
33350
+ body,
33351
+ signal: controller.signal
33352
+ });
33353
+ } finally {
33354
+ clearTimeout(timeoutId);
33355
+ }
33356
+ if (!resp.ok) {
33357
+ throw new Error(
33358
+ `Blockstream OAuth token exchange failed: ${resp.status} ${resp.statusText}`
33359
+ );
33360
+ }
33361
+ const json = await resp.json();
33362
+ const token = json?.access_token;
33363
+ if (typeof token !== "string" || token.length === 0) {
33364
+ throw new Error(
33365
+ "Blockstream OAuth token exchange returned no access_token"
33366
+ );
33367
+ }
33368
+ return token;
33369
+ })();
33370
+ promise.catch(() => oauthTokenCache.delete(key));
33371
+ oauthTokenCache.set(key, promise);
33372
+ return promise;
33373
+ }
33374
+ async function authHeaders(auth, timeoutMs) {
33375
+ if (!auth)
33376
+ return {};
33377
+ switch (auth.provider) {
33378
+ case "esplora":
33379
+ return {};
33380
+ case "maestro":
33381
+ return { "api-key": auth.apiKey };
33382
+ case "blockstream-enterprise": {
33383
+ const token = await getBlockstreamBearerToken(auth, timeoutMs);
33384
+ return { Authorization: `Bearer ${token}` };
33385
+ }
33386
+ default:
33387
+ return {};
33388
+ }
33389
+ }
33332
33390
  var BitcoinDataProvider = class {
33333
33391
  constructor(config) {
33334
33392
  this.config = config;
33335
33393
  this.timeout = config.timeout || 15e3;
33336
33394
  this.logger = LitActionLogger.create("BitcoinDataProvider");
33337
33395
  }
33396
+ /**
33397
+ * Merge per-provider auth headers into a base header set. No-op for public
33398
+ * Esplora / regtest faucet (no `auth`); attaches the `api-key` header for
33399
+ * Maestro and performs a (memoized) OAuth exchange → `Bearer` for Blockstream
33400
+ * Enterprise. Awaited at every fetch site so a single run shares one token.
33401
+ */
33402
+ async withAuth(base22 = {}) {
33403
+ return { ...base22, ...await authHeaders(this.config.auth, this.timeout) };
33404
+ }
33338
33405
  /**
33339
33406
  * Get current Bitcoin block height from provider
33340
33407
  */
@@ -33353,11 +33420,11 @@ ${errorReport}`);
33353
33420
  `${this.config.providerUrl}/blocks/tip/height`,
33354
33421
  {
33355
33422
  signal: controller.signal,
33356
- headers: {
33423
+ headers: await this.withAuth({
33357
33424
  Accept: "text/plain",
33358
33425
  "User-Agent": "Mozilla/5.0 (compatible; DiamondHandsValidator/1.0)",
33359
33426
  "ngrok-skip-browser-warning": "true"
33360
- }
33427
+ })
33361
33428
  }
33362
33429
  );
33363
33430
  clearTimeout(timeoutId);
@@ -33527,12 +33594,12 @@ ${errorReport}`);
33527
33594
  * Internal method to fetch UTXOs from a specific provider
33528
33595
  *
33529
33596
  * Supports standard Esplora API format:
33530
- * - Standard format: {providerUrl}/address/{address}/utxos
33597
+ * - Standard format: {providerUrl}/address/{address}/utxo
33531
33598
  * - providerUrl must include full base path (e.g., "http://localhost:3002/api/esplora")
33532
33599
  */
33533
33600
  async fetchUTXOsFromProvider(providerUrl, address) {
33534
33601
  this.logger.stepStart("1", "fetchUTXOsFromProvider");
33535
- const endpoint = `${providerUrl}/address/${address}/utxos`;
33602
+ const endpoint = `${providerUrl}/address/${address}/utxo`;
33536
33603
  this.logger.log("1", `Fetching UTXOs from ${endpoint}`);
33537
33604
  const controller = new AbortController();
33538
33605
  const timeoutId = setTimeout(() => controller.abort(), this.timeout);
@@ -33542,18 +33609,18 @@ ${errorReport}`);
33542
33609
  this.getCurrentBlockHeight(),
33543
33610
  fetch(endpoint, {
33544
33611
  signal: controller.signal,
33545
- headers: {
33612
+ headers: await this.withAuth({
33546
33613
  Accept: "application/json",
33547
33614
  "Content-Type": "application/json",
33548
33615
  "User-Agent": "Mozilla/5.0 (compatible; DiamondHandsValidator/1.0)",
33549
33616
  "ngrok-skip-browser-warning": "true"
33550
33617
  // Skip ngrok browser warning page
33551
- }
33618
+ })
33552
33619
  })
33553
33620
  ]);
33554
33621
  clearTimeout(timeoutId);
33555
33622
  litDebugLog(
33556
- `[BitcoinDataProvider] parallel(tipHeight + GET utxos) wall ${Date.now() - tParallel}ms endpoint tail .../${address.slice(0, 12)}.../utxos (timeout budget ${this.timeout}ms)`
33623
+ `[BitcoinDataProvider] parallel(tipHeight + GET utxo) wall ${Date.now() - tParallel}ms endpoint tail .../${address.slice(0, 12)}.../utxo (timeout budget ${this.timeout}ms)`
33557
33624
  );
33558
33625
  this.logger.log("1", `Current block height: ${currentBlockHeight}`);
33559
33626
  if (!response.ok) {
@@ -33665,12 +33732,12 @@ ${errorReport}`);
33665
33732
  const t0 = Date.now();
33666
33733
  const response = await fetch(endpoint, {
33667
33734
  signal: controller.signal,
33668
- headers: {
33735
+ headers: await this.withAuth({
33669
33736
  Accept: "application/json",
33670
33737
  "Content-Type": "application/json",
33671
33738
  "User-Agent": "Mozilla/5.0 (compatible; DiamondHandsValidator/1.0)",
33672
33739
  "ngrok-skip-browser-warning": "true"
33673
- }
33740
+ })
33674
33741
  });
33675
33742
  clearTimeout(timeoutId);
33676
33743
  litDebugLog(
@@ -33744,7 +33811,8 @@ ${errorReport}`);
33744
33811
  try {
33745
33812
  const t0 = Date.now();
33746
33813
  const response = await fetch(`${this.config.providerUrl}/tx/${txid}`, {
33747
- signal: controller.signal
33814
+ signal: controller.signal,
33815
+ headers: await this.withAuth()
33748
33816
  });
33749
33817
  clearTimeout(timeoutId);
33750
33818
  litDebugLog(
@@ -33766,7 +33834,7 @@ ${errorReport}`);
33766
33834
  try {
33767
33835
  const tipResp = await fetch(
33768
33836
  `${this.config.providerUrl}/blocks/tip/height`,
33769
- { signal: controller.signal }
33837
+ { signal: controller.signal, headers: await this.withAuth() }
33770
33838
  );
33771
33839
  if (!tipResp.ok) {
33772
33840
  return { txid: data.txid ?? txid, confirmations: 1 };
@@ -33817,7 +33885,8 @@ ${errorReport}`);
33817
33885
  const timeoutId = setTimeout(() => controller.abort(), this.timeout);
33818
33886
  try {
33819
33887
  const response = await fetch(`${this.config.providerUrl}/tx/${txid}`, {
33820
- signal: controller.signal
33888
+ signal: controller.signal,
33889
+ headers: await this.withAuth()
33821
33890
  });
33822
33891
  clearTimeout(timeoutId);
33823
33892
  if (!response.ok) {