@babylonlabs-io/ts-sdk 0.62.1 → 0.64.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/dist/{BTCVaultRegistry.abi-B3BLhpJ4.js → BTCVaultRegistry.abi-CJwWI2EO.js} +5 -1
  2. package/dist/{BTCVaultRegistry.abi-B3BLhpJ4.js.map → BTCVaultRegistry.abi-CJwWI2EO.js.map} +1 -1
  3. package/dist/{BTCVaultRegistry.abi-3VLWva2x.cjs → BTCVaultRegistry.abi-z7d_eP22.cjs} +2 -2
  4. package/dist/{BTCVaultRegistry.abi-3VLWva2x.cjs.map → BTCVaultRegistry.abi-z7d_eP22.cjs.map} +1 -1
  5. package/dist/{PeginManager-C8kIl0gw.js → PeginManager-BBl4xkWz.js} +7 -6
  6. package/dist/{PeginManager-C8kIl0gw.js.map → PeginManager-BBl4xkWz.js.map} +1 -1
  7. package/dist/{PeginManager-BgBt4hqp.cjs → PeginManager-p-ajwSxG.cjs} +2 -2
  8. package/dist/{PeginManager-BgBt4hqp.cjs.map → PeginManager-p-ajwSxG.cjs.map} +1 -1
  9. package/dist/{ProtocolParams.abi-CV938AYZ.js → ProtocolParams.abi-C0TSRaHV.js} +17 -1
  10. package/dist/{ProtocolParams.abi-CV938AYZ.js.map → ProtocolParams.abi-C0TSRaHV.js.map} +1 -1
  11. package/dist/{ProtocolParams.abi-C8U7BHCS.cjs → ProtocolParams.abi-CYZoV2EI.cjs} +2 -2
  12. package/dist/{ProtocolParams.abi-C8U7BHCS.cjs.map → ProtocolParams.abi-CYZoV2EI.cjs.map} +1 -1
  13. package/dist/batchPoll-6L5oToGr.cjs +2 -0
  14. package/dist/batchPoll-6L5oToGr.cjs.map +1 -0
  15. package/dist/{batchPoll-9w-Gv5dt.js → batchPoll-cIxrSLLJ.js} +43 -21
  16. package/dist/batchPoll-cIxrSLLJ.js.map +1 -0
  17. package/dist/{buildAndBroadcastRefund-CH2awK6h.js → buildAndBroadcastRefund-C2fP3Rva.js} +5 -5
  18. package/dist/{buildAndBroadcastRefund-CH2awK6h.js.map → buildAndBroadcastRefund-C2fP3Rva.js.map} +1 -1
  19. package/dist/{buildAndBroadcastRefund-CYzhA_B8.cjs → buildAndBroadcastRefund-CYtnT0D_.cjs} +2 -2
  20. package/dist/{buildAndBroadcastRefund-CYzhA_B8.cjs.map → buildAndBroadcastRefund-CYtnT0D_.cjs.map} +1 -1
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.js +157 -146
  23. package/dist/{mempoolApi-BXaOZL_I.js → mempoolApi-BxSINXIB.js} +2 -2
  24. package/dist/{mempoolApi-BXaOZL_I.js.map → mempoolApi-BxSINXIB.js.map} +1 -1
  25. package/dist/{mempoolApi-Bsurcl43.cjs → mempoolApi-CXfr-L6x.cjs} +2 -2
  26. package/dist/{mempoolApi-Bsurcl43.cjs.map → mempoolApi-CXfr-L6x.cjs.map} +1 -1
  27. package/dist/{noPayout-oaUVsEjk.js → noPayout-BaZGRLD2.js} +2 -2
  28. package/dist/{noPayout-oaUVsEjk.js.map → noPayout-BaZGRLD2.js.map} +1 -1
  29. package/dist/{noPayout-CbxQqBw1.cjs → noPayout-CnQ1WLtr.cjs} +2 -2
  30. package/dist/{noPayout-CbxQqBw1.cjs.map → noPayout-CnQ1WLtr.cjs.map} +1 -1
  31. package/dist/reconstructPeginParams-BVA67Iv8.js +400 -0
  32. package/dist/reconstructPeginParams-BVA67Iv8.js.map +1 -0
  33. package/dist/reconstructPeginParams-BmUVK7F_.cjs +2 -0
  34. package/dist/reconstructPeginParams-BmUVK7F_.cjs.map +1 -0
  35. package/dist/{signPsbtsWithFallback-DC4rUCsy.js → signPsbtsWithFallback-Bb66DfY5.js} +2 -2
  36. package/dist/{signPsbtsWithFallback-DC4rUCsy.js.map → signPsbtsWithFallback-Bb66DfY5.js.map} +1 -1
  37. package/dist/{signPsbtsWithFallback-DbOmw8Ou.cjs → signPsbtsWithFallback-PTgWxsG3.cjs} +2 -2
  38. package/dist/{signPsbtsWithFallback-DbOmw8Ou.cjs.map → signPsbtsWithFallback-PTgWxsG3.cjs.map} +1 -1
  39. package/dist/tbv/core/clients/eth/protocol-params-reader.d.ts +11 -0
  40. package/dist/tbv/core/clients/eth/protocol-params-reader.d.ts.map +1 -1
  41. package/dist/tbv/core/clients/eth/types.d.ts +18 -0
  42. package/dist/tbv/core/clients/eth/types.d.ts.map +1 -1
  43. package/dist/tbv/core/clients/index.cjs +1 -1
  44. package/dist/tbv/core/clients/index.js +2 -2
  45. package/dist/tbv/core/contracts/abis/BTCVaultRegistry.abi.d.ts +4 -0
  46. package/dist/tbv/core/contracts/abis/BTCVaultRegistry.abi.d.ts.map +1 -1
  47. package/dist/tbv/core/contracts/abis/ProtocolParams.abi.d.ts +10 -0
  48. package/dist/tbv/core/contracts/abis/ProtocolParams.abi.d.ts.map +1 -1
  49. package/dist/tbv/core/contracts/index.cjs +1 -1
  50. package/dist/tbv/core/contracts/index.js +2 -2
  51. package/dist/tbv/core/index.cjs +1 -1
  52. package/dist/tbv/core/index.d.ts +3 -0
  53. package/dist/tbv/core/index.d.ts.map +1 -1
  54. package/dist/tbv/core/index.js +151 -140
  55. package/dist/tbv/core/managers/index.cjs +1 -1
  56. package/dist/tbv/core/managers/index.js +2 -2
  57. package/dist/tbv/core/primitives/index.cjs +1 -1
  58. package/dist/tbv/core/primitives/index.js +2 -2
  59. package/dist/tbv/core/primitives/psbt/assertWasmPeginSizing.d.ts +16 -2
  60. package/dist/tbv/core/primitives/psbt/assertWasmPeginSizing.d.ts.map +1 -1
  61. package/dist/tbv/core/recovery/__tests__/deriveHashlocksFromPrePegin.test.d.ts +10 -0
  62. package/dist/tbv/core/recovery/__tests__/deriveHashlocksFromPrePegin.test.d.ts.map +1 -0
  63. package/dist/tbv/core/recovery/__tests__/peginSizingIntegrity.test.d.ts +16 -0
  64. package/dist/tbv/core/recovery/__tests__/peginSizingIntegrity.test.d.ts.map +1 -0
  65. package/dist/tbv/core/recovery/__tests__/reconstructPeginParams.test.d.ts +14 -0
  66. package/dist/tbv/core/recovery/__tests__/reconstructPeginParams.test.d.ts.map +1 -0
  67. package/dist/tbv/core/recovery/deriveHashlocksFromPrePegin.d.ts +37 -0
  68. package/dist/tbv/core/recovery/deriveHashlocksFromPrePegin.d.ts.map +1 -0
  69. package/dist/tbv/core/recovery/index.d.ts +18 -0
  70. package/dist/tbv/core/recovery/index.d.ts.map +1 -0
  71. package/dist/tbv/core/recovery/peginParamsCandidates.d.ts +98 -0
  72. package/dist/tbv/core/recovery/peginParamsCandidates.d.ts.map +1 -0
  73. package/dist/tbv/core/recovery/reconstructPeginParams.d.ts +112 -0
  74. package/dist/tbv/core/recovery/reconstructPeginParams.d.ts.map +1 -0
  75. package/dist/tbv/core/recovery/recoveryErrors.d.ts +97 -0
  76. package/dist/tbv/core/recovery/recoveryErrors.d.ts.map +1 -0
  77. package/dist/tbv/core/services/index.cjs +1 -1
  78. package/dist/tbv/core/services/index.js +2 -2
  79. package/dist/tbv/index.cjs +1 -1
  80. package/dist/tbv/index.js +151 -140
  81. package/dist/verifyScriptPathSchnorrSignature-DPAd_qke.cjs +2 -0
  82. package/dist/verifyScriptPathSchnorrSignature-DPAd_qke.cjs.map +1 -0
  83. package/dist/{verifyScriptPathSchnorrSignature-XsICweGG.js → verifyScriptPathSchnorrSignature-i-koT139.js} +176 -170
  84. package/dist/verifyScriptPathSchnorrSignature-i-koT139.js.map +1 -0
  85. package/package.json +1 -1
  86. package/dist/batchPoll-9w-Gv5dt.js.map +0 -1
  87. package/dist/batchPoll-WMXweT_O.cjs +0 -2
  88. package/dist/batchPoll-WMXweT_O.cjs.map +0 -1
  89. package/dist/errors-BxL9QObN.js +0 -137
  90. package/dist/errors-BxL9QObN.js.map +0 -1
  91. package/dist/errors-DwjbI9h1.cjs +0 -2
  92. package/dist/errors-DwjbI9h1.cjs.map +0 -1
  93. package/dist/verifyScriptPathSchnorrSignature-B8zK1ctE.cjs +0 -2
  94. package/dist/verifyScriptPathSchnorrSignature-B8zK1ctE.cjs.map +0 -1
  95. package/dist/verifyScriptPathSchnorrSignature-XsICweGG.js.map +0 -1
@@ -1,46 +1,46 @@
1
1
  import { b as s, c as t } from "../../challengeAssert-C7PzyJ7g.js";
2
2
  import { a as i } from "../../constants-GjWXdaqV.js";
3
- import { computeMinClaimValue as n, computeMinPeginFee as p, deriveVaultId as u, expandAuthAnchor as l, expandHashlockSecret as P, expandWotsSeed as c, peginP2aAnchorOutput as d, supportedTxGraphVersions as E, validatePeginP2aAnchor as A } from "@babylonlabs-io/babylon-tbv-rust-wasm";
4
- import { P as g, d as R, f as S, c as _, b as m, a as f, g as x, e as C } from "../../verifyScriptPathSchnorrSignature-XsICweGG.js";
5
- import { b, e as I, f as v } from "../../peginInput-HQPWZfly.js";
6
- import { a as V, b as y } from "../../noPayout-oaUVsEjk.js";
7
- import { c as M, d as N, a as F, b as B, e as U, f as H, k as L, g as K, h as k, i as X, j as w, p as W, s as G, t as j, u as J, v as Y } from "../../bitcoin-d9eaaZB_.js";
8
- import { B as z, H as q, K as Q, M as $, T as aa, c as ea } from "../../validation-Dj3dqYtl.js";
3
+ import { computeMinClaimValue as n, computeMinPeginFee as P, deriveVaultId as p, expandAuthAnchor as u, expandHashlockSecret as c, expandWotsSeed as d, peginP2aAnchorOutput as l, supportedTxGraphVersions as E, validatePeginP2aAnchor as g } from "@babylonlabs-io/babylon-tbv-rust-wasm";
4
+ import { P as T, d as R, f as S, c as m, b as _, a as f, g as C, e as x } from "../../verifyScriptPathSchnorrSignature-i-koT139.js";
5
+ import { b, e as h, f as I } from "../../peginInput-HQPWZfly.js";
6
+ import { a as V, b as y } from "../../noPayout-BaZGRLD2.js";
7
+ import { c as F, d as M, a as N, b as B, e as U, f as H, k as L, g as k, h as K, i as X, j as w, p as W, s as G, t as j, u as J, v as z } from "../../bitcoin-d9eaaZB_.js";
8
+ import { B as Z, H as q, K as Q, M as $, T as aa, c as ea } from "../../validation-Dj3dqYtl.js";
9
9
  import { c as ta } from "../../signing-DaLvGwQe.js";
10
- import { C as ia, M as oa, P as na, b as pa, a as ua, c as la, d as Pa, f as ca, e as da } from "../../PeginManager-C8kIl0gw.js";
11
- import { P as Aa, c as Ta, f as ga, s as Ra, v as Sa } from "../../signPsbtsWithFallback-DC4rUCsy.js";
12
- import { A as ma, P as fa } from "../../ProtocolParams.abi-CV938AYZ.js";
13
- import { B as Ca } from "../../BTCVaultRegistry.abi-B3BLhpJ4.js";
10
+ import { C as ia, M as oa, P as na, b as Pa, a as pa, c as ua, d as ca, f as da, e as la } from "../../PeginManager-BBl4xkWz.js";
11
+ import { P as ga, c as Aa, f as Ta, s as Ra, v as Sa } from "../../signPsbtsWithFallback-Bb66DfY5.js";
12
+ import { A as _a, P as fa } from "../../ProtocolParams.abi-C0TSRaHV.js";
13
+ import { B as xa } from "../../BTCVaultRegistry.abi-CJwWI2EO.js";
14
14
  import { B as ba } from "../../BTCVaultRegistryKeyEpochs.abi-CXjhRZbm.js";
15
- import { C as va, e as ha, g as Va, h as ya, i as Da } from "../../errors-Blc-JWnI.js";
16
- import { V as Na, b as Fa, a as Ba, d as Ua, f as Ha, p as La } from "../../parseFundingOutpoints-pBRE11Hr.js";
17
- import { B as ka, a as Xa, f as wa, c as Wa, b as Ga, d as ja, g as Ja, i as Ya, h as Za, s as za, e as qa, w as Qa } from "../../waitForTransactionReceiptSmartAware-lobLm0q0.js";
18
- import { B as ae, D as ee, L as se, M as te, c as re, P as ie, b as oe, a as ne, S as pe, T as ue, W as le, f as Pe, d as ce, p as de, r as Ee } from "../../fundPeginTransaction-B2wyjqp0.js";
19
- import { U as Te, a as ge, e as Re, f as Se, v as _e } from "../../reservation-B4i_PQhY.js";
20
- import { M as fe, V as xe, g as Ce, a as Oe, b as be, c as Ie, d as ve, e as he, f as Ve, h as ye, i as De, p as Me, v as Ne, j as Fe, k as Be } from "../../mempoolApi-BXaOZL_I.js";
21
- import { O as He, S as Le, V as Ke, g as ke, h as Xe, i as we, j as We, a as Ge, d as je, b as Je, f as Ye, p as Ze, r as ze, v as qe, c as Qe, e as $e } from "../../batchPoll-9w-Gv5dt.js";
22
- import { A as es, D as ss, J as ts, a as rs, b as is, d as os, P as ns, R as ps, e as us, c as ls, V as Ps, i as cs } from "../../json-rpc-client-DuUARJvV.js";
15
+ import { C as Ia, e as va, g as Va, h as ya, i as Da } from "../../errors-Blc-JWnI.js";
16
+ import { V as Ma, b as Na, a as Ba, d as Ua, f as Ha, p as La } from "../../parseFundingOutpoints-pBRE11Hr.js";
17
+ import { B as Ka, a as Xa, f as wa, c as Wa, b as Ga, d as ja, g as Ja, i as za, h as Ya, s as Za, e as qa, w as Qa } from "../../waitForTransactionReceiptSmartAware-lobLm0q0.js";
18
+ import { B as ae, D as ee, L as se, M as te, c as re, P as ie, b as oe, a as ne, S as Pe, T as pe, W as ue, f as ce, d as de, p as le, r as Ee } from "../../fundPeginTransaction-B2wyjqp0.js";
19
+ import { U as Ae, a as Te, e as Re, f as Se, v as me } from "../../reservation-B4i_PQhY.js";
20
+ import { M as fe, V as Ce, g as xe, a as Oe, b as be, c as he, d as Ie, e as ve, f as Ve, h as ye, i as De, p as Fe, v as Me, j as Ne, k as Be } from "../../mempoolApi-BxSINXIB.js";
21
+ import { O as He, S as Le, V as ke, g as Ke, h as Xe, i as we, j as We, a as Ge, d as je, b as Je, f as ze, p as Ye, r as Ze, v as qe, c as Qe, e as $e } from "../../batchPoll-cIxrSLLJ.js";
22
+ import { A as es, D as ss, J as ts, a as rs, b as is, d as os, P as ns, R as Ps, e as ps, c as us, V as cs, i as ds } from "../../json-rpc-client-DuUARJvV.js";
23
23
  import { a as Es } from "../../onChainBtcPubkey-DeF4cKoO.js";
24
- import { D as Ts, a as gs, b as Rs, i as Ss, r as _s } from "../../errors-BxL9QObN.js";
25
- import { H as fs, E as xs, P as Cs, o as Os, c as bs, d as Is, K as vs, L as hs, M as Vs, N as ys, R as Ds, a as Ms, b as Ns, y as Fs, I as Bs, J as Us, g as Hs, z as Ls, p as Ks, i as ks, e as Xs, G as ws, F as Ws, t as Gs, A as js, B as Js, C as Ys, D as Zs, r as zs, s as qs, f as Qs, h as $s, j as at, v as et, k as st, l as tt, m as rt, n as it, q as ot, u as nt, w as pt, x as ut } from "../../buildAndBroadcastRefund-CH2awK6h.js";
26
- import { C as Pt, P as ct, c as dt, g as Et, i as At } from "../../peginState-CxDiaKuk.js";
24
+ import { D as As, a as Ts, h as Rs, j as Ss, P as ms, k as _s, U as fs, V as Cs, c as xs, d as Os, f as bs, e as hs, b as Is, i as vs, r as Vs, g as ys } from "../../reconstructPeginParams-BVA67Iv8.js";
25
+ import { H as Fs, E as Ms, P as Ns, o as Bs, c as Us, d as Hs, K as Ls, L as ks, M as Ks, N as Xs, R as ws, a as Ws, b as Gs, y as js, I as Js, J as zs, g as Ys, z as Zs, p as qs, i as Qs, e as $s, G as at, F as et, t as st, A as tt, B as rt, C as it, D as ot, r as nt, s as Pt, f as pt, h as ut, j as ct, v as dt, k as lt, l as Et, m as gt, n as At, q as Tt, u as Rt, w as St, x as mt } from "../../buildAndBroadcastRefund-C2fP3Rva.js";
26
+ import { C as ft, P as Ct, c as xt, g as Ot, i as bt } from "../../peginState-CxDiaKuk.js";
27
27
  export {
28
28
  es as AUTH_REJECTED_RPC_CODE,
29
- ma as ApplicationRegistryABI,
30
- fs as BIP68NotMatureError,
31
- z as BITCOIN_ADDRESS_RE,
32
- Ca as BTCVaultRegistryABI,
29
+ _a as ApplicationRegistryABI,
30
+ Fs as BIP68NotMatureError,
31
+ Z as BITCOIN_ADDRESS_RE,
32
+ xa as BTCVaultRegistryABI,
33
33
  ba as BTCVaultRegistryKeyEpochsABI,
34
34
  ae as BTC_DUST_SAT,
35
- ka as BitcoinScriptType,
35
+ Ka as BitcoinScriptType,
36
36
  ia as COMMISSION_BPS_HEADROOM,
37
- va as CONTRACT_ERRORS,
38
- xs as ClaimerPegoutStatusValue,
39
- Pt as ContractStatus,
40
- Ts as DEPOSIT_TERMS_REJECTED_ERROR_NAME,
37
+ Ia as CONTRACT_ERRORS,
38
+ Ms as ClaimerPegoutStatusValue,
39
+ ft as ContractStatus,
40
+ As as DEPOSIT_TERMS_REJECTED_ERROR_NAME,
41
41
  ee as DUST_THRESHOLD,
42
42
  ss as DaemonStatus,
43
- gs as DepositTermsRejectedError,
43
+ Ts as DepositTermsRejectedError,
44
44
  q as HEX_RE,
45
45
  ts as JSON_RPC_ERROR_CODES,
46
46
  rs as JsonRpcClient,
@@ -55,180 +55,191 @@ export {
55
55
  He as OnChainBtcVaultStatus,
56
56
  ie as P2TR_INPUT_SIZE,
57
57
  oe as PEGIN_AUTH_ANCHOR_OUTPUTS,
58
- Cs as PEGIN_ETH_CONFIRMATIONS,
58
+ Ns as PEGIN_ETH_CONFIRMATIONS,
59
59
  ne as PEGIN_FIXED_OUTPUTS,
60
60
  os as POST_WOTS_STATUSES,
61
61
  ns as PRE_DEPOSITOR_SIGNATURES_STATES,
62
- Os as ParticipantKeyDriftError,
63
- Aa as PayoutManager,
64
- ct as PeginAction,
62
+ Bs as ParticipantKeyDriftError,
63
+ ga as PayoutManager,
64
+ Ct as PeginAction,
65
65
  na as PeginManager,
66
- bs as PeginRegistrationMissingError,
67
- Is as PeginRegistrationNotFinalError,
66
+ Rs as PeginParamsAmbiguousError,
67
+ Ss as PeginParamsIncompleteSpaceError,
68
+ ms as PeginParamsNotFoundError,
69
+ Us as PeginRegistrationMissingError,
70
+ Hs as PeginRegistrationNotFinalError,
71
+ _s as PeginSizingIntegrityError,
68
72
  fa as ProtocolParamsABI,
69
- g as PsbtSubstitutionError,
70
- vs as REFUND_MAX_FEE_FRACTION_DENOMINATOR,
71
- hs as REFUND_MAX_FEE_FRACTION_NUMERATOR,
72
- Vs as REFUND_MAX_FEE_RATE_SATS_VB,
73
- ys as REFUND_VSIZE,
74
- Ds as RegisteredVaultVersionMismatchError,
75
- ps as RpcErrorCode,
76
- pe as SPLIT_TX_FEE_SAFETY_MULTIPLIER,
73
+ T as PsbtSubstitutionError,
74
+ Ls as REFUND_MAX_FEE_FRACTION_DENOMINATOR,
75
+ ks as REFUND_MAX_FEE_FRACTION_NUMERATOR,
76
+ Ks as REFUND_MAX_FEE_RATE_SATS_VB,
77
+ Xs as REFUND_VSIZE,
78
+ ws as RegisteredVaultVersionMismatchError,
79
+ Ps as RpcErrorCode,
80
+ Pe as SPLIT_TX_FEE_SAFETY_MULTIPLIER,
77
81
  Le as ServerIdentityError,
78
82
  aa as TXID_RE,
79
- ue as TX_BUFFER_SIZE_OVERHEAD,
80
- Te as UtxoNotAvailableError,
81
- Na as VAULT_APP_NAME,
82
- us as VP_BATCH_MAX_SIZE,
83
- ls as VP_TERMINAL_FAILURE_STATUSES,
84
- Ps as VP_TRANSIENT_STATUSES,
85
- Ke as VaultProviderRpcClient,
86
- ke as ViemOperationKeyReader,
83
+ pe as TX_BUFFER_SIZE_OVERHEAD,
84
+ fs as UnanchoredPrePeginError,
85
+ Ae as UtxoNotAvailableError,
86
+ Ma as VAULT_APP_NAME,
87
+ ps as VP_BATCH_MAX_SIZE,
88
+ us as VP_TERMINAL_FAILURE_STATUSES,
89
+ cs as VP_TRANSIENT_STATUSES,
90
+ ke as VaultProviderRpcClient,
91
+ Cs as VaultRootMismatchError,
92
+ Ke as ViemOperationKeyReader,
87
93
  Xe as ViemProtocolParamsReader,
88
94
  we as ViemUniversalChallengerReader,
89
95
  We as ViemVaultKeeperReader,
90
- xe as ViemVaultRegistryReader,
96
+ Ce as ViemVaultRegistryReader,
91
97
  Ge as VpResponseValidationError,
92
98
  je as VpTokenRegistry,
93
- le as WALLET_RELAY_FEE_RATE_THRESHOLD,
94
- Ms as activateVault,
95
- Ns as activateVaultAndRedeem,
99
+ ue as WALLET_RELAY_FEE_RATE_THRESHOLD,
100
+ Ws as activateVault,
101
+ Gs as activateVaultAndRedeem,
96
102
  Xa as applyChangeOutputPolicy,
97
103
  Es as assertOnChainBtcPubkey,
98
104
  R as assertPsbtUnsignedTxMatches,
99
105
  S as assertScriptPathSchnorrSignature,
100
- ge as assertUtxosAvailable,
106
+ Te as assertUtxosAvailable,
101
107
  i as assertValidVaultCoreVersion,
102
- Fs as assertVaultProviderHintAccepted,
108
+ js as assertVaultProviderHintAccepted,
103
109
  Je as batchPollByProvider,
104
- Bs as buildAndBroadcastRefund,
110
+ Js as buildAndBroadcastRefund,
105
111
  s as buildChallengeAssertPsbt,
106
- pa as buildDepositTerms,
107
- Fa as buildFundingOutpointsCommitment,
112
+ Pa as buildDepositTerms,
113
+ Na as buildFundingOutpointsCommitment,
108
114
  V as buildNoPayoutPsbt,
109
- _ as buildPayoutPsbt,
115
+ m as buildPayoutPsbt,
110
116
  b as buildPeginInputPsbt,
111
- m as buildPeginTxFromFundedPrePegin,
117
+ xs as buildPeginParamsCandidates,
118
+ _ as buildPeginTxFromFundedPrePegin,
112
119
  f as buildPrePeginPsbt,
113
120
  y as buildRefundPsbt,
114
121
  Ba as buildVaultContext,
115
122
  wa as calculateBtcTxHash,
116
- dt as canPerformAction,
117
- M as canonicalizeBtcPubkey,
118
- ua as capMaxAcceptableCommissionBps,
123
+ xt as canPerformAction,
124
+ F as canonicalizeBtcPubkey,
125
+ pa as capMaxAcceptableCommissionBps,
119
126
  ea as combineAbortSignals,
120
127
  Wa as computeChangeOutputFeeSats,
121
- Ta as computeHashlock,
128
+ Aa as computeHashlock,
122
129
  Ga as computeMaxDeposit,
123
130
  n as computeMinClaimValue,
124
- p as computeMinPeginFee,
131
+ P as computeMinPeginFee,
125
132
  t as computeNumLocalChallengers,
126
133
  ja as computePeginBaseFeeSats,
127
- la as computeWotsBlockPublicKeysHash,
128
- Ye as createAuthenticatedVpClient,
129
- x as createPayoutScript,
134
+ ua as computeWotsBlockPublicKeysHash,
135
+ ze as createAuthenticatedVpClient,
136
+ C as createPayoutScript,
130
137
  ta as createTaprootScriptPathSignOptions,
131
- N as deriveBip86ScriptPubKeyHex,
132
- F as deriveNativeSegwitAddress,
138
+ M as deriveBip86ScriptPubKeyHex,
139
+ Os as deriveHashlocksFromPrePegin,
140
+ N as deriveNativeSegwitAddress,
133
141
  B as deriveTaprootAddress,
134
- u as deriveVaultId,
142
+ p as deriveVaultId,
135
143
  Ua as deriveVaultRoot,
136
- Pa as deriveWotsBlocksFromSeed,
144
+ ca as deriveWotsBlocksFromSeed,
145
+ bs as describePeginParamsCandidate,
146
+ hs as describeUnresolvedVersion,
137
147
  U as ensureHexPrefix,
138
- ca as ensurePrePeginTermsApproval,
139
- Us as estimateRefundFeeSats,
140
- da as estimateSubmitPeginRequestBatchGas,
141
- l as expandAuthAnchor,
142
- P as expandHashlockSecret,
143
- c as expandWotsSeed,
144
- ha as extractErrorData,
148
+ da as ensurePrePeginTermsApproval,
149
+ zs as estimateRefundFeeSats,
150
+ la as estimateSubmitPeginRequestBatchGas,
151
+ u as expandAuthAnchor,
152
+ c as expandHashlockSecret,
153
+ d as expandWotsSeed,
154
+ va as extractErrorData,
145
155
  Re as extractInputsFromTransaction,
146
- C as extractPayoutSignature,
147
- I as extractPeginInputSignature,
148
- v as finalizePeginInputPsbt,
156
+ x as extractPayoutSignature,
157
+ h as extractPeginInputSignature,
158
+ I as finalizePeginInputPsbt,
149
159
  Se as findOverlappingPendingVaults,
150
160
  H as formatSatoshisToBtc,
151
- ga as forwardDepositApproval,
161
+ Ta as forwardDepositApproval,
152
162
  Ha as forwardDeriveContextHash,
153
- Pe as fundPeginTransaction,
154
- Ce as getAddressTxs,
163
+ ce as fundPeginTransaction,
164
+ xe as getAddressTxs,
155
165
  Oe as getAddressUtxos,
156
166
  Va as getContractErrorMessage,
157
167
  Ja as getDustThreshold,
158
168
  be as getMempoolApiUrl,
159
169
  L as getNetwork,
160
- Ie as getNetworkFees,
161
- ve as getOutspend,
162
- Et as getPeginProtocolState,
163
- Ya as getPsbtInputFields,
164
- Za as getScriptType,
165
- K as getSortedXOnlyPubkeys,
166
- he as getTipHeight,
170
+ he as getNetworkFees,
171
+ Ie as getOutspend,
172
+ Ot as getPeginProtocolState,
173
+ za as getPsbtInputFields,
174
+ Ya as getScriptType,
175
+ k as getSortedXOnlyPubkeys,
176
+ ve as getTipHeight,
167
177
  Ve as getTxHex,
168
178
  ye as getTxInfo,
169
179
  De as getUtxoInfo,
170
180
  ya as handleContractError,
171
- k as hexToUint8Array,
172
- At as isActivationDeadlinePassedOnChain,
181
+ K as hexToUint8Array,
182
+ bt as isActivationDeadlinePassedOnChain,
173
183
  X as isAddressFromPublicKey,
174
- cs as isAuthRejectedError,
175
- Hs as isDepositAmountValid,
176
- Rs as isDepositTermsRejectedError,
177
- Ls as isHintAccepted,
184
+ ds as isAuthRejectedError,
185
+ Ys as isDepositAmountValid,
186
+ Is as isDepositTermsRejectedError,
187
+ Zs as isHintAccepted,
178
188
  Da as isKnownContractError,
179
- Ks as isParticipantKeyDriftError,
180
- ks as isPeginRegistrationMissingError,
181
- Xs as isPeginRegistrationNotFinalError,
182
- ws as isPegoutTerminalStatus,
183
- Ws as isRecognizedPegoutStatus,
184
- Gs as isRegisteredVaultVersionMismatchError,
189
+ qs as isParticipantKeyDriftError,
190
+ Qs as isPeginRegistrationMissingError,
191
+ $s as isPeginRegistrationNotFinalError,
192
+ at as isPegoutTerminalStatus,
193
+ et as isRecognizedPegoutStatus,
194
+ st as isRegisteredVaultVersionMismatchError,
185
195
  w as isValidHex,
186
- Ss as isWotsMismatchError,
187
- js as matchKeyHint,
188
- Js as matchKeySetHint,
196
+ vs as isWotsMismatchError,
197
+ tt as matchKeyHint,
198
+ rt as matchKeySetHint,
189
199
  La as parseFundingOutpointsFromTx,
190
- ce as parseUnfundedWasmTransaction,
191
- de as peginOutputCount,
192
- d as peginP2aAnchorOutput,
193
- Ze as primeVpTokenRegistry,
200
+ de as parseUnfundedWasmTransaction,
201
+ le as peginOutputCount,
202
+ l as peginP2aAnchorOutput,
203
+ Ye as primeVpTokenRegistry,
194
204
  W as processPublicKeyToXOnly,
195
- Me as pushTx,
205
+ Fe as pushTx,
196
206
  Ee as rateBasedTxBufferFee,
197
- _s as rebuildDepositTermsCore,
198
- Ys as resolveCurrentParticipantKeys,
199
- Zs as resolveParticipantKeysAtEpochs,
200
- ze as resolveProtocolAddresses,
201
- zs as runDepositorPresignFlow,
202
- za as selectUtxosForPegin,
207
+ Vs as rebuildDepositTermsCore,
208
+ ys as reconstructPeginParams,
209
+ it as resolveCurrentParticipantKeys,
210
+ ot as resolveParticipantKeysAtEpochs,
211
+ Ze as resolveProtocolAddresses,
212
+ nt as runDepositorPresignFlow,
213
+ Za as selectUtxosForPegin,
203
214
  qa as shouldAddChangeOutput,
204
- qs as signDepositorGraph,
215
+ Pt as signDepositorGraph,
205
216
  G as stripHexPrefix,
206
- Qs as submitWotsPublicKey,
217
+ pt as submitWotsPublicKey,
207
218
  E as supportedTxGraphVersions,
208
219
  Ra as supportsDepositApproval,
209
220
  j as toXOnly,
210
221
  J as uint8ArrayToHex,
211
- $s as validateDepositAmount,
212
- at as validateMultiVaultDepositInputs,
213
- Ne as validateOffchainParams,
214
- et as validateOnChainParticipantKeys,
215
- Fe as validatePegInConfiguration,
216
- A as validatePeginP2aAnchor,
217
- st as validateProviderSelection,
218
- tt as validateRemainingCapacity,
222
+ ut as validateDepositAmount,
223
+ ct as validateMultiVaultDepositInputs,
224
+ Me as validateOffchainParams,
225
+ dt as validateOnChainParticipantKeys,
226
+ Ne as validatePegInConfiguration,
227
+ g as validatePeginP2aAnchor,
228
+ lt as validateProviderSelection,
229
+ Et as validateRemainingCapacity,
219
230
  qe as validateRequestDepositorClaimerArtifactsResponse,
220
231
  Sa as validateSecretAgainstHashlock,
221
232
  Be as validateTBVProtocolParams,
222
- _e as validateUtxosAvailable,
223
- rt as validateVaultAmounts,
224
- it as validateVaultProviderPubkey,
225
- Y as validateWalletPubkey,
226
- ot as verifyRegisteredParticipantKeys,
227
- nt as verifyRegisteredVaultVersions,
233
+ me as validateUtxosAvailable,
234
+ gt as validateVaultAmounts,
235
+ At as validateVaultProviderPubkey,
236
+ z as validateWalletPubkey,
237
+ Tt as verifyRegisteredParticipantKeys,
238
+ Rt as verifyRegisteredVaultVersions,
228
239
  Qe as verifyServerIdentity,
229
240
  $e as vpTokenRegistry,
230
- pt as waitForPeginRegistrationDepth,
231
- ut as waitForPeginStatus,
241
+ St as waitForPeginRegistrationDepth,
242
+ mt as waitForPeginStatus,
232
243
  Qa as waitForTransactionReceiptSmartAware
233
244
  };
234
245
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../PeginManager-BgBt4hqp.cjs"),a=require("../../../signPsbtsWithFallback-DbOmw8Ou.cjs");exports.PeginManager=e.PeginManager;exports.estimateSubmitPeginRequestBatchGas=e.estimateSubmitPeginRequestBatchGas;exports.PayoutManager=a.PayoutManager;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../PeginManager-p-ajwSxG.cjs"),a=require("../../../signPsbtsWithFallback-PTgWxsG3.cjs");exports.PeginManager=e.PeginManager;exports.estimateSubmitPeginRequestBatchGas=e.estimateSubmitPeginRequestBatchGas;exports.PayoutManager=a.PayoutManager;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,5 +1,5 @@
1
- import { P as t, e as r } from "../../../PeginManager-C8kIl0gw.js";
2
- import { P as o } from "../../../signPsbtsWithFallback-DC4rUCsy.js";
1
+ import { P as t, e as r } from "../../../PeginManager-BBl4xkWz.js";
2
+ import { P as o } from "../../../signPsbtsWithFallback-Bb66DfY5.js";
3
3
  export {
4
4
  o as PayoutManager,
5
5
  t as PeginManager,
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../../../challengeAssert-BFRE2DM-.cjs"),a=require("../../../constants-DU5CGcqO.cjs"),r=require("@babylonlabs-io/babylon-tbv-rust-wasm"),t=require("../../../verifyScriptPathSchnorrSignature-B8zK1ctE.cjs"),i=require("../../../peginInput-Ci921gTl.cjs"),u=require("../../../noPayout-CbxQqBw1.cjs"),e=require("../../../bitcoin-m84N5a8o.cjs");exports.buildChallengeAssertPsbt=n.buildChallengeAssertPsbt;exports.computeNumLocalChallengers=n.computeNumLocalChallengers;exports.assertValidVaultCoreVersion=a.assertValidVaultCoreVersion;Object.defineProperty(exports,"computeMinClaimValue",{enumerable:!0,get:()=>r.computeMinClaimValue});Object.defineProperty(exports,"computeMinPeginFee",{enumerable:!0,get:()=>r.computeMinPeginFee});Object.defineProperty(exports,"deriveVaultId",{enumerable:!0,get:()=>r.deriveVaultId});Object.defineProperty(exports,"peginP2aAnchorOutput",{enumerable:!0,get:()=>r.peginP2aAnchorOutput});Object.defineProperty(exports,"supportedTxGraphVersions",{enumerable:!0,get:()=>r.supportedTxGraphVersions});Object.defineProperty(exports,"validatePeginP2aAnchor",{enumerable:!0,get:()=>r.validatePeginP2aAnchor});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.createPayoutScript=t.createPayoutScript;exports.extractPayoutSignature=t.extractPayoutSignature;exports.buildPeginInputPsbt=i.buildPeginInputPsbt;exports.extractPeginInputSignature=i.extractPeginInputSignature;exports.finalizePeginInputPsbt=i.finalizePeginInputPsbt;exports.buildNoPayoutPsbt=u.buildNoPayoutPsbt;exports.buildRefundPsbt=u.buildRefundPsbt;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 n=require("../../../challengeAssert-BFRE2DM-.cjs"),a=require("../../../constants-DU5CGcqO.cjs"),r=require("@babylonlabs-io/babylon-tbv-rust-wasm"),t=require("../../../verifyScriptPathSchnorrSignature-DPAd_qke.cjs"),i=require("../../../peginInput-Ci921gTl.cjs"),u=require("../../../noPayout-CnQ1WLtr.cjs"),e=require("../../../bitcoin-m84N5a8o.cjs");exports.buildChallengeAssertPsbt=n.buildChallengeAssertPsbt;exports.computeNumLocalChallengers=n.computeNumLocalChallengers;exports.assertValidVaultCoreVersion=a.assertValidVaultCoreVersion;Object.defineProperty(exports,"computeMinClaimValue",{enumerable:!0,get:()=>r.computeMinClaimValue});Object.defineProperty(exports,"computeMinPeginFee",{enumerable:!0,get:()=>r.computeMinPeginFee});Object.defineProperty(exports,"deriveVaultId",{enumerable:!0,get:()=>r.deriveVaultId});Object.defineProperty(exports,"peginP2aAnchorOutput",{enumerable:!0,get:()=>r.peginP2aAnchorOutput});Object.defineProperty(exports,"supportedTxGraphVersions",{enumerable:!0,get:()=>r.supportedTxGraphVersions});Object.defineProperty(exports,"validatePeginP2aAnchor",{enumerable:!0,get:()=>r.validatePeginP2aAnchor});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.createPayoutScript=t.createPayoutScript;exports.extractPayoutSignature=t.extractPayoutSignature;exports.buildPeginInputPsbt=i.buildPeginInputPsbt;exports.extractPeginInputSignature=i.extractPeginInputSignature;exports.finalizePeginInputPsbt=i.finalizePeginInputPsbt;exports.buildNoPayoutPsbt=u.buildNoPayoutPsbt;exports.buildRefundPsbt=u.buildRefundPsbt;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,9 +1,9 @@
1
1
  import { b as s, c as t } from "../../../challengeAssert-C7PzyJ7g.js";
2
2
  import { a as i } from "../../../constants-GjWXdaqV.js";
3
3
  import { computeMinClaimValue as u, computeMinPeginFee as n, deriveVaultId as P, peginP2aAnchorOutput as d, supportedTxGraphVersions as l, validatePeginP2aAnchor as b } from "@babylonlabs-io/babylon-tbv-rust-wasm";
4
- import { P as c, d as x, f as g, c as f, b as m, a as y, g as h, e as S } from "../../../verifyScriptPathSchnorrSignature-XsICweGG.js";
4
+ import { P as c, d as x, f as g, c as f, b as m, a as y, g as h, e as S } from "../../../verifyScriptPathSchnorrSignature-i-koT139.js";
5
5
  import { b as A, e as T, f as V } from "../../../peginInput-HQPWZfly.js";
6
- import { a as C, b as F } from "../../../noPayout-oaUVsEjk.js";
6
+ import { a as C, b as F } from "../../../noPayout-BaZGRLD2.js";
7
7
  import { c as O, d as k, a as B, b as K, e as M, f as N, g as X, h as z, i as U, j, p as w, s as E, t as G, u as L, v as R } from "../../../bitcoin-d9eaaZB_.js";
8
8
  export {
9
9
  c as PsbtSubstitutionError,
@@ -28,6 +28,20 @@ import { PrePeginParams } from './pegin';
28
28
  * request, or outside the protocol formula.
29
29
  */
30
30
  export declare function assertWasmPeginSizing(result: PrePeginResult, params: PrePeginParams): Promise<bigint>;
31
+ /**
32
+ * A funded Pre-PegIn's HTLC outputs disagree with the expected value or
33
+ * scriptPubKey.
34
+ *
35
+ * Typed so a caller trialling several parameter sets can tell "the transaction
36
+ * definitively does not match these parameters" — a genuine, informative
37
+ * rejection — from "evaluating this parameter set failed", which says nothing
38
+ * about the transaction and must not be counted as a rejection. Without the
39
+ * distinction an incidental failure on the true parameter set silently removes
40
+ * it from consideration and a look-alike wins.
41
+ */
42
+ export declare class HtlcOutputMismatchError extends Error {
43
+ constructor(message: string);
44
+ }
31
45
  /**
32
46
  * Bind the validated metadata to the bytes that actually get funded and
33
47
  * signed.
@@ -47,8 +61,8 @@ export declare function assertWasmPeginSizing(result: PrePeginResult, params: Pr
47
61
  * @param outputs - Outputs parsed from the unfunded Pre-PegIn tx hex.
48
62
  * @param htlcValues - The (already value-validated) per-HTLC values.
49
63
  * @param htlcScriptPubKeys - The per-HTLC scriptPubKeys (hex).
50
- * @throws If the encoded outputs are too few, or any HTLC output's value or
51
- * scriptPubKey disagrees with the validated metadata.
64
+ * @throws {HtlcOutputMismatchError} If the encoded outputs are too few, or any
65
+ * HTLC output's value or scriptPubKey disagrees with the validated metadata.
52
66
  */
53
67
  export declare function assertEncodedHtlcOutputsMatch(outputs: readonly ParsedOutput[], htlcValues: readonly bigint[], htlcScriptPubKeys: readonly string[]): void;
54
68
  //# sourceMappingURL=assertWasmPeginSizing.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"assertWasmPeginSizing.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/primitives/psbt/assertWasmPeginSizing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,uCAAuC,CAAC;AAG/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;AAEjF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,cAAc,GACrB,OAAO,CAAC,MAAM,CAAC,CAsJjB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,SAAS,YAAY,EAAE,EAChC,UAAU,EAAE,SAAS,MAAM,EAAE,EAC7B,iBAAiB,EAAE,SAAS,MAAM,EAAE,GACnC,IAAI,CA2BN"}
1
+ {"version":3,"file":"assertWasmPeginSizing.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/primitives/psbt/assertWasmPeginSizing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,uCAAuC,CAAC;AAG/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;AAEjF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,cAAc,GACrB,OAAO,CAAC,MAAM,CAAC,CAsJjB;AAED;;;;;;;;;;GAUG;AACH,qBAAa,uBAAwB,SAAQ,KAAK;gBACpC,OAAO,EAAE,MAAM;CAI5B;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,SAAS,YAAY,EAAE,EAChC,UAAU,EAAE,SAAS,MAAM,EAAE,EAC7B,iBAAiB,EAAE,SAAS,MAAM,EAAE,GACnC,IAAI,CA2BN"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Tests for the wallet-dependent half of reorg recovery.
3
+ *
4
+ * WASM-backed: the hashlocks are compared against an independent
5
+ * `expandPerVaultSecrets` run over the same root, and the auth-anchor oracle
6
+ * runs against real `expandAuthAnchor` output, so a change to either
7
+ * derivation fails here rather than silently rotating a depositor's secrets.
8
+ */
9
+ export {};
10
+ //# sourceMappingURL=deriveHashlocksFromPrePegin.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deriveHashlocksFromPrePegin.test.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/recovery/__tests__/deriveHashlocksFromPrePegin.test.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Tests for the WASM sizing boundary checks in the recovery search
3
+ * (CLAUDE.md critical path 1).
4
+ *
5
+ * Deliberately its own file: it is the ONLY recovery test that mocks the WASM
6
+ * oracle, and it has to, because a conformant binary cannot produce the values
7
+ * these guards exist to catch. Keeping it separate leaves
8
+ * `reconstructPeginParams.test.ts` running entirely against the real engine.
9
+ *
10
+ * The behaviour under test is not just "it throws" but "it throws OUT of the
11
+ * search": a malformed sizing output indicts the binary, not the candidate, so
12
+ * counting it as one more rejection would bury a broken engine under a
13
+ * not-found result.
14
+ */
15
+ export {};
16
+ //# sourceMappingURL=peginSizingIntegrity.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"peginSizingIntegrity.test.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/recovery/__tests__/peginSizingIntegrity.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Tests for the parameter search that recovers a reorg-stranded Pre-PegIn.
3
+ *
4
+ * Every case runs against a REAL WASM-built funded transaction — genuine HTLC
5
+ * connector scriptPubKeys and genuine sizing — because the search's whole job
6
+ * is to reproduce those bytes from the wrong end. A mocked oracle would prove
7
+ * nothing.
8
+ *
9
+ * The differential these assert is the one file 01 §9 asks for: the recovered
10
+ * parameters must equal the ones the transaction was built with, recovered
11
+ * without ever being told what they were.
12
+ */
13
+ export {};
14
+ //# sourceMappingURL=reconstructPeginParams.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reconstructPeginParams.test.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/recovery/__tests__/reconstructPeginParams.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG"}
@@ -0,0 +1,37 @@
1
+ import { DeriveContextHashCapableWallet } from '../vault-secrets';
2
+ export interface DeriveHashlocksFromPrePeginInput {
3
+ /** Any wallet implementing `deriveContextHash` — the depositor's own. */
4
+ wallet: DeriveContextHashCapableWallet;
5
+ /**
6
+ * Depositor x-only BTC public key (32-byte hex, `0x` optional), read from
7
+ * the CONNECTED WALLET. The reorg destroyed the row that would normally
8
+ * supply it, and taking it from any chain read would defeat the recovery.
9
+ */
10
+ depositorBtcPubkey: string;
11
+ /** Funded (broadcast) Pre-PegIn transaction hex, `0x` optional. */
12
+ fundedPrePeginTxHex: string;
13
+ }
14
+ export interface DeriveHashlocksFromPrePeginResult {
15
+ /** Number of HTLC outputs the transaction funds, from the anchor's vout. */
16
+ vaultCount: number;
17
+ /** 32-byte hex hashlocks (no `0x`), indexed by `htlcVout`. */
18
+ hashlocks: readonly string[];
19
+ /** The transaction's auth-anchor commitment, `SHA256(authAnchor)` as hex. */
20
+ authAnchorHash: string;
21
+ }
22
+ /**
23
+ * Derive the per-vault hashlocks committed by a funded Pre-PegIn.
24
+ *
25
+ * Validates the re-derived root against the transaction's auth-anchor
26
+ * OP_RETURN before expanding anything else. That check costs one HKDF call,
27
+ * needs zero protocol parameters, and is what separates "wrong wallet,
28
+ * account or network" from "right wallet, no candidate matched" — otherwise
29
+ * both surface as a fruitless parameter search.
30
+ *
31
+ * @throws {UnanchoredPrePeginError} If the transaction carries no single,
32
+ * unambiguous auth-anchor OP_RETURN.
33
+ * @throws {VaultRootMismatchError} If the derived root does not commit to the
34
+ * transaction's anchor.
35
+ */
36
+ export declare function deriveHashlocksFromPrePegin(input: DeriveHashlocksFromPrePeginInput): Promise<DeriveHashlocksFromPrePeginResult>;
37
+ //# sourceMappingURL=deriveHashlocksFromPrePegin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deriveHashlocksFromPrePegin.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/recovery/deriveHashlocksFromPrePegin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAWH,OAAO,EAIL,KAAK,8BAA8B,EACpC,MAAM,kBAAkB,CAAC;AAO1B,MAAM,WAAW,gCAAgC;IAC/C,yEAAyE;IACzE,MAAM,EAAE,8BAA8B,CAAC;IACvC;;;;OAIG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAC3B,mEAAmE;IACnE,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,iCAAiC;IAChD,4EAA4E;IAC5E,UAAU,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7B,6EAA6E;IAC7E,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,2BAA2B,CAC/C,KAAK,EAAE,gCAAgC,GACtC,OAAO,CAAC,iCAAiC,CAAC,CAsD5C"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Recovery of a Pre-PegIn stranded by an Ethereum reorg (#2203).
3
+ *
4
+ * When a reorg orphans the `submitPeginRequestBatch` registration and it is
5
+ * never re-included, the on-chain vault row and the indexer's copy both
6
+ * disappear while the depositor's BTC stays locked in the HTLC. Nothing here
7
+ * performs a `vaultId`-keyed read: the depositor pubkey comes from the wallet,
8
+ * the vault count and the auth anchor from the transaction, the hashlocks from
9
+ * the wallet's derivation, and the destroyed protocol parameters from a search
10
+ * over the version-keyed reads that survive.
11
+ *
12
+ * @module recovery
13
+ */
14
+ export * from './deriveHashlocksFromPrePegin';
15
+ export * from './peginParamsCandidates';
16
+ export * from './reconstructPeginParams';
17
+ export * from './recoveryErrors';
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/recovery/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC"}