@babylonlabs-io/ts-sdk 3.0.2 → 3.1.1

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 (266) hide show
  1. package/dist/ApplicationRegistry.abi-s8cQ1ooR.js +160 -0
  2. package/dist/ApplicationRegistry.abi-s8cQ1ooR.js.map +1 -0
  3. package/dist/ApplicationRegistry.abi-sMiTWmnL.cjs +2 -0
  4. package/dist/ApplicationRegistry.abi-sMiTWmnL.cjs.map +1 -0
  5. package/dist/{BTCVaultRegistry.abi-BQ5tFNSu.cjs → BTCVaultRegistry.abi-CohlJX7c.cjs} +2 -2
  6. package/dist/{BTCVaultRegistry.abi-BQ5tFNSu.cjs.map → BTCVaultRegistry.abi-CohlJX7c.cjs.map} +1 -1
  7. package/dist/{BTCVaultRegistry.abi-B0x9_Bza.js → BTCVaultRegistry.abi-DBW0dyqH.js} +63 -1
  8. package/dist/{BTCVaultRegistry.abi-B0x9_Bza.js.map → BTCVaultRegistry.abi-DBW0dyqH.js.map} +1 -1
  9. package/dist/{PayoutManager-BSwbUQeF.js → PayoutManager-BZ212yml.js} +124 -123
  10. package/dist/PayoutManager-BZ212yml.js.map +1 -0
  11. package/dist/PayoutManager-DOdsgcUR.cjs +2 -0
  12. package/dist/PayoutManager-DOdsgcUR.cjs.map +1 -0
  13. package/dist/PeginManager-8EUlm10F.cjs +2 -0
  14. package/dist/{PeginManager-IgDHy_eU.cjs.map → PeginManager-8EUlm10F.cjs.map} +1 -1
  15. package/dist/{PeginManager-D8WGB8eN.js → PeginManager-QRwMUxZg.js} +45 -43
  16. package/dist/{PeginManager-D8WGB8eN.js.map → PeginManager-QRwMUxZg.js.map} +1 -1
  17. package/dist/{ProtocolParams.abi-q0AidvYX.js → ProtocolParams.abi-CKOVqFJP.js} +2 -158
  18. package/dist/ProtocolParams.abi-CKOVqFJP.js.map +1 -0
  19. package/dist/ProtocolParams.abi-CjrT0545.cjs +2 -0
  20. package/dist/ProtocolParams.abi-CjrT0545.cjs.map +1 -0
  21. package/dist/btcTxHash-BRZ8_EZq.js +9 -0
  22. package/dist/btcTxHash-BRZ8_EZq.js.map +1 -0
  23. package/dist/btcTxHash-CGb5BqFL.cjs +2 -0
  24. package/dist/btcTxHash-CGb5BqFL.cjs.map +1 -0
  25. package/dist/buildAndBroadcastReclaim-DjX7wVb2.cjs +2 -0
  26. package/dist/buildAndBroadcastReclaim-DjX7wVb2.cjs.map +1 -0
  27. package/dist/buildAndBroadcastReclaim-DoprHX7o.js +3077 -0
  28. package/dist/buildAndBroadcastReclaim-DoprHX7o.js.map +1 -0
  29. package/dist/buildVaultContextInputForClaim-9XZaqIiw.cjs +2 -0
  30. package/dist/buildVaultContextInputForClaim-9XZaqIiw.cjs.map +1 -0
  31. package/dist/buildVaultContextInputForClaim-DhBoQKyN.js +25 -0
  32. package/dist/buildVaultContextInputForClaim-DhBoQKyN.js.map +1 -0
  33. package/dist/constants-BeYquVd-.js +36 -0
  34. package/dist/constants-BeYquVd-.js.map +1 -0
  35. package/dist/constants-BwCg5K6R.cjs +2 -0
  36. package/dist/constants-BwCg5K6R.cjs.map +1 -0
  37. package/dist/{index-D2mybjXD.js → index-CVBtBjQ5.js} +2 -2
  38. package/dist/{index-D2mybjXD.js.map → index-CVBtBjQ5.js.map} +1 -1
  39. package/dist/{index-MRdle0fs.cjs → index-DpjYs5yr.cjs} +2 -2
  40. package/dist/{index-MRdle0fs.cjs.map → index-DpjYs5yr.cjs.map} +1 -1
  41. package/dist/index.cjs +1 -1
  42. package/dist/index.js +288 -260
  43. package/dist/index.js.map +1 -1
  44. package/dist/{noPayout-qBXWKwav.js → noPayout-B-vGXJ-V.js} +3 -3
  45. package/dist/{noPayout-qBXWKwav.js.map → noPayout-B-vGXJ-V.js.map} +1 -1
  46. package/dist/{noPayout-DAWBQ0eG.cjs → noPayout-DOHak0ui.cjs} +2 -2
  47. package/dist/{noPayout-DAWBQ0eG.cjs.map → noPayout-DOHak0ui.cjs.map} +1 -1
  48. package/dist/pegin-registration-client-BWMwxtr8.js +718 -0
  49. package/dist/pegin-registration-client-BWMwxtr8.js.map +1 -0
  50. package/dist/pegin-registration-client-D4EguWaz.cjs +2 -0
  51. package/dist/pegin-registration-client-D4EguWaz.cjs.map +1 -0
  52. package/dist/{primeVpAuth-BDWBKYhv.cjs → primeVpAuth-BPj2TPdD.cjs} +2 -2
  53. package/dist/{primeVpAuth-BDWBKYhv.cjs.map → primeVpAuth-BPj2TPdD.cjs.map} +1 -1
  54. package/dist/{primeVpAuth-D0ZnsjRi.js → primeVpAuth-CiCdRNGf.js} +2 -2
  55. package/dist/{primeVpAuth-D0ZnsjRi.js.map → primeVpAuth-CiCdRNGf.js.map} +1 -1
  56. package/dist/registration-records-CKLAv3gw.js +447 -0
  57. package/dist/registration-records-CKLAv3gw.js.map +1 -0
  58. package/dist/registration-records-DFQgBaYi.cjs +2 -0
  59. package/dist/registration-records-DFQgBaYi.cjs.map +1 -0
  60. package/dist/{secp256k1-D-H9jmd7.js → secp256k1-BuxBFUHm.js} +3 -3
  61. package/dist/{secp256k1-D-H9jmd7.js.map → secp256k1-BuxBFUHm.js.map} +1 -1
  62. package/dist/signer-set-reader-C1VmC9_U.js +264 -0
  63. package/dist/signer-set-reader-C1VmC9_U.js.map +1 -0
  64. package/dist/signer-set-reader-C6g47hdk.cjs +2 -0
  65. package/dist/signer-set-reader-C6g47hdk.cjs.map +1 -0
  66. package/dist/{signing-Dhr2t0Z6.js → signing-C1rR4tqs.js} +9 -15
  67. package/dist/signing-C1rR4tqs.js.map +1 -0
  68. package/dist/signing-DvISftFk.cjs +2 -0
  69. package/dist/signing-DvISftFk.cjs.map +1 -0
  70. package/dist/tbv/core/clients/eth/__tests__/registration-records.test.d.ts +2 -0
  71. package/dist/tbv/core/clients/eth/__tests__/registration-records.test.d.ts.map +1 -0
  72. package/dist/tbv/core/clients/eth/claimable-event-error.d.ts +14 -0
  73. package/dist/tbv/core/clients/eth/claimable-event-error.d.ts.map +1 -0
  74. package/dist/tbv/core/clients/eth/index.cjs +1 -1
  75. package/dist/tbv/core/clients/eth/index.d.ts +3 -1
  76. package/dist/tbv/core/clients/eth/index.d.ts.map +1 -1
  77. package/dist/tbv/core/clients/eth/index.js +27 -21
  78. package/dist/tbv/core/clients/eth/index.js.map +1 -1
  79. package/dist/tbv/core/clients/eth/payout-script.d.ts +8 -0
  80. package/dist/tbv/core/clients/eth/payout-script.d.ts.map +1 -1
  81. package/dist/tbv/core/clients/eth/protocol-params-reader.d.ts +13 -0
  82. package/dist/tbv/core/clients/eth/protocol-params-reader.d.ts.map +1 -1
  83. package/dist/tbv/core/clients/eth/registration-logs-error.d.ts +11 -1
  84. package/dist/tbv/core/clients/eth/registration-logs-error.d.ts.map +1 -1
  85. package/dist/tbv/core/clients/eth/registration-records.d.ts +29 -0
  86. package/dist/tbv/core/clients/eth/registration-records.d.ts.map +1 -0
  87. package/dist/tbv/core/clients/eth/types.d.ts +120 -3
  88. package/dist/tbv/core/clients/eth/types.d.ts.map +1 -1
  89. package/dist/tbv/core/clients/eth/vault-registry-reader.d.ts +9 -10
  90. package/dist/tbv/core/clients/eth/vault-registry-reader.d.ts.map +1 -1
  91. package/dist/tbv/core/clients/index.cjs +1 -1
  92. package/dist/tbv/core/clients/index.js +56 -50
  93. package/dist/tbv/core/clients/index.js.map +1 -1
  94. package/dist/tbv/core/clients/vault-provider/status/index.cjs +1 -1
  95. package/dist/tbv/core/clients/vault-provider/status/index.js +1 -1
  96. package/dist/tbv/core/contracts/abis/BTCVaultRegistry.abi.d.ts +45 -0
  97. package/dist/tbv/core/contracts/abis/BTCVaultRegistry.abi.d.ts.map +1 -1
  98. package/dist/tbv/core/contracts/index.cjs +1 -1
  99. package/dist/tbv/core/contracts/index.js +16 -15
  100. package/dist/tbv/core/contracts/index.js.map +1 -1
  101. package/dist/tbv/core/deposit-terms/__tests__/claimSiblings.test.d.ts +2 -0
  102. package/dist/tbv/core/deposit-terms/__tests__/claimSiblings.test.d.ts.map +1 -0
  103. package/dist/tbv/core/deposit-terms/__tests__/fixtures/realFundedPrePegin.d.ts +29 -0
  104. package/dist/tbv/core/deposit-terms/__tests__/fixtures/realFundedPrePegin.d.ts.map +1 -0
  105. package/dist/tbv/core/deposit-terms/__tests__/fundedPrePeginFee.test.d.ts +2 -0
  106. package/dist/tbv/core/deposit-terms/__tests__/fundedPrePeginFee.test.d.ts.map +1 -0
  107. package/dist/tbv/core/deposit-terms/__tests__/rebuildDepositTermsForClaim.golden.test.d.ts +2 -0
  108. package/dist/tbv/core/deposit-terms/__tests__/rebuildDepositTermsForClaim.golden.test.d.ts.map +1 -0
  109. package/dist/tbv/core/deposit-terms/__tests__/rebuildDepositTermsForClaim.test.d.ts +2 -0
  110. package/dist/tbv/core/deposit-terms/__tests__/rebuildDepositTermsForClaim.test.d.ts.map +1 -0
  111. package/dist/tbv/core/deposit-terms/claimSiblings.d.ts +23 -0
  112. package/dist/tbv/core/deposit-terms/claimSiblings.d.ts.map +1 -0
  113. package/dist/tbv/core/deposit-terms/fundedPrePeginFee.d.ts +15 -0
  114. package/dist/tbv/core/deposit-terms/fundedPrePeginFee.d.ts.map +1 -0
  115. package/dist/tbv/core/deposit-terms/index.d.ts +3 -0
  116. package/dist/tbv/core/deposit-terms/index.d.ts.map +1 -1
  117. package/dist/tbv/core/deposit-terms/rebuildDepositTermsForClaim.d.ts +40 -0
  118. package/dist/tbv/core/deposit-terms/rebuildDepositTermsForClaim.d.ts.map +1 -0
  119. package/dist/tbv/core/index.cjs +1 -1
  120. package/dist/tbv/core/index.js +287 -259
  121. package/dist/tbv/core/index.js.map +1 -1
  122. package/dist/tbv/core/managers/index.cjs +1 -1
  123. package/dist/tbv/core/managers/index.js +2 -2
  124. package/dist/tbv/core/managers/pegin/signPsbtsWithFallback.d.ts +6 -2
  125. package/dist/tbv/core/managers/pegin/signPsbtsWithFallback.d.ts.map +1 -1
  126. package/dist/tbv/core/primitives/index.cjs +1 -1
  127. package/dist/tbv/core/primitives/index.js +4 -4
  128. package/dist/tbv/core/primitives/psbt/constants.d.ts +54 -6
  129. package/dist/tbv/core/primitives/psbt/constants.d.ts.map +1 -1
  130. package/dist/tbv/core/services/delegated-claim/__tests__/assembleWatchtowerArtifactsFromSignatures.test.d.ts +2 -0
  131. package/dist/tbv/core/services/delegated-claim/__tests__/assembleWatchtowerArtifactsFromSignatures.test.d.ts.map +1 -0
  132. package/dist/tbv/core/services/delegated-claim/__tests__/assertBinding.test.d.ts +2 -0
  133. package/dist/tbv/core/services/delegated-claim/__tests__/assertBinding.test.d.ts.map +1 -0
  134. package/dist/tbv/core/services/delegated-claim/__tests__/assertPayoutFeeAndTimelocks.test.d.ts +2 -0
  135. package/dist/tbv/core/services/delegated-claim/__tests__/assertPayoutFeeAndTimelocks.test.d.ts.map +1 -0
  136. package/dist/tbv/core/services/delegated-claim/__tests__/fixtures/delegatedClaimPsbts.d.ts +49 -0
  137. package/dist/tbv/core/services/delegated-claim/__tests__/fixtures/delegatedClaimPsbts.d.ts.map +1 -0
  138. package/dist/tbv/core/services/delegated-claim/__tests__/payoutBinding.test.d.ts +2 -0
  139. package/dist/tbv/core/services/delegated-claim/__tests__/payoutBinding.test.d.ts.map +1 -0
  140. package/dist/tbv/core/services/delegated-claim/__tests__/payoutInputLeaf.test.d.ts +2 -0
  141. package/dist/tbv/core/services/delegated-claim/__tests__/payoutInputLeaf.test.d.ts.map +1 -0
  142. package/dist/tbv/core/services/delegated-claim/__tests__/planDelegatedClaimSigning.test.d.ts +2 -0
  143. package/dist/tbv/core/services/delegated-claim/__tests__/planDelegatedClaimSigning.test.d.ts.map +1 -0
  144. package/dist/tbv/core/services/delegated-claim/__tests__/readDelegatedClaimVaultContext.test.d.ts +2 -0
  145. package/dist/tbv/core/services/delegated-claim/__tests__/readDelegatedClaimVaultContext.test.d.ts.map +1 -0
  146. package/dist/tbv/core/services/delegated-claim/__tests__/realSchnorrVerification.test.d.ts +2 -0
  147. package/dist/tbv/core/services/delegated-claim/__tests__/realSchnorrVerification.test.d.ts.map +1 -0
  148. package/dist/tbv/core/services/delegated-claim/__tests__/signDelegatedClaimPlan.test.d.ts +2 -0
  149. package/dist/tbv/core/services/delegated-claim/__tests__/signDelegatedClaimPlan.test.d.ts.map +1 -0
  150. package/dist/tbv/core/services/delegated-claim/__tests__/signingRequests.test.d.ts +2 -0
  151. package/dist/tbv/core/services/delegated-claim/__tests__/signingRequests.test.d.ts.map +1 -0
  152. package/dist/tbv/core/services/delegated-claim/assembleWatchtowerArtifacts.d.ts +34 -9
  153. package/dist/tbv/core/services/delegated-claim/assembleWatchtowerArtifacts.d.ts.map +1 -1
  154. package/dist/tbv/core/services/delegated-claim/assembleWatchtowerArtifactsFromSignatures.d.ts +36 -0
  155. package/dist/tbv/core/services/delegated-claim/assembleWatchtowerArtifactsFromSignatures.d.ts.map +1 -0
  156. package/dist/tbv/core/services/delegated-claim/assertBinding.d.ts +37 -0
  157. package/dist/tbv/core/services/delegated-claim/assertBinding.d.ts.map +1 -0
  158. package/dist/tbv/core/services/delegated-claim/assertPayoutFeeAndTimelocks.d.ts +35 -0
  159. package/dist/tbv/core/services/delegated-claim/assertPayoutFeeAndTimelocks.d.ts.map +1 -0
  160. package/dist/tbv/core/services/delegated-claim/index.d.ts +22 -4
  161. package/dist/tbv/core/services/delegated-claim/index.d.ts.map +1 -1
  162. package/dist/tbv/core/services/delegated-claim/payoutBinding.d.ts +10 -4
  163. package/dist/tbv/core/services/delegated-claim/payoutBinding.d.ts.map +1 -1
  164. package/dist/tbv/core/services/delegated-claim/payoutInputLeaf.d.ts +34 -0
  165. package/dist/tbv/core/services/delegated-claim/payoutInputLeaf.d.ts.map +1 -0
  166. package/dist/tbv/core/services/delegated-claim/planDelegatedClaimSigning.d.ts +43 -0
  167. package/dist/tbv/core/services/delegated-claim/planDelegatedClaimSigning.d.ts.map +1 -0
  168. package/dist/tbv/core/services/delegated-claim/readDelegatedClaimVaultContext.d.ts +70 -0
  169. package/dist/tbv/core/services/delegated-claim/readDelegatedClaimVaultContext.d.ts.map +1 -0
  170. package/dist/tbv/core/services/delegated-claim/readWatchtowerArtifacts.d.ts +31 -2
  171. package/dist/tbv/core/services/delegated-claim/readWatchtowerArtifacts.d.ts.map +1 -1
  172. package/dist/tbv/core/services/delegated-claim/signDelegatedClaimPlan.d.ts +110 -0
  173. package/dist/tbv/core/services/delegated-claim/signDelegatedClaimPlan.d.ts.map +1 -0
  174. package/dist/tbv/core/services/delegated-claim/signingRequests.d.ts +24 -0
  175. package/dist/tbv/core/services/delegated-claim/signingRequests.d.ts.map +1 -0
  176. package/dist/tbv/core/services/delegated-claim/types.d.ts +110 -9
  177. package/dist/tbv/core/services/delegated-claim/types.d.ts.map +1 -1
  178. package/dist/tbv/core/services/delegated-claim/vaultIdBinding.d.ts +16 -1
  179. package/dist/tbv/core/services/delegated-claim/vaultIdBinding.d.ts.map +1 -1
  180. package/dist/tbv/core/services/delegated-claim/verifySignatureForRequest.d.ts +19 -0
  181. package/dist/tbv/core/services/delegated-claim/verifySignatureForRequest.d.ts.map +1 -0
  182. package/dist/tbv/core/services/delegated-claim/verifyingKeyBinding.d.ts +40 -0
  183. package/dist/tbv/core/services/delegated-claim/verifyingKeyBinding.d.ts.map +1 -0
  184. package/dist/tbv/core/services/delegated-claim/walletIdentity.d.ts +23 -0
  185. package/dist/tbv/core/services/delegated-claim/walletIdentity.d.ts.map +1 -0
  186. package/dist/tbv/core/services/index.cjs +1 -1
  187. package/dist/tbv/core/services/index.js +89 -76
  188. package/dist/tbv/core/services/participants/__tests__/readStampedParticipantKeys.test.d.ts +2 -0
  189. package/dist/tbv/core/services/participants/__tests__/readStampedParticipantKeys.test.d.ts.map +1 -0
  190. package/dist/tbv/core/services/participants/index.d.ts +1 -0
  191. package/dist/tbv/core/services/participants/index.d.ts.map +1 -1
  192. package/dist/tbv/core/services/participants/readStampedParticipantKeys.d.ts +29 -0
  193. package/dist/tbv/core/services/participants/readStampedParticipantKeys.d.ts.map +1 -0
  194. package/dist/tbv/core/services/participants/resolveParticipantKeys.d.ts +1 -1
  195. package/dist/tbv/core/services/participants/resolveParticipantKeys.d.ts.map +1 -1
  196. package/dist/tbv/core/utils/eth/index.cjs +1 -1
  197. package/dist/tbv/core/utils/eth/index.cjs.map +1 -1
  198. package/dist/tbv/core/utils/eth/index.js +20 -20
  199. package/dist/tbv/core/utils/eth/index.js.map +1 -1
  200. package/dist/tbv/core/utils/eth/waitForTransactionReceiptSmartAware.d.ts.map +1 -1
  201. package/dist/tbv/core/utils/index.cjs +1 -1
  202. package/dist/tbv/core/utils/index.js +47 -46
  203. package/dist/tbv/core/utils/index.js.map +1 -1
  204. package/dist/tbv/core/vault-secrets/__tests__/buildVaultContextInputForClaim.test.d.ts +2 -0
  205. package/dist/tbv/core/vault-secrets/__tests__/buildVaultContextInputForClaim.test.d.ts.map +1 -0
  206. package/dist/tbv/core/vault-secrets/buildVaultContextInputForClaim.d.ts +18 -0
  207. package/dist/tbv/core/vault-secrets/buildVaultContextInputForClaim.d.ts.map +1 -0
  208. package/dist/tbv/core/vault-secrets/index.cjs +1 -1
  209. package/dist/tbv/core/vault-secrets/index.d.ts +1 -0
  210. package/dist/tbv/core/vault-secrets/index.d.ts.map +1 -1
  211. package/dist/tbv/core/vault-secrets/index.js +12 -10
  212. package/dist/tbv/core/vault-secrets/index.js.map +1 -1
  213. package/dist/tbv/index.cjs +1 -1
  214. package/dist/tbv/index.js +287 -259
  215. package/dist/tbv/index.js.map +1 -1
  216. package/dist/toRefundInputs-BZXvuOMY.cjs +2 -0
  217. package/dist/toRefundInputs-BZXvuOMY.cjs.map +1 -0
  218. package/dist/toRefundInputs-dKDSvpVI.js +698 -0
  219. package/dist/toRefundInputs-dKDSvpVI.js.map +1 -0
  220. package/dist/types-Bda75Od0.cjs +2 -0
  221. package/dist/types-Bda75Od0.cjs.map +1 -0
  222. package/dist/types-C5jj3Cc-.js +198 -0
  223. package/dist/types-C5jj3Cc-.js.map +1 -0
  224. package/dist/{verifyKeyPathSchnorrSignature-Gm9EmZkx.cjs → verifyKeyPathSchnorrSignature-CQUut2-O.cjs} +2 -2
  225. package/dist/{verifyKeyPathSchnorrSignature-Gm9EmZkx.cjs.map → verifyKeyPathSchnorrSignature-CQUut2-O.cjs.map} +1 -1
  226. package/dist/{verifyKeyPathSchnorrSignature-BQHNhRj6.js → verifyKeyPathSchnorrSignature-DxPbeSdQ.js} +2 -2
  227. package/dist/{verifyKeyPathSchnorrSignature-BQHNhRj6.js.map → verifyKeyPathSchnorrSignature-DxPbeSdQ.js.map} +1 -1
  228. package/dist/{verifyScriptPathSchnorrSignature-CpjSTfMj.js → verifyScriptPathSchnorrSignature-B3-VkvnK.js} +6 -4
  229. package/dist/{verifyScriptPathSchnorrSignature-CpjSTfMj.js.map → verifyScriptPathSchnorrSignature-B3-VkvnK.js.map} +1 -1
  230. package/dist/{verifyScriptPathSchnorrSignature-BKZihCjk.cjs → verifyScriptPathSchnorrSignature-D2t1yACC.cjs} +2 -2
  231. package/dist/{verifyScriptPathSchnorrSignature-BKZihCjk.cjs.map → verifyScriptPathSchnorrSignature-D2t1yACC.cjs.map} +1 -1
  232. package/package.json +3 -3
  233. package/dist/PayoutManager-B6GFbG3X.cjs +0 -2
  234. package/dist/PayoutManager-B6GFbG3X.cjs.map +0 -1
  235. package/dist/PayoutManager-BSwbUQeF.js.map +0 -1
  236. package/dist/PeginManager-IgDHy_eU.cjs +0 -2
  237. package/dist/ProtocolParams.abi-Db2USqQm.cjs +0 -2
  238. package/dist/ProtocolParams.abi-Db2USqQm.cjs.map +0 -1
  239. package/dist/ProtocolParams.abi-q0AidvYX.js.map +0 -1
  240. package/dist/buildAndBroadcastReclaim-B8aFMGf-.cjs +0 -2
  241. package/dist/buildAndBroadcastReclaim-B8aFMGf-.cjs.map +0 -1
  242. package/dist/buildAndBroadcastReclaim-D5520lbL.js +0 -2210
  243. package/dist/buildAndBroadcastReclaim-D5520lbL.js.map +0 -1
  244. package/dist/constants-BTZdyOuk.cjs +0 -2
  245. package/dist/constants-BTZdyOuk.cjs.map +0 -1
  246. package/dist/constants-D5vORbQE.js +0 -29
  247. package/dist/constants-D5vORbQE.js.map +0 -1
  248. package/dist/onChainBtcPubkey-BlzxYImF.cjs +0 -2
  249. package/dist/onChainBtcPubkey-BlzxYImF.cjs.map +0 -1
  250. package/dist/onChainBtcPubkey-CCTdl53s.js +0 -159
  251. package/dist/onChainBtcPubkey-CCTdl53s.js.map +0 -1
  252. package/dist/pegin-registration-client-B0j6ugt9.cjs +0 -2
  253. package/dist/pegin-registration-client-B0j6ugt9.cjs.map +0 -1
  254. package/dist/pegin-registration-client-ilkV1mLP.js +0 -878
  255. package/dist/pegin-registration-client-ilkV1mLP.js.map +0 -1
  256. package/dist/signing-3l5Aqd-H.cjs +0 -2
  257. package/dist/signing-3l5Aqd-H.cjs.map +0 -1
  258. package/dist/signing-Dhr2t0Z6.js.map +0 -1
  259. package/dist/toRefundInputs-10RYIfh1.js +0 -559
  260. package/dist/toRefundInputs-10RYIfh1.js.map +0 -1
  261. package/dist/toRefundInputs-a-0HRyrl.cjs +0 -2
  262. package/dist/toRefundInputs-a-0HRyrl.cjs.map +0 -1
  263. package/dist/types-BueQoMjO.cjs +0 -2
  264. package/dist/types-BueQoMjO.cjs.map +0 -1
  265. package/dist/types-DGkejGZH.js +0 -456
  266. package/dist/types-DGkejGZH.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"signPsbtsWithFallback.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/managers/pegin/signPsbtsWithFallback.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,aAAa,EACb,eAAe,EAChB,MAAM,4BAA4B,CAAC;AAEpC;;;;;;;;;;;;GAYG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,aAAa,EACrB,UAAU,EAAE,MAAM,EAAE,EACpB,OAAO,CAAC,EAAE,eAAe,EAAE,GAC1B,OAAO,CAAC,MAAM,EAAE,CAAC,CAoBnB"}
1
+ {"version":3,"file":"signPsbtsWithFallback.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/managers/pegin/signPsbtsWithFallback.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,aAAa,EACb,eAAe,EAChB,MAAM,4BAA4B,CAAC;AAEpC;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,aAAa,EACrB,UAAU,EAAE,MAAM,EAAE,EACpB,OAAO,CAAC,EAAE,eAAe,EAAE,EAC3B,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,MAAM,EAAE,CAAC,CAuBnB"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../verifyScriptPathSchnorrSignature-BKZihCjk.cjs"),s=require("../../../secp256k1-DDHQ1_za.cjs"),i=require("../wasm/index.cjs"),a=require("../../../verifyKeyPathSchnorrSignature-Gm9EmZkx.cjs"),r=require("../../../noPayout-DAWBQ0eG.cjs"),n=require("../../../challengeAssert-Z7_YULBb.cjs"),e=require("../../../bitcoin-D-O2GjbC.cjs");exports.PEGIN_DEPOSITOR_CLAIM_VOUT=t.PEGIN_DEPOSITOR_CLAIM_VOUT;exports.PsbtSubstitutionError=t.PsbtSubstitutionError;exports.assertPsbtUnsignedTxMatches=t.assertPsbtUnsignedTxMatches;exports.assertScriptPathSchnorrSignature=t.assertScriptPathSchnorrSignature;exports.buildPayoutPsbt=t.buildPayoutPsbt;exports.buildPeginTxFromFundedPrePegin=t.buildPeginTxFromFundedPrePegin;exports.buildPrePeginPsbt=t.buildPrePeginPsbt;exports.computeNumLocalChallengers=t.computeNumLocalChallengers;exports.createPayoutScript=t.createPayoutScript;exports.deriveDepositorClaimDescriptor=t.deriveDepositorClaimDescriptor;exports.deriveDepositorClaimScriptPubKey=t.deriveDepositorClaimScriptPubKey;exports.extractPayoutSignature=t.extractPayoutSignature;exports.assertValidVaultCoreVersion=s.assertValidVaultCoreVersion;exports.computeMinClaimValue=i.computeMinClaimValue;exports.computeMinPeginFee=i.computeMinPeginFee;exports.deriveVaultId=i.deriveVaultId;exports.peginP2aAnchorOutput=i.peginP2aAnchorOutput;exports.supportedTxGraphVersions=i.supportedTxGraphVersions;exports.validatePeginP2aAnchor=i.validatePeginP2aAnchor;exports.assertKeyPathSchnorrSignature=a.assertKeyPathSchnorrSignature;exports.assertReturnedKeyPathSignatures=a.assertReturnedKeyPathSignatures;exports.buildPeginInputPsbt=a.buildPeginInputPsbt;exports.extractPeginInputSignature=a.extractPeginInputSignature;exports.finalizePeginInputPsbt=a.finalizePeginInputPsbt;exports.buildNoPayoutPsbt=r.buildNoPayoutPsbt;exports.buildReclaimPsbt=r.buildReclaimPsbt;exports.buildRefundPsbt=r.buildRefundPsbt;exports.estimateReclaimFeeSats=r.estimateReclaimFeeSats;exports.finalizeScriptPathWithSignatures=r.finalizeScriptPathWithSignatures;exports.reclaimVsize=r.reclaimVsize;exports.buildChallengeAssertPsbt=n.buildChallengeAssertPsbt;exports.canonicalizeBtcPubkey=e.canonicalizeBtcPubkey;exports.deriveBip86ScriptPubKeyHex=e.deriveBip86ScriptPubKeyHex;exports.deriveNativeSegwitAddress=e.deriveNativeSegwitAddress;exports.deriveTaprootAddress=e.deriveTaprootAddress;exports.ensureHexPrefix=e.ensureHexPrefix;exports.formatSatoshisToBtc=e.formatSatoshisToBtc;exports.getSortedXOnlyPubkeys=e.getSortedXOnlyPubkeys;exports.hexToUint8Array=e.hexToUint8Array;exports.isAddressFromPublicKey=e.isAddressFromPublicKey;exports.isValidHex=e.isValidHex;exports.processPublicKeyToXOnly=e.processPublicKeyToXOnly;exports.stripHexPrefix=e.stripHexPrefix;exports.toXOnly=e.toXOnly;exports.uint8ArrayToHex=e.uint8ArrayToHex;exports.validateWalletPubkey=e.validateWalletPubkey;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../verifyScriptPathSchnorrSignature-D2t1yACC.cjs"),s=require("../../../secp256k1-DDHQ1_za.cjs"),i=require("../wasm/index.cjs"),a=require("../../../verifyKeyPathSchnorrSignature-CQUut2-O.cjs"),r=require("../../../noPayout-DOHak0ui.cjs"),n=require("../../../challengeAssert-Z7_YULBb.cjs"),e=require("../../../bitcoin-D-O2GjbC.cjs");exports.PEGIN_DEPOSITOR_CLAIM_VOUT=t.PEGIN_DEPOSITOR_CLAIM_VOUT;exports.PsbtSubstitutionError=t.PsbtSubstitutionError;exports.assertPsbtUnsignedTxMatches=t.assertPsbtUnsignedTxMatches;exports.assertScriptPathSchnorrSignature=t.assertScriptPathSchnorrSignature;exports.buildPayoutPsbt=t.buildPayoutPsbt;exports.buildPeginTxFromFundedPrePegin=t.buildPeginTxFromFundedPrePegin;exports.buildPrePeginPsbt=t.buildPrePeginPsbt;exports.computeNumLocalChallengers=t.computeNumLocalChallengers;exports.createPayoutScript=t.createPayoutScript;exports.deriveDepositorClaimDescriptor=t.deriveDepositorClaimDescriptor;exports.deriveDepositorClaimScriptPubKey=t.deriveDepositorClaimScriptPubKey;exports.extractPayoutSignature=t.extractPayoutSignature;exports.assertValidVaultCoreVersion=s.assertValidVaultCoreVersion;exports.computeMinClaimValue=i.computeMinClaimValue;exports.computeMinPeginFee=i.computeMinPeginFee;exports.deriveVaultId=i.deriveVaultId;exports.peginP2aAnchorOutput=i.peginP2aAnchorOutput;exports.supportedTxGraphVersions=i.supportedTxGraphVersions;exports.validatePeginP2aAnchor=i.validatePeginP2aAnchor;exports.assertKeyPathSchnorrSignature=a.assertKeyPathSchnorrSignature;exports.assertReturnedKeyPathSignatures=a.assertReturnedKeyPathSignatures;exports.buildPeginInputPsbt=a.buildPeginInputPsbt;exports.extractPeginInputSignature=a.extractPeginInputSignature;exports.finalizePeginInputPsbt=a.finalizePeginInputPsbt;exports.buildNoPayoutPsbt=r.buildNoPayoutPsbt;exports.buildReclaimPsbt=r.buildReclaimPsbt;exports.buildRefundPsbt=r.buildRefundPsbt;exports.estimateReclaimFeeSats=r.estimateReclaimFeeSats;exports.finalizeScriptPathWithSignatures=r.finalizeScriptPathWithSignatures;exports.reclaimVsize=r.reclaimVsize;exports.buildChallengeAssertPsbt=n.buildChallengeAssertPsbt;exports.canonicalizeBtcPubkey=e.canonicalizeBtcPubkey;exports.deriveBip86ScriptPubKeyHex=e.deriveBip86ScriptPubKeyHex;exports.deriveNativeSegwitAddress=e.deriveNativeSegwitAddress;exports.deriveTaprootAddress=e.deriveTaprootAddress;exports.ensureHexPrefix=e.ensureHexPrefix;exports.formatSatoshisToBtc=e.formatSatoshisToBtc;exports.getSortedXOnlyPubkeys=e.getSortedXOnlyPubkeys;exports.hexToUint8Array=e.hexToUint8Array;exports.isAddressFromPublicKey=e.isAddressFromPublicKey;exports.isValidHex=e.isValidHex;exports.processPublicKeyToXOnly=e.processPublicKeyToXOnly;exports.stripHexPrefix=e.stripHexPrefix;exports.toXOnly=e.toXOnly;exports.uint8ArrayToHex=e.uint8ArrayToHex;exports.validateWalletPubkey=e.validateWalletPubkey;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,8 +1,8 @@
1
- import { P as s, h as t, i as r, j as i, f as o, b as u, a as n, c as P, k as l, d, e as c, g as b } from "../../../verifyScriptPathSchnorrSignature-CpjSTfMj.js";
2
- import { a as g } from "../../../secp256k1-D-H9jmd7.js";
1
+ import { P as s, h as t, i as r, j as i, f as o, b as u, a as n, c as P, k as l, d, e as c, g as b } from "../../../verifyScriptPathSchnorrSignature-B3-VkvnK.js";
2
+ import { a as g } from "../../../secp256k1-BuxBFUHm.js";
3
3
  import { computeMinClaimValue as x, computeMinPeginFee as S, deriveVaultId as y, peginP2aAnchorOutput as f, supportedTxGraphVersions as h, validatePeginP2aAnchor as v } from "../wasm/index.js";
4
- import { a as A, c as V, b as C, e as I, f as O } from "../../../verifyKeyPathSchnorrSignature-BQHNhRj6.js";
5
- import { c as F, a as H, b as R, e as k, f as z, r as D } from "../../../noPayout-qBXWKwav.js";
4
+ import { a as A, c as V, b as C, e as I, f as O } from "../../../verifyKeyPathSchnorrSignature-DxPbeSdQ.js";
5
+ import { c as F, a as H, b as R, e as k, f as z, r as D } from "../../../noPayout-B-vGXJ-V.js";
6
6
  import { b as N } from "../../../challengeAssert-Cp_GeRg8.js";
7
7
  import { c as E, d as U, a as X, b as _, e as j, f as G, g as L, h as W, i as w, j as q, p as J, s as Q, t as Y, u as Z, v as $ } from "../../../bitcoin-C-TuHb-v.js";
8
8
  export {
@@ -12,20 +12,57 @@
12
12
  */
13
13
  /**
14
14
  * Depositor Payout transaction input count.
15
- * Input 0: PegIn:0 (signed). Input 1: Assert:0 (in sighash, not signed).
15
+ * Input 0: PegIn:0 ({@link PAYOUT_PEGIN_INPUT_INDEX}). Input 1: Assert:0
16
+ * ({@link PAYOUT_ASSERT_INPUT_INDEX} carries the signing regimes).
16
17
  */
17
18
  export declare const DEPOSITOR_PAYOUT_INPUT_COUNT = 2;
18
19
  /**
19
- * Inputs the depositor signs per Payout / NoPayout PSBT: input 0 only. The
20
- * other inputs are in the SIGHASH_DEFAULT sighash but carry no depositor
21
- * signature — the Ledger host expects exactly this many yields, so a drift
22
- * here re-arms an input the device never signs.
20
+ * Inputs the depositor signs per Payout / NoPayout PSBT at deposit time:
21
+ * input 0 only. The other inputs are in the SIGHASH_DEFAULT sighash but carry
22
+ * no depositor signature there — the Ledger host expects exactly this many
23
+ * yields, so a drift here re-arms an input the device never signs at deposit
24
+ * time.
23
25
  */
24
26
  export declare const DEPOSITOR_SIGNED_INPUT_COUNT = 1;
25
27
  /** PegIn vault output index spent by the depositor's Payout input 0. */
26
28
  export declare const PEGIN_VAULT_OUTPUT_INDEX = 0;
27
- /** Assert output index spent by the depositor's Payout input 1 (NOT signed). */
29
+ /**
30
+ * Assert output index spent by the Payout's input 1
31
+ * ({@link PAYOUT_ASSERT_INPUT_INDEX} carries the signing regimes).
32
+ */
28
33
  export declare const ASSERT_PAYOUT_OUTPUT_INDEX = 0;
34
+ /** Payout input that spends the Vault UTXO (PegIn:{@link PEGIN_VAULT_OUTPUT_INDEX}); the depositor signs it in both regimes. */
35
+ export declare const PAYOUT_PEGIN_INPUT_INDEX = 0;
36
+ /** Payout input that spends the Assert connector (Assert:{@link ASSERT_PAYOUT_OUTPUT_INDEX}); the claimer signs it, which is the depositor only in a delegated claim. */
37
+ export declare const PAYOUT_ASSERT_INPUT_INDEX = 1;
38
+ /**
39
+ * Claim input that spends the vault's PegIn. A depositor-as-claimer recovery
40
+ * Claim is funded by exactly the PegIn's depositor-claim output
41
+ * (`DEPOSITOR_CLAIM_VOUT = 1` in btc-vault `crates/vault/src/lib.rs:272`, used by
42
+ * `depositor_claim_funding_outpoint` in `crates/vault/src/transactions/claim.rs:119-121`
43
+ * @ ac4954e7); the depositor signs it.
44
+ */
45
+ export declare const CLAIM_PEGIN_INPUT_INDEX = 0;
46
+ /**
47
+ * Assert input that spends the Claim connector
48
+ * (Claim:{@link CLAIM_CONNECTOR_OUTPUT_INDEX}); the claimer signs it. Matches
49
+ * `CLAIM_ASSERT_INPUT` in btc-vault `crates/vault/src/transactions/assert.rs:56` @ ac4954e7.
50
+ */
51
+ export declare const ASSERT_CLAIM_INPUT_INDEX = 0;
52
+ /**
53
+ * Claim output the Assert spends. Matches `CLAIM_ASSERT_OUTPUT_INDEX` in
54
+ * btc-vault `crates/vault/src/transactions/claim.rs:25` @ ac4954e7.
55
+ */
56
+ export declare const CLAIM_CONNECTOR_OUTPUT_INDEX = 0;
57
+ /**
58
+ * WronglyChallenged input that spends the ChallengeAssert connector; the
59
+ * claimer signs it, which is the depositor only in a delegated claim. Matches
60
+ * `CHALLENGE_ASSERT_INPUT` in btc-vault
61
+ * `crates/vault/src/transactions/wrongly_challenged.rs:35`, the input
62
+ * `claimer_signing_psbt` hands the external signer (`:187`) and `sign_claimer`
63
+ * signs natively (`:243`) @ ac4954e7.
64
+ */
65
+ export declare const WRONGLY_CHALLENGED_INPUT_INDEX = 0;
29
66
  /**
30
67
  * Dust amount (sats) for the payout CPFP anchor output. Matches `DUST_AMOUNT`
31
68
  * in `btc-vault crates/vault/src/lib.rs`.
@@ -79,6 +116,17 @@ export declare const REFUND_TX_LOCKTIME = 0;
79
116
  */
80
117
  export declare const PAYOUT_TX_VERSION = 2;
81
118
  export declare const PAYOUT_TX_LOCKTIME = 0;
119
+ /**
120
+ * Payout output that pays the payout receiver, resolved per claimer role (the
121
+ * depositor's registered script for a VP or depositor claimer, the keeper's
122
+ * for an AVK claimer — btc-vault `tx_graph/graph.rs:100-106` @ ac4954e7).
123
+ * btc-vault has no named constant for the index itself:
124
+ * `build_payout_outputs` (`crates/vault/src/transactions/mod.rs:206`)
125
+ * returns the destination as `output0` in both layouts — `:246`/`:256` with a
126
+ * VP commission, `:266`/`:270` without — and `transactions/payout.rs:153`
127
+ * pushes the CPFP anchor after them @ ac4954e7.
128
+ */
129
+ export declare const PAYOUT_DESTINATION_OUTPUT_INDEX = 0;
82
130
  /** VP-claimer payout output count: [depositor payout, VP commission, CPFP anchor]. */
83
131
  export declare const VP_CLAIMER_PAYOUT_OUTPUT_COUNT = 3;
84
132
  /** Depositor/VK-claimer payout output count: [claimer payout, CPFP anchor]. */
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/primitives/psbt/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;;GAGG;AACH,eAAO,MAAM,4BAA4B,IAAI,CAAC;AAE9C;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,IAAI,CAAC;AAE9C,wEAAwE;AACxE,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAE1C,gFAAgF;AAChF,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAE5C;;;GAGG;AACH,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAE3C,iEAAiE;AACjE,eAAO,MAAM,+BAA+B,IAAI,CAAC;AAEjD,sEAAsE;AACtE,eAAO,MAAM,gCAAgC,IAAI,CAAC;AAElD;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,SAAS,CAAC;AAEnD;;;GAGG;AACH,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAE7C;;;GAGG;AACH,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAEtC;;;GAGG;AACH,eAAO,MAAM,qBAAqB,IAAI,CAAC;AAEvC,uEAAuE;AACvE,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAEzC,6EAA6E;AAC7E,eAAO,MAAM,6BAA6B,IAAI,CAAC;AAE/C,2EAA2E;AAC3E,eAAO,MAAM,iBAAiB,IAAI,CAAC;AAEnC,8DAA8D;AAC9D,eAAO,MAAM,oBAAoB,aAAa,CAAC;AAE/C;;;GAGG;AACH,eAAO,MAAM,iBAAiB,IAAI,CAAC;AACnC,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,IAAI,CAAC;AACnC,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC,sFAAsF;AACtF,eAAO,MAAM,8BAA8B,IAAI,CAAC;AAEhD,+EAA+E;AAC/E,eAAO,MAAM,kCAAkC,IAAI,CAAC;AAEpD;;;;;;GAMG;AACH,eAAO,MAAM,0CAA0C,IAAI,CAAC;AAE5D;;;;;GAKG;AACH,eAAO,MAAM,+BAA+B,QAAS,CAAC;AAEtD;;;;;GAKG;AACH,eAAO,MAAM,eAAe,QAAS,CAAC;AAEtC;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,MAAM,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/primitives/psbt/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,IAAI,CAAC;AAE9C;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,IAAI,CAAC;AAE9C,wEAAwE;AACxE,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAE1C;;;GAGG;AACH,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAE5C,gIAAgI;AAChI,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAE1C,yKAAyK;AACzK,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAE3C;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAEzC;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAE1C;;;GAGG;AACH,eAAO,MAAM,4BAA4B,IAAI,CAAC;AAE9C;;;;;;;GAOG;AACH,eAAO,MAAM,8BAA8B,IAAI,CAAC;AAEhD;;;GAGG;AACH,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAE3C,iEAAiE;AACjE,eAAO,MAAM,+BAA+B,IAAI,CAAC;AAEjD,sEAAsE;AACtE,eAAO,MAAM,gCAAgC,IAAI,CAAC;AAElD;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,SAAS,CAAC;AAEnD;;;GAGG;AACH,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAE7C;;;GAGG;AACH,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAEtC;;;GAGG;AACH,eAAO,MAAM,qBAAqB,IAAI,CAAC;AAEvC,uEAAuE;AACvE,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAEzC,6EAA6E;AAC7E,eAAO,MAAM,6BAA6B,IAAI,CAAC;AAE/C,2EAA2E;AAC3E,eAAO,MAAM,iBAAiB,IAAI,CAAC;AAEnC,8DAA8D;AAC9D,eAAO,MAAM,oBAAoB,aAAa,CAAC;AAE/C;;;GAGG;AACH,eAAO,MAAM,iBAAiB,IAAI,CAAC;AACnC,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,IAAI,CAAC;AACnC,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC;;;;;;;;;GASG;AACH,eAAO,MAAM,+BAA+B,IAAI,CAAC;AAEjD,sFAAsF;AACtF,eAAO,MAAM,8BAA8B,IAAI,CAAC;AAEhD,+EAA+E;AAC/E,eAAO,MAAM,kCAAkC,IAAI,CAAC;AAEpD;;;;;;GAMG;AACH,eAAO,MAAM,0CAA0C,IAAI,CAAC;AAE5D;;;;;GAKG;AACH,eAAO,MAAM,+BAA+B,QAAS,CAAC;AAEtD;;;;;GAKG;AACH,eAAO,MAAM,eAAe,QAAS,CAAC;AAEtC;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,MAAM,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=assembleWatchtowerArtifactsFromSignatures.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assembleWatchtowerArtifactsFromSignatures.test.d.ts","sourceRoot":"","sources":["../../../../../../src/tbv/core/services/delegated-claim/__tests__/assembleWatchtowerArtifactsFromSignatures.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=assertBinding.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assertBinding.test.d.ts","sourceRoot":"","sources":["../../../../../../src/tbv/core/services/delegated-claim/__tests__/assertBinding.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=assertPayoutFeeAndTimelocks.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assertPayoutFeeAndTimelocks.test.d.ts","sourceRoot":"","sources":["../../../../../../src/tbv/core/services/delegated-claim/__tests__/assertPayoutFeeAndTimelocks.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,49 @@
1
+ import { Hex } from 'viem';
2
+ import { OnChainBtcPubkey } from '../../../../clients/eth/types';
3
+ export declare const CHALLENGER_A: string;
4
+ export declare const CHALLENGER_B: string;
5
+ export declare const VAULT_PROVIDER_PUBKEY: string;
6
+ export declare const DEPOSITOR_PUBKEY = "0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798";
7
+ /** x-only form of {@link DEPOSITOR_PUBKEY}, as the registry records it. */
8
+ export declare const DEPOSITOR_XONLY_PUBKEY: OnChainBtcPubkey;
9
+ export declare const SIGNER_ADDRESS = "tb1pmfr3p9j00pfxjh0zmgp99y8zftmd3s5pmedqhyptwy6lm87hf5ssk79hv2";
10
+ export declare const OTHER_ADDRESS = "tb1pet7ep3czdu9k4wvdlz2fp5p8x2yp7t6ttyqg2c6cmh0lgeuu9lasvfnc28";
11
+ export declare const DEPOSITOR_ETH_ADDRESS: Hex;
12
+ export declare const CLAIM_PSBT = "cHNidP8BADMCAAAAAf/u3cy7qpmId2ZVRDMiEQD/7t3Mu6qZiHdmVUQzIhEAAQAAAAD/////AAAAAAAAAAA=";
13
+ export declare const VAULT_ID: Hex;
14
+ export declare const OTHER_VAULT_CLAIM_PSBT = "cHNidP8BADMCAAAAAQARIjNEVWZ3iJmqu8zd7v8AESIzRFVmd4iZqrvM3e7/AQAAAAD/////AAAAAAAAAAA=";
15
+ export declare const REGISTERED_PAYOUT_SCRIPT: string;
16
+ /** secp256k1's 2G: a valid key that is not the fixture's depositor. */
17
+ export declare const OTHER_XONLY_PUBKEY = "c6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5";
18
+ export declare const OTHER_BIP86_P2TR_SCRIPT: string;
19
+ /** Value of PegIn:0, the prevout of Payout input 0. */
20
+ export declare const VAULT_UTXO_SATS = 100000;
21
+ /** CSV sequence the Payout's two inputs carry unless a test overrides them. */
22
+ export declare const TIMELOCK_PEGIN = 684;
23
+ export declare const TIMELOCK_ASSERT = 700;
24
+ export interface DelegatedClaimFixture {
25
+ claimPsbt: string;
26
+ assertPsbt: string;
27
+ payoutClaimerPsbt: string;
28
+ /** Depositor Payout as the WASM builder emits it: input 1 carries no leaf. */
29
+ payoutDepositorPsbt: string;
30
+ /** Same unsigned tx, output 0 pays somebody else. */
31
+ payoutWrongDestinationPsbt: string;
32
+ wronglyChallengedPsbts: Record<string, string[]>;
33
+ }
34
+ /** Payout fields the fee-and-timelock tests vary; everything else is fixed. */
35
+ export interface PayoutOverrides {
36
+ peginInputSequence?: number;
37
+ assertInputSequence?: number;
38
+ payoutValueSats?: number;
39
+ /** scriptPubKey of the CPFP anchor output, hex. */
40
+ anchorScriptHex?: string;
41
+ }
42
+ /**
43
+ * By default each signed input carries a distinct tag key, so tests can tell
44
+ * the leaves apart. With `signedLeafKey` (x-only hex) every signed input
45
+ * carries that one key and the Claim gains the prevout it lacks (a sighash
46
+ * needs it), so the whole set can be signed and verified for real.
47
+ */
48
+ export declare function buildDelegatedClaimFixture(signedLeafKey?: string, payoutOverrides?: PayoutOverrides): DelegatedClaimFixture;
49
+ //# sourceMappingURL=delegatedClaimPsbts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delegatedClaimPsbts.d.ts","sourceRoot":"","sources":["../../../../../../../src/tbv/core/services/delegated-claim/__tests__/fixtures/delegatedClaimPsbts.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAGhC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,eAAO,MAAM,YAAY,QAAkB,CAAC;AAC5C,eAAO,MAAM,YAAY,QAAkB,CAAC;AAC5C,eAAO,MAAM,qBAAqB,QAA+B,CAAC;AAClE,eAAO,MAAM,gBAAgB,uEACyC,CAAC;AACvE,2EAA2E;AAC3E,eAAO,MAAM,sBAAsB,EACqC,gBAAgB,CAAC;AACzF,eAAO,MAAM,cAAc,mEACuC,CAAC;AACnE,eAAO,MAAM,aAAa,mEACwC,CAAC;AACnE,eAAO,MAAM,qBAAqB,EACgB,GAAG,CAAC;AAItD,eAAO,MAAM,UAAU,yFACiE,CAAC;AACzF,eAAO,MAAM,QAAQ,EACqD,GAAG,CAAC;AAE9E,eAAO,MAAM,sBAAsB,yFACqD,CAAC;AAQzF,eAAO,MAAM,wBAAwB,QAA8B,CAAC;AACpE,uEAAuE;AACvE,eAAO,MAAM,kBAAkB,qEACqC,CAAC;AACrE,eAAO,MAAM,uBAAuB,QACW,CAAC;AAKhD,uDAAuD;AACvD,eAAO,MAAM,eAAe,SAAU,CAAC;AACvC,+EAA+E;AAC/E,eAAO,MAAM,cAAc,MAAM,CAAC;AAClC,eAAO,MAAM,eAAe,MAAM,CAAC;AA+BnC,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,8EAA8E;IAC9E,mBAAmB,EAAE,MAAM,CAAC;IAC5B,qDAAqD;IACrD,0BAA0B,EAAE,MAAM,CAAC;IACnC,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;CAClD;AAED,+EAA+E;AAC/E,MAAM,WAAW,eAAe;IAC9B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mDAAmD;IACnD,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACxC,aAAa,CAAC,EAAE,MAAM,EACtB,eAAe,GAAE,eAAoB,GACpC,qBAAqB,CA2HvB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=payoutBinding.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payoutBinding.test.d.ts","sourceRoot":"","sources":["../../../../../../src/tbv/core/services/delegated-claim/__tests__/payoutBinding.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=payoutInputLeaf.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payoutInputLeaf.test.d.ts","sourceRoot":"","sources":["../../../../../../src/tbv/core/services/delegated-claim/__tests__/payoutInputLeaf.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=planDelegatedClaimSigning.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"planDelegatedClaimSigning.test.d.ts","sourceRoot":"","sources":["../../../../../../src/tbv/core/services/delegated-claim/__tests__/planDelegatedClaimSigning.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=readDelegatedClaimVaultContext.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readDelegatedClaimVaultContext.test.d.ts","sourceRoot":"","sources":["../../../../../../src/tbv/core/services/delegated-claim/__tests__/readDelegatedClaimVaultContext.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=realSchnorrVerification.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"realSchnorrVerification.test.d.ts","sourceRoot":"","sources":["../../../../../../src/tbv/core/services/delegated-claim/__tests__/realSchnorrVerification.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=signDelegatedClaimPlan.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signDelegatedClaimPlan.test.d.ts","sourceRoot":"","sources":["../../../../../../src/tbv/core/services/delegated-claim/__tests__/signDelegatedClaimPlan.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=signingRequests.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signingRequests.test.d.ts","sourceRoot":"","sources":["../../../../../../src/tbv/core/services/delegated-claim/__tests__/signingRequests.test.ts"],"names":[],"mappings":""}
@@ -1,5 +1,7 @@
1
1
  import { Network } from '@babylonlabs-io/babylon-tbv-rust-wasm';
2
2
  import { BitcoinWallet } from '../../../../shared/wallets/interfaces';
3
+ import { DepositTerms } from '../../deposit-terms/depositTerms';
4
+ import { VaultContextInput } from '../../vault-secrets';
3
5
  import { ClaimerArtifactsSource, DelegatedClaimVaultContext } from './types';
4
6
  /**
5
7
  * Everything one delegated-claim signing session needs.
@@ -15,31 +17,54 @@ export interface AssembleWatchtowerArtifactsParams {
15
17
  btcNetwork: Network;
16
18
  /** Graph and verifying key as the vault provider returned them. */
17
19
  source: ClaimerArtifactsSource;
20
+ /** See {@link DelegatedClaimSigningPlan.trustedVerifyingKeyHex}. */
21
+ trustedVerifyingKeyHex: string;
18
22
  vault: DelegatedClaimVaultContext;
19
23
  /**
20
24
  * Per-challenger BaBe sessions as `{"<pk>": {"decryptor_artifacts_hex":
21
25
  * "..."}}`, passed through into the file unchanged.
22
26
  *
23
- * Omit it for anything but a fixture. Real sessions run to hundreds of
24
- * megabytes per challenger, and this argument crosses the WASM boundary as
25
- * one string — join them into the file downstream instead.
27
+ * The WASM builder and verifier require an entry for every challenger of
28
+ * the graph (btc-vault `validate_babe_sessions`); an omitted value becomes
29
+ * `{}` and is refused on any real graph. Real sessions run to hundreds of
30
+ * megabytes per challenger, so a browser caller passes a placeholder map
31
+ * (one {@link BABE_SESSION_PLACEHOLDER_DECRYPTOR_HEX} entry per challenger)
32
+ * and joins the real sessions into the file downstream —
33
+ * `assertArtifactsUsableForVault` refuses a file that still carries one.
26
34
  */
27
35
  babeSessionsJson?: string;
36
+ /**
37
+ * Required for approval-capable wallets (the `DepositTermsApprover` seam):
38
+ * the terms that load this vault's intent on the device. Resume flows
39
+ * rebuild them from on-chain state.
40
+ */
41
+ depositTerms?: DepositTerms;
42
+ /**
43
+ * Required for approval-capable wallets: the context the vault root derives
44
+ * from; its depositor key must be the vault's registered key, checked before
45
+ * any device I/O.
46
+ */
47
+ vaultContext?: VaultContextInput;
28
48
  }
29
49
  /**
30
50
  * Signs the delegated-claim set and returns the `artifacts.json` content,
31
51
  * ready to write verbatim.
32
52
  *
33
- * Every signature is verified against the graph before the file is produced,
34
- * so a wallet that signed under the wrong key fails here rather than at claim
35
- * time, when nothing can be re-signed.
53
+ * Composition of {@link planDelegatedClaimSigning},
54
+ * {@link signDelegatedClaimPlan} and
55
+ * {@link assembleWatchtowerArtifactsFromSignatures}. Software wallets sign
56
+ * in one batched prompt; approval-capable wallets sign as ordered device
57
+ * ceremonies. Every signature is verified against the graph before the
58
+ * file is produced. This one-shot forwards neither `signal` nor `resume`;
59
+ * callers needing those use the split.
36
60
  *
37
61
  * Experimental: this API can change in a minor release. Pin the SDK
38
62
  * version if you build on it.
39
63
  *
40
- * @throws If the graph is not version 3, if the wallet returns a signature
41
- * that does not verify, or if the graph's own presignatures are
42
- * incomplete.
64
+ * @throws If the vault provider's verifying key is not `trustedVerifyingKeyHex`,
65
+ * if the graph is not version 3, if a binding check fails, if the
66
+ * wallet returns a signature that does not verify, or if the graph's
67
+ * own presignatures are incomplete.
43
68
  * @experimental
44
69
  */
45
70
  export declare function assembleWatchtowerArtifacts(params: AssembleWatchtowerArtifactsParams): Promise<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"assembleWatchtowerArtifacts.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/delegated-claim/assembleWatchtowerArtifacts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAGrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAgB3E,OAAO,KAAK,EACV,sBAAsB,EACtB,0BAA0B,EAC3B,MAAM,SAAS,CAAC;AA8BjB;;;;GAIG;AACH,MAAM,WAAW,iCAAiC;IAChD,iEAAiE;IACjE,SAAS,EAAE,aAAa,CAAC;IACzB,6DAA6D;IAC7D,kBAAkB,EAAE,MAAM,CAAC;IAC3B,0EAA0E;IAC1E,UAAU,EAAE,OAAO,CAAC;IACpB,mEAAmE;IACnE,MAAM,EAAE,sBAAsB,CAAC;IAC/B,KAAK,EAAE,0BAA0B,CAAC;IAClC;;;;;;;OAOG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,2BAA2B,CAC/C,MAAM,EAAE,iCAAiC,GACxC,OAAO,CAAC,MAAM,CAAC,CAkHjB"}
1
+ {"version":3,"file":"assembleWatchtowerArtifacts.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/delegated-claim/assembleWatchtowerArtifacts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAErE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAK7D,OAAO,KAAK,EACV,sBAAsB,EACtB,0BAA0B,EAC3B,MAAM,SAAS,CAAC;AAEjB;;;;GAIG;AACH,MAAM,WAAW,iCAAiC;IAChD,iEAAiE;IACjE,SAAS,EAAE,aAAa,CAAC;IACzB,6DAA6D;IAC7D,kBAAkB,EAAE,MAAM,CAAC;IAC3B,0EAA0E;IAC1E,UAAU,EAAE,OAAO,CAAC;IACpB,mEAAmE;IACnE,MAAM,EAAE,sBAAsB,CAAC;IAC/B,oEAAoE;IACpE,sBAAsB,EAAE,MAAM,CAAC;IAC/B,KAAK,EAAE,0BAA0B,CAAC;IAClC;;;;;;;;;;;OAWG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B;;;;OAIG;IACH,YAAY,CAAC,EAAE,iBAAiB,CAAC;CAClC;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,2BAA2B,CAC/C,MAAM,EAAE,iCAAiC,GACxC,OAAO,CAAC,MAAM,CAAC,CAcjB"}
@@ -0,0 +1,36 @@
1
+ import { DelegatedClaimSignatures, DelegatedClaimSigningPlan } from './types';
2
+ /**
3
+ * Thrown when a plan's requests differ from the ones the graph builds now.
4
+ *
5
+ * @experimental
6
+ */
7
+ export declare class SigningPlanMismatchError extends Error {
8
+ constructor(message: string);
9
+ }
10
+ /**
11
+ * A signed plan: the plan as it was handed to the signer, and the signatures
12
+ * it produced.
13
+ *
14
+ * @experimental
15
+ */
16
+ export interface AssembleFromSignaturesParams {
17
+ plan: DelegatedClaimSigningPlan;
18
+ signatures: DelegatedClaimSignatures;
19
+ }
20
+ /**
21
+ * Rebuilds the PSBT set from the plan's graph and vault, proves the plan's
22
+ * requests equal it, verifies every signature against the rebuilt request,
23
+ * then routes each signature to its artifacts field. Only the rebuilt set
24
+ * feeds the file; the plan's own PSBT bytes are compared and never used.
25
+ *
26
+ * @throws {SigningPlanMismatchError} If any request's id, kind, input index
27
+ * or PSBT differs from the one the graph builds now.
28
+ * @throws If the plan's vault-provider verifying key is not its trusted one,
29
+ * a request has no signature, a signature has no request, a
30
+ * signature does not verify against its rebuilt request, a binding
31
+ * check on the rebuilt set fails, or the Rust verification of the
32
+ * bundle fails.
33
+ * @experimental
34
+ */
35
+ export declare function assembleWatchtowerArtifactsFromSignatures(params: AssembleFromSignaturesParams): Promise<string>;
36
+ //# sourceMappingURL=assembleWatchtowerArtifactsFromSignatures.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assembleWatchtowerArtifactsFromSignatures.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/delegated-claim/assembleWatchtowerArtifactsFromSignatures.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAUH,OAAO,KAAK,EACV,wBAAwB,EACxB,yBAAyB,EAE1B,MAAM,SAAS,CAAC;AAIjB;;;;GAIG;AACH,qBAAa,wBAAyB,SAAQ,KAAK;gBACrC,OAAO,EAAE,MAAM;CAI5B;AAED;;;;;GAKG;AACH,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,yBAAyB,CAAC;IAChC,UAAU,EAAE,wBAAwB,CAAC;CACtC;AA0ED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,yCAAyC,CAC7D,MAAM,EAAE,4BAA4B,GACnC,OAAO,CAAC,MAAM,CAAC,CAmEjB"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Binding between the three transactions a delegated claim signs in
3
+ * sequence: Assert must spend Claim:0 and declare it as its prevout, the
4
+ * Payout's Assert-connector input must spend Assert:0 — the Assert that is
5
+ * being signed, not another one the graph might carry — and the Payout's
6
+ * Vault-UTXO input must spend output 0 of the PegIn the Claim spends
7
+ * (btc-vault `payout.rs:66,107` and `claim.rs:120` @ ac4954e7), so the
8
+ * Payout the depositor signs pays out this vault and no other.
9
+ *
10
+ * btc-vault's `check_assert_spends_claim` (`sign.rs:1155-1193` @ ac4954e7)
11
+ * already enforces the Assert half inside `buildClaimPsbt`; it is mirrored
12
+ * here so this export holds for PSBTs built any other way. Nothing covers the
13
+ * Payout half but this. The signatures are collected once and cannot be
14
+ * re-collected, so a pairing mismatch found later leaves a signed Assert the
15
+ * signed Payout can never spend.
16
+ *
17
+ * @module services/delegated-claim/assertBinding
18
+ */
19
+ /** @experimental */
20
+ export declare class AssertBindingError extends Error {
21
+ constructor(message: string, options?: ErrorOptions);
22
+ }
23
+ /** @experimental */
24
+ export interface AssertAssertBindsClaimAndPayoutParams {
25
+ claimPsbtBase64: string;
26
+ assertPsbtBase64: string;
27
+ payoutClaimerPsbtBase64: string;
28
+ }
29
+ /**
30
+ * @throws {AssertBindingError} When Assert input 0 is not Claim:0 or does not
31
+ * declare Claim:0's value and script as its witnessUtxo, Payout
32
+ * input 1 is not Assert:0, or Payout input 0 is not output 0 of the
33
+ * PegIn the Claim spends.
34
+ * @experimental
35
+ */
36
+ export declare function assertAssertBindsClaimAndPayout(params: AssertAssertBindsClaimAndPayoutParams): void;
37
+ //# sourceMappingURL=assertBinding.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assertBinding.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/delegated-claim/assertBinding.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAcH,oBAAoB;AACpB,qBAAa,kBAAmB,SAAQ,KAAK;gBAC/B,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY;CAIpD;AAED,oBAAoB;AACpB,MAAM,WAAW,qCAAqC;IACpD,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,uBAAuB,EAAE,MAAM,CAAC;CACjC;AA8ED;;;;;;GAMG;AACH,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,qCAAqC,GAC5C,IAAI,CA8BN"}
@@ -0,0 +1,35 @@
1
+ import { DelegatedClaimVaultContext } from './types';
2
+ /**
3
+ * Throws unless the Payout's two input sequences are the vault's stamped CSV
4
+ * timelocks, both PSBTs declare the two prevout amounts the signatures commit
5
+ * to, and its implicit fee lies in the version-locked band.
6
+ *
7
+ * Not part of the public surface: it does not check which outpoints the
8
+ * Payout spends, so it is only meaningful once they are proved elsewhere.
9
+ * `buildBoundPsbtSet` proves them for the claimer PSBT with
10
+ * `assertAssertBindsClaimAndPayout`; the depositor PSBT inherits that proof
11
+ * from the byte-equality of the two unsigned transactions, which this
12
+ * function enforces itself.
13
+ *
14
+ * @throws When the fee-band inputs are out of domain, a PSBT cannot be
15
+ * parsed, the two Payout PSBTs are not the same transaction, the
16
+ * Assert has no output
17
+ * {@link ASSERT_PAYOUT_OUTPUT_INDEX}, the Payout has the wrong input
18
+ * count, a sequence is not the stamped timelock, the Payout has the
19
+ * wrong output count, the outputs exceed the inputs, the fee falls
20
+ * outside the band, or either PSBT declares no prevout on an input or
21
+ * one whose value is not the vault's PegIn output (input 0) or the
22
+ * Assert's output (input 1).
23
+ *
24
+ * @internal
25
+ */
26
+ export declare function assertPayoutFeeAndTimelocks(params: {
27
+ /** The claimer Payout signing PSBT, base64, as the graph produced it. */
28
+ payoutClaimerPsbtBase64: string;
29
+ /** The depositor Payout signing PSBT, base64, proved to be the same transaction. */
30
+ payoutDepositorPsbtBase64: string;
31
+ /** The Assert PSBT of the same graph; its output 0 is Payout input 1's prevout. */
32
+ assertPsbtBase64: string;
33
+ vault: DelegatedClaimVaultContext;
34
+ }): Promise<void>;
35
+ //# sourceMappingURL=assertPayoutFeeAndTimelocks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assertPayoutFeeAndTimelocks.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/delegated-claim/assertPayoutFeeAndTimelocks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAkBH,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAwE1D;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,2BAA2B,CAAC,MAAM,EAAE;IACxD,yEAAyE;IACzE,uBAAuB,EAAE,MAAM,CAAC;IAChC,oFAAoF;IACpF,yBAAyB,EAAE,MAAM,CAAC;IAClC,mFAAmF;IACnF,gBAAgB,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE,0BAA0B,CAAC;CACnC,GAAG,OAAO,CAAC,IAAI,CAAC,CA0GhB"}
@@ -13,6 +13,17 @@
13
13
  * `wots_keypair.json`. `vaultd vp wt` reads the same pair, so either can drive
14
14
  * the claim.
15
15
  *
16
+ * Signing is split into plan → sign → assemble so a hardware wallet can sign
17
+ * the set as ordered device ceremonies (Assert and the depositor Payout under
18
+ * the vault's loaded intent, the rest after it is released) while software
19
+ * wallets keep one batched prompt. `assembleWatchtowerArtifacts` is the
20
+ * composition of the three.
21
+ *
22
+ * The on-chain side of a claim is read here too: `readDelegatedClaimVaultContext`
23
+ * builds the vault context from the registry and its registration and
24
+ * redemption logs, and `rebuildDepositTermsForClaim` (deposit-terms) rebuilds
25
+ * the terms an approval wallet loads, with no vault provider and no indexer.
26
+ *
16
27
  * Claim time is here as well. From an assembled `artifacts.json` this module
17
28
  * pins the Groth16 proof, finalizes the Assert, and produces the Payout and
18
29
  * WronglyChallenged transactions, so a depositor whose vault provider is gone
@@ -26,12 +37,19 @@
26
37
  * @module services/delegated-claim
27
38
  */
28
39
  export { assembleWatchtowerArtifacts, type AssembleWatchtowerArtifactsParams, } from './assembleWatchtowerArtifacts';
29
- export { deriveClaimerWotsKeypair, type ClaimerWotsKeypair, type DeriveClaimerWotsKeypairParams, } from './deriveClaimerWotsKeypair';
30
- export { ArtifactsVaultMismatchError, DELEGATED_CLAIM_TX_GRAPH_VERSION, assertArtifactsUsableForVault, summarizeWatchtowerArtifacts, type AssertArtifactsUsableParams, } from './readWatchtowerArtifacts';
40
+ export { SigningPlanMismatchError, assembleWatchtowerArtifactsFromSignatures, type AssembleFromSignaturesParams, } from './assembleWatchtowerArtifactsFromSignatures';
41
+ export { AssertBindingError, assertAssertBindsClaimAndPayout, type AssertAssertBindsClaimAndPayoutParams, } from './assertBinding';
31
42
  export { ChallengerSetMismatchError, assertChallengerSetMatchesVault, type AssertChallengerSetMatchesVaultParams, } from './challengerBinding';
43
+ export { deriveClaimerWotsKeypair, type ClaimerWotsKeypair, type DeriveClaimerWotsKeypairParams, } from './deriveClaimerWotsKeypair';
32
44
  export { PayoutDestinationError, assertPayoutPaysRegisteredScript, type AssertPayoutPaysRegisteredScriptParams, } from './payoutBinding';
45
+ export { PayoutInputLeafError, copyAssertConnectorLeaf, type CopyAssertConnectorLeafParams, } from './payoutInputLeaf';
46
+ export { planDelegatedClaimSigning, type PlanDelegatedClaimSigningParams, } from './planDelegatedClaimSigning';
47
+ export { readDelegatedClaimVaultContext, type DelegatedClaimVaultRead, type DelegatedClaimVaultReaders, type ReadDelegatedClaimVaultContextParams, } from './readDelegatedClaimVaultContext';
48
+ export { ArtifactsVaultMismatchError, DELEGATED_CLAIM_TX_GRAPH_VERSION, assertArtifactsUsableForVault, summarizeWatchtowerArtifacts, type AssertArtifactsUsableParams, } from './readWatchtowerArtifacts';
49
+ export { DelegatedClaimSigningIncompleteError, assertTermsMatchVault, signDelegatedClaimPlan, type DelegatedClaimPsbtSigner, type SignDelegatedClaimPlanOptions, } from './signDelegatedClaimPlan';
50
+ export { BABE_SESSION_PLACEHOLDER_DECRYPTOR_HEX } from './types';
51
+ export type { ClaimerArtifactsSource, DelegatedClaimSignatures, DelegatedClaimSigningKind, DelegatedClaimSigningPlan, DelegatedClaimSigningRequest, DelegatedClaimVaultContext, WatchtowerArtifactsSummary, } from './types';
33
52
  export { VaultIdBindingError, assertClaimSpendsVault, type AssertClaimSpendsVaultParams, } from './vaultIdBinding';
34
- export type { ClaimerArtifactsSource, DelegatedClaimVaultContext, WatchtowerArtifactsSummary, } from './types';
35
53
  /**
36
54
  * Claim-time execution, artifacts in and artifacts out.
37
55
  *
@@ -51,5 +69,5 @@ export type { ClaimerArtifactsSource, DelegatedClaimVaultContext, WatchtowerArti
51
69
  * one-time WOTS keypair signs exactly one proof, and a second, different one
52
70
  * is refused.
53
71
  */
54
- export { pinPegoutProof, attachFinalizedAssert, finalizePayout, finalizeWronglyChallenged, } from '../../wasm';
72
+ export { attachFinalizedAssert, finalizePayout, finalizeWronglyChallenged, pinPegoutProof, } from '../../wasm';
55
73
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/delegated-claim/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EACL,2BAA2B,EAC3B,KAAK,iCAAiC,GACvC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,wBAAwB,EACxB,KAAK,kBAAkB,EACvB,KAAK,8BAA8B,GACpC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,2BAA2B,EAC3B,gCAAgC,EAChC,6BAA6B,EAC7B,4BAA4B,EAC5B,KAAK,2BAA2B,GACjC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,0BAA0B,EAC1B,+BAA+B,EAC/B,KAAK,qCAAqC,GAC3C,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,sBAAsB,EACtB,gCAAgC,EAChC,KAAK,sCAAsC,GAC5C,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,KAAK,4BAA4B,GAClC,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,sBAAsB,EACtB,0BAA0B,EAC1B,0BAA0B,GAC3B,MAAM,SAAS,CAAC;AAEjB;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,cAAc,EACd,yBAAyB,GAC1B,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/delegated-claim/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,EACL,2BAA2B,EAC3B,KAAK,iCAAiC,GACvC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,wBAAwB,EACxB,yCAAyC,EACzC,KAAK,4BAA4B,GAClC,MAAM,6CAA6C,CAAC;AACrD,OAAO,EACL,kBAAkB,EAClB,+BAA+B,EAC/B,KAAK,qCAAqC,GAC3C,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,0BAA0B,EAC1B,+BAA+B,EAC/B,KAAK,qCAAqC,GAC3C,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,wBAAwB,EACxB,KAAK,kBAAkB,EACvB,KAAK,8BAA8B,GACpC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,sBAAsB,EACtB,gCAAgC,EAChC,KAAK,sCAAsC,GAC5C,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,KAAK,6BAA6B,GACnC,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,yBAAyB,EACzB,KAAK,+BAA+B,GACrC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,8BAA8B,EAC9B,KAAK,uBAAuB,EAC5B,KAAK,0BAA0B,EAC/B,KAAK,oCAAoC,GAC1C,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,2BAA2B,EAC3B,gCAAgC,EAChC,6BAA6B,EAC7B,4BAA4B,EAC5B,KAAK,2BAA2B,GACjC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,oCAAoC,EACpC,qBAAqB,EACrB,sBAAsB,EACtB,KAAK,wBAAwB,EAC7B,KAAK,6BAA6B,GACnC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,sCAAsC,EAAE,MAAM,SAAS,CAAC;AACjE,YAAY,EACV,sBAAsB,EACtB,wBAAwB,EACxB,yBAAyB,EACzB,yBAAyB,EACzB,4BAA4B,EAC5B,0BAA0B,EAC1B,0BAA0B,GAC3B,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,KAAK,4BAA4B,GAClC,MAAM,kBAAkB,CAAC;AAE1B;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EACL,qBAAqB,EACrB,cAAc,EACd,yBAAyB,EACzB,cAAc,GACf,MAAM,YAAY,CAAC"}
@@ -12,9 +12,9 @@
12
12
  *
13
13
  * This is the claim-side counterpart of `assertPayoutOutputLayout` in
14
14
  * `primitives/psbt/payout.ts`, which the deposit-time path already runs for
15
- * the same `depositor-as-claimer` role. It pins the same four things: the
16
- * output count, the payout script, the CPFP anchor value, and the version
17
- * and locktime the depositor's signature commits to.
15
+ * the same `depositor-as-claimer` role. It pins the same things: the output
16
+ * count, the payout script, the CPFP anchor's value and destination, and the
17
+ * version and locktime the depositor's signature commits to.
18
18
  *
19
19
  * @module services/delegated-claim/payoutBinding
20
20
  */
@@ -48,6 +48,11 @@ export interface AssertPayoutPaysRegisteredScriptParams {
48
48
  * of comparing against it.
49
49
  */
50
50
  registeredPayoutScriptPubKey: string;
51
+ /**
52
+ * The vault's registered depositor key, x-only hex. The CPFP anchor is the
53
+ * claimer's BIP-86 output, and on this path the claimer is the depositor.
54
+ */
55
+ depositorBtcPubkey: string;
51
56
  }
52
57
  /**
53
58
  * Throws unless the Payout pays the vault's registered payout script.
@@ -57,7 +62,8 @@ export interface AssertPayoutPaysRegisteredScriptParams {
57
62
  * pass; checking only one would leave the other free to differ.
58
63
  *
59
64
  * @throws {@link PayoutDestinationError} when output 0 pays elsewhere, or a
60
- * plain error when the layout is not the canonical claimer layout.
65
+ * plain error when the layout is not the canonical claimer layout or
66
+ * the CPFP anchor is not the depositor's BIP-86 P2TR.
61
67
  *
62
68
  * @experimental
63
69
  */
@@ -1 +1 @@
1
- {"version":3,"file":"payoutBinding.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/delegated-claim/payoutBinding.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAgBH;;;;GAIG;AACH,qBAAa,sBAAuB,SAAQ,KAAK;IAE7C,uDAAuD;IACvD,QAAQ,CAAC,iBAAiB,EAAE,MAAM;IAClC,sDAAsD;IACtD,QAAQ,CAAC,eAAe,EAAE,MAAM;;IAHhC,uDAAuD;IAC9C,iBAAiB,EAAE,MAAM;IAClC,sDAAsD;IAC7C,eAAe,EAAE,MAAM;CAUnC;AAED;;;;GAIG;AACH,MAAM,WAAW,sCAAsC;IACrD,+DAA+D;IAC/D,gBAAgB,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,4BAA4B,EAAE,MAAM,CAAC;CACtC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gCAAgC,CAC9C,MAAM,EAAE,sCAAsC,GAC7C,IAAI,CAmDN"}
1
+ {"version":3,"file":"payoutBinding.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/delegated-claim/payoutBinding.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAeH;;;;GAIG;AACH,qBAAa,sBAAuB,SAAQ,KAAK;IAE7C,uDAAuD;IACvD,QAAQ,CAAC,iBAAiB,EAAE,MAAM;IAClC,sDAAsD;IACtD,QAAQ,CAAC,eAAe,EAAE,MAAM;;IAHhC,uDAAuD;IAC9C,iBAAiB,EAAE,MAAM;IAClC,sDAAsD;IAC7C,eAAe,EAAE,MAAM;CAUnC;AAED;;;;GAIG;AACH,MAAM,WAAW,sCAAsC;IACrD,+DAA+D;IAC/D,gBAAgB,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,4BAA4B,EAAE,MAAM,CAAC;IACrC;;;OAGG;IACH,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,gCAAgC,CAC9C,MAAM,EAAE,sCAAsC,GAC7C,IAAI,CAoEN"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * The depositor Payout PSBT the WASM builder emits carries a `witness_utxo` on
3
+ * every input but taproot metadata on input 0 alone, the one it signs
4
+ * (btc-vault `crates/vault/src/psbt.rs:125-128` sets every prevout, `:130-131`
5
+ * writes the leaf, internal key and merkle root only for the requested inputs,
6
+ * and `transactions/payout.rs:268-274` requests input 0 alone @ ac4954e7).
7
+ * A hardware wallet's intent-bound payout
8
+ * validator reads input 1's leaf to identify the claimer before it signs
9
+ * input 0, so without it the device refuses. The claimer Payout PSBT is the
10
+ * same unsigned transaction and carries exactly that leaf on input 1, so it
11
+ * is copied across here, once, for every wallet: software wallets sign
12
+ * input 0 and ignore input 1's metadata.
13
+ *
14
+ * @module services/delegated-claim/payoutInputLeaf
15
+ */
16
+ /** @experimental */
17
+ export declare class PayoutInputLeafError extends Error {
18
+ constructor(message: string);
19
+ }
20
+ /** @experimental */
21
+ export interface CopyAssertConnectorLeafParams {
22
+ payoutDepositorPsbtBase64: string;
23
+ payoutClaimerPsbtBase64: string;
24
+ }
25
+ /**
26
+ * @returns The depositor Payout PSBT (base64) with input 1's taproot
27
+ * metadata taken from the claimer Payout PSBT.
28
+ * @throws {PayoutInputLeafError} If the two PSBTs are not the same unsigned
29
+ * transaction, the claimer PSBT carries no single input-1 leaf, or
30
+ * the depositor PSBT already carries one.
31
+ * @experimental
32
+ */
33
+ export declare function copyAssertConnectorLeaf(params: CopyAssertConnectorLeafParams): string;
34
+ //# sourceMappingURL=payoutInputLeaf.d.ts.map