@babylonlabs-io/ts-sdk 3.2.1 → 3.3.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 (70) hide show
  1. package/dist/{PeginManager-sizm3dlw.js → PeginManager-CQ9bVPR3.js} +116 -105
  2. package/dist/{PeginManager-sizm3dlw.js.map → PeginManager-CQ9bVPR3.js.map} +1 -1
  3. package/dist/PeginManager-D2R4Q1bN.cjs +2 -0
  4. package/dist/{PeginManager-BCRtUqyX.cjs.map → PeginManager-D2R4Q1bN.cjs.map} +1 -1
  5. package/dist/ProtocolParams.abi-BgEZaQ2I.cjs +2 -0
  6. package/dist/ProtocolParams.abi-BgEZaQ2I.cjs.map +1 -0
  7. package/dist/{ProtocolParams.abi-CKOVqFJP.js → ProtocolParams.abi-Cv77fsUe.js} +15 -9
  8. package/dist/ProtocolParams.abi-Cv77fsUe.js.map +1 -0
  9. package/dist/{buildAndBroadcastReclaim-rQyAiAUS.js → buildAndBroadcastReclaim-CQANDXVJ.js} +3 -3
  10. package/dist/{buildAndBroadcastReclaim-rQyAiAUS.js.map → buildAndBroadcastReclaim-CQANDXVJ.js.map} +1 -1
  11. package/dist/{buildAndBroadcastReclaim-CE77jzTp.cjs → buildAndBroadcastReclaim-DPk36Uhp.cjs} +2 -2
  12. package/dist/{buildAndBroadcastReclaim-CE77jzTp.cjs.map → buildAndBroadcastReclaim-DPk36Uhp.cjs.map} +1 -1
  13. package/dist/index.cjs +1 -1
  14. package/dist/index.js +8 -8
  15. package/dist/{pegin-registration-client-Bmkh1OZ9.cjs → pegin-registration-client-CdRyXP3j.cjs} +2 -2
  16. package/dist/{pegin-registration-client-Bmkh1OZ9.cjs.map → pegin-registration-client-CdRyXP3j.cjs.map} +1 -1
  17. package/dist/{pegin-registration-client-8tzSRDaq.js → pegin-registration-client-Cvjk4ILq.js} +2 -2
  18. package/dist/{pegin-registration-client-8tzSRDaq.js.map → pegin-registration-client-Cvjk4ILq.js.map} +1 -1
  19. package/dist/{registration-records-BBOz21Dm.js → registration-records-DJJC2NiO.js} +81 -79
  20. package/dist/{registration-records-BBOz21Dm.js.map → registration-records-DJJC2NiO.js.map} +1 -1
  21. package/dist/{registration-records-DaBufozs.cjs → registration-records-XQMIKjGV.cjs} +2 -2
  22. package/dist/{registration-records-DaBufozs.cjs.map → registration-records-XQMIKjGV.cjs.map} +1 -1
  23. package/dist/shared/index.cjs.map +1 -1
  24. package/dist/shared/index.js.map +1 -1
  25. package/dist/shared/wallets/interfaces/BitcoinWallet.d.ts +5 -0
  26. package/dist/shared/wallets/interfaces/BitcoinWallet.d.ts.map +1 -1
  27. package/dist/{signer-set-reader-DFF9MgQN.js → signer-set-reader-CSUe92zE.js} +2 -2
  28. package/dist/{signer-set-reader-DFF9MgQN.js.map → signer-set-reader-CSUe92zE.js.map} +1 -1
  29. package/dist/{signer-set-reader-D-CyIYR5.cjs → signer-set-reader-GrFe_rsW.cjs} +2 -2
  30. package/dist/{signer-set-reader-D-CyIYR5.cjs.map → signer-set-reader-GrFe_rsW.cjs.map} +1 -1
  31. package/dist/tbv/core/clients/eth/index.cjs +1 -1
  32. package/dist/tbv/core/clients/eth/index.js +4 -4
  33. package/dist/tbv/core/clients/eth/protocol-params-reader.d.ts +1 -0
  34. package/dist/tbv/core/clients/eth/protocol-params-reader.d.ts.map +1 -1
  35. package/dist/tbv/core/clients/eth/protocol-params-validation.d.ts.map +1 -1
  36. package/dist/tbv/core/clients/eth/types.d.ts +12 -6
  37. package/dist/tbv/core/clients/eth/types.d.ts.map +1 -1
  38. package/dist/tbv/core/clients/index.cjs +1 -1
  39. package/dist/tbv/core/clients/index.js +4 -4
  40. package/dist/tbv/core/contracts/abis/ProtocolParams.abi.d.ts +8 -0
  41. package/dist/tbv/core/contracts/abis/ProtocolParams.abi.d.ts.map +1 -1
  42. package/dist/tbv/core/contracts/index.cjs +1 -1
  43. package/dist/tbv/core/contracts/index.js +1 -1
  44. package/dist/tbv/core/index.cjs +1 -1
  45. package/dist/tbv/core/index.js +8 -8
  46. package/dist/tbv/core/managers/PeginManager.d.ts +2 -1
  47. package/dist/tbv/core/managers/PeginManager.d.ts.map +1 -1
  48. package/dist/tbv/core/managers/index.cjs +1 -1
  49. package/dist/tbv/core/managers/index.js +1 -1
  50. package/dist/tbv/core/services/index.cjs +1 -1
  51. package/dist/tbv/core/services/index.js +1 -1
  52. package/dist/tbv/index.cjs +1 -1
  53. package/dist/tbv/index.js +8 -8
  54. package/dist/{toRefundInputs-Dso_QEr-.js → toRefundInputs-DH-1bRNY.js} +3 -3
  55. package/dist/{toRefundInputs-Dso_QEr-.js.map → toRefundInputs-DH-1bRNY.js.map} +1 -1
  56. package/dist/{toRefundInputs-DOCLxqC1.cjs → toRefundInputs-DRmK83fv.cjs} +2 -2
  57. package/dist/{toRefundInputs-DOCLxqC1.cjs.map → toRefundInputs-DRmK83fv.cjs.map} +1 -1
  58. package/dist/types-24A9Qoxb.js +274 -0
  59. package/dist/types-24A9Qoxb.js.map +1 -0
  60. package/dist/types-BC2TGzcp.cjs +2 -0
  61. package/dist/types-BC2TGzcp.cjs.map +1 -0
  62. package/package.json +2 -2
  63. package/dist/PeginManager-BCRtUqyX.cjs +0 -2
  64. package/dist/ProtocolParams.abi-CKOVqFJP.js.map +0 -1
  65. package/dist/ProtocolParams.abi-CjrT0545.cjs +0 -2
  66. package/dist/ProtocolParams.abi-CjrT0545.cjs.map +0 -1
  67. package/dist/types-DGr5HWwD.cjs +0 -2
  68. package/dist/types-DGr5HWwD.cjs.map +0 -1
  69. package/dist/types-Dbs--c2M.js +0 -198
  70. package/dist/types-Dbs--c2M.js.map +0 -1
@@ -1,8 +1,8 @@
1
1
  var J = Object.defineProperty;
2
2
  var Z = (t, e, n) => e in t ? J(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var g = (t, e, n) => Z(t, typeof e != "symbol" ? e + "" : e, n);
3
+ var b = (t, e, n) => Z(t, typeof e != "symbol" ? e + "" : e, n);
4
4
  import { s as $, b as N, a as tt } from "./secp256k1-BuxBFUHm.js";
5
- import { c as et, H as nt, r as w, a as B, h as U, b as T, s as k } from "./sha2-YqVHJiFj.js";
5
+ import { c as et, H as nt, r as x, a as R, h as F, b as B, s as A } from "./sha2-YqVHJiFj.js";
6
6
  import { j as E } from "./constants-CvQZuxKv.js";
7
7
  import { isAddress as ot, keccak256 as it, encodeAbiParameters as st } from "viem";
8
8
  const rt = /* @__PURE__ */ Uint8Array.from([
@@ -22,8 +22,8 @@ const rt = /* @__PURE__ */ Uint8Array.from([
22
22
  14,
23
23
  11,
24
24
  8
25
- ]), F = Uint8Array.from(new Array(16).fill(0).map((t, e) => e)), ut = F.map((t) => (9 * t + 5) % 16), L = /* @__PURE__ */ (() => {
26
- const n = [[F], [ut]];
25
+ ]), U = Uint8Array.from(new Array(16).fill(0).map((t, e) => e)), ut = U.map((t) => (9 * t + 5) % 16), L = /* @__PURE__ */ (() => {
26
+ const n = [[U], [ut]];
27
27
  for (let o = 0; o < 4; o++)
28
28
  for (let i of n)
29
29
  i.push(i[o].map((u) => rt[u]));
@@ -34,7 +34,7 @@ const rt = /* @__PURE__ */ Uint8Array.from([
34
34
  [13, 15, 14, 11, 7, 7, 6, 8, 13, 14, 13, 12, 5, 5, 6, 9],
35
35
  [14, 11, 12, 14, 8, 6, 5, 5, 15, 12, 15, 14, 9, 9, 8, 6],
36
36
  [15, 12, 13, 13, 9, 5, 8, 6, 14, 11, 12, 11, 8, 6, 5, 5]
37
- ].map((t) => Uint8Array.from(t)), ct = /* @__PURE__ */ O.map((t, e) => t.map((n) => K[e][n])), at = /* @__PURE__ */ H.map((t, e) => t.map((n) => K[e][n])), ft = /* @__PURE__ */ Uint32Array.from([
37
+ ].map((t) => Uint8Array.from(t)), ct = /* @__PURE__ */ O.map((t, e) => t.map((n) => K[e][n])), ft = /* @__PURE__ */ H.map((t, e) => t.map((n) => K[e][n])), at = /* @__PURE__ */ Uint32Array.from([
38
38
  0,
39
39
  1518500249,
40
40
  1859775393,
@@ -47,48 +47,48 @@ const rt = /* @__PURE__ */ Uint8Array.from([
47
47
  2053994217,
48
48
  0
49
49
  ]);
50
- function R(t, e, n, o) {
50
+ function _(t, e, n, o) {
51
51
  return t === 0 ? e ^ n ^ o : t === 1 ? e & n | ~e & o : t === 2 ? (e | ~n) ^ o : t === 3 ? e & o | n & ~o : e ^ (n | ~o);
52
52
  }
53
- const x = /* @__PURE__ */ new Uint32Array(16);
53
+ const I = /* @__PURE__ */ new Uint32Array(16);
54
54
  class ht extends nt {
55
55
  constructor() {
56
56
  super(64, 20, 8, !0);
57
- g(this, "h0", 1732584193);
58
- g(this, "h1", -271733879);
59
- g(this, "h2", -1732584194);
60
- g(this, "h3", 271733878);
61
- g(this, "h4", -1009589776);
57
+ b(this, "h0", 1732584193);
58
+ b(this, "h1", -271733879);
59
+ b(this, "h2", -1732584194);
60
+ b(this, "h3", 271733878);
61
+ b(this, "h4", -1009589776);
62
62
  }
63
63
  get() {
64
- const { h0: n, h1: o, h2: i, h3: u, h4: f } = this;
65
- return [n, o, i, u, f];
64
+ const { h0: n, h1: o, h2: i, h3: u, h4: a } = this;
65
+ return [n, o, i, u, a];
66
66
  }
67
- set(n, o, i, u, f) {
68
- this.h0 = n | 0, this.h1 = o | 0, this.h2 = i | 0, this.h3 = u | 0, this.h4 = f | 0;
67
+ set(n, o, i, u, a) {
68
+ this.h0 = n | 0, this.h1 = o | 0, this.h2 = i | 0, this.h3 = u | 0, this.h4 = a | 0;
69
69
  }
70
70
  process(n, o) {
71
71
  for (let r = 0; r < 16; r++, o += 4)
72
- x[r] = n.getUint32(o, !0);
73
- let i = this.h0 | 0, u = i, f = this.h1 | 0, h = f, d = this.h2 | 0, p = d, m = this.h3 | 0, P = m, s = this.h4 | 0, c = s;
72
+ I[r] = n.getUint32(o, !0);
73
+ let i = this.h0 | 0, u = i, a = this.h1 | 0, h = a, d = this.h2 | 0, p = d, m = this.h3 | 0, P = m, s = this.h4 | 0, c = s;
74
74
  for (let r = 0; r < 5; r++) {
75
- const a = 4 - r, b = ft[r], z = lt[r], Y = O[r], G = H[r], Q = ct[r], q = at[r];
75
+ const f = 4 - r, g = at[r], z = lt[r], Y = O[r], G = H[r], Q = ct[r], q = ft[r];
76
76
  for (let l = 0; l < 16; l++) {
77
- const v = w(i + R(r, f, d, m) + x[Y[l]] + b, Q[l]) + s | 0;
78
- i = s, s = m, m = w(d, 10) | 0, d = f, f = v;
77
+ const C = x(i + _(r, a, d, m) + I[Y[l]] + g, Q[l]) + s | 0;
78
+ i = s, s = m, m = x(d, 10) | 0, d = a, a = C;
79
79
  }
80
80
  for (let l = 0; l < 16; l++) {
81
- const v = w(u + R(a, h, p, P) + x[G[l]] + z, q[l]) + c | 0;
82
- u = c, c = P, P = w(p, 10) | 0, p = h, h = v;
81
+ const C = x(u + _(f, h, p, P) + I[G[l]] + z, q[l]) + c | 0;
82
+ u = c, c = P, P = x(p, 10) | 0, p = h, h = C;
83
83
  }
84
84
  }
85
- this.set(this.h1 + d + P | 0, this.h2 + m + c | 0, this.h3 + s + u | 0, this.h4 + i + h | 0, this.h0 + f + p | 0);
85
+ this.set(this.h1 + d + P | 0, this.h2 + m + c | 0, this.h3 + s + u | 0, this.h4 + i + h | 0, this.h0 + a + p | 0);
86
86
  }
87
87
  roundClean() {
88
- B(x);
88
+ R(I);
89
89
  }
90
90
  destroy() {
91
- this.destroyed = !0, B(this.buffer), this.set(0, 0, 0, 0, 0);
91
+ this.destroyed = !0, R(this.buffer), this.set(0, 0, 0, 0, 0);
92
92
  }
93
93
  }
94
94
  const dt = /* @__PURE__ */ et(() => new ht()), y = 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2fn, mt = 7n;
@@ -98,7 +98,7 @@ function pt(t, e, n) {
98
98
  (u & 1n) === 1n && (o = o * i % n), i = i * i % n, u >>= 1n;
99
99
  return o;
100
100
  }
101
- function bt(t) {
101
+ function gt(t) {
102
102
  const e = BigInt(`0x${t}`);
103
103
  if (e >= y) return !1;
104
104
  const o = (e * e % y * e % y + mt) % y, i = pt(
@@ -115,37 +115,37 @@ function D(t, e) {
115
115
  `${e} returned an unexpected value (length ${n.length}, prefix "${n.slice(0, 2)}")`
116
116
  );
117
117
  const o = n.slice(2);
118
- if (!bt(o))
118
+ if (!gt(o))
119
119
  throw new Error(
120
120
  `${e} returned a value that is not on the secp256k1 curve`
121
121
  );
122
122
  return o;
123
123
  }
124
- const gt = "5120", A = "0014", yt = 20, _ = 33, Pt = 65, $t = 2, wt = 3, xt = 4;
124
+ const bt = "5120", T = "0014", yt = 20, S = 33, Pt = 65, $t = 2, xt = 3, It = 4;
125
125
  function M(t, e) {
126
126
  const n = t.startsWith("0x") || t.startsWith("0X") ? t.slice(2) : t;
127
127
  if (!/^(?:[0-9a-fA-F]{2})+$/.test(n))
128
128
  throw new Error(`${e} must be non-empty, even-length hex`);
129
129
  return `0x${n.toLowerCase()}`;
130
130
  }
131
- function Et(t) {
132
- const e = U(t), n = $.utils.lift_x(BigInt(`0x${t}`)), o = $.utils.bytesToNumberBE(
131
+ function wt(t) {
132
+ const e = F(t), n = $.utils.lift_x(BigInt(`0x${t}`)), o = $.utils.bytesToNumberBE(
133
133
  $.utils.taggedHash("TapTweak", e)
134
134
  );
135
135
  if (o >= N.CURVE.n)
136
136
  throw new Error("Proof of possession BTC pubkey has an invalid TapTweak");
137
137
  const i = o === 0n ? n : n.add($.Point.BASE.multiply(o));
138
- return `0x${gt}${T(
138
+ return `0x${bt}${B(
139
139
  $.utils.pointToBytes(i)
140
140
  )}`;
141
141
  }
142
- function It(t) {
143
- const e = M(t, "depositorBtcPubkeyRaw"), n = U(e.slice(2));
142
+ function Et(t) {
143
+ const e = M(t, "depositorBtcPubkeyRaw"), n = F(e.slice(2));
144
144
  if (n.length === 32)
145
145
  return {
146
146
  xOnlyPubkey: D(e, "Payout BTC pubkey")
147
147
  };
148
- const o = n.length === _ && (n[0] === $t || n[0] === wt), i = n.length === Pt && n[0] === xt;
148
+ const o = n.length === S && (n[0] === $t || n[0] === xt), i = n.length === Pt && n[0] === It;
149
149
  if (!o && !i)
150
150
  throw new Error(
151
151
  "depositorBtcPubkeyRaw must be x-only, compressed, or uncompressed"
@@ -156,12 +156,12 @@ function It(t) {
156
156
  throw new Error("depositorBtcPubkeyRaw is not a valid BTC pubkey");
157
157
  }
158
158
  return {
159
- xOnlyPubkey: T(n.subarray(1, _)),
159
+ xOnlyPubkey: B(n.subarray(1, S)),
160
160
  compressedPubkey: o ? n : void 0
161
161
  };
162
162
  }
163
163
  function vt(t) {
164
- return `0x${A}${T(dt(k(t)))}`;
164
+ return `0x${T}${B(dt(A(t)))}`;
165
165
  }
166
166
  function Ht(t, e, n) {
167
167
  const o = M(
@@ -175,17 +175,17 @@ function Ht(t, e, n) {
175
175
  const i = e.startsWith("0x") || e.startsWith("0X") ? e.slice(2) : e, u = D(
176
176
  `0x${i}`,
177
177
  "Proof of possession BTC pubkey"
178
- ), f = It(n);
179
- if (f.xOnlyPubkey !== u)
178
+ ), a = Et(n);
179
+ if (a.xOnlyPubkey !== u)
180
180
  throw new Error(
181
181
  "depositorBtcPubkeyRaw does not match the proof of possession BTC pubkey"
182
182
  );
183
- if (o === Et(u))
183
+ if (o === wt(u))
184
184
  return o;
185
- if (o.startsWith(`0x${A}`) && o.length === 2 + A.length + yt * 2) {
186
- if (!f.compressedPubkey)
185
+ if (o.startsWith(`0x${T}`) && o.length === 2 + T.length + yt * 2) {
186
+ if (!a.compressedPubkey)
187
187
  throw new Error("A P2WPKH payout requires a compressed BTC pubkey");
188
- if (o === vt(f.compressedPubkey))
188
+ if (o === vt(a.compressedPubkey))
189
189
  return o;
190
190
  }
191
191
  throw new Error(
@@ -228,28 +228,28 @@ function Tt(t) {
228
228
  return e += s, r;
229
229
  }, o = (s, c) => {
230
230
  const r = n(s, c);
231
- let a = 0n;
232
- for (let b = r.length - 1; b >= 0; b--)
233
- a = a << 8n | BigInt(r[b]);
234
- return a;
231
+ let f = 0n;
232
+ for (let g = r.length - 1; g >= 0; g--)
233
+ f = f << 8n | BigInt(r[g]);
234
+ return f;
235
235
  }, i = (s) => {
236
236
  const c = e, r = n(1, s)[0];
237
- let a;
237
+ let f;
238
238
  if (r < 253)
239
- a = BigInt(r);
239
+ f = BigInt(r);
240
240
  else if (r === 253) {
241
- if (a = o(2, s), a < 0xfdn) throw new Error(`Non-canonical ${s}`);
241
+ if (f = o(2, s), f < 0xfdn) throw new Error(`Non-canonical ${s}`);
242
242
  } else if (r === 254) {
243
- if (a = o(4, s), a <= 0xffffn) throw new Error(`Non-canonical ${s}`);
244
- } else if (a = o(8, s), a <= 0xffffffffn) throw new Error(`Non-canonical ${s}`);
245
- if (a > BigInt(Number.MAX_SAFE_INTEGER))
243
+ if (f = o(4, s), f <= 0xffffn) throw new Error(`Non-canonical ${s}`);
244
+ } else if (f = o(8, s), f <= 0xffffffffn) throw new Error(`Non-canonical ${s}`);
245
+ if (f > BigInt(Number.MAX_SAFE_INTEGER))
246
246
  throw new Error(`${s} exceeds JavaScript's safe integer range`);
247
247
  return {
248
248
  encoded: t.slice(c, e),
249
- value: Number(a)
249
+ value: Number(f)
250
250
  };
251
- }, u = n(4, "version"), f = t[e] === 0 && t[e + 1] === 1;
252
- f && (e += 2);
251
+ }, u = n(4, "version"), a = t[e] === 0 && t[e + 1] === 1;
252
+ a && (e += 2);
253
253
  const h = i("input count"), d = [];
254
254
  for (let s = 0; s < h.value; s++) {
255
255
  const c = e;
@@ -264,16 +264,16 @@ function Tt(t) {
264
264
  const r = i(`output ${s} script length`);
265
265
  n(r.value, `output ${s} script`), m.push(t.slice(c, e));
266
266
  }
267
- if (f) {
267
+ if (a) {
268
268
  let s = !1;
269
269
  for (let c = 0; c < h.value; c++) {
270
270
  const r = i(`input ${c} witness item count`);
271
271
  s || (s = r.value > 0);
272
- for (let a = 0; a < r.value; a++) {
273
- const b = i(
274
- `input ${c} witness item ${a} length`
272
+ for (let f = 0; f < r.value; f++) {
273
+ const g = i(
274
+ `input ${c} witness item ${f} length`
275
275
  );
276
- n(b.value, `input ${c} witness item ${a}`);
276
+ n(g.value, `input ${c} witness item ${f}`);
277
277
  }
278
278
  }
279
279
  if (!s)
@@ -296,7 +296,7 @@ function Tt(t) {
296
296
  function Bt(t) {
297
297
  const e = Tt(
298
298
  Ct(t, "transactionHex")
299
- ), n = k(k(e));
299
+ ), n = A(A(e));
300
300
  return n.reverse(), `0x${kt(n)}`;
301
301
  }
302
302
  function Kt(t, e) {
@@ -315,19 +315,19 @@ function Kt(t, e) {
315
315
  }
316
316
  const X = "VaultClaimableByNotFoundError";
317
317
  class Rt extends Error {
318
- constructor(e, n, o, i, u = "the vault has not been redeemed for this key, or the node did not serve the block. Redeem first, or try again.", f) {
318
+ constructor(e, n, o, i, u = "the vault has not been redeemed for this key, or the node did not serve the block. Redeem first, or try again.", a) {
319
319
  super(
320
320
  `No VaultClaimableBy log for vault ${e} and claimer ${n} in blocks ${o}..${i}: ${u}`,
321
- f
321
+ a
322
322
  ), this.vaultId = e, this.claimerPk = n, this.fromBlock = o, this.toBlock = i, this.name = X;
323
323
  }
324
324
  }
325
325
  function Dt(t) {
326
326
  return t instanceof Rt ? !0 : typeof t != "object" || t === null ? !1 : t.name === X;
327
327
  }
328
- const C = 65535, S = 1e4, I = 4294967295, V = 255;
328
+ const k = 65535, V = 1e4, v = 4294967295, w = 255;
329
329
  function Mt(t) {
330
- if (!Number.isInteger(t) || t < 0 || t > I)
330
+ if (!Number.isInteger(t) || t < 0 || t > v)
331
331
  throw new Error(
332
332
  `Invalid offchainParamsVersion from contract: must be a uint32, got ${t}`
333
333
  );
@@ -336,26 +336,26 @@ function _t(t) {
336
336
  const e = [];
337
337
  if (t.timelockAssert <= 0n && e.push(
338
338
  `timelockAssert must be positive, got ${t.timelockAssert}`
339
- ), t.timelockAssert > BigInt(C) && e.push(
340
- `timelockAssert ${t.timelockAssert} exceeds uint16 max (${C})`
339
+ ), t.timelockAssert > BigInt(k) && e.push(
340
+ `timelockAssert ${t.timelockAssert} exceeds uint16 max (${k})`
341
341
  ), t.timelockChallengeAssert <= 0n && e.push(
342
342
  `timelockChallengeAssert must be positive, got ${t.timelockChallengeAssert}`
343
343
  ), t.tRefund <= 0 && e.push(`tRefund must be positive, got ${t.tRefund}`), t.tStale <= 0 && e.push(`tStale must be positive, got ${t.tStale}`), t.securityCouncilKeys.length === 0 && e.push("securityCouncilKeys must not be empty"), t.councilQuorum <= 0 && e.push(`councilQuorum must be positive, got ${t.councilQuorum}`), t.councilQuorum > t.securityCouncilKeys.length && e.push(
344
344
  `councilQuorum (${t.councilQuorum}) exceeds securityCouncilKeys count (${t.securityCouncilKeys.length})`
345
345
  ), t.feeRate <= 0n && e.push(`feeRate must be positive, got ${t.feeRate}`), t.minPeginFeeRate <= 0n && e.push(
346
346
  `minPeginFeeRate must be positive, got ${t.minPeginFeeRate}`
347
- ), (!Number.isInteger(t.proverCircuitVersion) || t.proverCircuitVersion < 0 || t.proverCircuitVersion > C) && e.push(
347
+ ), (!Number.isInteger(t.proverCircuitVersion) || t.proverCircuitVersion < 0 || t.proverCircuitVersion > k) && e.push(
348
348
  `proverCircuitVersion must be a uint16, got ${t.proverCircuitVersion}`
349
- ), (!Number.isInteger(t.minPrepeginDepth) || t.minPrepeginDepth <= 0 || t.minPrepeginDepth > I) && e.push(
350
- `minPrepeginDepth must be a uint32 in [1, ${I}], got ${t.minPrepeginDepth}`
349
+ ), (!Number.isInteger(t.minPrepeginDepth) || t.minPrepeginDepth <= 0 || t.minPrepeginDepth > v) && e.push(
350
+ `minPrepeginDepth must be a uint32 in [1, ${v}], got ${t.minPrepeginDepth}`
351
351
  ), t.babeTotalInstances <= 0 && e.push(
352
352
  `babeTotalInstances must be positive, got ${t.babeTotalInstances}`
353
353
  ), t.babeInstancesToFinalize <= 0 && e.push(
354
354
  `babeInstancesToFinalize must be positive, got ${t.babeInstancesToFinalize}`
355
355
  ), t.babeInstancesToFinalize > t.babeTotalInstances && e.push(
356
356
  `babeInstancesToFinalize (${t.babeInstancesToFinalize}) exceeds babeTotalInstances (${t.babeTotalInstances})`
357
- ), (t.minVpCommissionBps < 0 || t.minVpCommissionBps > S) && e.push(
358
- `minVpCommissionBps must be in [0, ${S}], got ${t.minVpCommissionBps}`
357
+ ), (t.minVpCommissionBps < 0 || t.minVpCommissionBps > V) && e.push(
358
+ `minVpCommissionBps must be in [0, ${V}], got ${t.minVpCommissionBps}`
359
359
  ), e.length > 0)
360
360
  throw new Error(
361
361
  `Invalid offchain protocol parameters: ${e.join("; ")}`
@@ -371,15 +371,17 @@ function St(t) {
371
371
  `pegInAckTimeout must be positive, got ${t.pegInAckTimeout}`
372
372
  ), t.pegInActivationTimeout <= 0n && e.push(
373
373
  `pegInActivationTimeout must be positive, got ${t.pegInActivationTimeout}`
374
- ), (!Number.isInteger(t.maxHtlcOutputCount) || t.maxHtlcOutputCount <= 0 || t.maxHtlcOutputCount > V) && e.push(
375
- `maxHtlcOutputCount must be an integer in [1, ${V}], got ${t.maxHtlcOutputCount}`
374
+ ), (!Number.isInteger(t.maxHtlcOutputCount) || t.maxHtlcOutputCount <= 0 || t.maxHtlcOutputCount > w) && e.push(
375
+ `maxHtlcOutputCount must be an integer in [1, ${w}], got ${t.maxHtlcOutputCount}`
376
+ ), t.maxFundingInputCount !== null && (!Number.isInteger(t.maxFundingInputCount) || t.maxFundingInputCount <= 0 || t.maxFundingInputCount > w) && e.push(
377
+ `maxFundingInputCount must be an integer in [1, ${w}], got ${t.maxFundingInputCount}`
376
378
  ), (typeof t.expiredPegInGraceBlocks != "bigint" || t.expiredPegInGraceBlocks <= 0n) && e.push(
377
379
  `expiredPegInGraceBlocks must be a positive bigint, got ${t.expiredPegInGraceBlocks}`
378
380
  ), e.length > 0)
379
381
  throw new Error(`Invalid TBV protocol parameters: ${e.join("; ")}`);
380
382
  }
381
383
  function Xt(t) {
382
- if (St(t), _t(t.offchainParams), !Number.isInteger(t.offchainParamsVersion) || t.offchainParamsVersion < 0 || t.offchainParamsVersion > I)
384
+ if (St(t), _t(t.offchainParams), !Number.isInteger(t.offchainParamsVersion) || t.offchainParamsVersion < 0 || t.offchainParamsVersion > v)
383
385
  throw new Error(
384
386
  `Invalid peg-in configuration: offchainParamsVersion must be a uint32, got ${t.offchainParamsVersion}`
385
387
  );
@@ -398,7 +400,7 @@ class j extends Error {
398
400
  super(
399
401
  o ?? `The Ethereum node returned no registration logs for block ${n}, which holds a vault registration; the node may not have indexed that block yet. Try again.`
400
402
  );
401
- g(this, "blockNumber");
403
+ b(this, "blockNumber");
402
404
  this.name = W, this.blockNumber = n;
403
405
  }
404
406
  }
@@ -440,8 +442,8 @@ export {
440
442
  Mt as j,
441
443
  Ht as k,
442
444
  dt as l,
443
- Et as m,
445
+ wt as m,
444
446
  zt as r,
445
447
  _t as v
446
448
  };
447
- //# sourceMappingURL=registration-records-BBOz21Dm.js.map
449
+ //# sourceMappingURL=registration-records-DJJC2NiO.js.map