@babylonlabs-io/ts-sdk 0.62.0 → 0.63.0

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.
Files changed (59) hide show
  1. package/dist/{BTCVaultRegistry.abi-B3BLhpJ4.js → BTCVaultRegistry.abi-CJwWI2EO.js} +5 -1
  2. package/dist/{BTCVaultRegistry.abi-B3BLhpJ4.js.map → BTCVaultRegistry.abi-CJwWI2EO.js.map} +1 -1
  3. package/dist/{BTCVaultRegistry.abi-3VLWva2x.cjs → BTCVaultRegistry.abi-z7d_eP22.cjs} +2 -2
  4. package/dist/{BTCVaultRegistry.abi-3VLWva2x.cjs.map → BTCVaultRegistry.abi-z7d_eP22.cjs.map} +1 -1
  5. package/dist/{PeginManager-BLBB_vMl.cjs → PeginManager-n__EsW8a.cjs} +2 -2
  6. package/dist/{PeginManager-BLBB_vMl.cjs.map → PeginManager-n__EsW8a.cjs.map} +1 -1
  7. package/dist/{PeginManager-Dj6_tWRA.js → PeginManager-ozwQaRwj.js} +3 -3
  8. package/dist/{PeginManager-Dj6_tWRA.js.map → PeginManager-ozwQaRwj.js.map} +1 -1
  9. package/dist/{ProtocolParams.abi-CV938AYZ.js → ProtocolParams.abi-C0TSRaHV.js} +17 -1
  10. package/dist/{ProtocolParams.abi-CV938AYZ.js.map → ProtocolParams.abi-C0TSRaHV.js.map} +1 -1
  11. package/dist/{ProtocolParams.abi-C8U7BHCS.cjs → ProtocolParams.abi-CYZoV2EI.cjs} +2 -2
  12. package/dist/{ProtocolParams.abi-C8U7BHCS.cjs.map → ProtocolParams.abi-CYZoV2EI.cjs.map} +1 -1
  13. package/dist/batchPoll-6L5oToGr.cjs +2 -0
  14. package/dist/batchPoll-6L5oToGr.cjs.map +1 -0
  15. package/dist/{batchPoll-C3eKPYOC.js → batchPoll-cIxrSLLJ.js} +43 -21
  16. package/dist/batchPoll-cIxrSLLJ.js.map +1 -0
  17. package/dist/{buildAndBroadcastRefund-CH2awK6h.js → buildAndBroadcastRefund-DpfBZfLw.js} +2 -2
  18. package/dist/{buildAndBroadcastRefund-CH2awK6h.js.map → buildAndBroadcastRefund-DpfBZfLw.js.map} +1 -1
  19. package/dist/{buildAndBroadcastRefund-CYzhA_B8.cjs → buildAndBroadcastRefund-DsCd90qJ.cjs} +2 -2
  20. package/dist/{buildAndBroadcastRefund-CYzhA_B8.cjs.map → buildAndBroadcastRefund-DsCd90qJ.cjs.map} +1 -1
  21. package/dist/{errors-lMX8Q6zb.js → errors-BXzrXswV.js} +2 -2
  22. package/dist/{errors-lMX8Q6zb.js.map → errors-BXzrXswV.js.map} +1 -1
  23. package/dist/{errors-D2zp7Vzk.cjs → errors-BzBVottO.cjs} +2 -2
  24. package/dist/{errors-D2zp7Vzk.cjs.map → errors-BzBVottO.cjs.map} +1 -1
  25. package/dist/index.cjs +1 -1
  26. package/dist/index.js +7 -7
  27. package/dist/{mempoolApi-DC7pID6B.js → mempoolApi-BxSINXIB.js} +30 -54
  28. package/dist/mempoolApi-BxSINXIB.js.map +1 -0
  29. package/dist/mempoolApi-CXfr-L6x.cjs +2 -0
  30. package/dist/mempoolApi-CXfr-L6x.cjs.map +1 -0
  31. package/dist/tbv/core/clients/eth/protocol-params-reader.d.ts +11 -0
  32. package/dist/tbv/core/clients/eth/protocol-params-reader.d.ts.map +1 -1
  33. package/dist/tbv/core/clients/eth/types.d.ts +18 -6
  34. package/dist/tbv/core/clients/eth/types.d.ts.map +1 -1
  35. package/dist/tbv/core/clients/eth/vault-registry-reader.d.ts +0 -6
  36. package/dist/tbv/core/clients/eth/vault-registry-reader.d.ts.map +1 -1
  37. package/dist/tbv/core/clients/index.cjs +1 -1
  38. package/dist/tbv/core/clients/index.js +2 -2
  39. package/dist/tbv/core/contracts/abis/BTCVaultRegistry.abi.d.ts +4 -0
  40. package/dist/tbv/core/contracts/abis/BTCVaultRegistry.abi.d.ts.map +1 -1
  41. package/dist/tbv/core/contracts/abis/ProtocolParams.abi.d.ts +10 -0
  42. package/dist/tbv/core/contracts/abis/ProtocolParams.abi.d.ts.map +1 -1
  43. package/dist/tbv/core/contracts/index.cjs +1 -1
  44. package/dist/tbv/core/contracts/index.js +2 -2
  45. package/dist/tbv/core/index.cjs +1 -1
  46. package/dist/tbv/core/index.js +7 -7
  47. package/dist/tbv/core/managers/index.cjs +1 -1
  48. package/dist/tbv/core/managers/index.js +1 -1
  49. package/dist/tbv/core/services/index.cjs +1 -1
  50. package/dist/tbv/core/services/index.js +1 -1
  51. package/dist/tbv/index.cjs +1 -1
  52. package/dist/tbv/index.js +7 -7
  53. package/package.json +1 -1
  54. package/dist/batchPoll-C3eKPYOC.js.map +0 -1
  55. package/dist/batchPoll-CbbCcNZP.cjs +0 -2
  56. package/dist/batchPoll-CbbCcNZP.cjs.map +0 -1
  57. package/dist/mempoolApi-BxhMqJ4f.cjs +0 -2
  58. package/dist/mempoolApi-BxhMqJ4f.cjs.map +0 -1
  59. package/dist/mempoolApi-DC7pID6B.js.map +0 -1
@@ -461,10 +461,26 @@ const e = [
461
461
  ],
462
462
  outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
463
463
  stateMutability: "view"
464
+ },
465
+ // Observation window between a vault's final ACK and its activation, in ETH
466
+ // blocks, measured from `verifiedAt`. Read through this standalone getter
467
+ // rather than as a 7th component of `getTBVProtocolParams` above: the field
468
+ // was appended to the struct, so a 7-component tuple decodes only against
469
+ // deployments that carry it and throws `PositionOutOfBoundsError` against
470
+ // the 6-word return of those that don't. Deployments are currently split
471
+ // (devnet has it, testnet/staging do not), and that tuple feeds
472
+ // `getPegInConfiguration` -> `ProtocolParamsContext`, whose failure blanks
473
+ // the app. `uint256` (not the `uint64` storage width) — the accessor widens.
474
+ {
475
+ type: "function",
476
+ name: "peginActivationDelay",
477
+ inputs: [],
478
+ outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
479
+ stateMutability: "view"
464
480
  }
465
481
  ];
466
482
  export {
467
483
  e as A,
468
484
  t as P
469
485
  };
470
- //# sourceMappingURL=ProtocolParams.abi-CV938AYZ.js.map
486
+ //# sourceMappingURL=ProtocolParams.abi-C0TSRaHV.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProtocolParams.abi-CV938AYZ.js","sources":["../src/tbv/core/contracts/abis/ApplicationRegistry.abi.ts","../src/tbv/core/contracts/abis/ProtocolParams.abi.ts"],"sourcesContent":["/**\n * ApplicationRegistry Contract ABI\n *\n * Minimal ABI containing only the vault keeper read functions needed by the SDK.\n * Generated from vault-contracts-aave-v4 IApplicationRegistry.sol interface.\n *\n * @module contracts/abis/ApplicationRegistry\n */\n\nexport const ApplicationRegistryABI = [\n {\n type: \"function\",\n name: \"getVaultKeepersByVersion\",\n inputs: [\n {\n name: \"appEntryPoint\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"versionNumber\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"tuple[]\",\n internalType: \"struct BTCVaultTypes.AddressBTCKeyPair[]\",\n components: [\n {\n name: \"ethAddress\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"btcPubKey\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getCurrentVaultKeepers\",\n inputs: [\n {\n name: \"appEntryPoint\",\n type: \"address\",\n internalType: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"tuple[]\",\n internalType: \"struct BTCVaultTypes.AddressBTCKeyPair[]\",\n components: [\n {\n name: \"ethAddress\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"btcPubKey\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getCurrentVaultKeepersVersion\",\n inputs: [\n {\n name: \"appEntryPoint\",\n type: \"address\",\n internalType: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n ],\n stateMutability: \"view\",\n },\n // --- RFC-006 operation-key resolution ---------------------------------\n // A keeper's roster entry (`AddressBTCKeyPair` above) carries its *admin*\n // ETH address and its *genesis* BTC key. The key that actually goes into\n // the scripts is the operation key bonded at the vault's frozen\n // `appKeeperKeyEpoch`, which the admin address keys the lookup for.\n //\n // The `...OrGenesis` variant takes the roster key explicitly because the\n // correct genesis for a keeper is its key in the vault's *frozen membership\n // version* — a keeper may have been dropped from the current roster, or\n // listed under a different key in an older version. The plain\n // `getOperationBtcKeyAtEpoch` variant resolves genesis version-agnostically\n // and can therefore pick the wrong one; do not use it for a frozen vault.\n {\n type: \"function\",\n name: \"getCurrentOperationBtcKey\",\n inputs: [\n { name: \"appEntryPoint\", type: \"address\", internalType: \"address\" },\n { name: \"keeperAdmin\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getOperationBtcKeyAtEpochOrGenesis\",\n inputs: [\n { name: \"appEntryPoint\", type: \"address\", internalType: \"address\" },\n { name: \"keeperAdmin\", type: \"address\", internalType: \"address\" },\n { name: \"epoch\", type: \"uint64\", internalType: \"uint64\" },\n { name: \"rosterGenesisKey\", type: \"bytes32\", internalType: \"bytes32\" },\n ],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getPayoutScriptAtEpoch\",\n inputs: [\n { name: \"appEntryPoint\", type: \"address\", internalType: \"address\" },\n { name: \"keeperAdmin\", type: \"address\", internalType: \"address\" },\n { name: \"epoch\", type: \"uint64\", internalType: \"uint64\" },\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"view\",\n },\n] as const;\n","/**\n * ProtocolParams Contract ABI\n *\n * Minimal ABI containing only the read functions needed by the SDK.\n * Generated from vault-contracts-aave-v4 IProtocolParams.sol interface.\n *\n * @module contracts/abis/ProtocolParams\n */\n\nexport const ProtocolParamsABI = [\n {\n type: \"function\",\n name: \"activeVaultCoreVersion\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getTBVProtocolParams\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct IProtocolParams.TBVProtocolParams\",\n components: [\n {\n name: \"minimumPegInAmount\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"maxPegInAmount\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"pegInAckTimeout\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"pegInActivationTimeout\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"maxHtlcOutputCount\",\n type: \"uint8\",\n internalType: \"uint8\",\n },\n {\n name: \"expiredPegInGraceBlocks\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getLatestOffchainParams\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct IProtocolParams.VersionedOffchainParams\",\n components: [\n {\n name: \"timelockAssert\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n {\n name: \"timelockChallengeAssert\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n {\n name: \"securityCouncilKeys\",\n type: \"bytes32[]\",\n internalType: \"bytes32[]\",\n },\n {\n name: \"councilQuorum\",\n type: \"uint8\",\n internalType: \"uint8\",\n },\n {\n name: \"feeRate\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"babeTotalInstances\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"babeInstancesToFinalize\",\n type: \"uint8\",\n internalType: \"uint8\",\n },\n {\n name: \"minVpCommissionBps\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"tRefund\",\n type: \"uint32\",\n internalType: \"uint32\",\n },\n {\n name: \"tStale\",\n type: \"uint32\",\n internalType: \"uint32\",\n },\n {\n name: \"minPeginFeeRate\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"proverCircuitVersion\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"minPrepeginDepth\",\n type: \"uint32\",\n internalType: \"uint32\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getOffchainParamsByVersion\",\n inputs: [\n {\n name: \"versionNumber\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct IProtocolParams.VersionedOffchainParams\",\n components: [\n {\n name: \"timelockAssert\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n {\n name: \"timelockChallengeAssert\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n {\n name: \"securityCouncilKeys\",\n type: \"bytes32[]\",\n internalType: \"bytes32[]\",\n },\n {\n name: \"councilQuorum\",\n type: \"uint8\",\n internalType: \"uint8\",\n },\n {\n name: \"feeRate\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"babeTotalInstances\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"babeInstancesToFinalize\",\n type: \"uint8\",\n internalType: \"uint8\",\n },\n {\n name: \"minVpCommissionBps\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"tRefund\",\n type: \"uint32\",\n internalType: \"uint32\",\n },\n {\n name: \"tStale\",\n type: \"uint32\",\n internalType: \"uint32\",\n },\n {\n name: \"minPeginFeeRate\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"proverCircuitVersion\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"minPrepeginDepth\",\n type: \"uint32\",\n internalType: \"uint32\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"latestOffchainParamsVersion\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getUniversalChallengersByVersion\",\n inputs: [\n {\n name: \"versionNumber\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"tuple[]\",\n internalType: \"struct BTCVaultTypes.AddressBTCKeyPair[]\",\n components: [\n {\n name: \"ethAddress\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"btcPubKey\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getCurrentUniversalChallengers\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple[]\",\n internalType: \"struct BTCVaultTypes.AddressBTCKeyPair[]\",\n components: [\n {\n name: \"ethAddress\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"btcPubKey\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"latestUniversalChallengersVersion\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n ],\n stateMutability: \"view\",\n },\n // --- RFC-006 operation-key resolution ---------------------------------\n // Universal challengers get the reduced RFC-006 model: an operation key\n // that goes into the challenge scripts, resolved against the vault's frozen\n // `ucKeyEpoch`, but no payout script (a UC is never a claimer, so its only\n // BTC output is the NoPayout anchor) and no per-UC setter — key changes go\n // through a roster version bump. The roster entry's `ethAddress` is the\n // `ucAdmin` lookup key and its `btcPubKey` is the genesis key.\n {\n type: \"function\",\n name: \"getCurrentOperationBtcKey\",\n inputs: [{ name: \"ucAdmin\", type: \"address\", internalType: \"address\" }],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getOperationBtcKeyAtEpochOrGenesis\",\n inputs: [\n { name: \"ucAdmin\", type: \"address\", internalType: \"address\" },\n { name: \"epoch\", type: \"uint64\", internalType: \"uint64\" },\n { name: \"rosterGenesisKey\", type: \"bytes32\", internalType: \"bytes32\" },\n ],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n] as const;\n"],"names":["ApplicationRegistryABI","ProtocolParamsABI"],"mappings":"AASO,MAAMA,IAAyB;AAAA,EACpC;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,MACN;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,cAAc;AAAA,MAAA;AAAA,MAEhB;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,cAAc;AAAA,MAAA;AAAA,IAChB;AAAA,IAEF,SAAS;AAAA,MACP;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,cAAc;AAAA,QACd,YAAY;AAAA,UACV;AAAA,YACE,MAAM;AAAA,YACN,MAAM;AAAA,YACN,cAAc;AAAA,UAAA;AAAA,UAEhB;AAAA,YACE,MAAM;AAAA,YACN,MAAM;AAAA,YACN,cAAc;AAAA,UAAA;AAAA,QAChB;AAAA,MACF;AAAA,IACF;AAAA,IAEF,iBAAiB;AAAA,EAAA;AAAA,EAEnB;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,MACN;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,cAAc;AAAA,MAAA;AAAA,IAChB;AAAA,IAEF,SAAS;AAAA,MACP;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,cAAc;AAAA,QACd,YAAY;AAAA,UACV;AAAA,YACE,MAAM;AAAA,YACN,MAAM;AAAA,YACN,cAAc;AAAA,UAAA;AAAA,UAEhB;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AA,IAEF,iBAAiB;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASnB;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ,CAAC,EAAE,MAAM,WAAW,MAAM,WAAW,cAAc,WAAW;AAAA,IACtE,SAAS,CAAC,EAAE,MAAM,IAAI,MAAM,WAAW,cAAc,WAAW;AAAA,IAChE,iBAAiB;AAAA,EAAA;AAAA,EAEnB;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,MACN,EAAE,MAAM,WAAW,MAAM,WAAW,cAAc,UAAA;AAAA,MAClD,EAAE,MAAM,SAAS,MAAM,UAAU,cAAc,SAAA;AAAA,MAC/C,EAAE,MAAM,oBAAoB,MAAM,WAAW,cAAc,UAAA;AAAA,IAAU;AAAA,IAEvE,SAAS,CAAC,EAAE,MAAM,IAAI,MAAM,WAAW,cAAc,WAAW;AAAA,IAChE,iBAAiB;AAAA,EAAA;AAErB;"}
1
+ {"version":3,"file":"ProtocolParams.abi-C0TSRaHV.js","sources":["../src/tbv/core/contracts/abis/ApplicationRegistry.abi.ts","../src/tbv/core/contracts/abis/ProtocolParams.abi.ts"],"sourcesContent":["/**\n * ApplicationRegistry Contract ABI\n *\n * Minimal ABI containing only the vault keeper read functions needed by the SDK.\n * Generated from vault-contracts-aave-v4 IApplicationRegistry.sol interface.\n *\n * @module contracts/abis/ApplicationRegistry\n */\n\nexport const ApplicationRegistryABI = [\n {\n type: \"function\",\n name: \"getVaultKeepersByVersion\",\n inputs: [\n {\n name: \"appEntryPoint\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"versionNumber\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"tuple[]\",\n internalType: \"struct BTCVaultTypes.AddressBTCKeyPair[]\",\n components: [\n {\n name: \"ethAddress\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"btcPubKey\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getCurrentVaultKeepers\",\n inputs: [\n {\n name: \"appEntryPoint\",\n type: \"address\",\n internalType: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"tuple[]\",\n internalType: \"struct BTCVaultTypes.AddressBTCKeyPair[]\",\n components: [\n {\n name: \"ethAddress\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"btcPubKey\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getCurrentVaultKeepersVersion\",\n inputs: [\n {\n name: \"appEntryPoint\",\n type: \"address\",\n internalType: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n ],\n stateMutability: \"view\",\n },\n // --- RFC-006 operation-key resolution ---------------------------------\n // A keeper's roster entry (`AddressBTCKeyPair` above) carries its *admin*\n // ETH address and its *genesis* BTC key. The key that actually goes into\n // the scripts is the operation key bonded at the vault's frozen\n // `appKeeperKeyEpoch`, which the admin address keys the lookup for.\n //\n // The `...OrGenesis` variant takes the roster key explicitly because the\n // correct genesis for a keeper is its key in the vault's *frozen membership\n // version* — a keeper may have been dropped from the current roster, or\n // listed under a different key in an older version. The plain\n // `getOperationBtcKeyAtEpoch` variant resolves genesis version-agnostically\n // and can therefore pick the wrong one; do not use it for a frozen vault.\n {\n type: \"function\",\n name: \"getCurrentOperationBtcKey\",\n inputs: [\n { name: \"appEntryPoint\", type: \"address\", internalType: \"address\" },\n { name: \"keeperAdmin\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getOperationBtcKeyAtEpochOrGenesis\",\n inputs: [\n { name: \"appEntryPoint\", type: \"address\", internalType: \"address\" },\n { name: \"keeperAdmin\", type: \"address\", internalType: \"address\" },\n { name: \"epoch\", type: \"uint64\", internalType: \"uint64\" },\n { name: \"rosterGenesisKey\", type: \"bytes32\", internalType: \"bytes32\" },\n ],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getPayoutScriptAtEpoch\",\n inputs: [\n { name: \"appEntryPoint\", type: \"address\", internalType: \"address\" },\n { name: \"keeperAdmin\", type: \"address\", internalType: \"address\" },\n { name: \"epoch\", type: \"uint64\", internalType: \"uint64\" },\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"view\",\n },\n] as const;\n","/**\n * ProtocolParams Contract ABI\n *\n * Minimal ABI containing only the read functions needed by the SDK.\n * Generated from vault-contracts-aave-v4 IProtocolParams.sol interface.\n *\n * @module contracts/abis/ProtocolParams\n */\n\nexport const ProtocolParamsABI = [\n {\n type: \"function\",\n name: \"activeVaultCoreVersion\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getTBVProtocolParams\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct IProtocolParams.TBVProtocolParams\",\n components: [\n {\n name: \"minimumPegInAmount\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"maxPegInAmount\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"pegInAckTimeout\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"pegInActivationTimeout\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"maxHtlcOutputCount\",\n type: \"uint8\",\n internalType: \"uint8\",\n },\n {\n name: \"expiredPegInGraceBlocks\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getLatestOffchainParams\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct IProtocolParams.VersionedOffchainParams\",\n components: [\n {\n name: \"timelockAssert\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n {\n name: \"timelockChallengeAssert\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n {\n name: \"securityCouncilKeys\",\n type: \"bytes32[]\",\n internalType: \"bytes32[]\",\n },\n {\n name: \"councilQuorum\",\n type: \"uint8\",\n internalType: \"uint8\",\n },\n {\n name: \"feeRate\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"babeTotalInstances\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"babeInstancesToFinalize\",\n type: \"uint8\",\n internalType: \"uint8\",\n },\n {\n name: \"minVpCommissionBps\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"tRefund\",\n type: \"uint32\",\n internalType: \"uint32\",\n },\n {\n name: \"tStale\",\n type: \"uint32\",\n internalType: \"uint32\",\n },\n {\n name: \"minPeginFeeRate\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"proverCircuitVersion\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"minPrepeginDepth\",\n type: \"uint32\",\n internalType: \"uint32\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getOffchainParamsByVersion\",\n inputs: [\n {\n name: \"versionNumber\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct IProtocolParams.VersionedOffchainParams\",\n components: [\n {\n name: \"timelockAssert\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n {\n name: \"timelockChallengeAssert\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n {\n name: \"securityCouncilKeys\",\n type: \"bytes32[]\",\n internalType: \"bytes32[]\",\n },\n {\n name: \"councilQuorum\",\n type: \"uint8\",\n internalType: \"uint8\",\n },\n {\n name: \"feeRate\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"babeTotalInstances\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"babeInstancesToFinalize\",\n type: \"uint8\",\n internalType: \"uint8\",\n },\n {\n name: \"minVpCommissionBps\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"tRefund\",\n type: \"uint32\",\n internalType: \"uint32\",\n },\n {\n name: \"tStale\",\n type: \"uint32\",\n internalType: \"uint32\",\n },\n {\n name: \"minPeginFeeRate\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"proverCircuitVersion\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"minPrepeginDepth\",\n type: \"uint32\",\n internalType: \"uint32\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"latestOffchainParamsVersion\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getUniversalChallengersByVersion\",\n inputs: [\n {\n name: \"versionNumber\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"tuple[]\",\n internalType: \"struct BTCVaultTypes.AddressBTCKeyPair[]\",\n components: [\n {\n name: \"ethAddress\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"btcPubKey\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getCurrentUniversalChallengers\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple[]\",\n internalType: \"struct BTCVaultTypes.AddressBTCKeyPair[]\",\n components: [\n {\n name: \"ethAddress\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"btcPubKey\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"latestUniversalChallengersVersion\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n ],\n stateMutability: \"view\",\n },\n // --- RFC-006 operation-key resolution ---------------------------------\n // Universal challengers get the reduced RFC-006 model: an operation key\n // that goes into the challenge scripts, resolved against the vault's frozen\n // `ucKeyEpoch`, but no payout script (a UC is never a claimer, so its only\n // BTC output is the NoPayout anchor) and no per-UC setter — key changes go\n // through a roster version bump. The roster entry's `ethAddress` is the\n // `ucAdmin` lookup key and its `btcPubKey` is the genesis key.\n {\n type: \"function\",\n name: \"getCurrentOperationBtcKey\",\n inputs: [{ name: \"ucAdmin\", type: \"address\", internalType: \"address\" }],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getOperationBtcKeyAtEpochOrGenesis\",\n inputs: [\n { name: \"ucAdmin\", type: \"address\", internalType: \"address\" },\n { name: \"epoch\", type: \"uint64\", internalType: \"uint64\" },\n { name: \"rosterGenesisKey\", type: \"bytes32\", internalType: \"bytes32\" },\n ],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n // Observation window between a vault's final ACK and its activation, in ETH\n // blocks, measured from `verifiedAt`. Read through this standalone getter\n // rather than as a 7th component of `getTBVProtocolParams` above: the field\n // was appended to the struct, so a 7-component tuple decodes only against\n // deployments that carry it and throws `PositionOutOfBoundsError` against\n // the 6-word return of those that don't. Deployments are currently split\n // (devnet has it, testnet/staging do not), and that tuple feeds\n // `getPegInConfiguration` -> `ProtocolParamsContext`, whose failure blanks\n // the app. `uint256` (not the `uint64` storage width) — the accessor widens.\n {\n type: \"function\",\n name: \"peginActivationDelay\",\n inputs: [],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"view\",\n },\n] as const;\n"],"names":["ApplicationRegistryABI","ProtocolParamsABI"],"mappings":"AASO,MAAMA,IAAyB;AAAA,EACpC;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,MACN;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,cAAc;AAAA,MAAA;AAAA,MAEhB;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,cAAc;AAAA,MAAA;AAAA,IAChB;AAAA,IAEF,SAAS;AAAA,MACP;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,cAAc;AAAA,QACd,YAAY;AAAA,UACV;AAAA,YACE,MAAM;AAAA,YACN,MAAM;AAAA,YACN,cAAc;AAAA,UAAA;AAAA,UAEhB;AAAA,YACE,MAAM;AAAA,YACN,MAAM;AAAA,YACN,cAAc;AAAA,UAAA;AAAA,QAChB;AAAA,MACF;AAAA,IACF;AAAA,IAEF,iBAAiB;AAAA,EAAA;AAAA,EAEnB;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,MACN;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,cAAc;AAAA,MAAA;AAAA,IAChB;AAAA,IAEF,SAAS;AAAA,MACP;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,cAAc;AAAA,QACd,YAAY;AAAA,UACV;AAAA,YACE,MAAM;AAAA,YACN,MAAM;AAAA,YACN,cAAc;AAAA,UAAA;AAAA,UAEhB;AAAA,YACE,MAAM;AAAA,YACN,MAAM;AAAA,YACN,cAAc;AAAA,UAAA;AAAA,QAChB;AAAA,MACF;AAAA,IACF;AAAA,IAEF,iBAAiB;AAAA,EAAA;AAAA,EAEnB;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,MACN;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,cAAc;AAAA,MAAA;AAAA,IAChB;AA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;AAAA,EAEnB;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,MACN,EAAE,MAAM,WAAW,MAAM,WAAW,cAAc,UAAA;AAAA,MAClD,EAAE,MAAM,SAAS,MAAM,UAAU,cAAc,SAAA;AAAA,MAC/C,EAAE,MAAM,oBAAoB,MAAM,WAAW,cAAc,UAAA;AAAA,IAAU;AAAA,IAEvE,SAAS,CAAC,EAAE,MAAM,IAAI,MAAM,WAAW,cAAc,WAAW;AAAA,IAChE,iBAAiB;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWnB;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ,CAAA;AAAA,IACR,SAAS,CAAC,EAAE,MAAM,IAAI,MAAM,WAAW,cAAc,WAAW;AAAA,IAChE,iBAAiB;AAAA,EAAA;AAErB;"}
@@ -1,2 +1,2 @@
1
- "use strict";const e=[{type:"function",name:"getVaultKeepersByVersion",inputs:[{name:"appEntryPoint",type:"address",internalType:"address"},{name:"versionNumber",type:"uint16",internalType:"uint16"}],outputs:[{name:"",type:"tuple[]",internalType:"struct BTCVaultTypes.AddressBTCKeyPair[]",components:[{name:"ethAddress",type:"address",internalType:"address"},{name:"btcPubKey",type:"bytes32",internalType:"bytes32"}]}],stateMutability:"view"},{type:"function",name:"getCurrentVaultKeepers",inputs:[{name:"appEntryPoint",type:"address",internalType:"address"}],outputs:[{name:"",type:"tuple[]",internalType:"struct BTCVaultTypes.AddressBTCKeyPair[]",components:[{name:"ethAddress",type:"address",internalType:"address"},{name:"btcPubKey",type:"bytes32",internalType:"bytes32"}]}],stateMutability:"view"},{type:"function",name:"getCurrentVaultKeepersVersion",inputs:[{name:"appEntryPoint",type:"address",internalType:"address"}],outputs:[{name:"",type:"uint16",internalType:"uint16"}],stateMutability:"view"},{type:"function",name:"getCurrentOperationBtcKey",inputs:[{name:"appEntryPoint",type:"address",internalType:"address"},{name:"keeperAdmin",type:"address",internalType:"address"}],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"getOperationBtcKeyAtEpochOrGenesis",inputs:[{name:"appEntryPoint",type:"address",internalType:"address"},{name:"keeperAdmin",type:"address",internalType:"address"},{name:"epoch",type:"uint64",internalType:"uint64"},{name:"rosterGenesisKey",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"getPayoutScriptAtEpoch",inputs:[{name:"appEntryPoint",type:"address",internalType:"address"},{name:"keeperAdmin",type:"address",internalType:"address"},{name:"epoch",type:"uint64",internalType:"uint64"}],outputs:[{name:"",type:"bytes",internalType:"bytes"}],stateMutability:"view"}],t=[{type:"function",name:"activeVaultCoreVersion",inputs:[],outputs:[{name:"",type:"uint16",internalType:"uint16"}],stateMutability:"view"},{type:"function",name:"getTBVProtocolParams",inputs:[],outputs:[{name:"",type:"tuple",internalType:"struct IProtocolParams.TBVProtocolParams",components:[{name:"minimumPegInAmount",type:"uint64",internalType:"uint64"},{name:"maxPegInAmount",type:"uint64",internalType:"uint64"},{name:"pegInAckTimeout",type:"uint64",internalType:"uint64"},{name:"pegInActivationTimeout",type:"uint64",internalType:"uint64"},{name:"maxHtlcOutputCount",type:"uint8",internalType:"uint8"},{name:"expiredPegInGraceBlocks",type:"uint64",internalType:"uint64"}]}],stateMutability:"view"},{type:"function",name:"getLatestOffchainParams",inputs:[],outputs:[{name:"",type:"tuple",internalType:"struct IProtocolParams.VersionedOffchainParams",components:[{name:"timelockAssert",type:"uint256",internalType:"uint256"},{name:"timelockChallengeAssert",type:"uint256",internalType:"uint256"},{name:"securityCouncilKeys",type:"bytes32[]",internalType:"bytes32[]"},{name:"councilQuorum",type:"uint8",internalType:"uint8"},{name:"feeRate",type:"uint64",internalType:"uint64"},{name:"babeTotalInstances",type:"uint16",internalType:"uint16"},{name:"babeInstancesToFinalize",type:"uint8",internalType:"uint8"},{name:"minVpCommissionBps",type:"uint16",internalType:"uint16"},{name:"tRefund",type:"uint32",internalType:"uint32"},{name:"tStale",type:"uint32",internalType:"uint32"},{name:"minPeginFeeRate",type:"uint64",internalType:"uint64"},{name:"proverCircuitVersion",type:"uint16",internalType:"uint16"},{name:"minPrepeginDepth",type:"uint32",internalType:"uint32"}]}],stateMutability:"view"},{type:"function",name:"getOffchainParamsByVersion",inputs:[{name:"versionNumber",type:"uint16",internalType:"uint16"}],outputs:[{name:"",type:"tuple",internalType:"struct IProtocolParams.VersionedOffchainParams",components:[{name:"timelockAssert",type:"uint256",internalType:"uint256"},{name:"timelockChallengeAssert",type:"uint256",internalType:"uint256"},{name:"securityCouncilKeys",type:"bytes32[]",internalType:"bytes32[]"},{name:"councilQuorum",type:"uint8",internalType:"uint8"},{name:"feeRate",type:"uint64",internalType:"uint64"},{name:"babeTotalInstances",type:"uint16",internalType:"uint16"},{name:"babeInstancesToFinalize",type:"uint8",internalType:"uint8"},{name:"minVpCommissionBps",type:"uint16",internalType:"uint16"},{name:"tRefund",type:"uint32",internalType:"uint32"},{name:"tStale",type:"uint32",internalType:"uint32"},{name:"minPeginFeeRate",type:"uint64",internalType:"uint64"},{name:"proverCircuitVersion",type:"uint16",internalType:"uint16"},{name:"minPrepeginDepth",type:"uint32",internalType:"uint32"}]}],stateMutability:"view"},{type:"function",name:"latestOffchainParamsVersion",inputs:[],outputs:[{name:"",type:"uint16",internalType:"uint16"}],stateMutability:"view"},{type:"function",name:"getUniversalChallengersByVersion",inputs:[{name:"versionNumber",type:"uint16",internalType:"uint16"}],outputs:[{name:"",type:"tuple[]",internalType:"struct BTCVaultTypes.AddressBTCKeyPair[]",components:[{name:"ethAddress",type:"address",internalType:"address"},{name:"btcPubKey",type:"bytes32",internalType:"bytes32"}]}],stateMutability:"view"},{type:"function",name:"getCurrentUniversalChallengers",inputs:[],outputs:[{name:"",type:"tuple[]",internalType:"struct BTCVaultTypes.AddressBTCKeyPair[]",components:[{name:"ethAddress",type:"address",internalType:"address"},{name:"btcPubKey",type:"bytes32",internalType:"bytes32"}]}],stateMutability:"view"},{type:"function",name:"latestUniversalChallengersVersion",inputs:[],outputs:[{name:"",type:"uint16",internalType:"uint16"}],stateMutability:"view"},{type:"function",name:"getCurrentOperationBtcKey",inputs:[{name:"ucAdmin",type:"address",internalType:"address"}],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"getOperationBtcKeyAtEpochOrGenesis",inputs:[{name:"ucAdmin",type:"address",internalType:"address"},{name:"epoch",type:"uint64",internalType:"uint64"},{name:"rosterGenesisKey",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"}];exports.ApplicationRegistryABI=e;exports.ProtocolParamsABI=t;
2
- //# sourceMappingURL=ProtocolParams.abi-C8U7BHCS.cjs.map
1
+ "use strict";const e=[{type:"function",name:"getVaultKeepersByVersion",inputs:[{name:"appEntryPoint",type:"address",internalType:"address"},{name:"versionNumber",type:"uint16",internalType:"uint16"}],outputs:[{name:"",type:"tuple[]",internalType:"struct BTCVaultTypes.AddressBTCKeyPair[]",components:[{name:"ethAddress",type:"address",internalType:"address"},{name:"btcPubKey",type:"bytes32",internalType:"bytes32"}]}],stateMutability:"view"},{type:"function",name:"getCurrentVaultKeepers",inputs:[{name:"appEntryPoint",type:"address",internalType:"address"}],outputs:[{name:"",type:"tuple[]",internalType:"struct BTCVaultTypes.AddressBTCKeyPair[]",components:[{name:"ethAddress",type:"address",internalType:"address"},{name:"btcPubKey",type:"bytes32",internalType:"bytes32"}]}],stateMutability:"view"},{type:"function",name:"getCurrentVaultKeepersVersion",inputs:[{name:"appEntryPoint",type:"address",internalType:"address"}],outputs:[{name:"",type:"uint16",internalType:"uint16"}],stateMutability:"view"},{type:"function",name:"getCurrentOperationBtcKey",inputs:[{name:"appEntryPoint",type:"address",internalType:"address"},{name:"keeperAdmin",type:"address",internalType:"address"}],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"getOperationBtcKeyAtEpochOrGenesis",inputs:[{name:"appEntryPoint",type:"address",internalType:"address"},{name:"keeperAdmin",type:"address",internalType:"address"},{name:"epoch",type:"uint64",internalType:"uint64"},{name:"rosterGenesisKey",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"getPayoutScriptAtEpoch",inputs:[{name:"appEntryPoint",type:"address",internalType:"address"},{name:"keeperAdmin",type:"address",internalType:"address"},{name:"epoch",type:"uint64",internalType:"uint64"}],outputs:[{name:"",type:"bytes",internalType:"bytes"}],stateMutability:"view"}],t=[{type:"function",name:"activeVaultCoreVersion",inputs:[],outputs:[{name:"",type:"uint16",internalType:"uint16"}],stateMutability:"view"},{type:"function",name:"getTBVProtocolParams",inputs:[],outputs:[{name:"",type:"tuple",internalType:"struct IProtocolParams.TBVProtocolParams",components:[{name:"minimumPegInAmount",type:"uint64",internalType:"uint64"},{name:"maxPegInAmount",type:"uint64",internalType:"uint64"},{name:"pegInAckTimeout",type:"uint64",internalType:"uint64"},{name:"pegInActivationTimeout",type:"uint64",internalType:"uint64"},{name:"maxHtlcOutputCount",type:"uint8",internalType:"uint8"},{name:"expiredPegInGraceBlocks",type:"uint64",internalType:"uint64"}]}],stateMutability:"view"},{type:"function",name:"getLatestOffchainParams",inputs:[],outputs:[{name:"",type:"tuple",internalType:"struct IProtocolParams.VersionedOffchainParams",components:[{name:"timelockAssert",type:"uint256",internalType:"uint256"},{name:"timelockChallengeAssert",type:"uint256",internalType:"uint256"},{name:"securityCouncilKeys",type:"bytes32[]",internalType:"bytes32[]"},{name:"councilQuorum",type:"uint8",internalType:"uint8"},{name:"feeRate",type:"uint64",internalType:"uint64"},{name:"babeTotalInstances",type:"uint16",internalType:"uint16"},{name:"babeInstancesToFinalize",type:"uint8",internalType:"uint8"},{name:"minVpCommissionBps",type:"uint16",internalType:"uint16"},{name:"tRefund",type:"uint32",internalType:"uint32"},{name:"tStale",type:"uint32",internalType:"uint32"},{name:"minPeginFeeRate",type:"uint64",internalType:"uint64"},{name:"proverCircuitVersion",type:"uint16",internalType:"uint16"},{name:"minPrepeginDepth",type:"uint32",internalType:"uint32"}]}],stateMutability:"view"},{type:"function",name:"getOffchainParamsByVersion",inputs:[{name:"versionNumber",type:"uint16",internalType:"uint16"}],outputs:[{name:"",type:"tuple",internalType:"struct IProtocolParams.VersionedOffchainParams",components:[{name:"timelockAssert",type:"uint256",internalType:"uint256"},{name:"timelockChallengeAssert",type:"uint256",internalType:"uint256"},{name:"securityCouncilKeys",type:"bytes32[]",internalType:"bytes32[]"},{name:"councilQuorum",type:"uint8",internalType:"uint8"},{name:"feeRate",type:"uint64",internalType:"uint64"},{name:"babeTotalInstances",type:"uint16",internalType:"uint16"},{name:"babeInstancesToFinalize",type:"uint8",internalType:"uint8"},{name:"minVpCommissionBps",type:"uint16",internalType:"uint16"},{name:"tRefund",type:"uint32",internalType:"uint32"},{name:"tStale",type:"uint32",internalType:"uint32"},{name:"minPeginFeeRate",type:"uint64",internalType:"uint64"},{name:"proverCircuitVersion",type:"uint16",internalType:"uint16"},{name:"minPrepeginDepth",type:"uint32",internalType:"uint32"}]}],stateMutability:"view"},{type:"function",name:"latestOffchainParamsVersion",inputs:[],outputs:[{name:"",type:"uint16",internalType:"uint16"}],stateMutability:"view"},{type:"function",name:"getUniversalChallengersByVersion",inputs:[{name:"versionNumber",type:"uint16",internalType:"uint16"}],outputs:[{name:"",type:"tuple[]",internalType:"struct BTCVaultTypes.AddressBTCKeyPair[]",components:[{name:"ethAddress",type:"address",internalType:"address"},{name:"btcPubKey",type:"bytes32",internalType:"bytes32"}]}],stateMutability:"view"},{type:"function",name:"getCurrentUniversalChallengers",inputs:[],outputs:[{name:"",type:"tuple[]",internalType:"struct BTCVaultTypes.AddressBTCKeyPair[]",components:[{name:"ethAddress",type:"address",internalType:"address"},{name:"btcPubKey",type:"bytes32",internalType:"bytes32"}]}],stateMutability:"view"},{type:"function",name:"latestUniversalChallengersVersion",inputs:[],outputs:[{name:"",type:"uint16",internalType:"uint16"}],stateMutability:"view"},{type:"function",name:"getCurrentOperationBtcKey",inputs:[{name:"ucAdmin",type:"address",internalType:"address"}],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"getOperationBtcKeyAtEpochOrGenesis",inputs:[{name:"ucAdmin",type:"address",internalType:"address"},{name:"epoch",type:"uint64",internalType:"uint64"},{name:"rosterGenesisKey",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"",type:"bytes32",internalType:"bytes32"}],stateMutability:"view"},{type:"function",name:"peginActivationDelay",inputs:[],outputs:[{name:"",type:"uint256",internalType:"uint256"}],stateMutability:"view"}];exports.ApplicationRegistryABI=e;exports.ProtocolParamsABI=t;
2
+ //# sourceMappingURL=ProtocolParams.abi-CYZoV2EI.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProtocolParams.abi-C8U7BHCS.cjs","sources":["../src/tbv/core/contracts/abis/ApplicationRegistry.abi.ts","../src/tbv/core/contracts/abis/ProtocolParams.abi.ts"],"sourcesContent":["/**\n * ApplicationRegistry Contract ABI\n *\n * Minimal ABI containing only the vault keeper read functions needed by the SDK.\n * Generated from vault-contracts-aave-v4 IApplicationRegistry.sol interface.\n *\n * @module contracts/abis/ApplicationRegistry\n */\n\nexport const ApplicationRegistryABI = [\n {\n type: \"function\",\n name: \"getVaultKeepersByVersion\",\n inputs: [\n {\n name: \"appEntryPoint\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"versionNumber\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"tuple[]\",\n internalType: \"struct BTCVaultTypes.AddressBTCKeyPair[]\",\n components: [\n {\n name: \"ethAddress\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"btcPubKey\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getCurrentVaultKeepers\",\n inputs: [\n {\n name: \"appEntryPoint\",\n type: \"address\",\n internalType: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"tuple[]\",\n internalType: \"struct BTCVaultTypes.AddressBTCKeyPair[]\",\n components: [\n {\n name: \"ethAddress\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"btcPubKey\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getCurrentVaultKeepersVersion\",\n inputs: [\n {\n name: \"appEntryPoint\",\n type: \"address\",\n internalType: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n ],\n stateMutability: \"view\",\n },\n // --- RFC-006 operation-key resolution ---------------------------------\n // A keeper's roster entry (`AddressBTCKeyPair` above) carries its *admin*\n // ETH address and its *genesis* BTC key. The key that actually goes into\n // the scripts is the operation key bonded at the vault's frozen\n // `appKeeperKeyEpoch`, which the admin address keys the lookup for.\n //\n // The `...OrGenesis` variant takes the roster key explicitly because the\n // correct genesis for a keeper is its key in the vault's *frozen membership\n // version* — a keeper may have been dropped from the current roster, or\n // listed under a different key in an older version. The plain\n // `getOperationBtcKeyAtEpoch` variant resolves genesis version-agnostically\n // and can therefore pick the wrong one; do not use it for a frozen vault.\n {\n type: \"function\",\n name: \"getCurrentOperationBtcKey\",\n inputs: [\n { name: \"appEntryPoint\", type: \"address\", internalType: \"address\" },\n { name: \"keeperAdmin\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getOperationBtcKeyAtEpochOrGenesis\",\n inputs: [\n { name: \"appEntryPoint\", type: \"address\", internalType: \"address\" },\n { name: \"keeperAdmin\", type: \"address\", internalType: \"address\" },\n { name: \"epoch\", type: \"uint64\", internalType: \"uint64\" },\n { name: \"rosterGenesisKey\", type: \"bytes32\", internalType: \"bytes32\" },\n ],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getPayoutScriptAtEpoch\",\n inputs: [\n { name: \"appEntryPoint\", type: \"address\", internalType: \"address\" },\n { name: \"keeperAdmin\", type: \"address\", internalType: \"address\" },\n { name: \"epoch\", type: \"uint64\", internalType: \"uint64\" },\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"view\",\n },\n] as const;\n","/**\n * ProtocolParams Contract ABI\n *\n * Minimal ABI containing only the read functions needed by the SDK.\n * Generated from vault-contracts-aave-v4 IProtocolParams.sol interface.\n *\n * @module contracts/abis/ProtocolParams\n */\n\nexport const ProtocolParamsABI = [\n {\n type: \"function\",\n name: \"activeVaultCoreVersion\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getTBVProtocolParams\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct IProtocolParams.TBVProtocolParams\",\n components: [\n {\n name: \"minimumPegInAmount\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"maxPegInAmount\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"pegInAckTimeout\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"pegInActivationTimeout\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"maxHtlcOutputCount\",\n type: \"uint8\",\n internalType: \"uint8\",\n },\n {\n name: \"expiredPegInGraceBlocks\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getLatestOffchainParams\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct IProtocolParams.VersionedOffchainParams\",\n components: [\n {\n name: \"timelockAssert\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n {\n name: \"timelockChallengeAssert\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n {\n name: \"securityCouncilKeys\",\n type: \"bytes32[]\",\n internalType: \"bytes32[]\",\n },\n {\n name: \"councilQuorum\",\n type: \"uint8\",\n internalType: \"uint8\",\n },\n {\n name: \"feeRate\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"babeTotalInstances\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"babeInstancesToFinalize\",\n type: \"uint8\",\n internalType: \"uint8\",\n },\n {\n name: \"minVpCommissionBps\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"tRefund\",\n type: \"uint32\",\n internalType: \"uint32\",\n },\n {\n name: \"tStale\",\n type: \"uint32\",\n internalType: \"uint32\",\n },\n {\n name: \"minPeginFeeRate\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"proverCircuitVersion\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"minPrepeginDepth\",\n type: \"uint32\",\n internalType: \"uint32\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getOffchainParamsByVersion\",\n inputs: [\n {\n name: \"versionNumber\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct IProtocolParams.VersionedOffchainParams\",\n components: [\n {\n name: \"timelockAssert\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n {\n name: \"timelockChallengeAssert\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n {\n name: \"securityCouncilKeys\",\n type: \"bytes32[]\",\n internalType: \"bytes32[]\",\n },\n {\n name: \"councilQuorum\",\n type: \"uint8\",\n internalType: \"uint8\",\n },\n {\n name: \"feeRate\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"babeTotalInstances\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"babeInstancesToFinalize\",\n type: \"uint8\",\n internalType: \"uint8\",\n },\n {\n name: \"minVpCommissionBps\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"tRefund\",\n type: \"uint32\",\n internalType: \"uint32\",\n },\n {\n name: \"tStale\",\n type: \"uint32\",\n internalType: \"uint32\",\n },\n {\n name: \"minPeginFeeRate\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"proverCircuitVersion\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"minPrepeginDepth\",\n type: \"uint32\",\n internalType: \"uint32\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"latestOffchainParamsVersion\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getUniversalChallengersByVersion\",\n inputs: [\n {\n name: \"versionNumber\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"tuple[]\",\n internalType: \"struct BTCVaultTypes.AddressBTCKeyPair[]\",\n components: [\n {\n name: \"ethAddress\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"btcPubKey\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getCurrentUniversalChallengers\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple[]\",\n internalType: \"struct BTCVaultTypes.AddressBTCKeyPair[]\",\n components: [\n {\n name: \"ethAddress\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"btcPubKey\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"latestUniversalChallengersVersion\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n ],\n stateMutability: \"view\",\n },\n // --- RFC-006 operation-key resolution ---------------------------------\n // Universal challengers get the reduced RFC-006 model: an operation key\n // that goes into the challenge scripts, resolved against the vault's frozen\n // `ucKeyEpoch`, but no payout script (a UC is never a claimer, so its only\n // BTC output is the NoPayout anchor) and no per-UC setter — key changes go\n // through a roster version bump. The roster entry's `ethAddress` is the\n // `ucAdmin` lookup key and its `btcPubKey` is the genesis key.\n {\n type: \"function\",\n name: \"getCurrentOperationBtcKey\",\n inputs: [{ name: \"ucAdmin\", type: \"address\", internalType: \"address\" }],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getOperationBtcKeyAtEpochOrGenesis\",\n inputs: [\n { name: \"ucAdmin\", type: \"address\", internalType: \"address\" },\n { name: \"epoch\", type: \"uint64\", internalType: \"uint64\" },\n { name: \"rosterGenesisKey\", type: \"bytes32\", internalType: \"bytes32\" },\n ],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n] as const;\n"],"names":["ApplicationRegistryABI","ProtocolParamsABI"],"mappings":"aASO,MAAMA,EAAyB,CACpC,CACE,KAAM,WACN,KAAM,2BACN,OAAQ,CACN,CACE,KAAM,gBACN,KAAM,UACN,aAAc,SAAA,EAEhB,CACE,KAAM,gBACN,KAAM,SACN,aAAc,QAAA,CAChB,EAEF,QAAS,CACP,CACE,KAAM,GACN,KAAM,UACN,aAAc,2CACd,WAAY,CACV,CACE,KAAM,aACN,KAAM,UACN,aAAc,SAAA,EAEhB,CACE,KAAM,YACN,KAAM,UACN,aAAc,SAAA,CAChB,CACF,CACF,EAEF,gBAAiB,MAAA,EAEnB,CACE,KAAM,WACN,KAAM,yBACN,OAAQ,CACN,CACE,KAA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AM,UACN,aAAc,SAAA,CAChB,CACF,CACF,EAEF,gBAAiB,MAAA,EAEnB,CACE,KAAM,WACN,KAAM,iCACN,OAAQ,CAAA,EACR,QAAS,CACP,CACE,KAAM,GACN,KAAM,UACN,aAAc,2CACd,WAAY,CACV,CACE,KAAM,aACN,KAAM,UACN,aAAc,SAAA,EAEhB,CACE,KAAM,YACN,KAAM,UACN,aAAc,SAAA,CAChB,CACF,CACF,EAEF,gBAAiB,MAAA,EAEnB,CACE,KAAM,WACN,KAAM,oCACN,OAAQ,CAAA,EACR,QAAS,CACP,CACE,KAAM,GACN,KAAM,SACN,aAAc,QAAA,CAChB,EAEF,gBAAiB,MAAA,EASnB,CACE,KAAM,WACN,KAAM,4BACN,OAAQ,CAAC,CAAE,KAAM,UAAW,KAAM,UAAW,aAAc,UAAW,EACtE,QAAS,CAAC,CAAE,KAAM,GAAI,KAAM,UAAW,aAAc,UAAW,EAChE,gBAAiB,MAAA,EAEnB,CACE,KAAM,WACN,KAAM,qCACN,OAAQ,CACN,CAAE,KAAM,UAAW,KAAM,UAAW,aAAc,SAAA,EAClD,CAAE,KAAM,QAAS,KAAM,SAAU,aAAc,QAAA,EAC/C,CAAE,KAAM,mBAAoB,KAAM,UAAW,aAAc,SAAA,CAAU,EAEvE,QAAS,CAAC,CAAE,KAAM,GAAI,KAAM,UAAW,aAAc,UAAW,EAChE,gBAAiB,MAAA,CAErB"}
1
+ {"version":3,"file":"ProtocolParams.abi-CYZoV2EI.cjs","sources":["../src/tbv/core/contracts/abis/ApplicationRegistry.abi.ts","../src/tbv/core/contracts/abis/ProtocolParams.abi.ts"],"sourcesContent":["/**\n * ApplicationRegistry Contract ABI\n *\n * Minimal ABI containing only the vault keeper read functions needed by the SDK.\n * Generated from vault-contracts-aave-v4 IApplicationRegistry.sol interface.\n *\n * @module contracts/abis/ApplicationRegistry\n */\n\nexport const ApplicationRegistryABI = [\n {\n type: \"function\",\n name: \"getVaultKeepersByVersion\",\n inputs: [\n {\n name: \"appEntryPoint\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"versionNumber\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"tuple[]\",\n internalType: \"struct BTCVaultTypes.AddressBTCKeyPair[]\",\n components: [\n {\n name: \"ethAddress\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"btcPubKey\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getCurrentVaultKeepers\",\n inputs: [\n {\n name: \"appEntryPoint\",\n type: \"address\",\n internalType: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"tuple[]\",\n internalType: \"struct BTCVaultTypes.AddressBTCKeyPair[]\",\n components: [\n {\n name: \"ethAddress\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"btcPubKey\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getCurrentVaultKeepersVersion\",\n inputs: [\n {\n name: \"appEntryPoint\",\n type: \"address\",\n internalType: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n ],\n stateMutability: \"view\",\n },\n // --- RFC-006 operation-key resolution ---------------------------------\n // A keeper's roster entry (`AddressBTCKeyPair` above) carries its *admin*\n // ETH address and its *genesis* BTC key. The key that actually goes into\n // the scripts is the operation key bonded at the vault's frozen\n // `appKeeperKeyEpoch`, which the admin address keys the lookup for.\n //\n // The `...OrGenesis` variant takes the roster key explicitly because the\n // correct genesis for a keeper is its key in the vault's *frozen membership\n // version* — a keeper may have been dropped from the current roster, or\n // listed under a different key in an older version. The plain\n // `getOperationBtcKeyAtEpoch` variant resolves genesis version-agnostically\n // and can therefore pick the wrong one; do not use it for a frozen vault.\n {\n type: \"function\",\n name: \"getCurrentOperationBtcKey\",\n inputs: [\n { name: \"appEntryPoint\", type: \"address\", internalType: \"address\" },\n { name: \"keeperAdmin\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getOperationBtcKeyAtEpochOrGenesis\",\n inputs: [\n { name: \"appEntryPoint\", type: \"address\", internalType: \"address\" },\n { name: \"keeperAdmin\", type: \"address\", internalType: \"address\" },\n { name: \"epoch\", type: \"uint64\", internalType: \"uint64\" },\n { name: \"rosterGenesisKey\", type: \"bytes32\", internalType: \"bytes32\" },\n ],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getPayoutScriptAtEpoch\",\n inputs: [\n { name: \"appEntryPoint\", type: \"address\", internalType: \"address\" },\n { name: \"keeperAdmin\", type: \"address\", internalType: \"address\" },\n { name: \"epoch\", type: \"uint64\", internalType: \"uint64\" },\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"view\",\n },\n] as const;\n","/**\n * ProtocolParams Contract ABI\n *\n * Minimal ABI containing only the read functions needed by the SDK.\n * Generated from vault-contracts-aave-v4 IProtocolParams.sol interface.\n *\n * @module contracts/abis/ProtocolParams\n */\n\nexport const ProtocolParamsABI = [\n {\n type: \"function\",\n name: \"activeVaultCoreVersion\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getTBVProtocolParams\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct IProtocolParams.TBVProtocolParams\",\n components: [\n {\n name: \"minimumPegInAmount\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"maxPegInAmount\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"pegInAckTimeout\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"pegInActivationTimeout\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"maxHtlcOutputCount\",\n type: \"uint8\",\n internalType: \"uint8\",\n },\n {\n name: \"expiredPegInGraceBlocks\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getLatestOffchainParams\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct IProtocolParams.VersionedOffchainParams\",\n components: [\n {\n name: \"timelockAssert\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n {\n name: \"timelockChallengeAssert\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n {\n name: \"securityCouncilKeys\",\n type: \"bytes32[]\",\n internalType: \"bytes32[]\",\n },\n {\n name: \"councilQuorum\",\n type: \"uint8\",\n internalType: \"uint8\",\n },\n {\n name: \"feeRate\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"babeTotalInstances\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"babeInstancesToFinalize\",\n type: \"uint8\",\n internalType: \"uint8\",\n },\n {\n name: \"minVpCommissionBps\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"tRefund\",\n type: \"uint32\",\n internalType: \"uint32\",\n },\n {\n name: \"tStale\",\n type: \"uint32\",\n internalType: \"uint32\",\n },\n {\n name: \"minPeginFeeRate\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"proverCircuitVersion\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"minPrepeginDepth\",\n type: \"uint32\",\n internalType: \"uint32\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getOffchainParamsByVersion\",\n inputs: [\n {\n name: \"versionNumber\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct IProtocolParams.VersionedOffchainParams\",\n components: [\n {\n name: \"timelockAssert\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n {\n name: \"timelockChallengeAssert\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n {\n name: \"securityCouncilKeys\",\n type: \"bytes32[]\",\n internalType: \"bytes32[]\",\n },\n {\n name: \"councilQuorum\",\n type: \"uint8\",\n internalType: \"uint8\",\n },\n {\n name: \"feeRate\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"babeTotalInstances\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"babeInstancesToFinalize\",\n type: \"uint8\",\n internalType: \"uint8\",\n },\n {\n name: \"minVpCommissionBps\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"tRefund\",\n type: \"uint32\",\n internalType: \"uint32\",\n },\n {\n name: \"tStale\",\n type: \"uint32\",\n internalType: \"uint32\",\n },\n {\n name: \"minPeginFeeRate\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"proverCircuitVersion\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"minPrepeginDepth\",\n type: \"uint32\",\n internalType: \"uint32\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"latestOffchainParamsVersion\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getUniversalChallengersByVersion\",\n inputs: [\n {\n name: \"versionNumber\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"tuple[]\",\n internalType: \"struct BTCVaultTypes.AddressBTCKeyPair[]\",\n components: [\n {\n name: \"ethAddress\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"btcPubKey\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getCurrentUniversalChallengers\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple[]\",\n internalType: \"struct BTCVaultTypes.AddressBTCKeyPair[]\",\n components: [\n {\n name: \"ethAddress\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"btcPubKey\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"latestUniversalChallengersVersion\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n ],\n stateMutability: \"view\",\n },\n // --- RFC-006 operation-key resolution ---------------------------------\n // Universal challengers get the reduced RFC-006 model: an operation key\n // that goes into the challenge scripts, resolved against the vault's frozen\n // `ucKeyEpoch`, but no payout script (a UC is never a claimer, so its only\n // BTC output is the NoPayout anchor) and no per-UC setter — key changes go\n // through a roster version bump. The roster entry's `ethAddress` is the\n // `ucAdmin` lookup key and its `btcPubKey` is the genesis key.\n {\n type: \"function\",\n name: \"getCurrentOperationBtcKey\",\n inputs: [{ name: \"ucAdmin\", type: \"address\", internalType: \"address\" }],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getOperationBtcKeyAtEpochOrGenesis\",\n inputs: [\n { name: \"ucAdmin\", type: \"address\", internalType: \"address\" },\n { name: \"epoch\", type: \"uint64\", internalType: \"uint64\" },\n { name: \"rosterGenesisKey\", type: \"bytes32\", internalType: \"bytes32\" },\n ],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n // Observation window between a vault's final ACK and its activation, in ETH\n // blocks, measured from `verifiedAt`. Read through this standalone getter\n // rather than as a 7th component of `getTBVProtocolParams` above: the field\n // was appended to the struct, so a 7-component tuple decodes only against\n // deployments that carry it and throws `PositionOutOfBoundsError` against\n // the 6-word return of those that don't. Deployments are currently split\n // (devnet has it, testnet/staging do not), and that tuple feeds\n // `getPegInConfiguration` -> `ProtocolParamsContext`, whose failure blanks\n // the app. `uint256` (not the `uint64` storage width) — the accessor widens.\n {\n type: \"function\",\n name: \"peginActivationDelay\",\n inputs: [],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"view\",\n },\n] as const;\n"],"names":["ApplicationRegistryABI","ProtocolParamsABI"],"mappings":"aASO,MAAMA,EAAyB,CACpC,CACE,KAAM,WACN,KAAM,2BACN,OAAQ,CACN,CACE,KAAM,gBACN,KAAM,UACN,aAAc,SAAA,EAEhB,CACE,KAAM,gBACN,KAAM,SACN,aAAc,QAAA,CAChB,EAEF,QAAS,CACP,CACE,KAAM,GACN,KAAM,UACN,aAAc,2CACd,WAAY,CACV,CACE,KAAM,aACN,KAAM,UACN,aAAc,SAAA,EAEhB,CACE,KAAM,YACN,KAAM,UACN,aAAc,SAAA,CAChB,CACF,CACF,EAEF,gBAAiB,MAAA,EAEnB,CACE,KAAM,WACN,KAAM,yBACN,OAAQ,CACN,CACE,KAAM,gBACN,KAAM,UACN,aAAc,SAAA,CAChB,EAEF,QAAS,CACP,CACE,KAAM,GACN,KAAM,UACN,aAAc,2CACd,WAAY,CACV,CACE,KAAM,aACN,KAAM,UACN,aAAc,SAAA,EAEhB,CACE,KAAM,YACN,KAAM,UACN,aAAc,SAAA,CAChB,CACF,CACF,EAEF,gBAAiB,MAAA,EAEnB,CACE,KAAM,WACN,KAAM,gCACN,OAAQ,CACN,CACE,KAAM,gBACN,KAAM,UACN,aAAc,SAAA,CAChB,EAEF,QAAS,CACP,CACE,KAAM,GACN,KAAM,SACN,aAAc,QAAA,CAChB,EAEF,gBAAiB,MAAA,EAcnB,CACE,KAAM,WACN,KAAM,4BACN,OAAQ,CACN,CAAE,KAAM,gBAAiB,KAAM,UAAW,aAAc,SAAA,EACxD,CAAE,KAAM,cAAe,KAAM,UAAW,aAA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E,KAAM,GAAI,KAAM,UAAW,aAAc,UAAW,EAChE,gBAAiB,MAAA,EAEnB,CACE,KAAM,WACN,KAAM,qCACN,OAAQ,CACN,CAAE,KAAM,UAAW,KAAM,UAAW,aAAc,SAAA,EAClD,CAAE,KAAM,QAAS,KAAM,SAAU,aAAc,QAAA,EAC/C,CAAE,KAAM,mBAAoB,KAAM,UAAW,aAAc,SAAA,CAAU,EAEvE,QAAS,CAAC,CAAE,KAAM,GAAI,KAAM,UAAW,aAAc,UAAW,EAChE,gBAAiB,MAAA,EAWnB,CACE,KAAM,WACN,KAAM,uBACN,OAAQ,CAAA,EACR,QAAS,CAAC,CAAE,KAAM,GAAI,KAAM,UAAW,aAAc,UAAW,EAChE,gBAAiB,MAAA,CAErB"}
@@ -0,0 +1,2 @@
1
+ "use strict";var Te=Object.defineProperty;var $e=(r,e,t)=>e in r?Te(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var m=(r,e,t)=>$e(r,typeof e!="symbol"?e+"":e,t);const O=require("./BTCVaultRegistry.abi-z7d_eP22.cjs"),f=require("./ProtocolParams.abi-CYZoV2EI.cjs"),I=require("./mempoolApi-CXfr-L6x.cjs"),_=require("./bitcoin-m84N5a8o.cjs"),X=require("./json-rpc-client-BiAmg_ho.cjs"),Q=require("./constants-DU5CGcqO.cjs"),k=require("./validation-CDbOaDj7.cjs"),Re=require("@bitcoin-js/tiny-secp256k1-asmjs"),N=require("bitcoinjs-lib"),V=require("buffer"),J=require("./sha2-DsrLC4NM.cjs");function Ie(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const j=Ie(Re);async function Ve(r,e){const[t,n]=await r.multicall({contracts:[{address:e,abi:O.BTCVaultRegistryABI,functionName:"protocolParams"},{address:e,abi:O.BTCVaultRegistryABI,functionName:"applicationRegistry"}],allowFailure:!1});return{protocolParams:t,applicationRegistry:n}}function ee(r,e,t){if(r!==e)throw new Error(`${t}: multicall returned ${r} results for ${e} calls, so the results are not roster-aligned; refusing to use them`)}function Be(r,e){return{vaultProvider:r[0],vaultKeepers:r.slice(1,1+e),universalChallengers:r.slice(1+e)}}class Oe{constructor(e,t){this.publicClient=e,this.contracts=t}async readAll(e,t,n,i){const s=await this.publicClient.multicall({contracts:e,allowFailure:!1});return ee(s.length,1+t+n,i),Be(s,t)}async getCurrentOperationKeys(e){const t=[{address:this.contracts.btcVaultRegistry,abi:O.BTCVaultRegistryABI,functionName:"getCurrentOperationBtcKey",args:[e.vaultProviderEthAddress]},...e.vaultKeepers.map(n=>({address:this.contracts.applicationRegistry,abi:f.ApplicationRegistryABI,functionName:"getCurrentOperationBtcKey",args:[e.applicationEntryPoint,n.ethAddress]})),...e.universalChallengers.map(n=>({address:this.contracts.protocolParams,abi:f.ProtocolParamsABI,functionName:"getCurrentOperationBtcKey",args:[n.ethAddress]}))];return this.readAll(t,e.vaultKeepers.length,e.universalChallengers.length,"getCurrentOperationKeys")}async getOperationKeysAtEpochs(e,t){const n=[{address:this.contracts.btcVaultRegistry,abi:O.BTCVaultRegistryABI,functionName:"getOperationBtcKeyAtEpoch",args:[e.vaultProviderEthAddress,t.vpKeyEpoch]},...e.vaultKeepers.map(i=>({address:this.contracts.applicationRegistry,abi:f.ApplicationRegistryABI,functionName:"getOperationBtcKeyAtEpochOrGenesis",args:[e.applicationEntryPoint,i.ethAddress,t.appKeeperKeyEpoch,i.btcPubKey]})),...e.universalChallengers.map(i=>({address:this.contracts.protocolParams,abi:f.ProtocolParamsABI,functionName:"getOperationBtcKeyAtEpochOrGenesis",args:[i.ethAddress,t.ucKeyEpoch,i.btcPubKey]}))];return this.readAll(n,e.vaultKeepers.length,e.universalChallengers.length,"getOperationKeysAtEpochs")}async getPayoutScriptsAtEpochs(e,t){const n=await this.publicClient.multicall({contracts:[{address:this.contracts.btcVaultRegistry,abi:O.BTCVaultRegistryABI,functionName:"getPayoutScriptAtEpoch",args:[e.vaultProviderEthAddress,t.vpKeyEpoch]},...e.vaultKeepers.map(i=>({address:this.contracts.applicationRegistry,abi:f.ApplicationRegistryABI,functionName:"getPayoutScriptAtEpoch",args:[e.applicationEntryPoint,i.ethAddress,t.appKeeperKeyEpoch]}))],allowFailure:!1});return ee(n.length,1+e.vaultKeepers.length,"getPayoutScriptsAtEpochs"),{vaultProvider:n[0],vaultKeepers:[...n.slice(1)]}}}const te=65535;function H(r){return{timelockAssert:r.timelockAssert,timelockChallengeAssert:r.timelockChallengeAssert,securityCouncilKeys:[...r.securityCouncilKeys],councilQuorum:r.councilQuorum,feeRate:r.feeRate,babeTotalInstances:r.babeTotalInstances,babeInstancesToFinalize:r.babeInstancesToFinalize,minVpCommissionBps:r.minVpCommissionBps,tRefund:r.tRefund,tStale:r.tStale,minPeginFeeRate:r.minPeginFeeRate,proverCircuitVersion:r.proverCircuitVersion,minPrepeginDepth:r.minPrepeginDepth}}function re(r){return{minimumPegInAmount:r.minimumPegInAmount,maxPegInAmount:r.maxPegInAmount,pegInAckTimeout:r.pegInAckTimeout,pegInActivationTimeout:r.pegInActivationTimeout,maxHtlcOutputCount:r.maxHtlcOutputCount,expiredPegInGraceBlocks:r.expiredPegInGraceBlocks}}function ne(r){if(r>BigInt(te))throw new Error(`timelockAssert value ${r} exceeds uint16 max (${te})`);return Number(r)}class Ne{constructor(e,t){this.publicClient=e,this.contractAddress=t}async getTBVProtocolParams(){const e=await this.publicClient.readContract({address:this.contractAddress,abi:f.ProtocolParamsABI,functionName:"getTBVProtocolParams"}),t=re(e);return I.validateTBVProtocolParams(t),t}async getLatestOffchainParams(){const e=await this.publicClient.readContract({address:this.contractAddress,abi:f.ProtocolParamsABI,functionName:"getLatestOffchainParams"}),t=H(e);return I.validateOffchainParams(t),t}async getOffchainParamsByVersion(e){const t=await this.publicClient.readContract({address:this.contractAddress,abi:f.ProtocolParamsABI,functionName:"getOffchainParamsByVersion",args:[e]}),n=H(t);return I.validateOffchainParams(n),n}async getLatestOffchainParamsVersion(){const e=await this.publicClient.readContract({address:this.contractAddress,abi:f.ProtocolParamsABI,functionName:"latestOffchainParamsVersion"}),t=Number(e);return I.assertValidOffchainParamsVersion(t),t}async getTimelockPeginByVersion(e){const t=await this.getOffchainParamsByVersion(e);return ne(t.timelockAssert)}async getPeginActivationDelay(){const e=await this.publicClient.readContract({address:this.contractAddress,abi:f.ProtocolParamsABI,functionName:"peginActivationDelay"});if(typeof e!="bigint")throw new Error(`Invalid peginActivationDelay from contract: must be a bigint, got ${typeof e}`);return e}async getPegInConfiguration(){const e=await this.publicClient.multicall({contracts:[{address:this.contractAddress,abi:f.ProtocolParamsABI,functionName:"getTBVProtocolParams"},{address:this.contractAddress,abi:f.ProtocolParamsABI,functionName:"getLatestOffchainParams"},{address:this.contractAddress,abi:f.ProtocolParamsABI,functionName:"latestOffchainParamsVersion"},{address:this.contractAddress,abi:f.ProtocolParamsABI,functionName:"activeVaultCoreVersion"}],allowFailure:!1}),t=re(e[0]),n=H(e[1]),i=Number(e[2]),s=Number(e[3]),a={minimumPegInAmount:t.minimumPegInAmount,maxPegInAmount:t.maxPegInAmount,pegInAckTimeout:t.pegInAckTimeout,pegInActivationTimeout:t.pegInActivationTimeout,maxHtlcOutputCount:t.maxHtlcOutputCount,expiredPegInGraceBlocks:t.expiredPegInGraceBlocks,timelockPegin:ne(n.timelockAssert),timelockRefund:n.tRefund,minVpCommissionBps:n.minVpCommissionBps,offchainParams:n,offchainParamsVersion:i,activeVaultCoreVersion:s};return I.validatePegInConfiguration(a),a}async fetchAllOffchainParams(e){const t=await this.getLatestOffchainParamsVersion();if(t===0)return{byVersion:new Map,latestVersion:0};const n=Array.from({length:t},(c,d)=>d+1),i=n.map(c=>({address:this.contractAddress,abi:f.ProtocolParamsABI,functionName:"getOffchainParamsByVersion",args:[c]})),s=await this.publicClient.multicall({contracts:i,allowFailure:!1}),a=new Map;for(let c=0;c<n.length;c++){const d=H(s[c]);try{I.validateOffchainParams(d),a.set(n[c],d)}catch(l){e==null||e(n[c],l instanceof Error?l:new Error(String(l)))}}return{byVersion:a,latestVersion:t}}}function G(r){return r.map(e=>({ethAddress:e.ethAddress,btcPubKey:e.btcPubKey}))}class He{constructor(e,t){this.publicClient=e,this.contractAddress=t}async getVaultKeepersByVersion(e,t){const n=await this.publicClient.readContract({address:this.contractAddress,abi:f.ApplicationRegistryABI,functionName:"getVaultKeepersByVersion",args:[e,t]});return G(n)}async getCurrentVaultKeepers(e){const t=await this.publicClient.readContract({address:this.contractAddress,abi:f.ApplicationRegistryABI,functionName:"getCurrentVaultKeepers",args:[e]});return G(t)}async getCurrentVaultKeepersVersion(e){return await this.publicClient.readContract({address:this.contractAddress,abi:f.ApplicationRegistryABI,functionName:"getCurrentVaultKeepersVersion",args:[e]})}}class Le{constructor(e,t){this.publicClient=e,this.contractAddress=t}async getUniversalChallengersByVersion(e){const t=await this.publicClient.readContract({address:this.contractAddress,abi:f.ProtocolParamsABI,functionName:"getUniversalChallengersByVersion",args:[e]});return G(t)}async getCurrentUniversalChallengers(){const e=await this.publicClient.readContract({address:this.contractAddress,abi:f.ProtocolParamsABI,functionName:"getCurrentUniversalChallengers"});return G(e)}async getLatestUniversalChallengersVersion(){return await this.publicClient.readContract({address:this.contractAddress,abi:f.ProtocolParamsABI,functionName:"latestUniversalChallengersVersion"})}}var ge=(r=>(r[r.PENDING=0]="PENDING",r[r.VERIFIED=1]="VERIFIED",r[r.ACTIVE=2]="ACTIVE",r[r.REDEEMED=3]="REDEEMED",r[r.EXPIRED=4]="EXPIRED",r))(ge||{});const se=new Set(Object.values(X.DaemonStatus)),De=200;function h(r){var e;return((e=JSON.stringify(r))==null?void 0:e.slice(0,De))??"undefined"}const Ge="The vault provider returned an unexpected response. Please try again or contact support.";class o extends Error{constructor(t){super(Ge);m(this,"detail");this.name="VpResponseValidationError",this.detail=t}}const B=64;function $(r){return typeof r=="string"&&r.length>0&&k.HEX_RE.test(r)}function fe(r){return typeof r=="string"&&r.length>0}function _e(r,e){if(!$(r))throw new o(`VP response validation failed: "${e}" must be a non-empty hex string, got ${h(r)}`)}function P(r,e){if(!fe(r))throw new o(`VP response validation failed: "${e}" must be a non-empty string, got ${h(r)}`)}function z(r,e){if(!$(r)||r.length!==_.X_ONLY_PUBKEY_HEX_LEN&&r.length!==_.COMPRESSED_PUBKEY_HEX_LEN)throw new o(`VP response validation failed: "${e}" must be a ${_.X_ONLY_PUBKEY_HEX_LEN} or ${_.COMPRESSED_PUBKEY_HEX_LEN}-char hex string (BTC pubkey), got ${h(r)}`)}function Me(r){const e=r.presigning;if(e==null)return;if(typeof e!="object"||Array.isArray(e))throw new o('VP response validation failed: "progress.presigning" must be an object if present');const t=e;if(t.depositor_graph_created!==void 0&&typeof t.depositor_graph_created!="boolean")throw new o(`VP response validation failed: "progress.presigning.depositor_graph_created" must be a boolean if present, got ${h(t.depositor_graph_created)}`);if(t.vk_challenger_presigning_completed!==void 0&&typeof t.vk_challenger_presigning_completed!="number")throw new o(`VP response validation failed: "progress.presigning.vk_challenger_presigning_completed" must be a number if present, got ${h(t.vk_challenger_presigning_completed)}`);if(t.vk_challenger_presigning_total!==void 0&&typeof t.vk_challenger_presigning_total!="number")throw new o(`VP response validation failed: "progress.presigning.vk_challenger_presigning_total" must be a number if present, got ${h(t.vk_challenger_presigning_total)}`)}function me(r){if(r===null||typeof r!="object")throw new o("VP response validation failed: getPeginStatus response is not an object");const e=r;if(!$(e.pegin_txid)||e.pegin_txid.length!==B)throw new o(`VP response validation failed: "pegin_txid" must be a ${B}-char hex string (txid), got ${h(e.pegin_txid)}`);if(typeof e.status!="string")throw new o('VP response validation failed: "status" must be a string');if(!se.has(e.status))throw new o(`VP response validation failed: unrecognized status "${e.status}". Expected one of: ${[...se].join(", ")}`);if(e.progress===null||typeof e.progress!="object"||Array.isArray(e.progress))throw new o('VP response validation failed: "progress" must be an object');if(Me(e.progress),typeof e.health_info!="string")throw new o('VP response validation failed: "health_info" must be a string');if(e.last_error!==void 0&&typeof e.last_error!="string")throw new o(`VP response validation failed: "last_error" must be a string if present, got ${h(e.last_error)}`)}function Xe(r){if(r===null||typeof r!="object")throw new o("VP response validation failed: requestDepositorPresignTransactions response is not an object");const e=r;if(!Array.isArray(e.txs))throw new o('VP response validation failed: "txs" must be an array');for(let t=0;t<e.txs.length;t++)je(e.txs[t],`txs[${t}]`);if(e.depositor_graph===null||typeof e.depositor_graph!="object")throw new o('VP response validation failed: "depositor_graph" must be an object');ze(e.depositor_graph)}function E(r,e){if(r===null||typeof r!="object")throw new o(`VP response validation failed: "${e}" must be an object`);_e(r.tx_hex,`${e}.tx_hex`)}function je(r,e){if(r===null||typeof r!="object")throw new o(`VP response validation failed: "${e}" must be an object`);const t=r;z(t.claimer_pubkey,`${e}.claimer_pubkey`),E(t.claim_tx,`${e}.claim_tx`),E(t.assert_tx,`${e}.assert_tx`),E(t.payout_tx,`${e}.payout_tx`),P(t.payout_psbt,`${e}.payout_psbt`)}function Ke(r,e){if(r===null||typeof r!="object")throw new o(`VP response validation failed: "${e}" must be an object`);const t=r;P(t.wots_pks_json,`${e}.wots_pks_json`),P(t.gc_wots_keys_json,`${e}.gc_wots_keys_json`)}function Ue(r,e){if(r===null||typeof r!="object")throw new o(`VP response validation failed: "${e}" must be an object`);const t=r;if(z(t.challenger_pubkey,`${e}.challenger_pubkey`),E(t.challenge_assert_x_tx,`${e}.challenge_assert_x_tx`),E(t.challenge_assert_y_tx,`${e}.challenge_assert_y_tx`),E(t.nopayout_tx,`${e}.nopayout_tx`),P(t.nopayout_psbt,`${e}.nopayout_psbt`),!Array.isArray(t.challenge_assert_connectors))throw new o(`VP response validation failed: "${e}.challenge_assert_connectors" must be an array`);if(t.challenge_assert_connectors.length!==Q.CHALLENGE_ASSERT_CONNECTORS_PER_CHALLENGER)throw new o(`VP response validation failed: "${e}.challenge_assert_connectors" must have exactly ${Q.CHALLENGE_ASSERT_CONNECTORS_PER_CHALLENGER} entries, got ${t.challenge_assert_connectors.length}`);for(let n=0;n<t.challenge_assert_connectors.length;n++)Ke(t.challenge_assert_connectors[n],`${e}.challenge_assert_connectors[${n}]`);if(!Array.isArray(t.output_label_hashes))throw new o(`VP response validation failed: "${e}.output_label_hashes" must be an array`);for(let n=0;n<t.output_label_hashes.length;n++)_e(t.output_label_hashes[n],`${e}.output_label_hashes[${n}]`)}function ye(r){if(r===null||typeof r!="object")throw new o("VP response validation failed: requestDepositorClaimerArtifacts response is not an object");const e=r;if(!fe(e.tx_graph_json))throw new o(`VP response validation failed: "tx_graph_json" must be a non-empty string, got ${h(e.tx_graph_json)}`);if(!$(e.verifying_key_hex))throw new o(`VP response validation failed: "verifying_key_hex" must be a non-empty hex string, got ${h(e.verifying_key_hex)}`);if(e.babe_sessions===null||typeof e.babe_sessions!="object"||Array.isArray(e.babe_sessions))throw new o('VP response validation failed: "babe_sessions" must be an object');const t=Object.entries(e.babe_sessions);if(t.length===0)throw new o('VP response validation failed: "babe_sessions" must contain at least one challenger entry');for(const[n,i]of t){if(z(n,`babe_sessions["${n}"]`),i===null||typeof i!="object")throw new o(`VP response validation failed: "babe_sessions.${n}" must be an object`);const s=i;if(!$(s.decryptor_artifacts_hex))throw new o(`VP response validation failed: "babe_sessions.${n}.decryptor_artifacts_hex" must be a non-empty hex string, got ${h(s.decryptor_artifacts_hex)}`)}}function Fe(r){if(r===null||typeof r!="object")throw new o("VP response validation failed: pegout status payload is not an object");const e=r;if(!$(e.pegin_txid)||e.pegin_txid.length!==B)throw new o(`VP response validation failed: "pegin_txid" must be a ${B}-char hex string (txid), got ${h(e.pegin_txid)}`);if(typeof e.found!="boolean")throw new o(`VP response validation failed: "found" must be a boolean, got ${h(e.found)}`);if(e.claimer!==null){if(typeof e.claimer!="object")throw new o(`VP response validation failed: "claimer" must be an object or null, got ${h(e.claimer)}`);Je(e.claimer)}if(!Array.isArray(e.challengers))throw new o(`VP response validation failed: "challengers" must be an array, got ${h(e.challengers)}`);for(let t=0;t<e.challengers.length;t++)Ye(e.challengers[t],t)}function Je(r){if(P(r.status,"claimer.status"),typeof r.failed!="boolean")throw new o(`VP response validation failed: "claimer.failed" must be a boolean, got ${h(r.failed)}`);if(P(r.claim_txid,"claimer.claim_txid"),P(r.claimer_pubkey,"claimer.claimer_pubkey"),P(r.assert_txid,"claimer.assert_txid"),typeof r.created_at!="number")throw new o(`VP response validation failed: "claimer.created_at" must be a number, got ${h(r.created_at)}`);if(typeof r.updated_at!="number")throw new o(`VP response validation failed: "claimer.updated_at" must be a number, got ${h(r.updated_at)}`)}function Ye(r,e){if(r===null||typeof r!="object")throw new o(`VP response validation failed: "challengers[${e}]" must be an object, got ${h(r)}`);const t=r;if(P(t.status,`challengers[${e}].status`),P(t.claim_txid,`challengers[${e}].claim_txid`),P(t.claimer_pubkey,`challengers[${e}].claimer_pubkey`),L(t.assert_txid,`challengers[${e}].assert_txid`),L(t.challenge_assert_x_txid,`challengers[${e}].challenge_assert_x_txid`),L(t.challenge_assert_y_txid,`challengers[${e}].challenge_assert_y_txid`),L(t.nopayout_txid,`challengers[${e}].nopayout_txid`),typeof t.created_at!="number")throw new o(`VP response validation failed: "challengers[${e}].created_at" must be a number, got ${h(t.created_at)}`);if(typeof t.updated_at!="number")throw new o(`VP response validation failed: "challengers[${e}].updated_at" must be a number, got ${h(t.updated_at)}`)}function L(r,e){if(r!==null&&typeof r!="string")throw new o(`VP response validation failed: "${e}" must be a string or null, got ${h(r)}`)}function qe(r){be(r,"batchGetPeginStatus",e=>{e.result!==null&&me(e.result)})}function We(r){be(r,"batchGetPegoutStatus",e=>{e.result!==null&&Fe(e.result)})}function be(r,e,t){if(r===null||typeof r!="object")throw new o(`VP response validation failed: ${e} response is not an object`);const n=r;if(!Array.isArray(n.results))throw new o(`VP response validation failed: "${e}.results" must be an array, got ${h(n.results)}`);for(let i=0;i<n.results.length;i++){const s=n.results[i];if(s===null||typeof s!="object")throw new o(`VP response validation failed: "${e}.results[${i}]" must be an object, got ${h(s)}`);const a=s;if(!$(a.pegin_txid)||a.pegin_txid.length!==B)throw new o(`VP response validation failed: "${e}.results[${i}].pegin_txid" must be a ${B}-char hex string, got ${h(a.pegin_txid)}`);if(a.error!==null&&typeof a.error!="string")throw new o(`VP response validation failed: "${e}.results[${i}].error" must be a string or null, got ${h(a.error)}`);if(a.result===null&&a.error===null)throw new o(`VP response validation failed: "${e}.results[${i}]" has neither "result" nor "error" populated`);if(a.result!==null&&a.error!==null)throw new o(`VP response validation failed: "${e}.results[${i}]" has both "result" and "error" populated`);t(a,i)}}function ze(r){if(E(r.claim_tx,"depositor_graph.claim_tx"),E(r.assert_tx,"depositor_graph.assert_tx"),E(r.payout_tx,"depositor_graph.payout_tx"),P(r.payout_psbt,"depositor_graph.payout_psbt"),!Array.isArray(r.challenger_presign_data))throw new o('VP response validation failed: "depositor_graph.challenger_presign_data" must be an array');for(let e=0;e<r.challenger_presign_data.length;e++)Ue(r.challenger_presign_data[e],`depositor_graph.challenger_presign_data[${e}]`);if(typeof r.offchain_params_version!="number")throw new o('VP response validation failed: "depositor_graph.offchain_params_version" must be a number')}const Ze=6e4;class we{constructor(e,t){m(this,"client");const n={baseUrl:e,timeout:(t==null?void 0:t.timeout)??Ze,retries:t==null?void 0:t.retries,retryDelay:t==null?void 0:t.retryDelay,retryableFor:t==null?void 0:t.retryableFor,headers:t==null?void 0:t.headers,tokenProvider:t==null?void 0:t.tokenProvider,maxResponseBytes:t==null?void 0:t.maxResponseBytes};this.client=new X.JsonRpcClient(n)}async requestDepositorPresignTransactions(e,t){const n=await this.client.call("vaultProvider_requestDepositorPresignTransactions",e,t);return Xe(n),n}async submitDepositorPresignatures(e,t){return this.client.call("vaultProvider_submitDepositorPresignatures",e,t)}async submitDepositorWotsKey(e,t){return this.client.call("vaultProvider_submitDepositorWotsKey",e,t)}async requestDepositorClaimerArtifacts(e,t){const n=await this.client.call("vaultProvider_requestDepositorClaimerArtifacts",e,t);return ye(n),n}async getPeginStatus(e,t){const n=await this.client.call("vaultProvider_getPeginStatus",e,t);return me(n),n}async batchGetPeginStatus(e,t){const n=await this.client.call("vaultProvider_batchGetPeginStatus",e,t);return qe(n),n}async batchGetPegoutStatus(e,t){const n=await this.client.call("vaultProvider_batchGetPegoutStatus",e,t);return We(n),n}}const Qe="BIP0322-signed-message",et="TapTweak",Pe=32,tt=64;function Ae(r,e){const t=new TextEncoder().encode(r),n=J.sha256(t),i=new Uint8Array(n.length*2+e.length);return i.set(n,0),i.set(n,n.length),i.set(e,n.length*2),J.sha256(i)}function rt(r){if(r.length!==Pe)return null;const e=Ae(et,r),t=j.xOnlyPointAddTweak(r,e);return t?t.xOnlyPubkey:null}function nt(r,e,t){if(e.length!==Pe||t.length!==tt)return!1;try{const n=Ae(Qe,r),i=N.payments.p2tr({internalPubkey:V.Buffer.from(e)});if(!i.output)return!1;const s=i.output,a=0,c=new N.Transaction;c.version=0,c.locktime=0;const d=V.Buffer.concat([V.Buffer.from([0,32]),V.Buffer.from(n)]);c.addInput(V.Buffer.alloc(32,0),4294967295,0,d),c.addOutput(s,a);const l=new N.Transaction;l.version=0,l.locktime=0;const g=c.getHash();l.addInput(g,0,0),l.addOutput(V.Buffer.from([106]),a);const b=l.hashForWitnessV1(0,[s],[a],N.Transaction.SIGHASH_DEFAULT),A=rt(e);return A?j.verifySchnorr(b,A,t):!1}catch{return!1}}function M(r,e){const t=(r&7)<<5,n=typeof e=="bigint"?e:BigInt(e);if(n<0n)throw new Error("cborHead: negative argument");if(n<24n)return new Uint8Array([t|Number(n)]);if(n<0x100n)return new Uint8Array([t|24,Number(n)]);if(n<0x10000n){const s=Number(n);return new Uint8Array([t|25,s>>>8&255,s&255])}if(n<0x100000000n){const s=Number(n);return new Uint8Array([t|26,s>>>24&255,s>>>16&255,s>>>8&255,s&255])}const i=new Uint8Array(9);i[0]=t|27;for(let s=7;s>=0;s--)i[1+s]=Number(n>>BigInt((7-s)*8))&255;return i}function xe(...r){const e=r.reduce((i,s)=>i+s.length,0),t=new Uint8Array(e);let n=0;for(const i of r)t.set(i,n),n+=i.length;return t}function ie(r){const t=[M(4,r.length)];for(const n of r)t.push(M(0,n));return xe(...t)}function st(r,e,t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`encodeServerIdentityPayload: expires_at must be a non-negative safe integer, got ${t}`);const n=M(4,3),i=ie(r),s=ie(e),a=M(0,t);return xe(n,i,s,a)}const it=new TextEncoder().encode("btc-auth.server-identity.v1"),at=2*3600;class w extends Error{constructor(e,t){super(e),this.reason=t,this.name="ServerIdentityError"}}function D(r){const e=new Uint8Array(r.length/2);for(let t=0;t<e.length;t++)e[t]=parseInt(r.slice(t*2,t*2+2),16);return e}function ve(r){const{proof:e,pinnedServerPubkey:t,now:n}=r,i=r.maxLifetimeSecs??at,s=_.stripHexPrefix(t).toLowerCase();if(s.length!==_.X_ONLY_PUBKEY_HEX_LEN||!k.HEX_RE.test(s))throw new w(`pinnedServerPubkey must be 32-byte hex; got ${s.length} chars`,"invalid_pubkey_encoding");const a=_.stripHexPrefix(e.server_pubkey).toLowerCase();if(a.length!==_.X_ONLY_PUBKEY_HEX_LEN||!k.HEX_RE.test(a))throw new w(`server_pubkey must be 32-byte hex; got ${a.length} chars`,"invalid_pubkey_encoding");if(a!==s)throw new w(`server_pubkey does not match pinned value: expected ${s}, got ${a}`,"pinned_pubkey_mismatch");if(!Number.isSafeInteger(e.expires_at))throw new w(`expires_at must be a finite integer; got ${JSON.stringify(e.expires_at)}`,"invalid_expires_at");if(!Number.isSafeInteger(n))throw new w(`now must be a finite integer; got ${JSON.stringify(n)}`,"invalid_expires_at");if(e.expires_at<=n)throw new w(`server identity proof expired at ${e.expires_at}, now ${n}`,"expired");if(!Number.isSafeInteger(i)||i<=0)throw new w(`maxLifetimeSecs must be a positive safe integer; got ${JSON.stringify(i)}`,"invalid_max_lifetime");if(e.expires_at-n>i)throw new w(`server identity proof expires too far in the future: expires_at=${e.expires_at}, now=${n}, max lifetime=${i}s`,"expires_too_far");const c=_.stripHexPrefix(e.ephemeral_pubkey).toLowerCase();if(c.length!==_.COMPRESSED_PUBKEY_HEX_LEN||!k.HEX_RE.test(c))throw new w(`ephemeral_pubkey must be 33-byte compressed hex; got ${c.length} chars`,"invalid_ephemeral_pubkey");const d=c.slice(0,2);if(d!=="02"&&d!=="03")throw new w(`ephemeral_pubkey must be compressed (prefix 02/03); got ${d}`,"invalid_ephemeral_pubkey");const l=D(c);if(!j.isPoint(l))throw new w("ephemeral_pubkey is not a valid secp256k1 point","invalid_ephemeral_pubkey");const g=_.stripHexPrefix(e.signature).toLowerCase();if(g.length!==_.SCHNORR_SIG_HEX_LEN||!k.HEX_RE.test(g))throw new w(`signature must be 64-byte Schnorr hex; got ${g.length} chars`,"invalid_signature_encoding");const b=st(it,D(c),e.expires_at);if(!nt(b,D(a),D(g)))throw new w("BIP-322 signature verification failed — ephemeral key is not attested by pinned server pubkey","signature_verification_failed")}const ot=new Set(["vaultProvider_submitDepositorWotsKey","vaultProvider_submitDepositorPresignatures","vaultProvider_requestDepositorPresignTransactions"]),ct=new Set(["vaultProvider_requestDepositorClaimerArtifacts"]),lt=6e4,Y="auth_createDepositorToken",q="auth_createDepositorTokenGrpc";function Ee(r,e){return new X.JsonRpcClient({baseUrl:r,timeout:lt,headers:e,retryableFor:t=>t===Y||t===q})}const ut=0,dt=1,K=2,pt=3,ht=4,gt=5,ft=6,_t=7,ae=24,mt=28,yt=20,bt=21,wt=22,oe=256;class v extends Error{constructor(e){super(`CBOR decode: ${e}`),this.name="CborDecodeError"}}class Ce{constructor(e){m(this,"buf");m(this,"pos",0);this.buf=e}nextByte(){if(this.pos>=this.buf.length)throw new v("unexpected end of input");return this.buf[this.pos++]}readHead(){const e=this.nextByte(),t=e>>5,n=e&31;if(n<ae)return{major:t,arg:n};if(n>=mt)throw new v(`unsupported additional info ${n} (indefinite-length or reserved)`);const i=1<<n-ae;let s=0n;for(let a=0;a<i;a++)s=s<<8n|BigInt(this.nextByte());if(s>BigInt(Number.MAX_SAFE_INTEGER))throw new v(`argument ${s} exceeds safe integer range`);return{major:t,arg:Number(s)}}readBytes(e){if(this.pos+e>this.buf.length)throw new v("length overruns end of input");const t=this.buf.subarray(this.pos,this.pos+e);return this.pos+=e,t}readByteString(){const e=this.readHead();if(e.major!==K)throw new v(`expected byte string (major ${K}), got major ${e.major}`);return this.readBytes(e.arg)}readValue(e=0){if(e>oe)throw new v(`nesting exceeds maximum depth ${oe}`);const t=this.readHead();switch(t.major){case ut:return t.arg;case dt:return-1-t.arg;case K:return this.readBytes(t.arg);case pt:return new TextDecoder("utf-8",{fatal:!0}).decode(this.readBytes(t.arg));case ht:{const n=[];for(let i=0;i<t.arg;i++)n.push(this.readValue(e+1));return n}case gt:{const n=new Map;for(let i=0;i<t.arg;i++){const s=this.readValue(e+1),a=this.readValue(e+1);n.set(s,a)}return n}case ft:return{tag:t.arg,value:this.readValue(e+1)};case _t:if(t.arg===yt)return!1;if(t.arg===bt)return!0;if(t.arg===wt)return null;throw new v(`unsupported simple/float value ${t.arg}`);default:throw new v(`unsupported major type ${t.major}`)}}}function Se(r){const e=new Ce(r),t=e.readValue();if(e.pos!==r.length)throw new v("trailing bytes after top-level item");return t}const Pt="vaultd-jsonrpc",At="vaultd-grpc",ce=18,W=4,le=-47,xt=1,ue=64,vt=128,Et=96,Ct=64,St=1,kt=2,Tt=3,$t=4,Rt=5,It=6,Vt=7,de=new TextEncoder().encode("Signature1");class p extends Error{constructor(e,t){super(e),this.reason=t,this.name="CwtVerificationError"}}function Bt(r){const e=pe(r.expectedIssuerXOnlyPubkey,"expectedIssuerXOnlyPubkey"),t=pe(r.expectedAudienceXOnlyPubkey,"expectedAudienceXOnlyPubkey"),n=Dt(r.ephemeralPubkeyHex),i=Mt(r.token),s=new Ce(i),a=s.readHead();if(a.major!==6||a.arg!==ce)throw new p(`token is not a COSE Sign1 tagged value (tag ${ce})`,"invalid_token_structure");const c=s.readHead();if(c.major!==4||c.arg!==W)throw new p(`COSE Sign1 must be a ${W}-element array`,"invalid_token_structure");const d=s.pos,l=s.readByteString(),g=i.subarray(d,s.pos);s.readValue();const b=s.pos,A=s.readByteString(),C=i.subarray(b,s.pos),T=s.readByteString();if(T.length!==ue)throw new p(`COSE signature must be ${ue} bytes, got ${T.length}`,"invalid_token_structure");if(s.pos!==i.length)throw new p("COSE Sign1 token has trailing bytes after the signature","invalid_token_structure");const x=Ot(l);if(x!==le)throw new p(`unexpected COSE algorithm ${x} (expected ES256K ${le})`,"unexpected_algorithm");const R=Nt(g,C),y=J.sha256(R);if(!j.verify(y,n,T,!0))throw new p("COSE signature does not verify against the server's ephemeral key","signature_verification_failed");const u=Ht(A),S=u.audience.toLowerCase();if(S.length!==_.X_ONLY_PUBKEY_HEX_LEN||!k.HEX_RE.test(S))throw new p("token `aud` is not a 32-byte x-only pubkey hex","invalid_claims");if(u.issuedAt>u.expiresAt)throw new p(`token iat (${u.issuedAt}) is after exp (${u.expiresAt})`,"invalid_claims");if(u.issuer.toLowerCase()!==e)throw new p(`token issuer does not match pinned server pubkey: expected ${e}, got ${u.issuer.toLowerCase()}`,"issuer_mismatch");if(u.subject!==r.expectedSubject)throw new p(`token subject mismatch: expected ${r.expectedSubject}, got ${u.subject}`,"subject_mismatch");if(S!==t)throw new p(`token audience does not match depositor pubkey: expected ${t}, got ${S}`,"audience_mismatch");if(u.expiresAt<=r.now)throw new p(`token expired: exp ${u.expiresAt} <= now ${r.now}`,"token_expired");if(r.responseExpiresAt!==u.expiresAt)throw new p(`response expires_at (${r.responseExpiresAt}) does not equal token exp (${u.expiresAt})`,"expiry_mismatch");if(r.serverIdentityExpiresAt<u.expiresAt)throw new p(`server identity expires (${r.serverIdentityExpiresAt}) before token exp (${u.expiresAt})`,"server_identity_expires_before_token");return{issuer:u.issuer,subject:u.subject,audience:S,expiresAt:u.expiresAt,notBefore:u.notBefore,issuedAt:u.issuedAt}}function Ot(r){if(r.length===0)throw new p("empty COSE protected header (no algorithm)","unexpected_algorithm");const e=Se(r);if(!(e instanceof Map))throw new p("COSE protected header is not a map","invalid_token_structure");const t=e.get(xt);if(typeof t!="number")throw new p("COSE protected header missing integer algorithm label","unexpected_algorithm");return t}function Nt(r,e){return Xt(Uint8Array.of(vt|W),Uint8Array.of(Et|de.length),de,r,Uint8Array.of(Ct),e)}function Ht(r){const e=Se(r);if(!(e instanceof Map))throw new p("CWT claims root is not a map","invalid_claims");if(Lt(e,Vt,"cti").length===0)throw new p("token cti is empty","invalid_claims");return{issuer:U(e,St,"iss"),subject:U(e,kt,"sub"),audience:U(e,Tt,"aud"),expiresAt:F(e,$t,"exp"),notBefore:F(e,Rt,"nbf"),issuedAt:F(e,It,"iat")}}function U(r,e,t){const n=r.get(e);if(typeof n!="string")throw new p(`token claim ${t} is missing or not a text string`,"invalid_claims");return n}function Lt(r,e,t){const n=r.get(e);if(!(n instanceof Uint8Array))throw new p(`token claim ${t} is missing or not a byte string`,"invalid_claims");return n}function F(r,e,t){const n=r.get(e);if(typeof n!="number"||!Number.isSafeInteger(n)||n<0)throw new p(`token claim ${t} is missing or not a non-negative integer timestamp`,"invalid_claims");return n}function pe(r,e){const t=_.stripHexPrefix(r).toLowerCase();if(t.length!==_.X_ONLY_PUBKEY_HEX_LEN||!k.HEX_RE.test(t))throw new p(`${e} must be 32-byte x-only hex; got ${t.length} chars`,"invalid_input");return t}function Dt(r){const e=_.stripHexPrefix(r).toLowerCase(),t=e.slice(0,2);if(e.length!==_.COMPRESSED_PUBKEY_HEX_LEN||!k.HEX_RE.test(e)||t!=="02"&&t!=="03")throw new p("ephemeralPubkeyHex must be 33-byte compressed pubkey hex (prefix 02/03)","invalid_input");return _.hexToUint8Array(e)}const Gt=(()=>{const r=new Int16Array(128).fill(-1),e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";for(let t=0;t<e.length;t++)r[e.charCodeAt(t)]=t;return r})();function Mt(r){const e=r.length,t=Math.floor(e/4),n=e%4;if(n===1)throw new p("invalid base64url length","invalid_token_structure");const i=t*3+(n===0?0:n-1),s=new Uint8Array(i),a=l=>{const g=l<128?Gt[l]:-1;if(g<0)throw new p("invalid base64url character","invalid_token_structure");return g};let c=0,d=0;for(let l=0;l<t;l++){const g=a(r.charCodeAt(c++)),b=a(r.charCodeAt(c++)),A=a(r.charCodeAt(c++)),C=a(r.charCodeAt(c++));s[d++]=g<<2|b>>4,s[d++]=(b&15)<<4|A>>2,s[d++]=(A&3)<<6|C}if(n===2){const l=a(r.charCodeAt(c++)),g=a(r.charCodeAt(c++));s[d++]=l<<2|g>>4}else if(n===3){const l=a(r.charCodeAt(c++)),g=a(r.charCodeAt(c++)),b=a(r.charCodeAt(c++));s[d++]=l<<2|g>>4,s[d++]=(g&15)<<4|b>>2}return s}function Xt(...r){const e=r.reduce((i,s)=>i+s.length,0),t=new Uint8Array(e);let n=0;for(const i of r)t.set(i,n),n+=i.length;return t}const he=4102444800,jt=30;class Kt{constructor(e){m(this,"client");m(this,"peginTxid");m(this,"authAnchorHex");m(this,"pinnedServerPubkey");m(this,"expectedAudienceXOnlyPubkey");m(this,"authGatedMethods");m(this,"grpcGatedMethods");m(this,"refreshSkewSecs");m(this,"now");m(this,"cachedJsonRpc",null);m(this,"inFlightJsonRpc",null);m(this,"cachedGrpc",null);m(this,"inFlightGrpc",null);this.client=e.client,this.peginTxid=e.peginTxid,this.authAnchorHex=e.authAnchorHex,this.pinnedServerPubkey=e.pinnedServerPubkey,this.expectedAudienceXOnlyPubkey=e.expectedAudienceXOnlyPubkey,this.authGatedMethods=e.authGatedMethods,this.grpcGatedMethods=e.grpcGatedMethods,this.refreshSkewSecs=e.refreshSkewSecs??jt,this.now=e.now??(()=>Math.floor(Date.now()/1e3))}async getToken(e){return e===Y||e===q?null:this.grpcGatedMethods.has(e)?this.getTokenForSubject("grpc"):this.authGatedMethods.has(e)?this.getTokenForSubject("jsonrpc"):null}invalidate(){this.cachedJsonRpc=null,this.cachedGrpc=null}async getTokenForSubject(e){const t=e==="grpc"?this.cachedGrpc:this.cachedJsonRpc;return t&&this.now()+this.refreshSkewSecs<t.expiresAt?t.token:(await this.acquireSingleFlight(e)).token}setClient(e){this.client=e}acquireSingleFlight(e){const t=e==="grpc"?this.inFlightGrpc:this.inFlightJsonRpc;if(t)return t;const n=e==="grpc"?q:Y,i=(async()=>{try{const s=await this.client.call(n,{pegin_txid:this.peginTxid,auth_anchor:this.authAnchorHex});if(ve({proof:s.server_identity,pinnedServerPubkey:this.pinnedServerPubkey,now:this.now()}),typeof s.token!="string"||s.token.length===0)throw new Error(`VpTokenProvider: invalid token in acquire response (expected non-empty string, got ${typeof s.token})`);const a=this.now();if(!Number.isSafeInteger(s.expires_at)||s.expires_at<=a||s.expires_at>he)throw new Error(`VpTokenProvider: invalid expires_at in acquire response (got ${JSON.stringify(s.expires_at)}; must be a safe integer in (${a}, ${he}])`);Bt({token:s.token,ephemeralPubkeyHex:s.server_identity.ephemeral_pubkey,expectedIssuerXOnlyPubkey:this.pinnedServerPubkey,expectedSubject:e==="grpc"?At:Pt,expectedAudienceXOnlyPubkey:this.expectedAudienceXOnlyPubkey,responseExpiresAt:s.expires_at,serverIdentityExpiresAt:s.server_identity.expires_at,now:a});const c={token:s.token,expiresAt:s.expires_at};return e==="grpc"?this.cachedGrpc=c:this.cachedJsonRpc=c,c}finally{e==="grpc"?this.inFlightGrpc=null:this.inFlightJsonRpc=null}})();return e==="grpc"?this.inFlightGrpc=i:this.inFlightJsonRpc=i,i}}class ke{constructor(){m(this,"entries",new Map)}getOrCreate(e){const t=this.entries.get(e.peginTxid);if(t){if(t.authAnchorHex!==e.authAnchorHex)throw new Error(`VpTokenRegistry: peginTxid ${e.peginTxid} already bound to authAnchorHex ${t.authAnchorHex.slice(0,8)}…; got ${e.authAnchorHex.slice(0,8)}…`);if(t.pinnedServerPubkey!==e.pinnedServerPubkey)throw new Error(`VpTokenRegistry: peginTxid ${e.peginTxid} already bound to pinnedServerPubkey ${t.pinnedServerPubkey.slice(0,8)}…; got ${e.pinnedServerPubkey.slice(0,8)}…`);if(t.expectedAudienceXOnlyPubkey!==e.expectedAudienceXOnlyPubkey)throw new Error(`VpTokenRegistry: peginTxid ${e.peginTxid} already bound to expectedAudienceXOnlyPubkey ${t.expectedAudienceXOnlyPubkey.slice(0,8)}…; got ${e.expectedAudienceXOnlyPubkey.slice(0,8)}…`);return t.provider.setClient(e.client),t.provider}const n=new Kt({client:e.client,peginTxid:e.peginTxid,authAnchorHex:e.authAnchorHex,pinnedServerPubkey:e.pinnedServerPubkey,expectedAudienceXOnlyPubkey:e.expectedAudienceXOnlyPubkey,authGatedMethods:ot,grpcGatedMethods:ct});return this.entries.set(e.peginTxid,{provider:n,authAnchorHex:e.authAnchorHex,pinnedServerPubkey:e.pinnedServerPubkey,expectedAudienceXOnlyPubkey:e.expectedAudienceXOnlyPubkey}),n}peek(e){var t;return(t=this.entries.get(e))==null?void 0:t.provider}release(e){this.entries.delete(e)}clear(){this.entries.clear()}get size(){return this.entries.size}}const Z=new ke;function Ut(r){var n;const e=Ee(r.baseUrl,(n=r.options)==null?void 0:n.headers),t=Z.getOrCreate({client:e,peginTxid:r.peginTxid,authAnchorHex:r.authAnchorHex,pinnedServerPubkey:r.pinnedServerPubkey,expectedAudienceXOnlyPubkey:_.processPublicKeyToXOnly(r.depositorBtcPubkey)});return new we(r.baseUrl,{...r.options,tokenProvider:t})}function Ft(r){Z.getOrCreate({client:Ee(r.baseUrl,r.headers),peginTxid:r.peginTxid,authAnchorHex:r.authAnchorHex,pinnedServerPubkey:r.pinnedServerPubkey,expectedAudienceXOnlyPubkey:_.processPublicKeyToXOnly(r.depositorBtcPubkey)})}function Jt(r,e){const t=new Set;for(const d of r)t.add(d.toLowerCase());const n=new Map,i=new Set,s=[],a=[];for(const d of e){const l=d.pegin_txid.toLowerCase();if(!t.has(l)){a.push(l);continue}if(i.has(l)){s.push(l);continue}i.add(l),n.set(l,{result:d.result,error:d.error})}const c=[];for(const d of t)i.has(d)||c.push(d);return{byTxid:n,missing:c,unexpected:a,duplicate:s}}async function Yt(r){const{items:e,getTxid:t,batchCall:n,onItem:i,onMissing:s,onDuplicate:a,onDuplicateBatch:c,onWholeBatchError:d,onUnexpected:l,batchSize:g=X.VP_BATCH_MAX_SIZE}=r;if(!Number.isInteger(g)||g<=0)throw new Error(`batchPollByProvider: batchSize must be a positive integer, got ${g}`);for(let b=0;b<e.length;b+=g){const A=e.slice(b,b+g),C=new Map,T=[];for(const y of A){const u=t(y).toLowerCase();C.set(u,y),T.push(u)}let x;try{const y=await n(T);x=Jt(T,y.results)}catch(y){d(A,y);continue}l&&x.unexpected.length>0&&l(x.unexpected);const R=new Set(x.duplicate);for(const y of R){const u=C.get(y);u&&a(u)}c&&R.size>0&&c(R.size);for(const y of x.missing){const u=C.get(y);u&&s(u)}for(const[y,u]of x.byTxid){if(R.has(y))continue;const S=C.get(y);S&&i(S,{pegin_txid:y,result:u.result,error:u.error})}}}exports.OnChainBtcVaultStatus=ge;exports.ServerIdentityError=w;exports.VaultProviderRpcClient=we;exports.ViemOperationKeyReader=Oe;exports.ViemProtocolParamsReader=Ne;exports.ViemUniversalChallengerReader=Le;exports.ViemVaultKeeperReader=He;exports.VpResponseValidationError=o;exports.VpTokenRegistry=ke;exports.batchPollByProvider=Yt;exports.createAuthenticatedVpClient=Ut;exports.primeVpTokenRegistry=Ft;exports.resolveProtocolAddresses=Ve;exports.validateRequestDepositorClaimerArtifactsResponse=ye;exports.verifyServerIdentity=ve;exports.vpTokenRegistry=Z;
2
+ //# sourceMappingURL=batchPoll-6L5oToGr.cjs.map