@babylonlabs-io/ts-sdk 0.55.2 → 0.56.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 (155) hide show
  1. package/README.md +1 -2
  2. package/dist/{PayoutManager-BJmPnyRP.js → PayoutManager-BVgmuKuK.js} +117 -105
  3. package/dist/PayoutManager-BVgmuKuK.js.map +1 -0
  4. package/dist/PayoutManager-Cu4_l-_Y.cjs +2 -0
  5. package/dist/PayoutManager-Cu4_l-_Y.cjs.map +1 -0
  6. package/dist/{PeginManager-CW03-M3T.js → PeginManager-Ba7Cr51Z.js} +520 -460
  7. package/dist/PeginManager-Ba7Cr51Z.js.map +1 -0
  8. package/dist/PeginManager-CcjGRo4O.cjs +2 -0
  9. package/dist/PeginManager-CcjGRo4O.cjs.map +1 -0
  10. package/dist/{buildAndBroadcastRefund-BiSO4zg2.js → buildAndBroadcastRefund-BtXUqBkb.js} +444 -430
  11. package/dist/buildAndBroadcastRefund-BtXUqBkb.js.map +1 -0
  12. package/dist/buildAndBroadcastRefund-Cq01wyZX.cjs +2 -0
  13. package/dist/buildAndBroadcastRefund-Cq01wyZX.cjs.map +1 -0
  14. package/dist/challengeAssert-BVQq50su.js +75 -0
  15. package/dist/challengeAssert-BVQq50su.js.map +1 -0
  16. package/dist/challengeAssert-Cu-PtJ1g.cjs +2 -0
  17. package/dist/challengeAssert-Cu-PtJ1g.cjs.map +1 -0
  18. package/dist/constants-BqU1Uz15.cjs +2 -0
  19. package/dist/{constants-CvbARMl-.cjs.map → constants-BqU1Uz15.cjs.map} +1 -1
  20. package/dist/{constants-BhclpREj.js → constants-CDQE812z.js} +8 -6
  21. package/dist/{constants-BhclpREj.js.map → constants-CDQE812z.js.map} +1 -1
  22. package/dist/index.cjs +1 -1
  23. package/dist/index.js +195 -192
  24. package/dist/{mempoolApi-DqJByvqR.cjs → mempoolApi-DkyKmmgI.cjs} +2 -2
  25. package/dist/mempoolApi-DkyKmmgI.cjs.map +1 -0
  26. package/dist/{mempoolApi-CB7bHuwi.js → mempoolApi-lpJdvPkK.js} +66 -66
  27. package/dist/mempoolApi-lpJdvPkK.js.map +1 -0
  28. package/dist/{noPayout-CNMqNNpc.cjs → noPayout-Cb8vFrkY.cjs} +2 -2
  29. package/dist/{noPayout-CNMqNNpc.cjs.map → noPayout-Cb8vFrkY.cjs.map} +1 -1
  30. package/dist/{noPayout-CfBg3HzC.js → noPayout-CihCk1HE.js} +2 -2
  31. package/dist/{noPayout-CfBg3HzC.js.map → noPayout-CihCk1HE.js.map} +1 -1
  32. package/dist/{primeVpAuth-l-5x_2UV.js → primeVpAuth-Caa5J_uv.js} +4 -4
  33. package/dist/{primeVpAuth-l-5x_2UV.js.map → primeVpAuth-Caa5J_uv.js.map} +1 -1
  34. package/dist/{primeVpAuth-CF4cH5_e.cjs → primeVpAuth-y-4A88ah.cjs} +2 -2
  35. package/dist/{primeVpAuth-CF4cH5_e.cjs.map → primeVpAuth-y-4A88ah.cjs.map} +1 -1
  36. package/dist/tbv/core/clients/index.cjs +1 -1
  37. package/dist/tbv/core/clients/index.js +2 -2
  38. package/dist/tbv/core/clients/mempool/mempoolApi.d.ts.map +1 -1
  39. package/dist/tbv/core/deposit-terms/__tests__/buildDepositTerms.test.d.ts +2 -0
  40. package/dist/tbv/core/deposit-terms/__tests__/buildDepositTerms.test.d.ts.map +1 -0
  41. package/dist/tbv/core/deposit-terms/buildDepositTerms.d.ts +8 -0
  42. package/dist/tbv/core/deposit-terms/buildDepositTerms.d.ts.map +1 -0
  43. package/dist/tbv/core/deposit-terms/depositTerms.d.ts +92 -0
  44. package/dist/tbv/core/deposit-terms/depositTerms.d.ts.map +1 -0
  45. package/dist/tbv/core/deposit-terms/index.d.ts +12 -0
  46. package/dist/tbv/core/deposit-terms/index.d.ts.map +1 -0
  47. package/dist/tbv/core/index.cjs +1 -1
  48. package/dist/tbv/core/index.d.ts +1 -0
  49. package/dist/tbv/core/index.d.ts.map +1 -1
  50. package/dist/tbv/core/index.js +194 -191
  51. package/dist/tbv/core/managers/PayoutManager.d.ts +7 -0
  52. package/dist/tbv/core/managers/PayoutManager.d.ts.map +1 -1
  53. package/dist/tbv/core/managers/PeginManager.d.ts +13 -0
  54. package/dist/tbv/core/managers/PeginManager.d.ts.map +1 -1
  55. package/dist/tbv/core/managers/index.cjs +1 -1
  56. package/dist/tbv/core/managers/index.js +2 -2
  57. package/dist/tbv/core/primitives/index.cjs +1 -1
  58. package/dist/tbv/core/primitives/index.d.ts +0 -3
  59. package/dist/tbv/core/primitives/index.d.ts.map +1 -1
  60. package/dist/tbv/core/primitives/index.js +37 -38
  61. package/dist/tbv/core/primitives/psbt/__tests__/assertPayoutFeeBand.test.d.ts +7 -0
  62. package/dist/tbv/core/primitives/psbt/__tests__/assertPayoutFeeBand.test.d.ts.map +1 -0
  63. package/dist/tbv/core/primitives/psbt/assertPayoutFeeBand.d.ts +63 -0
  64. package/dist/tbv/core/primitives/psbt/assertPayoutFeeBand.d.ts.map +1 -0
  65. package/dist/tbv/core/primitives/psbt/assertWasmPeginSizing.d.ts +4 -1
  66. package/dist/tbv/core/primitives/psbt/assertWasmPeginSizing.d.ts.map +1 -1
  67. package/dist/tbv/core/primitives/psbt/constants.d.ts +18 -4
  68. package/dist/tbv/core/primitives/psbt/constants.d.ts.map +1 -1
  69. package/dist/tbv/core/primitives/psbt/payout.d.ts +21 -2
  70. package/dist/tbv/core/primitives/psbt/payout.d.ts.map +1 -1
  71. package/dist/tbv/core/primitives/psbt/pegin.d.ts +6 -0
  72. package/dist/tbv/core/primitives/psbt/pegin.d.ts.map +1 -1
  73. package/dist/tbv/core/services/deposit/runDepositorPresignFlow.d.ts +12 -0
  74. package/dist/tbv/core/services/deposit/runDepositorPresignFlow.d.ts.map +1 -1
  75. package/dist/tbv/core/services/deposit/signDepositorGraph.d.ts +5 -0
  76. package/dist/tbv/core/services/deposit/signDepositorGraph.d.ts.map +1 -1
  77. package/dist/tbv/core/services/index.cjs +1 -1
  78. package/dist/tbv/core/services/index.js +2 -2
  79. package/dist/tbv/core/utils/__tests__/abortSignals.test.d.ts +11 -0
  80. package/dist/tbv/core/utils/__tests__/abortSignals.test.d.ts.map +1 -0
  81. package/dist/tbv/core/utils/abortSignals.d.ts +23 -0
  82. package/dist/tbv/core/utils/abortSignals.d.ts.map +1 -0
  83. package/dist/tbv/core/utils/index.cjs +1 -1
  84. package/dist/tbv/core/utils/index.d.ts +1 -0
  85. package/dist/tbv/core/utils/index.d.ts.map +1 -1
  86. package/dist/tbv/core/utils/index.js +44 -43
  87. package/dist/tbv/index.cjs +1 -1
  88. package/dist/tbv/index.js +194 -191
  89. package/dist/tbv/integrations/aave/clients/index.d.ts +1 -1
  90. package/dist/tbv/integrations/aave/clients/index.d.ts.map +1 -1
  91. package/dist/tbv/integrations/aave/clients/spoke.d.ts +0 -20
  92. package/dist/tbv/integrations/aave/clients/spoke.d.ts.map +1 -1
  93. package/dist/tbv/integrations/aave/constants.d.ts +0 -22
  94. package/dist/tbv/integrations/aave/constants.d.ts.map +1 -1
  95. package/dist/tbv/integrations/aave/index.cjs +1 -1
  96. package/dist/tbv/integrations/aave/index.cjs.map +1 -1
  97. package/dist/tbv/integrations/aave/index.d.ts +5 -6
  98. package/dist/tbv/integrations/aave/index.d.ts.map +1 -1
  99. package/dist/tbv/integrations/aave/index.js +236 -339
  100. package/dist/tbv/integrations/aave/index.js.map +1 -1
  101. package/dist/tbv/integrations/aave/types.d.ts +0 -7
  102. package/dist/tbv/integrations/aave/types.d.ts.map +1 -1
  103. package/dist/tbv/integrations/aave/utils/healthFactor.d.ts +0 -7
  104. package/dist/tbv/integrations/aave/utils/healthFactor.d.ts.map +1 -1
  105. package/dist/tbv/integrations/aave/utils/index.d.ts +3 -8
  106. package/dist/tbv/integrations/aave/utils/index.d.ts.map +1 -1
  107. package/dist/tbv/integrations/aave/utils/vaultSplit.d.ts +0 -65
  108. package/dist/tbv/integrations/aave/utils/vaultSplit.d.ts.map +1 -1
  109. package/dist/validation-CDbOaDj7.cjs +2 -0
  110. package/dist/validation-CDbOaDj7.cjs.map +1 -0
  111. package/dist/validation-Dj3dqYtl.js +30 -0
  112. package/dist/validation-Dj3dqYtl.js.map +1 -0
  113. package/dist/verifyScriptPathSchnorrSignature-BZhX-SOd.cjs +2 -0
  114. package/dist/verifyScriptPathSchnorrSignature-BZhX-SOd.cjs.map +1 -0
  115. package/dist/verifyScriptPathSchnorrSignature-CgrnAjMW.js +724 -0
  116. package/dist/verifyScriptPathSchnorrSignature-CgrnAjMW.js.map +1 -0
  117. package/package.json +2 -2
  118. package/dist/PayoutManager-BJmPnyRP.js.map +0 -1
  119. package/dist/PayoutManager-aqtsj60t.cjs +0 -2
  120. package/dist/PayoutManager-aqtsj60t.cjs.map +0 -1
  121. package/dist/PeginManager-CW03-M3T.js.map +0 -1
  122. package/dist/PeginManager-C_akOB1E.cjs +0 -2
  123. package/dist/PeginManager-C_akOB1E.cjs.map +0 -1
  124. package/dist/buildAndBroadcastRefund-BiSO4zg2.js.map +0 -1
  125. package/dist/buildAndBroadcastRefund-Bwi1I5we.cjs +0 -2
  126. package/dist/buildAndBroadcastRefund-Bwi1I5we.cjs.map +0 -1
  127. package/dist/challengeAssert-DLQfNcfU.cjs +0 -2
  128. package/dist/challengeAssert-DLQfNcfU.cjs.map +0 -1
  129. package/dist/challengeAssert-DvdbpEDY.js +0 -128
  130. package/dist/challengeAssert-DvdbpEDY.js.map +0 -1
  131. package/dist/constants-CvbARMl-.cjs +0 -2
  132. package/dist/mempoolApi-CB7bHuwi.js.map +0 -1
  133. package/dist/mempoolApi-DqJByvqR.cjs.map +0 -1
  134. package/dist/tbv/core/primitives/psbt/depositorPayout.d.ts +0 -34
  135. package/dist/tbv/core/primitives/psbt/depositorPayout.d.ts.map +0 -1
  136. package/dist/tbv/integrations/aave/utils/__tests__/borrowRatio.test.d.ts +0 -5
  137. package/dist/tbv/integrations/aave/utils/__tests__/borrowRatio.test.d.ts.map +0 -1
  138. package/dist/tbv/integrations/aave/utils/__tests__/seizureSimulation.test.d.ts +0 -5
  139. package/dist/tbv/integrations/aave/utils/__tests__/seizureSimulation.test.d.ts.map +0 -1
  140. package/dist/tbv/integrations/aave/utils/__tests__/vaultSelection.test.d.ts +0 -2
  141. package/dist/tbv/integrations/aave/utils/__tests__/vaultSelection.test.d.ts.map +0 -1
  142. package/dist/tbv/integrations/aave/utils/borrowRatio.d.ts +0 -15
  143. package/dist/tbv/integrations/aave/utils/borrowRatio.d.ts.map +0 -1
  144. package/dist/tbv/integrations/aave/utils/seizureSimulation.d.ts +0 -109
  145. package/dist/tbv/integrations/aave/utils/seizureSimulation.d.ts.map +0 -1
  146. package/dist/tbv/integrations/aave/utils/vaultSelection.d.ts +0 -33
  147. package/dist/tbv/integrations/aave/utils/vaultSelection.d.ts.map +0 -1
  148. package/dist/validation-CxqROCno.js +0 -15
  149. package/dist/validation-CxqROCno.js.map +0 -1
  150. package/dist/validation-u8W7Lp2x.cjs +0 -2
  151. package/dist/validation-u8W7Lp2x.cjs.map +0 -1
  152. package/dist/verifyScriptPathSchnorrSignature-BDznSCOR.cjs +0 -2
  153. package/dist/verifyScriptPathSchnorrSignature-BDznSCOR.cjs.map +0 -1
  154. package/dist/verifyScriptPathSchnorrSignature-DA4Z4yZ3.js +0 -658
  155. package/dist/verifyScriptPathSchnorrSignature-DA4Z4yZ3.js.map +0 -1
@@ -1,47 +1,46 @@
1
- import { a as s, b as t, c as r } from "../../../challengeAssert-DvdbpEDY.js";
2
- import { a as o } from "../../../constants-BhclpREj.js";
3
- import { computeMinClaimValue as n, computeMinPeginFee as P, deriveVaultId as d, peginP2aAnchorOutput as b, supportedTxGraphVersions as l, validatePeginP2aAnchor as p } from "@babylonlabs-io/babylon-tbv-rust-wasm";
4
- import { P as x, d as g, f, c as m, b as y, a as h, g as S, e as v } from "../../../verifyScriptPathSchnorrSignature-DA4Z4yZ3.js";
5
- import { b as T, e as V, f as H } from "../../../peginInput-BKD_b3gq.js";
6
- import { a as F, b as I } from "../../../noPayout-CfBg3HzC.js";
7
- import { d as K, a as M, b as N, e as X, f as k, g as B, h as U, i as w, c as z, p as D, s as E, t as G, u as L, v as R } from "../../../bitcoin-B5aNKtsk.js";
1
+ import { b as s, c as t } from "../../../challengeAssert-BVQq50su.js";
2
+ import { a as i } from "../../../constants-CDQE812z.js";
3
+ import { computeMinClaimValue as u, computeMinPeginFee as n, deriveVaultId as P, peginP2aAnchorOutput as d, supportedTxGraphVersions as l, validatePeginP2aAnchor as b } from "@babylonlabs-io/babylon-tbv-rust-wasm";
4
+ import { P as c, d as x, f as g, c as f, b as m, a as y, g as h, e as S } from "../../../verifyScriptPathSchnorrSignature-CgrnAjMW.js";
5
+ import { b as A, e as T, f as V } from "../../../peginInput-BKD_b3gq.js";
6
+ import { a as C, b as F } from "../../../noPayout-CihCk1HE.js";
7
+ import { d as O, a as K, b as M, e as N, f as X, g as k, h as B, i as U, c as w, p as z, s as E, t as G, u as L, v as R } from "../../../bitcoin-B5aNKtsk.js";
8
8
  export {
9
- x as PsbtSubstitutionError,
10
- g as assertPsbtUnsignedTxMatches,
11
- f as assertScriptPathSchnorrSignature,
12
- o as assertValidVaultCoreVersion,
9
+ c as PsbtSubstitutionError,
10
+ x as assertPsbtUnsignedTxMatches,
11
+ g as assertScriptPathSchnorrSignature,
12
+ i as assertValidVaultCoreVersion,
13
13
  s as buildChallengeAssertPsbt,
14
- t as buildDepositorPayoutPsbt,
15
- F as buildNoPayoutPsbt,
16
- m as buildPayoutPsbt,
17
- T as buildPeginInputPsbt,
18
- y as buildPeginTxFromFundedPrePegin,
19
- h as buildPrePeginPsbt,
20
- I as buildRefundPsbt,
21
- n as computeMinClaimValue,
22
- P as computeMinPeginFee,
23
- r as computeNumLocalChallengers,
24
- S as createPayoutScript,
25
- K as deriveBip86ScriptPubKeyHex,
26
- M as deriveNativeSegwitAddress,
27
- N as deriveTaprootAddress,
28
- d as deriveVaultId,
29
- X as ensureHexPrefix,
30
- v as extractPayoutSignature,
31
- V as extractPeginInputSignature,
32
- H as finalizePeginInputPsbt,
33
- k as formatSatoshisToBtc,
34
- B as getSortedXOnlyPubkeys,
35
- U as hexToUint8Array,
36
- w as isAddressFromPublicKey,
37
- z as isValidHex,
38
- b as peginP2aAnchorOutput,
39
- D as processPublicKeyToXOnly,
14
+ C as buildNoPayoutPsbt,
15
+ f as buildPayoutPsbt,
16
+ A as buildPeginInputPsbt,
17
+ m as buildPeginTxFromFundedPrePegin,
18
+ y as buildPrePeginPsbt,
19
+ F as buildRefundPsbt,
20
+ u as computeMinClaimValue,
21
+ n as computeMinPeginFee,
22
+ t as computeNumLocalChallengers,
23
+ h as createPayoutScript,
24
+ O as deriveBip86ScriptPubKeyHex,
25
+ K as deriveNativeSegwitAddress,
26
+ M as deriveTaprootAddress,
27
+ P as deriveVaultId,
28
+ N as ensureHexPrefix,
29
+ S as extractPayoutSignature,
30
+ T as extractPeginInputSignature,
31
+ V as finalizePeginInputPsbt,
32
+ X as formatSatoshisToBtc,
33
+ k as getSortedXOnlyPubkeys,
34
+ B as hexToUint8Array,
35
+ U as isAddressFromPublicKey,
36
+ w as isValidHex,
37
+ d as peginP2aAnchorOutput,
38
+ z as processPublicKeyToXOnly,
40
39
  E as stripHexPrefix,
41
40
  l as supportedTxGraphVersions,
42
41
  G as toXOnly,
43
42
  L as uint8ArrayToHex,
44
- p as validatePeginP2aAnchor,
43
+ b as validatePeginP2aAnchor,
45
44
  R as validateWalletPubkey
46
45
  };
47
46
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Unit tests for the payout implicit-fee band (floor + ceiling) and its
3
+ * input-domain guard, exercised directly with plain numbers — the e2e wiring
4
+ * through buildPayoutPsbt is covered in payout.test.ts.
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=assertPayoutFeeBand.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assertPayoutFeeBand.test.d.ts","sourceRoot":"","sources":["../../../../../../src/tbv/core/primitives/psbt/__tests__/assertPayoutFeeBand.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Payout implicit-fee band validation (floor + ceiling).
3
+ *
4
+ * Bands the implicit fee of a VP-built payout transaction before the
5
+ * depositor pre-signs it:
6
+ * - Ceiling: the Ledger device's payout vsize model (`app-babylon-vault`
7
+ * `sign_psbt_validate.c`, HLD v22 §4.9.7.1) extended by measured script
8
+ * excess over its 34-byte assumption — blocks a VP deflating outputs and
9
+ * burning the difference as miner fee.
10
+ * - Floor: the minimum fee any known VP output-sizing model produces
11
+ * (vault-wasm `computePayoutFeeFloor`) — a lower fee is provably
12
+ * illegitimate and risks a payout that cannot relay at redemption time.
13
+ *
14
+ * Preconditions, enforced by the caller (`buildPayoutPsbt`):
15
+ * - `assertPayoutFeeBandDomain` has accepted the rate and participant counts,
16
+ * so the band runs exactly over the domain its dominance proof was swept.
17
+ * - `out0Len` is the layout-trusted length of the PINNED outs[0] script.
18
+ * `out1Len` is measured from the deliberately-unpinned VP commission
19
+ * output and is UNTRUSTED: it feeds only the floor, where padding cannot
20
+ * raise it (the fixed-34 model saturates the minimum) and shortening only
21
+ * lowers it. It must never widen the ceiling — a VP-controlled length
22
+ * there would buy burnable headroom.
23
+ * - `implicitFeeSats` is `inputs − outputs` over verified prevouts, `>= 0`.
24
+ *
25
+ * @module primitives/psbt/assertPayoutFeeBand
26
+ */
27
+ /** Shape/rate inputs the fee band is evaluated over. */
28
+ export interface PayoutFeeBandParams {
29
+ /** Vault core (tx-graph) version — selects the floor's pinned model set. */
30
+ vaultCoreVersion: number;
31
+ /** Vault keeper count (N). */
32
+ numVaultKeepers: number;
33
+ /** Universal challenger count (M). */
34
+ numUniversalChallengers: number;
35
+ /** Security council size from the locked offchain params version. */
36
+ councilSize: number;
37
+ /** Version-locked tx-graph fee rate (sat/vB); anchors both band ends. */
38
+ protocolFeeRate: bigint;
39
+ }
40
+ /**
41
+ * Validate that the fee-band inputs lie in the proven/accepted domain:
42
+ * `protocolFeeRate` in `[1, 0xffffffff]`, participant counts in `[1, 32]`,
43
+ * `councilSize` a positive integer.
44
+ *
45
+ * @throws If `protocolFeeRate` is not a bigint within the device's range
46
+ * @throws If a participant count is not an integer in the device range `[1, 32]`
47
+ * @throws If `councilSize` is not an integer `>= 1` — the contract write path
48
+ * (`ProtocolParams.sol`) rejects an empty council, and the WASM floor would
49
+ * silently treat 0 as a 1-member council rather than erroring
50
+ */
51
+ export declare function assertPayoutFeeBandDomain(params: PayoutFeeBandParams): void;
52
+ /**
53
+ * Assert `floor <= implicitFeeSats <= ceiling` for a payout of this shape.
54
+ * `out1Len` is `undefined` for the 2-output (no-commission) layouts.
55
+ *
56
+ * @throws If the fee is below the floor or above the extended device ceiling
57
+ */
58
+ export declare function assertPayoutFeeInBand(params: PayoutFeeBandParams, measured: {
59
+ implicitFeeSats: number;
60
+ out0Len: number;
61
+ out1Len: number | undefined;
62
+ }): Promise<void>;
63
+ //# sourceMappingURL=assertPayoutFeeBand.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assertPayoutFeeBand.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/primitives/psbt/assertPayoutFeeBand.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AA6CH,wDAAwD;AACxD,MAAM,WAAW,mBAAmB;IAClC,4EAA4E;IAC5E,gBAAgB,EAAE,MAAM,CAAC;IACzB,8BAA8B;IAC9B,eAAe,EAAE,MAAM,CAAC;IACxB,sCAAsC;IACtC,uBAAuB,EAAE,MAAM,CAAC;IAChC,qEAAqE;IACrE,WAAW,EAAE,MAAM,CAAC;IACpB,yEAAyE;IACzE,eAAe,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,mBAAmB,GAAG,IAAI,CAuC3E;AAED;;;;;GAKG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,mBAAmB,EAC3B,QAAQ,EAAE;IACR,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B,GACA,OAAO,CAAC,IAAI,CAAC,CAgDf"}
@@ -18,10 +18,13 @@ import { PrePeginParams } from './pegin';
18
18
  *
19
19
  * @param result - The result returned by `createPrePeginTransaction`.
20
20
  * @param params - The parameters that were passed to build it.
21
+ * @returns The independently computed `minPeginFee` this function already
22
+ * asserted against `result`'s implied reserve — callers that need the
23
+ * value should reuse this instead of recomputing it.
21
24
  * @throws If any value is missing, non-positive, mismatched against the
22
25
  * request, or outside the protocol formula.
23
26
  */
24
- export declare function assertWasmPeginSizing(result: PrePeginResult, params: PrePeginParams): Promise<void>;
27
+ export declare function assertWasmPeginSizing(result: PrePeginResult, params: PrePeginParams): Promise<bigint>;
25
28
  /**
26
29
  * Bind the validated metadata to the bytes that actually get funded and
27
30
  * signed.
@@ -1 +1 @@
1
- {"version":3,"file":"assertWasmPeginSizing.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/primitives/psbt/assertWasmPeginSizing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,uCAAuC,CAAC;AAG/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;AAEjF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,cAAc,GACrB,OAAO,CAAC,IAAI,CAAC,CAoJf;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,SAAS,YAAY,EAAE,EAChC,UAAU,EAAE,SAAS,MAAM,EAAE,EAC7B,iBAAiB,EAAE,SAAS,MAAM,EAAE,GACnC,IAAI,CA2BN"}
1
+ {"version":3,"file":"assertWasmPeginSizing.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/primitives/psbt/assertWasmPeginSizing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,uCAAuC,CAAC;AAG/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;AAEjF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,cAAc,GACrB,OAAO,CAAC,MAAM,CAAC,CAsJjB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,SAAS,YAAY,EAAE,EAChC,UAAU,EAAE,SAAS,MAAM,EAAE,EAC7B,iBAAiB,EAAE,SAAS,MAAM,EAAE,GACnC,IAAI,CA2BN"}
@@ -37,10 +37,24 @@ export declare const NON_VP_CLAIMER_PAYOUT_OUTPUT_COUNT = 2;
37
37
  */
38
38
  export declare const CHALLENGE_ASSERT_CONNECTORS_PER_CHALLENGER = 2;
39
39
  /**
40
- * Exclusive upper bound on VP commission (bps), and the bps denominator for
41
- * `floor(peginValue * bps / 10_000)`. Matches `BTCVaultRegistry._validateCommission`
42
- * (`commissionBps >= 10000` reverts). The minimum is version-locked
43
- * (`minVpCommissionBps`) and enforced upstream, not here.
40
+ * Exclusive upper bound on VP commission (bps). Matches
41
+ * `BTCVaultRegistry._validateCommission` (`commissionBps >= 10000` reverts).
42
+ * The minimum is version-locked (`minVpCommissionBps`) and enforced upstream,
43
+ * not here.
44
44
  */
45
45
  export declare const MAX_VP_COMMISSION_BPS_EXCLUSIVE = 10000;
46
+ /**
47
+ * Basis-points denominator for commission math:
48
+ * `floor(value * bps / BPS_DENOMINATOR)`. Numerically equal to
49
+ * {@link MAX_VP_COMMISSION_BPS_EXCLUSIVE} but a distinct concept — tightening
50
+ * the accepted bps range must never change the arithmetic.
51
+ */
52
+ export declare const BPS_DENOMINATOR = 10000;
53
+ /**
54
+ * Contract cap on a registered payout/commission scriptPubKey's byte length
55
+ * (`MAX_PAYOUT_ADDRESS_LENGTH`, Constants.sol; empty scripts are rejected at
56
+ * registration, so valid lengths are `[1, 128]`). A measured length outside
57
+ * this range is provably not a registered script.
58
+ */
59
+ export declare const MAX_PAYOUT_SCRIPT_LEN = 128;
46
60
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/primitives/psbt/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;;GAGG;AACH,eAAO,MAAM,4BAA4B,IAAI,CAAC;AAE9C,wEAAwE;AACxE,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAE1C,gFAAgF;AAChF,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAE5C;;;GAGG;AACH,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAE3C,sFAAsF;AACtF,eAAO,MAAM,8BAA8B,IAAI,CAAC;AAEhD,+EAA+E;AAC/E,eAAO,MAAM,kCAAkC,IAAI,CAAC;AAEpD;;;;;;GAMG;AACH,eAAO,MAAM,0CAA0C,IAAI,CAAC;AAE5D;;;;;GAKG;AACH,eAAO,MAAM,+BAA+B,QAAS,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/primitives/psbt/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;;GAGG;AACH,eAAO,MAAM,4BAA4B,IAAI,CAAC;AAE9C,wEAAwE;AACxE,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAE1C,gFAAgF;AAChF,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAE5C;;;GAGG;AACH,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAE3C,sFAAsF;AACtF,eAAO,MAAM,8BAA8B,IAAI,CAAC;AAEhD,+EAA+E;AAC/E,eAAO,MAAM,kCAAkC,IAAI,CAAC;AAEpD;;;;;;GAMG;AACH,eAAO,MAAM,0CAA0C,IAAI,CAAC;AAE5D;;;;;GAKG;AACH,eAAO,MAAM,+BAA+B,QAAS,CAAC;AAEtD;;;;;GAKG;AACH,eAAO,MAAM,eAAe,QAAS,CAAC;AAEtC;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,MAAM,CAAC"}
@@ -68,6 +68,20 @@ export interface PayoutParams {
68
68
  * upstream; here only `0 <= bps < 10_000` is checked, for safe cap math.
69
69
  */
70
70
  commissionBps: number;
71
+ /**
72
+ * Tx-graph fee rate (sat/vB) the graph was built with — the version-locked
73
+ * `offchainParams.feeRate` at the vault's stamped `offchainParamsVersion`,
74
+ * NOT a live read. Anchors both ends of the fee band.
75
+ */
76
+ protocolFeeRate: bigint;
77
+ /**
78
+ * Security council member count from the locked offchain params version.
79
+ * Mirrors the upstream estimator's signature; at the current model pins the
80
+ * council occupies a single taptree leaf regardless of size, so the floor
81
+ * is council-size-invariant — passed for forward compatibility with future
82
+ * pinned models.
83
+ */
84
+ councilSize: number;
71
85
  }
72
86
  /**
73
87
  * Result of building an unsigned payout PSBT
@@ -99,8 +113,13 @@ export interface PayoutPsbtResult {
99
113
  * @throws If input 1 does not spend Assert:0 (proof output)
100
114
  * @throws If previous output is not found for either input
101
115
  * @throws If sum of output values exceeds sum of input values (invalid tx)
102
- * @throws If implicit fee (inputs − outputs) exceeds the configured fraction
103
- * of total input value — see {@link MAX_PAYOUT_FEE_FRACTION_NUMERATOR}
116
+ * @throws If the implicit fee (inputs − outputs) is outside the fee band —
117
+ * below the floor or above the extended device ceiling (see
118
+ * {@link assertPayoutFeeInBand})
119
+ * @throws If `protocolFeeRate`, a participant count, or `councilSize` is
120
+ * outside the accepted input domain (see {@link assertPayoutFeeBandDomain})
121
+ * @throws If a non-anchor scriptPubKey length is outside `[1,
122
+ * {@link MAX_PAYOUT_SCRIPT_LEN}]`
104
123
  * @throws If `claimerBtcPubkey` is not VP, depositor, or a registered VK
105
124
  * @throws If payout output count, outs[0] script, outs[last] anchor value, or
106
125
  * (VP-claimer) outs[1] commission cap do not match the protocol layout
@@ -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;AAyC/C;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;OAIG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;;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;IAEjB;;;OAGG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;;;OAIG;IACH,4BAA4B,EAAE,MAAM,CAAC;IAErC;;;;OAIG;IACH,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,gBAAgB,CAAC,CA+K3B;AAwHD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,sBAAsB,CACpC,aAAa,EAAE,MAAM,EACrB,eAAe,EAAE,MAAM,EACvB,UAAU,SAAI,GACb,MAAM,CA+CR"}
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;AAuC/C;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;OAIG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;;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;IAEjB;;;OAGG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;;;OAIG;IACH,4BAA4B,EAAE,MAAM,CAAC;IAErC;;;;OAIG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;;;OAIG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;;;;;OAMG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,gBAAgB,CAAC,CAoF3B;AAmPD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,sBAAsB,CACpC,aAAa,EAAE,MAAM,EACrB,eAAe,EAAE,MAAM,EACvB,UAAU,SAAI,GACb,MAAM,CA+CR"}
@@ -81,6 +81,12 @@ export interface PrePeginPsbtResult {
81
81
  * Always equals `htlcValues.length` when present.
82
82
  */
83
83
  authAnchorVout: number | null;
84
+ /**
85
+ * Minimum PegIn fee (sats), independently computed and asserted against
86
+ * `htlcValues`' implied reserve by {@link assertWasmPeginSizing}. Reuse
87
+ * this instead of recomputing — it is already the cross-checked value.
88
+ */
89
+ minPeginFee: bigint;
84
90
  }
85
91
  /**
86
92
  * Parameters for building the PegIn transaction from a funded Pre-PegIn tx
@@ -1 +1 @@
1
- {"version":3,"file":"pegin.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/primitives/psbt/pegin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAOL,KAAK,OAAO,EACb,MAAM,uCAAuC,CAAC;AAgB/C;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;;OAKG;IACH,gBAAgB,EAAE,MAAM,CAAC;IACzB,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,iGAAiG;IACjG,OAAO,EAAE,MAAM,CAAC;IAChB,6FAA6F;IAC7F,e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B,CAClD,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC,aAAa,CAAC,CAwCxB"}
@@ -1,5 +1,6 @@
1
1
  import { Network } from '@babylonlabs-io/babylon-tbv-rust-wasm';
2
2
  import { BitcoinWallet } from '../../../../shared/wallets/interfaces';
3
+ import { DepositTerms } from '../../deposit-terms';
3
4
  import { PeginStatusReader, PresignClient } from './interfaces';
4
5
  /**
5
6
  * Context required for signing payout transactions.
@@ -52,6 +53,12 @@ export interface PayoutSigningContext {
52
53
  registeredPayoutScriptPubKey: string;
53
54
  /** VP commission (bps) from `BTCVaultRegistry`; caps the VP-claimer payout commission output. */
54
55
  commissionBps: number;
56
+ /**
57
+ * Tx-graph fee rate (sat/vB) from the locked offchain params version —
58
+ * `getOffchainParamsByVersion(...).feeRate`, the rate the VP built the
59
+ * graph with. Bounds every payout's implicit fee (device fee-bound model).
60
+ */
61
+ protocolFeeRate: bigint;
55
62
  }
56
63
  export interface RunDepositorPresignFlowParams {
57
64
  /** VP client implementing the status reader interface */
@@ -66,6 +73,11 @@ export interface RunDepositorPresignFlowParams {
66
73
  depositorPk: string;
67
74
  /** Signing context built from on-chain data */
68
75
  signingContext: PayoutSigningContext;
76
+ /**
77
+ * Required for approval-capable wallets; fresh flows thread
78
+ * PreparePeginResult.depositTerms. Resume-path rebuild is not wired yet.
79
+ */
80
+ depositTerms?: DepositTerms;
69
81
  /** Maximum polling timeout in milliseconds (default: 20 min) */
70
82
  timeoutMs?: number;
71
83
  /** AbortSignal for cancellation */
@@ -1 +1 @@
1
- {"version":3,"file":"runDepositorPresignFlow.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/deposit/runDepositorPresignFlow.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAErE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAW3E,OAAO,KAAK,EAAE,iBAAiB,EAAE,a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OG;AACH,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,6BAA6B,GACpC,OAAO,CAAC,IAAI,CAAC,CA+Gf"}
1
+ {"version":3,"file":"runDepositorPresignFlow.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/deposit/runDepositorPresignFlow.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAErE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAM3E,OAAO,EAEL,KAAK,YAAY,EAClB,MAAM,qBAAqB,CAAC;AAM7B,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAQrE;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;;OAKG;IACH,gBAAgB,EAAE,MAAM,CAAC;IACzB,4DAA4D;IAC5D,UAAU,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,sBAAsB,EAAE,MAAM,CAAC;IAC/B,kEAAkE;IAClE,qBAAqB,EAAE,MAAM,EAAE,CAAC;IAChC,0EAA0E;IAC1E,6BAA6B,EAAE,MAAM,EAAE,CAAC;IACxC,yDAAyD;IACzD,kBAAkB,EAAE,MAAM,CAAC;IAC3B,6DAA6D;IAC7D,aAAa,EAAE,MAAM,CAAC;IACtB;;;;;OAKG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;;;;OAKG;IACH,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB;;;;;OAKG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB,2CAA2C;IAC3C,OAAO,EAAE,OAAO,CAAC;IACjB,8DAA8D;IAC9D,4BAA4B,EAAE,MAAM,CAAC;IACrC,iGAAiG;IACjG,aAAa,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,6BAA6B;IAC5C,yDAAyD;IACzD,YAAY,EAAE,iBAAiB,CAAC;IAChC,oEAAoE;IACpE,aAAa,EAAE,aAAa,CAAC;IAC7B,iCAAiC;IACjC,SAAS,EAAE,aAAa,CAAC;IACzB,0DAA0D;IAC1D,SAAS,EAAE,MAAM,CAAC;IAClB,mEAAmE;IACnE,WAAW,EAAE,MAAM,CAAC;IACpB,+CAA+C;IAC/C,cAAc,EAAE,oBAAoB,CAAC;IACrC;;;OAGG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,gEAAgE;IAChE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mCAAmC;IACnC,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,sEAAsE;IACtE,UAAU,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACzD;AAgMD;;;;;;;GAOG;AACH,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,6BAA6B,GACpC,OAAO,CAAC,IAAI,CAAC,CAiJf"}
@@ -26,6 +26,11 @@ export interface DepositorGraphSigningContext {
26
26
  universalChallengerBtcPubkeys: string[];
27
27
  /** Pegin CSV timelock from the locked offchain params version (blocks) */
28
28
  timelockPegin: number;
29
+ /**
30
+ * Tx-graph fee rate (sat/vB) from the locked offchain params version —
31
+ * bounds the depositor-claimer payout's implicit fee (device fee-bound model).
32
+ */
33
+ protocolFeeRate: bigint;
29
34
  /**
30
35
  * Assert CSV timelock from the locked offchain params version (blocks).
31
36
  * Sourced from the on-chain ProtocolParams contract via
@@ -1 +1 @@
1
- {"version":3,"file":"signDepositorGraph.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/deposit/signDepositorGraph.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAGrE,OAAO,KAAK,EACV,aAAa,EAEd,MAAM,uCAAuC,CAAC;AAC/C,OAAO,KAAK,EACV,+BAA+B,EAC/B,0BAA0B,EAG3B,MAAM,oCAAoC,CAAC;AAwc5C;;;;;GAKG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;;;OAIG;IACH,gBAAgB,EAAE,MAAM,CAAC;IACzB,8EAA8E;IAC9E,UAAU,EAAE,MAAM,CAAC;IACnB,qEAAqE;IACrE,kBAAkB,EAAE,MAAM,CAAC;IAC3B,8DAA8D;IAC9D,sBAAsB,EAAE,MAAM,CAAC;IAC/B,kEAAkE;IAClE,qBAAqB,EAAE,MAAM,EAAE,CAAC;IAChC,0EAA0E;IAC1E,6BAA6B,EAAE,MAAM,EAAE,CAAC;IACxC,0EAA0E;IAC1E,aAAa,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB;;;OAGG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB,2CAA2C;IAC3C,OAAO,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,4BAA4B,EAAE,MAAM,CAAC;CACtC;AAED,MAAM,WAAW,wBAAwB;IACvC,2CAA2C;IAC3C,cAAc,EAAE,0BAA0B,CAAC;IAC3C,iCAAiC;IACjC,SAAS,EAAE,aAAa,CAAC;IACzB,8DAA8D;IAC9D,cAAc,EAAE,4BAA4B,CAAC;CAC9C;AAED;;;;;;;;GAQG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,wBAAwB,GAC/B,OAAO,CAAC,+BAA+B,CAAC,CAuC1C"}
1
+ {"version":3,"file":"signDepositorGraph.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/deposit/signDepositorGraph.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAGrE,OAAO,KAAK,EACV,aAAa,EAEd,MAAM,uCAAuC,CAAC;AAC/C,OAAO,KAAK,EACV,+BAA+B,EAC/B,0BAA0B,EAG3B,MAAM,oCAAoC,CAAC;AA0c5C;;;;;GAKG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;;;OAIG;IACH,gBAAgB,EAAE,MAAM,CAAC;IACzB,8EAA8E;IAC9E,UAAU,EAAE,MAAM,CAAC;IACnB,qEAAqE;IACrE,kBAAkB,EAAE,MAAM,CAAC;IAC3B,8DAA8D;IAC9D,sBAAsB,EAAE,MAAM,CAAC;IAC/B,kEAAkE;IAClE,qBAAqB,EAAE,MAAM,EAAE,CAAC;IAChC,0EAA0E;IAC1E,6BAA6B,EAAE,MAAM,EAAE,CAAC;IACxC,0EAA0E;IAC1E,aAAa,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB;;;OAGG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB,2CAA2C;IAC3C,OAAO,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,4BAA4B,EAAE,MAAM,CAAC;CACtC;AAED,MAAM,WAAW,wBAAwB;IACvC,2CAA2C;IAC3C,cAAc,EAAE,0BAA0B,CAAC;IAC3C,iCAAiC;IACjC,SAAS,EAAE,aAAa,CAAC;IACzB,8DAA8D;IAC9D,cAAc,EAAE,4BAA4B,CAAC;CAC9C;AAED;;;;;;;;GAQG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,wBAAwB,GAC/B,OAAO,CAAC,+BAA+B,CAAC,CAuC1C"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../../../PayoutManager-aqtsj60t.cjs"),t=require("../../../buildAndBroadcastRefund-Bwi1I5we.cjs"),e=require("../../../peginState-CBBJw4Za.cjs");exports.computeHashlock=a.computeHashlock;exports.validateSecretAgainstHashlock=a.validateSecretAgainstHashlock;exports.BIP68NotMatureError=t.BIP68NotMatureError;exports.ClaimerPegoutStatusValue=t.ClaimerPegoutStatusValue;exports.REFUND_MAX_FEE_FRACTION_DENOMINATOR=t.REFUND_MAX_FEE_FRACTION_DENOMINATOR;exports.REFUND_MAX_FEE_FRACTION_NUMERATOR=t.REFUND_MAX_FEE_FRACTION_NUMERATOR;exports.REFUND_MAX_FEE_RATE_SATS_VB=t.REFUND_MAX_FEE_RATE_SATS_VB;exports.REFUND_VSIZE=t.REFUND_VSIZE;exports.RegisteredVaultVersionMismatchError=t.RegisteredVaultVersionMismatchError;exports.activateVault=t.activateVault;exports.buildAndBroadcastRefund=t.buildAndBroadcastRefund;exports.estimateRefundFeeSats=t.estimateRefundFeeSats;exports.isDepositAmountValid=t.isDepositAmountValid;exports.isPegoutTerminalStatus=t.isPegoutTerminalStatus;exports.isRecognizedPegoutStatus=t.isRecognizedPegoutStatus;exports.isRegisteredVaultVersionMismatchError=t.isRegisteredVaultVersionMismatchError;exports.runDepositorPresignFlow=t.runDepositorPresignFlow;exports.signDepositorGraph=t.signDepositorGraph;exports.submitWotsPublicKey=t.submitWotsPublicKey;exports.validateDepositAmount=t.validateDepositAmount;exports.validateMultiVaultDepositInputs=t.validateMultiVaultDepositInputs;exports.validateOnChainParticipantKeys=t.validateOnChainParticipantKeys;exports.validateProviderSelection=t.validateProviderSelection;exports.validateRemainingCapacity=t.validateRemainingCapacity;exports.validateVaultAmounts=t.validateVaultAmounts;exports.validateVaultProviderPubkey=t.validateVaultProviderPubkey;exports.verifyRegisteredVaultVersions=t.verifyRegisteredVaultVersions;exports.waitForPeginStatus=t.waitForPeginStatus;exports.ContractStatus=e.ContractStatus;exports.PeginAction=e.PeginAction;exports.canPerformAction=e.canPerformAction;exports.getPeginProtocolState=e.getPeginProtocolState;exports.isActivationDeadlinePassedOnChain=e.isActivationDeadlinePassedOnChain;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../../../PayoutManager-Cu4_l-_Y.cjs"),t=require("../../../buildAndBroadcastRefund-Cq01wyZX.cjs"),e=require("../../../peginState-CBBJw4Za.cjs");exports.computeHashlock=a.computeHashlock;exports.validateSecretAgainstHashlock=a.validateSecretAgainstHashlock;exports.BIP68NotMatureError=t.BIP68NotMatureError;exports.ClaimerPegoutStatusValue=t.ClaimerPegoutStatusValue;exports.REFUND_MAX_FEE_FRACTION_DENOMINATOR=t.REFUND_MAX_FEE_FRACTION_DENOMINATOR;exports.REFUND_MAX_FEE_FRACTION_NUMERATOR=t.REFUND_MAX_FEE_FRACTION_NUMERATOR;exports.REFUND_MAX_FEE_RATE_SATS_VB=t.REFUND_MAX_FEE_RATE_SATS_VB;exports.REFUND_VSIZE=t.REFUND_VSIZE;exports.RegisteredVaultVersionMismatchError=t.RegisteredVaultVersionMismatchError;exports.activateVault=t.activateVault;exports.buildAndBroadcastRefund=t.buildAndBroadcastRefund;exports.estimateRefundFeeSats=t.estimateRefundFeeSats;exports.isDepositAmountValid=t.isDepositAmountValid;exports.isPegoutTerminalStatus=t.isPegoutTerminalStatus;exports.isRecognizedPegoutStatus=t.isRecognizedPegoutStatus;exports.isRegisteredVaultVersionMismatchError=t.isRegisteredVaultVersionMismatchError;exports.runDepositorPresignFlow=t.runDepositorPresignFlow;exports.signDepositorGraph=t.signDepositorGraph;exports.submitWotsPublicKey=t.submitWotsPublicKey;exports.validateDepositAmount=t.validateDepositAmount;exports.validateMultiVaultDepositInputs=t.validateMultiVaultDepositInputs;exports.validateOnChainParticipantKeys=t.validateOnChainParticipantKeys;exports.validateProviderSelection=t.validateProviderSelection;exports.validateRemainingCapacity=t.validateRemainingCapacity;exports.validateVaultAmounts=t.validateVaultAmounts;exports.validateVaultProviderPubkey=t.validateVaultProviderPubkey;exports.verifyRegisteredVaultVersions=t.verifyRegisteredVaultVersions;exports.waitForPeginStatus=t.waitForPeginStatus;exports.ContractStatus=e.ContractStatus;exports.PeginAction=e.PeginAction;exports.canPerformAction=e.canPerformAction;exports.getPeginProtocolState=e.getPeginProtocolState;exports.isActivationDeadlinePassedOnChain=e.isActivationDeadlinePassedOnChain;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,5 +1,5 @@
1
- import { c as s, v as e } from "../../../PayoutManager-BJmPnyRP.js";
2
- import { B as o, C as r, p as n, q as u, t as l, u as d, R as c, a as R, n as g, o as A, i as E, m as P, l as m, j as v, r as p, b as V, s as _, v as F, g as S, h as D, d as N, c as C, e as M, f, k as h, w as O } from "../../../buildAndBroadcastRefund-BiSO4zg2.js";
1
+ import { c as s, v as e } from "../../../PayoutManager-BVgmuKuK.js";
2
+ import { B as o, C as r, p as n, q as u, t as l, u as d, R as c, a as R, n as g, o as A, i as E, m as P, l as m, j as v, r as p, b as V, s as _, v as F, g as S, h as D, d as N, c as C, e as M, f, k as h, w as O } from "../../../buildAndBroadcastRefund-BtXUqBkb.js";
3
3
  import { C as I, P as b, c as y, g as U, i as k } from "../../../peginState-BB81JI6I.js";
4
4
  export {
5
5
  o as BIP68NotMatureError,
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Guards the browser-compatibility fix for `combineAbortSignals`.
3
+ *
4
+ * The regression this protects against: the mempool client used to call
5
+ * `AbortSignal.any`, which is absent on Safari < 17.4 and Chrome < 116. It
6
+ * threw before `fetch` was reached, so UTXO fetches, fee estimation and
7
+ * transaction broadcast all failed outright on those browsers. The last test
8
+ * deletes `AbortSignal.any` outright to prove the helper never reaches for it.
9
+ */
10
+ export {};
11
+ //# sourceMappingURL=abortSignals.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abortSignals.test.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/utils/__tests__/abortSignals.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * AbortSignal composition helpers.
3
+ *
4
+ * @module utils/abortSignals
5
+ */
6
+ export interface CombinedAbortSignal {
7
+ signal: AbortSignal;
8
+ /** Remove listeners from the source signals. Call once the request settles. */
9
+ cleanup: () => void;
10
+ }
11
+ /**
12
+ * Compose several AbortSignals into one that aborts when any input aborts,
13
+ * propagating the reason of whichever fired first.
14
+ *
15
+ * Deliberately does NOT use `AbortSignal.any`: that shipped in Chrome 116 /
16
+ * Safari 17.4, newer than the browsers this SDK is consumed from, and it is a
17
+ * runtime API so no transpile step can backfill it. Calling it directly threw
18
+ * `TypeError: AbortSignal.any is not a function` before `fetch` was ever
19
+ * reached, which failed UTXO fetches, fee estimation and transaction broadcast
20
+ * outright on those browsers.
21
+ */
22
+ export declare function combineAbortSignals(signals: AbortSignal[]): CombinedAbortSignal;
23
+ //# sourceMappingURL=abortSignals.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abortSignals.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/utils/abortSignals.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,WAAW,CAAC;IACpB,+EAA+E;IAC/E,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,WAAW,EAAE,GACrB,mBAAmB,CAqBrB"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("../../../signing-Bnsro0hE.cjs"),a=require("../../../validation-u8W7Lp2x.cjs"),e=require("../../../waitForTransactionReceiptSmartAware-AgZ-3WV_.cjs"),t=require("../../../fundPeginTransaction-BLD8FRL9.cjs"),T=require("../../../reservation-ClEs2X0H.cjs"),E=require("../../../bitcoin-CHfKAhcI.cjs");exports.createTaprootScriptPathSignOptions=_.createTaprootScriptPathSignOptions;exports.BITCOIN_ADDRESS_RE=a.BITCOIN_ADDRESS_RE;exports.HEX_RE=a.HEX_RE;exports.KNOWN_SCRIPT_PREFIXES=a.KNOWN_SCRIPT_PREFIXES;exports.MAX_REASONABLE_FEE_SATS=a.MAX_REASONABLE_FEE_SATS;exports.TXID_RE=a.TXID_RE;exports.BitcoinScriptType=e.BitcoinScriptType;exports.applyChangeOutputPolicy=e.applyChangeOutputPolicy;exports.calculateBtcTxHash=e.calculateBtcTxHash;exports.computeChangeOutputFeeSats=e.computeChangeOutputFeeSats;exports.computeMaxDeposit=e.computeMaxDeposit;exports.computePeginBaseFeeSats=e.computePeginBaseFeeSats;exports.getDustThreshold=e.getDustThreshold;exports.getPsbtInputFields=e.getPsbtInputFields;exports.getScriptType=e.getScriptType;exports.selectUtxosForPegin=e.selectUtxosForPegin;exports.shouldAddChangeOutput=e.shouldAddChangeOutput;exports.waitForTransactionReceiptSmartAware=e.waitForTransactionReceiptSmartAware;exports.BTC_DUST_SAT=t.BTC_DUST_SAT;exports.DUST_THRESHOLD=t.DUST_THRESHOLD;exports.LOW_RATE_ESTIMATION_ACCURACY_BUFFER=t.LOW_RATE_ESTIMATION_ACCURACY_BUFFER;exports.MAX_NON_LEGACY_OUTPUT_SIZE=t.MAX_NON_LEGACY_OUTPUT_SIZE;exports.MAX_REASONABLE_PEGIN_VBYTES=t.MAX_REASONABLE_PEGIN_VBYTES;exports.P2TR_INPUT_SIZE=t.P2TR_INPUT_SIZE;exports.PEGIN_AUTH_ANCHOR_OUTPUTS=t.PEGIN_AUTH_ANCHOR_OUTPUTS;exports.PEGIN_FIXED_OUTPUTS=t.PEGIN_FIXED_OUTPUTS;exports.SPLIT_TX_FEE_SAFETY_MULTIPLIER=t.SPLIT_TX_FEE_SAFETY_MULTIPLIER;exports.TX_BUFFER_SIZE_OVERHEAD=t.TX_BUFFER_SIZE_OVERHEAD;exports.WALLET_RELAY_FEE_RATE_THRESHOLD=t.WALLET_RELAY_FEE_RATE_THRESHOLD;exports.fundPeginTransaction=t.fundPeginTransaction;exports.parseUnfundedWasmTransaction=t.parseUnfundedWasmTransaction;exports.peginOutputCount=t.peginOutputCount;exports.rateBasedTxBufferFee=t.rateBasedTxBufferFee;exports.UtxoNotAvailableError=T.UtxoNotAvailableError;exports.assertUtxosAvailable=T.assertUtxosAvailable;exports.extractInputsFromTransaction=T.extractInputsFromTransaction;exports.findOverlappingPendingVaults=T.findOverlappingPendingVaults;exports.validateUtxosAvailable=T.validateUtxosAvailable;exports.getNetwork=E.getNetwork;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../../../validation-CDbOaDj7.cjs"),_=require("../../../signing-Bnsro0hE.cjs"),e=require("../../../waitForTransactionReceiptSmartAware-AgZ-3WV_.cjs"),t=require("../../../fundPeginTransaction-BLD8FRL9.cjs"),T=require("../../../reservation-ClEs2X0H.cjs"),E=require("../../../bitcoin-CHfKAhcI.cjs");exports.BITCOIN_ADDRESS_RE=a.BITCOIN_ADDRESS_RE;exports.HEX_RE=a.HEX_RE;exports.KNOWN_SCRIPT_PREFIXES=a.KNOWN_SCRIPT_PREFIXES;exports.MAX_REASONABLE_FEE_SATS=a.MAX_REASONABLE_FEE_SATS;exports.TXID_RE=a.TXID_RE;exports.combineAbortSignals=a.combineAbortSignals;exports.createTaprootScriptPathSignOptions=_.createTaprootScriptPathSignOptions;exports.BitcoinScriptType=e.BitcoinScriptType;exports.applyChangeOutputPolicy=e.applyChangeOutputPolicy;exports.calculateBtcTxHash=e.calculateBtcTxHash;exports.computeChangeOutputFeeSats=e.computeChangeOutputFeeSats;exports.computeMaxDeposit=e.computeMaxDeposit;exports.computePeginBaseFeeSats=e.computePeginBaseFeeSats;exports.getDustThreshold=e.getDustThreshold;exports.getPsbtInputFields=e.getPsbtInputFields;exports.getScriptType=e.getScriptType;exports.selectUtxosForPegin=e.selectUtxosForPegin;exports.shouldAddChangeOutput=e.shouldAddChangeOutput;exports.waitForTransactionReceiptSmartAware=e.waitForTransactionReceiptSmartAware;exports.BTC_DUST_SAT=t.BTC_DUST_SAT;exports.DUST_THRESHOLD=t.DUST_THRESHOLD;exports.LOW_RATE_ESTIMATION_ACCURACY_BUFFER=t.LOW_RATE_ESTIMATION_ACCURACY_BUFFER;exports.MAX_NON_LEGACY_OUTPUT_SIZE=t.MAX_NON_LEGACY_OUTPUT_SIZE;exports.MAX_REASONABLE_PEGIN_VBYTES=t.MAX_REASONABLE_PEGIN_VBYTES;exports.P2TR_INPUT_SIZE=t.P2TR_INPUT_SIZE;exports.PEGIN_AUTH_ANCHOR_OUTPUTS=t.PEGIN_AUTH_ANCHOR_OUTPUTS;exports.PEGIN_FIXED_OUTPUTS=t.PEGIN_FIXED_OUTPUTS;exports.SPLIT_TX_FEE_SAFETY_MULTIPLIER=t.SPLIT_TX_FEE_SAFETY_MULTIPLIER;exports.TX_BUFFER_SIZE_OVERHEAD=t.TX_BUFFER_SIZE_OVERHEAD;exports.WALLET_RELAY_FEE_RATE_THRESHOLD=t.WALLET_RELAY_FEE_RATE_THRESHOLD;exports.fundPeginTransaction=t.fundPeginTransaction;exports.parseUnfundedWasmTransaction=t.parseUnfundedWasmTransaction;exports.peginOutputCount=t.peginOutputCount;exports.rateBasedTxBufferFee=t.rateBasedTxBufferFee;exports.UtxoNotAvailableError=T.UtxoNotAvailableError;exports.assertUtxosAvailable=T.assertUtxosAvailable;exports.extractInputsFromTransaction=T.extractInputsFromTransaction;exports.findOverlappingPendingVaults=T.findOverlappingPendingVaults;exports.validateUtxosAvailable=T.validateUtxosAvailable;exports.getNetwork=E.getNetwork;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -3,6 +3,7 @@
3
3
  *
4
4
  * @module utils
5
5
  */
6
+ export * from './abortSignals';
6
7
  export * from './fee';
7
8
  export * from './utxo';
8
9
  export * from './transaction';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/utils/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,OAAO,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/utils/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,gBAAgB,CAAC;AAC/B,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,OAAO,CAAC"}
@@ -1,48 +1,49 @@
1
- import { c as t } from "../../../signing-DaLvGwQe.js";
2
- import { B as T, H as _, K as E, M as o, T as r } from "../../../validation-CxqROCno.js";
3
- import { B as S, a as i, f as n, c as A, b as c, d as u, g as R, i as I, h as O, s as P, e as U, w as l } from "../../../waitForTransactionReceiptSmartAware-lobLm0q0.js";
4
- import { B as g, D as B, L as N, M as d, c as f, P as x, b as L, a as m, S as C, T as D, W as H, f as h, d as X, p as M, r as b } from "../../../fundPeginTransaction-B2wyjqp0.js";
5
- import { U as W, a as Y, e as w, f as y, v as G } from "../../../reservation-cHDRn4DA.js";
6
- import { j as Z } from "../../../bitcoin-B5aNKtsk.js";
1
+ import { B as t, H as e, K as T, M as _, T as o, c as E } from "../../../validation-Dj3dqYtl.js";
2
+ import { c as p } from "../../../signing-DaLvGwQe.js";
3
+ import { B as i, a as n, f as A, c, b as u, d as R, g as I, i as O, h as P, s as U, e as l, w as F } from "../../../waitForTransactionReceiptSmartAware-lobLm0q0.js";
4
+ import { B, D as N, L as d, M as f, c as x, P as m, b as L, a as C, S as D, T as H, W as h, f as X, d as b, p as M, r as v } from "../../../fundPeginTransaction-B2wyjqp0.js";
5
+ import { U as Y, a as w, e as y, f as G, v as V } from "../../../reservation-cHDRn4DA.js";
6
+ import { j as K } from "../../../bitcoin-B5aNKtsk.js";
7
7
  export {
8
- T as BITCOIN_ADDRESS_RE,
9
- g as BTC_DUST_SAT,
10
- S as BitcoinScriptType,
11
- B as DUST_THRESHOLD,
12
- _ as HEX_RE,
13
- E as KNOWN_SCRIPT_PREFIXES,
14
- N as LOW_RATE_ESTIMATION_ACCURACY_BUFFER,
15
- d as MAX_NON_LEGACY_OUTPUT_SIZE,
16
- o as MAX_REASONABLE_FEE_SATS,
17
- f as MAX_REASONABLE_PEGIN_VBYTES,
18
- x as P2TR_INPUT_SIZE,
8
+ t as BITCOIN_ADDRESS_RE,
9
+ B as BTC_DUST_SAT,
10
+ i as BitcoinScriptType,
11
+ N as DUST_THRESHOLD,
12
+ e as HEX_RE,
13
+ T as KNOWN_SCRIPT_PREFIXES,
14
+ d as LOW_RATE_ESTIMATION_ACCURACY_BUFFER,
15
+ f as MAX_NON_LEGACY_OUTPUT_SIZE,
16
+ _ as MAX_REASONABLE_FEE_SATS,
17
+ x as MAX_REASONABLE_PEGIN_VBYTES,
18
+ m as P2TR_INPUT_SIZE,
19
19
  L as PEGIN_AUTH_ANCHOR_OUTPUTS,
20
- m as PEGIN_FIXED_OUTPUTS,
21
- C as SPLIT_TX_FEE_SAFETY_MULTIPLIER,
22
- r as TXID_RE,
23
- D as TX_BUFFER_SIZE_OVERHEAD,
24
- W as UtxoNotAvailableError,
25
- H as WALLET_RELAY_FEE_RATE_THRESHOLD,
26
- i as applyChangeOutputPolicy,
27
- Y as assertUtxosAvailable,
28
- n as calculateBtcTxHash,
29
- A as computeChangeOutputFeeSats,
30
- c as computeMaxDeposit,
31
- u as computePeginBaseFeeSats,
32
- t as createTaprootScriptPathSignOptions,
33
- w as extractInputsFromTransaction,
34
- y as findOverlappingPendingVaults,
35
- h as fundPeginTransaction,
36
- R as getDustThreshold,
37
- Z as getNetwork,
38
- I as getPsbtInputFields,
39
- O as getScriptType,
40
- X as parseUnfundedWasmTransaction,
20
+ C as PEGIN_FIXED_OUTPUTS,
21
+ D as SPLIT_TX_FEE_SAFETY_MULTIPLIER,
22
+ o as TXID_RE,
23
+ H as TX_BUFFER_SIZE_OVERHEAD,
24
+ Y as UtxoNotAvailableError,
25
+ h as WALLET_RELAY_FEE_RATE_THRESHOLD,
26
+ n as applyChangeOutputPolicy,
27
+ w as assertUtxosAvailable,
28
+ A as calculateBtcTxHash,
29
+ E as combineAbortSignals,
30
+ c as computeChangeOutputFeeSats,
31
+ u as computeMaxDeposit,
32
+ R as computePeginBaseFeeSats,
33
+ p as createTaprootScriptPathSignOptions,
34
+ y as extractInputsFromTransaction,
35
+ G as findOverlappingPendingVaults,
36
+ X as fundPeginTransaction,
37
+ I as getDustThreshold,
38
+ K as getNetwork,
39
+ O as getPsbtInputFields,
40
+ P as getScriptType,
41
+ b as parseUnfundedWasmTransaction,
41
42
  M as peginOutputCount,
42
- b as rateBasedTxBufferFee,
43
- P as selectUtxosForPegin,
44
- U as shouldAddChangeOutput,
45
- G as validateUtxosAvailable,
46
- l as waitForTransactionReceiptSmartAware
43
+ v as rateBasedTxBufferFee,
44
+ U as selectUtxosForPegin,
45
+ l as shouldAddChangeOutput,
46
+ V as validateUtxosAvailable,
47
+ F as waitForTransactionReceiptSmartAware
47
48
  };
48
49
  //# sourceMappingURL=index.js.map