@babylonlabs-io/ts-sdk 0.19.0 → 0.20.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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-D9EtjJoD.cjs +2 -0
  15. package/dist/errors-D9EtjJoD.cjs.map +1 -0
  16. package/dist/{errors-aMocmFr-.js → errors-D_PI__IT.js} +98 -97
  17. package/dist/errors-D_PI__IT.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-05ZrwRzf.cjs +2 -0
  33. package/dist/psbtInputFields-05ZrwRzf.cjs.map +1 -0
  34. package/dist/psbtInputFields-r1ss6WLU.js +237 -0
  35. package/dist/psbtInputFields-r1ss6WLU.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 +91 -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
@@ -0,0 +1,62 @@
1
+ import { UtxoRef } from './reservation';
2
+ /**
3
+ * Information about a missing/spent UTXO.
4
+ */
5
+ export interface MissingUtxoInfo {
6
+ /** Transaction ID of the missing UTXO */
7
+ txid: string;
8
+ /** Output index of the missing UTXO */
9
+ vout: number;
10
+ }
11
+ /**
12
+ * Result of UTXO validation.
13
+ */
14
+ export interface UtxoValidationResult {
15
+ /** Whether all UTXOs are still available */
16
+ allAvailable: boolean;
17
+ /** List of missing UTXOs (if any) */
18
+ missingUtxos: MissingUtxoInfo[];
19
+ /** Total number of inputs checked */
20
+ totalInputs: number;
21
+ }
22
+ /**
23
+ * Error thrown when UTXOs are not available.
24
+ */
25
+ export declare class UtxoNotAvailableError extends Error {
26
+ readonly missingUtxos: MissingUtxoInfo[];
27
+ constructor(missingUtxos: MissingUtxoInfo[]);
28
+ }
29
+ /**
30
+ * Extract input references (txid:vout) from an unsigned transaction.
31
+ *
32
+ * @param unsignedTxHex - Unsigned transaction hex
33
+ * @returns Array of input references
34
+ */
35
+ export declare function extractInputsFromTransaction(unsignedTxHex: string): Array<{
36
+ txid: string;
37
+ vout: number;
38
+ }>;
39
+ /**
40
+ * Validate that all UTXOs in a transaction are still available.
41
+ *
42
+ * Pure function — accepts pre-fetched UTXOs instead of making network calls.
43
+ * This should be called BEFORE signing to avoid wasting user effort
44
+ * signing a transaction that will fail to broadcast.
45
+ *
46
+ * @param unsignedTxHex - Unsigned transaction hex
47
+ * @param availableUtxos - Pre-fetched list of available UTXOs for the depositor
48
+ * @returns Validation result with missing UTXO details
49
+ */
50
+ export declare function validateUtxosAvailable(unsignedTxHex: string, availableUtxos: UtxoRef[]): UtxoValidationResult;
51
+ /**
52
+ * Validate UTXOs and throw if any are not available.
53
+ *
54
+ * Pure convenience function that combines validation and error throwing.
55
+ *
56
+ * @param unsignedTxHex - Unsigned transaction hex
57
+ * @param availableUtxos - Pre-fetched list of available UTXOs for the depositor
58
+ * @throws UtxoNotAvailableError if any UTXOs are not available
59
+ * @throws Error if validation fails
60
+ */
61
+ export declare function assertUtxosAvailable(unsignedTxHex: string, availableUtxos: UtxoRef[]): void;
62
+ //# sourceMappingURL=availability.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"availability.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/utils/utxo/availability.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,4CAA4C;IAC5C,YAAY,EAAE,OAAO,CAAC;IACtB,qCAAqC;IACrC,YAAY,EAAE,eAAe,EAAE,CAAC;IAChC,qCAAqC;IACrC,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,KAAK;IAC9C,SAAgB,YAAY,EAAE,eAAe,EAAE,CAAC;gBAEpC,YAAY,EAAE,eAAe,EAAE;CAW5C;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAC1C,aAAa,EAAE,MAAM,GACpB,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAmBvC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CACpC,aAAa,EAAE,MAAM,EACrB,cAAc,EAAE,OAAO,EAAE,GACxB,oBAAoB,CA6BtB;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAClC,aAAa,EAAE,MAAM,EACrB,cAAc,EAAE,OAAO,EAAE,GACxB,IAAI,CAMN"}
@@ -3,5 +3,7 @@
3
3
  *
4
4
  * @module utils/utxo
5
5
  */
6
+ export * from './availability';
7
+ export * from './reservation';
6
8
  export * from './selectUtxos';
7
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/utils/utxo/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/utils/utxo/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC"}
@@ -0,0 +1,91 @@
1
+ /**
2
+ * UTXO reservation utilities for vault deposits.
3
+ *
4
+ * Handles tracking which UTXOs are already in use by pending deposits
5
+ * and selecting available UTXOs with smart fallback logic.
6
+ */
7
+ /** A txid:vout pair uniquely identifying a UTXO (outpoint). */
8
+ export interface UtxoRef {
9
+ txid: string;
10
+ vout: number;
11
+ }
12
+ /** Narrow structural type for pending pegin data. */
13
+ export interface PendingPeginLike {
14
+ /**
15
+ * Optional vault id. When present, used to skip pending pegins that are
16
+ * already indexed on-chain so the canonical vault copy wins over a
17
+ * tamperable off-chain entry.
18
+ */
19
+ id?: string;
20
+ selectedUTXOs?: Array<{
21
+ txid: string;
22
+ vout: number;
23
+ }>;
24
+ unsignedTxHex?: string;
25
+ }
26
+ /** Narrow structural type for vault data. */
27
+ export interface VaultLike {
28
+ /**
29
+ * Optional vault id. When present, enables on-chain correlation with
30
+ * pending pegins sharing the same id.
31
+ */
32
+ id?: string;
33
+ status: number;
34
+ unsignedPrePeginTx: string;
35
+ }
36
+ export interface SelectUtxosForDepositParams<T extends {
37
+ txid: string;
38
+ vout: number;
39
+ value: number;
40
+ }> {
41
+ /** All available UTXOs from the wallet. */
42
+ availableUtxos: T[];
43
+ /** UTXOs that are reserved/in-flight and should be avoided if possible. */
44
+ reservedUtxoRefs: UtxoRef[];
45
+ /** Required deposit amount in satoshis (excluding fees). */
46
+ requiredAmount: bigint;
47
+ /** Fee rate in sat/vB. Used to estimate fee buffer for sufficiency check. */
48
+ feeRate: number;
49
+ }
50
+ export interface CollectReservedUtxoRefsParams {
51
+ vaults?: VaultLike[];
52
+ pendingPegins?: PendingPeginLike[];
53
+ }
54
+ /**
55
+ * Collect UTXO refs from in-flight deposits (PENDING/VERIFIED vaults and
56
+ * pending pegins).
57
+ *
58
+ * On-chain vault data is canonical: for any pending pegin whose `id` matches
59
+ * an indexed on-chain vault, the pending-pegin copy is ignored entirely —
60
+ * the `vaults` branch below extracts refs from the indexer-supplied
61
+ * `unsignedPrePeginTx` so tampered off-chain data cannot poison the
62
+ * reservation set once the vault is indexed.
63
+ *
64
+ * For pegins not yet indexed, refs are derived from the stored
65
+ * `unsignedTxHex` only. The `selectedUTXOs` sidecar is NOT used for
66
+ * reservation: if it disagreed with the transaction's inputs (e.g. because
67
+ * the off-chain source was tampered), trusting it would poison the reserved
68
+ * set. The transaction hex must be validated at the source boundary before
69
+ * being handed to this function; parsing and using its inputs is the single
70
+ * source of truth here.
71
+ */
72
+ export declare function collectReservedUtxoRefs(params: CollectReservedUtxoRefsParams): UtxoRef[];
73
+ /**
74
+ * Select UTXOs for a deposit, filtering out reserved ones.
75
+ *
76
+ * Logic:
77
+ * 1. Filter out reserved UTXOs from the available pool
78
+ * 2. If unreserved UTXOs are sufficient for the required amount + estimated fee, return them
79
+ * 3. Otherwise, throw — never silently reuse reserved UTXOs, as this risks double-spend
80
+ * failures that strand registered-but-unbroadcastable vaults
81
+ *
82
+ * @param params - Selection parameters
83
+ * @returns Array of unreserved UTXOs to use for the deposit
84
+ * @throws When all UTXOs are reserved or unreserved UTXOs are insufficient
85
+ */
86
+ export declare function selectUtxosForDeposit<T extends {
87
+ txid: string;
88
+ vout: number;
89
+ value: number;
90
+ }>(params: SelectUtxosForDepositParams<T>): T[];
91
+ //# sourceMappingURL=reservation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reservation.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/utils/utxo/reservation.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAkBH,+DAA+D;AAC/D,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,qDAAqD;AACrD,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,aAAa,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACtD,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,6CAA6C;AAC7C,MAAM,WAAW,SAAS;IACxB;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,2BAA2B,CAC1C,CAAC,SAAS;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE;IAEvD,2CAA2C;IAC3C,cAAc,EAAE,CAAC,EAAE,CAAC;IACpB,2EAA2E;IAC3E,gBAAgB,EAAE,OAAO,EAAE,CAAC;IAC5B,4DAA4D;IAC5D,cAAc,EAAE,MAAM,CAAC;IACvB,6EAA6E;IAC7E,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,6BAA6B;IAC5C,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC;IACrB,aAAa,CAAC,EAAE,gBAAgB,EAAE,CAAC;CACpC;AA2ED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,6BAA6B,GACpC,OAAO,EAAE,CA8BX;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CACnC,CAAC,SAAS;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EACvD,MAAM,EAAE,2BAA2B,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAuC7C"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../challengeAssert-D_k_ADgP.cjs"),u=require("@babylonlabs-io/babylon-tbv-rust-wasm"),n=require("../payout-CfsDnjKI.cjs"),e=require("../constants-EiyZkXce.cjs"),s=require("../psbtInputFields-C0nKn_GD.cjs"),l=require("../fundPeginTransaction-EbrZzlrh.cjs"),P=require("../signing-Deg5lCoC.cjs"),r=require("../errors-DVNYib5y.cjs"),a=require("../index-BgnxXV5G.cjs"),t=require("../index-DpKhuCta.cjs"),i=require("../types-DEWiqXYp.cjs");exports.buildChallengeAssertPsbt=o.buildChallengeAssertPsbt;exports.buildDepositorPayoutPsbt=o.buildDepositorPayoutPsbt;exports.buildNoPayoutPsbt=o.buildNoPayoutPsbt;exports.buildPeginInputPsbt=o.buildPeginInputPsbt;exports.buildPeginTxFromFundedPrePegin=o.buildPeginTxFromFundedPrePegin;exports.buildPrePeginPsbt=o.buildPrePeginPsbt;exports.buildRefundPsbt=o.buildRefundPsbt;exports.computeNumLocalChallengers=o.computeNumLocalChallengers;exports.extractPeginInputSignature=o.extractPeginInputSignature;exports.finalizePeginInputPsbt=o.finalizePeginInputPsbt;Object.defineProperty(exports,"computeMinClaimValue",{enumerable:!0,get:()=>u.computeMinClaimValue});Object.defineProperty(exports,"deriveVaultId",{enumerable:!0,get:()=>u.deriveVaultId});exports.buildPayoutPsbt=n.buildPayoutPsbt;exports.createPayoutScript=n.createPayoutScript;exports.extractPayoutSignature=n.extractPayoutSignature;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.PEGIN_FIXED_OUTPUTS=e.PEGIN_FIXED_OUTPUTS;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.deriveNativeSegwitAddress=e.deriveNativeSegwitAddress;exports.deriveTaprootAddress=e.deriveTaprootAddress;exports.ensureHexPrefix=e.ensureHexPrefix;exports.getNetwork=e.getNetwork;exports.hexToUint8Array=e.hexToUint8Array;exports.isAddressFromPublicKey=e.isAddressFromPublicKey;exports.isValidHex=e.isValidHex;exports.peginOutputCount=e.peginOutputCount;exports.processPublicKeyToXOnly=e.processPublicKeyToXOnly;exports.rateBasedTxBufferFee=e.rateBasedTxBufferFee;exports.stripHexPrefix=e.stripHexPrefix;exports.toXOnly=e.toXOnly;exports.uint8ArrayToHex=e.uint8ArrayToHex;exports.validateWalletPubkey=e.validateWalletPubkey;exports.BitcoinScriptType=s.BitcoinScriptType;exports.calculateBtcTxHash=s.calculateBtcTxHash;exports.getDustThreshold=s.getDustThreshold;exports.getPsbtInputFields=s.getPsbtInputFields;exports.getScriptType=s.getScriptType;exports.selectUtxosForPegin=s.selectUtxosForPegin;exports.shouldAddChangeOutput=s.shouldAddChangeOutput;exports.fundPeginTransaction=l.fundPeginTransaction;exports.parseUnfundedWasmTransaction=l.parseUnfundedWasmTransaction;exports.createTaprootScriptPathSignOptions=P.createTaprootScriptPathSignOptions;exports.CONTRACT_ERRORS=r.CONTRACT_ERRORS;exports.PeginManager=r.PeginManager;exports.computeWotsBlockPublicKeysHash=r.computeWotsBlockPublicKeysHash;exports.computeWotsPkHash=r.computeWotsPkHash;exports.deriveWotsBlockPublicKeys=r.deriveWotsBlockPublicKeys;exports.deriveWotsKeypair=r.deriveWotsKeypair;exports.deriveWotsPkHash=r.deriveWotsPkHash;exports.extractErrorData=r.extractErrorData;exports.getContractErrorMessage=r.getContractErrorMessage;exports.handleContractError=r.handleContractError;exports.isKnownContractError=r.isKnownContractError;exports.isWotsMismatchError=r.isWotsMismatchError;exports.keypairToPublicKey=r.keypairToPublicKey;exports.mnemonicToWotsSeed=r.mnemonicToWotsSeed;exports.PayoutManager=a.PayoutManager;exports.computeHashlock=a.computeHashlock;exports.pollAndSignPayouts=a.pollAndSignPayouts;exports.signDepositorGraph=a.signDepositorGraph;exports.submitWotsPublicKey=a.submitWotsPublicKey;exports.validateSecretAgainstHashlock=a.validateSecretAgainstHashlock;exports.waitForPeginStatus=a.waitForPeginStatus;exports.ApplicationRegistryABI=t.ApplicationRegistryABI;exports.BTCVaultRegistryABI=t.BTCVaultRegistryABI;exports.MEMPOOL_API_URLS=t.MEMPOOL_API_URLS;exports.ProtocolParamsABI=t.ProtocolParamsABI;exports.VaultProviderRpcClient=t.VaultProviderRpcClient;exports.ViemProtocolParamsReader=t.ViemProtocolParamsReader;exports.ViemUniversalChallengerReader=t.ViemUniversalChallengerReader;exports.ViemVaultKeeperReader=t.ViemVaultKeeperReader;exports.ViemVaultRegistryReader=t.ViemVaultRegistryReader;exports.VpResponseValidationError=t.VpResponseValidationError;exports.getAddressTxs=t.getAddressTxs;exports.getAddressUtxos=t.getAddressUtxos;exports.getMempoolApiUrl=t.getMempoolApiUrl;exports.getNetworkFees=t.getNetworkFees;exports.getTxHex=t.getTxHex;exports.getTxInfo=t.getTxInfo;exports.getUtxoInfo=t.getUtxoInfo;exports.pushTx=t.pushTx;exports.resolveProtocolAddresses=t.resolveProtocolAddresses;exports.DaemonStatus=i.DaemonStatus;exports.JSON_RPC_ERROR_CODES=i.JSON_RPC_ERROR_CODES;exports.JsonRpcClient=i.JsonRpcClient;exports.JsonRpcError=i.JsonRpcError;exports.POST_WOTS_STATUSES=i.POST_WOTS_STATUSES;exports.PRE_DEPOSITOR_SIGNATURES_STATES=i.PRE_DEPOSITOR_SIGNATURES_STATES;exports.RpcErrorCode=i.RpcErrorCode;exports.VP_TERMINAL_STATUSES=i.VP_TERMINAL_STATUSES;exports.VP_TRANSIENT_STATUSES=i.VP_TRANSIENT_STATUSES;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../challengeAssert-nYlgeAI8.cjs"),P=require("@babylonlabs-io/babylon-tbv-rust-wasm"),u=require("../payout-RFIh7GLN.cjs"),a=require("../bitcoin-CNnPFU6Y.cjs"),l=require("../signing-cl-lowxV.cjs"),e=require("../buildAndBroadcastRefund-DWEQvj9T.cjs"),r=require("../fundPeginTransaction-DxNOeyNI.cjs"),i=require("../psbtInputFields-05ZrwRzf.cjs"),o=require("../errors-D9EtjJoD.cjs"),t=require("../index-BpXpESWu.cjs"),s=require("../types-B-p4dhEH.cjs");exports.buildChallengeAssertPsbt=n.buildChallengeAssertPsbt;exports.buildDepositorPayoutPsbt=n.buildDepositorPayoutPsbt;exports.buildNoPayoutPsbt=n.buildNoPayoutPsbt;exports.buildPeginInputPsbt=n.buildPeginInputPsbt;exports.buildPeginTxFromFundedPrePegin=n.buildPeginTxFromFundedPrePegin;exports.buildPrePeginPsbt=n.buildPrePeginPsbt;exports.computeNumLocalChallengers=n.computeNumLocalChallengers;exports.extractPeginInputSignature=n.extractPeginInputSignature;exports.finalizePeginInputPsbt=n.finalizePeginInputPsbt;Object.defineProperty(exports,"computeMinClaimValue",{enumerable:!0,get:()=>P.computeMinClaimValue});Object.defineProperty(exports,"deriveVaultId",{enumerable:!0,get:()=>P.deriveVaultId});exports.buildPayoutPsbt=u.buildPayoutPsbt;exports.buildRefundPsbt=u.buildRefundPsbt;exports.createPayoutScript=u.createPayoutScript;exports.extractPayoutSignature=u.extractPayoutSignature;exports.deriveNativeSegwitAddress=a.deriveNativeSegwitAddress;exports.deriveTaprootAddress=a.deriveTaprootAddress;exports.ensureHexPrefix=a.ensureHexPrefix;exports.formatSatoshisToBtc=a.formatSatoshisToBtc;exports.getNetwork=a.getNetwork;exports.hexToUint8Array=a.hexToUint8Array;exports.isAddressFromPublicKey=a.isAddressFromPublicKey;exports.isValidHex=a.isValidHex;exports.processPublicKeyToXOnly=a.processPublicKeyToXOnly;exports.stripHexPrefix=a.stripHexPrefix;exports.toXOnly=a.toXOnly;exports.uint8ArrayToHex=a.uint8ArrayToHex;exports.validateWalletPubkey=a.validateWalletPubkey;exports.ContractStatus=l.ContractStatus;exports.PeginAction=l.PeginAction;exports.canPerformAction=l.canPerformAction;exports.createTaprootScriptPathSignOptions=l.createTaprootScriptPathSignOptions;exports.getPeginProtocolState=l.getPeginProtocolState;exports.BIP68NotMatureError=e.BIP68NotMatureError;exports.ClaimerPegoutStatusValue=e.ClaimerPegoutStatusValue;exports.PayoutManager=e.PayoutManager;exports.activateVault=e.activateVault;exports.buildAndBroadcastRefund=e.buildAndBroadcastRefund;exports.computeHashlock=e.computeHashlock;exports.isDepositAmountValid=e.isDepositAmountValid;exports.isPegoutTerminalStatus=e.isPegoutTerminalStatus;exports.isRecognizedPegoutStatus=e.isRecognizedPegoutStatus;exports.pollAndSignPayouts=e.pollAndSignPayouts;exports.signDepositorGraph=e.signDepositorGraph;exports.submitWotsPublicKey=e.submitWotsPublicKey;exports.validateDepositAmount=e.validateDepositAmount;exports.validateMultiVaultDepositInputs=e.validateMultiVaultDepositInputs;exports.validateProviderSelection=e.validateProviderSelection;exports.validateRemainingCapacity=e.validateRemainingCapacity;exports.validateSecretAgainstHashlock=e.validateSecretAgainstHashlock;exports.validateVaultAmounts=e.validateVaultAmounts;exports.validateVaultProviderPubkey=e.validateVaultProviderPubkey;exports.waitForPeginStatus=e.waitForPeginStatus;exports.BTC_DUST_SAT=r.BTC_DUST_SAT;exports.DUST_THRESHOLD=r.DUST_THRESHOLD;exports.FEE_SAFETY_MARGIN=r.FEE_SAFETY_MARGIN;exports.LOW_RATE_ESTIMATION_ACCURACY_BUFFER=r.LOW_RATE_ESTIMATION_ACCURACY_BUFFER;exports.MAX_NON_LEGACY_OUTPUT_SIZE=r.MAX_NON_LEGACY_OUTPUT_SIZE;exports.P2TR_INPUT_SIZE=r.P2TR_INPUT_SIZE;exports.PEGIN_FIXED_OUTPUTS=r.PEGIN_FIXED_OUTPUTS;exports.SPLIT_TX_FEE_SAFETY_MULTIPLIER=r.SPLIT_TX_FEE_SAFETY_MULTIPLIER;exports.TX_BUFFER_SIZE_OVERHEAD=r.TX_BUFFER_SIZE_OVERHEAD;exports.WALLET_RELAY_FEE_RATE_THRESHOLD=r.WALLET_RELAY_FEE_RATE_THRESHOLD;exports.fundPeginTransaction=r.fundPeginTransaction;exports.parseUnfundedWasmTransaction=r.parseUnfundedWasmTransaction;exports.peginOutputCount=r.peginOutputCount;exports.rateBasedTxBufferFee=r.rateBasedTxBufferFee;exports.BitcoinScriptType=i.BitcoinScriptType;exports.UtxoNotAvailableError=i.UtxoNotAvailableError;exports.assertUtxosAvailable=i.assertUtxosAvailable;exports.calculateBtcTxHash=i.calculateBtcTxHash;exports.collectReservedUtxoRefs=i.collectReservedUtxoRefs;exports.extractInputsFromTransaction=i.extractInputsFromTransaction;exports.getDustThreshold=i.getDustThreshold;exports.getPsbtInputFields=i.getPsbtInputFields;exports.getScriptType=i.getScriptType;exports.selectUtxosForDeposit=i.selectUtxosForDeposit;exports.selectUtxosForPegin=i.selectUtxosForPegin;exports.shouldAddChangeOutput=i.shouldAddChangeOutput;exports.validateUtxosAvailable=i.validateUtxosAvailable;exports.CONTRACT_ERRORS=o.CONTRACT_ERRORS;exports.PeginManager=o.PeginManager;exports.computeWotsBlockPublicKeysHash=o.computeWotsBlockPublicKeysHash;exports.computeWotsPkHash=o.computeWotsPkHash;exports.deriveWotsBlockPublicKeys=o.deriveWotsBlockPublicKeys;exports.deriveWotsKeypair=o.deriveWotsKeypair;exports.deriveWotsPkHash=o.deriveWotsPkHash;exports.extractErrorData=o.extractErrorData;exports.getContractErrorMessage=o.getContractErrorMessage;exports.handleContractError=o.handleContractError;exports.isKnownContractError=o.isKnownContractError;exports.isWotsMismatchError=o.isWotsMismatchError;exports.keypairToPublicKey=o.keypairToPublicKey;exports.mnemonicToWotsSeed=o.mnemonicToWotsSeed;exports.ApplicationRegistryABI=t.ApplicationRegistryABI;exports.MEMPOOL_API_URLS=t.MEMPOOL_API_URLS;exports.ProtocolParamsABI=t.ProtocolParamsABI;exports.VaultProviderRpcClient=t.VaultProviderRpcClient;exports.ViemProtocolParamsReader=t.ViemProtocolParamsReader;exports.ViemUniversalChallengerReader=t.ViemUniversalChallengerReader;exports.ViemVaultKeeperReader=t.ViemVaultKeeperReader;exports.ViemVaultRegistryReader=t.ViemVaultRegistryReader;exports.VpResponseValidationError=t.VpResponseValidationError;exports.getAddressTxs=t.getAddressTxs;exports.getAddressUtxos=t.getAddressUtxos;exports.getMempoolApiUrl=t.getMempoolApiUrl;exports.getNetworkFees=t.getNetworkFees;exports.getTxHex=t.getTxHex;exports.getTxInfo=t.getTxInfo;exports.getUtxoInfo=t.getUtxoInfo;exports.pushTx=t.pushTx;exports.resolveProtocolAddresses=t.resolveProtocolAddresses;exports.BTCVaultRegistryABI=s.BTCVaultRegistryABI;exports.DaemonStatus=s.DaemonStatus;exports.JSON_RPC_ERROR_CODES=s.JSON_RPC_ERROR_CODES;exports.JsonRpcClient=s.JsonRpcClient;exports.JsonRpcError=s.JsonRpcError;exports.POST_WOTS_STATUSES=s.POST_WOTS_STATUSES;exports.PRE_DEPOSITOR_SIGNATURES_STATES=s.PRE_DEPOSITOR_SIGNATURES_STATES;exports.RpcErrorCode=s.RpcErrorCode;exports.VP_TERMINAL_STATUSES=s.VP_TERMINAL_STATUSES;exports.VP_TRANSIENT_STATUSES=s.VP_TRANSIENT_STATUSES;
2
2
  //# sourceMappingURL=index.cjs.map
package/dist/tbv/index.js CHANGED
@@ -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-r1ss6WLU.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-D_PI__IT.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