@babylonlabs-io/ts-sdk 3.1.1 → 3.1.2

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 (77) hide show
  1. package/dist/{BTCVaultRegistry.abi-DBW0dyqH.js → BTCVaultRegistry.abi-BmHpMUWD.js} +1 -52
  2. package/dist/BTCVaultRegistry.abi-BmHpMUWD.js.map +1 -0
  3. package/dist/BTCVaultRegistry.abi-DffWFdpA.cjs +2 -0
  4. package/dist/BTCVaultRegistry.abi-DffWFdpA.cjs.map +1 -0
  5. package/dist/BTCVaultRegistryKeyEpochs.abi-Btg0nBz1.js +262 -0
  6. package/dist/BTCVaultRegistryKeyEpochs.abi-Btg0nBz1.js.map +1 -0
  7. package/dist/BTCVaultRegistryKeyEpochs.abi-CReWFJdu.cjs +2 -0
  8. package/dist/BTCVaultRegistryKeyEpochs.abi-CReWFJdu.cjs.map +1 -0
  9. package/dist/{PeginManager-QRwMUxZg.js → PeginManager-Dfr5Qe1g.js} +2 -2
  10. package/dist/{PeginManager-QRwMUxZg.js.map → PeginManager-Dfr5Qe1g.js.map} +1 -1
  11. package/dist/{PeginManager-8EUlm10F.cjs → PeginManager-PyKbfy5q.cjs} +2 -2
  12. package/dist/{PeginManager-8EUlm10F.cjs.map → PeginManager-PyKbfy5q.cjs.map} +1 -1
  13. package/dist/VaultErrors.abi-Boz4w97c.js +5 -0
  14. package/dist/VaultErrors.abi-Boz4w97c.js.map +1 -0
  15. package/dist/VaultErrors.abi-DQ18kM0L.cjs +2 -0
  16. package/dist/VaultErrors.abi-DQ18kM0L.cjs.map +1 -0
  17. package/dist/{buildAndBroadcastReclaim-DjX7wVb2.cjs → buildAndBroadcastReclaim-Da8rD5Z7.cjs} +2 -2
  18. package/dist/{buildAndBroadcastReclaim-DjX7wVb2.cjs.map → buildAndBroadcastReclaim-Da8rD5Z7.cjs.map} +1 -1
  19. package/dist/{buildAndBroadcastReclaim-DoprHX7o.js → buildAndBroadcastReclaim-R0HNpLMD.js} +2 -2
  20. package/dist/{buildAndBroadcastReclaim-DoprHX7o.js.map → buildAndBroadcastReclaim-R0HNpLMD.js.map} +1 -1
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.js +222 -219
  23. package/dist/index.js.map +1 -1
  24. package/dist/{pegin-registration-client-D4EguWaz.cjs → pegin-registration-client-C-abxMWq.cjs} +2 -2
  25. package/dist/{pegin-registration-client-D4EguWaz.cjs.map → pegin-registration-client-C-abxMWq.cjs.map} +1 -1
  26. package/dist/{pegin-registration-client-BWMwxtr8.js → pegin-registration-client-kdz4fT5_.js} +3 -3
  27. package/dist/{pegin-registration-client-BWMwxtr8.js.map → pegin-registration-client-kdz4fT5_.js.map} +1 -1
  28. package/dist/{signer-set-reader-C1VmC9_U.js → signer-set-reader-BCtmSKUM.js} +2 -2
  29. package/dist/{signer-set-reader-C1VmC9_U.js.map → signer-set-reader-BCtmSKUM.js.map} +1 -1
  30. package/dist/{signer-set-reader-C6g47hdk.cjs → signer-set-reader-DFAu6I-v.cjs} +2 -2
  31. package/dist/{signer-set-reader-C6g47hdk.cjs.map → signer-set-reader-DFAu6I-v.cjs.map} +1 -1
  32. package/dist/tbv/core/clients/eth/index.cjs +1 -1
  33. package/dist/tbv/core/clients/eth/index.js +2 -2
  34. package/dist/tbv/core/clients/index.cjs +1 -1
  35. package/dist/tbv/core/clients/index.js +2 -2
  36. package/dist/tbv/core/contracts/__tests__/vaultErrors.abi.test.d.ts +2 -0
  37. package/dist/tbv/core/contracts/__tests__/vaultErrors.abi.test.d.ts.map +1 -0
  38. package/dist/tbv/core/contracts/abis/BTCVaultRegistry.abi.d.ts +0 -40
  39. package/dist/tbv/core/contracts/abis/BTCVaultRegistry.abi.d.ts.map +1 -1
  40. package/dist/tbv/core/contracts/abis/VaultErrors.abi.d.ts +3 -0
  41. package/dist/tbv/core/contracts/abis/VaultErrors.abi.d.ts.map +1 -0
  42. package/dist/tbv/core/contracts/abis/vaultErrors.abi.json.d.ts +4 -0
  43. package/dist/tbv/core/contracts/errors.d.ts +7 -2
  44. package/dist/tbv/core/contracts/errors.d.ts.map +1 -1
  45. package/dist/tbv/core/contracts/index.cjs +1 -1
  46. package/dist/tbv/core/contracts/index.d.ts +2 -1
  47. package/dist/tbv/core/contracts/index.d.ts.map +1 -1
  48. package/dist/tbv/core/contracts/index.js +13 -10
  49. package/dist/tbv/core/contracts/index.js.map +1 -1
  50. package/dist/tbv/core/index.cjs +1 -1
  51. package/dist/tbv/core/index.js +210 -207
  52. package/dist/tbv/core/index.js.map +1 -1
  53. package/dist/tbv/core/managers/index.cjs +1 -1
  54. package/dist/tbv/core/managers/index.js +1 -1
  55. package/dist/tbv/core/services/index.cjs +1 -1
  56. package/dist/tbv/core/services/index.js +1 -1
  57. package/dist/tbv/index.cjs +1 -1
  58. package/dist/tbv/index.js +210 -207
  59. package/dist/tbv/index.js.map +1 -1
  60. package/dist/tbv/integrations/aave/clients/abis/AaveIntegrationAdapter.abi.json.d.ts +7 -701
  61. package/dist/tbv/integrations/aave/clients/query.d.ts +2 -2
  62. package/dist/tbv/integrations/aave/index.cjs +1 -1
  63. package/dist/tbv/integrations/aave/index.cjs.map +1 -1
  64. package/dist/tbv/integrations/aave/index.js +119 -119
  65. package/dist/tbv/integrations/aave/index.js.map +1 -1
  66. package/dist/{toRefundInputs-BZXvuOMY.cjs → toRefundInputs-BbAOOUg6.cjs} +2 -2
  67. package/dist/{toRefundInputs-BZXvuOMY.cjs.map → toRefundInputs-BbAOOUg6.cjs.map} +1 -1
  68. package/dist/{toRefundInputs-dKDSvpVI.js → toRefundInputs-DW14g6wH.js} +2 -2
  69. package/dist/{toRefundInputs-dKDSvpVI.js.map → toRefundInputs-DW14g6wH.js.map} +1 -1
  70. package/package.json +3 -3
  71. package/dist/BTCVaultRegistry.abi-CohlJX7c.cjs +0 -2
  72. package/dist/BTCVaultRegistry.abi-CohlJX7c.cjs.map +0 -1
  73. package/dist/BTCVaultRegistry.abi-DBW0dyqH.js.map +0 -1
  74. package/dist/BTCVaultRegistryKeyEpochs.abi-BWoxwPQv.js +0 -266
  75. package/dist/BTCVaultRegistryKeyEpochs.abi-BWoxwPQv.js.map +0 -1
  76. package/dist/BTCVaultRegistryKeyEpochs.abi-DCJnzKer.cjs +0 -2
  77. package/dist/BTCVaultRegistryKeyEpochs.abi-DCJnzKer.cjs.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"BTCVaultRegistry.abi-CohlJX7c.cjs","sources":["../src/tbv/core/contracts/abis/BTCVaultRegistry.abi.ts"],"sourcesContent":["/**\n * BTCVaultRegistry Contract ABI\n *\n * Minimal ABI containing only the functions needed by the SDK.\n * Full ABI is available in the vault service package.\n *\n * @module contracts/abis/BTCVaultRegistry\n */\n\n/**\n * Minimal ABI for BTCVaultRegistry contract.\n * Contains submitPeginRequest, submitPeginRequestBatch, activateVaultWithSecret, getPegInFee, getBtcVaultBasicInfo, getVaultProviderCommission,\n * and the PegInSubmitted / PegInSubmittedV2 events.\n */\nexport const BTCVaultRegistryABI = [\n {\n type: \"function\",\n name: \"submitPeginRequest\",\n inputs: [\n {\n name: \"depositor\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"depositorBtcPubKey\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"btcPopSignature\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"unsignedPrePeginTx\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"depositorSignedPeginTx\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"vaultProvider\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"maxAcceptableCommissionBps\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"hashlock\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"htlcVout\",\n type: \"uint8\",\n internalType: \"uint8\",\n },\n {\n name: \"depositorPayoutBtcAddress\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"depositorWotsPkHash\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n // Appended last on both singular overloads, unlike the batch entry where\n // it sits before `requests`. Order is the signature, so it is the ABI.\n {\n name: \"expectedFingerprint\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n stateMutability: \"payable\",\n },\n {\n type: \"function\",\n name: \"submitPeginRequest\",\n inputs: [\n {\n name: \"depositor\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"depositorBtcPubKey\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"btcPopSignature\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"unsignedPrePeginTx\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"depositorSignedPeginTx\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"vaultProvider\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"maxAcceptableCommissionBps\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"hashlock\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"htlcVout\",\n type: \"uint8\",\n internalType: \"uint8\",\n },\n {\n name: \"referralCode\",\n type: \"uint32\",\n internalType: \"uint32\",\n },\n {\n name: \"depositorPayoutBtcAddress\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"depositorWotsPkHash\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"expectedFingerprint\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n stateMutability: \"payable\",\n },\n {\n type: \"function\",\n name: \"submitPeginRequestBatch\",\n inputs: [\n { name: \"depositor\", type: \"address\", internalType: \"address\" },\n { name: \"vaultProvider\", type: \"address\", internalType: \"address\" },\n {\n name: \"maxAcceptableCommissionBps\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n // The fingerprint is argument 4, BEFORE `requests` — not appended, as it\n // is on the two singular overloads. It takes no per-request input and the\n // batch fixes one vault provider, so one value covers every entry.\n {\n name: \"expectedFingerprint\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"requests\",\n type: \"tuple[]\",\n internalType: \"struct BTCVaultRegistryTypes.BatchPeginRequest[]\",\n components: [\n {\n name: \"depositorBtcPubKey\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n { name: \"btcPopSignature\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"unsignedPrePeginTx\", type: \"bytes\", internalType: \"bytes\" },\n {\n name: \"depositorSignedPeginTx\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n { name: \"hashlock\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"htlcVout\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"referralCode\", type: \"uint32\", internalType: \"uint32\" },\n {\n name: \"depositorPayoutBtcAddress\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"depositorWotsPkHash\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n },\n ],\n outputs: [\n { name: \"vaultIds\", type: \"bytes32[]\", internalType: \"bytes32[]\" },\n ],\n stateMutability: \"payable\",\n },\n {\n type: \"function\",\n name: \"activateVaultWithSecret\",\n inputs: [\n {\n name: \"vaultId\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"s\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"activationMetadata\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"activateVaultWithSecretAndRedeem\",\n inputs: [\n {\n name: \"vaultId\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"s\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"getPegInFee\",\n inputs: [\n {\n name: \"vaultProvider\",\n type: \"address\",\n internalType: \"address\",\n },\n ],\n outputs: [\n {\n name: \"totalFee\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n },\n // --- RFC-006 operation-key resolution ---------------------------------\n // A vault provider's BTC key is not a fixed registration key: it is an\n // append-only history of *operation* keys, rotated by the provider's cold ETH\n // admin key. Each vault freezes a `vpKeyEpoch` at `submitPeginRequest` and\n // resolves the key bonded at that epoch, so a later rotation never\n // invalidates a live vault.\n //\n // The dedicated `getVaultProviderBTCKey` / `getVaultProviderKeyPair` getters\n // are deliberately absent: vault-contracts-aave-v4#539 removes them, and\n // keeping them here would let a call compile against a selector the registry\n // no longer exposes. The registration key is read as the operation key at\n // epoch 0 instead — see `getVaultProviderGenesisBtcPubKey`.\n //\n // `getCurrentOperationBtcKey` falls back on-chain to the registration key at\n // version 0, so adopting it is a no-op for a provider that never rotated.\n //\n // `getPayoutScriptAtEpoch` does NOT behave that way, and assuming it did was\n // wrong in an earlier revision of this comment. A payout script is mandatory\n // at registration and stored as version 1, so on an RFC-006 registry this\n // returns the operator's own registered script from the very first epoch —\n // not a BIP-86 derivation of its key. The contract's BIP-86 branch is a\n // migration default for pre-RFC-006 rows and is not reachable from\n // registration. An operator whose registered script happens to equal\n // bip86(key) is a coincidence of what it chose to register, not a fallback.\n //\n // This is why depositor payout validation must accept the legacy BIP-86 form\n // alongside the registered one: a payout graph is built once at BaBe Setup\n // and never rebuilt, so a vault whose graph predates its network's\n // btc-vault#2440 upgrade pays BIP-86 for the rest of its life. See\n // `acceptedPayoutScriptHexes` in `primitives/psbt/payout.ts`.\n {\n type: \"function\",\n name: \"getCurrentOperationBtcKey\",\n inputs: [{ name: \"provider\", type: \"address\", internalType: \"address\" }],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getOperationBtcKeyAtEpoch\",\n inputs: [\n { name: \"provider\", type: \"address\", internalType: \"address\" },\n { name: \"epoch\", type: \"uint64\", internalType: \"uint64\" },\n ],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getPayoutScriptAtEpoch\",\n inputs: [\n { name: \"provider\", type: \"address\", internalType: \"address\" },\n { name: \"epoch\", type: \"uint64\", internalType: \"uint64\" },\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getVaultProviderCommission\",\n inputs: [{ name: \"vpAddr\", type: \"address\", internalType: \"address\" }],\n outputs: [{ name: \"\", type: \"uint16\", internalType: \"uint16\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getVaultProviderApplication\",\n inputs: [{ name: \"vpAddr\", type: \"address\", internalType: \"address\" }],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getBtcVaultBasicInfo\",\n inputs: [\n {\n name: \"vaultId\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n outputs: [\n {\n name: \"vBasic\",\n type: \"tuple\",\n internalType: \"struct BTCVaultTypes.BTCVaultBasicInfo\",\n components: [\n { name: \"depositor\", type: \"address\", internalType: \"address\" },\n {\n name: \"depositorBtcPubKey\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n { name: \"amount\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"vaultProvider\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"status\",\n type: \"uint8\",\n internalType: \"enum IBTCVaultRegistry.BTCVaultStatus\",\n },\n {\n name: \"applicationEntryPoint\",\n type: \"address\",\n internalType: \"address\",\n },\n { name: \"createdAt\", type: \"uint256\", internalType: \"uint256\" },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"error\",\n name: \"InvalidPeginFee\",\n inputs: [\n {\n name: \"provided\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n {\n name: \"required\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n },\n {\n type: \"error\",\n name: \"InvalidSecret\",\n inputs: [],\n },\n {\n type: \"error\",\n name: \"ActivationDeadlineExpired\",\n inputs: [],\n },\n {\n type: \"error\",\n name: \"InvalidHashlock\",\n inputs: [],\n },\n {\n type: \"error\",\n name: \"DuplicateHashlock\",\n inputs: [],\n },\n {\n type: \"error\",\n name: \"CapExceeded\",\n inputs: [],\n },\n {\n type: \"error\",\n name: \"InvalidOutputIndex\",\n inputs: [],\n },\n {\n type: \"error\",\n name: \"PeginSignaturesIncomplete\",\n inputs: [],\n },\n {\n type: \"function\",\n name: \"getBtcVaultProtocolInfo\",\n inputs: [\n {\n name: \"vaultId\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n outputs: [\n {\n name: \"vProtocol\",\n type: \"tuple\",\n internalType: \"struct BTCVaultRegistryTypes.BTCVaultProtocolInfo\",\n components: [\n {\n name: \"depositorSignedPeginTx\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"universalChallengersVersion\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"appVaultKeepersVersion\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"offchainParamsVersion\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"verifiedAt\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n {\n name: \"depositorWotsPkHash\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"hashlock\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"htlcVout\",\n type: \"uint8\",\n internalType: \"uint8\",\n },\n {\n name: \"depositorPopSignature\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"prePeginTxHash\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"vaultProviderCommissionBps\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"claimExpiredUntil\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n {\n name: \"vaultCoreVersion\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"protocolParams\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IProtocolParams\",\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"applicationRegistry\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IApplicationRegistry\",\n },\n ],\n stateMutability: \"view\",\n },\n // ============================================================================\n // Errors — needed so viem can decode revert data into a named error.\n // Without these, every revert surfaces as \"Execution reverted for an\n // unknown reason.\" Mirrors errors thrown from BTCVaultRegistry's reachable\n // code paths (pegin submission, ACK, activation). Source:\n // https://github.com/babylonlabs-io/vault-contracts-aave-v4/blob/652c4582/src/protocol/lib/types/Errors.sol\n // ============================================================================\n { type: \"error\", name: \"ZeroAddress\", inputs: [] },\n { type: \"error\", name: \"Unauthorized\", inputs: [] },\n { type: \"error\", name: \"InvalidAmount\", inputs: [] },\n { type: \"error\", name: \"TransferFailed\", inputs: [] },\n { type: \"error\", name: \"InvalidTransaction\", inputs: [] },\n { type: \"error\", name: \"EmptyPayoutAddress\", inputs: [] },\n { type: \"error\", name: \"PayoutAddressTooLong\", inputs: [] },\n { type: \"error\", name: \"VaultAlreadyExists\", inputs: [] },\n { type: \"error\", name: \"VaultFeeAlreadyEscrowed\", inputs: [] },\n { type: \"error\", name: \"NoEscrowedFees\", inputs: [] },\n { type: \"error\", name: \"BTCVaultNotFound\", inputs: [] },\n { type: \"error\", name: \"InvalidBTCVaultStatus\", inputs: [] },\n { type: \"error\", name: \"PeginNotExpired\", inputs: [] },\n { type: \"error\", name: \"InvalidParticipantsList\", inputs: [] },\n { type: \"error\", name: \"DuplicateParticipant\", inputs: [] },\n { type: \"error\", name: \"ParticipantRoleOverlap\", inputs: [] },\n { type: \"error\", name: \"NotAuthorizedToACK\", inputs: [] },\n { type: \"error\", name: \"UnauthorizedVaultKeeper\", inputs: [] },\n { type: \"error\", name: \"BlocklistedVaultKeeper\", inputs: [] },\n { type: \"error\", name: \"PeginTransactionExpired\", inputs: [] },\n { type: \"error\", name: \"PrePeginOutputAlreadyUsed\", inputs: [] },\n { type: \"error\", name: \"PeginTransactionAlreadyUsed\", inputs: [] },\n {\n type: \"error\",\n name: \"InvalidPeginFee\",\n inputs: [\n { name: \"provided\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"required\", type: \"uint256\", internalType: \"uint256\" },\n ],\n },\n {\n type: \"error\",\n name: \"AmountBelowMinimumThreshold\",\n inputs: [\n { name: \"actual\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"minimum\", type: \"uint256\", internalType: \"uint256\" },\n ],\n },\n {\n type: \"error\",\n name: \"InvalidOutputIndex\",\n inputs: [\n { name: \"provided\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"maxValid\", type: \"uint256\", internalType: \"uint256\" },\n ],\n },\n {\n type: \"error\",\n name: \"TooManyHtlcOutputs\",\n inputs: [\n { name: \"outputCount\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"maxAllowed\", type: \"uint256\", internalType: \"uint256\" },\n ],\n },\n {\n type: \"error\",\n name: \"VaultBelowMinimum\",\n inputs: [\n { name: \"actual\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"minimum\", type: \"uint256\", internalType: \"uint256\" },\n ],\n },\n {\n type: \"error\",\n name: \"VaultAboveMaximum\",\n inputs: [\n { name: \"actual\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"maximum\", type: \"uint256\", internalType: \"uint256\" },\n ],\n },\n { type: \"error\", name: \"InvalidBTCPublicKey\", inputs: [] },\n { type: \"error\", name: \"InvalidDepositorWotsPkHash\", inputs: [] },\n { type: \"error\", name: \"InvalidBTCProofOfPossession\", inputs: [] },\n { type: \"error\", name: \"EthKeyAlreadyRegistered\", inputs: [] },\n { type: \"error\", name: \"BtcKeyAlreadyRegistered\", inputs: [] },\n { type: \"error\", name: \"InvalidRegistrationFee\", inputs: [] },\n {\n type: \"error\",\n name: \"CommissionBelowMinimum\",\n inputs: [\n { name: \"provided\", type: \"uint16\", internalType: \"uint16\" },\n { name: \"minimum\", type: \"uint16\", internalType: \"uint16\" },\n ],\n },\n {\n type: \"error\",\n name: \"CommissionAboveMaximum\",\n inputs: [{ name: \"provided\", type: \"uint16\", internalType: \"uint16\" }],\n },\n { type: \"error\", name: \"CommissionUnchanged\", inputs: [] },\n {\n type: \"error\",\n name: \"VaultProviderCommissionExceeded\",\n inputs: [\n { name: \"maxAcceptable\", type: \"uint16\", internalType: \"uint16\" },\n { name: \"actual\", type: \"uint16\", internalType: \"uint16\" },\n ],\n },\n // The same intent-binding shape as VaultProviderCommissionExceeded above,\n // one axis wider: the depositor commits to the whole protocol resolution the\n // Pre-Pegin was built against, and the registry rejects a submission whose\n // resolution moved. Newer than the block header's source commit — it arrives\n // with https://github.com/babylonlabs-io/vault-contracts-aave-v4/pull/555.\n // Selector 0x846c25bb, confirmed against that repo's generated\n // snapshots/selectors.md at head 86577e40.\n {\n type: \"error\",\n name: \"PeginFingerprintChanged\",\n inputs: [\n { name: \"expected\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"actual\", type: \"bytes32\", internalType: \"bytes32\" },\n ],\n },\n { type: \"error\", name: \"VaultProviderNotRegistered\", inputs: [] },\n { type: \"error\", name: \"ApplicationAlreadyRegistered\", inputs: [] },\n { type: \"error\", name: \"ApplicationNotRegistered\", inputs: [] },\n { type: \"error\", name: \"ApplicationNotActive\", inputs: [] },\n { type: \"error\", name: \"InvalidApplicationStatus\", inputs: [] },\n { type: \"error\", name: \"OnlyApplicationEntryPoint\", inputs: [] },\n { type: \"error\", name: \"EmptyVaultKeepers\", inputs: [] },\n { type: \"error\", name: \"NoUniversalChallengersConfigured\", inputs: [] },\n { type: \"error\", name: \"NoAppVaultKeepersConfigured\", inputs: [] },\n { type: \"error\", name: \"PeginSignaturesIncomplete\", inputs: [] },\n { type: \"error\", name: \"InvalidSignatureLength\", inputs: [] },\n { type: \"error\", name: \"PeginInputSignatureAlreadySubmitted\", inputs: [] },\n { type: \"error\", name: \"InvalidHashlock\", inputs: [] },\n { type: \"error\", name: \"DuplicateHashlock\", inputs: [] },\n { type: \"error\", name: \"InvalidSecret\", inputs: [] },\n { type: \"error\", name: \"ActivationDeadlineExpired\", inputs: [] },\n // Lower bound on activation: reverts while\n // `block.number < verifiedAt + peginActivationDelay`. Clears with time, so\n // unlike ActivationDeadlineExpired it is retryable, not terminal.\n { type: \"error\", name: \"ActivationDelayNotElapsed\", inputs: [] },\n { type: \"error\", name: \"PostExpiryGraceWindowElapsed\", inputs: [] },\n { type: \"error\", name: \"CapExceeded\", inputs: [] },\n // Registration event, emitted on every registration since genesis\n // (vault-contracts-aave-v4 src/protocol/lib/types/Events.sol).\n {\n type: \"event\",\n name: \"PegInSubmitted\",\n inputs: [\n {\n name: \"vaultId\",\n type: \"bytes32\",\n indexed: true,\n internalType: \"bytes32\",\n },\n {\n name: \"peginTxHash\",\n type: \"bytes32\",\n indexed: true,\n internalType: \"bytes32\",\n },\n {\n name: \"depositor\",\n type: \"address\",\n indexed: true,\n internalType: \"address\",\n },\n {\n name: \"vaultProvider\",\n type: \"address\",\n indexed: false,\n internalType: \"address\",\n },\n {\n name: \"amount\",\n type: \"uint256\",\n indexed: false,\n internalType: \"uint256\",\n },\n {\n name: \"vaultCoreVersion\",\n type: \"uint16\",\n indexed: false,\n internalType: \"uint16\",\n },\n {\n name: \"universalChallengersVersion\",\n type: \"uint16\",\n indexed: false,\n internalType: \"uint16\",\n },\n {\n name: \"appVaultKeepersVersion\",\n type: \"uint16\",\n indexed: false,\n internalType: \"uint16\",\n },\n {\n name: \"proverCircuitVersion\",\n type: \"uint16\",\n indexed: false,\n internalType: \"uint16\",\n },\n {\n name: \"offchainParamsVersion\",\n type: \"uint16\",\n indexed: false,\n internalType: \"uint16\",\n },\n {\n name: \"referralCode\",\n type: \"uint32\",\n indexed: false,\n internalType: \"uint32\",\n },\n {\n name: \"depositorPayoutBtcAddress\",\n type: \"bytes\",\n indexed: false,\n internalType: \"bytes\",\n },\n {\n name: \"depositorWotsPkHash\",\n type: \"bytes32\",\n indexed: false,\n internalType: \"bytes32\",\n },\n {\n name: \"hashlock\",\n type: \"bytes32\",\n indexed: false,\n internalType: \"bytes32\",\n },\n {\n name: \"btcPopSignature\",\n type: \"bytes\",\n indexed: false,\n internalType: \"bytes\",\n },\n {\n name: \"htlcVout\",\n type: \"uint8\",\n indexed: false,\n internalType: \"uint8\",\n },\n {\n name: \"unsignedPrePeginTx\",\n type: \"bytes\",\n indexed: false,\n internalType: \"bytes\",\n },\n {\n name: \"depositorSignedPeginTx\",\n type: \"bytes\",\n indexed: false,\n internalType: \"bytes\",\n },\n {\n name: \"vpKeyEpoch\",\n type: \"uint64\",\n indexed: false,\n internalType: \"uint64\",\n },\n {\n name: \"appKeeperKeyEpoch\",\n type: \"uint64\",\n indexed: false,\n internalType: \"uint64\",\n },\n {\n name: \"ucKeyEpoch\",\n type: \"uint64\",\n indexed: false,\n internalType: \"uint64\",\n },\n ],\n anonymous: false,\n },\n // Emitted alongside PegInSubmitted on every registration since #548; the\n // only on-chain source of the depositor's commission ceiling, which the\n // contract bound-checks and discards (Events.sol, vault-contracts-aave-v4 #548).\n {\n type: \"event\",\n name: \"PegInSubmittedV2\",\n inputs: [\n {\n name: \"vaultId\",\n type: \"bytes32\",\n indexed: true,\n internalType: \"bytes32\",\n },\n {\n name: \"peginTxHash\",\n type: \"bytes32\",\n indexed: true,\n internalType: \"bytes32\",\n },\n {\n name: \"depositor\",\n type: \"address\",\n indexed: true,\n internalType: \"address\",\n },\n {\n name: \"vaultProvider\",\n type: \"address\",\n indexed: false,\n internalType: \"address\",\n },\n {\n name: \"amount\",\n type: \"uint256\",\n indexed: false,\n internalType: \"uint256\",\n },\n {\n name: \"vaultCoreVersion\",\n type: \"uint16\",\n indexed: false,\n internalType: \"uint16\",\n },\n {\n name: \"universalChallengersVersion\",\n type: \"uint16\",\n indexed: false,\n internalType: \"uint16\",\n },\n {\n name: \"appVaultKeepersVersion\",\n type: \"uint16\",\n indexed: false,\n internalType: \"uint16\",\n },\n {\n name: \"proverCircuitVersion\",\n type: \"uint16\",\n indexed: false,\n internalType: \"uint16\",\n },\n {\n name: \"offchainParamsVersion\",\n type: \"uint16\",\n indexed: false,\n internalType: \"uint16\",\n },\n {\n name: \"referralCode\",\n type: \"uint32\",\n indexed: false,\n internalType: \"uint32\",\n },\n {\n name: \"depositorPayoutBtcAddress\",\n type: \"bytes\",\n indexed: false,\n internalType: \"bytes\",\n },\n {\n name: \"depositorWotsPkHash\",\n type: \"bytes32\",\n indexed: false,\n internalType: \"bytes32\",\n },\n {\n name: \"hashlock\",\n type: \"bytes32\",\n indexed: false,\n internalType: \"bytes32\",\n },\n {\n name: \"btcPopSignature\",\n type: \"bytes\",\n indexed: false,\n internalType: \"bytes\",\n },\n {\n name: \"htlcVout\",\n type: \"uint8\",\n indexed: false,\n internalType: \"uint8\",\n },\n {\n name: \"unsignedPrePeginTx\",\n type: \"bytes\",\n indexed: false,\n internalType: \"bytes\",\n },\n {\n name: \"depositorSignedPeginTx\",\n type: \"bytes\",\n indexed: false,\n internalType: \"bytes\",\n },\n {\n name: \"vpKeyEpoch\",\n type: \"uint64\",\n indexed: false,\n internalType: \"uint64\",\n },\n {\n name: \"appKeeperKeyEpoch\",\n type: \"uint64\",\n indexed: false,\n internalType: \"uint64\",\n },\n {\n name: \"ucKeyEpoch\",\n type: \"uint64\",\n indexed: false,\n internalType: \"uint64\",\n },\n {\n name: \"maxAcceptableCommissionBps\",\n type: \"uint16\",\n indexed: false,\n internalType: \"uint16\",\n },\n ],\n anonymous: false,\n },\n // Redemption event (vault-contracts-aave-v4 src/protocol/lib/types/Events.sol\n // @ c559f5c2). Emitted once per authorized claimer key, all in one\n // transaction, by RedeemLogic._emitVaultClaimableBy (`redeemForDepositor`\n // and the other depositor paths) and by PeginLogic `claimExpired`\n // (:1101, :1111): the vault provider's key and then the depositor's\n // registered BTC key — except `redeemForAVK`, which authorizes the vault\n // keeper alone, so a REDEEMED vault can carry no log for its depositor.\n {\n type: \"event\",\n name: \"VaultClaimableBy\",\n inputs: [\n {\n name: \"vaultId\",\n type: \"bytes32\",\n indexed: true,\n internalType: \"bytes32\",\n },\n {\n name: \"peginTxHash\",\n type: \"bytes32\",\n indexed: true,\n internalType: \"bytes32\",\n },\n {\n name: \"claimerPK\",\n type: \"bytes32\",\n indexed: true,\n internalType: \"bytes32\",\n },\n {\n name: \"vaultCoreVersion\",\n type: \"uint16\",\n indexed: false,\n internalType: \"uint16\",\n },\n {\n name: \"proverCircuitVersion\",\n type: \"uint16\",\n indexed: false,\n internalType: \"uint16\",\n },\n {\n name: \"offchainParamsVersion\",\n type: \"uint16\",\n indexed: false,\n internalType: \"uint16\",\n },\n {\n name: \"universalChallengersVersion\",\n type: \"uint16\",\n indexed: false,\n internalType: \"uint16\",\n },\n {\n name: \"appVaultKeepersVersion\",\n type: \"uint16\",\n indexed: false,\n internalType: \"uint16\",\n },\n ],\n anonymous: false,\n },\n] as const;\n"],"names":["BTCVaultRegistryABI"],"mappings":"aAcO,MAAMA,EAAsB,CACjC,CACE,KAAM,WACN,KAAM,qBACN,OAAQ,CACN,CACE,KAAM,YACN,KAAM,UACN,aAAc,SAAA,EAEhB,CACE,KAAM,qBACN,KAAM,UACN,aAAc,SAAA,EAEhB,CACE,KAAM,kBACN,KAAM,QACN,aAAc,OAAA,EAEhB,CACE,KAAM,qBACN,KAAM,QACN,aAAc,OAAA,EAEhB,CACE,KAAM,yBACN,KAAM,QACN,aAAc,OAAA,EAEhB,CACE,KAAM,gBACN,KAAM,UAC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,KAAM,SACN,QAAS,GACT,aAAc,QAAA,CAChB,EAEF,UAAW,EAAA,EASb,CACE,KAAM,QACN,KAAM,mBACN,OAAQ,CACN,CACE,KAAM,UACN,KAAM,UACN,QAAS,GACT,aAAc,SAAA,EAEhB,CACE,KAAM,cACN,KAAM,UACN,QAAS,GACT,aAAc,SAAA,EAEhB,CACE,KAAM,YACN,KAAM,UACN,QAAS,GACT,aAAc,SAAA,EAEhB,CACE,KAAM,mBACN,KAAM,SACN,QAAS,GACT,aAAc,QAAA,EAEhB,CACE,KAAM,uBACN,KAAM,SACN,QAAS,GACT,aAAc,QAAA,EAEhB,CACE,KAAM,wBACN,KAAM,SACN,QAAS,GACT,aAAc,QAAA,EAEhB,CACE,KAAM,8BACN,KAAM,SACN,QAAS,GACT,aAAc,QAAA,EAEhB,CACE,KAAM,yBACN,KAAM,SACN,QAAS,GACT,aAAc,QAAA,CAChB,EAEF,UAAW,EAAA,CAEf"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"BTCVaultRegistry.abi-DBW0dyqH.js","sources":["../src/tbv/core/contracts/abis/BTCVaultRegistry.abi.ts"],"sourcesContent":["/**\n * BTCVaultRegistry Contract ABI\n *\n * Minimal ABI containing only the functions needed by the SDK.\n * Full ABI is available in the vault service package.\n *\n * @module contracts/abis/BTCVaultRegistry\n */\n\n/**\n * Minimal ABI for BTCVaultRegistry contract.\n * Contains submitPeginRequest, submitPeginRequestBatch, activateVaultWithSecret, getPegInFee, getBtcVaultBasicInfo, getVaultProviderCommission,\n * and the PegInSubmitted / PegInSubmittedV2 events.\n */\nexport const BTCVaultRegistryABI = [\n {\n type: \"function\",\n name: \"submitPeginRequest\",\n inputs: [\n {\n name: \"depositor\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"depositorBtcPubKey\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"btcPopSignature\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"unsignedPrePeginTx\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"depositorSignedPeginTx\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"vaultProvider\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"maxAcceptableCommissionBps\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"hashlock\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"htlcVout\",\n type: \"uint8\",\n internalType: \"uint8\",\n },\n {\n name: \"depositorPayoutBtcAddress\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"depositorWotsPkHash\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n // Appended last on both singular overloads, unlike the batch entry where\n // it sits before `requests`. Order is the signature, so it is the ABI.\n {\n name: \"expectedFingerprint\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n stateMutability: \"payable\",\n },\n {\n type: \"function\",\n name: \"submitPeginRequest\",\n inputs: [\n {\n name: \"depositor\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"depositorBtcPubKey\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"btcPopSignature\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"unsignedPrePeginTx\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"depositorSignedPeginTx\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"vaultProvider\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"maxAcceptableCommissionBps\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"hashlock\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"htlcVout\",\n type: \"uint8\",\n internalType: \"uint8\",\n },\n {\n name: \"referralCode\",\n type: \"uint32\",\n internalType: \"uint32\",\n },\n {\n name: \"depositorPayoutBtcAddress\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"depositorWotsPkHash\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"expectedFingerprint\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n stateMutability: \"payable\",\n },\n {\n type: \"function\",\n name: \"submitPeginRequestBatch\",\n inputs: [\n { name: \"depositor\", type: \"address\", internalType: \"address\" },\n { name: \"vaultProvider\", type: \"address\", internalType: \"address\" },\n {\n name: \"maxAcceptableCommissionBps\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n // The fingerprint is argument 4, BEFORE `requests` — not appended, as it\n // is on the two singular overloads. It takes no per-request input and the\n // batch fixes one vault provider, so one value covers every entry.\n {\n name: \"expectedFingerprint\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"requests\",\n type: \"tuple[]\",\n internalType: \"struct BTCVaultRegistryTypes.BatchPeginRequest[]\",\n components: [\n {\n name: \"depositorBtcPubKey\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n { name: \"btcPopSignature\", type: \"bytes\", internalType: \"bytes\" },\n { name: \"unsignedPrePeginTx\", type: \"bytes\", internalType: \"bytes\" },\n {\n name: \"depositorSignedPeginTx\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n { name: \"hashlock\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"htlcVout\", type: \"uint8\", internalType: \"uint8\" },\n { name: \"referralCode\", type: \"uint32\", internalType: \"uint32\" },\n {\n name: \"depositorPayoutBtcAddress\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"depositorWotsPkHash\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n },\n ],\n outputs: [\n { name: \"vaultIds\", type: \"bytes32[]\", internalType: \"bytes32[]\" },\n ],\n stateMutability: \"payable\",\n },\n {\n type: \"function\",\n name: \"activateVaultWithSecret\",\n inputs: [\n {\n name: \"vaultId\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"s\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"activationMetadata\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"activateVaultWithSecretAndRedeem\",\n inputs: [\n {\n name: \"vaultId\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"s\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n outputs: [],\n stateMutability: \"nonpayable\",\n },\n {\n type: \"function\",\n name: \"getPegInFee\",\n inputs: [\n {\n name: \"vaultProvider\",\n type: \"address\",\n internalType: \"address\",\n },\n ],\n outputs: [\n {\n name: \"totalFee\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n },\n // --- RFC-006 operation-key resolution ---------------------------------\n // A vault provider's BTC key is not a fixed registration key: it is an\n // append-only history of *operation* keys, rotated by the provider's cold ETH\n // admin key. Each vault freezes a `vpKeyEpoch` at `submitPeginRequest` and\n // resolves the key bonded at that epoch, so a later rotation never\n // invalidates a live vault.\n //\n // The dedicated `getVaultProviderBTCKey` / `getVaultProviderKeyPair` getters\n // are deliberately absent: vault-contracts-aave-v4#539 removes them, and\n // keeping them here would let a call compile against a selector the registry\n // no longer exposes. The registration key is read as the operation key at\n // epoch 0 instead — see `getVaultProviderGenesisBtcPubKey`.\n //\n // `getCurrentOperationBtcKey` falls back on-chain to the registration key at\n // version 0, so adopting it is a no-op for a provider that never rotated.\n //\n // `getPayoutScriptAtEpoch` does NOT behave that way, and assuming it did was\n // wrong in an earlier revision of this comment. A payout script is mandatory\n // at registration and stored as version 1, so on an RFC-006 registry this\n // returns the operator's own registered script from the very first epoch —\n // not a BIP-86 derivation of its key. The contract's BIP-86 branch is a\n // migration default for pre-RFC-006 rows and is not reachable from\n // registration. An operator whose registered script happens to equal\n // bip86(key) is a coincidence of what it chose to register, not a fallback.\n //\n // This is why depositor payout validation must accept the legacy BIP-86 form\n // alongside the registered one: a payout graph is built once at BaBe Setup\n // and never rebuilt, so a vault whose graph predates its network's\n // btc-vault#2440 upgrade pays BIP-86 for the rest of its life. See\n // `acceptedPayoutScriptHexes` in `primitives/psbt/payout.ts`.\n {\n type: \"function\",\n name: \"getCurrentOperationBtcKey\",\n inputs: [{ name: \"provider\", type: \"address\", internalType: \"address\" }],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getOperationBtcKeyAtEpoch\",\n inputs: [\n { name: \"provider\", type: \"address\", internalType: \"address\" },\n { name: \"epoch\", type: \"uint64\", internalType: \"uint64\" },\n ],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getPayoutScriptAtEpoch\",\n inputs: [\n { name: \"provider\", type: \"address\", internalType: \"address\" },\n { name: \"epoch\", type: \"uint64\", internalType: \"uint64\" },\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getVaultProviderCommission\",\n inputs: [{ name: \"vpAddr\", type: \"address\", internalType: \"address\" }],\n outputs: [{ name: \"\", type: \"uint16\", internalType: \"uint16\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getVaultProviderApplication\",\n inputs: [{ name: \"vpAddr\", type: \"address\", internalType: \"address\" }],\n outputs: [{ name: \"\", type: \"address\", internalType: \"address\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getBtcVaultBasicInfo\",\n inputs: [\n {\n name: \"vaultId\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n outputs: [\n {\n name: \"vBasic\",\n type: \"tuple\",\n internalType: \"struct BTCVaultTypes.BTCVaultBasicInfo\",\n components: [\n { name: \"depositor\", type: \"address\", internalType: \"address\" },\n {\n name: \"depositorBtcPubKey\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n { name: \"amount\", type: \"uint256\", internalType: \"uint256\" },\n {\n name: \"vaultProvider\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"status\",\n type: \"uint8\",\n internalType: \"enum IBTCVaultRegistry.BTCVaultStatus\",\n },\n {\n name: \"applicationEntryPoint\",\n type: \"address\",\n internalType: \"address\",\n },\n { name: \"createdAt\", type: \"uint256\", internalType: \"uint256\" },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"error\",\n name: \"InvalidPeginFee\",\n inputs: [\n {\n name: \"provided\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n {\n name: \"required\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n ],\n },\n {\n type: \"error\",\n name: \"InvalidSecret\",\n inputs: [],\n },\n {\n type: \"error\",\n name: \"ActivationDeadlineExpired\",\n inputs: [],\n },\n {\n type: \"error\",\n name: \"InvalidHashlock\",\n inputs: [],\n },\n {\n type: \"error\",\n name: \"DuplicateHashlock\",\n inputs: [],\n },\n {\n type: \"error\",\n name: \"CapExceeded\",\n inputs: [],\n },\n {\n type: \"error\",\n name: \"InvalidOutputIndex\",\n inputs: [],\n },\n {\n type: \"error\",\n name: \"PeginSignaturesIncomplete\",\n inputs: [],\n },\n {\n type: \"function\",\n name: \"getBtcVaultProtocolInfo\",\n inputs: [\n {\n name: \"vaultId\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n outputs: [\n {\n name: \"vProtocol\",\n type: \"tuple\",\n internalType: \"struct BTCVaultRegistryTypes.BTCVaultProtocolInfo\",\n components: [\n {\n name: \"depositorSignedPeginTx\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"universalChallengersVersion\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"appVaultKeepersVersion\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"offchainParamsVersion\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"verifiedAt\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n {\n name: \"depositorWotsPkHash\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"hashlock\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"htlcVout\",\n type: \"uint8\",\n internalType: \"uint8\",\n },\n {\n name: \"depositorPopSignature\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"prePeginTxHash\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"vaultProviderCommissionBps\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"claimExpiredUntil\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n {\n name: \"vaultCoreVersion\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"protocolParams\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IProtocolParams\",\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"applicationRegistry\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"address\",\n internalType: \"contract IApplicationRegistry\",\n },\n ],\n stateMutability: \"view\",\n },\n // ============================================================================\n // Errors — needed so viem can decode revert data into a named error.\n // Without these, every revert surfaces as \"Execution reverted for an\n // unknown reason.\" Mirrors errors thrown from BTCVaultRegistry's reachable\n // code paths (pegin submission, ACK, activation). Source:\n // https://github.com/babylonlabs-io/vault-contracts-aave-v4/blob/652c4582/src/protocol/lib/types/Errors.sol\n // ============================================================================\n { type: \"error\", name: \"ZeroAddress\", inputs: [] },\n { type: \"error\", name: \"Unauthorized\", inputs: [] },\n { type: \"error\", name: \"InvalidAmount\", inputs: [] },\n { type: \"error\", name: \"TransferFailed\", inputs: [] },\n { type: \"error\", name: \"InvalidTransaction\", inputs: [] },\n { type: \"error\", name: \"EmptyPayoutAddress\", inputs: [] },\n { type: \"error\", name: \"PayoutAddressTooLong\", inputs: [] },\n { type: \"error\", name: \"VaultAlreadyExists\", inputs: [] },\n { type: \"error\", name: \"VaultFeeAlreadyEscrowed\", inputs: [] },\n { type: \"error\", name: \"NoEscrowedFees\", inputs: [] },\n { type: \"error\", name: \"BTCVaultNotFound\", inputs: [] },\n { type: \"error\", name: \"InvalidBTCVaultStatus\", inputs: [] },\n { type: \"error\", name: \"PeginNotExpired\", inputs: [] },\n { type: \"error\", name: \"InvalidParticipantsList\", inputs: [] },\n { type: \"error\", name: \"DuplicateParticipant\", inputs: [] },\n { type: \"error\", name: \"ParticipantRoleOverlap\", inputs: [] },\n { type: \"error\", name: \"NotAuthorizedToACK\", inputs: [] },\n { type: \"error\", name: \"UnauthorizedVaultKeeper\", inputs: [] },\n { type: \"error\", name: \"BlocklistedVaultKeeper\", inputs: [] },\n { type: \"error\", name: \"PeginTransactionExpired\", inputs: [] },\n { type: \"error\", name: \"PrePeginOutputAlreadyUsed\", inputs: [] },\n { type: \"error\", name: \"PeginTransactionAlreadyUsed\", inputs: [] },\n {\n type: \"error\",\n name: \"InvalidPeginFee\",\n inputs: [\n { name: \"provided\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"required\", type: \"uint256\", internalType: \"uint256\" },\n ],\n },\n {\n type: \"error\",\n name: \"AmountBelowMinimumThreshold\",\n inputs: [\n { name: \"actual\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"minimum\", type: \"uint256\", internalType: \"uint256\" },\n ],\n },\n {\n type: \"error\",\n name: \"InvalidOutputIndex\",\n inputs: [\n { name: \"provided\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"maxValid\", type: \"uint256\", internalType: \"uint256\" },\n ],\n },\n {\n type: \"error\",\n name: \"TooManyHtlcOutputs\",\n inputs: [\n { name: \"outputCount\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"maxAllowed\", type: \"uint256\", internalType: \"uint256\" },\n ],\n },\n {\n type: \"error\",\n name: \"VaultBelowMinimum\",\n inputs: [\n { name: \"actual\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"minimum\", type: \"uint256\", internalType: \"uint256\" },\n ],\n },\n {\n type: \"error\",\n name: \"VaultAboveMaximum\",\n inputs: [\n { name: \"actual\", type: \"uint256\", internalType: \"uint256\" },\n { name: \"maximum\", type: \"uint256\", internalType: \"uint256\" },\n ],\n },\n { type: \"error\", name: \"InvalidBTCPublicKey\", inputs: [] },\n { type: \"error\", name: \"InvalidDepositorWotsPkHash\", inputs: [] },\n { type: \"error\", name: \"InvalidBTCProofOfPossession\", inputs: [] },\n { type: \"error\", name: \"EthKeyAlreadyRegistered\", inputs: [] },\n { type: \"error\", name: \"BtcKeyAlreadyRegistered\", inputs: [] },\n { type: \"error\", name: \"InvalidRegistrationFee\", inputs: [] },\n {\n type: \"error\",\n name: \"CommissionBelowMinimum\",\n inputs: [\n { name: \"provided\", type: \"uint16\", internalType: \"uint16\" },\n { name: \"minimum\", type: \"uint16\", internalType: \"uint16\" },\n ],\n },\n {\n type: \"error\",\n name: \"CommissionAboveMaximum\",\n inputs: [{ name: \"provided\", type: \"uint16\", internalType: \"uint16\" }],\n },\n { type: \"error\", name: \"CommissionUnchanged\", inputs: [] },\n {\n type: \"error\",\n name: \"VaultProviderCommissionExceeded\",\n inputs: [\n { name: \"maxAcceptable\", type: \"uint16\", internalType: \"uint16\" },\n { name: \"actual\", type: \"uint16\", internalType: \"uint16\" },\n ],\n },\n // The same intent-binding shape as VaultProviderCommissionExceeded above,\n // one axis wider: the depositor commits to the whole protocol resolution the\n // Pre-Pegin was built against, and the registry rejects a submission whose\n // resolution moved. Newer than the block header's source commit — it arrives\n // with https://github.com/babylonlabs-io/vault-contracts-aave-v4/pull/555.\n // Selector 0x846c25bb, confirmed against that repo's generated\n // snapshots/selectors.md at head 86577e40.\n {\n type: \"error\",\n name: \"PeginFingerprintChanged\",\n inputs: [\n { name: \"expected\", type: \"bytes32\", internalType: \"bytes32\" },\n { name: \"actual\", type: \"bytes32\", internalType: \"bytes32\" },\n ],\n },\n { type: \"error\", name: \"VaultProviderNotRegistered\", inputs: [] },\n { type: \"error\", name: \"ApplicationAlreadyRegistered\", inputs: [] },\n { type: \"error\", name: \"ApplicationNotRegistered\", inputs: [] },\n { type: \"error\", name: \"ApplicationNotActive\", inputs: [] },\n { type: \"error\", name: \"InvalidApplicationStatus\", inputs: [] },\n { type: \"error\", name: \"OnlyApplicationEntryPoint\", inputs: [] },\n { type: \"error\", name: \"EmptyVaultKeepers\", inputs: [] },\n { type: \"error\", name: \"NoUniversalChallengersConfigured\", inputs: [] },\n { type: \"error\", name: \"NoAppVaultKeepersConfigured\", inputs: [] },\n { type: \"error\", name: \"PeginSignaturesIncomplete\", inputs: [] },\n { type: \"error\", name: \"InvalidSignatureLength\", inputs: [] },\n { type: \"error\", name: \"PeginInputSignatureAlreadySubmitted\", inputs: [] },\n { type: \"error\", name: \"InvalidHashlock\", inputs: [] },\n { type: \"error\", name: \"DuplicateHashlock\", inputs: [] },\n { type: \"error\", name: \"InvalidSecret\", inputs: [] },\n { type: \"error\", name: \"ActivationDeadlineExpired\", inputs: [] },\n // Lower bound on activation: reverts while\n // `block.number < verifiedAt + peginActivationDelay`. Clears with time, so\n // unlike ActivationDeadlineExpired it is retryable, not terminal.\n { type: \"error\", name: \"ActivationDelayNotElapsed\", inputs: [] },\n { type: \"error\", name: \"PostExpiryGraceWindowElapsed\", inputs: [] },\n { type: \"error\", name: \"CapExceeded\", inputs: [] },\n // Registration event, emitted on every registration since genesis\n // (vault-contracts-aave-v4 src/protocol/lib/types/Events.sol).\n {\n type: \"event\",\n name: \"PegInSubmitted\",\n inputs: [\n {\n name: \"vaultId\",\n type: \"bytes32\",\n indexed: true,\n internalType: \"bytes32\",\n },\n {\n name: \"peginTxHash\",\n type: \"bytes32\",\n indexed: true,\n internalType: \"bytes32\",\n },\n {\n name: \"depositor\",\n type: \"address\",\n indexed: true,\n internalType: \"address\",\n },\n {\n name: \"vaultProvider\",\n type: \"address\",\n indexed: false,\n internalType: \"address\",\n },\n {\n name: \"amount\",\n type: \"uint256\",\n indexed: false,\n internalType: \"uint256\",\n },\n {\n name: \"vaultCoreVersion\",\n type: \"uint16\",\n indexed: false,\n internalType: \"uint16\",\n },\n {\n name: \"universalChallengersVersion\",\n type: \"uint16\",\n indexed: false,\n internalType: \"uint16\",\n },\n {\n name: \"appVaultKeepersVersion\",\n type: \"uint16\",\n indexed: false,\n internalType: \"uint16\",\n },\n {\n name: \"proverCircuitVersion\",\n type: \"uint16\",\n indexed: false,\n internalType: \"uint16\",\n },\n {\n name: \"offchainParamsVersion\",\n type: \"uint16\",\n indexed: false,\n internalType: \"uint16\",\n },\n {\n name: \"referralCode\",\n type: \"uint32\",\n indexed: false,\n internalType: \"uint32\",\n },\n {\n name: \"depositorPayoutBtcAddress\",\n type: \"bytes\",\n indexed: false,\n internalType: \"bytes\",\n },\n {\n name: \"depositorWotsPkHash\",\n type: \"bytes32\",\n indexed: false,\n internalType: \"bytes32\",\n },\n {\n name: \"hashlock\",\n type: \"bytes32\",\n indexed: false,\n internalType: \"bytes32\",\n },\n {\n name: \"btcPopSignature\",\n type: \"bytes\",\n indexed: false,\n internalType: \"bytes\",\n },\n {\n name: \"htlcVout\",\n type: \"uint8\",\n indexed: false,\n internalType: \"uint8\",\n },\n {\n name: \"unsignedPrePeginTx\",\n type: \"bytes\",\n indexed: false,\n internalType: \"bytes\",\n },\n {\n name: \"depositorSignedPeginTx\",\n type: \"bytes\",\n indexed: false,\n internalType: \"bytes\",\n },\n {\n name: \"vpKeyEpoch\",\n type: \"uint64\",\n indexed: false,\n internalType: \"uint64\",\n },\n {\n name: \"appKeeperKeyEpoch\",\n type: \"uint64\",\n indexed: false,\n internalType: \"uint64\",\n },\n {\n name: \"ucKeyEpoch\",\n type: \"uint64\",\n indexed: false,\n internalType: \"uint64\",\n },\n ],\n anonymous: false,\n },\n // Emitted alongside PegInSubmitted on every registration since #548; the\n // only on-chain source of the depositor's commission ceiling, which the\n // contract bound-checks and discards (Events.sol, vault-contracts-aave-v4 #548).\n {\n type: \"event\",\n name: \"PegInSubmittedV2\",\n inputs: [\n {\n name: \"vaultId\",\n type: \"bytes32\",\n indexed: true,\n internalType: \"bytes32\",\n },\n {\n name: \"peginTxHash\",\n type: \"bytes32\",\n indexed: true,\n internalType: \"bytes32\",\n },\n {\n name: \"depositor\",\n type: \"address\",\n indexed: true,\n internalType: \"address\",\n },\n {\n name: \"vaultProvider\",\n type: \"address\",\n indexed: false,\n internalType: \"address\",\n },\n {\n name: \"amount\",\n type: \"uint256\",\n indexed: false,\n internalType: \"uint256\",\n },\n {\n name: \"vaultCoreVersion\",\n type: \"uint16\",\n indexed: false,\n internalType: \"uint16\",\n },\n {\n name: \"universalChallengersVersion\",\n type: \"uint16\",\n indexed: false,\n internalType: \"uint16\",\n },\n {\n name: \"appVaultKeepersVersion\",\n type: \"uint16\",\n indexed: false,\n internalType: \"uint16\",\n },\n {\n name: \"proverCircuitVersion\",\n type: \"uint16\",\n indexed: false,\n internalType: \"uint16\",\n },\n {\n name: \"offchainParamsVersion\",\n type: \"uint16\",\n indexed: false,\n internalType: \"uint16\",\n },\n {\n name: \"referralCode\",\n type: \"uint32\",\n indexed: false,\n internalType: \"uint32\",\n },\n {\n name: \"depositorPayoutBtcAddress\",\n type: \"bytes\",\n indexed: false,\n internalType: \"bytes\",\n },\n {\n name: \"depositorWotsPkHash\",\n type: \"bytes32\",\n indexed: false,\n internalType: \"bytes32\",\n },\n {\n name: \"hashlock\",\n type: \"bytes32\",\n indexed: false,\n internalType: \"bytes32\",\n },\n {\n name: \"btcPopSignature\",\n type: \"bytes\",\n indexed: false,\n internalType: \"bytes\",\n },\n {\n name: \"htlcVout\",\n type: \"uint8\",\n indexed: false,\n internalType: \"uint8\",\n },\n {\n name: \"unsignedPrePeginTx\",\n type: \"bytes\",\n indexed: false,\n internalType: \"bytes\",\n },\n {\n name: \"depositorSignedPeginTx\",\n type: \"bytes\",\n indexed: false,\n internalType: \"bytes\",\n },\n {\n name: \"vpKeyEpoch\",\n type: \"uint64\",\n indexed: false,\n internalType: \"uint64\",\n },\n {\n name: \"appKeeperKeyEpoch\",\n type: \"uint64\",\n indexed: false,\n internalType: \"uint64\",\n },\n {\n name: \"ucKeyEpoch\",\n type: \"uint64\",\n indexed: false,\n internalType: \"uint64\",\n },\n {\n name: \"maxAcceptableCommissionBps\",\n type: \"uint16\",\n indexed: false,\n internalType: \"uint16\",\n },\n ],\n anonymous: false,\n },\n // Redemption event (vault-contracts-aave-v4 src/protocol/lib/types/Events.sol\n // @ c559f5c2). Emitted once per authorized claimer key, all in one\n // transaction, by RedeemLogic._emitVaultClaimableBy (`redeemForDepositor`\n // and the other depositor paths) and by PeginLogic `claimExpired`\n // (:1101, :1111): the vault provider's key and then the depositor's\n // registered BTC key — except `redeemForAVK`, which authorizes the vault\n // keeper alone, so a REDEEMED vault can carry no log for its depositor.\n {\n type: \"event\",\n name: \"VaultClaimableBy\",\n inputs: [\n {\n name: \"vaultId\",\n type: \"bytes32\",\n indexed: true,\n internalType: \"bytes32\",\n },\n {\n name: \"peginTxHash\",\n type: \"bytes32\",\n indexed: true,\n internalType: \"bytes32\",\n },\n {\n name: \"claimerPK\",\n type: \"bytes32\",\n indexed: true,\n internalType: \"bytes32\",\n },\n {\n name: \"vaultCoreVersion\",\n type: \"uint16\",\n indexed: false,\n internalType: \"uint16\",\n },\n {\n name: \"proverCircuitVersion\",\n type: \"uint16\",\n indexed: false,\n internalType: \"uint16\",\n },\n {\n name: \"offchainParamsVersion\",\n type: \"uint16\",\n indexed: false,\n internalType: \"uint16\",\n },\n {\n name: \"universalChallengersVersion\",\n type: \"uint16\",\n indexed: false,\n internalType: \"uint16\",\n },\n {\n name: \"appVaultKeepersVersion\",\n type: \"uint16\",\n indexed: false,\n internalType: \"uint16\",\n },\n ],\n anonymous: false,\n },\n] as const;\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AAAA;AAAA,EASb;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,MACN;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,cAAc;AAAA,MAAA;AAAA,MAEhB;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,cAAc;AAAA,MAAA;AAAA,MAEhB;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,cAAc;AAAA,MAAA;AAAA,MAEhB;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,cAAc;AAAA,MAAA;AAAA,MAEhB;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,cAAc;AAAA,MAAA;AAAA,MAEhB;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,cAAc;AAAA,MAAA;AAAA,MAEhB;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,cAAc;AAAA,MAAA;AAAA,MAEhB;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,cAAc;AAAA,MAAA;AAAA,IAChB;AAAA,IAEF,WAAW;AAAA,EAAA;AAEf;"}
@@ -1,266 +0,0 @@
1
- var d = Object.defineProperty;
2
- var p = (t, r, e) => r in t ? d(t, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[r] = e;
3
- var o = (t, r, e) => p(t, typeof r != "symbol" ? r + "" : r, e);
4
- import { decodeAbiParameters as y } from "viem";
5
- const h = "0x846c25bb", f = 138;
6
- class l extends Error {
7
- constructor(e, n) {
8
- super(e);
9
- o(this, "expected");
10
- o(this, "actual");
11
- this.name = "PeginFingerprintChangedError", this.expected = n == null ? void 0 : n.expected, this.actual = n == null ? void 0 : n.actual;
12
- }
13
- }
14
- function v(t) {
15
- return t instanceof l || t instanceof Error && t.name === "PeginFingerprintChangedError";
16
- }
17
- function g(t) {
18
- if (t.length === f)
19
- try {
20
- const [r, e] = y(
21
- [{ type: "bytes32" }, { type: "bytes32" }],
22
- `0x${t.slice(10)}`
23
- );
24
- return { expected: r, actual: e };
25
- } catch {
26
- return;
27
- }
28
- }
29
- const i = {
30
- // VaultAlreadyExists()
31
- "0x04aabf33": "Vault already exists: This Bitcoin transaction has already been registered. Please select different UTXOs or use a different amount to create a unique transaction.",
32
- // ScriptPubKeyMismatch() - taproot output doesn't match expected script
33
- "0x4fec082d": "Script mismatch: The Bitcoin transaction's taproot output does not match the expected vault script. This may be caused by incorrect vault participants or key configuration.",
34
- // InvalidBTCProofOfPossession()
35
- "0x6cc363a5": "Invalid BTC proof of possession: The signature could not be verified. Please ensure you're signing with the correct Bitcoin wallet.",
36
- // InvalidBTCPublicKey()
37
- "0x6c3f2bf6": "Invalid BTC public key: The Bitcoin public key format is invalid.",
38
- // InvalidAmount()
39
- "0x2c5211c6": "Invalid amount: The deposit amount is invalid or below the minimum required.",
40
- // ApplicationNotRegistered()
41
- "0x0405f772": "Application not registered: The application controller is not registered in the system.",
42
- // InvalidProviderStatus()
43
- "0x24e165cc": "Invalid provider status: The vault provider is not in a valid state to accept deposits.",
44
- // ZeroAddress()
45
- "0xd92e233d": "Zero address: One of the required addresses is the zero address.",
46
- // BtcKeyMismatch()
47
- "0x65aa7007": "BTC key mismatch: The Bitcoin public key does not match the expected key.",
48
- // Unauthorized()
49
- "0x82b42900": "Unauthorized: You must be the depositor or vault provider to submit this transaction.",
50
- // InvalidSignature() - common signature verification error
51
- "0x8baa579f": "Invalid signature: The BTC proof of possession signature could not be verified.",
52
- // InvalidBtcTransaction()
53
- "0x2f9d01e9": "Invalid BTC transaction: The Bitcoin transaction format is invalid.",
54
- // VaultProviderNotRegistered()
55
- "0x5a3c6b3e": "Vault provider not registered: The selected vault provider is not registered.",
56
- // InvalidPeginFee(uint256,uint256)
57
- "0x979f4518": "Invalid pegin fee: The ETH fee sent does not match the required amount. This may indicate a fee rate change during the transaction.",
58
- // PrePeginOutputAlreadyUsed()
59
- "0x5fad9694": "This pre-pegin output has already been used to activate another vault.",
60
- // PeginTransactionAlreadyUsed()
61
- "0x7ed061c9": "This pegin transaction has already been used to activate another vault.",
62
- // DuplicateHashlock() — keccak256(abi.encodePacked(hashlock, msg.sender))
63
- // collision in BTCVaultRegistry.hashlockToVaultId. Hashlocks are derived
64
- // deterministically from the depositor's BTC wallet + selected UTXOs, so
65
- // reusing the same UTXOs from the same wallet (even after a previous
66
- // vault expires) produces the same hashlock and reverts here.
67
- "0x70f7d5e2": "Duplicate deposit: a BTC Vault with this hashlock is already registered to your wallet. Hashlocks are derived from your BTC wallet and selected UTXOs — use different UTXOs to create a unique deposit."
68
- };
69
- function c(t) {
70
- return s(t, 0);
71
- }
72
- function s(t, r) {
73
- if (r > 10 || !t || typeof t != "object") return;
74
- const e = t;
75
- if (typeof e.data == "string" && e.data.startsWith("0x"))
76
- return e.data;
77
- if (typeof e.revertData == "string" && e.revertData.startsWith("0x"))
78
- return e.revertData;
79
- if (typeof e.signature == "string" && e.signature.startsWith("0x"))
80
- return e.signature;
81
- if (typeof e.details == "string" && e.details.startsWith("0x"))
82
- return e.details;
83
- if (e.error && typeof e.error == "object") {
84
- const n = e.error.data;
85
- if (typeof n == "string" && n.startsWith("0x"))
86
- return n;
87
- }
88
- if (e.cause) {
89
- const n = s(e.cause, r + 1);
90
- if (n) return n;
91
- }
92
- if (typeof e.walk == "function")
93
- try {
94
- let n;
95
- if (e.walk((a) => {
96
- if (a === t) return !1;
97
- const u = s(a, r + 1);
98
- return u ? (n = u, !0) : !1;
99
- }), n) return n;
100
- } catch {
101
- }
102
- if (r === 0) {
103
- const a = (typeof e.message == "string" ? e.message : "").match(/\b(0x[a-fA-F0-9]{8})\b/);
104
- if (a) return a[1];
105
- }
106
- }
107
- function b(t) {
108
- const r = c(t);
109
- if (r) {
110
- const e = r.substring(0, 10);
111
- return i[r] ?? i[e];
112
- }
113
- }
114
- function x(t) {
115
- const r = c(t);
116
- if (r === void 0) return !1;
117
- const e = r.substring(0, 10);
118
- return r in i || e in i;
119
- }
120
- function E(t) {
121
- console.error("[Contract Error] Raw error:", t);
122
- const r = c(t);
123
- if (console.error("[Contract Error] Extracted error data:", r), r) {
124
- const n = r.substring(0, 10);
125
- if (n.toLowerCase() === h)
126
- throw new l(
127
- "Peg-in configuration fingerprint changed: the protocol state resolved at inclusion differs from the state this deposit was built against.",
128
- g(r)
129
- );
130
- const a = i[r] ?? i[n];
131
- if (a)
132
- throw console.error("[Contract Error] Known error:", a), new Error(a);
133
- }
134
- const e = (t == null ? void 0 : t.message) || "";
135
- if (e.includes("gas limit too high") || e.includes("21000000") || e.includes("Internal JSON-RPC error")) {
136
- const n = r ? ` (error code: ${r})` : "";
137
- throw console.error(
138
- "[Contract Error] Transaction rejected. Error code:",
139
- r,
140
- "Message:",
141
- e
142
- ), new Error(
143
- `Transaction failed: The contract rejected this transaction${n}. Possible causes: (1) Vault already exists for this transaction, (2) Invalid signature, (3) Unauthorized caller. Please check your transaction parameters and try again.`
144
- );
145
- }
146
- throw t instanceof Error ? (console.error("[Contract Error] Unhandled error:", t.message), t) : new Error(`Contract call failed: ${String(t)}`);
147
- }
148
- const C = [
149
- {
150
- type: "function",
151
- name: "getBtcVaultProtocolInfo",
152
- inputs: [
153
- {
154
- name: "vaultId",
155
- type: "bytes32",
156
- internalType: "bytes32"
157
- }
158
- ],
159
- outputs: [
160
- {
161
- name: "vProtocol",
162
- type: "tuple",
163
- internalType: "struct BTCVaultRegistryTypes.BTCVaultProtocolInfo",
164
- components: [
165
- {
166
- name: "depositorSignedPeginTx",
167
- type: "bytes",
168
- internalType: "bytes"
169
- },
170
- {
171
- name: "universalChallengersVersion",
172
- type: "uint16",
173
- internalType: "uint16"
174
- },
175
- {
176
- name: "appVaultKeepersVersion",
177
- type: "uint16",
178
- internalType: "uint16"
179
- },
180
- {
181
- name: "offchainParamsVersion",
182
- type: "uint16",
183
- internalType: "uint16"
184
- },
185
- {
186
- name: "verifiedAt",
187
- type: "uint256",
188
- internalType: "uint256"
189
- },
190
- {
191
- name: "depositorWotsPkHash",
192
- type: "bytes32",
193
- internalType: "bytes32"
194
- },
195
- {
196
- name: "hashlock",
197
- type: "bytes32",
198
- internalType: "bytes32"
199
- },
200
- {
201
- name: "htlcVout",
202
- type: "uint8",
203
- internalType: "uint8"
204
- },
205
- {
206
- name: "depositorPopSignature",
207
- type: "bytes",
208
- internalType: "bytes"
209
- },
210
- {
211
- name: "prePeginTxHash",
212
- type: "bytes32",
213
- internalType: "bytes32"
214
- },
215
- {
216
- name: "vaultProviderCommissionBps",
217
- type: "uint16",
218
- internalType: "uint16"
219
- },
220
- {
221
- name: "claimExpiredUntil",
222
- type: "uint256",
223
- internalType: "uint256"
224
- },
225
- {
226
- name: "vaultCoreVersion",
227
- type: "uint16",
228
- internalType: "uint16"
229
- },
230
- // RFC-006: per-pegin operation-key epochs, frozen at
231
- // `submitPeginRequest`. All three pack into one storage slot and were
232
- // appended after `vaultCoreVersion` so pre-existing rows decode
233
- // unchanged.
234
- {
235
- name: "vpKeyEpoch",
236
- type: "uint64",
237
- internalType: "uint64"
238
- },
239
- {
240
- name: "appKeeperKeyEpoch",
241
- type: "uint64",
242
- internalType: "uint64"
243
- },
244
- {
245
- name: "ucKeyEpoch",
246
- type: "uint64",
247
- internalType: "uint64"
248
- }
249
- ]
250
- }
251
- ],
252
- stateMutability: "view"
253
- }
254
- ];
255
- export {
256
- C as B,
257
- i as C,
258
- h as P,
259
- l as a,
260
- v as b,
261
- c as e,
262
- b as g,
263
- E as h,
264
- x as i
265
- };
266
- //# sourceMappingURL=BTCVaultRegistryKeyEpochs.abi-BWoxwPQv.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BTCVaultRegistryKeyEpochs.abi-BWoxwPQv.js","sources":["../src/tbv/core/contracts/errors.ts","../src/tbv/core/contracts/abis/BTCVaultRegistryKeyEpochs.abi.ts"],"sourcesContent":["/**\n * Contract Error Handling Utilities\n *\n * Provides utilities for extracting and handling contract revert errors.\n * Maps known error selectors to user-friendly messages.\n *\n * @module contracts/errors\n */\n\nimport { decodeAbiParameters, type Hex } from \"viem\";\n\n/**\n * `PeginFingerprintChanged(bytes32 expected, bytes32 actual)`.\n *\n * Re-derived rather than copied: `keccak256(\"PeginFingerprintChanged(bytes32,bytes32)\")`\n * begins `0x846c25bb`. Source is\n * https://github.com/babylonlabs-io/vault-contracts-aave-v4/pull/555, and the\n * value matches that repo's generated `snapshots/selectors.md` at head\n * 86577e40. `BTCVaultRegistry.abi.ts` carries the matching error entry, and a\n * test asserts the two agree.\n */\nexport const PEGIN_FINGERPRINT_CHANGED_SELECTOR = \"0x846c25bb\";\n\n/** `\"0x\"` + 4-byte selector + two abi-encoded `bytes32` words. */\nconst FINGERPRINT_REVERT_DATA_LENGTH = 2 + 8 + 64 * 2;\n\n/**\n * The registry rejected a peg-in registration because the protocol state it\n * resolves at inclusion no longer matches the state the Pre-Pegin was built\n * against.\n *\n * Typed rather than one more entry in {@link CONTRACT_ERRORS} because the\n * consuming app has to branch on it — this is the one contract revert on the\n * peg-in path with a specific recovery, and matching an English message across\n * a package boundary to find it would be a string nobody can safely reword.\n *\n * `expected` and `actual` are the depositor's fingerprint and the registry's.\n * They are diagnostics only — the difference between \"the chain moved\" and\n * \"our encoder is wrong\" — and must never be shown to a depositor.\n */\nexport class PeginFingerprintChangedError extends Error {\n readonly expected?: Hex;\n readonly actual?: Hex;\n\n constructor(message: string, fingerprints?: { expected: Hex; actual: Hex }) {\n super(message);\n this.name = \"PeginFingerprintChangedError\";\n this.expected = fingerprints?.expected;\n this.actual = fingerprints?.actual;\n }\n}\n\n// `instanceof` alone fails across module boundaries (duplicate copies, test\n// mocks). Fall back to the name field, as the sibling drift guards do.\nexport function isPeginFingerprintChangedError(\n err: unknown,\n): err is PeginFingerprintChangedError {\n return (\n err instanceof PeginFingerprintChangedError ||\n (err instanceof Error && err.name === \"PeginFingerprintChangedError\")\n );\n}\n\n/**\n * Recover the two fingerprints from the revert payload, when there is one.\n *\n * `extractErrorData` sometimes yields only the 4-byte selector — a viem\n * `ContractFunctionRevertedError` that has already decoded the error exposes\n * its signature, not its raw data. Classification has already happened on that\n * selector by the time this runs, so returning `undefined` here loses a\n * diagnostic and nothing else. That is why this may return `undefined` on a\n * critical path and the selector match may not.\n */\nfunction decodeFingerprints(\n errorData: string,\n): { expected: Hex; actual: Hex } | undefined {\n if (errorData.length !== FINGERPRINT_REVERT_DATA_LENGTH) return undefined;\n try {\n const [expected, actual] = decodeAbiParameters(\n [{ type: \"bytes32\" }, { type: \"bytes32\" }],\n `0x${errorData.slice(10)}` as Hex,\n );\n return { expected, actual };\n } catch {\n return undefined;\n }\n}\n\n/**\n * Known contract error signatures mapped to user-friendly messages.\n *\n * Error selectors are the first 4 bytes of keccak256(error signature).\n * Example: keccak256(\"VaultAlreadyExists()\") = 0x04aabf33...\n */\nexport const CONTRACT_ERRORS: Record<string, string> = {\n // VaultAlreadyExists()\n \"0x04aabf33\":\n \"Vault already exists: This Bitcoin transaction has already been registered. \" +\n \"Please select different UTXOs or use a different amount to create a unique transaction.\",\n // ScriptPubKeyMismatch() - taproot output doesn't match expected script\n \"0x4fec082d\":\n \"Script mismatch: The Bitcoin transaction's taproot output does not match the expected vault script. \" +\n \"This may be caused by incorrect vault participants or key configuration.\",\n // InvalidBTCProofOfPossession()\n \"0x6cc363a5\":\n \"Invalid BTC proof of possession: The signature could not be verified. \" +\n \"Please ensure you're signing with the correct Bitcoin wallet.\",\n // InvalidBTCPublicKey()\n \"0x6c3f2bf6\":\n \"Invalid BTC public key: The Bitcoin public key format is invalid.\",\n // InvalidAmount()\n \"0x2c5211c6\":\n \"Invalid amount: The deposit amount is invalid or below the minimum required.\",\n // ApplicationNotRegistered()\n \"0x0405f772\":\n \"Application not registered: The application controller is not registered in the system.\",\n // InvalidProviderStatus()\n \"0x24e165cc\":\n \"Invalid provider status: The vault provider is not in a valid state to accept deposits.\",\n // ZeroAddress()\n \"0xd92e233d\":\n \"Zero address: One of the required addresses is the zero address.\",\n // BtcKeyMismatch()\n \"0x65aa7007\":\n \"BTC key mismatch: The Bitcoin public key does not match the expected key.\",\n // Unauthorized()\n \"0x82b42900\":\n \"Unauthorized: You must be the depositor or vault provider to submit this transaction.\",\n // InvalidSignature() - common signature verification error\n \"0x8baa579f\":\n \"Invalid signature: The BTC proof of possession signature could not be verified.\",\n // InvalidBtcTransaction()\n \"0x2f9d01e9\":\n \"Invalid BTC transaction: The Bitcoin transaction format is invalid.\",\n // VaultProviderNotRegistered()\n \"0x5a3c6b3e\":\n \"Vault provider not registered: The selected vault provider is not registered.\",\n // InvalidPeginFee(uint256,uint256)\n \"0x979f4518\":\n \"Invalid pegin fee: The ETH fee sent does not match the required amount. \" +\n \"This may indicate a fee rate change during the transaction.\",\n // PrePeginOutputAlreadyUsed()\n \"0x5fad9694\":\n \"This pre-pegin output has already been used to activate another vault.\",\n // PeginTransactionAlreadyUsed()\n \"0x7ed061c9\":\n \"This pegin transaction has already been used to activate another vault.\",\n // DuplicateHashlock() — keccak256(abi.encodePacked(hashlock, msg.sender))\n // collision in BTCVaultRegistry.hashlockToVaultId. Hashlocks are derived\n // deterministically from the depositor's BTC wallet + selected UTXOs, so\n // reusing the same UTXOs from the same wallet (even after a previous\n // vault expires) produces the same hashlock and reverts here.\n \"0x70f7d5e2\":\n \"Duplicate deposit: a BTC Vault with this hashlock is already registered to your wallet. Hashlocks are derived from your BTC wallet and selected UTXOs — use different UTXOs to create a unique deposit.\",\n};\n\n/**\n * Extract error data from various error formats.\n *\n * Viem and wallet providers wrap errors in multiple levels. This function\n * searches through the error chain to find the revert data.\n *\n * @param error - The error object to extract data from\n * @returns The error data (e.g., \"0x04aabf33\") or undefined\n */\nexport function extractErrorData(error: unknown): string | undefined {\n return walkForErrorData(error, 0);\n}\n\n/**\n * Walk an error chain looking for revert data in any of viem 2.x's known\n * shapes. Covers:\n * - `.data: \"0x...\"` — raw revert hex (most common with `estimateGas`)\n * - `.revertData: \"0x...\"` — alternate viem shape\n * - `.signature: \"0x...\"` — 4-byte selector from a *decoded*\n * ContractFunctionRevertedError (set when the ABI included the error def)\n * - `.error.data: \"0x...\"` — RPC-level error shape from some providers\n * - `.walk(fn)` — viem's chainable error walker (BaseError.walk)\n * - `.cause` chain — viem wraps errors many layers deep\n *\n * Depth-limited (10) and walk-result-deduplicated so a cycle can't loop.\n */\nfunction walkForErrorData(\n error: unknown,\n depth: number,\n): string | undefined {\n if (depth > 10 || !error || typeof error !== \"object\") return undefined;\n\n const err = error as Record<string, unknown>;\n\n if (typeof err.data === \"string\" && err.data.startsWith(\"0x\")) {\n return err.data;\n }\n if (typeof err.revertData === \"string\" && err.revertData.startsWith(\"0x\")) {\n return err.revertData;\n }\n if (typeof err.signature === \"string\" && err.signature.startsWith(\"0x\")) {\n return err.signature;\n }\n if (typeof err.details === \"string\" && err.details.startsWith(\"0x\")) {\n return err.details;\n }\n\n // RPC-level error shape (`{ error: { data: \"0x...\" } }`)\n if (err.error && typeof err.error === \"object\") {\n const inner = (err.error as Record<string, unknown>).data;\n if (typeof inner === \"string\" && inner.startsWith(\"0x\")) {\n return inner;\n }\n }\n\n // Recurse through `.cause`\n if (err.cause) {\n const fromCause = walkForErrorData(err.cause, depth + 1);\n if (fromCause) return fromCause;\n }\n\n // Use viem's `.walk()` if available\n if (typeof err.walk === \"function\") {\n try {\n let found: string | undefined;\n (err.walk as (fn: (e: unknown) => boolean) => unknown)((e) => {\n if (e === error) return false; // avoid self-cycle\n const data = walkForErrorData(e, depth + 1);\n if (data) {\n found = data;\n return true;\n }\n return false;\n });\n if (found) return found;\n } catch {\n // walk failed; ignore\n }\n }\n\n // Last resort: regex an embedded hex selector out of the message\n if (depth === 0) {\n const message = typeof err.message === \"string\" ? err.message : \"\";\n const hexMatch = message.match(/\\b(0x[a-fA-F0-9]{8})\\b/);\n if (hexMatch) return hexMatch[1];\n }\n\n return undefined;\n}\n\n/**\n * Get a user-friendly error message for a contract error.\n *\n * Reads {@link CONTRACT_ERRORS} only, so it reports `PeginFingerprintChanged`\n * as unrecognised even though {@link handleContractError} throws a typed error\n * for it. That revert deliberately has no message-table entry: consumers branch\n * on {@link PeginFingerprintChangedError} and supply their own copy.\n *\n * @param error - The error object from a contract call\n * @returns A user-friendly error message, or undefined if error is not recognized\n */\nexport function getContractErrorMessage(error: unknown): string | undefined {\n const errorData = extractErrorData(error);\n if (errorData) {\n // Check exact match first, then match by 4-byte selector prefix.\n // Parametric errors (e.g. InvalidPeginFee(uint256,uint256)) return\n // the selector + ABI-encoded args, so the full string won't match.\n const selector = errorData.substring(0, 10); // \"0x\" + 4 bytes\n return CONTRACT_ERRORS[errorData] ?? CONTRACT_ERRORS[selector];\n }\n return undefined;\n}\n\n/**\n * Check if an error is a known contract error.\n *\n * \"Known\" means present in {@link CONTRACT_ERRORS}, so this returns `false` for\n * `PeginFingerprintChanged` — see {@link getContractErrorMessage} for why that\n * revert is typed instead of tabled. Use\n * {@link isPeginFingerprintChangedError} to recognise it.\n *\n * @param error - The error object to check\n * @returns True if the error is a known contract error\n */\nexport function isKnownContractError(error: unknown): boolean {\n const errorData = extractErrorData(error);\n if (errorData === undefined) return false;\n const selector = errorData.substring(0, 10);\n return errorData in CONTRACT_ERRORS || selector in CONTRACT_ERRORS;\n}\n\n/**\n * Handle a contract error by throwing a user-friendly error.\n *\n * This function extracts error data, maps it to a user-friendly message,\n * and throws an appropriate error. Use this in catch blocks after contract calls.\n *\n * @param error - The error from a contract call\n * @throws Always throws an error with a descriptive message\n */\nexport function handleContractError(error: unknown): never {\n // Log full error for debugging\n console.error(\"[Contract Error] Raw error:\", error);\n\n // Extract error data from the error chain\n const errorData = extractErrorData(error);\n console.error(\"[Contract Error] Extracted error data:\", errorData);\n\n // Check for known contract error signatures (exact match or 4-byte selector prefix)\n if (errorData) {\n const selector = errorData.substring(0, 10);\n\n // Typed ahead of the message map: the peg-in path branches on this one\n // rather than rendering it, and the two fingerprints are worth keeping.\n //\n // Lowercased before comparing because `extractErrorData` accepts mixed-case\n // hex — its last-resort message regex matches `[a-fA-F0-9]`, and `err.data`\n // from an arbitrary RPC provider carries no casing guarantee. viem returns\n // lowercase in practice, so this is belt-and-braces; but the app branches\n // on this selector, and a silent miss would drop the whole recovery path.\n if (selector.toLowerCase() === PEGIN_FINGERPRINT_CHANGED_SELECTOR) {\n throw new PeginFingerprintChangedError(\n \"Peg-in configuration fingerprint changed: the protocol state resolved \" +\n \"at inclusion differs from the state this deposit was built against.\",\n decodeFingerprints(errorData),\n );\n }\n\n const knownError = CONTRACT_ERRORS[errorData] ?? CONTRACT_ERRORS[selector];\n if (knownError) {\n console.error(\"[Contract Error] Known error:\", knownError);\n throw new Error(knownError);\n }\n }\n\n // Check for gas estimation errors or internal JSON-RPC errors\n const errorMsg = (error as Error)?.message || \"\";\n if (\n errorMsg.includes(\"gas limit too high\") ||\n errorMsg.includes(\"21000000\") ||\n errorMsg.includes(\"Internal JSON-RPC error\")\n ) {\n // If we found error data but it's not in our known list, include it\n const errorHint = errorData ? ` (error code: ${errorData})` : \"\";\n console.error(\n \"[Contract Error] Transaction rejected. Error code:\",\n errorData,\n \"Message:\",\n errorMsg,\n );\n throw new Error(\n `Transaction failed: The contract rejected this transaction${errorHint}. ` +\n \"Possible causes: (1) Vault already exists for this transaction, \" +\n \"(2) Invalid signature, (3) Unauthorized caller. \" +\n \"Please check your transaction parameters and try again.\",\n );\n }\n\n // Default: re-throw original error with better context\n if (error instanceof Error) {\n console.error(\"[Contract Error] Unhandled error:\", error.message);\n throw error;\n }\n throw new Error(`Contract call failed: ${String(error)}`);\n}\n","/**\n * BTCVaultRegistry ABI — RFC-006 key-epoch view of `getBtcVaultProtocolInfo`.\n *\n * This is a deliberate second copy of a single function entry, NOT a\n * convenience re-export, and it must never be merged into\n * `BTCVaultRegistryABI`.\n *\n * `getBtcVaultProtocolInfo` returns a *positional* tuple. RFC-006 appended\n * three `uint64` epoch fields (`vpKeyEpoch`, `appKeeperKeyEpoch`,\n * `ucKeyEpoch`) after `vaultCoreVersion`. Declaring those three components\n * against a registry that predates RFC-006 makes viem read past the end of\n * the returndata and throw — and because the shared reader batches this call\n * through `multicall({ allowFailure: false })`, one bad decode fails the\n * whole batch. That would break vault status, resume, payout and refund\n * app-wide, on every network whose registry has not been upgraded yet.\n *\n * So the shared `BTCVaultRegistryABI` keeps the 13-field shape that decodes\n * against every deployed registry, and the extended shape lives here, read\n * only by `ViemVaultRegistryReader.getVaultKeyEpochs*` on the epoch-aware\n * path. Reading the same call through two ABIs is the price of keeping the\n * shared decode path independent of the registry version.\n *\n * The 13 shared components must stay an exact prefix of the 16 below;\n * `__tests__/abi-key-epochs.test.ts` pins that.\n *\n * Generated from vault-contracts-aave-v4\n * `src/protocol/lib/types/BTCVaultRegistryTypes.sol`.\n *\n * @module contracts/abis/BTCVaultRegistryKeyEpochs\n */\n\nexport const BTCVaultRegistryKeyEpochsABI = [\n {\n type: \"function\",\n name: \"getBtcVaultProtocolInfo\",\n inputs: [\n {\n name: \"vaultId\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n outputs: [\n {\n name: \"vProtocol\",\n type: \"tuple\",\n internalType: \"struct BTCVaultRegistryTypes.BTCVaultProtocolInfo\",\n components: [\n {\n name: \"depositorSignedPeginTx\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"universalChallengersVersion\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"appVaultKeepersVersion\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"offchainParamsVersion\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"verifiedAt\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n {\n name: \"depositorWotsPkHash\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"hashlock\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"htlcVout\",\n type: \"uint8\",\n internalType: \"uint8\",\n },\n {\n name: \"depositorPopSignature\",\n type: \"bytes\",\n internalType: \"bytes\",\n },\n {\n name: \"prePeginTxHash\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n {\n name: \"vaultProviderCommissionBps\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"claimExpiredUntil\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n {\n name: \"vaultCoreVersion\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n // RFC-006: per-pegin operation-key epochs, frozen at\n // `submitPeginRequest`. All three pack into one storage slot and were\n // appended after `vaultCoreVersion` so pre-existing rows decode\n // unchanged.\n {\n name: \"vpKeyEpoch\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"appKeeperKeyEpoch\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"ucKeyEpoch\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n] as const;\n"],"names":["PEGIN_FINGERPRINT_CHANGED_SELECTOR","FINGERPRINT_REVERT_DATA_LENGTH","PeginFingerprintChangedError","message","fingerprints","__publicField","isPeginFingerprintChangedError","err","decodeFingerprints","errorData","expected","actual","decodeAbiParameters","CONTRACT_ERRORS","extractErrorData","error","walkForErrorData","depth","inner","fromCause","found","e","data","hexMatch","getContractErrorMessage","selector","isKnownContractError","handleContractError","knownError","errorMsg","errorHint","BTCVaultRegistryKeyEpochsABI"],"mappings":";;;;AAqBO,MAAMA,IAAqC,cAG5CC,IAAiC;AAgBhC,MAAMC,UAAqC,MAAM;AAAA,EAItD,YAAYC,GAAiBC,GAA+C;AAC1E,UAAMD,CAAO;AAJN,IAAAE,EAAA;AACA,IAAAA,EAAA;AAIP,SAAK,OAAO,gCACZ,KAAK,WAAWD,KAAA,gBAAAA,EAAc,UAC9B,KAAK,SAASA,KAAA,gBAAAA,EAAc;AAAA,EAC9B;AACF;AAI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AErB;"}
@@ -1,2 +0,0 @@
1
- "use strict";var p=Object.defineProperty;var y=(t,r,e)=>r in t?p(t,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[r]=e;var s=(t,r,e)=>y(t,typeof r!="symbol"?r+"":r,e);const h=require("viem"),d="0x846c25bb",f=138;class u extends Error{constructor(e,n){super(e);s(this,"expected");s(this,"actual");this.name="PeginFingerprintChangedError",this.expected=n==null?void 0:n.expected,this.actual=n==null?void 0:n.actual}}function g(t){return t instanceof u||t instanceof Error&&t.name==="PeginFingerprintChangedError"}function T(t){if(t.length===f)try{const[r,e]=h.decodeAbiParameters([{type:"bytes32"},{type:"bytes32"}],`0x${t.slice(10)}`);return{expected:r,actual:e}}catch{return}}const i={"0x04aabf33":"Vault already exists: This Bitcoin transaction has already been registered. Please select different UTXOs or use a different amount to create a unique transaction.","0x4fec082d":"Script mismatch: The Bitcoin transaction's taproot output does not match the expected vault script. This may be caused by incorrect vault participants or key configuration.","0x6cc363a5":"Invalid BTC proof of possession: The signature could not be verified. Please ensure you're signing with the correct Bitcoin wallet.","0x6c3f2bf6":"Invalid BTC public key: The Bitcoin public key format is invalid.","0x2c5211c6":"Invalid amount: The deposit amount is invalid or below the minimum required.","0x0405f772":"Application not registered: The application controller is not registered in the system.","0x24e165cc":"Invalid provider status: The vault provider is not in a valid state to accept deposits.","0xd92e233d":"Zero address: One of the required addresses is the zero address.","0x65aa7007":"BTC key mismatch: The Bitcoin public key does not match the expected key.","0x82b42900":"Unauthorized: You must be the depositor or vault provider to submit this transaction.","0x8baa579f":"Invalid signature: The BTC proof of possession signature could not be verified.","0x2f9d01e9":"Invalid BTC transaction: The Bitcoin transaction format is invalid.","0x5a3c6b3e":"Vault provider not registered: The selected vault provider is not registered.","0x979f4518":"Invalid pegin fee: The ETH fee sent does not match the required amount. This may indicate a fee rate change during the transaction.","0x5fad9694":"This pre-pegin output has already been used to activate another vault.","0x7ed061c9":"This pegin transaction has already been used to activate another vault.","0x70f7d5e2":"Duplicate deposit: a BTC Vault with this hashlock is already registered to your wallet. Hashlocks are derived from your BTC wallet and selected UTXOs — use different UTXOs to create a unique deposit."};function o(t){return c(t,0)}function c(t,r){if(r>10||!t||typeof t!="object")return;const e=t;if(typeof e.data=="string"&&e.data.startsWith("0x"))return e.data;if(typeof e.revertData=="string"&&e.revertData.startsWith("0x"))return e.revertData;if(typeof e.signature=="string"&&e.signature.startsWith("0x"))return e.signature;if(typeof e.details=="string"&&e.details.startsWith("0x"))return e.details;if(e.error&&typeof e.error=="object"){const n=e.error.data;if(typeof n=="string"&&n.startsWith("0x"))return n}if(e.cause){const n=c(e.cause,r+1);if(n)return n}if(typeof e.walk=="function")try{let n;if(e.walk(a=>{if(a===t)return!1;const l=c(a,r+1);return l?(n=l,!0):!1}),n)return n}catch{}if(r===0){const a=(typeof e.message=="string"?e.message:"").match(/\b(0x[a-fA-F0-9]{8})\b/);if(a)return a[1]}}function m(t){const r=o(t);if(r){const e=r.substring(0,10);return i[r]??i[e]}}function E(t){const r=o(t);if(r===void 0)return!1;const e=r.substring(0,10);return r in i||e in i}function v(t){console.error("[Contract Error] Raw error:",t);const r=o(t);if(console.error("[Contract Error] Extracted error data:",r),r){const n=r.substring(0,10);if(n.toLowerCase()===d)throw new u("Peg-in configuration fingerprint changed: the protocol state resolved at inclusion differs from the state this deposit was built against.",T(r));const a=i[r]??i[n];if(a)throw console.error("[Contract Error] Known error:",a),new Error(a)}const e=(t==null?void 0:t.message)||"";if(e.includes("gas limit too high")||e.includes("21000000")||e.includes("Internal JSON-RPC error")){const n=r?` (error code: ${r})`:"";throw console.error("[Contract Error] Transaction rejected. Error code:",r,"Message:",e),new Error(`Transaction failed: The contract rejected this transaction${n}. Possible causes: (1) Vault already exists for this transaction, (2) Invalid signature, (3) Unauthorized caller. Please check your transaction parameters and try again.`)}throw t instanceof Error?(console.error("[Contract Error] Unhandled error:",t.message),t):new Error(`Contract call failed: ${String(t)}`)}const b=[{type:"function",name:"getBtcVaultProtocolInfo",inputs:[{name:"vaultId",type:"bytes32",internalType:"bytes32"}],outputs:[{name:"vProtocol",type:"tuple",internalType:"struct BTCVaultRegistryTypes.BTCVaultProtocolInfo",components:[{name:"depositorSignedPeginTx",type:"bytes",internalType:"bytes"},{name:"universalChallengersVersion",type:"uint16",internalType:"uint16"},{name:"appVaultKeepersVersion",type:"uint16",internalType:"uint16"},{name:"offchainParamsVersion",type:"uint16",internalType:"uint16"},{name:"verifiedAt",type:"uint256",internalType:"uint256"},{name:"depositorWotsPkHash",type:"bytes32",internalType:"bytes32"},{name:"hashlock",type:"bytes32",internalType:"bytes32"},{name:"htlcVout",type:"uint8",internalType:"uint8"},{name:"depositorPopSignature",type:"bytes",internalType:"bytes"},{name:"prePeginTxHash",type:"bytes32",internalType:"bytes32"},{name:"vaultProviderCommissionBps",type:"uint16",internalType:"uint16"},{name:"claimExpiredUntil",type:"uint256",internalType:"uint256"},{name:"vaultCoreVersion",type:"uint16",internalType:"uint16"},{name:"vpKeyEpoch",type:"uint64",internalType:"uint64"},{name:"appKeeperKeyEpoch",type:"uint64",internalType:"uint64"},{name:"ucKeyEpoch",type:"uint64",internalType:"uint64"}]}],stateMutability:"view"}];exports.BTCVaultRegistryKeyEpochsABI=b;exports.CONTRACT_ERRORS=i;exports.PEGIN_FINGERPRINT_CHANGED_SELECTOR=d;exports.PeginFingerprintChangedError=u;exports.extractErrorData=o;exports.getContractErrorMessage=m;exports.handleContractError=v;exports.isKnownContractError=E;exports.isPeginFingerprintChangedError=g;
2
- //# sourceMappingURL=BTCVaultRegistryKeyEpochs.abi-DCJnzKer.cjs.map