@babylonlabs-io/ts-sdk 0.19.0 → 0.20.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 (161) hide show
  1. package/README.md +56 -12
  2. package/dist/bitcoin-CNnPFU6Y.cjs +2 -0
  3. package/dist/bitcoin-CNnPFU6Y.cjs.map +1 -0
  4. package/dist/{constants-Q7v2O7Ps.js → bitcoin-nOOgeRyl.js} +64 -76
  5. package/dist/bitcoin-nOOgeRyl.js.map +1 -0
  6. package/dist/buildAndBroadcastRefund-DWEQvj9T.cjs +2 -0
  7. package/dist/buildAndBroadcastRefund-DWEQvj9T.cjs.map +1 -0
  8. package/dist/buildAndBroadcastRefund-DnTQkCgG.js +1331 -0
  9. package/dist/buildAndBroadcastRefund-DnTQkCgG.js.map +1 -0
  10. package/dist/challengeAssert-D1lpvuMv.js +283 -0
  11. package/dist/challengeAssert-D1lpvuMv.js.map +1 -0
  12. package/dist/challengeAssert-nYlgeAI8.cjs +2 -0
  13. package/dist/challengeAssert-nYlgeAI8.cjs.map +1 -0
  14. package/dist/errors-BZON3Wmn.cjs +2 -0
  15. package/dist/errors-BZON3Wmn.cjs.map +1 -0
  16. package/dist/{errors-aMocmFr-.js → errors-CHY4WNi-.js} +98 -97
  17. package/dist/errors-CHY4WNi-.js.map +1 -0
  18. package/dist/fundPeginTransaction-BLYXxLBv.js +70 -0
  19. package/dist/fundPeginTransaction-BLYXxLBv.js.map +1 -0
  20. package/dist/fundPeginTransaction-DxNOeyNI.cjs +2 -0
  21. package/dist/fundPeginTransaction-DxNOeyNI.cjs.map +1 -0
  22. package/dist/index-BpXpESWu.cjs +2 -0
  23. package/dist/index-BpXpESWu.cjs.map +1 -0
  24. package/dist/{index-BvFLf3vm.js → index-CFwoGJNQ.js} +146 -518
  25. package/dist/index-CFwoGJNQ.js.map +1 -0
  26. package/dist/index.cjs +1 -1
  27. package/dist/index.js +133 -109
  28. package/dist/payout-DzGsAnhf.js +261 -0
  29. package/dist/payout-DzGsAnhf.js.map +1 -0
  30. package/dist/payout-RFIh7GLN.cjs +2 -0
  31. package/dist/payout-RFIh7GLN.cjs.map +1 -0
  32. package/dist/psbtInputFields-C-zYR1z7.cjs +2 -0
  33. package/dist/psbtInputFields-C-zYR1z7.cjs.map +1 -0
  34. package/dist/psbtInputFields-Dx41_IoI.js +229 -0
  35. package/dist/psbtInputFields-Dx41_IoI.js.map +1 -0
  36. package/dist/signing-DeWVBl7m.js +64 -0
  37. package/dist/signing-DeWVBl7m.js.map +1 -0
  38. package/dist/signing-cl-lowxV.cjs +2 -0
  39. package/dist/signing-cl-lowxV.cjs.map +1 -0
  40. package/dist/tbv/core/clients/index.cjs +1 -1
  41. package/dist/tbv/core/clients/index.js +2 -2
  42. package/dist/tbv/core/index.cjs +1 -1
  43. package/dist/tbv/core/index.d.ts +3 -1
  44. package/dist/tbv/core/index.d.ts.map +1 -1
  45. package/dist/tbv/core/index.js +130 -106
  46. package/dist/tbv/core/managers/PeginManager.d.ts +1 -1
  47. package/dist/tbv/core/primitives/index.cjs +1 -1
  48. package/dist/tbv/core/primitives/index.d.ts +3 -2
  49. package/dist/tbv/core/primitives/index.d.ts.map +1 -1
  50. package/dist/tbv/core/primitives/index.js +24 -23
  51. package/dist/tbv/core/primitives/psbt/__tests__/helpers.d.ts +1 -1
  52. package/dist/tbv/core/primitives/psbt/index.d.ts +1 -1
  53. package/dist/tbv/core/primitives/psbt/payout.d.ts.map +1 -1
  54. package/dist/tbv/core/primitives/psbt/pegin.d.ts +2 -3
  55. package/dist/tbv/core/primitives/psbt/pegin.d.ts.map +1 -1
  56. package/dist/tbv/core/primitives/utils/bitcoin.d.ts +4 -0
  57. package/dist/tbv/core/primitives/utils/bitcoin.d.ts.map +1 -1
  58. package/dist/tbv/core/primitives/utils/index.d.ts +1 -1
  59. package/dist/tbv/core/primitives/utils/index.d.ts.map +1 -1
  60. package/dist/tbv/core/services/activation/__tests__/activateVault.test.d.ts +2 -0
  61. package/dist/tbv/core/services/activation/__tests__/activateVault.test.d.ts.map +1 -0
  62. package/dist/tbv/core/services/activation/activateVault.d.ts +77 -0
  63. package/dist/tbv/core/services/activation/activateVault.d.ts.map +1 -0
  64. package/dist/tbv/core/services/activation/index.d.ts +7 -0
  65. package/dist/tbv/core/services/activation/index.d.ts.map +1 -0
  66. package/dist/tbv/core/services/deposit/__tests__/peginState.test.d.ts +2 -0
  67. package/dist/tbv/core/services/deposit/__tests__/peginState.test.d.ts.map +1 -0
  68. package/dist/tbv/core/services/deposit/__tests__/validation.test.d.ts +5 -0
  69. package/dist/tbv/core/services/deposit/__tests__/validation.test.d.ts.map +1 -0
  70. package/dist/tbv/core/services/deposit/index.d.ts +4 -0
  71. package/dist/tbv/core/services/deposit/index.d.ts.map +1 -1
  72. package/dist/tbv/core/services/deposit/peginState.d.ts +93 -0
  73. package/dist/tbv/core/services/deposit/peginState.d.ts.map +1 -0
  74. package/dist/tbv/core/services/deposit/validation.d.ts +114 -0
  75. package/dist/tbv/core/services/deposit/validation.d.ts.map +1 -0
  76. package/dist/tbv/core/services/index.cjs +1 -1
  77. package/dist/tbv/core/services/index.d.ts +3 -0
  78. package/dist/tbv/core/services/index.d.ts.map +1 -1
  79. package/dist/tbv/core/services/index.js +25 -7
  80. package/dist/tbv/core/services/index.js.map +1 -1
  81. package/dist/tbv/core/services/pegout/__tests__/state.test.d.ts +2 -0
  82. package/dist/tbv/core/services/pegout/__tests__/state.test.d.ts.map +1 -0
  83. package/dist/tbv/core/services/pegout/index.d.ts +2 -0
  84. package/dist/tbv/core/services/pegout/index.d.ts.map +1 -0
  85. package/dist/tbv/core/services/pegout/state.d.ts +30 -0
  86. package/dist/tbv/core/services/pegout/state.d.ts.map +1 -0
  87. package/dist/tbv/core/services/refund/__tests__/buildAndBroadcastRefund.test.d.ts +2 -0
  88. package/dist/tbv/core/services/refund/__tests__/buildAndBroadcastRefund.test.d.ts.map +1 -0
  89. package/dist/tbv/core/services/refund/buildAndBroadcastRefund.d.ts +103 -0
  90. package/dist/tbv/core/services/refund/buildAndBroadcastRefund.d.ts.map +1 -0
  91. package/dist/tbv/core/services/refund/errors.d.ts +13 -0
  92. package/dist/tbv/core/services/refund/errors.d.ts.map +1 -0
  93. package/dist/tbv/core/services/refund/index.d.ts +8 -0
  94. package/dist/tbv/core/services/refund/index.d.ts.map +1 -0
  95. package/dist/tbv/core/utils/index.cjs +1 -1
  96. package/dist/tbv/core/utils/index.js +30 -24
  97. package/dist/tbv/core/utils/transaction/fundPeginTransaction.d.ts +1 -1
  98. package/dist/tbv/core/utils/utxo/__tests__/availability.test.d.ts +3 -0
  99. package/dist/tbv/core/utils/utxo/__tests__/availability.test.d.ts.map +1 -0
  100. package/dist/tbv/core/utils/utxo/__tests__/reservation.test.d.ts +3 -0
  101. package/dist/tbv/core/utils/utxo/__tests__/reservation.test.d.ts.map +1 -0
  102. package/dist/tbv/core/utils/utxo/availability.d.ts +62 -0
  103. package/dist/tbv/core/utils/utxo/availability.d.ts.map +1 -0
  104. package/dist/tbv/core/utils/utxo/index.d.ts +2 -0
  105. package/dist/tbv/core/utils/utxo/index.d.ts.map +1 -1
  106. package/dist/tbv/core/utils/utxo/reservation.d.ts +65 -0
  107. package/dist/tbv/core/utils/utxo/reservation.d.ts.map +1 -0
  108. package/dist/tbv/index.cjs +1 -1
  109. package/dist/tbv/index.js +130 -106
  110. package/dist/tbv/integrations/aave/index.cjs +1 -1
  111. package/dist/tbv/integrations/aave/index.cjs.map +1 -1
  112. package/dist/tbv/integrations/aave/index.d.ts +3 -3
  113. package/dist/tbv/integrations/aave/index.d.ts.map +1 -1
  114. package/dist/tbv/integrations/aave/index.js +145 -169
  115. package/dist/tbv/integrations/aave/index.js.map +1 -1
  116. package/dist/tbv/integrations/aave/utils/healthFactor.d.ts +0 -30
  117. package/dist/tbv/integrations/aave/utils/healthFactor.d.ts.map +1 -1
  118. package/dist/tbv/integrations/aave/utils/index.d.ts +2 -2
  119. package/dist/tbv/integrations/aave/utils/index.d.ts.map +1 -1
  120. package/dist/types-B-p4dhEH.cjs +2 -0
  121. package/dist/types-B-p4dhEH.cjs.map +1 -0
  122. package/dist/types-DWjaqVfP.js +608 -0
  123. package/dist/types-DWjaqVfP.js.map +1 -0
  124. package/package.json +5 -1
  125. package/dist/challengeAssert-D_k_ADgP.cjs +0 -2
  126. package/dist/challengeAssert-D_k_ADgP.cjs.map +0 -1
  127. package/dist/challengeAssert-k5_LWUtO.js +0 -362
  128. package/dist/challengeAssert-k5_LWUtO.js.map +0 -1
  129. package/dist/constants-EiyZkXce.cjs +0 -2
  130. package/dist/constants-EiyZkXce.cjs.map +0 -1
  131. package/dist/constants-Q7v2O7Ps.js.map +0 -1
  132. package/dist/errors-DVNYib5y.cjs +0 -2
  133. package/dist/errors-DVNYib5y.cjs.map +0 -1
  134. package/dist/errors-aMocmFr-.js.map +0 -1
  135. package/dist/fundPeginTransaction-DpwnDslW.js +0 -50
  136. package/dist/fundPeginTransaction-DpwnDslW.js.map +0 -1
  137. package/dist/fundPeginTransaction-EbrZzlrh.cjs +0 -2
  138. package/dist/fundPeginTransaction-EbrZzlrh.cjs.map +0 -1
  139. package/dist/index-BX-V3C9t.js +0 -995
  140. package/dist/index-BX-V3C9t.js.map +0 -1
  141. package/dist/index-BgnxXV5G.cjs +0 -2
  142. package/dist/index-BgnxXV5G.cjs.map +0 -1
  143. package/dist/index-BvFLf3vm.js.map +0 -1
  144. package/dist/index-DpKhuCta.cjs +0 -2
  145. package/dist/index-DpKhuCta.cjs.map +0 -1
  146. package/dist/payout-Ce9vSs9e.js +0 -164
  147. package/dist/payout-Ce9vSs9e.js.map +0 -1
  148. package/dist/payout-CfsDnjKI.cjs +0 -2
  149. package/dist/payout-CfsDnjKI.cjs.map +0 -1
  150. package/dist/psbtInputFields-C0nKn_GD.cjs +0 -2
  151. package/dist/psbtInputFields-C0nKn_GD.cjs.map +0 -1
  152. package/dist/psbtInputFields-DO0ELwiv.js +0 -116
  153. package/dist/psbtInputFields-DO0ELwiv.js.map +0 -1
  154. package/dist/signing-Deg5lCoC.cjs +0 -2
  155. package/dist/signing-Deg5lCoC.cjs.map +0 -1
  156. package/dist/signing-Drwr3bXB.js +0 -16
  157. package/dist/signing-Drwr3bXB.js.map +0 -1
  158. package/dist/types-D1rYwwCu.js +0 -235
  159. package/dist/types-D1rYwwCu.js.map +0 -1
  160. package/dist/types-DEWiqXYp.cjs +0 -2
  161. package/dist/types-DEWiqXYp.cjs.map +0 -1
@@ -1,112 +1,136 @@
1
- import { j as e, h as t, i as r, d as o, a as i, b as n, g as P, c as l, e as T, f as u } from "../../challengeAssert-k5_LWUtO.js";
2
- import { computeMinClaimValue as p, deriveVaultId as c } from "@babylonlabs-io/babylon-tbv-rust-wasm";
3
- import { b as E, c as g, e as _ } from "../../payout-Ce9vSs9e.js";
4
- import { B as R, D as m, F as b, L as x, M as I, P as f, c as y, S as O, T as h, W as C, d as U, a as F, e as V, g as N, h as B, i as H, b as D, f as L, p as M, r as v, s as W, t as k, u as K, v as w } from "../../constants-Q7v2O7Ps.js";
5
- import { B as G, c as Y, g as J, d as j, b as Z, s as z, a as q } from "../../psbtInputFields-DO0ELwiv.js";
6
- import { f as $, p as aa } from "../../fundPeginTransaction-DpwnDslW.js";
7
- import { c as ea } from "../../signing-Drwr3bXB.js";
8
- import { C as ra, P as oa, b as ia, c as na, a as Pa, d as la, f as Ta, e as ua, g as da, h as pa, i as ca, j as Sa, k as Ea, m as ga } from "../../errors-aMocmFr-.js";
9
- import { P as Aa, c as Ra, p as ma, a as ba, s as xa, v as Ia, w as fa } from "../../index-BX-V3C9t.js";
10
- import { A as Oa, B as ha, M as Ca, P as Ua, V as Fa, i as Va, j as Na, k as Ba, l as Ha, h as Da, g as La, a as Ma, b as va, c as Wa, d as ka, e as Ka, f as wa, p as Xa, r as Ga } from "../../index-BvFLf3vm.js";
11
- import { D as Ja, b as ja, J as Za, a as za, d as qa, P as Qa, R as $a, c as as, V as ss } from "../../types-D1rYwwCu.js";
1
+ import { i as e, g as t, h as o, d as r, a as i, b as l, c as n, e as u, f as P } from "../../challengeAssert-D1lpvuMv.js";
2
+ import { computeMinClaimValue as c, deriveVaultId as p } from "@babylonlabs-io/babylon-tbv-rust-wasm";
3
+ import { a as g, b as S, c as A, e as E } from "../../payout-DzGsAnhf.js";
4
+ import { d as m, a as _, e as b, f as x, g as f, h as I, i as v, b as U, p as C, s as y, t as h, u as O, v as V } from "../../bitcoin-nOOgeRyl.js";
5
+ import { C as B, P as D, a as N, c as M, g as H } from "../../signing-DeWVBl7m.js";
6
+ import { B as k, C as W, P as K, a as w, m as X, h as G, i as Y, l as J, k as j, p as Z, b as z, s as q, v as Q, g as $, d as aa, c as sa, j as ea, e as ta, f as oa, w as ra } from "../../buildAndBroadcastRefund-DnTQkCgG.js";
7
+ import { B as la, D as na, F as ua, L as Pa, M as da, P as ca, a as pa, S as Ta, T as ga, W as Sa, f as Aa, b as Ea, p as Ra, r as ma } from "../../fundPeginTransaction-BLYXxLBv.js";
8
+ import { B as ba, U as xa, a as fa, f as Ia, c as va, e as Ua, g as Ca, i as ya, h as ha, s as Oa, b as Va, d as Fa, v as Ba } from "../../psbtInputFields-Dx41_IoI.js";
9
+ import { C as Na, P as Ma, b as Ha, c as La, a as ka, d as Wa, f as Ka, e as wa, g as Xa, h as Ga, i as Ya, j as Ja, k as ja, m as Za } from "../../errors-CHY4WNi-.js";
10
+ import { A as qa, M as Qa, P as $a, V as as, i as ss, j as es, k as ts, l as os, h as rs, g as is, a as ls, b as ns, c as us, d as Ps, e as ds, f as cs, p as ps, r as Ts } from "../../index-CFwoGJNQ.js";
11
+ import { B as Ss, D as As, b as Es, J as Rs, a as ms, d as _s, P as bs, R as xs, c as fs, V as Is } from "../../types-DWjaqVfP.js";
12
12
  export {
13
- Oa as ApplicationRegistryABI,
14
- ha as BTCVaultRegistryABI,
15
- R as BTC_DUST_SAT,
16
- G as BitcoinScriptType,
17
- ra as CONTRACT_ERRORS,
18
- m as DUST_THRESHOLD,
19
- Ja as DaemonStatus,
20
- b as FEE_SAFETY_MARGIN,
21
- ja as JSON_RPC_ERROR_CODES,
22
- Za as JsonRpcClient,
23
- za as JsonRpcError,
24
- x as LOW_RATE_ESTIMATION_ACCURACY_BUFFER,
25
- I as MAX_NON_LEGACY_OUTPUT_SIZE,
26
- Ca as MEMPOOL_API_URLS,
27
- f as P2TR_INPUT_SIZE,
28
- y as PEGIN_FIXED_OUTPUTS,
29
- qa as POST_WOTS_STATUSES,
30
- Qa as PRE_DEPOSITOR_SIGNATURES_STATES,
31
- Aa as PayoutManager,
32
- oa as PeginManager,
33
- Ua as ProtocolParamsABI,
34
- $a as RpcErrorCode,
35
- O as SPLIT_TX_FEE_SAFETY_MULTIPLIER,
36
- h as TX_BUFFER_SIZE_OVERHEAD,
37
- as as VP_TERMINAL_STATUSES,
38
- ss as VP_TRANSIENT_STATUSES,
39
- Fa as VaultProviderRpcClient,
40
- Va as ViemProtocolParamsReader,
41
- Na as ViemUniversalChallengerReader,
42
- Ba as ViemVaultKeeperReader,
43
- Ha as ViemVaultRegistryReader,
44
- Da as VpResponseValidationError,
45
- C as WALLET_RELAY_FEE_RATE_THRESHOLD,
13
+ qa as ApplicationRegistryABI,
14
+ k as BIP68NotMatureError,
15
+ Ss as BTCVaultRegistryABI,
16
+ la as BTC_DUST_SAT,
17
+ ba as BitcoinScriptType,
18
+ Na as CONTRACT_ERRORS,
19
+ W as ClaimerPegoutStatusValue,
20
+ B as ContractStatus,
21
+ na as DUST_THRESHOLD,
22
+ As as DaemonStatus,
23
+ ua as FEE_SAFETY_MARGIN,
24
+ Es as JSON_RPC_ERROR_CODES,
25
+ Rs as JsonRpcClient,
26
+ ms as JsonRpcError,
27
+ Pa as LOW_RATE_ESTIMATION_ACCURACY_BUFFER,
28
+ da as MAX_NON_LEGACY_OUTPUT_SIZE,
29
+ Qa as MEMPOOL_API_URLS,
30
+ ca as P2TR_INPUT_SIZE,
31
+ pa as PEGIN_FIXED_OUTPUTS,
32
+ _s as POST_WOTS_STATUSES,
33
+ bs as PRE_DEPOSITOR_SIGNATURES_STATES,
34
+ K as PayoutManager,
35
+ D as PeginAction,
36
+ Ma as PeginManager,
37
+ $a as ProtocolParamsABI,
38
+ xs as RpcErrorCode,
39
+ Ta as SPLIT_TX_FEE_SAFETY_MULTIPLIER,
40
+ ga as TX_BUFFER_SIZE_OVERHEAD,
41
+ xa as UtxoNotAvailableError,
42
+ fs as VP_TERMINAL_STATUSES,
43
+ Is as VP_TRANSIENT_STATUSES,
44
+ as as VaultProviderRpcClient,
45
+ ss as ViemProtocolParamsReader,
46
+ es as ViemUniversalChallengerReader,
47
+ ts as ViemVaultKeeperReader,
48
+ os as ViemVaultRegistryReader,
49
+ rs as VpResponseValidationError,
50
+ Sa as WALLET_RELAY_FEE_RATE_THRESHOLD,
51
+ w as activateVault,
52
+ fa as assertUtxosAvailable,
53
+ X as buildAndBroadcastRefund,
46
54
  e as buildChallengeAssertPsbt,
47
55
  t as buildDepositorPayoutPsbt,
48
- r as buildNoPayoutPsbt,
49
- E as buildPayoutPsbt,
50
- o as buildPeginInputPsbt,
56
+ o as buildNoPayoutPsbt,
57
+ g as buildPayoutPsbt,
58
+ r as buildPeginInputPsbt,
51
59
  i as buildPeginTxFromFundedPrePegin,
52
- n as buildPrePeginPsbt,
53
- P as buildRefundPsbt,
54
- Y as calculateBtcTxHash,
55
- Ra as computeHashlock,
56
- p as computeMinClaimValue,
57
- l as computeNumLocalChallengers,
58
- ia as computeWotsBlockPublicKeysHash,
59
- na as computeWotsPkHash,
60
- g as createPayoutScript,
61
- ea as createTaprootScriptPathSignOptions,
62
- U as deriveNativeSegwitAddress,
63
- F as deriveTaprootAddress,
64
- c as deriveVaultId,
65
- Pa as deriveWotsBlockPublicKeys,
66
- la as deriveWotsKeypair,
67
- Ta as deriveWotsPkHash,
68
- V as ensureHexPrefix,
69
- ua as extractErrorData,
70
- _ as extractPayoutSignature,
71
- T as extractPeginInputSignature,
72
- u as finalizePeginInputPsbt,
73
- $ as fundPeginTransaction,
74
- La as getAddressTxs,
75
- Ma as getAddressUtxos,
76
- da as getContractErrorMessage,
77
- J as getDustThreshold,
78
- va as getMempoolApiUrl,
79
- N as getNetwork,
80
- Wa as getNetworkFees,
81
- j as getPsbtInputFields,
82
- Z as getScriptType,
83
- ka as getTxHex,
84
- Ka as getTxInfo,
85
- wa as getUtxoInfo,
86
- pa as handleContractError,
87
- B as hexToUint8Array,
88
- H as isAddressFromPublicKey,
89
- ca as isKnownContractError,
90
- D as isValidHex,
91
- Sa as isWotsMismatchError,
92
- Ea as keypairToPublicKey,
93
- ga as mnemonicToWotsSeed,
94
- aa as parseUnfundedWasmTransaction,
95
- L as peginOutputCount,
96
- ma as pollAndSignPayouts,
97
- M as processPublicKeyToXOnly,
98
- Xa as pushTx,
99
- v as rateBasedTxBufferFee,
100
- Ga as resolveProtocolAddresses,
101
- z as selectUtxosForPegin,
102
- q as shouldAddChangeOutput,
103
- ba as signDepositorGraph,
104
- W as stripHexPrefix,
105
- xa as submitWotsPublicKey,
106
- k as toXOnly,
107
- K as uint8ArrayToHex,
108
- Ia as validateSecretAgainstHashlock,
109
- w as validateWalletPubkey,
110
- fa as waitForPeginStatus
60
+ l as buildPrePeginPsbt,
61
+ S as buildRefundPsbt,
62
+ Ia as calculateBtcTxHash,
63
+ N as canPerformAction,
64
+ va as collectReservedUtxoRefs,
65
+ G as computeHashlock,
66
+ c as computeMinClaimValue,
67
+ n as computeNumLocalChallengers,
68
+ Ha as computeWotsBlockPublicKeysHash,
69
+ La as computeWotsPkHash,
70
+ A as createPayoutScript,
71
+ M as createTaprootScriptPathSignOptions,
72
+ m as deriveNativeSegwitAddress,
73
+ _ as deriveTaprootAddress,
74
+ p as deriveVaultId,
75
+ ka as deriveWotsBlockPublicKeys,
76
+ Wa as deriveWotsKeypair,
77
+ Ka as deriveWotsPkHash,
78
+ b as ensureHexPrefix,
79
+ wa as extractErrorData,
80
+ Ua as extractInputsFromTransaction,
81
+ E as extractPayoutSignature,
82
+ u as extractPeginInputSignature,
83
+ P as finalizePeginInputPsbt,
84
+ x as formatSatoshisToBtc,
85
+ Aa as fundPeginTransaction,
86
+ is as getAddressTxs,
87
+ ls as getAddressUtxos,
88
+ Xa as getContractErrorMessage,
89
+ Ca as getDustThreshold,
90
+ ns as getMempoolApiUrl,
91
+ f as getNetwork,
92
+ us as getNetworkFees,
93
+ H as getPeginProtocolState,
94
+ ya as getPsbtInputFields,
95
+ ha as getScriptType,
96
+ Ps as getTxHex,
97
+ ds as getTxInfo,
98
+ cs as getUtxoInfo,
99
+ Ga as handleContractError,
100
+ I as hexToUint8Array,
101
+ v as isAddressFromPublicKey,
102
+ Y as isDepositAmountValid,
103
+ Ya as isKnownContractError,
104
+ J as isPegoutTerminalStatus,
105
+ j as isRecognizedPegoutStatus,
106
+ U as isValidHex,
107
+ Ja as isWotsMismatchError,
108
+ ja as keypairToPublicKey,
109
+ Za as mnemonicToWotsSeed,
110
+ Ea as parseUnfundedWasmTransaction,
111
+ Ra as peginOutputCount,
112
+ Z as pollAndSignPayouts,
113
+ C as processPublicKeyToXOnly,
114
+ ps as pushTx,
115
+ ma as rateBasedTxBufferFee,
116
+ Ts as resolveProtocolAddresses,
117
+ Oa as selectUtxosForDeposit,
118
+ Va as selectUtxosForPegin,
119
+ Fa as shouldAddChangeOutput,
120
+ z as signDepositorGraph,
121
+ y as stripHexPrefix,
122
+ q as submitWotsPublicKey,
123
+ h as toXOnly,
124
+ O as uint8ArrayToHex,
125
+ Q as validateDepositAmount,
126
+ $ as validateMultiVaultDepositInputs,
127
+ aa as validateProviderSelection,
128
+ sa as validateRemainingCapacity,
129
+ ea as validateSecretAgainstHashlock,
130
+ Ba as validateUtxosAvailable,
131
+ ta as validateVaultAmounts,
132
+ oa as validateVaultProviderPubkey,
133
+ V as validateWalletPubkey,
134
+ ra as waitForPeginStatus
111
135
  };
112
136
  //# sourceMappingURL=index.js.map
@@ -311,7 +311,7 @@ export declare class PeginManager {
311
311
  * 2. Build unfunded Pre-PegIn transaction (HTLC output) using primitives
312
312
  * 3. Select UTXOs to cover the HTLC value
313
313
  * 4. Fund the Pre-PegIn transaction
314
- * 5. Derive the PegIn transaction from the funded Pre-PegIn txid
314
+ * 5. Derive the PegIn transaction from the funded Pre-PegIn tx
315
315
  * 6. Build PSBT for signing the PegIn input (HTLC leaf 0)
316
316
  * 7. Sign via BTC wallet and extract depositor signature
317
317
  *
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../challengeAssert-D_k_ADgP.cjs"),r=require("@babylonlabs-io/babylon-tbv-rust-wasm"),i=require("../../../payout-CfsDnjKI.cjs"),e=require("../../../constants-EiyZkXce.cjs");exports.buildChallengeAssertPsbt=t.buildChallengeAssertPsbt;exports.buildDepositorPayoutPsbt=t.buildDepositorPayoutPsbt;exports.buildNoPayoutPsbt=t.buildNoPayoutPsbt;exports.buildPeginInputPsbt=t.buildPeginInputPsbt;exports.buildPeginTxFromFundedPrePegin=t.buildPeginTxFromFundedPrePegin;exports.buildPrePeginPsbt=t.buildPrePeginPsbt;exports.buildRefundPsbt=t.buildRefundPsbt;exports.computeNumLocalChallengers=t.computeNumLocalChallengers;exports.extractPeginInputSignature=t.extractPeginInputSignature;exports.finalizePeginInputPsbt=t.finalizePeginInputPsbt;Object.defineProperty(exports,"computeMinClaimValue",{enumerable:!0,get:()=>r.computeMinClaimValue});Object.defineProperty(exports,"deriveVaultId",{enumerable:!0,get:()=>r.deriveVaultId});exports.buildPayoutPsbt=i.buildPayoutPsbt;exports.createPayoutScript=i.createPayoutScript;exports.extractPayoutSignature=i.extractPayoutSignature;exports.deriveNativeSegwitAddress=e.deriveNativeSegwitAddress;exports.deriveTaprootAddress=e.deriveTaprootAddress;exports.ensureHexPrefix=e.ensureHexPrefix;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("../../../challengeAssert-nYlgeAI8.cjs"),r=require("@babylonlabs-io/babylon-tbv-rust-wasm"),i=require("../../../payout-RFIh7GLN.cjs"),e=require("../../../bitcoin-CNnPFU6Y.cjs");exports.buildChallengeAssertPsbt=t.buildChallengeAssertPsbt;exports.buildDepositorPayoutPsbt=t.buildDepositorPayoutPsbt;exports.buildNoPayoutPsbt=t.buildNoPayoutPsbt;exports.buildPeginInputPsbt=t.buildPeginInputPsbt;exports.buildPeginTxFromFundedPrePegin=t.buildPeginTxFromFundedPrePegin;exports.buildPrePeginPsbt=t.buildPrePeginPsbt;exports.computeNumLocalChallengers=t.computeNumLocalChallengers;exports.extractPeginInputSignature=t.extractPeginInputSignature;exports.finalizePeginInputPsbt=t.finalizePeginInputPsbt;Object.defineProperty(exports,"computeMinClaimValue",{enumerable:!0,get:()=>r.computeMinClaimValue});Object.defineProperty(exports,"deriveVaultId",{enumerable:!0,get:()=>r.deriveVaultId});exports.buildPayoutPsbt=i.buildPayoutPsbt;exports.buildRefundPsbt=i.buildRefundPsbt;exports.createPayoutScript=i.createPayoutScript;exports.extractPayoutSignature=i.extractPayoutSignature;exports.deriveNativeSegwitAddress=e.deriveNativeSegwitAddress;exports.deriveTaprootAddress=e.deriveTaprootAddress;exports.ensureHexPrefix=e.ensureHexPrefix;exports.formatSatoshisToBtc=e.formatSatoshisToBtc;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
@@ -39,7 +39,8 @@
39
39
  * ## Key Exports
40
40
  *
41
41
  * ### PSBT Builders
42
- * - {@link buildPeginPsbt} - Create unfunded peg-in transaction
42
+ * - {@link buildPrePeginPsbt} - Create unfunded Pre-PegIn transaction (HTLC outputs)
43
+ * - {@link buildPeginTxFromFundedPrePegin} - Derive PegIn tx from funded Pre-PegIn
43
44
  * - {@link buildPayoutPsbt} - Create payout PSBT for signing
44
45
  * - {@link extractPayoutSignature} - Extract Schnorr signature from signed PSBT
45
46
  * - {@link buildDepositorPayoutPsbt} - Create depositor's own Payout PSBT (depositor-as-claimer path)
@@ -99,5 +100,5 @@ export { buildChallengeAssertPsbt } from './psbt/challengeAssert';
99
100
  export type { ChallengeAssertParams } from './psbt/challengeAssert';
100
101
  export { createPayoutScript } from './scripts/payout';
101
102
  export type { PayoutScriptParams, PayoutScriptResult } from './scripts/payout';
102
- export { deriveNativeSegwitAddress, deriveTaprootAddress, hexToUint8Array, isAddressFromPublicKey, isValidHex, ensureHexPrefix, processPublicKeyToXOnly, stripHexPrefix, toXOnly, uint8ArrayToHex, validateWalletPubkey, type WalletPubkeyValidationResult, } from './utils/bitcoin';
103
+ export { deriveNativeSegwitAddress, deriveTaprootAddress, hexToUint8Array, isAddressFromPublicKey, isValidHex, ensureHexPrefix, formatSatoshisToBtc, processPublicKeyToXOnly, stripHexPrefix, toXOnly, uint8ArrayToHex, validateWalletPubkey, type WalletPubkeyValidationResult, } from './utils/bitcoin';
103
104
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/primitives/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwEG;AAGH,OAAO,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAG3D,YAAY,EA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AAM,eAAe,CAAC;AAEpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAClE,YAAY,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAEpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAClE,YAAY,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAGpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAG/E,OAAO,EACL,yBAAyB,EACzB,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACtB,UAAU,EACV,eAAe,EACf,mBAAmB,EACnB,uBAAuB,EACvB,cAAc,EACd,OAAO,EACP,eAAe,EACf,oBAAoB,EACpB,KAAK,4BAA4B,GAClC,MAAM,iBAAiB,CAAC"}
@@ -1,33 +1,34 @@
1
- import { j as s, h as t, i, d as r, a as u, b as o, g as P, c as d, e as l, f as b } from "../../../challengeAssert-k5_LWUtO.js";
2
- import { computeMinClaimValue as p, deriveVaultId as x } from "@babylonlabs-io/babylon-tbv-rust-wasm";
3
- import { b as g, c as y, e as m } from "../../../payout-Ce9vSs9e.js";
4
- import { d as v, a as A, e as h, h as T, i as H, b as I, p as S, s as C, t as F, u as N, v as V } from "../../../constants-Q7v2O7Ps.js";
1
+ import { i as s, g as t, h as i, d as r, a as o, b as u, c as P, e as d, f as l } from "../../../challengeAssert-D1lpvuMv.js";
2
+ import { computeMinClaimValue as n, deriveVaultId as p } from "@babylonlabs-io/babylon-tbv-rust-wasm";
3
+ import { a as c, b as g, c as y, e as f } from "../../../payout-DzGsAnhf.js";
4
+ import { d as h, a as v, e as A, f as T, h as S, i as H, b as I, p as C, s as F, t as N, u as V, v as K } from "../../../bitcoin-nOOgeRyl.js";
5
5
  export {
6
6
  s as buildChallengeAssertPsbt,
7
7
  t as buildDepositorPayoutPsbt,
8
8
  i as buildNoPayoutPsbt,
9
- g as buildPayoutPsbt,
9
+ c as buildPayoutPsbt,
10
10
  r as buildPeginInputPsbt,
11
- u as buildPeginTxFromFundedPrePegin,
12
- o as buildPrePeginPsbt,
13
- P as buildRefundPsbt,
14
- p as computeMinClaimValue,
15
- d as computeNumLocalChallengers,
11
+ o as buildPeginTxFromFundedPrePegin,
12
+ u as buildPrePeginPsbt,
13
+ g as buildRefundPsbt,
14
+ n as computeMinClaimValue,
15
+ P as computeNumLocalChallengers,
16
16
  y as createPayoutScript,
17
- v as deriveNativeSegwitAddress,
18
- A as deriveTaprootAddress,
19
- x as deriveVaultId,
20
- h as ensureHexPrefix,
21
- m as extractPayoutSignature,
22
- l as extractPeginInputSignature,
23
- b as finalizePeginInputPsbt,
24
- T as hexToUint8Array,
17
+ h as deriveNativeSegwitAddress,
18
+ v as deriveTaprootAddress,
19
+ p as deriveVaultId,
20
+ A as ensureHexPrefix,
21
+ f as extractPayoutSignature,
22
+ d as extractPeginInputSignature,
23
+ l as finalizePeginInputPsbt,
24
+ T as formatSatoshisToBtc,
25
+ S as hexToUint8Array,
25
26
  H as isAddressFromPublicKey,
26
27
  I as isValidHex,
27
- S as processPublicKeyToXOnly,
28
- C as stripHexPrefix,
29
- F as toXOnly,
30
- N as uint8ArrayToHex,
31
- V as validateWalletPubkey
28
+ C as processPublicKeyToXOnly,
29
+ F as stripHexPrefix,
30
+ N as toXOnly,
31
+ V as uint8ArrayToHex,
32
+ K as validateWalletPubkey
32
33
  };
33
34
  //# sourceMappingURL=index.js.map
@@ -55,7 +55,7 @@ export declare const TEST_AMOUNTS: {
55
55
  *
56
56
  * @example
57
57
  * ```typescript
58
- * describe("buildPeginPsbt", () => {
58
+ * describe("buildPrePeginPsbt", () => {
59
59
  * beforeAll(async () => {
60
60
  * await initializeWasmForTests();
61
61
  * });
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * Exports:
8
8
  * - {@link buildPrePeginPsbt} - Create unfunded Pre-PegIn transaction (HTLC output)
9
- * - {@link buildPeginTxFromFundedPrePegin} - Derive PegIn tx from funded Pre-PegIn txid
9
+ * - {@link buildPeginTxFromFundedPrePegin} - Derive PegIn tx from funded Pre-PegIn tx
10
10
  * - {@link buildPeginInputPsbt} - Create PSBT for depositor to sign PegIn HTLC leaf 0 input
11
11
  * - {@link extractPeginInputSignature} - Extract depositor signature from signed PegIn input PSBT
12
12
  * - {@link buildPayoutPsbt} - Create payout PSBT for signing
@@ -1 +1 @@
1
- {"version":3,"file":"payout.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/primitives/psbt/payout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EACL,KAAK,OAAO,EAEb,MAAM,uCAAuC,CAAC;AAW/C;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,sBAAsB,EAAE,MAAM,CAAC;IAE/B;;OAEG;IACH,qBAAqB,EAAE,MAAM,EAAE,CAAC;IAEhC;;OAEG;IACH,6BAA6B,EAAE,MAAM,EAAE,CAAC;IAExC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,gBAAgB,CAAC,CAqI3B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,sBAAsB,CACpC,aAAa,EAAE,MAAM,EACrB,eAAe,EAAE,MAAM,EACvB,UAAU,SAAI,GACb,MAAM,CAsCR"}
1
+ {"version":3,"file":"payout.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/primitives/psbt/payout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EACL,KAAK,OAAO,EAEb,MAAM,uCAAuC,CAAC;AAsB/C;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,sBAAsB,EAAE,MAAM,CAAC;IAE/B;;OAEG;IACH,qBAAqB,EAAE,MAAM,EAAE,CAAC;IAEhC;;OAEG;IACH,6BAA6B,EAAE,MAAM,EAAE,CAAC;IAExC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,gBAAgB,CAAC,CAqI3B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,sBAAsB,CACpC,aAAa,EAAE,MAAM,EACrB,eAAe,EAAE,MAAM,EACvB,UAAU,SAAI,GACb,MAAM,CA+CR"}
@@ -38,8 +38,7 @@ export interface PrePeginPsbtResult {
38
38
  * The caller is responsible for:
39
39
  * - Selecting UTXOs covering totalOutputValue + network fees
40
40
  * - Funding the transaction (add inputs and change output)
41
- * - Computing the funded transaction's txid
42
- * - Calling buildPeginTxFromFundedPrePegin() with the funded txid
41
+ * - Calling buildPeginTxFromFundedPrePegin() with the funded tx hex
43
42
  */
44
43
  psbtHex: string;
45
44
  /** Sum of all unfunded outputs (HTLC + CPFP anchor) — use this for UTXO selection */
@@ -56,7 +55,7 @@ export interface PrePeginPsbtResult {
56
55
  depositorClaimValue: bigint;
57
56
  }
58
57
  /**
59
- * Parameters for building the PegIn transaction from a funded Pre-PegIn txid
58
+ * Parameters for building the PegIn transaction from a funded Pre-PegIn tx
60
59
  */
61
60
  export interface BuildPeginTxParams {
62
61
  /** Same PrePeginParams used to create the Pre-PegIn transaction */
@@ -1 +1 @@
1
- {"version":3,"file":"pegin.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/primitives/psbt/pegin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAGL,KAAK,OAAO,EACb,MAAM,uCAAuC,CAAC;AAI/C;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,yEAAyE;IACzE,eAAe,EAAE,MAAM,CAAC;IACxB,4DAA4D;IAC5D,mBAAmB,EAAE,MAAM,CAAC;IAC5B,kEAAkE;IAClE,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,0EAA0E;IAC1E,0BAA0B,EAAE,MAAM,EAAE,CAAC;IACrC,+DAA+D;IAC/D,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7B,sDAAsD;IACtD,cAAc,EAAE,MAAM,CAAC;IACvB,oDAAoD;IACpD,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,uDAAuD;IACvD,OAAO,EAAE,MAAM,CAAC;IAChB,yDAAyD;IACzD,mBAAmB,EAAE,MAAM,CAAC;IAC5B,0DAA0D;IAC1D,aAAa,EAAE,MAAM,CAAC;IACtB,0DAA0D;IAC1D,WAAW,EAAE,MAAM,CAAC;IACpB,sBAAsB;IACtB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;;;;;OAQG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB,qFAAqF;IACrF,gBAAgB,EAAE,MAAM,CAAC;IACzB,sHAAsH;IACtH,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B,+DAA+D;IAC/D,iBAAiB,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,8CAA8C;IAC9C,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,iDAAiD;IACjD,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,sEAAsE;IACtE,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,mEAAmE;IACnE,cAAc,EAAE,cAAc,CAAC;IAC/B,wDAAwD;IACxD,aAAa,EAAE,MAAM,CAAC;IACtB,+CAA+C;IAC/C,mBAAmB,EAAE,MAAM,CAAC;IAC5B,wCAAwC;IACxC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,oEAAoE;IACpE,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,8CAA8C;IAC9C,iBAAiB,EAAE,MAAM,CAAC;IAC1B,qCAAqC;IACrC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,cAAc,GACrB,OAAO,CAAC,kBAAkB,CAAC,CAiC7B;AAED;;;;;;;;;GASG;AACH,wBAAsB,8BAA8B,CAClD,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC,aAAa,CAAC,CA2BxB"}
1
+ {"version":3,"file":"pegin.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/primitives/psbt/pegin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAGL,KAA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C/C,mBAAmB,EAAE,MAAM,CAAC;IAC5B,wCAAwC;IACxC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,oEAAoE;IACpE,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,8CAA8C;IAC9C,iBAAiB,EAAE,MAAM,CAAC;IAC1B,qCAAqC;IACrC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,cAAc,GACrB,OAAO,CAAC,kBAAkB,CAAC,CAiC7B;AAED;;;;;;;;;GASG;AACH,wBAAsB,8BAA8B,CAClD,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC,aAAa,CAAC,CA2BxB"}
@@ -106,6 +106,10 @@ export interface WalletPubkeyValidationResult {
106
106
  * @throws If wallet pubkey doesn't match expected depositor pubkey
107
107
  */
108
108
  export declare function validateWalletPubkey(walletPubkeyRaw: string, expectedDepositorPubkey?: string): WalletPubkeyValidationResult;
109
+ /**
110
+ * Format satoshis as a human-readable BTC string with trailing zeros removed.
111
+ */
112
+ export declare function formatSatoshisToBtc(satoshis: bigint): string;
109
113
  /**
110
114
  * Map SDK network type to bitcoinjs-lib Network object.
111
115
  *
@@ -1 +1 @@
1
- {"version":3,"file":"bitcoin.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/primitives/utils/bitcoin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,EAAE,QAAQ,EAAY,MAAM,eAAe,CAAC;AAEnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AACrE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAEhC;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,MAAO,CAAC;AAE3C;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,GA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uBAAuB,CAAC,EAAE,MAAM,GAC/B,4BAA4B,CAa9B;AAQD;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAS5D;AA8BD;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,QAAQ,CAAC,OAAO,CAY7D;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,OAAO,GACf,MAAM,CAWR;AAED;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CACvC,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,OAAO,GACf,MAAM,CAiBR;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,OAAO,GACf,OAAO,CAgCT"}
@@ -5,5 +5,5 @@
5
5
  *
6
6
  * @module primitives/utils
7
7
  */
8
- export { ensureHexPrefix, hexToUint8Array, isValidHex, processPublicKeyToXOnly, stripHexPrefix, toXOnly, uint8ArrayToHex, validateWalletPubkey, type WalletPubkeyValidationResult, } from './bitcoin';
8
+ export { ensureHexPrefix, formatSatoshisToBtc, hexToUint8Array, isValidHex, processPublicKeyToXOnly, stripHexPrefix, toXOnly, uint8ArrayToHex, validateWalletPubkey, type WalletPubkeyValidationResult, } from './bitcoin';
9
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/primitives/utils/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,eAAe,EACf,eAAe,EACf,UAAU,EACV,uBAAuB,EACvB,cAAc,EACd,OAAO,EACP,eAAe,EACf,oBAAoB,EACpB,KAAK,4BAA4B,GAClC,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/primitives/utils/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,eAAe,EACf,UAAU,EACV,uBAAuB,EACvB,cAAc,EACd,OAAO,EACP,eAAe,EACf,oBAAoB,EACpB,KAAK,4BAA4B,GAClC,MAAM,WAAW,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=activateVault.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activateVault.test.d.ts","sourceRoot":"","sources":["../../../../../../src/tbv/core/services/activation/__tests__/activateVault.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,77 @@
1
+ import { Abi, Address, Hash, Hex } from 'viem';
2
+ /**
3
+ * A single ETH contract-write call. The SDK assembles these; the caller
4
+ * executes them via viem, wagmi, a wallet provider, or any other transport.
5
+ */
6
+ export interface EthContractWriteCall {
7
+ address: Address;
8
+ abi: Abi;
9
+ functionName: string;
10
+ args: readonly unknown[];
11
+ }
12
+ /**
13
+ * Minimum shape the SDK requires from any contract-write result. Callers may
14
+ * return richer objects (e.g. including the receipt) — the SDK propagates
15
+ * them unchanged via the generic parameter on {@link EthContractWriter}.
16
+ */
17
+ export interface EthContractWriteResult {
18
+ transactionHash: Hash;
19
+ }
20
+ /**
21
+ * Caller-provided contract writer. The generic `R` lets callers return any
22
+ * transport-specific result shape (e.g. `{ transactionHash, receipt }`);
23
+ * the SDK forwards that shape back through `activateVault`.
24
+ */
25
+ export type EthContractWriter<R extends EthContractWriteResult = EthContractWriteResult> = (call: EthContractWriteCall) => Promise<R>;
26
+ export interface ActivateVaultInput<R extends EthContractWriteResult = EthContractWriteResult> {
27
+ /** BTCVaultRegistry contract address (env-specific). */
28
+ btcVaultRegistryAddress: Address;
29
+ /** Vault ID (bytes32, 0x-prefixed). */
30
+ vaultId: Hex;
31
+ /**
32
+ * HTLC secret preimage (bytes32). A missing `0x` prefix or an uppercase
33
+ * `0X` prefix is normalised before validation.
34
+ */
35
+ secret: string;
36
+ /**
37
+ * Optional hashlock for client-side pre-validation. When provided, the SDK
38
+ * rejects before calling `writeContract` if `sha256(secret) != hashlock`.
39
+ */
40
+ hashlock?: Hex;
41
+ /**
42
+ * Activation metadata passed through to the contract. Required to keep
43
+ * the "empty metadata" convention explicit at the call site — pass `"0x"`
44
+ * (empty bytes) when no metadata is needed. Must be a 0x-prefixed hex
45
+ * string with an even number of hex chars.
46
+ */
47
+ activationMetadata: Hex;
48
+ /** Caller-provided write callback — see {@link EthContractWriter}. */
49
+ writeContract: EthContractWriter<R>;
50
+ /**
51
+ * Optional abort signal. Checked before validation runs; since validation
52
+ * is fully synchronous, cancellation between validation and the write is
53
+ * not observable and callers should rely on the transport's own
54
+ * cancellation support for that window.
55
+ */
56
+ signal?: AbortSignal;
57
+ }
58
+ /**
59
+ * Reveal the HTLC secret on Ethereum and activate the vault.
60
+ *
61
+ * Validates inputs, optionally pre-checks the secret against the expected
62
+ * hashlock, and delegates the contract write to `writeContract`. Returns
63
+ * whatever the writer returns so callers can keep richer transport-specific
64
+ * metadata (e.g. viem receipts) end-to-end.
65
+ *
66
+ * @throws `Error` if `btcVaultRegistryAddress` is not a valid 20-byte address
67
+ * @throws `Error` if `vaultId` or `secret` is not a valid 32-byte hex
68
+ * @throws `Error` if `hashlock` is provided and is not a valid 32-byte hex,
69
+ * or if `sha256(secret) != hashlock`
70
+ * @throws `Error` if `activationMetadata` is not a 0x-prefixed hex byte
71
+ * string (must have an even number of hex chars). Pass `"0x"` for
72
+ * empty metadata.
73
+ * @throws whatever the injected `writeContract` throws
74
+ * @throws `AbortError` / caller-provided abort reason if `signal` aborts
75
+ */
76
+ export declare function activateVault<R extends EthContractWriteResult = EthContractWriteResult>(input: ActivateVaultInput<R>): Promise<R>;
77
+ //# sourceMappingURL=activateVault.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activateVault.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/activation/activateVault.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AA2CpD;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,EAAE,GAAG,CAAC;IACT,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,SAAS,OAAO,EAAE,CAAC;CAC1B;AAED;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,eAAe,EAAE,IAAI,CAAC;CACvB;AAED;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,sBAAsB,GAAG,sBAAsB,IAAI,CACzF,IAAI,EAAE,oBAAoB,KACvB,OAAO,CAAC,CAAC,CAAC,CAAC;AAEhB,MAAM,WAAW,kBAAkB,CACjC,CAAC,SAAS,sBAAsB,GAAG,sBAAsB;IAEzD,wDAAwD;IACxD,uBAAuB,EAAE,OAAO,CAAC;IACjC,uCAAuC;IACvC,OAAO,EAAE,GAAG,CAAC;IACb;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf;;;;;OAKG;IACH,kBAAkB,EAAE,GAAG,CAAC;IACxB,sEAAsE;IACtE,aAAa,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;IACpC;;;;;OAKG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,aAAa,CACjC,CAAC,SAAS,sBAAsB,GAAG,sBAAsB,EACzD,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAmC1C"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Vault activation service — reveal HTLC secret on Ethereum.
3
+ *
4
+ * @module services/activation
5
+ */
6
+ export { activateVault, type ActivateVaultInput, type EthContractWriteCall, type EthContractWriteResult, type EthContractWriter, } from './activateVault';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/activation/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,aAAa,EACb,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,GACvB,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=peginState.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"peginState.test.d.ts","sourceRoot":"","sources":["../../../../../../src/tbv/core/services/deposit/__tests__/peginState.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Tests for deposit validation functions (SDK)
3
+ */
4
+ export {};
5
+ //# sourceMappingURL=validation.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.test.d.ts","sourceRoot":"","sources":["../../../../../../src/tbv/core/services/deposit/__tests__/validation.test.ts"],"names":[],"mappings":"AAAA;;GAEG"}
@@ -7,4 +7,8 @@ export { signDepositorGraph } from './signDepositorGraph';
7
7
  export type { SignDepositorGraphParams } from './signDepositorGraph';
8
8
  export { pollAndSignPayouts } from './signAndSubmitPayouts';
9
9
  export type { PayoutSigningContext, PollAndSignPayoutsParams, } from './signAndSubmitPayouts';
10
+ export { ContractStatus, PeginAction, canPerformAction, getPeginProtocolState, } from './peginState';
11
+ export type { ExpirationReason, GetPeginProtocolStateOptions, PeginProtocolState, } from './peginState';
12
+ export { isDepositAmountValid, validateDepositAmount, validateRemainingCapacity, validateProviderSelection, validateVaultAmounts, validateVaultProviderPubkey, validateMultiVaultDepositInputs, } from './validation';
13
+ export type { ValidationResult, DepositFormValidityParams, RemainingCapacityParams, MultiVaultDepositFlowInputs, } from './validation';
10
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/deposit/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,sBAAsB,GACvB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,YAAY,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,YAAY,EACV,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/deposit/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,sBAAsB,GACvB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,YAAY,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,YAAY,EACV,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,gBAAgB,EAChB,4BAA4B,EAC5B,kBAAkB,GACnB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,yBAAyB,EACzB,yBAAyB,EACzB,oBAAoB,EACpB,2BAA2B,EAC3B,+BAA+B,GAChC,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,gBAAgB,EAChB,yBAAyB,EACzB,uBAAuB,EACvB,2BAA2B,GAC5B,MAAM,cAAc,CAAC"}