@babylonlabs-io/ts-sdk 0.51.1 → 0.53.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/dist/ApplicationRegistry.abi-CLaa6E99.cjs +2 -0
  2. package/dist/ApplicationRegistry.abi-CLaa6E99.cjs.map +1 -0
  3. package/dist/{ApplicationRegistry.abi-Dn2qk6JG.js → ApplicationRegistry.abi-w5prf7Ig.js} +14 -1
  4. package/dist/ApplicationRegistry.abi-w5prf7Ig.js.map +1 -0
  5. package/dist/PayoutManager-1GWmbvI9.cjs +2 -0
  6. package/dist/PayoutManager-1GWmbvI9.cjs.map +1 -0
  7. package/dist/{PayoutManager-D26nGR-e.js → PayoutManager-Ddo9_Ozc.js} +34 -32
  8. package/dist/PayoutManager-Ddo9_Ozc.js.map +1 -0
  9. package/dist/{PeginManager-COxRVrxa.js → PeginManager-CTU0wgkJ.js} +37 -34
  10. package/dist/PeginManager-CTU0wgkJ.js.map +1 -0
  11. package/dist/PeginManager-De-eHl3v.cjs +2 -0
  12. package/dist/PeginManager-De-eHl3v.cjs.map +1 -0
  13. package/dist/buildAndBroadcastRefund-BnD2qUDW.cjs +2 -0
  14. package/dist/buildAndBroadcastRefund-BnD2qUDW.cjs.map +1 -0
  15. package/dist/{buildAndBroadcastRefund-Bmz9WJuN.js → buildAndBroadcastRefund-DjS9nf87.js} +221 -209
  16. package/dist/buildAndBroadcastRefund-DjS9nf87.js.map +1 -0
  17. package/dist/{challengeAssert-HNbugpqL.cjs → challengeAssert-DLQfNcfU.cjs} +2 -2
  18. package/dist/{challengeAssert-HNbugpqL.cjs.map → challengeAssert-DLQfNcfU.cjs.map} +1 -1
  19. package/dist/{challengeAssert-csvYXBJB.js → challengeAssert-DvdbpEDY.js} +2 -2
  20. package/dist/{challengeAssert-csvYXBJB.js.map → challengeAssert-DvdbpEDY.js.map} +1 -1
  21. package/dist/constants-BhclpREj.js +19 -0
  22. package/dist/constants-BhclpREj.js.map +1 -0
  23. package/dist/constants-CvbARMl-.cjs +2 -0
  24. package/dist/constants-CvbARMl-.cjs.map +1 -0
  25. package/dist/index.cjs +1 -1
  26. package/dist/index.js +193 -190
  27. package/dist/index.js.map +1 -1
  28. package/dist/{mempoolApi-Dc1KSVNI.js → mempoolApi-CB7bHuwi.js} +106 -101
  29. package/dist/mempoolApi-CB7bHuwi.js.map +1 -0
  30. package/dist/mempoolApi-DqJByvqR.cjs +2 -0
  31. package/dist/mempoolApi-DqJByvqR.cjs.map +1 -0
  32. package/dist/noPayout-8dDKwi6n.cjs +2 -0
  33. package/dist/noPayout-8dDKwi6n.cjs.map +1 -0
  34. package/dist/{noPayout-C1WCsqfd.js → noPayout-tZFoNun3.js} +12 -10
  35. package/dist/noPayout-tZFoNun3.js.map +1 -0
  36. package/dist/{peginInput-BPRB9tUi.js → peginInput-BKD_b3gq.js} +8 -7
  37. package/dist/peginInput-BKD_b3gq.js.map +1 -0
  38. package/dist/peginInput-CAiiDZeO.cjs +2 -0
  39. package/dist/peginInput-CAiiDZeO.cjs.map +1 -0
  40. package/dist/primeVpAuth-CF4cH5_e.cjs +2 -0
  41. package/dist/primeVpAuth-CF4cH5_e.cjs.map +1 -0
  42. package/dist/{primeVpAuth-DxMuWQCi.js → primeVpAuth-l-5x_2UV.js} +91 -85
  43. package/dist/{primeVpAuth-yTddDmGy.cjs.map → primeVpAuth-l-5x_2UV.js.map} +1 -1
  44. package/dist/tbv/core/clients/eth/protocol-params-reader.d.ts.map +1 -1
  45. package/dist/tbv/core/clients/eth/protocol-params-validation.d.ts.map +1 -1
  46. package/dist/tbv/core/clients/eth/types.d.ts +8 -0
  47. package/dist/tbv/core/clients/eth/types.d.ts.map +1 -1
  48. package/dist/tbv/core/clients/index.cjs +1 -1
  49. package/dist/tbv/core/clients/index.js +2 -2
  50. package/dist/tbv/core/contracts/abis/ProtocolParams.abi.d.ts +10 -0
  51. package/dist/tbv/core/contracts/abis/ProtocolParams.abi.d.ts.map +1 -1
  52. package/dist/tbv/core/contracts/index.cjs +1 -1
  53. package/dist/tbv/core/contracts/index.js +1 -1
  54. package/dist/tbv/core/index.cjs +1 -1
  55. package/dist/tbv/core/index.js +191 -188
  56. package/dist/tbv/core/index.js.map +1 -1
  57. package/dist/tbv/core/managers/PayoutManager.d.ts +6 -0
  58. package/dist/tbv/core/managers/PayoutManager.d.ts.map +1 -1
  59. package/dist/tbv/core/managers/PeginManager.d.ts +7 -0
  60. package/dist/tbv/core/managers/PeginManager.d.ts.map +1 -1
  61. package/dist/tbv/core/managers/index.cjs +1 -1
  62. package/dist/tbv/core/managers/index.js +2 -2
  63. package/dist/tbv/core/primitives/__tests__/vaultCoreVersion.test.d.ts +8 -0
  64. package/dist/tbv/core/primitives/__tests__/vaultCoreVersion.test.d.ts.map +1 -0
  65. package/dist/tbv/core/primitives/index.cjs +1 -1
  66. package/dist/tbv/core/primitives/index.d.ts +2 -1
  67. package/dist/tbv/core/primitives/index.d.ts.map +1 -1
  68. package/dist/tbv/core/primitives/index.js +39 -36
  69. package/dist/tbv/core/primitives/index.js.map +1 -1
  70. package/dist/tbv/core/primitives/psbt/assertWasmPeginSizing.d.ts.map +1 -1
  71. package/dist/tbv/core/primitives/psbt/payout.d.ts +6 -0
  72. package/dist/tbv/core/primitives/psbt/payout.d.ts.map +1 -1
  73. package/dist/tbv/core/primitives/psbt/pegin.d.ts +7 -0
  74. package/dist/tbv/core/primitives/psbt/pegin.d.ts.map +1 -1
  75. package/dist/tbv/core/primitives/psbt/peginInput.d.ts +6 -0
  76. package/dist/tbv/core/primitives/psbt/peginInput.d.ts.map +1 -1
  77. package/dist/tbv/core/primitives/psbt/refund.d.ts.map +1 -1
  78. package/dist/tbv/core/primitives/scripts/payout.d.ts +6 -0
  79. package/dist/tbv/core/primitives/scripts/payout.d.ts.map +1 -1
  80. package/dist/tbv/core/primitives/vaultCoreVersion.d.ts +26 -0
  81. package/dist/tbv/core/primitives/vaultCoreVersion.d.ts.map +1 -0
  82. package/dist/tbv/core/services/deposit/runDepositorPresignFlow.d.ts +7 -0
  83. package/dist/tbv/core/services/deposit/runDepositorPresignFlow.d.ts.map +1 -1
  84. package/dist/tbv/core/services/deposit/signDepositorGraph.d.ts +6 -0
  85. package/dist/tbv/core/services/deposit/signDepositorGraph.d.ts.map +1 -1
  86. package/dist/tbv/core/services/deposit/verifyRegisteredVaultVersions.d.ts +8 -0
  87. package/dist/tbv/core/services/deposit/verifyRegisteredVaultVersions.d.ts.map +1 -1
  88. package/dist/tbv/core/services/index.cjs +1 -1
  89. package/dist/tbv/core/services/index.js +2 -2
  90. package/dist/tbv/core/services/refund/buildAndBroadcastRefund.d.ts +6 -0
  91. package/dist/tbv/core/services/refund/buildAndBroadcastRefund.d.ts.map +1 -1
  92. package/dist/tbv/core/vault-secrets/__tests__/expand.test.d.ts +5 -2
  93. package/dist/tbv/core/vault-secrets/__tests__/expand.test.d.ts.map +1 -1
  94. package/dist/tbv/index.cjs +1 -1
  95. package/dist/tbv/index.js +191 -188
  96. package/dist/tbv/index.js.map +1 -1
  97. package/dist/{verifyScriptPathSchnorrSignature-CeZp6tMw.js → verifyScriptPathSchnorrSignature-DpWZx5J0.js} +67 -61
  98. package/dist/verifyScriptPathSchnorrSignature-DpWZx5J0.js.map +1 -0
  99. package/dist/verifyScriptPathSchnorrSignature-a4Us7D3e.cjs +2 -0
  100. package/dist/verifyScriptPathSchnorrSignature-a4Us7D3e.cjs.map +1 -0
  101. package/package.json +1 -1
  102. package/dist/ApplicationRegistry.abi-BAPhJch3.cjs +0 -2
  103. package/dist/ApplicationRegistry.abi-BAPhJch3.cjs.map +0 -1
  104. package/dist/ApplicationRegistry.abi-Dn2qk6JG.js.map +0 -1
  105. package/dist/PayoutManager-BZVEyi10.cjs +0 -2
  106. package/dist/PayoutManager-BZVEyi10.cjs.map +0 -1
  107. package/dist/PayoutManager-D26nGR-e.js.map +0 -1
  108. package/dist/PeginManager-BvxfSwsr.cjs +0 -2
  109. package/dist/PeginManager-BvxfSwsr.cjs.map +0 -1
  110. package/dist/PeginManager-COxRVrxa.js.map +0 -1
  111. package/dist/buildAndBroadcastRefund-Bmz9WJuN.js.map +0 -1
  112. package/dist/buildAndBroadcastRefund-ob1n2iB3.cjs +0 -2
  113. package/dist/buildAndBroadcastRefund-ob1n2iB3.cjs.map +0 -1
  114. package/dist/constants-CSG2XeD8.cjs +0 -2
  115. package/dist/constants-CSG2XeD8.cjs.map +0 -1
  116. package/dist/constants-Cd_fN8VT.js +0 -12
  117. package/dist/constants-Cd_fN8VT.js.map +0 -1
  118. package/dist/mempoolApi-Dc1KSVNI.js.map +0 -1
  119. package/dist/mempoolApi-NMiYQAXI.cjs +0 -2
  120. package/dist/mempoolApi-NMiYQAXI.cjs.map +0 -1
  121. package/dist/noPayout-C1WCsqfd.js.map +0 -1
  122. package/dist/noPayout-lyIRiUyG.cjs +0 -2
  123. package/dist/noPayout-lyIRiUyG.cjs.map +0 -1
  124. package/dist/peginInput-BPRB9tUi.js.map +0 -1
  125. package/dist/peginInput-DH6X4ITS.cjs +0 -2
  126. package/dist/peginInput-DH6X4ITS.cjs.map +0 -1
  127. package/dist/primeVpAuth-DxMuWQCi.js.map +0 -1
  128. package/dist/primeVpAuth-yTddDmGy.cjs +0 -2
  129. package/dist/verifyScriptPathSchnorrSignature-CeZp6tMw.js.map +0 -1
  130. package/dist/verifyScriptPathSchnorrSignature-Cl7tu77P.cjs +0 -2
  131. package/dist/verifyScriptPathSchnorrSignature-Cl7tu77P.cjs.map +0 -1
@@ -9,15 +9,15 @@ import { isAddressEqual as ft, encodeFunctionData as tt, zeroAddress as Jt } fro
9
9
  import { B as A } from "./BTCVaultRegistry.abi-Chs4AFBj.js";
10
10
  import { h as H } from "./errors-Blc-JWnI.js";
11
11
  import { expandWotsSeed as te, expandHashlockSecret as ee, expandAuthAnchor as ne, deriveVaultId as pt } from "@babylonlabs-io/babylon-tbv-rust-wasm";
12
- import { a as mt, b as se, d as Pt, f as oe } from "./verifyScriptPathSchnorrSignature-CeZp6tMw.js";
13
- import { b as re, e as ie, f as ae } from "./peginInput-BPRB9tUi.js";
14
- import { u as X, h as et, e as S, p as ce, i as bt, s as T, j as wt, X as le } from "./bitcoin-B5aNKtsk.js";
12
+ import { a as mt, b as se, d as Pt, f as oe } from "./verifyScriptPathSchnorrSignature-DpWZx5J0.js";
13
+ import { b as re, e as ie, f as ae } from "./peginInput-BKD_b3gq.js";
14
+ import { u as X, h as et, e as v, p as ce, i as bt, s as T, j as wt, X as le } from "./bitcoin-B5aNKtsk.js";
15
15
  import { c as ue } from "./signing-DaLvGwQe.js";
16
16
  import { M as yt } from "./validation-CxqROCno.js";
17
- import { c as he, a as de } from "./PayoutManager-D26nGR-e.js";
17
+ import { c as he, a as de } from "./PayoutManager-Ddo9_Ozc.js";
18
18
  import { s as ge, f as q, i as fe, w as xt } from "./waitForTransactionReceiptSmartAware-Ckg_oZAo.js";
19
19
  import { p as pe, f as me } from "./fundPeginTransaction-96FxwYYJ.js";
20
- import { p as Pe, V as be, i as we } from "./mempoolApi-Dc1KSVNI.js";
20
+ import { p as Pe, V as be, i as we } from "./mempoolApi-CB7bHuwi.js";
21
21
  const M = /* @__PURE__ */ BigInt(2 ** 32 - 1), kt = /* @__PURE__ */ BigInt(32);
22
22
  function ye(n, t = !1) {
23
23
  return t ? { h: Number(n & M), l: Number(n >> kt & M) } : { h: Number(n >> kt & M) | 0, l: Number(n & M) | 0 };
@@ -35,7 +35,7 @@ const ke = (n, t, e) => n << e | t >>> 32 - e, Ee = (n, t, e) => t << e | n >>>
35
35
  function st(n, t, e) {
36
36
  n[t] = e >>> 24 & 255, n[t + 1] = e >>> 16 & 255, n[t + 2] = e >>> 8 & 255, n[t + 3] = e & 255;
37
37
  }
38
- function Se(n) {
38
+ function ve(n) {
39
39
  if (n.txid.length !== z)
40
40
  throw new Error(
41
41
  `outpoint.txid must be exactly ${z} bytes, got ${n.txid.length}`
@@ -51,12 +51,12 @@ function Et(n, t) {
51
51
  if (n[s] !== t[s]) return n[s] - t[s];
52
52
  return n.length - t.length;
53
53
  }
54
- function ve(n) {
54
+ function Se(n) {
55
55
  if (n.length === 0)
56
56
  throw new Error(
57
57
  "buildFundingOutpointsCommitment: outpoints must be non-empty"
58
58
  );
59
- const t = n.map(Se);
59
+ const t = n.map(ve);
60
60
  t.sort(Et);
61
61
  for (let s = 1; s < t.length; s++)
62
62
  if (Et(t[s - 1], t[s]) === 0)
@@ -73,7 +73,7 @@ function Ie(n) {
73
73
  throw new Error(
74
74
  `vaultContext: depositorBtcPubkey must be exactly ${U} bytes, got ${n.depositorBtcPubkey.length}`
75
75
  );
76
- const t = ve(n.fundingOutpoints), e = new Uint8Array(Be);
76
+ const t = Se(n.fundingOutpoints), e = new Uint8Array(Be);
77
77
  let s = 0;
78
78
  return st(e, s, U), s += K, e.set(n.depositorBtcPubkey, s), s += U, st(e, s, Ht), s += K, e.set(t, s), e;
79
79
  }
@@ -161,13 +161,13 @@ class Ne extends Yt {
161
161
  N[g] = e.getUint32(s, !0);
162
162
  let o = this.h0 | 0, r = o, i = this.h1 | 0, a = i, c = this.h2 | 0, h = c, l = this.h3 | 0, m = l, P = this.h4 | 0, b = P;
163
163
  for (let g = 0; g < 5; g++) {
164
- const f = 4 - g, k = Ve[g], v = Me[g], E = Ut[g], p = Vt[g], w = $e[g], y = Ue[g];
164
+ const f = 4 - g, k = Ve[g], S = Me[g], E = Ut[g], p = Vt[g], w = $e[g], y = Ue[g];
165
165
  for (let d = 0; d < 16; d++) {
166
166
  const u = V(o + _t(g, i, c, l) + N[E[d]] + k, w[d]) + P | 0;
167
167
  o = P, P = l, l = V(c, 10) | 0, c = i, i = u;
168
168
  }
169
169
  for (let d = 0; d < 16; d++) {
170
- const u = V(r + _t(f, a, h, m) + N[p[d]] + v, y[d]) + b | 0;
170
+ const u = V(r + _t(f, a, h, m) + N[p[d]] + S, y[d]) + b | 0;
171
171
  r = b, b = m, m = V(h, 10) | 0, h = a, a = u;
172
172
  }
173
173
  }
@@ -188,20 +188,20 @@ for (let n = 0, t = R, e = 1, s = 0; n < 24; n++) {
188
188
  t = (t << R ^ (t >> Xe) * De) % Ke, t & We && (o ^= R << (R << BigInt(r)) - R);
189
189
  Lt.push(o);
190
190
  }
191
- const Wt = xe(Lt, !0), Ge = Wt[0], qe = Wt[1], Bt = (n, t, e) => e > 32 ? Te(n, t, e) : ke(n, t, e), St = (n, t, e) => e > 32 ? _e(n, t, e) : Ee(n, t, e);
191
+ const Wt = xe(Lt, !0), Ge = Wt[0], qe = Wt[1], Bt = (n, t, e) => e > 32 ? Te(n, t, e) : ke(n, t, e), vt = (n, t, e) => e > 32 ? _e(n, t, e) : Ee(n, t, e);
192
192
  function ze(n, t = 24) {
193
193
  const e = new Uint32Array(10);
194
194
  for (let s = 24 - t; s < 24; s++) {
195
195
  for (let i = 0; i < 10; i++)
196
196
  e[i] = n[i] ^ n[i + 10] ^ n[i + 20] ^ n[i + 30] ^ n[i + 40];
197
197
  for (let i = 0; i < 10; i += 2) {
198
- const a = (i + 8) % 10, c = (i + 2) % 10, h = e[c], l = e[c + 1], m = Bt(h, l, 1) ^ e[a], P = St(h, l, 1) ^ e[a + 1];
198
+ const a = (i + 8) % 10, c = (i + 2) % 10, h = e[c], l = e[c + 1], m = Bt(h, l, 1) ^ e[a], P = vt(h, l, 1) ^ e[a + 1];
199
199
  for (let b = 0; b < 50; b += 10)
200
200
  n[i + b] ^= m, n[i + b + 1] ^= P;
201
201
  }
202
202
  let o = n[2], r = n[3];
203
203
  for (let i = 0; i < 24; i++) {
204
- const a = Ft[i], c = Bt(o, r, a), h = St(o, r, a), l = Nt[i];
204
+ const a = Ft[i], c = Bt(o, r, a), h = vt(o, r, a), l = Nt[i];
205
205
  o = n[l], r = n[l + 1], n[l] = c, n[l + 1] = h;
206
206
  }
207
207
  for (let i = 0; i < 50; i += 10) {
@@ -290,7 +290,7 @@ class at {
290
290
  return t || (t = new at(e, s, o, i, r)), t.state32.set(this.state32), t.pos = this.pos, t.posOut = this.posOut, t.finished = this.finished, t.rounds = r, t.suffix = s, t.outputLen = o, t.enableXOF = i, t.destroyed = this.destroyed, t;
291
291
  }
292
292
  }
293
- const Ye = (n, t, e, s = {}) => At(() => new at(t, n, e), s), je = /* @__PURE__ */ Ye(1, 136, 32), vt = 64, _ = 20, ot = 4, Xt = 2, Ze = 0, Qe = 1, F = [64, 64], Je = (n) => Array.from(n).map((t) => t.toString(16).padStart(2, "0")).join("");
293
+ const Ye = (n, t, e, s = {}) => At(() => new at(t, n, e), s), je = /* @__PURE__ */ Ye(1, 136, 32), St = 64, _ = 20, ot = 4, Xt = 2, Ze = 0, Qe = 1, F = [64, 64], Je = (n) => Array.from(n).map((t) => t.toString(16).padStart(2, "0")).join("");
294
294
  function ct(n) {
295
295
  return Fe(it(n));
296
296
  }
@@ -351,9 +351,9 @@ function nn(n, t) {
351
351
  }
352
352
  async function sn(n) {
353
353
  try {
354
- if (n.length !== vt)
354
+ if (n.length !== St)
355
355
  throw new Error(
356
- `WOTS seed must be exactly ${vt} bytes, got ${n.length}`
356
+ `WOTS seed must be exactly ${St} bytes, got ${n.length}`
357
357
  );
358
358
  const t = [];
359
359
  for (let e = 0; e < F.length; e++) {
@@ -450,7 +450,7 @@ async function rn(n, t) {
450
450
  const c = await ee(n, i);
451
451
  try {
452
452
  const h = X(c);
453
- o.push(h), r.push(he(S(h)).slice(2));
453
+ o.push(h), r.push(he(v(h)).slice(2));
454
454
  } finally {
455
455
  c.fill(0);
456
456
  }
@@ -631,6 +631,7 @@ class Vn {
631
631
  const s = e.amounts.map(
632
632
  () => Q
633
633
  ), o = e.vaultKeeperBtcPubkeys.length, r = await mt({
634
+ vaultCoreVersion: e.vaultCoreVersion,
634
635
  depositorPubkey: t,
635
636
  vaultProviderPubkey: T(e.vaultProviderBtcPubkey),
636
637
  vaultKeeperPubkeys: e.vaultKeeperBtcPubkeys.map(T),
@@ -679,6 +680,7 @@ class Vn {
679
680
  const h = T(
680
681
  a.vaultProviderBtcPubkey
681
682
  ), l = a.vaultKeeperBtcPubkeys.map(T), m = a.universalChallengerBtcPubkeys.map(T), P = l.length, b = {
683
+ vaultCoreVersion: a.vaultCoreVersion,
682
684
  depositorPubkey: s,
683
685
  vaultProviderPubkey: h,
684
686
  vaultKeeperPubkeys: l,
@@ -699,7 +701,7 @@ class Vn {
699
701
  changeAddress: a.changeAddress,
700
702
  changeAmount: i.changeAmount,
701
703
  network: f
702
- }), v = T(
704
+ }), S = T(
703
705
  q(k)
704
706
  ), E = [], p = [], w = [];
705
707
  for (let u = 0; u < o.length; u++) {
@@ -709,6 +711,7 @@ class Vn {
709
711
  fundedPrePeginTxHex: k,
710
712
  htlcVout: u
711
713
  }), I = await re({
714
+ vaultCoreVersion: a.vaultCoreVersion,
712
715
  peginTxHex: B.txHex,
713
716
  fundedPrePeginTxHex: k,
714
717
  depositorPubkey: s,
@@ -755,7 +758,7 @@ class Vn {
755
758
  }
756
759
  return {
757
760
  fundedPrePeginTxHex: k,
758
- prePeginTxid: v,
761
+ prePeginTxid: S,
759
762
  perVault: d
760
763
  };
761
764
  }
@@ -840,8 +843,8 @@ class Vn {
840
843
  `PSBT finalization failed and wallet did not auto-finalize: ${p}`
841
844
  );
842
845
  }
843
- const v = k.extractTransaction().toHex();
844
- return await Pe(v, c);
846
+ const S = k.extractTransaction().toHex();
847
+ return await Pe(S, c);
845
848
  }
846
849
  /**
847
850
  * Registers a peg-in on Ethereum by calling the BTCVaultRegistry contract.
@@ -885,15 +888,15 @@ class Vn {
885
888
  throw new Error(
886
889
  `Proof of possession was signed for ${h.depositorEthAddress} but the Ethereum wallet is currently connected to ${l}. Reconnect the original account or call signProofOfPossession() again.`
887
890
  );
888
- const m = await this.assertPopMatchesBtcWallet(h), P = h.btcPopSignature, b = S(
891
+ const m = await this.assertPopMatchesBtcWallet(h), P = h.btcPopSignature, b = v(
889
892
  h.depositorBtcPubkey
890
- ), g = S(e), f = S(s), k = a ?? await this.config.btcWallet.getAddress(), v = this.resolvePayoutScriptPubKey(
893
+ ), g = v(e), f = v(s), k = a ?? await this.config.btcWallet.getAddress(), S = this.resolvePayoutScriptPubKey(
891
894
  m,
892
895
  k
893
896
  ), E = q(f), p = await pt(
894
897
  T(E),
895
898
  T(l)
896
- ), w = S(p);
899
+ ), w = v(p);
897
900
  if (await this.checkVaultExists(w))
898
901
  throw new Error(
899
902
  `Vault already exists (ID: ${w}, peginTxHash: ${E}). Vault IDs are derived from the pegin transaction hash and depositor address. To create a new vault, use different UTXOs or a different amount to generate a unique transaction.`
@@ -929,7 +932,7 @@ class Vn {
929
932
  B,
930
933
  r,
931
934
  i,
932
- v,
935
+ S,
933
936
  c
934
937
  ]
935
938
  });
@@ -1001,12 +1004,12 @@ class Vn {
1001
1004
  )
1002
1005
  ), l = [];
1003
1006
  for (const d of o) {
1004
- const u = S(
1007
+ const u = v(
1005
1008
  d.depositorSignedPeginTx
1006
1009
  ), B = q(u), I = await pt(
1007
1010
  T(B),
1008
1011
  T(i)
1009
- ), C = S(I);
1012
+ ), C = v(I);
1010
1013
  if (await this.checkVaultExists(C))
1011
1014
  throw new Error(
1012
1015
  `Vault already exists (ID: ${C}, peginTxHash: ${B}). To create a new vault, use different UTXOs or a different amount.`
@@ -1031,13 +1034,13 @@ class Vn {
1031
1034
  const b = P * BigInt(o.length), g = await this.resolveMaxAcceptableCommissionBps(
1032
1035
  e,
1033
1036
  t.quotedCommissionBps
1034
- ), f = S(
1037
+ ), f = v(
1035
1038
  r.depositorBtcPubkey
1036
- ), k = S(s), v = o.map((d, u) => ({
1039
+ ), k = v(s), S = o.map((d, u) => ({
1037
1040
  depositorBtcPubKey: f,
1038
1041
  btcPopSignature: c,
1039
1042
  unsignedPrePeginTx: k,
1040
- depositorSignedPeginTx: S(
1043
+ depositorSignedPeginTx: v(
1041
1044
  d.depositorSignedPeginTx
1042
1045
  ),
1043
1046
  hashlock: d.hashlock,
@@ -1052,7 +1055,7 @@ class Vn {
1052
1055
  i,
1053
1056
  e,
1054
1057
  g,
1055
- v
1058
+ S
1056
1059
  ]
1057
1060
  });
1058
1061
  let p;
@@ -1298,10 +1301,10 @@ export {
1298
1301
  Vn as P,
1299
1302
  Ae as V,
1300
1303
  Ie as a,
1301
- ve as b,
1304
+ Se as b,
1302
1305
  on as c,
1303
1306
  sn as d,
1304
1307
  Mn as e,
1305
1308
  He as f
1306
1309
  };
1307
- //# sourceMappingURL=PeginManager-COxRVrxa.js.map
1310
+ //# sourceMappingURL=PeginManager-CTU0wgkJ.js.map