@babylonlabs-io/ts-sdk 0.70.0 → 0.70.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 (65) hide show
  1. package/dist/{PeginManager-erlaJqpN.js → PeginManager-BNtg6jgY.js} +5 -5
  2. package/dist/{PeginManager-erlaJqpN.js.map → PeginManager-BNtg6jgY.js.map} +1 -1
  3. package/dist/{PeginManager-BpouMHkS.cjs → PeginManager-CvI99Uhd.cjs} +2 -2
  4. package/dist/{PeginManager-BpouMHkS.cjs.map → PeginManager-CvI99Uhd.cjs.map} +1 -1
  5. package/dist/{batchPoll-Bc_UKaTz.js → batchPoll-BM4iQ9jT.js} +3 -3
  6. package/dist/{batchPoll-Bc_UKaTz.js.map → batchPoll-BM4iQ9jT.js.map} +1 -1
  7. package/dist/{batchPoll-C9cZ5usJ.cjs → batchPoll-cqpEfBjr.cjs} +2 -2
  8. package/dist/{batchPoll-C9cZ5usJ.cjs.map → batchPoll-cqpEfBjr.cjs.map} +1 -1
  9. package/dist/buildAndBroadcastReclaim-iNJfx0ZG.cjs +2 -0
  10. package/dist/buildAndBroadcastReclaim-iNJfx0ZG.cjs.map +1 -0
  11. package/dist/{buildAndBroadcastReclaim-CBPDgfj7.js → buildAndBroadcastReclaim-kBHwOL02.js} +20 -20
  12. package/dist/buildAndBroadcastReclaim-kBHwOL02.js.map +1 -0
  13. package/dist/constants-BCdDRd_Y.cjs +2 -0
  14. package/dist/constants-BCdDRd_Y.cjs.map +1 -0
  15. package/dist/constants-DRiWbItj.js +24 -0
  16. package/dist/constants-DRiWbItj.js.map +1 -0
  17. package/dist/index.cjs +1 -1
  18. package/dist/index.js +9 -9
  19. package/dist/{mempoolApi-71R_CNZa.js → mempoolApi-CfOFmov6.js} +2 -2
  20. package/dist/{mempoolApi-71R_CNZa.js.map → mempoolApi-CfOFmov6.js.map} +1 -1
  21. package/dist/{mempoolApi-BJN9fGEd.cjs → mempoolApi-Q90mz17e.cjs} +2 -2
  22. package/dist/{mempoolApi-BJN9fGEd.cjs.map → mempoolApi-Q90mz17e.cjs.map} +1 -1
  23. package/dist/{noPayout-Cbi9TCRz.cjs → noPayout-BKP3mRu3.cjs} +2 -2
  24. package/dist/{noPayout-Cbi9TCRz.cjs.map → noPayout-BKP3mRu3.cjs.map} +1 -1
  25. package/dist/{noPayout-CDi6f5-I.js → noPayout-BdATUPjF.js} +2 -2
  26. package/dist/{noPayout-CDi6f5-I.js.map → noPayout-BdATUPjF.js.map} +1 -1
  27. package/dist/signPsbtsWithFallback-Bo1PJX90.cjs +2 -0
  28. package/dist/signPsbtsWithFallback-Bo1PJX90.cjs.map +1 -0
  29. package/dist/{signPsbtsWithFallback-DVyK-9A-.js → signPsbtsWithFallback-X6ivsbh7.js} +56 -47
  30. package/dist/signPsbtsWithFallback-X6ivsbh7.js.map +1 -0
  31. package/dist/tbv/core/clients/index.cjs +1 -1
  32. package/dist/tbv/core/clients/index.js +2 -2
  33. package/dist/tbv/core/index.cjs +1 -1
  34. package/dist/tbv/core/index.js +9 -9
  35. package/dist/tbv/core/managers/PayoutManager.d.ts.map +1 -1
  36. package/dist/tbv/core/managers/index.cjs +1 -1
  37. package/dist/tbv/core/managers/index.js +2 -2
  38. package/dist/tbv/core/primitives/index.cjs +1 -1
  39. package/dist/tbv/core/primitives/index.js +3 -3
  40. package/dist/tbv/core/primitives/psbt/constants.d.ts +7 -0
  41. package/dist/tbv/core/primitives/psbt/constants.d.ts.map +1 -1
  42. package/dist/tbv/core/services/deposit/signDepositorGraph.d.ts.map +1 -1
  43. package/dist/tbv/core/services/index.cjs +1 -1
  44. package/dist/tbv/core/services/index.js +2 -2
  45. package/dist/tbv/index.cjs +1 -1
  46. package/dist/tbv/index.js +9 -9
  47. package/dist/{toRefundInputs-Cn6z5_Ko.cjs → toRefundInputs-BJojfg3k.cjs} +2 -2
  48. package/dist/{toRefundInputs-Cn6z5_Ko.cjs.map → toRefundInputs-BJojfg3k.cjs.map} +1 -1
  49. package/dist/{toRefundInputs-ZkvoR5Df.js → toRefundInputs-DPNYBFkP.js} +4 -4
  50. package/dist/{toRefundInputs-ZkvoR5Df.js.map → toRefundInputs-DPNYBFkP.js.map} +1 -1
  51. package/dist/{verifyScriptPathSchnorrSignature-B7MhJmhy.js → verifyScriptPathSchnorrSignature-CQYucnJA.js} +2 -2
  52. package/dist/{verifyScriptPathSchnorrSignature-B7MhJmhy.js.map → verifyScriptPathSchnorrSignature-CQYucnJA.js.map} +1 -1
  53. package/dist/{verifyScriptPathSchnorrSignature-BBS9oCPO.cjs → verifyScriptPathSchnorrSignature-D-ppKNjT.cjs} +2 -2
  54. package/dist/{verifyScriptPathSchnorrSignature-BBS9oCPO.cjs.map → verifyScriptPathSchnorrSignature-D-ppKNjT.cjs.map} +1 -1
  55. package/package.json +1 -1
  56. package/dist/buildAndBroadcastReclaim-CBPDgfj7.js.map +0 -1
  57. package/dist/buildAndBroadcastReclaim-DsJ5CB_H.cjs +0 -2
  58. package/dist/buildAndBroadcastReclaim-DsJ5CB_H.cjs.map +0 -1
  59. package/dist/constants-DU5CGcqO.cjs +0 -2
  60. package/dist/constants-DU5CGcqO.cjs.map +0 -1
  61. package/dist/constants-GjWXdaqV.js +0 -23
  62. package/dist/constants-GjWXdaqV.js.map +0 -1
  63. package/dist/signPsbtsWithFallback-DVyK-9A-.js.map +0 -1
  64. package/dist/signPsbtsWithFallback-DY2jBtNB.cjs +0 -2
  65. package/dist/signPsbtsWithFallback-DY2jBtNB.cjs.map +0 -1
@@ -3,15 +3,15 @@ var ke = (e, t, r) => t in e ? Ee(e, t, { enumerable: !0, configurable: !0, writ
3
3
  var C = (e, t, r) => ke(e, typeof t != "symbol" ? t + "" : t, r);
4
4
  import { B as ae } from "./BTCVaultRegistry.abi-CJwWI2EO.js";
5
5
  import { e as xe, v as Te, s as y, u as ie, p as O, c as x, f as R } from "./bitcoin-Ch_jxnDa.js";
6
- import { v as Ae, d as Re, s as Ce, P as _e, a as Se } from "./signPsbtsWithFallback-DVyK-9A-.js";
6
+ import { v as Ae, d as Re, s as Ce, P as _e, a as Se } from "./signPsbtsWithFallback-X6ivsbh7.js";
7
7
  import { zeroAddress as $e } from "viem";
8
8
  import { D as T, c as Be, b as Ie, R as Ve, d as ue } from "./json-rpc-client-DuUARJvV.js";
9
9
  import { Transaction as _, Psbt as le } from "bitcoinjs-lib";
10
- import { m as Ke, f as Oe, i as B, g as I, j as V } from "./verifyScriptPathSchnorrSignature-B7MhJmhy.js";
11
- import { d as Ne, c as He, b as De, e as Fe, a as Me } from "./noPayout-CDi6f5-I.js";
10
+ import { m as Ke, f as Oe, i as B, g as I, j as V } from "./verifyScriptPathSchnorrSignature-CQYucnJA.js";
11
+ import { D as X, a as Ne } from "./constants-DRiWbItj.js";
12
+ import { d as He, c as De, b as Fe, e as Me, a as Ue } from "./noPayout-BdATUPjF.js";
12
13
  import { c as K } from "./signing-DaLvGwQe.js";
13
- import { a as X } from "./onChainBtcPubkey-BAHZyKQL.js";
14
- import { a as Ue } from "./constants-GjWXdaqV.js";
14
+ import { a as G } from "./onChainBtcPubkey-BAHZyKQL.js";
15
15
  const Le = /^0x[0-9a-fA-F]{64}$/, ze = /^0x[0-9a-fA-F]{40}$/, Xe = /^0x([0-9a-fA-F]{2})*$/;
16
16
  function N(e, t) {
17
17
  if (e.length !== 66)
@@ -100,7 +100,7 @@ function Je(e) {
100
100
  function Qt(e) {
101
101
  return e instanceof de || e instanceof Error && e.name === "PeginRegistrationNotFinalError";
102
102
  }
103
- function G(e) {
103
+ function q(e) {
104
104
  const { currentBlock: t, createdAtBlock: r } = e, o = t - r + 1n;
105
105
  return o < 0n ? 0 : Number(o);
106
106
  }
@@ -146,12 +146,12 @@ async function Wt(e) {
146
146
  ), i == null || i({ confirmations: 0, required: a });
147
147
  } else {
148
148
  h = !0, c = 0, d = void 0;
149
- let f = g[0], P = G({
149
+ let f = g[0], P = q({
150
150
  currentBlock: p,
151
151
  createdAtBlock: g[0].createdAt
152
152
  });
153
153
  for (const v of g.slice(1)) {
154
- const m = G({
154
+ const m = q({
155
155
  currentBlock: p,
156
156
  createdAtBlock: v.createdAt
157
157
  });
@@ -181,7 +181,7 @@ async function Wt(e) {
181
181
  });
182
182
  }
183
183
  }
184
- const q = 1, Ze = 1;
184
+ const Ze = 1;
185
185
  function et(e, t, r) {
186
186
  const o = r.map(
187
187
  (c) => y(c).toLowerCase()
@@ -255,7 +255,7 @@ async function rt(e, t, r) {
255
255
  o.push(n.psbtHex), a.push(
256
256
  K(
257
257
  t,
258
- q
258
+ X
259
259
  )
260
260
  );
261
261
  const i = y(r.depositorBtcPubkey), u = _.fromHex(
@@ -273,7 +273,7 @@ async function rt(e, t, r) {
273
273
  o.push(p), a.push(
274
274
  K(
275
275
  t,
276
- q
276
+ X
277
277
  )
278
278
  ), l.push({
279
279
  challengerPubkey: c,
@@ -291,7 +291,7 @@ async function ot(e) {
291
291
  assertTxParsed: l,
292
292
  ctx: s
293
293
  } = e;
294
- Ne(
294
+ He(
295
295
  t.nopayout_tx.tx_hex,
296
296
  r,
297
297
  s.network
@@ -334,7 +334,7 @@ async function ot(e) {
334
334
  script_pubkey: ie(new Uint8Array(c.script)),
335
335
  value: c.value
336
336
  }));
337
- return He({
337
+ return De({
338
338
  noPayoutTxHex: t.nopayout_tx.tx_hex,
339
339
  challengerPubkey: r,
340
340
  prevouts: h,
@@ -749,10 +749,10 @@ async function Zt(e) {
749
749
  );
750
750
  }
751
751
  function M(e, t, r) {
752
- const o = `${e} operation key (admin=${t.ethAddress})`, a = X(
752
+ const o = `${e} operation key (admin=${t.ethAddress})`, a = G(
753
753
  t.btcPubKey,
754
754
  `${e} roster key (admin=${t.ethAddress})`
755
- ), l = X(r, o);
755
+ ), l = G(r, o);
756
756
  return {
757
757
  adminAddress: t.ethAddress,
758
758
  genesisBtcPubkey: a,
@@ -1197,7 +1197,7 @@ function $t(e) {
1197
1197
  if (U(e.offchainParamsVersion, "offchainParamsVersion"), U(e.appVaultKeepersVersion, "appVaultKeepersVersion"), U(
1198
1198
  e.universalChallengersVersion,
1199
1199
  "universalChallengersVersion"
1200
- ), Ue(
1200
+ ), Ne(
1201
1201
  e.vaultCoreVersion,
1202
1202
  "VaultRefundData.vaultCoreVersion"
1203
1203
  ), typeof e.unsignedPrePeginTxHex != "string" || e.unsignedPrePeginTxHex.length === 0)
@@ -1296,7 +1296,7 @@ async function pr(e) {
1296
1296
  throw new Error(
1297
1297
  `Funded Pre-PegIn tx has ${f.outs.length} outputs but batch requires at least ${i.batch.length} HTLC outputs. Refund refused — funded tx shape disagrees with sibling vector.`
1298
1298
  );
1299
- const { psbtHex: P } = await De({
1299
+ const { psbtHex: P } = await Fe({
1300
1300
  prePeginParams: {
1301
1301
  vaultCoreVersion: i.vaultCoreVersion,
1302
1302
  depositorPubkey: d,
@@ -1408,7 +1408,7 @@ async function fr(e) {
1408
1408
  depositorSignedPeginTxHex: v.depositorSignedPeginTxHex,
1409
1409
  observed: v.observed,
1410
1410
  expectedValue: v.expectedClaimValue
1411
- })), c = Fe(a, h.length), d = h.reduce((v, m) => v + m.expectedValue, 0n), p = d * ne / se;
1411
+ })), c = Me(a, h.length), d = h.reduce((v, m) => v + m.expectedValue, 0n), p = d * ne / se;
1412
1412
  if (c > p)
1413
1413
  throw new re(
1414
1414
  `Reclaim fee ${c} sats exceeds ${ne}/${se} of the swept total (${d} sats, cap ${p} sats). The reserve is not at risk — it stays where it is until fee rates fall.`,
@@ -1416,7 +1416,7 @@ async function fr(e) {
1416
1416
  d
1417
1417
  );
1418
1418
  n == null || n.throwIfAborted();
1419
- const { psbtHex: g } = Me({
1419
+ const { psbtHex: g } = Ue({
1420
1420
  depositorPubkey: u,
1421
1421
  inputs: h,
1422
1422
  feeSats: c
@@ -1495,4 +1495,4 @@ export {
1495
1495
  Zt as y,
1496
1496
  D as z
1497
1497
  };
1498
- //# sourceMappingURL=buildAndBroadcastReclaim-CBPDgfj7.js.map
1498
+ //# sourceMappingURL=buildAndBroadcastReclaim-kBHwOL02.js.map