@babylonlabs-io/ts-sdk 0.4.1-rc.2 → 0.7.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 (49) hide show
  1. package/LICENSE +169 -0
  2. package/README.md +1 -1
  3. package/dist/{PayoutManager-B8vLG1dE.js → PayoutManager-BVmU4UsM.js} +213 -170
  4. package/dist/PayoutManager-BVmU4UsM.js.map +1 -0
  5. package/dist/PayoutManager-Ba6cNgHC.cjs +2 -0
  6. package/dist/PayoutManager-Ba6cNgHC.cjs.map +1 -0
  7. package/dist/{challengeAssert-ZXE00zkT.js → challengeAssert-D50t_Qyo.js} +96 -74
  8. package/dist/challengeAssert-D50t_Qyo.js.map +1 -0
  9. package/dist/challengeAssert-DDceAi0r.cjs +2 -0
  10. package/dist/challengeAssert-DDceAi0r.cjs.map +1 -0
  11. package/dist/index.cjs +1 -1
  12. package/dist/index.cjs.map +1 -1
  13. package/dist/index.d.ts +0 -2
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +53 -53
  16. package/dist/index.js.map +1 -1
  17. package/dist/tbv/core/contracts/abis/{BTCVaultsManager.abi.d.ts → BTCVaultRegistry.abi.d.ts} +41 -9
  18. package/dist/tbv/core/contracts/abis/BTCVaultRegistry.abi.d.ts.map +1 -0
  19. package/dist/tbv/core/contracts/index.d.ts +1 -1
  20. package/dist/tbv/core/index.cjs +1 -1
  21. package/dist/tbv/core/index.js +51 -49
  22. package/dist/tbv/core/managers/PeginManager.d.ts +21 -20
  23. package/dist/tbv/core/managers/PeginManager.d.ts.map +1 -1
  24. package/dist/tbv/core/managers/__tests__/PeginManager.test.d.ts +1 -1
  25. package/dist/tbv/core/managers/index.d.ts +4 -4
  26. package/dist/tbv/core/managers/index.d.ts.map +1 -1
  27. package/dist/tbv/core/primitives/index.cjs +1 -1
  28. package/dist/tbv/core/primitives/index.d.ts +2 -2
  29. package/dist/tbv/core/primitives/index.d.ts.map +1 -1
  30. package/dist/tbv/core/primitives/index.js +19 -17
  31. package/dist/tbv/core/primitives/psbt/pegin.d.ts +11 -8
  32. package/dist/tbv/core/primitives/psbt/pegin.d.ts.map +1 -1
  33. package/dist/tbv/core/primitives/psbt/peginInput.d.ts +11 -1
  34. package/dist/tbv/core/primitives/psbt/peginInput.d.ts.map +1 -1
  35. package/dist/tbv/core/utils/transaction/btcTxHash.d.ts +1 -1
  36. package/dist/tbv/index.cjs +1 -1
  37. package/dist/tbv/index.js +51 -49
  38. package/dist/tbv/integrations/aave/clients/abis/AaveIntegrationController.abi.json.d.ts +7 -2
  39. package/dist/tbv/integrations/aave/index.cjs +1 -1
  40. package/dist/tbv/integrations/aave/index.cjs.map +1 -1
  41. package/dist/tbv/integrations/aave/index.js +3 -3
  42. package/package.json +19 -19
  43. package/dist/PayoutManager-B8vLG1dE.js.map +0 -1
  44. package/dist/PayoutManager-Shw7TY5P.cjs +0 -2
  45. package/dist/PayoutManager-Shw7TY5P.cjs.map +0 -1
  46. package/dist/challengeAssert-ClJYoKxJ.cjs +0 -2
  47. package/dist/challengeAssert-ClJYoKxJ.cjs.map +0 -1
  48. package/dist/challengeAssert-ZXE00zkT.js.map +0 -1
  49. package/dist/tbv/core/contracts/abis/BTCVaultsManager.abi.d.ts.map +0 -1
@@ -1,19 +1,20 @@
1
- import { B as e, D as t, F as r, L as o, M as i, P as n, S as T, T as u, W as P, j as l, h as d, i as g, f as E, d as c, a as _, b as A, c as p, k as x, l as S, m as b, q as F, g as I, e as R, y, z as C, n as U, o as L, p as M, x as O, r as f, w as m, s as h, t as B, u as H, v as N } from "../../challengeAssert-ZXE00zkT.js";
2
- import { computeMinClaimValue as v } from "@babylonlabs-io/babylon-tbv-rust-wasm";
3
- import { q as w, B as W, C as X, M as Y, h as V, P as K, c as Z, b as j, d as q, r as G, i as z, j as J, t as Q, g as $, k as aa, l as sa, f as ea, e as ta, m as ra, n as oa, o as ia, v as na, u as Ta, p as ua, s as Pa, a as la } from "../../PayoutManager-B8vLG1dE.js";
1
+ import { B as e, D as t, F as r, L as i, M as o, P as n, S as T, T as u, W as P, k as l, i as d, j as g, g as E, d as _, a as c, b as A, c as p, l as x, m as S, n as b, r as I, h as R, e as y, f as C, z as F, A as U, o as L, p as O, q as f, y as m, s as M, x as h, t as H, u as N, v as B, w as D } from "../../challengeAssert-D50t_Qyo.js";
2
+ import { SINGLE_DEPOSIT_HTLC_VOUT as k, computeMinClaimValue as w } from "@babylonlabs-io/babylon-tbv-rust-wasm";
3
+ import { q as W, B as X, C as Y, M as G, h as K, P as Z, c as j, b as q, d as z, r as J, i as Q, j as $, t as aa, g as sa, k as ea, l as ta, f as ra, e as ia, m as oa, n as na, o as Ta, v as ua, u as Pa, p as la, s as da, a as ga } from "../../PayoutManager-BVmU4UsM.js";
4
4
  export {
5
- w as BTCVaultsManagerABI,
5
+ W as BTCVaultRegistryABI,
6
6
  e as BTC_DUST_SAT,
7
- W as BitcoinScriptType,
8
- X as CONTRACT_ERRORS,
7
+ X as BitcoinScriptType,
8
+ Y as CONTRACT_ERRORS,
9
9
  t as DUST_THRESHOLD,
10
10
  r as FEE_SAFETY_MARGIN,
11
- o as LOW_RATE_ESTIMATION_ACCURACY_BUFFER,
12
- i as MAX_NON_LEGACY_OUTPUT_SIZE,
13
- Y as MEMPOOL_API_URLS,
11
+ i as LOW_RATE_ESTIMATION_ACCURACY_BUFFER,
12
+ o as MAX_NON_LEGACY_OUTPUT_SIZE,
13
+ G as MEMPOOL_API_URLS,
14
14
  n as P2TR_INPUT_SIZE,
15
- V as PayoutManager,
16
- K as PeginManager,
15
+ K as PayoutManager,
16
+ Z as PeginManager,
17
+ k as SINGLE_DEPOSIT_HTLC_VOUT,
17
18
  T as SPLIT_TX_FEE_SAFETY_MULTIPLIER,
18
19
  u as TX_BUFFER_SIZE_OVERHEAD,
19
20
  P as WALLET_RELAY_FEE_RATE_THRESHOLD,
@@ -21,48 +22,49 @@ export {
21
22
  d as buildDepositorPayoutPsbt,
22
23
  g as buildNoPayoutPsbt,
23
24
  E as buildPayoutPsbt,
24
- c as buildPeginInputPsbt,
25
- _ as buildPeginTxFromFundedPrePegin,
25
+ _ as buildPeginInputPsbt,
26
+ c as buildPeginTxFromFundedPrePegin,
26
27
  A as buildPrePeginPsbt,
27
- Z as calculateBtcTxHash,
28
- v as computeMinClaimValue,
28
+ j as calculateBtcTxHash,
29
+ w as computeMinClaimValue,
29
30
  p as computeNumLocalChallengers,
30
31
  x as createPayoutScript,
31
- j as createSplitTransaction,
32
- q as createSplitTransactionPsbt,
32
+ q as createSplitTransaction,
33
+ z as createSplitTransactionPsbt,
33
34
  S as deriveNativeSegwitAddress,
34
35
  b as deriveTaprootAddress,
35
- F as ensureHexPrefix,
36
- G as extractErrorData,
37
- I as extractPayoutSignature,
38
- R as extractPeginInputSignature,
39
- y as fundPeginTransaction,
40
- z as getAddressTxs,
41
- J as getAddressUtxos,
42
- Q as getContractErrorMessage,
43
- $ as getDustThreshold,
44
- aa as getMempoolApiUrl,
45
- C as getNetwork,
46
- sa as getNetworkFees,
47
- ea as getPsbtInputFields,
48
- ta as getScriptType,
49
- ra as getTxHex,
50
- oa as getTxInfo,
51
- ia as getUtxoInfo,
52
- na as handleContractError,
53
- U as hexToUint8Array,
54
- L as isAddressFromPublicKey,
55
- Ta as isKnownContractError,
56
- M as isValidHex,
57
- O as parseUnfundedWasmTransaction,
58
- f as processPublicKeyToXOnly,
59
- ua as pushTx,
60
- m as rateBasedTxBufferFee,
61
- Pa as selectUtxosForPegin,
62
- la as shouldAddChangeOutput,
63
- h as stripHexPrefix,
64
- B as toXOnly,
65
- H as uint8ArrayToHex,
66
- N as validateWalletPubkey
36
+ I as ensureHexPrefix,
37
+ J as extractErrorData,
38
+ R as extractPayoutSignature,
39
+ y as extractPeginInputSignature,
40
+ C as finalizePeginInputPsbt,
41
+ F as fundPeginTransaction,
42
+ Q as getAddressTxs,
43
+ $ as getAddressUtxos,
44
+ aa as getContractErrorMessage,
45
+ sa as getDustThreshold,
46
+ ea as getMempoolApiUrl,
47
+ U as getNetwork,
48
+ ta as getNetworkFees,
49
+ ra as getPsbtInputFields,
50
+ ia as getScriptType,
51
+ oa as getTxHex,
52
+ na as getTxInfo,
53
+ Ta as getUtxoInfo,
54
+ ua as handleContractError,
55
+ L as hexToUint8Array,
56
+ O as isAddressFromPublicKey,
57
+ Pa as isKnownContractError,
58
+ f as isValidHex,
59
+ m as parseUnfundedWasmTransaction,
60
+ M as processPublicKeyToXOnly,
61
+ la as pushTx,
62
+ h as rateBasedTxBufferFee,
63
+ da as selectUtxosForPegin,
64
+ ga as shouldAddChangeOutput,
65
+ H as stripHexPrefix,
66
+ N as toXOnly,
67
+ B as uint8ArrayToHex,
68
+ D as validateWalletPubkey
67
69
  };
68
70
  //# sourceMappingURL=index.js.map
@@ -30,9 +30,9 @@ export interface PeginManagerConfig {
30
30
  */
31
31
  vaultContracts: {
32
32
  /**
33
- * BTCVaultsManager contract address on Ethereum.
33
+ * BTCVaultRegistry contract address on Ethereum.
34
34
  */
35
- btcVaultsManager: Address;
35
+ btcVaultRegistry: Address;
36
36
  };
37
37
  /**
38
38
  * Mempool API URL for fetching UTXO data and broadcasting transactions.
@@ -42,9 +42,9 @@ export interface PeginManagerConfig {
42
42
  mempoolApiUrl: string;
43
43
  }
44
44
  /**
45
- * Parameters for the atomic swap pegin flow (pre-pegin + pegin transactions).
45
+ * Parameters for the pegin flow (pre-pegin + pegin transactions).
46
46
  */
47
- export interface CreateAtomicPeginParams {
47
+ export interface PreparePeginParams {
48
48
  /**
49
49
  * Amount to peg in (in satoshis).
50
50
  */
@@ -73,10 +73,11 @@ export interface CreateAtomicPeginParams {
73
73
  */
74
74
  timelockRefund: number;
75
75
  /**
76
- * SHA256 hash commitment for the HTLC (64 hex chars = 32 bytes).
76
+ * SHA256 hash commitment(s) for the HTLC (64 hex chars = 32 bytes each).
77
77
  * Generated by the depositor as H = SHA256(secret).
78
+ * For single deposits, pass a single-element array.
78
79
  */
79
- hashH: string;
80
+ hashlocks: readonly string[];
80
81
  /**
81
82
  * Protocol fee rate in sat/vB from the contract offchain params.
82
83
  * Used by WASM for computing depositorClaimValue and min pegin fee.
@@ -105,9 +106,9 @@ export interface CreateAtomicPeginParams {
105
106
  changeAddress: string;
106
107
  }
107
108
  /**
108
- * Result of preparing an atomic swap pegin.
109
+ * Result of preparing a pegin.
109
110
  */
110
- export interface AtomicPeginResult {
111
+ export interface PreparePeginResult {
111
112
  /**
112
113
  * Funded but unsigned Pre-PegIn transaction hex.
113
114
  * Sign and broadcast this AFTER registering on Ethereum.
@@ -162,7 +163,7 @@ export interface AtomicPeginResult {
162
163
  */
163
164
  export interface SignAndBroadcastParams {
164
165
  /**
165
- * Funded Pre-PegIn transaction hex from prepareAtomicPegin().
166
+ * Funded Pre-PegIn transaction hex from preparePegin().
166
167
  */
167
168
  fundedPrePeginTxHex: string;
168
169
  /**
@@ -194,7 +195,7 @@ export interface RegisterPeginParams {
194
195
  */
195
196
  vaultProvider: Address;
196
197
  /**
197
- * SHA256 hashlock for atomic swap activation (bytes32 hex with 0x prefix).
198
+ * SHA256 hashlock for HTLC activation (bytes32 hex with 0x prefix).
198
199
  */
199
200
  hashlock: Hex;
200
201
  /**
@@ -233,7 +234,7 @@ export interface RegisterPeginResult {
233
234
  */
234
235
  ethTxHash: Hash;
235
236
  /**
236
- * Vault identifier used in the BTCVaultsManager contract.
237
+ * Vault identifier used in the BTCVaultRegistry contract.
237
238
  * This is the Bitcoin transaction hash with 0x prefix for Ethereum compatibility.
238
239
  * Corresponds to btcTxHash from PeginResult, but formatted as Hex with '0x' prefix.
239
240
  */
@@ -251,11 +252,11 @@ export interface RegisterPeginResult {
251
252
  * by coordinating between SDK primitives, utilities, and wallet interfaces.
252
253
  *
253
254
  * @remarks
254
- * The complete atomic swap peg-in flow consists of 4 steps:
255
+ * The complete peg-in flow consists of 4 steps:
255
256
  *
256
257
  * | Step | Method | Description |
257
258
  * |------|--------|-------------|
258
- * | 1 | {@link prepareAtomicPegin} | Build Pre-PegIn HTLC, fund it, sign PegIn input |
259
+ * | 1 | {@link preparePegin} | Build Pre-PegIn HTLC, fund it, sign PegIn input |
259
260
  * | 2 | {@link registerPeginOnChain} | Submit to Ethereum contract with PoP |
260
261
  * | 3 | {@link PayoutManager} | Sign BOTH payout authorizations |
261
262
  * | 4 | {@link signAndBroadcast} | Sign and broadcast Pre-PegIn tx to Bitcoin network |
@@ -284,7 +285,7 @@ export declare class PeginManager {
284
285
  */
285
286
  constructor(config: PeginManagerConfig);
286
287
  /**
287
- * Prepares an atomic swap peg-in by building the Pre-PegIn HTLC transaction,
288
+ * Prepares a peg-in by building the Pre-PegIn HTLC transaction,
288
289
  * funding it, constructing the PegIn transaction, and signing the PegIn input.
289
290
  *
290
291
  * This method orchestrates the following steps:
@@ -299,11 +300,11 @@ export declare class PeginManager {
299
300
  * The returned `fundedPrePeginTxHex` is funded but unsigned (inputs unsigned).
300
301
  * Use `signAndBroadcast()` AFTER registering on Ethereum to broadcast it.
301
302
  *
302
- * @param params - Atomic pegin parameters including amount, HTLC params, UTXOs
303
- * @returns Atomic pegin result with funded Pre-PegIn tx, signed PegIn input, and signatures
303
+ * @param params - Pegin parameters including amount, HTLC params, UTXOs
304
+ * @returns Pegin result with funded Pre-PegIn tx, signed PegIn input, and signatures
304
305
  * @throws Error if wallet operations fail or insufficient funds
305
306
  */
306
- prepareAtomicPegin(params: CreateAtomicPeginParams): Promise<AtomicPeginResult>;
307
+ preparePegin(params: PreparePeginParams): Promise<PreparePeginResult>;
307
308
  /**
308
309
  * Signs and broadcasts a funded peg-in transaction to the Bitcoin network.
309
310
  *
@@ -321,7 +322,7 @@ export declare class PeginManager {
321
322
  */
322
323
  signAndBroadcast(params: SignAndBroadcastParams): Promise<string>;
323
324
  /**
324
- * Registers a peg-in on Ethereum by calling the BTCVaultsManager contract.
325
+ * Registers a peg-in on Ethereum by calling the BTCVaultRegistry contract.
325
326
  *
326
327
  * This method:
327
328
  * 1. Gets depositor ETH address from wallet
@@ -367,9 +368,9 @@ export declare class PeginManager {
367
368
  */
368
369
  getNetwork(): Network;
369
370
  /**
370
- * Gets the configured BTCVaultsManager contract address.
371
+ * Gets the configured BTCVaultRegistry contract address.
371
372
  *
372
- * @returns The Ethereum address of the BTCVaultsManager contract
373
+ * @returns The Ethereum address of the BTCVaultRegistry contract
373
374
  */
374
375
  getVaultContractAddress(): Address;
375
376
  }
@@ -1 +1 @@
1
- {"version":3,"file":"PeginManager.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/managers/PeginManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAKH,OAAO,EAKL,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,GAAG,EACR,KAAK,YAAY,EAClB,MAAM,MAAM,CAAC;AAEd,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kDAAkD,CAAC;AACtF,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mDAAmD,CAAC;AAG9E,OAAO,EAML,KAAK,OAAO,EACb,MAAM,eAAe,CAAC;AAMvB,OAAO,EAML,KAAK,IAAI,EACV,MAAM,UAAU,CAAC;AAElB;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,SAAS,EAAE,aAAa,CAAC;IAEzB;;;OAGG;IACH,SAAS,EAAE,YAAY,CAAC;IAExB;;;OAGG;IACH,QAAQ,EAAE,KAAK,CAAC;IAEhB;;OAEG;IACH,cAAc,EAAE;QACd;;WAEG;QACH,gBAAgB,EAAE,OAAO,CAAC;KAC3B,CAAC;IAEF;;;;OAIG;IACH,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,sBAAsB,EAAE,MAAM,CAAC;IAE/B;;;OAGG;IACH,qBAAqB,EAAE,SAAS,MAAM,EAAE,CAAC;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IG;IACH,UAAU,IAAI,OAAO;IAIrB;;;;OAIG;IACH,uBAAuB,IAAI,OAAO;CAGnC"}
1
+ {"version":3,"file":"PeginManager.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/managers/PeginManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAKH,OAAO,EAKL,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,GAAG,EACR,KAAK,YAAY,EAClB,MAAM,MAAM,CAAC;AAEd,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kDAAkD,CAAC;AACtF,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mDAAmD,CAAC;AAG9E,OAAO,EAQL,KAAK,OAAO,EACb,MAAM,eAAe,CAAC;AAMvB,OAAO,EAML,KAAK,IAAI,EACV,MAAM,UAAU,CAAC;AAElB;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,SAAS,EAAE,aAAa,CAAC;IAEzB;;;OAGG;IACH,SAAS,EAAE,YAAY,CAAC;IAExB;;;OAGG;IACH,QAAQ,EAAE,KAAK,CAAC;IAEhB;;OAEG;IACH,cAAc,EAAE;QACd;;WAEG;QACH,gBAAgB,EAAE,OAAO,CAAC;KAC3B,CAAC;IAEF;;;;OAIG;IACH,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,sBAAsB,EAAE,MAAM,CAAC;IAE/B;;;OAGG;IACH,qBAAqB,EAAE,SAAS,MAAM,EAAE,CAAC;IAEzC;;;OAGG;IACH,6BAA6B,EAAE,SAAS,MAAM,EAAE,CAAC;IAEjD;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;;;OAIG;IACH,SAA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ic swap peg-in operations
4
+ * Tests the manager's ability to orchestrate peg-in operations
5
5
  * using primitives, utilities, and mock wallets.
6
6
  */
7
7
  export {};
@@ -35,8 +35,8 @@
35
35
  * ## Available Managers
36
36
  *
37
37
  * ### {@link PeginManager}
38
- * Orchestrates the atomic swap peg-in flow:
39
- * - {@link PeginManager.prepareAtomicPegin | prepareAtomicPegin()} - Build Pre-PegIn HTLC and sign PegIn input
38
+ * Orchestrates the peg-in flow:
39
+ * - {@link PeginManager.preparePegin | preparePegin()} - Build Pre-PegIn HTLC and sign PegIn input
40
40
  * - {@link PeginManager.registerPeginOnChain | registerPeginOnChain()} - Submit to Ethereum
41
41
  * - {@link PeginManager.signAndBroadcast | signAndBroadcast()} - Broadcast to Bitcoin
42
42
  *
@@ -50,7 +50,7 @@
50
50
  *
51
51
  * | Step | Manager | Method |
52
52
  * |------|---------|--------|
53
- * | 1 | PeginManager | `prepareAtomicPegin()` |
53
+ * | 1 | PeginManager | `preparePegin()` |
54
54
  * | 2 | PeginManager | `registerPeginOnChain()` |
55
55
  * | 3 | PayoutManager | `signPayoutTransaction()` |
56
56
  * | 4 | PeginManager | `signAndBroadcast()` |
@@ -67,7 +67,7 @@
67
67
  * @module managers
68
68
  */
69
69
  export { PeginManager } from './PeginManager';
70
- export type { AtomicPeginResult, CreateAtomicPeginParams, PeginManagerConfig, RegisterPeginParams, RegisterPeginResult, SignAndBroadcastParams, } from './PeginManager';
70
+ export type { PreparePeginResult, PreparePeginParams, PeginManagerConfig, RegisterPeginParams, RegisterPeginResult, SignAndBroadcastParams, } from './PeginManager';
71
71
  export { PayoutManager } from './PayoutManager';
72
72
  export type { PayoutManagerConfig, PayoutSignatureResult, SignPayoutParams, } from './PayoutManager';
73
73
  export type { UTXO } from '../utils/utxo/selectUtxos';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/managers/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EACV,iBAAiB,EACjB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EACV,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AAGzB,YAAY,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AACtD,YAAY,EACV,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,eAAe,GAChB,MAAM,kDAAkD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/managers/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EACV,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EACV,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AAGzB,YAAY,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AACtD,YAAY,EACV,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,eAAe,GAChB,MAAM,kDAAkD,CAAC"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../challengeAssert-ClJYoKxJ.cjs"),t=require("@babylonlabs-io/babylon-tbv-rust-wasm");exports.buildChallengeAssertPsbt=e.buildChallengeAssertPsbt;exports.buildDepositorPayoutPsbt=e.buildDepositorPayoutPsbt;exports.buildNoPayoutPsbt=e.buildNoPayoutPsbt;exports.buildPayoutPsbt=e.buildPayoutPsbt;exports.buildPeginInputPsbt=e.buildPeginInputPsbt;exports.buildPeginTxFromFundedPrePegin=e.buildPeginTxFromFundedPrePegin;exports.buildPrePeginPsbt=e.buildPrePeginPsbt;exports.computeNumLocalChallengers=e.computeNumLocalChallengers;exports.createPayoutScript=e.createPayoutScript;exports.deriveNativeSegwitAddress=e.deriveNativeSegwitAddress;exports.deriveTaprootAddress=e.deriveTaprootAddress;exports.ensureHexPrefix=e.ensureHexPrefix;exports.extractPayoutSignature=e.extractPayoutSignature;exports.extractPeginInputSignature=e.extractPeginInputSignature;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;Object.defineProperty(exports,"computeMinClaimValue",{enumerable:!0,get:()=>t.computeMinClaimValue});
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../challengeAssert-DDceAi0r.cjs"),t=require("@babylonlabs-io/babylon-tbv-rust-wasm");exports.buildChallengeAssertPsbt=e.buildChallengeAssertPsbt;exports.buildDepositorPayoutPsbt=e.buildDepositorPayoutPsbt;exports.buildNoPayoutPsbt=e.buildNoPayoutPsbt;exports.buildPayoutPsbt=e.buildPayoutPsbt;exports.buildPeginInputPsbt=e.buildPeginInputPsbt;exports.buildPeginTxFromFundedPrePegin=e.buildPeginTxFromFundedPrePegin;exports.buildPrePeginPsbt=e.buildPrePeginPsbt;exports.computeNumLocalChallengers=e.computeNumLocalChallengers;exports.createPayoutScript=e.createPayoutScript;exports.deriveNativeSegwitAddress=e.deriveNativeSegwitAddress;exports.deriveTaprootAddress=e.deriveTaprootAddress;exports.ensureHexPrefix=e.ensureHexPrefix;exports.extractPayoutSignature=e.extractPayoutSignature;exports.extractPeginInputSignature=e.extractPeginInputSignature;exports.finalizePeginInputPsbt=e.finalizePeginInputPsbt;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;Object.defineProperty(exports,"SINGLE_DEPOSIT_HTLC_VOUT",{enumerable:!0,get:()=>t.SINGLE_DEPOSIT_HTLC_VOUT});Object.defineProperty(exports,"computeMinClaimValue",{enumerable:!0,get:()=>t.computeMinClaimValue});
2
2
  //# sourceMappingURL=index.cjs.map
@@ -75,9 +75,9 @@ export { computeNumLocalChallengers } from './challengers';
75
75
  export type { Network } from '@babylonlabs-io/babylon-tbv-rust-wasm';
76
76
  export { computeMinClaimValue } from '@babylonlabs-io/babylon-tbv-rust-wasm';
77
77
  export type { AssertPayoutNoPayoutConnectorParams, ChallengeAssertConnectorParams, PayoutConnectorParams, } from '@babylonlabs-io/babylon-tbv-rust-wasm';
78
- export { buildPrePeginPsbt, buildPeginTxFromFundedPrePegin } from './psbt/pegin';
78
+ export { buildPrePeginPsbt, buildPeginTxFromFundedPrePegin, SINGLE_DEPOSIT_HTLC_VOUT } from './psbt/pegin';
79
79
  export type { PrePeginParams, PrePeginPsbtResult, BuildPeginTxParams, PeginTxResult, } from './psbt/pegin';
80
- export { buildPeginInputPsbt, extractPeginInputSignature } from './psbt/peginInput';
80
+ export { buildPeginInputPsbt, extractPeginInputSignature, finalizePeginInputPsbt } from './psbt/peginInput';
81
81
  export type { BuildPeginInputPsbtParams, BuildPeginInputPsbtResult, } from './psbt/peginInput';
82
82
  export { buildPayoutPsbt, extractPayoutSignature } from './psbt/payout';
83
83
  export type { PayoutParams, PayoutPsbtResult } from './psbt/payout';
@@ -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,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,YAAY,EACV,mCAAmC,EACnC,8BAA8B,EAC9B,qBAAqB,GACtB,MAAM,uCAAuC,CAAC;AAG/C,OAAO,EAAE,iBAAiB,EAAE,8BAA8B,EAAE,MAAM,cAAc,CAAC;AACjF,YAAY,EACV,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,GACd,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AACpF,YAAY,EACV,yBAAyB,EACzB,yBAAyB,GAC1B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACxE,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,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,wBA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M,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,uBAAuB,EACvB,cAAc,EACd,OAAO,EACP,eAAe,EACf,oBAAoB,EACpB,KAAK,4BAA4B,GAClC,MAAM,iBAAiB,CAAC"}
@@ -1,28 +1,30 @@
1
- import { j as s, h as t, i, f as r, d as u, a as o, b as l, c as P, k as d, l as n, m as b, q as p, g as x, e as y, n as c, o as g, p as m, r as A, s as f, t as v, u as T, v as h } from "../../../challengeAssert-ZXE00zkT.js";
2
- import { computeMinClaimValue as S } from "@babylonlabs-io/babylon-tbv-rust-wasm";
1
+ import { k as s, i as t, j as i, g as r, d as u, a as P, b as o, c as l, l as n, m as d, n as b, r as p, h as g, e as x, f as y, o as c, p as m, q as T, s as f, t as A, u as S, v, w as H } from "../../../challengeAssert-D50t_Qyo.js";
2
+ import { SINGLE_DEPOSIT_HTLC_VOUT as h, computeMinClaimValue as C } from "@babylonlabs-io/babylon-tbv-rust-wasm";
3
3
  export {
4
+ h as SINGLE_DEPOSIT_HTLC_VOUT,
4
5
  s as buildChallengeAssertPsbt,
5
6
  t as buildDepositorPayoutPsbt,
6
7
  i as buildNoPayoutPsbt,
7
8
  r as buildPayoutPsbt,
8
9
  u as buildPeginInputPsbt,
9
- o as buildPeginTxFromFundedPrePegin,
10
- l as buildPrePeginPsbt,
11
- S as computeMinClaimValue,
12
- P as computeNumLocalChallengers,
13
- d as createPayoutScript,
14
- n as deriveNativeSegwitAddress,
10
+ P as buildPeginTxFromFundedPrePegin,
11
+ o as buildPrePeginPsbt,
12
+ C as computeMinClaimValue,
13
+ l as computeNumLocalChallengers,
14
+ n as createPayoutScript,
15
+ d as deriveNativeSegwitAddress,
15
16
  b as deriveTaprootAddress,
16
17
  p as ensureHexPrefix,
17
- x as extractPayoutSignature,
18
- y as extractPeginInputSignature,
18
+ g as extractPayoutSignature,
19
+ x as extractPeginInputSignature,
20
+ y as finalizePeginInputPsbt,
19
21
  c as hexToUint8Array,
20
- g as isAddressFromPublicKey,
21
- m as isValidHex,
22
- A as processPublicKeyToXOnly,
23
- f as stripHexPrefix,
24
- v as toXOnly,
25
- T as uint8ArrayToHex,
26
- h as validateWalletPubkey
22
+ m as isAddressFromPublicKey,
23
+ T as isValidHex,
24
+ f as processPublicKeyToXOnly,
25
+ A as stripHexPrefix,
26
+ S as toXOnly,
27
+ v as uint8ArrayToHex,
28
+ H as validateWalletPubkey
27
29
  };
28
30
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,5 @@
1
1
  import { Network } from '@babylonlabs-io/babylon-tbv-rust-wasm';
2
+ export { SINGLE_DEPOSIT_HTLC_VOUT } from '@babylonlabs-io/babylon-tbv-rust-wasm';
2
3
  /**
3
4
  * Parameters for building an unfunded Pre-PegIn PSBT
4
5
  */
@@ -11,8 +12,8 @@ export interface PrePeginParams {
11
12
  vaultKeeperPubkeys: string[];
12
13
  /** Array of universal challenger BTC public keys (x-only, 64-char hex) */
13
14
  universalChallengerPubkeys: string[];
14
- /** SHA256 hash commitment (64 hex chars = 32 bytes) */
15
- hashH: string;
15
+ /** SHA256 hash commitment(s) (64 hex chars = 32 bytes each) */
16
+ hashlocks: readonly string[];
16
17
  /** CSV timelock in blocks for the HTLC refund path */
17
18
  timelockRefund: number;
18
19
  /** Amount to peg in (satoshis) */
@@ -63,8 +64,10 @@ export interface BuildPeginTxParams {
63
64
  prePeginParams: PrePeginParams;
64
65
  /** CSV timelock in blocks for the PegIn vault output */
65
66
  timelockPegin: number;
66
- /** Txid of the funded Pre-PegIn transaction (hex, 64 chars) */
67
- fundedPrePeginTxid: string;
67
+ /** Hex-encoded funded Pre-PegIn transaction */
68
+ fundedPrePeginTxHex: string;
69
+ /** Index of the HTLC output to spend */
70
+ htlcVout: number;
68
71
  }
69
72
  /**
70
73
  * Result of building the PegIn transaction
@@ -92,12 +95,12 @@ export interface PeginTxResult {
92
95
  */
93
96
  export declare function buildPrePeginPsbt(params: PrePeginParams): Promise<PrePeginPsbtResult>;
94
97
  /**
95
- * Build the PegIn transaction from a funded Pre-PegIn txid.
98
+ * Build the PegIn transaction from a funded Pre-PegIn transaction.
96
99
  *
97
- * The PegIn transaction spends Pre-PegIn output 0 via the HTLC hashlock leaf (leaf 0).
98
- * Since Pre-PegIn inputs must be SegWit/Taproot, the txid is stable after funding.
100
+ * The PegIn transaction spends the Pre-PegIn HTLC output at htlcVout via the
101
+ * hashlock + all-party script (leaf 0).
99
102
  *
100
- * @param params - Build parameters including Pre-PegIn params and funded txid
103
+ * @param params - Build parameters including Pre-PegIn params and funded tx hex
101
104
  * @returns PegIn transaction details
102
105
  * @throws If WASM initialization fails or parameters are invalid
103
106
  */
@@ -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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,EAAE,MAAM,CAAC;IAClB,6CAA6C;IAC7C,gBAAgB,EAAE,MAAM,CAAC;IACzB,2BAA2B;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,+BAA+B;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,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"}
@@ -22,7 +22,7 @@ export interface BuildPeginInputPsbtParams {
22
22
  /** Universal challenger BTC public keys (x-only, 64-char hex) */
23
23
  universalChallengerPubkeys: string[];
24
24
  /** SHA256 hash commitment (64 hex chars = 32 bytes) */
25
- hashH: string;
25
+ hashlock: string;
26
26
  /** CSV timelock in blocks for the HTLC refund path */
27
27
  timelockRefund: number;
28
28
  /** Bitcoin network */
@@ -66,4 +66,14 @@ export declare function buildPeginInputPsbt(params: BuildPeginInputPsbtParams):
66
66
  * @throws If no signature is found for the depositor's key
67
67
  */
68
68
  export declare function extractPeginInputSignature(signedPsbtHex: string, depositorPubkey: string): string;
69
+ /**
70
+ * Finalize a signed PegIn input PSBT and return the depositor-signed transaction hex.
71
+ *
72
+ * The default tapscript finalizer builds the full witness stack [sig, script, controlBlock]
73
+ * that vaultd requires when verifying the depositor signature on-chain.
74
+ *
75
+ * @param signedPsbtHex - Non-finalized signed PSBT hex (returned by wallet with autoFinalized: false)
76
+ * @returns Depositor-signed PegIn transaction hex with full taproot witness stack
77
+ */
78
+ export declare function finalizePeginInputPsbt(signedPsbtHex: string): string;
69
79
  //# sourceMappingURL=peginInput.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"peginInput.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/primitives/psbt/peginInput.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAGL,KAAK,OAAO,EACb,MAAM,uCAAuC,CAAC;AAK/C;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,mBAAmB,EAAE,MAAM,CAAC;IAC5B,uDAAuD;IACvD,eAAe,EAAE,MAAM,CAAC;IACxB,4DAA4D;IAC5D,mBAAmB,EAAE,MAAM,CAAC;IAC5B,yDAAyD;IACzD,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,iEAAiE;IACjE,0BAA0B,EAAE,MAAM,EAAE,CAAC;IACrC,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAC;IACd,sDAAsD;IACtD,cAAc,EAAE,MAAM,CAAC;IACvB,sBAAsB;IACtB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,yCAAyC;IACzC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,yBAAyB,GAChC,OAAO,CAAC,yBAAyB,CAAC,CAkFpC;AAED;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CACxC,aAAa,EAAE,MAAM,EACrB,eAAe,EAAE,MAAM,GACtB,MAAM,CAuCR"}
1
+ {"version":3,"file":"peginInput.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/primitives/psbt/peginInput.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAGL,KAAK,OAAO,EACb,MAAM,uCAAuC,CAAC;AAK/C;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,mBAAmB,EAAE,MAAM,CAAC;IAC5B,uDAAuD;IACvD,eAAe,EAAE,MAAM,CAAC;IACxB,4DAA4D;IAC5D,mBAAmB,EAAE,MAAM,CAAC;IAC5B,yDAAyD;IACzD,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,iEAAiE;IACjE,0BAA0B,EAAE,MAAM,EAAE,CAAC;IACrC,uDAAuD;IACvD,QAAQ,EAAE,MAAM,CAAC;IACjB,sDAAsD;IACtD,cAAc,EAAE,MAAM,CAAC;IACvB,sBAAsB;IACtB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,yCAAyC;IACzC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,yBAAyB,GAChC,OAAO,CAAC,yBAAyB,CAAC,CAkFpC;AAED;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CACxC,aAAa,EAAE,MAAM,EACrB,eAAe,EAAE,MAAM,GACtB,MAAM,CAuCR;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAoBpE"}
@@ -6,7 +6,7 @@ import { Hex } from 'viem';
6
6
  * 1. Double SHA256 the transaction bytes
7
7
  * 2. Reverse the byte order (Bitcoin convention)
8
8
  *
9
- * The resulting hash is used as the unique vault identifier in the BTCVaultsManager contract.
9
+ * The resulting hash is used as the unique vault identifier in the BTCVaultRegistry contract.
10
10
  *
11
11
  * @param txHex - Transaction hex (with or without 0x prefix)
12
12
  * @returns The transaction hash as Hex (with 0x prefix)
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../challengeAssert-ClJYoKxJ.cjs"),r=require("@babylonlabs-io/babylon-tbv-rust-wasm"),t=require("../PayoutManager-Shw7TY5P.cjs");exports.BTC_DUST_SAT=e.BTC_DUST_SAT;exports.DUST_THRESHOLD=e.DUST_THRESHOLD;exports.FEE_SAFETY_MARGIN=e.FEE_SAFETY_MARGIN;exports.LOW_RATE_ESTIMATION_ACCURACY_BUFFER=e.LOW_RATE_ESTIMATION_ACCURACY_BUFFER;exports.MAX_NON_LEGACY_OUTPUT_SIZE=e.MAX_NON_LEGACY_OUTPUT_SIZE;exports.P2TR_INPUT_SIZE=e.P2TR_INPUT_SIZE;exports.SPLIT_TX_FEE_SAFETY_MULTIPLIER=e.SPLIT_TX_FEE_SAFETY_MULTIPLIER;exports.TX_BUFFER_SIZE_OVERHEAD=e.TX_BUFFER_SIZE_OVERHEAD;exports.WALLET_RELAY_FEE_RATE_THRESHOLD=e.WALLET_RELAY_FEE_RATE_THRESHOLD;exports.buildChallengeAssertPsbt=e.buildChallengeAssertPsbt;exports.buildDepositorPayoutPsbt=e.buildDepositorPayoutPsbt;exports.buildNoPayoutPsbt=e.buildNoPayoutPsbt;exports.buildPayoutPsbt=e.buildPayoutPsbt;exports.buildPeginInputPsbt=e.buildPeginInputPsbt;exports.buildPeginTxFromFundedPrePegin=e.buildPeginTxFromFundedPrePegin;exports.buildPrePeginPsbt=e.buildPrePeginPsbt;exports.computeNumLocalChallengers=e.computeNumLocalChallengers;exports.createPayoutScript=e.createPayoutScript;exports.deriveNativeSegwitAddress=e.deriveNativeSegwitAddress;exports.deriveTaprootAddress=e.deriveTaprootAddress;exports.ensureHexPrefix=e.ensureHexPrefix;exports.extractPayoutSignature=e.extractPayoutSignature;exports.extractPeginInputSignature=e.extractPeginInputSignature;exports.fundPeginTransaction=e.fundPeginTransaction;exports.getNetwork=e.getNetwork;exports.hexToUint8Array=e.hexToUint8Array;exports.isAddressFromPublicKey=e.isAddressFromPublicKey;exports.isValidHex=e.isValidHex;exports.parseUnfundedWasmTransaction=e.parseUnfundedWasmTransaction;exports.processPublicKeyToXOnly=e.processPublicKeyToXOnly;exports.rateBasedTxBufferFee=e.rateBasedTxBufferFee;exports.stripHexPrefix=e.stripHexPrefix;exports.toXOnly=e.toXOnly;exports.uint8ArrayToHex=e.uint8ArrayToHex;exports.validateWalletPubkey=e.validateWalletPubkey;Object.defineProperty(exports,"computeMinClaimValue",{enumerable:!0,get:()=>r.computeMinClaimValue});exports.BTCVaultsManagerABI=t.BTCVaultsManagerABI;exports.BitcoinScriptType=t.BitcoinScriptType;exports.CONTRACT_ERRORS=t.CONTRACT_ERRORS;exports.MEMPOOL_API_URLS=t.MEMPOOL_API_URLS;exports.PayoutManager=t.PayoutManager;exports.PeginManager=t.PeginManager;exports.calculateBtcTxHash=t.calculateBtcTxHash;exports.createSplitTransaction=t.createSplitTransaction;exports.createSplitTransactionPsbt=t.createSplitTransactionPsbt;exports.extractErrorData=t.extractErrorData;exports.getAddressTxs=t.getAddressTxs;exports.getAddressUtxos=t.getAddressUtxos;exports.getContractErrorMessage=t.getContractErrorMessage;exports.getDustThreshold=t.getDustThreshold;exports.getMempoolApiUrl=t.getMempoolApiUrl;exports.getNetworkFees=t.getNetworkFees;exports.getPsbtInputFields=t.getPsbtInputFields;exports.getScriptType=t.getScriptType;exports.getTxHex=t.getTxHex;exports.getTxInfo=t.getTxInfo;exports.getUtxoInfo=t.getUtxoInfo;exports.handleContractError=t.handleContractError;exports.isKnownContractError=t.isKnownContractError;exports.pushTx=t.pushTx;exports.selectUtxosForPegin=t.selectUtxosForPegin;exports.shouldAddChangeOutput=t.shouldAddChangeOutput;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../challengeAssert-DDceAi0r.cjs"),r=require("@babylonlabs-io/babylon-tbv-rust-wasm"),t=require("../PayoutManager-Ba6cNgHC.cjs");exports.BTC_DUST_SAT=e.BTC_DUST_SAT;exports.DUST_THRESHOLD=e.DUST_THRESHOLD;exports.FEE_SAFETY_MARGIN=e.FEE_SAFETY_MARGIN;exports.LOW_RATE_ESTIMATION_ACCURACY_BUFFER=e.LOW_RATE_ESTIMATION_ACCURACY_BUFFER;exports.MAX_NON_LEGACY_OUTPUT_SIZE=e.MAX_NON_LEGACY_OUTPUT_SIZE;exports.P2TR_INPUT_SIZE=e.P2TR_INPUT_SIZE;exports.SPLIT_TX_FEE_SAFETY_MULTIPLIER=e.SPLIT_TX_FEE_SAFETY_MULTIPLIER;exports.TX_BUFFER_SIZE_OVERHEAD=e.TX_BUFFER_SIZE_OVERHEAD;exports.WALLET_RELAY_FEE_RATE_THRESHOLD=e.WALLET_RELAY_FEE_RATE_THRESHOLD;exports.buildChallengeAssertPsbt=e.buildChallengeAssertPsbt;exports.buildDepositorPayoutPsbt=e.buildDepositorPayoutPsbt;exports.buildNoPayoutPsbt=e.buildNoPayoutPsbt;exports.buildPayoutPsbt=e.buildPayoutPsbt;exports.buildPeginInputPsbt=e.buildPeginInputPsbt;exports.buildPeginTxFromFundedPrePegin=e.buildPeginTxFromFundedPrePegin;exports.buildPrePeginPsbt=e.buildPrePeginPsbt;exports.computeNumLocalChallengers=e.computeNumLocalChallengers;exports.createPayoutScript=e.createPayoutScript;exports.deriveNativeSegwitAddress=e.deriveNativeSegwitAddress;exports.deriveTaprootAddress=e.deriveTaprootAddress;exports.ensureHexPrefix=e.ensureHexPrefix;exports.extractPayoutSignature=e.extractPayoutSignature;exports.extractPeginInputSignature=e.extractPeginInputSignature;exports.finalizePeginInputPsbt=e.finalizePeginInputPsbt;exports.fundPeginTransaction=e.fundPeginTransaction;exports.getNetwork=e.getNetwork;exports.hexToUint8Array=e.hexToUint8Array;exports.isAddressFromPublicKey=e.isAddressFromPublicKey;exports.isValidHex=e.isValidHex;exports.parseUnfundedWasmTransaction=e.parseUnfundedWasmTransaction;exports.processPublicKeyToXOnly=e.processPublicKeyToXOnly;exports.rateBasedTxBufferFee=e.rateBasedTxBufferFee;exports.stripHexPrefix=e.stripHexPrefix;exports.toXOnly=e.toXOnly;exports.uint8ArrayToHex=e.uint8ArrayToHex;exports.validateWalletPubkey=e.validateWalletPubkey;Object.defineProperty(exports,"SINGLE_DEPOSIT_HTLC_VOUT",{enumerable:!0,get:()=>r.SINGLE_DEPOSIT_HTLC_VOUT});Object.defineProperty(exports,"computeMinClaimValue",{enumerable:!0,get:()=>r.computeMinClaimValue});exports.BTCVaultRegistryABI=t.BTCVaultRegistryABI;exports.BitcoinScriptType=t.BitcoinScriptType;exports.CONTRACT_ERRORS=t.CONTRACT_ERRORS;exports.MEMPOOL_API_URLS=t.MEMPOOL_API_URLS;exports.PayoutManager=t.PayoutManager;exports.PeginManager=t.PeginManager;exports.calculateBtcTxHash=t.calculateBtcTxHash;exports.createSplitTransaction=t.createSplitTransaction;exports.createSplitTransactionPsbt=t.createSplitTransactionPsbt;exports.extractErrorData=t.extractErrorData;exports.getAddressTxs=t.getAddressTxs;exports.getAddressUtxos=t.getAddressUtxos;exports.getContractErrorMessage=t.getContractErrorMessage;exports.getDustThreshold=t.getDustThreshold;exports.getMempoolApiUrl=t.getMempoolApiUrl;exports.getNetworkFees=t.getNetworkFees;exports.getPsbtInputFields=t.getPsbtInputFields;exports.getScriptType=t.getScriptType;exports.getTxHex=t.getTxHex;exports.getTxInfo=t.getTxInfo;exports.getUtxoInfo=t.getUtxoInfo;exports.handleContractError=t.handleContractError;exports.isKnownContractError=t.isKnownContractError;exports.pushTx=t.pushTx;exports.selectUtxosForPegin=t.selectUtxosForPegin;exports.shouldAddChangeOutput=t.shouldAddChangeOutput;
2
2
  //# sourceMappingURL=index.cjs.map