@btc-vision/transaction 1.8.8 → 1.8.9

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.
@@ -156,10 +156,10 @@ var kt = {
156
156
  scriptHash: 196,
157
157
  wif: 239
158
158
  }
159
- }, Symbol.toStringTag, { value: "Module" })), ye = {}, mi;
159
+ }, Symbol.toStringTag, { value: "Module" })), ge = {}, mi;
160
160
  function Ia() {
161
- if (mi) return ye;
162
- mi = 1, Object.defineProperty(ye, "__esModule", { value: !0 }), ye.bech32m = ye.bech32 = void 0;
161
+ if (mi) return ge;
162
+ mi = 1, Object.defineProperty(ge, "__esModule", { value: !0 }), ge.bech32m = ge.bech32 = void 0;
163
163
  const e = "qpzry9x8gf2tvdw0s3jn54khce6mua7l", t = {};
164
164
  for (let p = 0; p < 32; p++) {
165
165
  const u = e.charAt(p);
@@ -184,13 +184,13 @@ function Ia() {
184
184
  return u;
185
185
  }
186
186
  function i(p, u, d, w) {
187
- let y = 0, m = 0;
187
+ let g = 0, m = 0;
188
188
  const v = (1 << d) - 1, I = [];
189
- for (let P = 0; P < p.length; ++P) for (y = y << u | p[P], m += u; m >= d; ) m -= d, I.push(y >> m & v);
190
- if (w) m > 0 && I.push(y << d - m & v);
189
+ for (let P = 0; P < p.length; ++P) for (g = g << u | p[P], m += u; m >= d; ) m -= d, I.push(g >> m & v);
190
+ if (w) m > 0 && I.push(g << d - m & v);
191
191
  else {
192
192
  if (m >= u) return "Excess padding";
193
- if (y << d - m & v) return "Non-zero padding";
193
+ if (g << d - m & v) return "Non-zero padding";
194
194
  }
195
195
  return I;
196
196
  }
@@ -252,7 +252,7 @@ function Ia() {
252
252
  words: Z
253
253
  };
254
254
  }
255
- function y(v, I) {
255
+ function g(v, I) {
256
256
  const P = w(v, I);
257
257
  if (typeof P == "object") return P;
258
258
  }
@@ -262,7 +262,7 @@ function Ia() {
262
262
  throw new Error(P);
263
263
  }
264
264
  return {
265
- decodeUnsafe: y,
265
+ decodeUnsafe: g,
266
266
  decode: m,
267
267
  encode: d,
268
268
  toWords: o,
@@ -270,7 +270,7 @@ function Ia() {
270
270
  fromWords: f
271
271
  };
272
272
  }
273
- return ye.bech32 = l("bech32"), ye.bech32m = l("bech32m"), ye;
273
+ return ge.bech32 = l("bech32"), ge.bech32m = l("bech32m"), ge;
274
274
  }
275
275
  var et = Ia();
276
276
  function cr(e) {
@@ -351,7 +351,7 @@ function xa(e) {
351
351
  function Ts(e) {
352
352
  typeof e == "number" ? xa(e) : Pa(e);
353
353
  }
354
- function ge(e, t, r) {
354
+ function ye(e, t, r) {
355
355
  Ts(e), r === void 0 && (r = 0), t === void 0 && (t = new Uint8Array(Ct(e)));
356
356
  let n = 0;
357
357
  return e < 253 ? (t.set([Number(e)], r), n = 1) : e <= 65535 ? (t.set([253], r), Aa(t, r + 1, Number(e), "LE"), n = 3) : e <= 4294967295 ? (t.set([254], r), Sa(t, r + 1, Number(e), "LE"), n = 5) : (t.set([255], r), Ta(t, r + 1, BigInt(e), "LE"), n = 9), {
@@ -397,7 +397,7 @@ function Ct(e) {
397
397
  var Kl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
398
398
  __proto__: null,
399
399
  decode: We,
400
- encode: ge,
400
+ encode: ye,
401
401
  encodingLength: Ct
402
402
  }, Symbol.toStringTag, { value: "Module" })), Ba = Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0")), Ei = (() => {
403
403
  const e = new Array(128).fill(-1);
@@ -901,13 +901,13 @@ var Wn = class {
901
901
  process(e, t) {
902
902
  for (let u = 0; u < 16; u++, t += 4) oe[u] = e.getUint32(t, !1);
903
903
  for (let u = 16; u < 64; u++) {
904
- const d = oe[u - 15], w = oe[u - 2], y = Wt(d, 7) ^ Wt(d, 18) ^ d >>> 3, m = Wt(w, 17) ^ Wt(w, 19) ^ w >>> 10;
905
- oe[u] = m + oe[u - 7] + y + oe[u - 16] | 0;
904
+ const d = oe[u - 15], w = oe[u - 2], g = Wt(d, 7) ^ Wt(d, 18) ^ d >>> 3, m = Wt(w, 17) ^ Wt(w, 19) ^ w >>> 10;
905
+ oe[u] = m + oe[u - 7] + g + oe[u - 16] | 0;
906
906
  }
907
907
  let { A: r, B: n, C: i, D: o, E: a, F: f, G: l, H: p } = this;
908
908
  for (let u = 0; u < 64; u++) {
909
- const d = Wt(a, 6) ^ Wt(a, 11) ^ Wt(a, 25), w = p + d + Os(a, f, l) + Ca[u] + oe[u] | 0, y = (Wt(r, 2) ^ Wt(r, 13) ^ Wt(r, 22)) + Ps(r, n, i) | 0;
910
- p = l, l = f, f = a, a = o + w | 0, o = i, i = n, n = r, r = w + y | 0;
909
+ const d = Wt(a, 6) ^ Wt(a, 11) ^ Wt(a, 25), w = p + d + Os(a, f, l) + Ca[u] + oe[u] | 0, g = (Wt(r, 2) ^ Wt(r, 13) ^ Wt(r, 22)) + Ps(r, n, i) | 0;
910
+ p = l, l = f, f = a, a = o + w | 0, o = i, i = n, n = r, r = w + g | 0;
911
911
  }
912
912
  r = r + this.A | 0, n = n + this.B | 0, i = i + this.C | 0, o = o + this.D | 0, a = a + this.E | 0, f = f + this.F | 0, l = l + this.G | 0, p = p + this.H | 0, this.set(r, n, i, o, a, f, l, p);
913
913
  }
@@ -944,10 +944,10 @@ function Ka(e) {
944
944
  if (p instanceof Uint8Array || (ArrayBuffer.isView(p) ? p = new Uint8Array(p.buffer, p.byteOffset, p.byteLength) : Array.isArray(p) && (p = Uint8Array.from(p))), !(p instanceof Uint8Array)) throw new TypeError("Expected Uint8Array");
945
945
  if (p.length === 0) return "";
946
946
  let u = 0, d = 0, w = 0;
947
- const y = p.length;
948
- for (; w !== y && p[w] === 0; ) w++, u++;
949
- const m = (y - w) * o + 1 >>> 0, v = new Uint8Array(m);
950
- for (; w !== y; ) {
947
+ const g = p.length;
948
+ for (; w !== g && p[w] === 0; ) w++, u++;
949
+ const m = (g - w) * o + 1 >>> 0, v = new Uint8Array(m);
950
+ for (; w !== g; ) {
951
951
  let S = p[w], _ = 0;
952
952
  for (let O = m - 1; (S !== 0 || _ < d) && O !== -1; O--, _++) S += 256 * v[O] >>> 0, v[O] = S % r >>> 0, S = S / r >>> 0;
953
953
  if (S !== 0) throw new Error("Non-zero carry");
@@ -964,22 +964,22 @@ function Ka(e) {
964
964
  if (p.length === 0) return /* @__PURE__ */ new Uint8Array();
965
965
  let u = 0, d = 0, w = 0;
966
966
  for (; p[u] === n; ) d++, u++;
967
- const y = (p.length - u) * i + 1 >>> 0, m = new Uint8Array(y);
967
+ const g = (p.length - u) * i + 1 >>> 0, m = new Uint8Array(g);
968
968
  for (; u < p.length; ) {
969
969
  const S = p.charCodeAt(u);
970
970
  if (S > 255) return;
971
971
  let _ = t[S];
972
972
  if (_ === 255) return;
973
973
  let O = 0;
974
- for (let z = y - 1; (_ !== 0 || O < w) && z !== -1; z--, O++) _ += r * m[z] >>> 0, m[z] = _ % 256 >>> 0, _ = _ / 256 >>> 0;
974
+ for (let z = g - 1; (_ !== 0 || O < w) && z !== -1; z--, O++) _ += r * m[z] >>> 0, m[z] = _ % 256 >>> 0, _ = _ / 256 >>> 0;
975
975
  if (_ !== 0) throw new Error("Non-zero carry");
976
976
  w = O, u++;
977
977
  }
978
- let v = y - w;
979
- for (; v !== y && m[v] === 0; ) v++;
980
- const I = new Uint8Array(d + (y - v));
978
+ let v = g - w;
979
+ for (; v !== g && m[v] === 0; ) v++;
980
+ const I = new Uint8Array(d + (g - v));
981
981
  let P = d;
982
- for (; v !== y; ) I[P++] = m[v++];
982
+ for (; v !== g; ) I[P++] = m[v++];
983
983
  return I;
984
984
  }
985
985
  function l(p) {
@@ -1304,21 +1304,21 @@ function eh(e) {
1304
1304
  }
1305
1305
  var qn = {};
1306
1306
  qn.read = function(e, t, r, n, i) {
1307
- var o, a, f = i * 8 - n - 1, l = (1 << f) - 1, p = l >> 1, u = -7, d = r ? i - 1 : 0, w = r ? -1 : 1, y = e[t + d];
1308
- for (d += w, o = y & (1 << -u) - 1, y >>= -u, u += f; u > 0; o = o * 256 + e[t + d], d += w, u -= 8) ;
1307
+ var o, a, f = i * 8 - n - 1, l = (1 << f) - 1, p = l >> 1, u = -7, d = r ? i - 1 : 0, w = r ? -1 : 1, g = e[t + d];
1308
+ for (d += w, o = g & (1 << -u) - 1, g >>= -u, u += f; u > 0; o = o * 256 + e[t + d], d += w, u -= 8) ;
1309
1309
  for (a = o & (1 << -u) - 1, o >>= -u, u += n; u > 0; a = a * 256 + e[t + d], d += w, u -= 8) ;
1310
1310
  if (o === 0) o = 1 - p;
1311
1311
  else {
1312
- if (o === l) return a ? NaN : (y ? -1 : 1) * (1 / 0);
1312
+ if (o === l) return a ? NaN : (g ? -1 : 1) * (1 / 0);
1313
1313
  a = a + Math.pow(2, n), o = o - p;
1314
1314
  }
1315
- return (y ? -1 : 1) * a * Math.pow(2, o - n);
1315
+ return (g ? -1 : 1) * a * Math.pow(2, o - n);
1316
1316
  };
1317
1317
  qn.write = function(e, t, r, n, i, o) {
1318
- var a, f, l, p = o * 8 - i - 1, u = (1 << p) - 1, d = u >> 1, w = i === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, y = n ? 0 : o - 1, m = n ? 1 : -1, v = t < 0 || t === 0 && 1 / t < 0 ? 1 : 0;
1319
- for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (f = isNaN(t) ? 1 : 0, a = u) : (a = Math.floor(Math.log(t) / Math.LN2), t * (l = Math.pow(2, -a)) < 1 && (a--, l *= 2), a + d >= 1 ? t += w / l : t += w * Math.pow(2, 1 - d), t * l >= 2 && (a++, l /= 2), a + d >= u ? (f = 0, a = u) : a + d >= 1 ? (f = (t * l - 1) * Math.pow(2, i), a = a + d) : (f = t * Math.pow(2, d - 1) * Math.pow(2, i), a = 0)); i >= 8; e[r + y] = f & 255, y += m, f /= 256, i -= 8) ;
1320
- for (a = a << i | f, p += i; p > 0; e[r + y] = a & 255, y += m, a /= 256, p -= 8) ;
1321
- e[r + y - m] |= v * 128;
1318
+ var a, f, l, p = o * 8 - i - 1, u = (1 << p) - 1, d = u >> 1, w = i === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, g = n ? 0 : o - 1, m = n ? 1 : -1, v = t < 0 || t === 0 && 1 / t < 0 ? 1 : 0;
1319
+ for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (f = isNaN(t) ? 1 : 0, a = u) : (a = Math.floor(Math.log(t) / Math.LN2), t * (l = Math.pow(2, -a)) < 1 && (a--, l *= 2), a + d >= 1 ? t += w / l : t += w * Math.pow(2, 1 - d), t * l >= 2 && (a++, l /= 2), a + d >= u ? (f = 0, a = u) : a + d >= 1 ? (f = (t * l - 1) * Math.pow(2, i), a = a + d) : (f = t * Math.pow(2, d - 1) * Math.pow(2, i), a = 0)); i >= 8; e[r + g] = f & 255, g += m, f /= 256, i -= 8) ;
1320
+ for (a = a << i | f, p += i; p > 0; e[r + g] = a & 255, g += m, a /= 256, p -= 8) ;
1321
+ e[r + g - m] |= v * 128;
1322
1322
  };
1323
1323
  (function(e) {
1324
1324
  const t = Zr, r = qn, n = typeof Symbol == "function" && typeof Symbol.for == "function" ? /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom") : null;
@@ -1367,8 +1367,8 @@ qn.write = function(e, t, r, n, i, o) {
1367
1367
  if (s == null) throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof s);
1368
1368
  if (Ft(s, a) || s && Ft(s.buffer, a) || typeof f < "u" && (Ft(s, f) || s && Ft(s.buffer, f))) return S(s, h, c);
1369
1369
  if (typeof s == "number") throw new TypeError('The "value" argument must not be of type number. Received type number');
1370
- const g = s.valueOf && s.valueOf();
1371
- if (g != null && g !== s) return u.from(g, h, c);
1370
+ const y = s.valueOf && s.valueOf();
1371
+ if (y != null && y !== s) return u.from(y, h, c);
1372
1372
  const b = _(s);
1373
1373
  if (b) return b;
1374
1374
  if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof s[Symbol.toPrimitive] == "function") return u.from(s[Symbol.toPrimitive]("string"), h, c);
@@ -1381,11 +1381,11 @@ qn.write = function(e, t, r, n, i, o) {
1381
1381
  if (typeof s != "number") throw new TypeError('"size" argument must be of type number');
1382
1382
  if (s < 0) throw new RangeError('The value "' + s + '" is invalid for option "size"');
1383
1383
  }
1384
- function y(s, h, c) {
1384
+ function g(s, h, c) {
1385
1385
  return w(s), s <= 0 ? p(s) : h !== void 0 ? typeof c == "string" ? p(s).fill(h, c) : p(s).fill(h) : p(s);
1386
1386
  }
1387
1387
  u.alloc = function(s, h, c) {
1388
- return y(s, h, c);
1388
+ return g(s, h, c);
1389
1389
  };
1390
1390
  function m(s) {
1391
1391
  return w(s), p(s < 0 ? 0 : O(s) | 0);
@@ -1398,13 +1398,13 @@ qn.write = function(e, t, r, n, i, o) {
1398
1398
  function v(s, h) {
1399
1399
  if ((typeof h != "string" || h === "") && (h = "utf8"), !u.isEncoding(h)) throw new TypeError("Unknown encoding: " + h);
1400
1400
  const c = M(s, h) | 0;
1401
- let g = p(c);
1402
- const b = g.write(s, h);
1403
- return b !== c && (g = g.slice(0, b)), g;
1401
+ let y = p(c);
1402
+ const b = y.write(s, h);
1403
+ return b !== c && (y = y.slice(0, b)), y;
1404
1404
  }
1405
1405
  function I(s) {
1406
1406
  const h = s.length < 0 ? 0 : O(s.length) | 0, c = p(h);
1407
- for (let g = 0; g < h; g += 1) c[g] = s[g] & 255;
1407
+ for (let y = 0; y < h; y += 1) c[y] = s[y] & 255;
1408
1408
  return c;
1409
1409
  }
1410
1410
  function P(s) {
@@ -1417,8 +1417,8 @@ qn.write = function(e, t, r, n, i, o) {
1417
1417
  function S(s, h, c) {
1418
1418
  if (h < 0 || s.byteLength < h) throw new RangeError('"offset" is outside of buffer bounds');
1419
1419
  if (s.byteLength < h + (c || 0)) throw new RangeError('"length" is outside of buffer bounds');
1420
- let g;
1421
- return h === void 0 && c === void 0 ? g = new o(s) : c === void 0 ? g = new o(s, h) : g = new o(s, h, c), Object.setPrototypeOf(g, u.prototype), g;
1420
+ let y;
1421
+ return h === void 0 && c === void 0 ? y = new o(s) : c === void 0 ? y = new o(s, h) : y = new o(s, h, c), Object.setPrototypeOf(y, u.prototype), y;
1422
1422
  }
1423
1423
  function _(s) {
1424
1424
  if (u.isBuffer(s)) {
@@ -1440,12 +1440,12 @@ qn.write = function(e, t, r, n, i, o) {
1440
1440
  }, u.compare = function(s, h) {
1441
1441
  if (Ft(s, o) && (s = u.from(s, s.offset, s.byteLength)), Ft(h, o) && (h = u.from(h, h.offset, h.byteLength)), !u.isBuffer(s) || !u.isBuffer(h)) throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');
1442
1442
  if (s === h) return 0;
1443
- let c = s.length, g = h.length;
1444
- for (let b = 0, E = Math.min(c, g); b < E; ++b) if (s[b] !== h[b]) {
1445
- c = s[b], g = h[b];
1443
+ let c = s.length, y = h.length;
1444
+ for (let b = 0, E = Math.min(c, y); b < E; ++b) if (s[b] !== h[b]) {
1445
+ c = s[b], y = h[b];
1446
1446
  break;
1447
1447
  }
1448
- return c < g ? -1 : g < c ? 1 : 0;
1448
+ return c < y ? -1 : y < c ? 1 : 0;
1449
1449
  }, u.isEncoding = function(s) {
1450
1450
  switch (String(s).toLowerCase()) {
1451
1451
  case "hex":
@@ -1468,23 +1468,23 @@ qn.write = function(e, t, r, n, i, o) {
1468
1468
  if (s.length === 0) return u.alloc(0);
1469
1469
  let c;
1470
1470
  if (h === void 0) for (h = 0, c = 0; c < s.length; ++c) h += s[c].length;
1471
- const g = u.allocUnsafe(h);
1471
+ const y = u.allocUnsafe(h);
1472
1472
  let b = 0;
1473
1473
  for (c = 0; c < s.length; ++c) {
1474
1474
  let E = s[c];
1475
- if (Ft(E, o)) b + E.length > g.length ? (u.isBuffer(E) || (E = u.from(E)), E.copy(g, b)) : o.prototype.set.call(g, E, b);
1476
- else if (u.isBuffer(E)) E.copy(g, b);
1475
+ if (Ft(E, o)) b + E.length > y.length ? (u.isBuffer(E) || (E = u.from(E)), E.copy(y, b)) : o.prototype.set.call(y, E, b);
1476
+ else if (u.isBuffer(E)) E.copy(y, b);
1477
1477
  else throw new TypeError('"list" argument must be an Array of Buffers');
1478
1478
  b += E.length;
1479
1479
  }
1480
- return g;
1480
+ return y;
1481
1481
  };
1482
1482
  function M(s, h) {
1483
1483
  if (u.isBuffer(s)) return s.length;
1484
1484
  if (a.isView(s) || Ft(s, a)) return s.byteLength;
1485
1485
  if (typeof s != "string") throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof s);
1486
- const c = s.length, g = arguments.length > 2 && arguments[2] === !0;
1487
- if (!g && c === 0) return 0;
1486
+ const c = s.length, y = arguments.length > 2 && arguments[2] === !0;
1487
+ if (!y && c === 0) return 0;
1488
1488
  let b = !1;
1489
1489
  for (; ; ) switch (h) {
1490
1490
  case "ascii":
@@ -1504,13 +1504,13 @@ qn.write = function(e, t, r, n, i, o) {
1504
1504
  case "base64":
1505
1505
  return bi(s).length;
1506
1506
  default:
1507
- if (b) return g ? -1 : hn(s).length;
1507
+ if (b) return y ? -1 : hn(s).length;
1508
1508
  h = ("" + h).toLowerCase(), b = !0;
1509
1509
  }
1510
1510
  }
1511
1511
  u.byteLength = M;
1512
1512
  function Z(s, h, c) {
1513
- let g = !1;
1513
+ let y = !1;
1514
1514
  if ((h === void 0 || h < 0) && (h = 0), h > this.length || ((c === void 0 || c > this.length) && (c = this.length), c <= 0) || (c >>>= 0, h >>>= 0, c <= h)) return "";
1515
1515
  for (s || (s = "utf8"); ; ) switch (s) {
1516
1516
  case "hex":
@@ -1531,14 +1531,14 @@ qn.write = function(e, t, r, n, i, o) {
1531
1531
  case "utf-16le":
1532
1532
  return ct(this, h, c);
1533
1533
  default:
1534
- if (g) throw new TypeError("Unknown encoding: " + s);
1535
- s = (s + "").toLowerCase(), g = !0;
1534
+ if (y) throw new TypeError("Unknown encoding: " + s);
1535
+ s = (s + "").toLowerCase(), y = !0;
1536
1536
  }
1537
1537
  }
1538
1538
  u.prototype._isBuffer = !0;
1539
1539
  function Q(s, h, c) {
1540
- const g = s[h];
1541
- s[h] = s[c], s[c] = g;
1540
+ const y = s[h];
1541
+ s[h] = s[c], s[c] = y;
1542
1542
  }
1543
1543
  u.prototype.swap16 = function() {
1544
1544
  const s = this.length;
@@ -1565,35 +1565,35 @@ qn.write = function(e, t, r, n, i, o) {
1565
1565
  let s = "";
1566
1566
  const h = e.INSPECT_MAX_BYTES;
1567
1567
  return s = this.toString("hex", 0, h).replace(/(.{2})/g, "$1 ").trim(), this.length > h && (s += " ... "), "<Buffer " + s + ">";
1568
- }, n && (u.prototype[n] = u.prototype.inspect), u.prototype.compare = function(s, h, c, g, b) {
1568
+ }, n && (u.prototype[n] = u.prototype.inspect), u.prototype.compare = function(s, h, c, y, b) {
1569
1569
  if (Ft(s, o) && (s = u.from(s, s.offset, s.byteLength)), !u.isBuffer(s)) throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof s);
1570
- if (h === void 0 && (h = 0), c === void 0 && (c = s ? s.length : 0), g === void 0 && (g = 0), b === void 0 && (b = this.length), h < 0 || c > s.length || g < 0 || b > this.length) throw new RangeError("out of range index");
1571
- if (g >= b && h >= c) return 0;
1572
- if (g >= b) return -1;
1570
+ if (h === void 0 && (h = 0), c === void 0 && (c = s ? s.length : 0), y === void 0 && (y = 0), b === void 0 && (b = this.length), h < 0 || c > s.length || y < 0 || b > this.length) throw new RangeError("out of range index");
1571
+ if (y >= b && h >= c) return 0;
1572
+ if (y >= b) return -1;
1573
1573
  if (h >= c) return 1;
1574
- if (h >>>= 0, c >>>= 0, g >>>= 0, b >>>= 0, this === s) return 0;
1575
- let E = b - g, k = c - h;
1576
- const ot = Math.min(E, k), bt = this.slice(g, b), at = s.slice(h, c);
1574
+ if (h >>>= 0, c >>>= 0, y >>>= 0, b >>>= 0, this === s) return 0;
1575
+ let E = b - y, k = c - h;
1576
+ const ot = Math.min(E, k), bt = this.slice(y, b), at = s.slice(h, c);
1577
1577
  for (let nt = 0; nt < ot; ++nt) if (bt[nt] !== at[nt]) {
1578
1578
  E = bt[nt], k = at[nt];
1579
1579
  break;
1580
1580
  }
1581
1581
  return E < k ? -1 : k < E ? 1 : 0;
1582
1582
  };
1583
- function q(s, h, c, g, b) {
1583
+ function q(s, h, c, y, b) {
1584
1584
  if (s.length === 0) return -1;
1585
- if (typeof c == "string" ? (g = c, c = 0) : c > 2147483647 ? c = 2147483647 : c < -2147483648 && (c = -2147483648), c = +c, un(c) && (c = b ? 0 : s.length - 1), c < 0 && (c = s.length + c), c >= s.length) {
1585
+ if (typeof c == "string" ? (y = c, c = 0) : c > 2147483647 ? c = 2147483647 : c < -2147483648 && (c = -2147483648), c = +c, un(c) && (c = b ? 0 : s.length - 1), c < 0 && (c = s.length + c), c >= s.length) {
1586
1586
  if (b) return -1;
1587
1587
  c = s.length - 1;
1588
1588
  } else if (c < 0) if (b) c = 0;
1589
1589
  else return -1;
1590
- if (typeof h == "string" && (h = u.from(h, g)), u.isBuffer(h)) return h.length === 0 ? -1 : Vt(s, h, c, g, b);
1591
- if (typeof h == "number") return h = h & 255, typeof o.prototype.indexOf == "function" ? b ? o.prototype.indexOf.call(s, h, c) : o.prototype.lastIndexOf.call(s, h, c) : Vt(s, [h], c, g, b);
1590
+ if (typeof h == "string" && (h = u.from(h, y)), u.isBuffer(h)) return h.length === 0 ? -1 : Vt(s, h, c, y, b);
1591
+ if (typeof h == "number") return h = h & 255, typeof o.prototype.indexOf == "function" ? b ? o.prototype.indexOf.call(s, h, c) : o.prototype.lastIndexOf.call(s, h, c) : Vt(s, [h], c, y, b);
1592
1592
  throw new TypeError("val must be string, number or Buffer");
1593
1593
  }
1594
- function Vt(s, h, c, g, b) {
1594
+ function Vt(s, h, c, y, b) {
1595
1595
  let E = 1, k = s.length, ot = h.length;
1596
- if (g !== void 0 && (g = String(g).toLowerCase(), g === "ucs2" || g === "ucs-2" || g === "utf16le" || g === "utf-16le")) {
1596
+ if (y !== void 0 && (y = String(y).toLowerCase(), y === "ucs2" || y === "ucs-2" || y === "utf16le" || y === "utf-16le")) {
1597
1597
  if (s.length < 2 || h.length < 2) return -1;
1598
1598
  E = 2, k /= 2, ot /= 2, c /= 2;
1599
1599
  }
@@ -1623,42 +1623,42 @@ qn.write = function(e, t, r, n, i, o) {
1623
1623
  }, u.prototype.lastIndexOf = function(s, h, c) {
1624
1624
  return q(this, s, h, c, !1);
1625
1625
  };
1626
- function Qt(s, h, c, g) {
1626
+ function Qt(s, h, c, y) {
1627
1627
  c = Number(c) || 0;
1628
1628
  const b = s.length - c;
1629
- g ? (g = Number(g), g > b && (g = b)) : g = b;
1629
+ y ? (y = Number(y), y > b && (y = b)) : y = b;
1630
1630
  const E = h.length;
1631
- g > E / 2 && (g = E / 2);
1631
+ y > E / 2 && (y = E / 2);
1632
1632
  let k;
1633
- for (k = 0; k < g; ++k) {
1633
+ for (k = 0; k < y; ++k) {
1634
1634
  const ot = parseInt(h.substr(k * 2, 2), 16);
1635
1635
  if (un(ot)) return k;
1636
1636
  s[c + k] = ot;
1637
1637
  }
1638
1638
  return k;
1639
1639
  }
1640
- function Y(s, h, c, g) {
1641
- return br(hn(h, s.length - c), s, c, g);
1640
+ function Y(s, h, c, y) {
1641
+ return br(hn(h, s.length - c), s, c, y);
1642
1642
  }
1643
- function U(s, h, c, g) {
1644
- return br(ya(h), s, c, g);
1643
+ function U(s, h, c, y) {
1644
+ return br(ga(h), s, c, y);
1645
1645
  }
1646
- function T(s, h, c, g) {
1647
- return br(bi(h), s, c, g);
1646
+ function T(s, h, c, y) {
1647
+ return br(bi(h), s, c, y);
1648
1648
  }
1649
- function A(s, h, c, g) {
1650
- return br(ba(h, s.length - c), s, c, g);
1649
+ function A(s, h, c, y) {
1650
+ return br(ba(h, s.length - c), s, c, y);
1651
1651
  }
1652
- u.prototype.write = function(s, h, c, g) {
1653
- if (h === void 0) g = "utf8", c = this.length, h = 0;
1654
- else if (c === void 0 && typeof h == "string") g = h, c = this.length, h = 0;
1655
- else if (isFinite(h)) h = h >>> 0, isFinite(c) ? (c = c >>> 0, g === void 0 && (g = "utf8")) : (g = c, c = void 0);
1652
+ u.prototype.write = function(s, h, c, y) {
1653
+ if (h === void 0) y = "utf8", c = this.length, h = 0;
1654
+ else if (c === void 0 && typeof h == "string") y = h, c = this.length, h = 0;
1655
+ else if (isFinite(h)) h = h >>> 0, isFinite(c) ? (c = c >>> 0, y === void 0 && (y = "utf8")) : (y = c, c = void 0);
1656
1656
  else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");
1657
1657
  const b = this.length - h;
1658
1658
  if ((c === void 0 || c > b) && (c = b), s.length > 0 && (c < 0 || h < 0) || h > this.length) throw new RangeError("Attempt to write outside buffer bounds");
1659
- g || (g = "utf8");
1659
+ y || (y = "utf8");
1660
1660
  let E = !1;
1661
- for (; ; ) switch (g) {
1661
+ for (; ; ) switch (y) {
1662
1662
  case "hex":
1663
1663
  return Qt(this, s, h, c);
1664
1664
  case "utf8":
@@ -1676,8 +1676,8 @@ qn.write = function(e, t, r, n, i, o) {
1676
1676
  case "utf-16le":
1677
1677
  return A(this, s, h, c);
1678
1678
  default:
1679
- if (E) throw new TypeError("Unknown encoding: " + g);
1680
- g = ("" + g).toLowerCase(), E = !0;
1679
+ if (E) throw new TypeError("Unknown encoding: " + y);
1680
+ y = ("" + y).toLowerCase(), E = !0;
1681
1681
  }
1682
1682
  }, u.prototype.toJSON = function() {
1683
1683
  return {
@@ -1690,7 +1690,7 @@ qn.write = function(e, t, r, n, i, o) {
1690
1690
  }
1691
1691
  function V(s, h, c) {
1692
1692
  c = Math.min(s.length, c);
1693
- const g = [];
1693
+ const y = [];
1694
1694
  let b = h;
1695
1695
  for (; b < c; ) {
1696
1696
  const E = s[b];
@@ -1711,48 +1711,48 @@ qn.write = function(e, t, r, n, i, o) {
1711
1711
  bt = s[b + 1], at = s[b + 2], nt = s[b + 3], (bt & 192) === 128 && (at & 192) === 128 && (nt & 192) === 128 && (pt = (E & 15) << 18 | (bt & 63) << 12 | (at & 63) << 6 | nt & 63, pt > 65535 && pt < 1114112 && (k = pt));
1712
1712
  }
1713
1713
  }
1714
- k === null ? (k = 65533, ot = 1) : k > 65535 && (k -= 65536, g.push(k >>> 10 & 1023 | 55296), k = 56320 | k & 1023), g.push(k), b += ot;
1714
+ k === null ? (k = 65533, ot = 1) : k > 65535 && (k -= 65536, y.push(k >>> 10 & 1023 | 55296), k = 56320 | k & 1023), y.push(k), b += ot;
1715
1715
  }
1716
- return C(g);
1716
+ return C(y);
1717
1717
  }
1718
1718
  const $ = 4096;
1719
1719
  function C(s) {
1720
1720
  const h = s.length;
1721
1721
  if (h <= $) return String.fromCharCode.apply(String, s);
1722
- let c = "", g = 0;
1723
- for (; g < h; ) c += String.fromCharCode.apply(String, s.slice(g, g += $));
1722
+ let c = "", y = 0;
1723
+ for (; y < h; ) c += String.fromCharCode.apply(String, s.slice(y, y += $));
1724
1724
  return c;
1725
1725
  }
1726
1726
  function L(s, h, c) {
1727
- let g = "";
1727
+ let y = "";
1728
1728
  c = Math.min(s.length, c);
1729
- for (let b = h; b < c; ++b) g += String.fromCharCode(s[b] & 127);
1730
- return g;
1729
+ for (let b = h; b < c; ++b) y += String.fromCharCode(s[b] & 127);
1730
+ return y;
1731
1731
  }
1732
1732
  function D(s, h, c) {
1733
- let g = "";
1733
+ let y = "";
1734
1734
  c = Math.min(s.length, c);
1735
- for (let b = h; b < c; ++b) g += String.fromCharCode(s[b]);
1736
- return g;
1735
+ for (let b = h; b < c; ++b) y += String.fromCharCode(s[b]);
1736
+ return y;
1737
1737
  }
1738
1738
  function F(s, h, c) {
1739
- const g = s.length;
1740
- (!h || h < 0) && (h = 0), (!c || c < 0 || c > g) && (c = g);
1739
+ const y = s.length;
1740
+ (!h || h < 0) && (h = 0), (!c || c < 0 || c > y) && (c = y);
1741
1741
  let b = "";
1742
1742
  for (let E = h; E < c; ++E) b += ma[s[E]];
1743
1743
  return b;
1744
1744
  }
1745
1745
  function ct(s, h, c) {
1746
- const g = s.slice(h, c);
1746
+ const y = s.slice(h, c);
1747
1747
  let b = "";
1748
- for (let E = 0; E < g.length - 1; E += 2) b += String.fromCharCode(g[E] + g[E + 1] * 256);
1748
+ for (let E = 0; E < y.length - 1; E += 2) b += String.fromCharCode(y[E] + y[E + 1] * 256);
1749
1749
  return b;
1750
1750
  }
1751
1751
  u.prototype.slice = function(s, h) {
1752
1752
  const c = this.length;
1753
1753
  s = ~~s, h = h === void 0 ? c : ~~h, s < 0 ? (s += c, s < 0 && (s = 0)) : s > c && (s = c), h < 0 ? (h += c, h < 0 && (h = 0)) : h > c && (h = c), h < s && (h = s);
1754
- const g = this.subarray(s, h);
1755
- return Object.setPrototypeOf(g, u.prototype), g;
1754
+ const y = this.subarray(s, h);
1755
+ return Object.setPrototypeOf(y, u.prototype), y;
1756
1756
  };
1757
1757
  function W(s, h, c) {
1758
1758
  if (s % 1 !== 0 || s < 0) throw new RangeError("offset is not uint");
@@ -1760,14 +1760,14 @@ qn.write = function(e, t, r, n, i, o) {
1760
1760
  }
1761
1761
  u.prototype.readUintLE = u.prototype.readUIntLE = function(s, h, c) {
1762
1762
  s = s >>> 0, h = h >>> 0, c || W(s, h, this.length);
1763
- let g = this[s], b = 1, E = 0;
1764
- for (; ++E < h && (b *= 256); ) g += this[s + E] * b;
1765
- return g;
1763
+ let y = this[s], b = 1, E = 0;
1764
+ for (; ++E < h && (b *= 256); ) y += this[s + E] * b;
1765
+ return y;
1766
1766
  }, u.prototype.readUintBE = u.prototype.readUIntBE = function(s, h, c) {
1767
1767
  s = s >>> 0, h = h >>> 0, c || W(s, h, this.length);
1768
- let g = this[s + --h], b = 1;
1769
- for (; h > 0 && (b *= 256); ) g += this[s + --h] * b;
1770
- return g;
1768
+ let y = this[s + --h], b = 1;
1769
+ for (; h > 0 && (b *= 256); ) y += this[s + --h] * b;
1770
+ return y;
1771
1771
  }, u.prototype.readUint8 = u.prototype.readUInt8 = function(s, h) {
1772
1772
  return s = s >>> 0, h || W(s, 1, this.length), this[s];
1773
1773
  }, u.prototype.readUint16LE = u.prototype.readUInt16LE = function(s, h) {
@@ -1782,23 +1782,23 @@ qn.write = function(e, t, r, n, i, o) {
1782
1782
  s = s >>> 0, _e(s, "offset");
1783
1783
  const h = this[s], c = this[s + 7];
1784
1784
  (h === void 0 || c === void 0) && ze(s, this.length - 8);
1785
- const g = h + this[++s] * 2 ** 8 + this[++s] * 2 ** 16 + this[++s] * 2 ** 24, b = this[++s] + this[++s] * 2 ** 8 + this[++s] * 2 ** 16 + c * 2 ** 24;
1786
- return BigInt(g) + (BigInt(b) << BigInt(32));
1785
+ const y = h + this[++s] * 2 ** 8 + this[++s] * 2 ** 16 + this[++s] * 2 ** 24, b = this[++s] + this[++s] * 2 ** 8 + this[++s] * 2 ** 16 + c * 2 ** 24;
1786
+ return BigInt(y) + (BigInt(b) << BigInt(32));
1787
1787
  }), u.prototype.readBigUInt64BE = ie(function(s) {
1788
1788
  s = s >>> 0, _e(s, "offset");
1789
1789
  const h = this[s], c = this[s + 7];
1790
1790
  (h === void 0 || c === void 0) && ze(s, this.length - 8);
1791
- const g = h * 2 ** 24 + this[++s] * 2 ** 16 + this[++s] * 2 ** 8 + this[++s], b = this[++s] * 2 ** 24 + this[++s] * 2 ** 16 + this[++s] * 2 ** 8 + c;
1792
- return (BigInt(g) << BigInt(32)) + BigInt(b);
1791
+ const y = h * 2 ** 24 + this[++s] * 2 ** 16 + this[++s] * 2 ** 8 + this[++s], b = this[++s] * 2 ** 24 + this[++s] * 2 ** 16 + this[++s] * 2 ** 8 + c;
1792
+ return (BigInt(y) << BigInt(32)) + BigInt(b);
1793
1793
  }), u.prototype.readIntLE = function(s, h, c) {
1794
1794
  s = s >>> 0, h = h >>> 0, c || W(s, h, this.length);
1795
- let g = this[s], b = 1, E = 0;
1796
- for (; ++E < h && (b *= 256); ) g += this[s + E] * b;
1797
- return b *= 128, g >= b && (g -= Math.pow(2, 8 * h)), g;
1795
+ let y = this[s], b = 1, E = 0;
1796
+ for (; ++E < h && (b *= 256); ) y += this[s + E] * b;
1797
+ return b *= 128, y >= b && (y -= Math.pow(2, 8 * h)), y;
1798
1798
  }, u.prototype.readIntBE = function(s, h, c) {
1799
1799
  s = s >>> 0, h = h >>> 0, c || W(s, h, this.length);
1800
- let g = h, b = 1, E = this[s + --g];
1801
- for (; g > 0 && (b *= 256); ) E += this[s + --g] * b;
1800
+ let y = h, b = 1, E = this[s + --y];
1801
+ for (; y > 0 && (b *= 256); ) E += this[s + --y] * b;
1802
1802
  return b *= 128, E >= b && (E -= Math.pow(2, 8 * h)), E;
1803
1803
  }, u.prototype.readInt8 = function(s, h) {
1804
1804
  return s = s >>> 0, h || W(s, 1, this.length), this[s] & 128 ? (255 - this[s] + 1) * -1 : this[s];
@@ -1818,14 +1818,14 @@ qn.write = function(e, t, r, n, i, o) {
1818
1818
  s = s >>> 0, _e(s, "offset");
1819
1819
  const h = this[s], c = this[s + 7];
1820
1820
  (h === void 0 || c === void 0) && ze(s, this.length - 8);
1821
- const g = this[s + 4] + this[s + 5] * 2 ** 8 + this[s + 6] * 2 ** 16 + (c << 24);
1822
- return (BigInt(g) << BigInt(32)) + BigInt(h + this[++s] * 2 ** 8 + this[++s] * 2 ** 16 + this[++s] * 2 ** 24);
1821
+ const y = this[s + 4] + this[s + 5] * 2 ** 8 + this[s + 6] * 2 ** 16 + (c << 24);
1822
+ return (BigInt(y) << BigInt(32)) + BigInt(h + this[++s] * 2 ** 8 + this[++s] * 2 ** 16 + this[++s] * 2 ** 24);
1823
1823
  }), u.prototype.readBigInt64BE = ie(function(s) {
1824
1824
  s = s >>> 0, _e(s, "offset");
1825
1825
  const h = this[s], c = this[s + 7];
1826
1826
  (h === void 0 || c === void 0) && ze(s, this.length - 8);
1827
- const g = (h << 24) + this[++s] * 2 ** 16 + this[++s] * 2 ** 8 + this[++s];
1828
- return (BigInt(g) << BigInt(32)) + BigInt(this[++s] * 2 ** 24 + this[++s] * 2 ** 16 + this[++s] * 2 ** 8 + c);
1827
+ const y = (h << 24) + this[++s] * 2 ** 16 + this[++s] * 2 ** 8 + this[++s];
1828
+ return (BigInt(y) << BigInt(32)) + BigInt(this[++s] * 2 ** 24 + this[++s] * 2 ** 16 + this[++s] * 2 ** 8 + c);
1829
1829
  }), u.prototype.readFloatLE = function(s, h) {
1830
1830
  return s = s >>> 0, h || W(s, 4, this.length), r.read(this, s, !0, 23, 4);
1831
1831
  }, u.prototype.readFloatBE = function(s, h) {
@@ -1835,21 +1835,21 @@ qn.write = function(e, t, r, n, i, o) {
1835
1835
  }, u.prototype.readDoubleBE = function(s, h) {
1836
1836
  return s = s >>> 0, h || W(s, 8, this.length), r.read(this, s, !1, 52, 8);
1837
1837
  };
1838
- function K(s, h, c, g, b, E) {
1838
+ function K(s, h, c, y, b, E) {
1839
1839
  if (!u.isBuffer(s)) throw new TypeError('"buffer" argument must be a Buffer instance');
1840
1840
  if (h > b || h < E) throw new RangeError('"value" argument is out of bounds');
1841
- if (c + g > s.length) throw new RangeError("Index out of range");
1841
+ if (c + y > s.length) throw new RangeError("Index out of range");
1842
1842
  }
1843
- u.prototype.writeUintLE = u.prototype.writeUIntLE = function(s, h, c, g) {
1844
- if (s = +s, h = h >>> 0, c = c >>> 0, !g) {
1843
+ u.prototype.writeUintLE = u.prototype.writeUIntLE = function(s, h, c, y) {
1844
+ if (s = +s, h = h >>> 0, c = c >>> 0, !y) {
1845
1845
  const k = Math.pow(2, 8 * c) - 1;
1846
1846
  K(this, s, h, c, k, 0);
1847
1847
  }
1848
1848
  let b = 1, E = 0;
1849
1849
  for (this[h] = s & 255; ++E < c && (b *= 256); ) this[h + E] = s / b & 255;
1850
1850
  return h + c;
1851
- }, u.prototype.writeUintBE = u.prototype.writeUIntBE = function(s, h, c, g) {
1852
- if (s = +s, h = h >>> 0, c = c >>> 0, !g) {
1851
+ }, u.prototype.writeUintBE = u.prototype.writeUIntBE = function(s, h, c, y) {
1852
+ if (s = +s, h = h >>> 0, c = c >>> 0, !y) {
1853
1853
  const k = Math.pow(2, 8 * c) - 1;
1854
1854
  K(this, s, h, c, k, 0);
1855
1855
  }
@@ -1867,15 +1867,15 @@ qn.write = function(e, t, r, n, i, o) {
1867
1867
  }, u.prototype.writeUint32BE = u.prototype.writeUInt32BE = function(s, h, c) {
1868
1868
  return s = +s, h = h >>> 0, c || K(this, s, h, 4, 4294967295, 0), this[h] = s >>> 24, this[h + 1] = s >>> 16, this[h + 2] = s >>> 8, this[h + 3] = s & 255, h + 4;
1869
1869
  };
1870
- function it(s, h, c, g, b) {
1871
- yi(h, g, b, s, c, 7);
1870
+ function it(s, h, c, y, b) {
1871
+ gi(h, y, b, s, c, 7);
1872
1872
  let E = Number(h & BigInt(4294967295));
1873
1873
  s[c++] = E, E = E >> 8, s[c++] = E, E = E >> 8, s[c++] = E, E = E >> 8, s[c++] = E;
1874
1874
  let k = Number(h >> BigInt(32) & BigInt(4294967295));
1875
1875
  return s[c++] = k, k = k >> 8, s[c++] = k, k = k >> 8, s[c++] = k, k = k >> 8, s[c++] = k, c;
1876
1876
  }
1877
- function lt(s, h, c, g, b) {
1878
- yi(h, g, b, s, c, 7);
1877
+ function lt(s, h, c, y, b) {
1878
+ gi(h, y, b, s, c, 7);
1879
1879
  let E = Number(h & BigInt(4294967295));
1880
1880
  s[c + 7] = E, E = E >> 8, s[c + 6] = E, E = E >> 8, s[c + 5] = E, E = E >> 8, s[c + 4] = E;
1881
1881
  let k = Number(h >> BigInt(32) & BigInt(4294967295));
@@ -1885,16 +1885,16 @@ qn.write = function(e, t, r, n, i, o) {
1885
1885
  return it(this, s, h, BigInt(0), BigInt("0xffffffffffffffff"));
1886
1886
  }), u.prototype.writeBigUInt64BE = ie(function(s, h = 0) {
1887
1887
  return lt(this, s, h, BigInt(0), BigInt("0xffffffffffffffff"));
1888
- }), u.prototype.writeIntLE = function(s, h, c, g) {
1889
- if (s = +s, h = h >>> 0, !g) {
1888
+ }), u.prototype.writeIntLE = function(s, h, c, y) {
1889
+ if (s = +s, h = h >>> 0, !y) {
1890
1890
  const ot = Math.pow(2, 8 * c - 1);
1891
1891
  K(this, s, h, c, ot - 1, -ot);
1892
1892
  }
1893
1893
  let b = 0, E = 1, k = 0;
1894
1894
  for (this[h] = s & 255; ++b < c && (E *= 256); ) s < 0 && k === 0 && this[h + b - 1] !== 0 && (k = 1), this[h + b] = (s / E >> 0) - k & 255;
1895
1895
  return h + c;
1896
- }, u.prototype.writeIntBE = function(s, h, c, g) {
1897
- if (s = +s, h = h >>> 0, !g) {
1896
+ }, u.prototype.writeIntBE = function(s, h, c, y) {
1897
+ if (s = +s, h = h >>> 0, !y) {
1898
1898
  const ot = Math.pow(2, 8 * c - 1);
1899
1899
  K(this, s, h, c, ot - 1, -ot);
1900
1900
  }
@@ -1916,41 +1916,41 @@ qn.write = function(e, t, r, n, i, o) {
1916
1916
  }), u.prototype.writeBigInt64BE = ie(function(s, h = 0) {
1917
1917
  return lt(this, s, h, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
1918
1918
  });
1919
- function _t(s, h, c, g, b, E) {
1920
- if (c + g > s.length) throw new RangeError("Index out of range");
1919
+ function _t(s, h, c, y, b, E) {
1920
+ if (c + y > s.length) throw new RangeError("Index out of range");
1921
1921
  if (c < 0) throw new RangeError("Index out of range");
1922
1922
  }
1923
- function st(s, h, c, g, b) {
1924
- return h = +h, c = c >>> 0, b || _t(s, h, c, 4), r.write(s, h, c, g, 23, 4), c + 4;
1923
+ function st(s, h, c, y, b) {
1924
+ return h = +h, c = c >>> 0, b || _t(s, h, c, 4), r.write(s, h, c, y, 23, 4), c + 4;
1925
1925
  }
1926
1926
  u.prototype.writeFloatLE = function(s, h, c) {
1927
1927
  return st(this, s, h, !0, c);
1928
1928
  }, u.prototype.writeFloatBE = function(s, h, c) {
1929
1929
  return st(this, s, h, !1, c);
1930
1930
  };
1931
- function yt(s, h, c, g, b) {
1932
- return h = +h, c = c >>> 0, b || _t(s, h, c, 8), r.write(s, h, c, g, 52, 8), c + 8;
1931
+ function gt(s, h, c, y, b) {
1932
+ return h = +h, c = c >>> 0, b || _t(s, h, c, 8), r.write(s, h, c, y, 52, 8), c + 8;
1933
1933
  }
1934
1934
  u.prototype.writeDoubleLE = function(s, h, c) {
1935
- return yt(this, s, h, !0, c);
1935
+ return gt(this, s, h, !0, c);
1936
1936
  }, u.prototype.writeDoubleBE = function(s, h, c) {
1937
- return yt(this, s, h, !1, c);
1938
- }, u.prototype.copy = function(s, h, c, g) {
1937
+ return gt(this, s, h, !1, c);
1938
+ }, u.prototype.copy = function(s, h, c, y) {
1939
1939
  if (!u.isBuffer(s)) throw new TypeError("argument should be a Buffer");
1940
- if (c || (c = 0), !g && g !== 0 && (g = this.length), h >= s.length && (h = s.length), h || (h = 0), g > 0 && g < c && (g = c), g === c || s.length === 0 || this.length === 0) return 0;
1940
+ if (c || (c = 0), !y && y !== 0 && (y = this.length), h >= s.length && (h = s.length), h || (h = 0), y > 0 && y < c && (y = c), y === c || s.length === 0 || this.length === 0) return 0;
1941
1941
  if (h < 0) throw new RangeError("targetStart out of bounds");
1942
1942
  if (c < 0 || c >= this.length) throw new RangeError("Index out of range");
1943
- if (g < 0) throw new RangeError("sourceEnd out of bounds");
1944
- g > this.length && (g = this.length), s.length - h < g - c && (g = s.length - h + c);
1945
- const b = g - c;
1946
- return this === s && typeof o.prototype.copyWithin == "function" ? this.copyWithin(h, c, g) : o.prototype.set.call(s, this.subarray(c, g), h), b;
1947
- }, u.prototype.fill = function(s, h, c, g) {
1943
+ if (y < 0) throw new RangeError("sourceEnd out of bounds");
1944
+ y > this.length && (y = this.length), s.length - h < y - c && (y = s.length - h + c);
1945
+ const b = y - c;
1946
+ return this === s && typeof o.prototype.copyWithin == "function" ? this.copyWithin(h, c, y) : o.prototype.set.call(s, this.subarray(c, y), h), b;
1947
+ }, u.prototype.fill = function(s, h, c, y) {
1948
1948
  if (typeof s == "string") {
1949
- if (typeof h == "string" ? (g = h, h = 0, c = this.length) : typeof c == "string" && (g = c, c = this.length), g !== void 0 && typeof g != "string") throw new TypeError("encoding must be a string");
1950
- if (typeof g == "string" && !u.isEncoding(g)) throw new TypeError("Unknown encoding: " + g);
1949
+ if (typeof h == "string" ? (y = h, h = 0, c = this.length) : typeof c == "string" && (y = c, c = this.length), y !== void 0 && typeof y != "string") throw new TypeError("encoding must be a string");
1950
+ if (typeof y == "string" && !u.isEncoding(y)) throw new TypeError("Unknown encoding: " + y);
1951
1951
  if (s.length === 1) {
1952
1952
  const E = s.charCodeAt(0);
1953
- (g === "utf8" && E < 128 || g === "latin1") && (s = E);
1953
+ (y === "utf8" && E < 128 || y === "latin1") && (s = E);
1954
1954
  }
1955
1955
  } else typeof s == "number" ? s = s & 255 : typeof s == "boolean" && (s = Number(s));
1956
1956
  if (h < 0 || this.length < h || this.length < c) throw new RangeError("Out of range index");
@@ -1959,7 +1959,7 @@ qn.write = function(e, t, r, n, i, o) {
1959
1959
  let b;
1960
1960
  if (typeof s == "number") for (b = h; b < c; ++b) this[b] = s;
1961
1961
  else {
1962
- const E = u.isBuffer(s) ? s : u.from(s, g), k = E.length;
1962
+ const E = u.isBuffer(s) ? s : u.from(s, y), k = E.length;
1963
1963
  if (k === 0) throw new TypeError('The value "' + s + '" is invalid for argument "value"');
1964
1964
  for (b = 0; b < c - h; ++b) this[b + h] = E[b % k];
1965
1965
  }
@@ -1978,11 +1978,11 @@ qn.write = function(e, t, r, n, i, o) {
1978
1978
  get code() {
1979
1979
  return s;
1980
1980
  }
1981
- set code(g) {
1981
+ set code(y) {
1982
1982
  Object.defineProperty(this, "code", {
1983
1983
  configurable: !0,
1984
1984
  enumerable: !0,
1985
- value: g,
1985
+ value: y,
1986
1986
  writable: !0
1987
1987
  });
1988
1988
  }
@@ -1996,25 +1996,25 @@ qn.write = function(e, t, r, n, i, o) {
1996
1996
  }, RangeError), Be("ERR_INVALID_ARG_TYPE", function(s, h) {
1997
1997
  return `The "${s}" argument must be of type number. Received type ${typeof h}`;
1998
1998
  }, TypeError), Be("ERR_OUT_OF_RANGE", function(s, h, c) {
1999
- let g = `The value of "${s}" is out of range.`, b = c;
2000
- return Number.isInteger(c) && Math.abs(c) > 2 ** 32 ? b = je(String(c)) : typeof c == "bigint" && (b = String(c), (c > BigInt(2) ** BigInt(32) || c < -(BigInt(2) ** BigInt(32))) && (b = je(b)), b += "n"), g += ` It must be ${h}. Received ${b}`, g;
1999
+ let y = `The value of "${s}" is out of range.`, b = c;
2000
+ return Number.isInteger(c) && Math.abs(c) > 2 ** 32 ? b = je(String(c)) : typeof c == "bigint" && (b = String(c), (c > BigInt(2) ** BigInt(32) || c < -(BigInt(2) ** BigInt(32))) && (b = je(b)), b += "n"), y += ` It must be ${h}. Received ${b}`, y;
2001
2001
  }, RangeError);
2002
2002
  function je(s) {
2003
2003
  let h = "", c = s.length;
2004
- const g = s[0] === "-" ? 1 : 0;
2005
- for (; c >= g + 4; c -= 3) h = `_${s.slice(c - 3, c)}${h}`;
2004
+ const y = s[0] === "-" ? 1 : 0;
2005
+ for (; c >= y + 4; c -= 3) h = `_${s.slice(c - 3, c)}${h}`;
2006
2006
  return `${s.slice(0, c)}${h}`;
2007
2007
  }
2008
2008
  function da(s, h, c) {
2009
2009
  _e(h, "offset"), (s[h] === void 0 || s[h + c] === void 0) && ze(h, s.length - (c + 1));
2010
2010
  }
2011
- function yi(s, h, c, g, b, E) {
2011
+ function gi(s, h, c, y, b, E) {
2012
2012
  if (s > c || s < h) {
2013
2013
  const k = typeof h == "bigint" ? "n" : "";
2014
2014
  let ot;
2015
2015
  throw h === 0 || h === BigInt(0) ? ot = `>= 0${k} and < 2${k} ** ${(E + 1) * 8}${k}` : ot = `>= -(2${k} ** ${(E + 1) * 8 - 1}${k}) and < 2 ** ${(E + 1) * 8 - 1}${k}`, new $t.ERR_OUT_OF_RANGE("value", ot, s);
2016
2016
  }
2017
- da(g, b, E);
2017
+ da(y, b, E);
2018
2018
  }
2019
2019
  function _e(s, h) {
2020
2020
  if (typeof s != "number") throw new $t.ERR_INVALID_ARG_TYPE(h, "number", s);
@@ -2023,7 +2023,7 @@ qn.write = function(e, t, r, n, i, o) {
2023
2023
  throw Math.floor(s) !== s ? (_e(s, c), new $t.ERR_OUT_OF_RANGE("offset", "an integer", s)) : h < 0 ? new $t.ERR_BUFFER_OUT_OF_BOUNDS() : new $t.ERR_OUT_OF_RANGE("offset", `>= 0 and <= ${h}`, s);
2024
2024
  }
2025
2025
  const wa = /[^+/0-9A-Za-z-_]/g;
2026
- function ga(s) {
2026
+ function ya(s) {
2027
2027
  if (s = s.split("=")[0], s = s.trim().replace(wa, ""), s.length < 2) return "";
2028
2028
  for (; s.length % 4 !== 0; ) s = s + "=";
2029
2029
  return s;
@@ -2031,16 +2031,16 @@ qn.write = function(e, t, r, n, i, o) {
2031
2031
  function hn(s, h) {
2032
2032
  h = h || 1 / 0;
2033
2033
  let c;
2034
- const g = s.length;
2034
+ const y = s.length;
2035
2035
  let b = null;
2036
2036
  const E = [];
2037
- for (let k = 0; k < g; ++k) {
2037
+ for (let k = 0; k < y; ++k) {
2038
2038
  if (c = s.charCodeAt(k), c > 55295 && c < 57344) {
2039
2039
  if (!b) {
2040
2040
  if (c > 56319) {
2041
2041
  (h -= 3) > -1 && E.push(239, 191, 189);
2042
2042
  continue;
2043
- } else if (k + 1 === g) {
2043
+ } else if (k + 1 === y) {
2044
2044
  (h -= 3) > -1 && E.push(239, 191, 189);
2045
2045
  continue;
2046
2046
  }
@@ -2069,23 +2069,23 @@ qn.write = function(e, t, r, n, i, o) {
2069
2069
  }
2070
2070
  return E;
2071
2071
  }
2072
- function ya(s) {
2072
+ function ga(s) {
2073
2073
  const h = [];
2074
2074
  for (let c = 0; c < s.length; ++c) h.push(s.charCodeAt(c) & 255);
2075
2075
  return h;
2076
2076
  }
2077
2077
  function ba(s, h) {
2078
- let c, g, b;
2078
+ let c, y, b;
2079
2079
  const E = [];
2080
- for (let k = 0; k < s.length && !((h -= 2) < 0); ++k) c = s.charCodeAt(k), g = c >> 8, b = c % 256, E.push(b), E.push(g);
2080
+ for (let k = 0; k < s.length && !((h -= 2) < 0); ++k) c = s.charCodeAt(k), y = c >> 8, b = c % 256, E.push(b), E.push(y);
2081
2081
  return E;
2082
2082
  }
2083
2083
  function bi(s) {
2084
- return t.toByteArray(ga(s));
2084
+ return t.toByteArray(ya(s));
2085
2085
  }
2086
- function br(s, h, c, g) {
2086
+ function br(s, h, c, y) {
2087
2087
  let b;
2088
- for (b = 0; b < g && !(b + c >= h.length || b >= s.length); ++b) h[b + c] = s[b];
2088
+ for (b = 0; b < y && !(b + c >= h.length || b >= s.length); ++b) h[b + c] = s[b];
2089
2089
  return b;
2090
2090
  }
2091
2091
  function Ft(s, h) {
@@ -2097,8 +2097,8 @@ qn.write = function(e, t, r, n, i, o) {
2097
2097
  const ma = (function() {
2098
2098
  const s = "0123456789abcdef", h = new Array(256);
2099
2099
  for (let c = 0; c < 16; ++c) {
2100
- const g = c * 16;
2101
- for (let b = 0; b < 16; ++b) h[g + b] = s[c] + s[b];
2100
+ const y = c * 16;
2101
+ for (let b = 0; b < 16; ++b) h[y + b] = s[c] + s[b];
2102
2102
  }
2103
2103
  return h;
2104
2104
  })();
@@ -2236,11 +2236,11 @@ var wh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2236
2236
  encode: dh,
2237
2237
  isDefinedHashType: Qr
2238
2238
  }, Symbol.toStringTag, { value: "Module" })), Vs = j.OP_RESERVED;
2239
- function gh(e) {
2239
+ function yh(e) {
2240
2240
  return oh(e) && (e === j.OP_0 || e >= j.OP_1 && e <= j.OP_16 || e === j.OP_1NEGATE);
2241
2241
  }
2242
2242
  function $s(e) {
2243
- return e instanceof Uint8Array ? !0 : gh(e);
2243
+ return e instanceof Uint8Array ? !0 : yh(e);
2244
2244
  }
2245
2245
  function Jr(e) {
2246
2246
  return Yn(e) && e.every($s);
@@ -2258,13 +2258,13 @@ function Rr(e) {
2258
2258
  function Zn(e) {
2259
2259
  return e instanceof Uint8Array;
2260
2260
  }
2261
- function yh(e) {
2261
+ function gh(e) {
2262
2262
  return Yn(e);
2263
2263
  }
2264
2264
  function Nr(e) {
2265
2265
  return e instanceof Uint8Array;
2266
2266
  }
2267
- function gt(e) {
2267
+ function yt(e) {
2268
2268
  if (Zn(e)) return e;
2269
2269
  if (!Yn(e)) throw new TypeError("Expected an array");
2270
2270
  const t = e.reduce((i, o) => Nr(o) ? o.length === 1 && Rr(o) !== void 0 ? i + 1 : i + Bs(o.length) + o.length : i + 1, 0), r = new Uint8Array(t);
@@ -2282,7 +2282,7 @@ function gt(e) {
2282
2282
  return r;
2283
2283
  }
2284
2284
  function rt(e) {
2285
- if (yh(e)) return e;
2285
+ if (gh(e)) return e;
2286
2286
  if (!(e instanceof Uint8Array)) throw new TypeError("Expected a Uint8Array");
2287
2287
  const t = [];
2288
2288
  let r = 0;
@@ -2317,7 +2317,7 @@ function Ks(e) {
2317
2317
  }
2318
2318
  function bh(e) {
2319
2319
  if (typeof e != "string") throw new TypeError("Expected a string");
2320
- return gt(e.split(" ").map((t) => {
2320
+ return yt(e.split(" ").map((t) => {
2321
2321
  if (j[t] !== void 0) return j[t];
2322
2322
  if (!hh(t)) throw new TypeError("Expected hex string");
2323
2323
  return Mt(t);
@@ -2336,7 +2336,7 @@ function xe(e) {
2336
2336
  }
2337
2337
  var mh = sh, Ae = wh, Eh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2338
2338
  __proto__: null,
2339
- compile: gt,
2339
+ compile: yt,
2340
2340
  countNonPushOnlyOPs: Xn,
2341
2341
  decompile: rt,
2342
2342
  fromASM: bh,
@@ -2378,8 +2378,8 @@ var mh = sh, Ae = wh, Eh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.
2378
2378
  #l = !1;
2379
2379
  #d = !1;
2380
2380
  #w = !1;
2381
- #g = !1;
2382
- #y;
2381
+ #y = !1;
2382
+ #g;
2383
2383
  #m = !1;
2384
2384
  constructor(t, r) {
2385
2385
  this.#t = t.network ?? kt, this.#a = {
@@ -2406,7 +2406,7 @@ var mh = sh, Ae = wh, Eh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.
2406
2406
  return this.#w || (this.#u = this.#A(), this.#w = !0), this.#u;
2407
2407
  }
2408
2408
  get output() {
2409
- return this.#g || (this.#c = this.#T(), this.#g = !0), this.#c;
2409
+ return this.#y || (this.#c = this.#T(), this.#y = !0), this.#c;
2410
2410
  }
2411
2411
  static fromProgram(t, r) {
2412
2412
  return new Qe({
@@ -2448,7 +2448,7 @@ var mh = sh, Ae = wh, Eh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.
2448
2448
  if (!this.#m) {
2449
2449
  if (this.#e) {
2450
2450
  const t = cr(this.#e);
2451
- t && (this.#y = {
2451
+ t && (this.#g = {
2452
2452
  version: t.version,
2453
2453
  prefix: t.prefix,
2454
2454
  data: t.data
@@ -2456,7 +2456,7 @@ var mh = sh, Ae = wh, Eh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.
2456
2456
  }
2457
2457
  this.#m = !0;
2458
2458
  }
2459
- return this.#y;
2459
+ return this.#g;
2460
2460
  }
2461
2461
  #v() {
2462
2462
  if (typeof this.#r < "u" && typeof this.#n < "u") {
@@ -2501,7 +2501,7 @@ var mh = sh, Ae = wh, Eh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.
2501
2501
  #T() {
2502
2502
  if (this.#i) return this.#i;
2503
2503
  const t = this.program;
2504
- if (t) return gt([Oi.OP_16, t]);
2504
+ if (t) return yt([Oi.OP_16, t]);
2505
2505
  }
2506
2506
  #k() {
2507
2507
  let t = Et(0);
@@ -2744,13 +2744,13 @@ var Er = /* @__PURE__ */ new Uint32Array(16), Ph = class extends Wn {
2744
2744
  for (let w = 0; w < 16; w++, t += 4) Er[w] = e.getUint32(t, !0);
2745
2745
  let r = this.h0 | 0, n = r, i = this.h1 | 0, o = i, a = this.h2 | 0, f = a, l = this.h3 | 0, p = l, u = this.h4 | 0, d = u;
2746
2746
  for (let w = 0; w < 5; w++) {
2747
- const y = 4 - w, m = Uh[w], v = Oh[w], I = js[w], P = zs[w], S = Th[w], _ = kh[w];
2747
+ const g = 4 - w, m = Uh[w], v = Oh[w], I = js[w], P = zs[w], S = Th[w], _ = kh[w];
2748
2748
  for (let O = 0; O < 16; O++) {
2749
2749
  const z = Ee(r + _i(w, i, a, l) + Er[I[O]] + m, S[O]) + u | 0;
2750
2750
  r = u, u = l, l = Ee(a, 10) | 0, a = i, i = z;
2751
2751
  }
2752
2752
  for (let O = 0; O < 16; O++) {
2753
- const z = Ee(n + _i(y, o, f, p) + Er[P[O]] + v, _[O]) + d | 0;
2753
+ const z = Ee(n + _i(g, o, f, p) + Er[P[O]] + v, _[O]) + d | 0;
2754
2754
  n = d, d = p, p = Ee(f, 10) | 0, f = o, o = z;
2755
2755
  }
2756
2756
  }
@@ -3518,11 +3518,11 @@ var Rh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3518
3518
  add(t) {
3519
3519
  const { X: r, Y: n, Z: i } = this, { X: o, Y: a, Z: f } = pn(t), l = 0n, p = Qs;
3520
3520
  let u = 0n, d = 0n, w = 0n;
3521
- const y = N(p * 3n);
3521
+ const g = N(p * 3n);
3522
3522
  let m = N(r * o), v = N(n * a), I = N(i * f), P = N(r + n), S = N(o + a);
3523
3523
  P = N(P * S), S = N(m + v), P = N(P - S), S = N(r + i);
3524
3524
  let _ = N(o + f);
3525
- return S = N(S * _), _ = N(m + I), S = N(S - _), _ = N(n + i), u = N(a + f), _ = N(_ * u), u = N(v + I), _ = N(_ - u), w = N(l * S), u = N(y * I), w = N(u + w), u = N(v - w), w = N(v + w), d = N(u * w), v = N(m + m), v = N(v + m), I = N(l * I), S = N(y * S), v = N(v + I), I = N(m - I), I = N(l * I), S = N(S + I), m = N(v * S), d = N(d + m), m = N(_ * S), u = N(P * u), u = N(u - m), m = N(P * v), w = N(_ * w), w = N(w + m), new be(u, d, w);
3525
+ return S = N(S * _), _ = N(m + I), S = N(S - _), _ = N(n + i), u = N(a + f), _ = N(_ * u), u = N(v + I), _ = N(_ - u), w = N(l * S), u = N(g * I), w = N(u + w), u = N(v - w), w = N(v + w), d = N(u * w), v = N(m + m), v = N(v + m), I = N(l * I), S = N(g * S), v = N(v + I), I = N(m - I), I = N(l * I), S = N(S + I), m = N(v * S), d = N(d + m), m = N(_ * S), u = N(P * u), u = N(u - m), m = N(P * v), w = N(_ * w), w = N(w + m), new be(u, d, w);
3526
3526
  }
3527
3527
  subtract(t) {
3528
3528
  return this.add(pn(t).negate());
@@ -3587,8 +3587,8 @@ var jh = (e) => Hr("0x" + (ro(e) || "0")), Ci = (e, t, r) => jh(e.subarray(t, r)
3587
3587
  for (let l = 0; l < oo; l++) {
3588
3588
  let p = Number(e & a);
3589
3589
  e >>= f, p > xn && (p -= o, e += 1n);
3590
- const u = l * xn, d = u, w = u + Math.abs(p) - 1, y = l % 2 !== 0, m = p < 0;
3591
- p === 0 ? n = n.add(Ki(y, t[d])) : r = r.add(Ki(m, t[w]));
3590
+ const u = l * xn, d = u, w = u + Math.abs(p) - 1, g = l % 2 !== 0, m = p < 0;
3591
+ p === 0 ? n = n.add(Ki(g, t[d])) : r = r.add(Ki(m, t[w]));
3592
3592
  }
3593
3593
  return e !== 0n && xt("invalid wnaf"), {
3594
3594
  p: r,
@@ -3647,8 +3647,8 @@ var he = j, ao = class Je {
3647
3647
  #l;
3648
3648
  #d;
3649
3649
  #w;
3650
- #g;
3651
- #y = !1;
3650
+ #y;
3651
+ #g = !1;
3652
3652
  #m = !1;
3653
3653
  #E = !1;
3654
3654
  #v = !1;
@@ -3672,7 +3672,7 @@ var he = j, ao = class Je {
3672
3672
  return this.#t;
3673
3673
  }
3674
3674
  get address() {
3675
- return this.#y || (this.#u = this.#x(), this.#y = !0), this.#u;
3675
+ return this.#g || (this.#u = this.#x(), this.#g = !0), this.#u;
3676
3676
  }
3677
3677
  get hash() {
3678
3678
  return this.#m || (this.#c = this.#B(), this.#m = !0), this.#c;
@@ -3690,7 +3690,7 @@ var he = j, ao = class Je {
3690
3690
  return this.#b || (this.#w = this.#H(), this.#b = !0), this.#w;
3691
3691
  }
3692
3692
  get witness() {
3693
- return this.#S || (this.#g = this.#L(), this.#S = !0), this.#g;
3693
+ return this.#S || (this.#y = this.#L(), this.#S = !0), this.#y;
3694
3694
  }
3695
3695
  static fromPubkey(t, r) {
3696
3696
  return new Je({
@@ -3776,7 +3776,7 @@ var he = j, ao = class Je {
3776
3776
  #N() {
3777
3777
  if (this.#i) return this.#i;
3778
3778
  const t = this.hash;
3779
- if (t) return gt([
3779
+ if (t) return yt([
3780
3780
  he.OP_DUP,
3781
3781
  he.OP_HASH160,
3782
3782
  t,
@@ -3792,7 +3792,7 @@ var he = j, ao = class Je {
3792
3792
  const r = Bn(this.#r);
3793
3793
  r && (this.#f ? t = r.uncompressed : t = r.hybrid);
3794
3794
  }
3795
- return gt([this.#n, t]);
3795
+ return yt([this.#n, t]);
3796
3796
  }
3797
3797
  #L() {
3798
3798
  if (this.input) return [];
@@ -3878,8 +3878,8 @@ var Ye = j, ho = class tr {
3878
3878
  #l;
3879
3879
  #d = !1;
3880
3880
  #w = !1;
3881
- #g = !1;
3882
3881
  #y = !1;
3882
+ #g = !1;
3883
3883
  #m = !1;
3884
3884
  #E = !1;
3885
3885
  #v;
@@ -3909,10 +3909,10 @@ var Ye = j, ho = class tr {
3909
3909
  return this.#w || (this.#f = this.#x(), this.#w = !0), this.#f;
3910
3910
  }
3911
3911
  get output() {
3912
- return this.#g || (this.#u = this.#B(), this.#g = !0), this.#u;
3912
+ return this.#y || (this.#u = this.#B(), this.#y = !0), this.#u;
3913
3913
  }
3914
3914
  get input() {
3915
- return this.#y || (this.#c = this.#_(), this.#y = !0), this.#c;
3915
+ return this.#g || (this.#c = this.#_(), this.#g = !0), this.#c;
3916
3916
  }
3917
3917
  get redeem() {
3918
3918
  return this.#m || (this.#p = this.#R(), this.#m = !0), this.#p;
@@ -3980,7 +3980,7 @@ var Ye = j, ho = class tr {
3980
3980
  this.#A = {
3981
3981
  network: this.#t,
3982
3982
  output: r === Ye.OP_FALSE ? /* @__PURE__ */ new Uint8Array(0) : r,
3983
- input: gt(t.slice(0, -1)),
3983
+ input: yt(t.slice(0, -1)),
3984
3984
  witness: this.#o || []
3985
3985
  };
3986
3986
  }
@@ -4005,7 +4005,7 @@ var Ye = j, ho = class tr {
4005
4005
  #B() {
4006
4006
  if (this.#r) return this.#r;
4007
4007
  const t = this.hash;
4008
- if (t) return gt([
4008
+ if (t) return yt([
4009
4009
  Ye.OP_HASH160,
4010
4010
  t,
4011
4011
  Ye.OP_EQUAL
@@ -4014,7 +4014,7 @@ var Ye = j, ho = class tr {
4014
4014
  #_() {
4015
4015
  if (this.#n) return this.#n;
4016
4016
  const t = this.#i;
4017
- if (!(!t || !t.input || !t.output)) return gt([].concat(rt(t.input), t.output));
4017
+ if (!(!t || !t.input || !t.output)) return yt([].concat(rt(t.input), t.output));
4018
4018
  }
4019
4019
  #R() {
4020
4020
  if (this.#i) return this.#i;
@@ -4388,13 +4388,13 @@ var nu = class {
4388
4388
  process(e, t) {
4389
4389
  for (let u = 0; u < 16; u++, t += 4) fe[u] = e.getUint32(t, !1);
4390
4390
  for (let u = 16; u < 64; u++) {
4391
- const d = fe[u - 15], w = fe[u - 2], y = Gt(d, 7) ^ Gt(d, 18) ^ d >>> 3, m = Gt(w, 17) ^ Gt(w, 19) ^ w >>> 10;
4392
- fe[u] = m + fe[u - 7] + y + fe[u - 16] | 0;
4391
+ const d = fe[u - 15], w = fe[u - 2], g = Gt(d, 7) ^ Gt(d, 18) ^ d >>> 3, m = Gt(w, 17) ^ Gt(w, 19) ^ w >>> 10;
4392
+ fe[u] = m + fe[u - 7] + g + fe[u - 16] | 0;
4393
4393
  }
4394
4394
  let { A: r, B: n, C: i, D: o, E: a, F: f, G: l, H: p } = this;
4395
4395
  for (let u = 0; u < 64; u++) {
4396
- const d = Gt(a, 6) ^ Gt(a, 11) ^ Gt(a, 25), w = p + d + eu(a, f, l) + iu[u] + fe[u] | 0, y = (Gt(r, 2) ^ Gt(r, 13) ^ Gt(r, 22)) + ru(r, n, i) | 0;
4397
- p = l, l = f, f = a, a = o + w | 0, o = i, i = n, n = r, r = w + y | 0;
4396
+ const d = Gt(a, 6) ^ Gt(a, 11) ^ Gt(a, 25), w = p + d + eu(a, f, l) + iu[u] + fe[u] | 0, g = (Gt(r, 2) ^ Gt(r, 13) ^ Gt(r, 22)) + ru(r, n, i) | 0;
4397
+ p = l, l = f, f = a, a = o + w | 0, o = i, i = n, n = r, r = w + g | 0;
4398
4398
  }
4399
4399
  r = r + this.A | 0, n = n + this.B | 0, i = i + this.C | 0, o = o + this.D | 0, a = a + this.E | 0, f = f + this.F | 0, l = l + this.G | 0, p = p + this.H | 0, this.set(r, n, i, o, a, f, l, p);
4400
4400
  }
@@ -4431,10 +4431,10 @@ function hu(e) {
4431
4431
  if (p instanceof Uint8Array || (ArrayBuffer.isView(p) ? p = new Uint8Array(p.buffer, p.byteOffset, p.byteLength) : Array.isArray(p) && (p = Uint8Array.from(p))), !(p instanceof Uint8Array)) throw new TypeError("Expected Uint8Array");
4432
4432
  if (p.length === 0) return "";
4433
4433
  let u = 0, d = 0, w = 0;
4434
- const y = p.length;
4435
- for (; w !== y && p[w] === 0; ) w++, u++;
4436
- const m = (y - w) * o + 1 >>> 0, v = new Uint8Array(m);
4437
- for (; w !== y; ) {
4434
+ const g = p.length;
4435
+ for (; w !== g && p[w] === 0; ) w++, u++;
4436
+ const m = (g - w) * o + 1 >>> 0, v = new Uint8Array(m);
4437
+ for (; w !== g; ) {
4438
4438
  let S = p[w], _ = 0;
4439
4439
  for (let O = m - 1; (S !== 0 || _ < d) && O !== -1; O--, _++) S += 256 * v[O] >>> 0, v[O] = S % r >>> 0, S = S / r >>> 0;
4440
4440
  if (S !== 0) throw new Error("Non-zero carry");
@@ -4451,22 +4451,22 @@ function hu(e) {
4451
4451
  if (p.length === 0) return /* @__PURE__ */ new Uint8Array();
4452
4452
  let u = 0, d = 0, w = 0;
4453
4453
  for (; p[u] === n; ) d++, u++;
4454
- const y = (p.length - u) * i + 1 >>> 0, m = new Uint8Array(y);
4454
+ const g = (p.length - u) * i + 1 >>> 0, m = new Uint8Array(g);
4455
4455
  for (; u < p.length; ) {
4456
4456
  const S = p.charCodeAt(u);
4457
4457
  if (S > 255) return;
4458
4458
  let _ = t[S];
4459
4459
  if (_ === 255) return;
4460
4460
  let O = 0;
4461
- for (let z = y - 1; (_ !== 0 || O < w) && z !== -1; z--, O++) _ += r * m[z] >>> 0, m[z] = _ % 256 >>> 0, _ = _ / 256 >>> 0;
4461
+ for (let z = g - 1; (_ !== 0 || O < w) && z !== -1; z--, O++) _ += r * m[z] >>> 0, m[z] = _ % 256 >>> 0, _ = _ / 256 >>> 0;
4462
4462
  if (_ !== 0) throw new Error("Non-zero carry");
4463
4463
  w = O, u++;
4464
4464
  }
4465
- let v = y - w;
4466
- for (; v !== y && m[v] === 0; ) v++;
4467
- const I = new Uint8Array(d + (y - v));
4465
+ let v = g - w;
4466
+ for (; v !== g && m[v] === 0; ) v++;
4467
+ const I = new Uint8Array(d + (g - v));
4468
4468
  let P = d;
4469
- for (; v !== y; ) I[P++] = m[v++];
4469
+ for (; v !== g; ) I[P++] = m[v++];
4470
4470
  return I;
4471
4471
  }
4472
4472
  function l(p) {
@@ -4515,7 +4515,7 @@ function ri(e, t) {
4515
4515
  if (r.length !== t) throw new Error("number too large");
4516
4516
  return r;
4517
4517
  }
4518
- function go(e, t) {
4518
+ function yo(e, t) {
4519
4519
  return ri(e, t).reverse();
4520
4520
  }
4521
4521
  function uu(e) {
@@ -4540,7 +4540,7 @@ function pu(e, t, r) {
4540
4540
  let l = n(e), p = n(e), u = 0;
4541
4541
  const d = () => {
4542
4542
  l.fill(1), p.fill(0), u = 0;
4543
- }, w = (...v) => r(p, we(l, ...v)), y = (v = i) => {
4543
+ }, w = (...v) => r(p, we(l, ...v)), g = (v = i) => {
4544
4544
  p = w(o, v), l = w(), v.length !== 0 && (p = w(a, v), l = w());
4545
4545
  }, m = () => {
4546
4546
  if (u++ >= f) throw new Error("drbg: tried max amount of iterations");
@@ -4554,9 +4554,9 @@ function pu(e, t, r) {
4554
4554
  return we(...I);
4555
4555
  };
4556
4556
  return (v, I) => {
4557
- d(), y(v);
4557
+ d(), g(v);
4558
4558
  let P;
4559
- for (; !(P = I(m())); ) y();
4559
+ for (; !(P = I(m())); ) g();
4560
4560
  return d(), P;
4561
4561
  };
4562
4562
  }
@@ -4580,7 +4580,7 @@ function Wi(e) {
4580
4580
  return t.set(r, o), o;
4581
4581
  };
4582
4582
  }
4583
- var Ot = /* @__PURE__ */ BigInt(0), Tt = /* @__PURE__ */ BigInt(1), ve = /* @__PURE__ */ BigInt(2), yo = /* @__PURE__ */ BigInt(3), bo = /* @__PURE__ */ BigInt(4), mo = /* @__PURE__ */ BigInt(5), du = /* @__PURE__ */ BigInt(7), Eo = /* @__PURE__ */ BigInt(8), wu = /* @__PURE__ */ BigInt(9), vo = /* @__PURE__ */ BigInt(16);
4583
+ var Ot = /* @__PURE__ */ BigInt(0), Tt = /* @__PURE__ */ BigInt(1), ve = /* @__PURE__ */ BigInt(2), go = /* @__PURE__ */ BigInt(3), bo = /* @__PURE__ */ BigInt(4), mo = /* @__PURE__ */ BigInt(5), du = /* @__PURE__ */ BigInt(7), Eo = /* @__PURE__ */ BigInt(8), wu = /* @__PURE__ */ BigInt(9), vo = /* @__PURE__ */ BigInt(16);
4584
4584
  function Dt(e, t) {
4585
4585
  const r = e % t;
4586
4586
  return r >= Ot ? r : t + r;
@@ -4608,22 +4608,22 @@ function Io(e, t) {
4608
4608
  const r = (e.ORDER + Tt) / bo, n = e.pow(t, r);
4609
4609
  return si(e, n, t), n;
4610
4610
  }
4611
- function gu(e, t) {
4611
+ function yu(e, t) {
4612
4612
  const r = (e.ORDER - mo) / Eo, n = e.mul(t, ve), i = e.pow(n, r), o = e.mul(t, i), a = e.mul(e.mul(o, ve), i), f = e.mul(o, e.sub(a, e.ONE));
4613
4613
  return si(e, f, t), f;
4614
4614
  }
4615
- function yu(e) {
4615
+ function gu(e) {
4616
4616
  const t = nn(e), r = Ao(e), n = r(t, t.neg(t.ONE)), i = r(t, n), o = r(t, t.neg(n)), a = (e + du) / vo;
4617
4617
  return (f, l) => {
4618
4618
  let p = f.pow(l, a), u = f.mul(p, n);
4619
- const d = f.mul(p, i), w = f.mul(p, o), y = f.eql(f.sqr(u), l), m = f.eql(f.sqr(d), l);
4620
- p = f.cmov(p, u, y), u = f.cmov(w, d, m);
4619
+ const d = f.mul(p, i), w = f.mul(p, o), g = f.eql(f.sqr(u), l), m = f.eql(f.sqr(d), l);
4620
+ p = f.cmov(p, u, g), u = f.cmov(w, d, m);
4621
4621
  const v = f.eql(f.sqr(u), l), I = f.cmov(p, u, v);
4622
4622
  return si(f, I, l), I;
4623
4623
  };
4624
4624
  }
4625
4625
  function Ao(e) {
4626
- if (e < yo) throw new Error("sqrt is not defined for small field");
4626
+ if (e < go) throw new Error("sqrt is not defined for small field");
4627
4627
  let t = e - Tt, r = 0;
4628
4628
  for (; t % ve === Ot; ) t /= ve, r++;
4629
4629
  let n = ve;
@@ -4638,16 +4638,16 @@ function Ao(e) {
4638
4638
  let p = r, u = f.mul(f.ONE, o), d = f.pow(l, t), w = f.pow(l, a);
4639
4639
  for (; !f.eql(d, f.ONE); ) {
4640
4640
  if (f.is0(d)) return f.ZERO;
4641
- let y = 1, m = f.sqr(d);
4642
- for (; !f.eql(m, f.ONE); ) if (y++, m = f.sqr(m), y === p) throw new Error("Cannot find square root");
4643
- const v = Tt << BigInt(p - y - 1), I = f.pow(u, v);
4644
- p = y, u = f.sqr(I), d = f.mul(d, u), w = f.mul(w, I);
4641
+ let g = 1, m = f.sqr(d);
4642
+ for (; !f.eql(m, f.ONE); ) if (g++, m = f.sqr(m), g === p) throw new Error("Cannot find square root");
4643
+ const v = Tt << BigInt(p - g - 1), I = f.pow(u, v);
4644
+ p = g, u = f.sqr(I), d = f.mul(d, u), w = f.mul(w, I);
4645
4645
  }
4646
4646
  return w;
4647
4647
  };
4648
4648
  }
4649
4649
  function bu(e) {
4650
- return e % bo === yo ? Io : e % Eo === mo ? gu : e % vo === wu ? yu(e) : Ao(e);
4650
+ return e % bo === go ? Io : e % Eo === mo ? yu : e % vo === wu ? gu(e) : Ao(e);
4651
4651
  }
4652
4652
  var mu = [
4653
4653
  "create",
@@ -4777,7 +4777,7 @@ var Au = class {
4777
4777
  return this._sqrt || (this._sqrt = bu(this.ORDER)), this._sqrt(this, e);
4778
4778
  }
4779
4779
  toBytes(e) {
4780
- return this.isLE ? go(e, this.BYTES) : ri(e, this.BYTES);
4780
+ return this.isLE ? yo(e, this.BYTES) : ri(e, this.BYTES);
4781
4781
  }
4782
4782
  fromBytes(e, t = !1) {
4783
4783
  ut(e);
@@ -4816,7 +4816,7 @@ function Su(e, t, r = !1) {
4816
4816
  const n = e.length, i = To(t), o = ko(t);
4817
4817
  if (n < 16 || n < o || n > 1024) throw new Error("expected " + o + "-1024 bytes of input, got " + n);
4818
4818
  const a = Dt(r ? wo(e) : rn(e), t - Tt) + Tt;
4819
- return r ? go(a, i) : ri(a, i);
4819
+ return r ? yo(a, i) : ri(a, i);
4820
4820
  }
4821
4821
  var Me = /* @__PURE__ */ BigInt(0), Ie = /* @__PURE__ */ BigInt(1);
4822
4822
  function Dr(e, t) {
@@ -4845,18 +4845,18 @@ function qi(e, t, r) {
4845
4845
  const { windowSize: n, mask: i, maxNumber: o, shiftBy: a } = r;
4846
4846
  let f = Number(e & i), l = e >> a;
4847
4847
  f > n && (f -= o, l += Ie);
4848
- const p = t * n, u = p + Math.abs(f) - 1, d = f === 0, w = f < 0, y = t % 2 !== 0;
4848
+ const p = t * n, u = p + Math.abs(f) - 1, d = f === 0, w = f < 0, g = t % 2 !== 0;
4849
4849
  return {
4850
4850
  nextN: l,
4851
4851
  offset: u,
4852
4852
  isZero: d,
4853
4853
  isNeg: w,
4854
- isNegF: y,
4854
+ isNegF: g,
4855
4855
  offsetF: p
4856
4856
  };
4857
4857
  }
4858
- var gn = /* @__PURE__ */ new WeakMap(), Oo = /* @__PURE__ */ new WeakMap();
4859
- function yn(e) {
4858
+ var yn = /* @__PURE__ */ new WeakMap(), Oo = /* @__PURE__ */ new WeakMap();
4859
+ function gn(e) {
4860
4860
  return Oo.get(e) || 1;
4861
4861
  }
4862
4862
  function Yi(e) {
@@ -4910,22 +4910,22 @@ var Tu = class {
4910
4910
  return Yi(r), n;
4911
4911
  }
4912
4912
  getPrecomputes(e, t, r) {
4913
- let n = gn.get(t);
4914
- return n || (n = this.precomputeWindow(t, e), e !== 1 && (typeof r == "function" && (n = r(n)), gn.set(t, n))), n;
4913
+ let n = yn.get(t);
4914
+ return n || (n = this.precomputeWindow(t, e), e !== 1 && (typeof r == "function" && (n = r(n)), yn.set(t, n))), n;
4915
4915
  }
4916
4916
  cached(e, t, r) {
4917
- const n = yn(e);
4917
+ const n = gn(e);
4918
4918
  return this.wNAF(n, this.getPrecomputes(n, e, r), t);
4919
4919
  }
4920
4920
  unsafe(e, t, r, n) {
4921
- const i = yn(e);
4921
+ const i = gn(e);
4922
4922
  return i === 1 ? this._unsafeLadder(e, t, n) : this.wNAFUnsafe(i, this.getPrecomputes(i, e, r), t, n);
4923
4923
  }
4924
4924
  createCache(e, t) {
4925
- Uo(t, this.bits), Oo.set(e, t), gn.delete(e);
4925
+ Uo(t, this.bits), Oo.set(e, t), yn.delete(e);
4926
4926
  }
4927
4927
  hasCache(e) {
4928
- return yn(e) !== 1;
4928
+ return gn(e) !== 1;
4929
4929
  }
4930
4930
  };
4931
4931
  function ku(e, t, r, n) {
@@ -5020,8 +5020,8 @@ function Pu(e, t, r) {
5020
5020
  let p = e - f * n - l * o, u = -f * i - l * a;
5021
5021
  const d = p < re, w = u < re;
5022
5022
  d && (p = -p), w && (u = -u);
5023
- const y = ni(Math.ceil(lu(r) / 2)) + Ve;
5024
- if (p < re || p >= y || u < re || u >= y) throw new Error("splitScalar (endomorphism): failed, k=" + e);
5023
+ const g = ni(Math.ceil(lu(r) / 2)) + Ve;
5024
+ if (p < re || p >= g || u < re || u >= g) throw new Error("splitScalar (endomorphism): failed, k=" + e);
5025
5025
  return {
5026
5026
  k1neg: d,
5027
5027
  k1: p,
@@ -5165,7 +5165,7 @@ function _u(e, t = {}) {
5165
5165
  };
5166
5166
  } else throw new Error(`bad point: got length ${A}, expected compressed=${U} or uncompressed=${T}`);
5167
5167
  }
5168
- const y = t.toBytes || d, m = t.fromBytes || w;
5168
+ const g = t.toBytes || d, m = t.fromBytes || w;
5169
5169
  function v(Y) {
5170
5170
  const U = n.sqr(Y), T = n.mul(U, Y);
5171
5171
  return n.add(n.add(T, n.mul(Y, o.a)), o.b);
@@ -5284,8 +5284,8 @@ function _u(e, t = {}) {
5284
5284
  const ct = o.a, W = n.mul(o.b, Ar);
5285
5285
  let K = n.mul(T, V), it = n.mul(A, $), lt = n.mul(B, C), _t = n.add(T, A), st = n.add(V, $);
5286
5286
  _t = n.mul(_t, st), st = n.add(K, it), _t = n.sub(_t, st), st = n.add(T, B);
5287
- let yt = n.add(V, C);
5288
- return st = n.mul(st, yt), yt = n.add(K, lt), st = n.sub(st, yt), yt = n.add(A, B), L = n.add($, C), yt = n.mul(yt, L), L = n.add(it, lt), yt = n.sub(yt, L), F = n.mul(ct, st), L = n.mul(W, lt), F = n.add(L, F), L = n.sub(it, F), F = n.add(it, F), D = n.mul(L, F), it = n.add(K, K), it = n.add(it, K), lt = n.mul(ct, lt), st = n.mul(W, st), it = n.add(it, lt), lt = n.sub(K, lt), lt = n.mul(ct, lt), st = n.add(st, lt), K = n.mul(it, st), D = n.add(D, K), K = n.mul(yt, st), L = n.mul(_t, L), L = n.sub(L, K), K = n.mul(_t, it), F = n.mul(yt, F), F = n.add(F, K), new q(L, D, F);
5287
+ let gt = n.add(V, C);
5288
+ return st = n.mul(st, gt), gt = n.add(K, lt), st = n.sub(st, gt), gt = n.add(A, B), L = n.add($, C), gt = n.mul(gt, L), L = n.add(it, lt), gt = n.sub(gt, L), F = n.mul(ct, st), L = n.mul(W, lt), F = n.add(L, F), L = n.sub(it, F), F = n.add(it, F), D = n.mul(L, F), it = n.add(K, K), it = n.add(it, K), lt = n.mul(ct, lt), st = n.mul(W, st), it = n.add(it, lt), lt = n.sub(K, lt), lt = n.mul(ct, lt), st = n.add(st, lt), K = n.mul(it, st), D = n.add(D, K), K = n.mul(gt, st), L = n.mul(_t, L), L = n.sub(L, K), K = n.mul(_t, it), F = n.mul(gt, F), F = n.add(F, K), new q(L, D, F);
5289
5289
  }
5290
5290
  subtract(U) {
5291
5291
  return this.add(U.negate());
@@ -5333,7 +5333,7 @@ function _u(e, t = {}) {
5333
5333
  return this.multiplyUnsafe(a).is0();
5334
5334
  }
5335
5335
  toBytes(U = !0) {
5336
- return Kr(U, "isCompressed"), this.assertValidity(), y(q, this, U);
5336
+ return Kr(U, "isCompressed"), this.assertValidity(), g(q, this, U);
5337
5337
  }
5338
5338
  toHex(U = !0) {
5339
5339
  return en(this.toBytes(U));
@@ -5359,39 +5359,39 @@ function Ro(e, t) {
5359
5359
  }
5360
5360
  function Ru(e, t = {}) {
5361
5361
  const { Fn: r } = e, n = t.randomBytes || co, i = Object.assign(Ro(e.Fp, r), { seed: ko(r.ORDER) });
5362
- function o(y) {
5362
+ function o(g) {
5363
5363
  try {
5364
- const m = r.fromBytes(y);
5364
+ const m = r.fromBytes(g);
5365
5365
  return r.isValidNot0(m);
5366
5366
  } catch {
5367
5367
  return !1;
5368
5368
  }
5369
5369
  }
5370
- function a(y, m) {
5370
+ function a(g, m) {
5371
5371
  const { publicKey: v, publicKeyUncompressed: I } = i;
5372
5372
  try {
5373
- const P = y.length;
5374
- return m === !0 && P !== v || m === !1 && P !== I ? !1 : !!e.fromBytes(y);
5373
+ const P = g.length;
5374
+ return m === !0 && P !== v || m === !1 && P !== I ? !1 : !!e.fromBytes(g);
5375
5375
  } catch {
5376
5376
  return !1;
5377
5377
  }
5378
5378
  }
5379
- function f(y = n(i.seed)) {
5380
- return Su(ut(y, i.seed, "seed"), r.ORDER);
5379
+ function f(g = n(i.seed)) {
5380
+ return Su(ut(g, i.seed, "seed"), r.ORDER);
5381
5381
  }
5382
- function l(y, m = !0) {
5383
- return e.BASE.multiply(r.fromBytes(y)).toBytes(m);
5382
+ function l(g, m = !0) {
5383
+ return e.BASE.multiply(r.fromBytes(g)).toBytes(m);
5384
5384
  }
5385
- function p(y) {
5385
+ function p(g) {
5386
5386
  const { secretKey: m, publicKey: v, publicKeyUncompressed: I } = i;
5387
- if (!ti(y) || "_lengths" in r && r._lengths || m === v) return;
5388
- const P = ut(y, void 0, "key").length;
5387
+ if (!ti(g) || "_lengths" in r && r._lengths || m === v) return;
5388
+ const P = ut(g, void 0, "key").length;
5389
5389
  return P === v || P === I;
5390
5390
  }
5391
- function u(y, m, v = !0) {
5392
- if (p(y) === !0) throw new Error("first arg must be private key");
5391
+ function u(g, m, v = !0) {
5392
+ if (p(g) === !0) throw new Error("first arg must be private key");
5393
5393
  if (p(m) === !1) throw new Error("second arg must be public key");
5394
- const I = r.fromBytes(y);
5394
+ const I = r.fromBytes(g);
5395
5395
  return e.fromBytes(m).multiply(I).toBytes(v);
5396
5396
  }
5397
5397
  const d = {
@@ -5416,7 +5416,7 @@ function Nu(e, t, r = {}) {
5416
5416
  bits2int: "function",
5417
5417
  bits2int_modN: "function"
5418
5418
  }), r = Object.assign({}, r);
5419
- const n = r.randomBytes || co, i = r.hmac || ((T, A) => xo(t, T, A)), { Fp: o, Fn: a } = e, { ORDER: f, BITS: l } = a, { keygen: p, getPublicKey: u, getSharedSecret: d, utils: w, lengths: y } = Ru(e, r), m = {
5419
+ const n = r.randomBytes || co, i = r.hmac || ((T, A) => xo(t, T, A)), { Fp: o, Fn: a } = e, { ORDER: f, BITS: l } = a, { keygen: p, getPublicKey: u, getSharedSecret: d, utils: w, lengths: g } = Ru(e, r), m = {
5420
5420
  prehash: !0,
5421
5421
  lowS: typeof r.lowS == "boolean" ? r.lowS : !0,
5422
5422
  format: "compact",
@@ -5434,7 +5434,7 @@ function Nu(e, t, r = {}) {
5434
5434
  }
5435
5435
  function _(T, A) {
5436
5436
  Rn(A);
5437
- const B = y.signature;
5437
+ const B = g.signature;
5438
5438
  return ut(T, A === "compact" ? B : A === "recovered" ? B + 1 : void 0);
5439
5439
  }
5440
5440
  class O {
@@ -5461,7 +5461,7 @@ function Nu(e, t, r = {}) {
5461
5461
  return new O(D, F);
5462
5462
  }
5463
5463
  B === "recovered" && (V = A[0], B = "compact", A = A.subarray(1));
5464
- const $ = y.signature / 2, C = A.subarray(0, $), L = A.subarray($, $ * 2);
5464
+ const $ = g.signature / 2, C = A.subarray(0, $), L = A.subarray($, $ * 2);
5465
5465
  return new O(a.fromBytes(C), a.fromBytes(L), V);
5466
5466
  }
5467
5467
  static fromHex(A, B) {
@@ -5514,19 +5514,19 @@ function Nu(e, t, r = {}) {
5514
5514
  if (!a.isValidNot0(D)) throw new Error("invalid private key");
5515
5515
  const F = [Q(D), Q(L)];
5516
5516
  if (C != null && C !== !1) {
5517
- const it = C === !0 ? n(y.secretKey) : C;
5517
+ const it = C === !0 ? n(g.secretKey) : C;
5518
5518
  F.push(ut(it, void 0, "extraEntropy"));
5519
5519
  }
5520
5520
  const ct = we(...F), W = L;
5521
5521
  function K(it) {
5522
5522
  const lt = z(it);
5523
5523
  if (!a.isValidNot0(lt)) return;
5524
- const _t = a.inv(lt), st = e.BASE.multiply(lt).toAffine(), yt = a.create(st.x);
5525
- if (yt === re) return;
5526
- const $t = a.create(_t * a.create(W + yt * D));
5524
+ const _t = a.inv(lt), st = e.BASE.multiply(lt).toAffine(), gt = a.create(st.x);
5525
+ if (gt === re) return;
5526
+ const $t = a.create(_t * a.create(W + gt * D));
5527
5527
  if ($t === re) return;
5528
- let Be = (st.x === yt ? 0 : 2) | Number(st.y & Ve), je = $t;
5529
- return V && I($t) && (je = a.neg($t), Be ^= 1), new O(yt, je, v ? void 0 : Be);
5528
+ let Be = (st.x === gt ? 0 : 2) | Number(st.y & Ve), je = $t;
5529
+ return V && I($t) && (je = a.neg($t), Be ^= 1), new O(gt, je, v ? void 0 : Be);
5530
5530
  }
5531
5531
  return {
5532
5532
  seed: ct,
@@ -5562,7 +5562,7 @@ function Nu(e, t, r = {}) {
5562
5562
  getPublicKey: u,
5563
5563
  getSharedSecret: d,
5564
5564
  utils: w,
5565
- lengths: y,
5565
+ lengths: g,
5566
5566
  Point: e,
5567
5567
  sign: Qt,
5568
5568
  verify: Y,
@@ -5584,7 +5584,7 @@ var oi = {
5584
5584
  basises: [[BigInt("0x3086d221a7d46bcde86c90e49284eb15"), -BigInt("0xe4437ed6010e88286f547fa90abfe4c3")], [BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"), BigInt("0x3086d221a7d46bcde86c90e49284eb15")]]
5585
5585
  }, Qi = /* @__PURE__ */ BigInt(2);
5586
5586
  function Lu(e) {
5587
- const t = oi.p, r = BigInt(3), n = BigInt(6), i = BigInt(11), o = BigInt(22), a = BigInt(23), f = BigInt(44), l = BigInt(88), p = e * e * e % t, u = p * p * e % t, d = Rt(Rt(Rt(u, r, t) * u % t, r, t) * u % t, Qi, t) * p % t, w = Rt(d, i, t) * d % t, y = Rt(w, o, t) * w % t, m = Rt(y, f, t) * y % t, v = Rt(Rt(Rt(Rt(Rt(Rt(m, l, t) * m % t, f, t) * y % t, r, t) * u % t, a, t) * w % t, n, t) * p % t, Qi, t);
5587
+ const t = oi.p, r = BigInt(3), n = BigInt(6), i = BigInt(11), o = BigInt(22), a = BigInt(23), f = BigInt(44), l = BigInt(88), p = e * e * e % t, u = p * p * e % t, d = Rt(Rt(Rt(u, r, t) * u % t, r, t) * u % t, Qi, t) * p % t, w = Rt(d, i, t) * d % t, g = Rt(w, o, t) * w % t, m = Rt(g, f, t) * g % t, v = Rt(Rt(Rt(Rt(Rt(Rt(m, l, t) * m % t, f, t) * g % t, r, t) * u % t, a, t) * w % t, n, t) * p % t, Qi, t);
5588
5588
  if (!Nn.eql(Nn.sqr(v), e)) throw new Error("Cannot find square root");
5589
5589
  return v;
5590
5590
  }
@@ -5705,7 +5705,7 @@ function Fe(e, t) {
5705
5705
  }
5706
5706
  function Du(e) {
5707
5707
  const t = Et(Ct(e.length));
5708
- return ge(e.length, t), Bt([t, e]);
5708
+ return ye(e.length, t), Bt([t, e]);
5709
5709
  }
5710
5710
  var Ji = j, ts = 2, Mu = 80, No = class rr {
5711
5711
  static NAME = ft.P2MR;
@@ -5725,8 +5725,8 @@ var Ji = j, ts = 2, Mu = 80, No = class rr {
5725
5725
  #l;
5726
5726
  #d;
5727
5727
  #w = !1;
5728
- #g = !1;
5729
5728
  #y = !1;
5729
+ #g = !1;
5730
5730
  #m = !1;
5731
5731
  #E = !1;
5732
5732
  #v = !1;
@@ -5752,10 +5752,10 @@ var Ji = j, ts = 2, Mu = 80, No = class rr {
5752
5752
  return this.#w || (this.#f = this.#x(), this.#w = !0), this.#f;
5753
5753
  }
5754
5754
  get hash() {
5755
- return this.#g || (this.#u = this.#B(), this.#g = !0), this.#u;
5755
+ return this.#y || (this.#u = this.#B(), this.#y = !0), this.#u;
5756
5756
  }
5757
5757
  get output() {
5758
- return this.#y || (this.#c = this.#_(), this.#y = !0), this.#c;
5758
+ return this.#g || (this.#c = this.#_(), this.#g = !0), this.#c;
5759
5759
  }
5760
5760
  get redeem() {
5761
5761
  return this.#m || (this.#p = this.#R(), this.#m = !0), this.#p;
@@ -5855,7 +5855,7 @@ var Ji = j, ts = 2, Mu = 80, No = class rr {
5855
5855
  #_() {
5856
5856
  if (this.#n) return this.#n;
5857
5857
  const t = this.hash;
5858
- if (t) return gt([Ji.OP_2, t]);
5858
+ if (t) return yt([Ji.OP_2, t]);
5859
5859
  }
5860
5860
  #R() {
5861
5861
  if (this.#o) return this.#o;
@@ -5969,8 +5969,8 @@ var es = j, rs = 1, Fu = 80, Ho = class nr {
5969
5969
  #l;
5970
5970
  #d;
5971
5971
  #w;
5972
- #g;
5973
5972
  #y;
5973
+ #g;
5974
5974
  #m;
5975
5975
  #E;
5976
5976
  #v;
@@ -6014,10 +6014,10 @@ var es = j, rs = 1, Fu = 80, Ho = class nr {
6014
6014
  return this.#A || (this.#w = this.#M(), this.#A = !0), this.#w;
6015
6015
  }
6016
6016
  get signature() {
6017
- return this.#T || (this.#g = this.#F(), this.#T = !0), this.#g;
6017
+ return this.#T || (this.#y = this.#F(), this.#T = !0), this.#y;
6018
6018
  }
6019
6019
  get output() {
6020
- return this.#k || (this.#y = this.#W(), this.#k = !0), this.#y;
6020
+ return this.#k || (this.#g = this.#W(), this.#k = !0), this.#g;
6021
6021
  }
6022
6022
  get redeem() {
6023
6023
  return this.#P || (this.#m = this.#G(), this.#P = !0), this.#m;
@@ -6142,7 +6142,7 @@ var es = j, rs = 1, Fu = 80, Ho = class nr {
6142
6142
  #W() {
6143
6143
  if (this.#h) return this.#h;
6144
6144
  const t = this.pubkey;
6145
- if (t) return gt([es.OP_1, t]);
6145
+ if (t) return yt([es.OP_1, t]);
6146
6146
  }
6147
6147
  #G() {
6148
6148
  if (this.#u) return this.#u;
@@ -6277,8 +6277,8 @@ var ns = j, Wu = /* @__PURE__ */ new Uint8Array(0), Lo = class ir {
6277
6277
  #l;
6278
6278
  #d;
6279
6279
  #w = !1;
6280
- #g = !1;
6281
6280
  #y = !1;
6281
+ #g = !1;
6282
6282
  #m = !1;
6283
6283
  #E = !1;
6284
6284
  #v = !1;
@@ -6301,10 +6301,10 @@ var ns = j, Wu = /* @__PURE__ */ new Uint8Array(0), Lo = class ir {
6301
6301
  return this.#w || (this.#h = this.#T(), this.#w = !0), this.#h;
6302
6302
  }
6303
6303
  get hash() {
6304
- return this.#g || (this.#f = this.#k(), this.#g = !0), this.#f;
6304
+ return this.#y || (this.#f = this.#k(), this.#y = !0), this.#f;
6305
6305
  }
6306
6306
  get pubkey() {
6307
- return this.#y || (this.#u = this.#P(), this.#y = !0), this.#u;
6307
+ return this.#g || (this.#u = this.#P(), this.#g = !0), this.#u;
6308
6308
  }
6309
6309
  get signature() {
6310
6310
  return this.#m || (this.#c = this.#U(), this.#m = !0), this.#c;
@@ -6394,7 +6394,7 @@ var ns = j, Wu = /* @__PURE__ */ new Uint8Array(0), Lo = class ir {
6394
6394
  #O() {
6395
6395
  if (this.#i) return this.#i;
6396
6396
  const t = this.hash;
6397
- if (t) return gt([ns.OP_0, t]);
6397
+ if (t) return yt([ns.OP_0, t]);
6398
6398
  }
6399
6399
  #x() {
6400
6400
  if (this.witness) return Wu;
@@ -6474,8 +6474,8 @@ var Co = class sr {
6474
6474
  #l = !1;
6475
6475
  #d = !1;
6476
6476
  #w = !1;
6477
- #g = !1;
6478
6477
  #y = !1;
6478
+ #g = !1;
6479
6479
  #m = !1;
6480
6480
  #E;
6481
6481
  #v = !1;
@@ -6505,10 +6505,10 @@ var Co = class sr {
6505
6505
  return this.#w || (this.#f = this.#P(), this.#w = !0), this.#f;
6506
6506
  }
6507
6507
  get input() {
6508
- return this.#g || (this.#u = this.#U(), this.#g = !0), this.#u;
6508
+ return this.#y || (this.#u = this.#U(), this.#y = !0), this.#u;
6509
6509
  }
6510
6510
  get redeem() {
6511
- return this.#y || (this.#c = this.#O(), this.#y = !0), this.#c;
6511
+ return this.#g || (this.#c = this.#O(), this.#g = !0), this.#c;
6512
6512
  }
6513
6513
  get witness() {
6514
6514
  return this.#m || (this.#p = this.#x(), this.#m = !0), this.#p;
@@ -6584,7 +6584,7 @@ var Co = class sr {
6584
6584
  #P() {
6585
6585
  if (this.#r) return this.#r;
6586
6586
  const t = this.hash;
6587
- if (t) return gt([is.OP_0, t]);
6587
+ if (t) return yt([is.OP_0, t]);
6588
6588
  }
6589
6589
  #U() {
6590
6590
  if (this.witness) return mn;
@@ -6605,7 +6605,7 @@ var Co = class sr {
6605
6605
  const r = this.#A();
6606
6606
  if (r) {
6607
6607
  const n = Ds(r);
6608
- return this.#c = Object.assign({ witness: n }, t, { input: mn }), this.#y = !0, [].concat(n, t.output);
6608
+ return this.#c = Object.assign({ witness: n }, t, { input: mn }), this.#g = !0, [].concat(n, t.output);
6609
6609
  }
6610
6610
  }
6611
6611
  return !t.output || !t.witness ? void 0 : [].concat(t.witness, t.output);
@@ -6655,7 +6655,7 @@ var Co = class sr {
6655
6655
  }
6656
6656
  }
6657
6657
  };
6658
- function gr(e, t) {
6658
+ function yr(e, t) {
6659
6659
  if (!e.address && !e.hash && !e.output && !e.redeem && !e.witness) throw new TypeError("Not enough data");
6660
6660
  return new Co({
6661
6661
  address: e.address,
@@ -6697,10 +6697,10 @@ var ss = j, Vo = class Br {
6697
6697
  return this.#t;
6698
6698
  }
6699
6699
  get pubkey() {
6700
- return this.#c || (this.#i = this.#g(), this.#c = !0), this.#i;
6700
+ return this.#c || (this.#i = this.#y(), this.#c = !0), this.#i;
6701
6701
  }
6702
6702
  get signature() {
6703
- return this.#p || (this.#o = this.#y(), this.#p = !0), this.#o;
6703
+ return this.#p || (this.#o = this.#g(), this.#p = !0), this.#o;
6704
6704
  }
6705
6705
  get output() {
6706
6706
  return this.#l || (this.#h = this.#m(), this.#l = !0), this.#h;
@@ -6741,11 +6741,11 @@ var ss = j, Vo = class Br {
6741
6741
  witness: this.witness
6742
6742
  };
6743
6743
  }
6744
- #g() {
6744
+ #y() {
6745
6745
  if (this.#e) return this.#e;
6746
6746
  if (this.#r) return this.#r.subarray(1, -1);
6747
6747
  }
6748
- #y() {
6748
+ #g() {
6749
6749
  if (this.#s) return this.#s;
6750
6750
  if (this.#n) {
6751
6751
  const t = rt(this.#n);
@@ -6755,12 +6755,12 @@ var ss = j, Vo = class Br {
6755
6755
  #m() {
6756
6756
  if (this.#r) return this.#r;
6757
6757
  const t = this.#e;
6758
- if (t) return gt([t, ss.OP_CHECKSIG]);
6758
+ if (t) return yt([t, ss.OP_CHECKSIG]);
6759
6759
  }
6760
6760
  #E() {
6761
6761
  if (this.#n) return this.#n;
6762
6762
  const t = this.#s;
6763
- if (t) return gt([t]);
6763
+ if (t) return yt([t]);
6764
6764
  }
6765
6765
  #v() {
6766
6766
  if (this.input) return [];
@@ -6813,8 +6813,8 @@ var He = j, Tr = He.OP_RESERVED, $o = class _r {
6813
6813
  #l;
6814
6814
  #d;
6815
6815
  #w = !1;
6816
- #g = !1;
6817
6816
  #y = !1;
6817
+ #g = !1;
6818
6818
  #m = !1;
6819
6819
  #E = !1;
6820
6820
  #v = !1;
@@ -6838,10 +6838,10 @@ var He = j, Tr = He.OP_RESERVED, $o = class _r {
6838
6838
  return this.#w || (this.#h = this.#T(), this.#w = !0), this.#h;
6839
6839
  }
6840
6840
  get n() {
6841
- return this.#g || (this.#f = this.#k(), this.#g = !0), this.#f;
6841
+ return this.#y || (this.#f = this.#k(), this.#y = !0), this.#f;
6842
6842
  }
6843
6843
  get pubkeys() {
6844
- return this.#y || (this.#u = this.#P(), this.#y = !0), this.#u;
6844
+ return this.#g || (this.#u = this.#P(), this.#g = !0), this.#u;
6845
6845
  }
6846
6846
  get signatures() {
6847
6847
  return this.#m || (this.#c = this.#U(), this.#m = !0), this.#c;
@@ -6890,7 +6890,7 @@ var He = j, Tr = He.OP_RESERVED, $o = class _r {
6890
6890
  };
6891
6891
  }
6892
6892
  #A(t) {
6893
- this.#S || (this.#S = !0, this.#b = rt(t) ?? [], this.#h = this.#b[0] - Tr, this.#f = this.#b[this.#b.length - 2] - Tr, this.#u = this.#b.slice(1, -2), this.#w = !0, this.#g = !0, this.#y = !0);
6893
+ this.#S || (this.#S = !0, this.#b = rt(t) ?? [], this.#h = this.#b[0] - Tr, this.#f = this.#b[this.#b.length - 2] - Tr, this.#u = this.#b.slice(1, -2), this.#w = !0, this.#y = !0, this.#g = !0);
6894
6894
  }
6895
6895
  #T() {
6896
6896
  if (this.#e !== void 0) return this.#e;
@@ -6913,11 +6913,11 @@ var He = j, Tr = He.OP_RESERVED, $o = class _r {
6913
6913
  #O() {
6914
6914
  if (this.#i) return this.#i;
6915
6915
  const t = this.#e, r = this.n, n = this.#r;
6916
- if (!(t === void 0 || r === void 0 || !n)) return gt([].concat(Tr + t, n, Tr + r, He.OP_CHECKMULTISIG));
6916
+ if (!(t === void 0 || r === void 0 || !n)) return yt([].concat(Tr + t, n, Tr + r, He.OP_CHECKMULTISIG));
6917
6917
  }
6918
6918
  #x() {
6919
6919
  if (this.#o) return this.#o;
6920
- if (this.#n) return gt([He.OP_0].concat(this.#n));
6920
+ if (this.#n) return yt([He.OP_0].concat(this.#n));
6921
6921
  }
6922
6922
  #B() {
6923
6923
  if (this.input) return [];
@@ -6943,7 +6943,7 @@ var He = j, Tr = He.OP_RESERVED, $o = class _r {
6943
6943
  }
6944
6944
  if (this.#r) {
6945
6945
  if (this.#s !== void 0 && this.#s !== this.#r.length) throw new TypeError("Pubkey count mismatch");
6946
- if (this.#f = this.#r.length, this.#g = !0, this.#h !== void 0 && this.#f < this.#h) throw new TypeError("Pubkey count cannot be less than m");
6946
+ if (this.#f = this.#r.length, this.#y = !0, this.#h !== void 0 && this.#f < this.#h) throw new TypeError("Pubkey count cannot be less than m");
6947
6947
  }
6948
6948
  if (this.#n) {
6949
6949
  if (this.#h !== void 0 && this.#n.length < this.#h) throw new TypeError("Not enough signatures provided");
@@ -6958,7 +6958,7 @@ var He = j, Tr = He.OP_RESERVED, $o = class _r {
6958
6958
  }
6959
6959
  }
6960
6960
  };
6961
- function yr(e, t) {
6961
+ function gr(e, t) {
6962
6962
  if (!e.input && !e.output && !(e.pubkeys && e.m !== void 0) && !e.signatures) throw new TypeError("Not enough data");
6963
6963
  const r = new $o({
6964
6964
  m: e.m,
@@ -7005,11 +7005,11 @@ var ce = /* @__PURE__ */ new Uint8Array(0), os = [], kr = Mt("000000000000000000
7005
7005
  o === J.ADVANCED_TRANSACTION_MARKER && a === J.ADVANCED_TRANSACTION_FLAG ? f = !0 : n.offset -= 2;
7006
7006
  const l = n.readVarInt();
7007
7007
  for (let u = 0; u < l; ++u) {
7008
- const d = n.readBytes(32), w = n.readUInt32LE(), y = n.readVarBytes(), m = n.readUInt32LE();
7008
+ const d = n.readBytes(32), w = n.readUInt32LE(), g = n.readVarBytes(), m = n.readUInt32LE();
7009
7009
  i.ins.push({
7010
7010
  hash: d,
7011
7011
  index: w,
7012
- script: y,
7012
+ script: g,
7013
7013
  sequence: m,
7014
7014
  witness: os
7015
7015
  });
@@ -7093,7 +7093,7 @@ var ce = /* @__PURE__ */ new Uint8Array(0), os = [], kr = Mt("000000000000000000
7093
7093
  if (t >= this.ins.length) return as;
7094
7094
  const i = rt(r);
7095
7095
  if (!i) throw new Error("Could not decompile prevOutScript");
7096
- const o = gt(i.filter((l) => l !== j.OP_CODESEPARATOR)), a = this.clone();
7096
+ const o = yt(i.filter((l) => l !== j.OP_CODESEPARATOR)), a = this.clone();
7097
7097
  if ((n & 31) === J.SIGHASH_NONE) a.outs = [], a.ins.forEach((l, p) => {
7098
7098
  p !== t && (l.sequence = 0);
7099
7099
  });
@@ -7121,13 +7121,13 @@ var ce = /* @__PURE__ */ new Uint8Array(0), os = [], kr = Mt("000000000000000000
7121
7121
  if (!Number.isInteger(i) || i < 0 || i > 4294967295) throw new TypeError("Expected unsigned 32-bit integer for hashType");
7122
7122
  if (n.length !== this.ins.length || r.length !== this.ins.length) throw new Error("Must supply prevout script and value for all inputs");
7123
7123
  const l = i === J.SIGHASH_DEFAULT ? J.SIGHASH_ALL : i & J.SIGHASH_OUTPUT_MASK, p = (i & J.SIGHASH_INPUT_MASK) === J.SIGHASH_ANYONECANPAY, u = l === J.SIGHASH_NONE, d = l === J.SIGHASH_SINGLE;
7124
- let w = ce, y = ce, m = ce, v = ce, I = ce;
7125
- if (!p) if (f) w = f.hashPrevouts, y = f.hashAmounts, m = f.hashScriptPubKeys, v = f.hashSequences;
7124
+ let w = ce, g = ce, m = ce, v = ce, I = ce;
7125
+ if (!p) if (f) w = f.hashPrevouts, g = f.hashAmounts, m = f.hashScriptPubKeys, v = f.hashSequences;
7126
7126
  else {
7127
7127
  let M = new dt(36 * this.ins.length);
7128
7128
  this.ins.forEach((Z) => {
7129
7129
  M.writeBytes(Z.hash), M.writeUInt32LE(Z.index);
7130
- }), w = It(M.finish()), M = new dt(8 * this.ins.length), n.forEach((Z) => M.writeUInt64LE(Z)), y = It(M.finish()), M = new dt(r.map(Nt).reduce((Z, Q) => Z + Q)), r.forEach((Z) => M.writeVarBytes(Z)), m = It(M.finish()), M = new dt(4 * this.ins.length), this.ins.forEach((Z) => M.writeUInt32LE(Z.sequence)), v = It(M.finish());
7130
+ }), w = It(M.finish()), M = new dt(8 * this.ins.length), n.forEach((Z) => M.writeUInt64LE(Z)), g = It(M.finish()), M = new dt(r.map(Nt).reduce((Z, Q) => Z + Q)), r.forEach((Z) => M.writeVarBytes(Z)), m = It(M.finish()), M = new dt(4 * this.ins.length), this.ins.forEach((Z) => M.writeUInt32LE(Z.sequence)), v = It(M.finish());
7131
7131
  }
7132
7132
  if (u || d) {
7133
7133
  if (d && t < this.outs.length) {
@@ -7143,7 +7143,7 @@ var ce = /* @__PURE__ */ new Uint8Array(0), os = [], kr = Mt("000000000000000000
7143
7143
  }), I = It(Z.finish());
7144
7144
  }
7145
7145
  const P = (o ? 2 : 0) + (a ? 1 : 0), S = new dt(174 - (p ? 49 : 0) - (u ? 32 : 0) + (a ? 32 : 0) + (o ? 37 : 0));
7146
- if (S.writeUInt8(i), S.writeInt32LE(this.version), S.writeUInt32LE(this.locktime), S.writeBytes(w), S.writeBytes(y), S.writeBytes(m), S.writeBytes(v), u || d || S.writeBytes(I), S.writeUInt8(P), p) {
7146
+ if (S.writeUInt8(i), S.writeInt32LE(this.version), S.writeUInt32LE(this.locktime), S.writeBytes(w), S.writeBytes(g), S.writeBytes(m), S.writeBytes(v), u || d || S.writeBytes(I), S.writeUInt8(P), p) {
7147
7147
  const M = this.ins[t];
7148
7148
  S.writeBytes(M.hash), S.writeUInt32LE(M.index), S.writeUInt64LE(n[t]), S.writeVarBytes(r[t]), S.writeUInt32LE(M.sequence);
7149
7149
  } else S.writeUInt32LE(t);
@@ -7251,7 +7251,7 @@ function ne(e) {
7251
7251
  }
7252
7252
  };
7253
7253
  }
7254
- var qu = ne(yr), Yu = ne(hi), Xu = ne(pr), on = ne(sn), hs = ne(gr), Ko = ne(dr), ui = ne(wr), fi = ne(ai), Gl = ne(Qn), jl = (e) => e.length === 4 && e[0] === 81 && e[1] === 2 && e[2] === 78 && e[3] === 115;
7254
+ var qu = ne(gr), Yu = ne(hi), Xu = ne(pr), on = ne(sn), hs = ne(yr), Ko = ne(dr), ui = ne(wr), fi = ne(ai), Gl = ne(Qn), jl = (e) => e.length === 4 && e[0] === 81 && e[1] === 2 && e[2] === 78 && e[3] === 115;
7255
7255
  function or(e) {
7256
7256
  const t = [];
7257
7257
  function r(a) {
@@ -7259,7 +7259,7 @@ function or(e) {
7259
7259
  }
7260
7260
  function n(a) {
7261
7261
  const f = Et(Ct(a));
7262
- ge(a, f, 0), t.push(f);
7262
+ ye(a, f, 0), t.push(f);
7263
7263
  }
7264
7264
  function i(a) {
7265
7265
  n(a.length), r(a);
@@ -7453,10 +7453,10 @@ var Fo = {
7453
7453
  ECDSA: 0,
7454
7454
  Schnorr: 1
7455
7455
  };
7456
- function gf(e) {
7456
+ function yf(e) {
7457
7457
  return e.type === "batchResult";
7458
7458
  }
7459
- function yf(e) {
7459
+ function gf(e) {
7460
7460
  return e.type === "ready";
7461
7461
  }
7462
7462
  var At = {
@@ -7852,19 +7852,19 @@ var If = {
7852
7852
  const d = f[u];
7853
7853
  if (d.status === "fulfilled") {
7854
7854
  const w = d.value;
7855
- for (const y of w.results) l.set(y.inputIndex, {
7855
+ for (const g of w.results) l.set(g.inputIndex, {
7856
7856
  type: "result",
7857
- taskId: y.taskId,
7858
- signature: y.signature,
7859
- inputIndex: y.inputIndex,
7860
- publicKey: y.publicKey,
7861
- signatureType: y.signatureType,
7862
- leafHash: y.leafHash
7857
+ taskId: g.taskId,
7858
+ signature: g.signature,
7859
+ inputIndex: g.inputIndex,
7860
+ publicKey: g.publicKey,
7861
+ signatureType: g.signatureType,
7862
+ leafHash: g.leafHash
7863
7863
  });
7864
- for (const y of w.errors) p.set(y.inputIndex, y.error);
7864
+ for (const g of w.errors) p.set(g.inputIndex, g.error);
7865
7865
  } else {
7866
- const w = d.reason?.message ?? "Batch signing failed", y = o[u];
7867
- for (const m of y) p.set(m.inputIndex, w);
7866
+ const w = d.reason?.message ?? "Batch signing failed", g = o[u];
7867
+ for (const m of g) p.set(m.inputIndex, w);
7868
7868
  }
7869
7869
  }
7870
7870
  return this.#n || await this.#w(), {
@@ -7902,7 +7902,7 @@ var If = {
7902
7902
  const a = setTimeout(() => {
7903
7903
  o(/* @__PURE__ */ new Error(`Worker ${t} initialization timeout`));
7904
7904
  }, 1e4), f = (l) => {
7905
- yf(l.data) && (clearTimeout(a), r.removeEventListener("message", f), n.state = At.Idle, i());
7905
+ gf(l.data) && (clearTimeout(a), r.removeEventListener("message", f), n.state = At.Idle, i());
7906
7906
  };
7907
7907
  r.addEventListener("message", f), r.addEventListener("error", (l) => {
7908
7908
  clearTimeout(a), o(/* @__PURE__ */ new Error(`Worker ${t} error: ${l.message}`));
@@ -7931,15 +7931,15 @@ var If = {
7931
7931
  timeoutId: p
7932
7932
  };
7933
7933
  this.#s.set(a, u), o.state = At.Busy, o.currentTaskId = a, o.taskStartTime = Date.now();
7934
- const d = t.map((y) => ({
7935
- taskId: y.taskId,
7936
- hash: y.hash,
7934
+ const d = t.map((g) => ({
7935
+ taskId: g.taskId,
7936
+ hash: g.hash,
7937
7937
  publicKey: n,
7938
- signatureType: y.signatureType,
7939
- lowR: y.lowR,
7940
- inputIndex: y.inputIndex,
7941
- sighashType: y.sighashType,
7942
- leafHash: y.leafHash
7938
+ signatureType: g.signatureType,
7939
+ lowR: g.lowR,
7940
+ inputIndex: g.inputIndex,
7941
+ sighashType: g.sighashType,
7942
+ leafHash: g.leafHash
7943
7943
  })), w = {
7944
7944
  type: "signBatch",
7945
7945
  batchId: a,
@@ -7959,7 +7959,7 @@ var If = {
7959
7959
  });
7960
7960
  }
7961
7961
  #l(t, r) {
7962
- if (gf(r)) {
7962
+ if (yf(r)) {
7963
7963
  const n = this.#s.get(r.batchId);
7964
7964
  n && (clearTimeout(n.timeoutId), this.#s.delete(r.batchId), t.state = At.Idle, t.currentTaskId = null, t.taskStartTime = null, n.resolve(r));
7965
7965
  }
@@ -8153,7 +8153,7 @@ function Yo(e, t) {
8153
8153
  if (o.prefix !== r.bech32 && r.bech32Opnet && o.prefix !== r.bech32Opnet) throw new Error(e + " has an invalid prefix");
8154
8154
  if (o.version === 0) {
8155
8155
  if (o.data.length === 20) return sn({ hash: lh(o.data) }).output;
8156
- if (o.data.length === 32) return gr({ hash: Si(o.data) }).output;
8156
+ if (o.data.length === 32) return yr({ hash: Si(o.data) }).output;
8157
8157
  } else if (o.version === 1) {
8158
8158
  if (o.data.length === 32) return wr({ pubkey: o.data }).output;
8159
8159
  } else {
@@ -8164,7 +8164,7 @@ function Yo(e, t) {
8164
8164
  program: o.data,
8165
8165
  network: r
8166
8166
  }).output;
8167
- } else if (o.version >= 2 && o.version <= 15 && o.data.length >= 2 && o.data.length <= 40) return o.version !== 16 && n && n(kf), gt([o.version + 80, o.data]);
8167
+ } else if (o.version >= 2 && o.version <= 15 && o.data.length >= 2 && o.data.length <= 40) return o.version !== 16 && n && n(kf), yt([o.version + 80, o.data]);
8168
8168
  }
8169
8169
  }
8170
8170
  }
@@ -8242,7 +8242,7 @@ var Uf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8242
8242
  }
8243
8243
  #f() {
8244
8244
  if (this.#s) return this.#s;
8245
- if (this.#e) return gt([ls.OP_RETURN].concat(this.#e));
8245
+ if (this.#e) return yt([ls.OP_RETURN].concat(this.#e));
8246
8246
  }
8247
8247
  #u() {
8248
8248
  if (this.#s) {
@@ -8281,22 +8281,21 @@ var Pf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8281
8281
  findScriptPath: Pe,
8282
8282
  p2data: Of,
8283
8283
  p2mr: ai,
8284
- p2ms: yr,
8284
+ p2ms: gr,
8285
8285
  p2op: Qn,
8286
8286
  p2pk: hi,
8287
8287
  p2pkh: pr,
8288
8288
  p2sh: dr,
8289
8289
  p2tr: wr,
8290
8290
  p2wpkh: sn,
8291
- p2wsh: gr,
8291
+ p2wsh: yr,
8292
8292
  rootHashFromPath: Mr,
8293
8293
  rootHashFromPathP2MR: hr,
8294
8294
  tapBranchHash: Fe,
8295
8295
  tapleafHash: Pt,
8296
8296
  toHashTree: ur,
8297
8297
  tweakKey: er
8298
- }, Symbol.toStringTag, { value: "Module" }));
8299
- var Xl = Mt("6a24aa21a9ed"), qt;
8298
+ }, Symbol.toStringTag, { value: "Module" })), Xl = Mt("6a24aa21a9ed"), qt;
8300
8299
  (function(e) {
8301
8300
  e[e.UNSIGNED_TX = 0] = "UNSIGNED_TX", e[e.GLOBAL_XPUB = 1] = "GLOBAL_XPUB";
8302
8301
  })(qt || (qt = {}));
@@ -8550,22 +8549,22 @@ function wc(e) {
8550
8549
  2,
8551
8550
  3,
8552
8551
  4
8553
- ].includes(e.pubkey[0]) && gc(e.signature);
8552
+ ].includes(e.pubkey[0]) && yc(e.signature);
8554
8553
  }
8555
- function gc(e) {
8554
+ function yc(e) {
8556
8555
  if (!(e instanceof Uint8Array) || e.length < 9 || e[0] !== 48 || e.length !== e[1] + 3 || e[2] !== 2) return !1;
8557
8556
  const t = e[3];
8558
8557
  if (t > 33 || t < 1 || e[3 + t + 1] !== 2) return !1;
8559
8558
  const r = e[3 + t + 2];
8560
8559
  return !(r > 33 || r < 1 || e.length !== 3 + t + 2 + r + 2);
8561
8560
  }
8562
- function yc(e, t, r) {
8561
+ function gc(e, t, r) {
8563
8562
  const n = G(t.pubkey);
8564
8563
  return r.has(n) ? !1 : (r.add(n), e.filter((i) => Zt(i.pubkey, t.pubkey) === 0).length === 0);
8565
8564
  }
8566
8565
  var bc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8567
8566
  __proto__: null,
8568
- canAddToArray: yc,
8567
+ canAddToArray: gc,
8569
8568
  check: wc,
8570
8569
  decode: lc,
8571
8570
  encode: pc,
@@ -8760,7 +8759,7 @@ function Jc(e) {
8760
8759
  }
8761
8760
  function tl(e) {
8762
8761
  const { script: t, value: r } = e, n = Ct(t.length), i = new Uint8Array(8 + n + t.length);
8763
- return Cf(i, 0, BigInt(r), "LE"), ge(t.length, i, 8), i.set(t, 8 + n), {
8762
+ return Cf(i, 0, BigInt(r), "LE"), ye(t.length, i, 8), i.set(t, 8 + n), {
8764
8763
  key: Uint8Array.from([R.WITNESS_UTXO]),
8765
8764
  value: i
8766
8765
  };
@@ -8799,7 +8798,7 @@ function ol(e) {
8799
8798
  key: Uint8Array.from([ht.TAP_TREE]),
8800
8799
  value: Xt([].concat(...e.leaves.map((t) => [
8801
8800
  Uint8Array.of(t.depth, t.leafVersion),
8802
- ge(BigInt(t.script.length)).buffer,
8801
+ ye(BigInt(t.script.length)).buffer,
8803
8802
  t.script
8804
8803
  ])))
8805
8804
  };
@@ -8831,8 +8830,8 @@ function li(e, t = ll) {
8831
8830
  path: "m"
8832
8831
  };
8833
8832
  for (const u of cl(f.value.length / 4 - 1)) {
8834
- const d = an(f.value, u * 4 + 4, "LE"), w = !!(d & 2147483648), y = d & 2147483647;
8835
- p.path += "/" + y.toString(10) + (w ? "'" : "");
8833
+ const d = an(f.value, u * 4 + 4, "LE"), w = !!(d & 2147483648), g = d & 2147483647;
8834
+ p.path += "/" + g.toString(10) + (w ? "'" : "");
8836
8835
  }
8837
8836
  return p;
8838
8837
  }
@@ -8841,9 +8840,9 @@ function li(e, t = ll) {
8841
8840
  u.set(f.masterFingerprint, 0);
8842
8841
  let d = 4;
8843
8842
  return p.slice(1).forEach((w) => {
8844
- const y = w.slice(-1) === "'";
8845
- let m = 2147483647 & parseInt(y ? w.slice(0, -1) : w, 10);
8846
- y && (m += 2147483648), ci(u, d, m, "LE"), d += 4;
8843
+ const g = w.slice(-1) === "'";
8844
+ let m = 2147483647 & parseInt(g ? w.slice(0, -1) : w, 10);
8845
+ g && (m += 2147483648), ci(u, d, m, "LE"), d += 4;
8847
8846
  }), {
8848
8847
  key: l,
8849
8848
  value: u
@@ -8919,7 +8918,7 @@ function ra(e) {
8919
8918
  }
8920
8919
  function n(a) {
8921
8920
  const f = t.encode(a), l = Ct(a.leafHashes.length), p = new Uint8Array(l);
8922
- ge(a.leafHashes.length, p);
8921
+ ye(a.leafHashes.length, p);
8923
8922
  const u = Xt([
8924
8923
  p,
8925
8924
  ...a.leafHashes,
@@ -9037,9 +9036,9 @@ function ds(e) {
9037
9036
  }
9038
9037
  function wl(e) {
9039
9038
  const t = e.key.length, r = e.value.length, n = Ct(t), i = Ct(r), o = new Uint8Array(n + t + i + r);
9040
- return ge(t, o, 0), o.set(e.key, n), ge(r, o, n + t), o.set(e.value, n + t + i), o;
9039
+ return ye(t, o, 0), o.set(e.key, n), ye(r, o, n + t), o.set(e.value, n + t + i), o;
9041
9040
  }
9042
- function gl(e, t) {
9041
+ function yl(e, t) {
9043
9042
  let r = 0;
9044
9043
  function n() {
9045
9044
  const { numberValue: I, bytes: P } = We(e, r);
@@ -9076,7 +9075,7 @@ function gl(e, t) {
9076
9075
  }
9077
9076
  const u = l.filter((I) => I.key[0] === qt.UNSIGNED_TX);
9078
9077
  if (u.length !== 1) throw new Error("Format Error: Only one UNSIGNED_TX allowed");
9079
- const d = t(u[0].value), { inputCount: w, outputCount: y } = d.getInputOutputCounts(), m = [], v = [];
9078
+ const d = t(u[0].value), { inputCount: w, outputCount: g } = d.getInputOutputCounts(), m = [], v = [];
9080
9079
  for (const I of qr(w)) {
9081
9080
  const P = {}, S = [];
9082
9081
  for (; !f(); ) {
@@ -9086,7 +9085,7 @@ function gl(e, t) {
9086
9085
  }
9087
9086
  m.push(S);
9088
9087
  }
9089
- for (const I of qr(y)) {
9088
+ for (const I of qr(g)) {
9090
9089
  const P = {}, S = [];
9091
9090
  for (; !f(); ) {
9092
9091
  const _ = a(), O = G(_.key);
@@ -9214,7 +9213,7 @@ function sa(e, { globalMapKeyVals: t, inputKeyVals: r, outputKeyVals: n }) {
9214
9213
  outputs: p
9215
9214
  };
9216
9215
  }
9217
- function yl({ globalMap: e, inputs: t, outputs: r }) {
9216
+ function gl({ globalMap: e, inputs: t, outputs: r }) {
9218
9217
  const { globalKeyVals: n, inputKeyVals: i, outputKeyVals: o } = Kn({
9219
9218
  globalMap: e,
9220
9219
  inputs: t,
@@ -9313,7 +9312,7 @@ function El(e, t) {
9313
9312
  }
9314
9313
  if (r === !1) throw new Error(`Input #${e} has too much or too little data to clean`);
9315
9314
  }
9316
- function gs(e, t, r, n) {
9315
+ function ys(e, t, r, n) {
9317
9316
  throw new Error(`Data for ${e} key ${t} is incorrect: Expected ${r} and got ${JSON.stringify(n)}`);
9318
9317
  }
9319
9318
  function wi(e) {
@@ -9322,12 +9321,12 @@ function wi(e) {
9322
9321
  const i = t[n], { canAdd: o, canAddToArray: a, check: f, expected: l } = dl[e + "s"][n] || {}, p = !!a;
9323
9322
  if (f) if (p) {
9324
9323
  if (!Array.isArray(i) || r[n] && !Array.isArray(r[n])) throw new Error(`Key type ${n} must be an array`);
9325
- i.every(f) || gs(e, n, l, i);
9324
+ i.every(f) || ys(e, n, l, i);
9326
9325
  const u = r[n] || [], d = /* @__PURE__ */ new Set();
9327
9326
  if (!i.every((w) => a(u, w, d))) throw new Error("Can not add duplicate data to array");
9328
9327
  r[n] = u.concat(i);
9329
9328
  } else {
9330
- if (f(i) || gs(e, n, l, i), !o(r, i)) throw new Error(`Can not add duplicate data to ${e}`);
9329
+ if (f(i) || ys(e, n, l, i), !o(r, i)) throw new Error(`Can not add duplicate data to ${e}`);
9331
9330
  r[n] = i;
9332
9331
  }
9333
9332
  }
@@ -9342,7 +9341,7 @@ function Al(e, t) {
9342
9341
  const r = fr(e, e.length - 1);
9343
9342
  aa(t, r);
9344
9343
  }
9345
- var ys = class {
9344
+ var gs = class {
9346
9345
  constructor(e) {
9347
9346
  this.inputs = [], this.outputs = [], this.globalMap = { unsignedTx: e };
9348
9347
  }
@@ -9355,7 +9354,7 @@ var ys = class {
9355
9354
  return this.fromBuffer(r, t);
9356
9355
  }
9357
9356
  static fromBuffer(e, t) {
9358
- const r = gl(e, t), n = new this(r.globalMap.unsignedTx);
9357
+ const r = yl(e, t), n = new this(r.globalMap.unsignedTx);
9359
9358
  return Object.assign(n, r), n;
9360
9359
  }
9361
9360
  toBase64() {
@@ -9365,7 +9364,7 @@ var ys = class {
9365
9364
  return G(this.toBuffer());
9366
9365
  }
9367
9366
  toBuffer() {
9368
- return yl(this);
9367
+ return gl(this);
9369
9368
  }
9370
9369
  updateGlobal(e) {
9371
9370
  return vl(e, this.globalMap), this;
@@ -9465,7 +9464,7 @@ function fa(e, t) {
9465
9464
  if (!x(n, a)) throw new Error(`${t} for ${o} #${r} doesn't match the scriptPubKey in the prevout`);
9466
9465
  };
9467
9466
  }
9468
- var bs = fa(dr, "Redeem script"), ms = fa(gr, "Witness script");
9467
+ var bs = fa(dr, "Redeem script"), ms = fa(yr, "Witness script");
9469
9468
  function Es(e) {
9470
9469
  let t = 0;
9471
9470
  function r(a) {
@@ -9513,7 +9512,7 @@ function vs(e) {
9513
9512
  function Pl(e) {
9514
9513
  return xe(e);
9515
9514
  }
9516
- function gi(e) {
9515
+ function yi(e) {
9517
9516
  return on(e) ? "witnesspubkeyhash" : Xu(e) ? "pubkeyhash" : qu(e) ? "multisig" : Yu(e) ? "pubkey" : "nonstandard";
9518
9517
  }
9519
9518
  function Ze(e) {
@@ -9634,11 +9633,11 @@ var xl = class {
9634
9633
  finalizeAndComputeAmounts(e, t, r, n, i) {
9635
9634
  let o = 0n;
9636
9635
  e.forEach((d, w) => {
9637
- const y = t.ins[w];
9638
- if (r && d.finalScriptSig && (y.script = d.finalScriptSig), r && d.finalScriptWitness && (y.witness = Es(d.finalScriptWitness)), d.witnessUtxo) o += d.witnessUtxo.value;
9636
+ const g = t.ins[w];
9637
+ if (r && d.finalScriptSig && (g.script = d.finalScriptSig), r && d.finalScriptWitness && (g.witness = Es(d.finalScriptWitness)), d.witnessUtxo) o += d.witnessUtxo.value;
9639
9638
  else if (d.nonWitnessUtxo) {
9640
9639
  if (!i) throw new Error("txFromBuffer is required for nonWitnessUtxo inputs");
9641
- const m = this.getNonWitnessUtxoTx(d, w, i), v = y.index, I = m.outs[v];
9640
+ const m = this.getNonWitnessUtxoTx(d, w, i), v = g.index, I = m.outs[v];
9642
9641
  o += I.value;
9643
9642
  }
9644
9643
  });
@@ -9687,8 +9686,8 @@ var xl = class {
9687
9686
  Is(o, n);
9688
9687
  let a, f;
9689
9688
  if (t.nonWitnessUtxo) {
9690
- const d = this.#t.getNonWitnessUtxoTx(t, e, this.#a), w = i.ins[e], y = w.hash;
9691
- if (!x(y, d.getHash())) throw new Error(`Non-witness UTXO hash for input #${e} doesn't match the hash specified in the prevout`);
9689
+ const d = this.#t.getNonWitnessUtxoTx(t, e, this.#a), w = i.ins[e], g = w.hash;
9690
+ if (!x(g, d.getHash())) throw new Error(`Non-witness UTXO hash for input #${e} doesn't match the hash specified in the prevout`);
9692
9691
  const m = w.index;
9693
9692
  f = d.outs[m];
9694
9693
  } else if (t.witnessUtxo) f = {
@@ -9718,15 +9717,15 @@ PROCEED WITH CAUTION!
9718
9717
  getTaprootHashesForSig(e, t, r, n, i, o) {
9719
9718
  const a = this.#t.tx, f = t.sighashType || tt.SIGHASH_DEFAULT;
9720
9719
  if (Is(f, o), !this.#t.prevOuts) {
9721
- const y = r.map((m, v) => this.#t.getScriptAndAmountFromUtxo(v, m, this.#a));
9722
- this.#t.prevOuts = y, this.#t.signingScripts = y.map((m) => m.script), this.#t.values = y.map((m) => m.value);
9720
+ const g = r.map((m, v) => this.#t.getScriptAndAmountFromUtxo(v, m, this.#a));
9721
+ this.#t.prevOuts = g, this.#t.signingScripts = g.map((m) => m.script), this.#t.values = g.map((m) => m.value);
9723
9722
  }
9724
9723
  const l = this.#t.signingScripts, p = this.#t.values;
9725
9724
  this.#t.taprootHashCache || (this.#t.taprootHashCache = a.getTaprootHashCache(l, p));
9726
9725
  const u = this.#t.taprootHashCache, d = [];
9727
9726
  if (t.tapInternalKey && !i) {
9728
- const y = this.#t.getPrevoutTaprootKey(e, t, this.#a) || /* @__PURE__ */ new Uint8Array(0);
9729
- if (x(Ce(n), y)) {
9727
+ const g = this.#t.getPrevoutTaprootKey(e, t, this.#a) || /* @__PURE__ */ new Uint8Array(0);
9728
+ if (x(Ce(n), g)) {
9730
9729
  const m = a.hashForWitnessV1(e, l, p, f, void 0, void 0, u);
9731
9730
  d.push({
9732
9731
  pubkey: n,
@@ -9734,16 +9733,16 @@ PROCEED WITH CAUTION!
9734
9733
  });
9735
9734
  }
9736
9735
  }
9737
- const w = (t.tapLeafScript || []).filter((y) => Fr(n, y.script)).map((y) => {
9736
+ const w = (t.tapLeafScript || []).filter((g) => Fr(n, g.script)).map((g) => {
9738
9737
  const m = Pt({
9739
- output: y.script,
9740
- version: y.leafVersion
9738
+ output: g.script,
9739
+ version: g.leafVersion
9741
9740
  });
9742
- return Object.assign({ hash: m }, y);
9743
- }).filter((y) => !i || x(i, y.hash)).map((y) => ({
9741
+ return Object.assign({ hash: m }, g);
9742
+ }).filter((g) => !i || x(i, g.hash)).map((g) => ({
9744
9743
  pubkey: n,
9745
- hash: a.hashForWitnessV1(e, l, p, f, y.hash, void 0, u),
9746
- leafHash: y.hash
9744
+ hash: a.hashForWitnessV1(e, l, p, f, g.hash, void 0, u),
9745
+ leafHash: g.hash
9747
9746
  }));
9748
9747
  return d.concat(w);
9749
9748
  }
@@ -9797,7 +9796,7 @@ var _l = class {
9797
9796
  this.#t = e, this.#a = t;
9798
9797
  }
9799
9798
  getFinalScripts(e, t, r, n, i, o, a = !0, f) {
9800
- const l = gi(r);
9799
+ const l = yi(r);
9801
9800
  if (!la(t, r, l) && a) throw new Error(`Can not finalize input #${e}`);
9802
9801
  if (!t.partialSig) throw new Error("Input missing partial signatures");
9803
9802
  return ca(r, l, t.partialSig, n, i, o, f);
@@ -9807,14 +9806,14 @@ var _l = class {
9807
9806
  }
9808
9807
  };
9809
9808
  function Rl(e, t, r, n, i, o, a = !0, f) {
9810
- const l = gi(r);
9809
+ const l = yi(r);
9811
9810
  if (!la(t, r, l) && a) throw new Error(`Can not finalize input #${e}`);
9812
9811
  if (!t.partialSig) throw new Error("Input missing partial signatures");
9813
9812
  return ca(r, l, t.partialSig, n, i, o, f);
9814
9813
  }
9815
9814
  function ca(e, t, r, n, i, o, a) {
9816
9815
  let f, l;
9817
- const p = Nl(e, t, r), u = o ? gr({ redeem: p }) : null, d = i ? dr({ redeem: u || p }) : null;
9816
+ const p = Nl(e, t, r), u = o ? yr({ redeem: p }) : null, d = i ? dr({ redeem: u || p }) : null;
9818
9817
  return n ? (u && u.witness ? l = or(u.witness) : p && p.witness ? l = or(p.witness) : l = or(a ?? [new Uint8Array([0])]), d && (f = d?.input)) : d ? f = d?.input : p ? f = p.input : f = Array.isArray(a) && a[0] ? a[0] : new Uint8Array([1]), {
9819
9818
  finalScriptSig: f,
9820
9819
  finalScriptWitness: l
@@ -9827,7 +9826,7 @@ function la(e, t, r) {
9827
9826
  case "witnesspubkeyhash":
9828
9827
  return As(1, e.partialSig);
9829
9828
  case "multisig": {
9830
- const n = yr({ output: t });
9829
+ const n = gr({ output: t });
9831
9830
  if (n.m === void 0) throw new Error("Cannot determine m for multisig");
9832
9831
  return As(n.m, e.partialSig, n.pubkeys);
9833
9832
  }
@@ -9850,7 +9849,7 @@ function Nl(e, t, r) {
9850
9849
  const n = e;
9851
9850
  switch (t) {
9852
9851
  case "multisig":
9853
- return yr({
9852
+ return gr({
9854
9853
  output: n,
9855
9854
  signatures: Hl(e, r)
9856
9855
  });
@@ -9882,7 +9881,7 @@ function Nl(e, t, r) {
9882
9881
  }
9883
9882
  }
9884
9883
  function Hl(e, t) {
9885
- const r = yr({ output: e });
9884
+ const r = gr({ output: e });
9886
9885
  if (!r.pubkeys) throw new Error("Cannot extract pubkeys from multisig script");
9887
9886
  const n = [];
9888
9887
  for (const i of r.pubkeys) {
@@ -9939,7 +9938,7 @@ function $l(e, t, r, n, i, o, a = !0, f) {
9939
9938
  return Rl(e, t, r, n, i, o, a, f);
9940
9939
  }
9941
9940
  var Zl = class Mn {
9942
- constructor(t = {}, r = new ys(new pa())) {
9941
+ constructor(t = {}, r = new gs(new pa())) {
9943
9942
  this.data = r, this.#s = Object.assign({}, Vl, t);
9944
9943
  const n = this.data.globalMap.unsignedTx.tx;
9945
9944
  this.#t = new xl(n), t.version === 3 ? this.setVersionTRUC() : this.data.inputs.length === 0 && this.setVersion(2);
@@ -9999,7 +9998,7 @@ var Zl = class Mn {
9999
9998
  return this.fromBuffer(n, r);
10000
9999
  }
10001
10000
  static fromBuffer(t, r = {}) {
10002
- const n = ys.fromBuffer(t, Cl), i = new Mn(r, n);
10001
+ const n = gs.fromBuffer(t, Cl), i = new Mn(r, n);
10003
10002
  return Tl(i.#t.tx, i.#t), i.#t.hasSignatures = i.data.inputs.some((o) => o.partialSig?.length || o.tapKeySig || o.tapScriptSig?.length || o.finalScriptSig || o.finalScriptWitness), i;
10004
10003
  }
10005
10004
  combine(...t) {
@@ -10085,7 +10084,7 @@ var Zl = class Mn {
10085
10084
  }
10086
10085
  getInputType(t) {
10087
10086
  const r = mt(this.data.inputs, t), n = Xr(this.#t.getScriptFromUtxo(t, r, jt), t, "input", r.redeemScript || this.#t.redeemFromFinalScriptSig(r.finalScriptSig), r.witnessScript || this.#t.redeemFromFinalWitnessScript(r.finalScriptWitness));
10088
- return (n.type === "raw" ? "" : n.type + "-") + gi(n.meaningfulScript);
10087
+ return (n.type === "raw" ? "" : n.type + "-") + yi(n.meaningfulScript);
10089
10088
  }
10090
10089
  inputHasPubkey(t, r) {
10091
10090
  const n = mt(this.data.inputs, t);
@@ -10261,11 +10260,11 @@ var Zl = class Mn {
10261
10260
  const f = [];
10262
10261
  let l, p, u;
10263
10262
  for (const d of a) {
10264
- const w = d.signature, y = d.pubkey, m = Ae.decode(w), { hash: v, script: I } = u !== m.hashType || !l || !p ? this.#r.getHashForSig(t, Object.assign({}, i, { sighashType: m.hashType }), !0) : {
10263
+ const w = d.signature, g = d.pubkey, m = Ae.decode(w), { hash: v, script: I } = u !== m.hashType || !l || !p ? this.#r.getHashForSig(t, Object.assign({}, i, { sighashType: m.hashType }), !0) : {
10265
10264
  hash: l,
10266
10265
  script: p
10267
10266
  };
10268
- u = m.hashType, l = v, p = I, ua(y, I, "verify"), f.push(r(y, v, m.signature));
10267
+ u = m.hashType, l = v, p = I, ua(g, I, "verify"), f.push(r(g, v, m.signature));
10269
10268
  }
10270
10269
  return f.every((d) => d);
10271
10270
  }
@@ -10282,9 +10281,9 @@ var Zl = class Mn {
10282
10281
  u++;
10283
10282
  }
10284
10283
  if (a) for (const d of a) {
10285
- const w = d.pubkey, y = l.find((m) => x(w, m.pubkey));
10286
- if (y) {
10287
- if (!r(w, y.hash, this.#r.trimTaprootSig(d.signature))) return !1;
10284
+ const w = d.pubkey, g = l.find((m) => x(w, m.pubkey));
10285
+ if (g) {
10286
+ if (!r(w, g.hash, this.#r.trimTaprootSig(d.signature))) return !1;
10288
10287
  u++;
10289
10288
  }
10290
10289
  }
@@ -10325,18 +10324,17 @@ var Zl = class Mn {
10325
10324
  const u = f.filter((d) => !!d.leafHash);
10326
10325
  if (u.length) {
10327
10326
  const d = await Promise.all(u.map(async (w) => {
10328
- const y = await l(w.hash);
10327
+ const g = await l(w.hash);
10329
10328
  return {
10330
10329
  pubkey: Ce(a),
10331
- signature: Le(y, r.sighashType),
10330
+ signature: Le(g, r.sighashType),
10332
10331
  leafHash: w.leafHash
10333
10332
  };
10334
10333
  }));
10335
10334
  this.data.updateInput(t, { tapScriptSig: d }), this.#t.hasSignatures = !0;
10336
10335
  }
10337
10336
  }
10338
- };
10339
- var Ql = {
10337
+ }, Ql = {
10340
10338
  networks: va,
10341
10339
  address: Uf,
10342
10340
  payments: Pf,