@gardenfi/core 2.0.23 → 2.0.25

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.
package/dist/index.js CHANGED
@@ -12,7 +12,7 @@ import * as le from "bitcoinjs-lib";
12
12
  import { crypto as ul } from "bitcoinjs-lib";
13
13
  import ll from "bignumber.js";
14
14
  import { randomBytes as dl } from "crypto-browserify";
15
- import { RpcProvider as hl, Contract as To, cairo as ko, shortString as pl, TypedDataRevision as yl, num as Lc, CallData as ya } from "starknet";
15
+ import { RpcProvider as hl, Contract as To, cairo as ko, uint256 as pl, TransactionExecutionStatus as yl, shortString as ml, TypedDataRevision as bl, num as Lc, CallData as ya } from "starknet";
16
16
  var Nc = (e, t, r) => {
17
17
  if (!t.has(e))
18
18
  throw TypeError("Cannot " + r);
@@ -21,8 +21,8 @@ var Nc = (e, t, r) => {
21
21
  throw TypeError("Cannot add the same private member more than once");
22
22
  t instanceof WeakSet ? t.add(e) : t.set(e, r);
23
23
  }, As = (e, t, r, n) => (Nc(e, t, "write to private field"), t.set(e, r), r);
24
- const ml = (e) => new Promise((t) => setTimeout(t, e));
25
- class bl {
24
+ const gl = (e) => new Promise((t) => setTimeout(t, e));
25
+ class wl {
26
26
  /**
27
27
  * @param {number} maxRetries - The maximum number of retries, if less < 0 then it is set to 0
28
28
  * @param {number} delay - The delay between retries
@@ -42,12 +42,12 @@ class bl {
42
42
  try {
43
43
  return await t();
44
44
  } catch (i) {
45
- r++, n = i, await ml(this.delay * r);
45
+ r++, n = i, await gl(this.delay * r);
46
46
  }
47
47
  throw n;
48
48
  }
49
49
  }
50
- const gl = (e) => {
50
+ const _l = (e) => {
51
51
  try {
52
52
  return JSON.parse(e);
53
53
  } catch {
@@ -150,14 +150,14 @@ class Dt {
150
150
  static async parse(t) {
151
151
  const r = await t.text();
152
152
  if (t.status >= 200 && t.status < 300)
153
- return gl(r);
153
+ return _l(r);
154
154
  throw new Error(r);
155
155
  }
156
156
  }
157
157
  function ma(e) {
158
158
  return (e == null ? void 0 : e.message) || (e == null ? void 0 : e.toString()) || "unknown error";
159
159
  }
160
- const ci = (e) => new bl((e == null ? void 0 : e.retryCount) ?? 2, (e == null ? void 0 : e.retryDelay) ?? 1e3), fi = (e) => e.startsWith("0x") ? e : `0x${e}`, Bt = (e) => e.startsWith("0x") ? e.slice(2) : e;
160
+ const ci = (e) => new wl((e == null ? void 0 : e.retryCount) ?? 2, (e == null ? void 0 : e.retryDelay) ?? 1e3), fi = (e) => e.startsWith("0x") ? e : `0x${e}`, Bt = (e) => e.startsWith("0x") ? e.slice(2) : e;
161
161
  var vi, Ei, xi;
162
162
  let co = class {
163
163
  constructor(t, r, n = void 0) {
@@ -201,24 +201,24 @@ function fo(e) {
201
201
  function Er(e, t) {
202
202
  if (!e) throw new Error(t);
203
203
  }
204
- function wl(e) {
204
+ function vl(e) {
205
205
  return Buffer.concat([
206
206
  Uint8Array.from([192]),
207
- _l(e)
207
+ El(e)
208
208
  ]);
209
209
  }
210
- function _l(e) {
210
+ function El(e) {
211
211
  const t = pa.encodingLength(e.length), r = Buffer.allocUnsafe(t);
212
212
  return pa.encode(e.length, r), Buffer.concat([r, e]);
213
213
  }
214
- function vl(e, t) {
214
+ function xl(e, t) {
215
215
  if (e.compare(t) > 0) {
216
216
  const r = e;
217
217
  e = t, t = r;
218
218
  }
219
219
  return [e, t];
220
220
  }
221
- const xr = (e) => e.length === 64 ? e : e.slice(2), El = (e) => {
221
+ const xr = (e) => e.length === 64 ? e : e.slice(2), Sl = (e) => {
222
222
  if (!e) return !1;
223
223
  try {
224
224
  const t = Buffer.from(e, "hex");
@@ -226,8 +226,8 @@ const xr = (e) => e.length === 64 ? e : e.slice(2), El = (e) => {
226
226
  } catch {
227
227
  return !1;
228
228
  }
229
- }, xl = (e, t, r, n) => e + ":" + t.toLowerCase() + "::" + r + ":" + n.toLowerCase();
230
- function Z1(e, t) {
229
+ }, Al = (e, t, r, n) => e + ":" + t.toLowerCase() + "::" + r + ":" + n.toLowerCase();
230
+ function Q1(e, t) {
231
231
  if (!e) return !1;
232
232
  const r = t === ar.MAINNET ? le.networks.bitcoin : t === ar.TESTNET ? le.networks.testnet : le.networks.regtest;
233
233
  if (!r) return !1;
@@ -238,7 +238,7 @@ function Z1(e, t) {
238
238
  return !1;
239
239
  }
240
240
  }
241
- const Sl = (e) => {
241
+ const Bl = (e) => {
242
242
  switch (e) {
243
243
  case ar.MAINNET:
244
244
  return ua.Mainnet;
@@ -284,7 +284,7 @@ const Hc = (e, t, r) => {
284
284
  if (t > r) return xe.Expired;
285
285
  }
286
286
  return e.initiate_tx_hash ? Number(e.initiate_block_number) ? xe.Initiated : xe.InitiateDetected : xe.Idle;
287
- }, J1 = (e, t, r) => {
287
+ }, eg = (e, t, r) => {
288
288
  const n = Hc(
289
289
  e,
290
290
  t,
@@ -307,38 +307,38 @@ const Hc = (e, t, r) => {
307
307
  }, Ri = (e, t = 0) => {
308
308
  const r = Date.now(), n = e * 1e3 + t * 36e5;
309
309
  return r >= n;
310
- }, Q1 = (e) => e.filter((t) => !Mc(t)), Mc = (e) => {
310
+ }, tg = (e) => e.filter((t) => !Mc(t)), Mc = (e) => {
311
311
  const { source_swap: t, create_order: r } = e, { initiate_tx_hash: n, initiate_block_number: i } = t, { deadline: s } = r.additional_data;
312
312
  return n && Number(i) ? !1 : n && !Number(i) ? Ri(Number(s), 12) : n ? !1 : Ri(Number(s), 1);
313
- }, Al = Buffer.from(
313
+ }, Il = Buffer.from(
314
314
  "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",
315
315
  "hex"
316
- ), Bl = Buffer.from(
316
+ ), Tl = Buffer.from(
317
317
  "483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",
318
318
  "hex"
319
- ), Il = Buffer.concat([Al, Bl]), Tl = Buffer.from(
319
+ ), kl = Buffer.concat([Il, Tl]), Pl = Buffer.from(
320
320
  "0250929b74c1a04954b78b4b6035e97a5e078a5a0f28ec96d547bfee9ace803ac0",
321
321
  "hex"
322
322
  ), ga = {
323
323
  failedToCreateInternalPubkey: "failed to create internal pubkey",
324
324
  failedToTweakPubkey: "failed to tweak pubkey"
325
325
  };
326
- function kl() {
326
+ function Ol() {
327
327
  const e = ul.sha256(Buffer.from("GardenHTLC", "utf-8")), t = Pr.pointMultiply(
328
- Buffer.concat([Buffer.from("04", "hex"), Il]),
328
+ Buffer.concat([Buffer.from("04", "hex"), kl]),
329
329
  e
330
330
  );
331
331
  if (!t)
332
332
  throw new Error(ga.failedToCreateInternalPubkey);
333
- const r = Pr.pointAdd(Tl, t);
333
+ const r = Pr.pointAdd(Pl, t);
334
334
  if (!r) throw new Error(ga.failedToCreateInternalPubkey);
335
335
  return fo(Buffer.from(r));
336
336
  }
337
337
  var hr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
338
- function Pl(e) {
338
+ function Rl(e) {
339
339
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
340
340
  }
341
- function Ol(e) {
341
+ function Cl(e) {
342
342
  if (e.__esModule) return e;
343
343
  var t = e.default;
344
344
  if (typeof t == "function") {
@@ -358,11 +358,11 @@ function Ol(e) {
358
358
  }), r;
359
359
  }
360
360
  var Se = {}, qe = {}, Wt = {}, qi = {};
361
- qi.byteLength = Ul;
362
- qi.toByteArray = Nl;
363
- qi.fromByteArray = Ml;
364
- var At = [], ct = [], Rl = typeof Uint8Array < "u" ? Uint8Array : Array, Bs = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
365
- for (var zr = 0, Cl = Bs.length; zr < Cl; ++zr)
361
+ qi.byteLength = Nl;
362
+ qi.toByteArray = Fl;
363
+ qi.fromByteArray = $l;
364
+ var At = [], ct = [], Ul = typeof Uint8Array < "u" ? Uint8Array : Array, Bs = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
365
+ for (var zr = 0, Ll = Bs.length; zr < Ll; ++zr)
366
366
  At[zr] = Bs[zr], ct[Bs.charCodeAt(zr)] = zr;
367
367
  ct[45] = 62;
368
368
  ct[95] = 63;
@@ -375,30 +375,30 @@ function Dc(e) {
375
375
  var n = r === t ? 0 : 4 - r % 4;
376
376
  return [r, n];
377
377
  }
378
- function Ul(e) {
378
+ function Nl(e) {
379
379
  var t = Dc(e), r = t[0], n = t[1];
380
380
  return (r + n) * 3 / 4 - n;
381
381
  }
382
- function Ll(e, t, r) {
382
+ function Hl(e, t, r) {
383
383
  return (t + r) * 3 / 4 - r;
384
384
  }
385
- function Nl(e) {
386
- var t, r = Dc(e), n = r[0], i = r[1], s = new Rl(Ll(e, n, i)), o = 0, a = i > 0 ? n - 4 : n, f;
385
+ function Fl(e) {
386
+ var t, r = Dc(e), n = r[0], i = r[1], s = new Ul(Hl(e, n, i)), o = 0, a = i > 0 ? n - 4 : n, f;
387
387
  for (f = 0; f < a; f += 4)
388
388
  t = ct[e.charCodeAt(f)] << 18 | ct[e.charCodeAt(f + 1)] << 12 | ct[e.charCodeAt(f + 2)] << 6 | ct[e.charCodeAt(f + 3)], s[o++] = t >> 16 & 255, s[o++] = t >> 8 & 255, s[o++] = t & 255;
389
389
  return i === 2 && (t = ct[e.charCodeAt(f)] << 2 | ct[e.charCodeAt(f + 1)] >> 4, s[o++] = t & 255), i === 1 && (t = ct[e.charCodeAt(f)] << 10 | ct[e.charCodeAt(f + 1)] << 4 | ct[e.charCodeAt(f + 2)] >> 2, s[o++] = t >> 8 & 255, s[o++] = t & 255), s;
390
390
  }
391
- function Hl(e) {
391
+ function Ml(e) {
392
392
  return At[e >> 18 & 63] + At[e >> 12 & 63] + At[e >> 6 & 63] + At[e & 63];
393
393
  }
394
- function Fl(e, t, r) {
394
+ function Dl(e, t, r) {
395
395
  for (var n, i = [], s = t; s < r; s += 3)
396
- n = (e[s] << 16 & 16711680) + (e[s + 1] << 8 & 65280) + (e[s + 2] & 255), i.push(Hl(n));
396
+ n = (e[s] << 16 & 16711680) + (e[s + 1] << 8 & 65280) + (e[s + 2] & 255), i.push(Ml(n));
397
397
  return i.join("");
398
398
  }
399
- function Ml(e) {
399
+ function $l(e) {
400
400
  for (var t, r = e.length, n = r % 3, i = [], s = 16383, o = 0, a = r - n; o < a; o += s)
401
- i.push(Fl(e, o, o + s > a ? a : o + s));
401
+ i.push(Dl(e, o, o + s > a ? a : o + s));
402
402
  return n === 1 ? (t = e[r - 1], i.push(
403
403
  At[t >> 2] + At[t << 4 & 63] + "=="
404
404
  )) : n === 2 && (t = (e[r - 2] << 8) + e[r - 1], i.push(
@@ -1412,7 +1412,7 @@ function $c(e) {
1412
1412
  function Ro(e) {
1413
1413
  return Br.Nil(e) ? "" : $c(e.constructor);
1414
1414
  }
1415
- function Dl(e) {
1415
+ function jl(e) {
1416
1416
  return Br.Function(e) ? "" : Br.String(e) ? JSON.stringify(e) : e && Br.Object(e) ? "" : e;
1417
1417
  }
1418
1418
  function Co(e, t) {
@@ -1422,7 +1422,7 @@ function Ci(e) {
1422
1422
  return Br.Function(e) ? e.toJSON ? e.toJSON() : $c(e) : Br.Array(e) ? "Array" : e && Br.Object(e) ? "Object" : e !== void 0 ? e : "";
1423
1423
  }
1424
1424
  function jc(e, t, r) {
1425
- var n = Dl(t);
1425
+ var n = jl(t);
1426
1426
  return "Expected " + Ci(e) + ", got" + (r !== "" ? " " + r : "") + (n !== "" ? " " + n : "");
1427
1427
  }
1428
1428
  function zt(e, t, r) {
@@ -1430,19 +1430,19 @@ function zt(e, t, r) {
1430
1430
  }
1431
1431
  zt.prototype = Object.create(Error.prototype);
1432
1432
  zt.prototype.constructor = zt;
1433
- function $l(e, t, r, n, i) {
1433
+ function zl(e, t, r, n, i) {
1434
1434
  var s = '" of type ';
1435
1435
  return t === "key" && (s = '" with key type '), jc('property "' + Ci(r) + s + Ci(e), n, i);
1436
1436
  }
1437
1437
  function Jr(e, t, r, n, i) {
1438
- e ? (i = i || Ro(n), this.message = $l(e, r, t, n, i)) : this.message = 'Unexpected property "' + t + '"', Co(this, zt), this.__label = r, this.__property = t, this.__type = e, this.__value = n, this.__valueTypeName = i;
1438
+ e ? (i = i || Ro(n), this.message = zl(e, r, t, n, i)) : this.message = 'Unexpected property "' + t + '"', Co(this, zt), this.__label = r, this.__property = t, this.__type = e, this.__value = n, this.__valueTypeName = i;
1439
1439
  }
1440
1440
  Jr.prototype = Object.create(Error.prototype);
1441
1441
  Jr.prototype.constructor = zt;
1442
- function jl(e, t) {
1442
+ function Vl(e, t) {
1443
1443
  return new zt(e, {}, t);
1444
1444
  }
1445
- function zl(e, t, r) {
1445
+ function Gl(e, t, r) {
1446
1446
  return e instanceof Jr ? (t = t + "." + e.__property, e = new Jr(
1447
1447
  e.__type,
1448
1448
  t,
@@ -1460,12 +1460,12 @@ function zl(e, t, r) {
1460
1460
  var zc = {
1461
1461
  TfTypeError: zt,
1462
1462
  TfPropertyTypeError: Jr,
1463
- tfCustomError: jl,
1464
- tfSubError: zl,
1463
+ tfCustomError: Vl,
1464
+ tfSubError: Gl,
1465
1465
  tfJSON: Ci,
1466
1466
  getValueTypeName: Ro
1467
1467
  }, Is, _a;
1468
- function Vl() {
1468
+ function ql() {
1469
1469
  if (_a) return Is;
1470
1470
  _a = 1;
1471
1471
  var e = Oo, t = zc;
@@ -1548,7 +1548,7 @@ function Vl() {
1548
1548
  }).bind(null, B);
1549
1549
  return Is = v, Is;
1550
1550
  }
1551
- var Gn = zc, Ne = Oo, Pt = Gn.tfJSON, Vc = Gn.TfTypeError, Gc = Gn.TfPropertyTypeError, wn = Gn.tfSubError, Gl = Gn.getValueTypeName, Ft = {
1551
+ var Gn = zc, Ne = Oo, Pt = Gn.tfJSON, Vc = Gn.TfTypeError, Gc = Gn.TfPropertyTypeError, wn = Gn.tfSubError, Wl = Gn.getValueTypeName, Ft = {
1552
1552
  arrayOf: function(t, r) {
1553
1553
  t = St(t), r = r || {};
1554
1554
  function n(i, s) {
@@ -1657,7 +1657,7 @@ var Gn = zc, Ne = Oo, Pt = Gn.tfJSON, Vc = Gn.TfTypeError, Gc = Gn.TfPropertyTyp
1657
1657
  },
1658
1658
  quacksLike: function(t) {
1659
1659
  function r(n) {
1660
- return t === Gl(n);
1660
+ return t === Wl(n);
1661
1661
  }
1662
1662
  return r.toJSON = function() {
1663
1663
  return t;
@@ -1712,7 +1712,7 @@ for (var ur in Ne)
1712
1712
  Ze[ur] = Ne[ur];
1713
1713
  for (ur in Ft)
1714
1714
  Ze[ur] = Ft[ur];
1715
- var va = Vl();
1715
+ var va = ql();
1716
1716
  for (ur in va)
1717
1717
  Ze[ur] = va[ur];
1718
1718
  Ze.compile = St;
@@ -1779,19 +1779,19 @@ function Xc(e, t, r) {
1779
1779
  return Kc(t, 9007199254740991), e.writeInt32LE(t & -1, r), e.writeUInt32LE(Math.floor(t / 4294967296), r + 4), r + 8;
1780
1780
  }
1781
1781
  He.writeUInt64LE = Xc;
1782
- function ql(e) {
1782
+ function Kl(e) {
1783
1783
  if (e.length < 1) return e;
1784
1784
  let t = e.length - 1, r = 0;
1785
1785
  for (let n = 0; n < e.length / 2; n++)
1786
1786
  r = e[n], e[n] = e[t], e[t] = r, t--;
1787
1787
  return e;
1788
1788
  }
1789
- He.reverseBuffer = ql;
1790
- function Wl(e) {
1789
+ He.reverseBuffer = Kl;
1790
+ function Yl(e) {
1791
1791
  const t = Buffer.allocUnsafe(e.length);
1792
1792
  return e.copy(t), t;
1793
1793
  }
1794
- He.cloneBuffer = Wl;
1794
+ He.cloneBuffer = Yl;
1795
1795
  class Uo {
1796
1796
  static withCapacity(t) {
1797
1797
  return new Uo(Buffer.alloc(t));
@@ -1832,7 +1832,7 @@ class Uo {
1832
1832
  }
1833
1833
  }
1834
1834
  He.BufferWriter = Uo;
1835
- class Kl {
1835
+ class Xl {
1836
1836
  constructor(t, r = 0) {
1837
1837
  this.buffer = t, this.offset = r, Wc(Ir.tuple(Ir.Buffer, Ir.UInt32), [t, r]);
1838
1838
  }
@@ -1871,7 +1871,7 @@ class Kl {
1871
1871
  return r;
1872
1872
  }
1873
1873
  }
1874
- He.BufferReader = Kl;
1874
+ He.BufferReader = Xl;
1875
1875
  var br = {}, rn = {}, It = {}, mt = {};
1876
1876
  Object.defineProperty(mt, "__esModule", { value: !0 });
1877
1877
  mt.isBytes = Jc;
@@ -1915,8 +1915,8 @@ function tf(e, t) {
1915
1915
  if (e.length < r)
1916
1916
  throw new Error(`digestInto() expects output buffer of length at least ${r}`);
1917
1917
  }
1918
- const Yl = { number: Ui, bool: Zc, bytes: Lo, hash: Qc, exists: ef, output: tf };
1919
- mt.default = Yl;
1918
+ const Zl = { number: Ui, bool: Zc, bytes: Lo, hash: Qc, exists: ef, output: tf };
1919
+ mt.default = Zl;
1920
1920
  var Wn = {}, Wi = {};
1921
1921
  Object.defineProperty(Wi, "__esModule", { value: !0 });
1922
1922
  Wi.crypto = void 0;
@@ -2046,17 +2046,17 @@ Wi.crypto = typeof globalThis == "object" && "crypto" in globalThis ? globalThis
2046
2046
  Object.defineProperty(It, "__esModule", { value: !0 });
2047
2047
  It.HashMD = It.Maj = It.Chi = void 0;
2048
2048
  const Ts = mt, _n = Wn;
2049
- function Xl(e, t, r, n) {
2049
+ function Jl(e, t, r, n) {
2050
2050
  if (typeof e.setBigUint64 == "function")
2051
2051
  return e.setBigUint64(t, r, n);
2052
2052
  const i = BigInt(32), s = BigInt(4294967295), o = Number(r >> i & s), a = Number(r & s), f = n ? 4 : 0, l = n ? 0 : 4;
2053
2053
  e.setUint32(t + f, o, n), e.setUint32(t + l, a, n);
2054
2054
  }
2055
- const Zl = (e, t, r) => e & t ^ ~e & r;
2056
- It.Chi = Zl;
2057
- const Jl = (e, t, r) => e & t ^ e & r ^ t & r;
2058
- It.Maj = Jl;
2059
- let Ql = class extends _n.Hash {
2055
+ const Ql = (e, t, r) => e & t ^ ~e & r;
2056
+ It.Chi = Ql;
2057
+ const ed = (e, t, r) => e & t ^ e & r ^ t & r;
2058
+ It.Maj = ed;
2059
+ let td = class extends _n.Hash {
2060
2060
  constructor(t, r, n, i) {
2061
2061
  super(), this.blockLen = t, this.outputLen = r, this.padOffset = n, this.isLE = i, this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.buffer = new Uint8Array(t), this.view = (0, _n.createView)(this.buffer);
2062
2062
  }
@@ -2084,7 +2084,7 @@ let Ql = class extends _n.Hash {
2084
2084
  r[o++] = 128, this.buffer.subarray(o).fill(0), this.padOffset > i - o && (this.process(n, 0), o = 0);
2085
2085
  for (let p = o; p < i; p++)
2086
2086
  r[p] = 0;
2087
- Xl(n, i - 8, BigInt(this.length * 8), s), this.process(n, 0);
2087
+ Jl(n, i - 8, BigInt(this.length * 8), s), this.process(n, 0);
2088
2088
  const a = (0, _n.createView)(t), f = this.outputLen;
2089
2089
  if (f % 4)
2090
2090
  throw new Error("_sha2: outputLen should be aligned to 32bit");
@@ -2106,27 +2106,27 @@ let Ql = class extends _n.Hash {
2106
2106
  return t.length = i, t.pos = a, t.finished = s, t.destroyed = o, i % r && t.buffer.set(n), t;
2107
2107
  }
2108
2108
  };
2109
- It.HashMD = Ql;
2109
+ It.HashMD = td;
2110
2110
  Object.defineProperty(rn, "__esModule", { value: !0 });
2111
2111
  rn.ripemd160 = rn.RIPEMD160 = void 0;
2112
- const ed = It, Ln = Wn, td = /* @__PURE__ */ new Uint8Array([7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8]), rf = /* @__PURE__ */ new Uint8Array(new Array(16).fill(0).map((e, t) => t)), rd = /* @__PURE__ */ rf.map((e) => (9 * e + 5) % 16);
2113
- let No = [rf], Ho = [rd];
2112
+ const rd = It, Ln = Wn, nd = /* @__PURE__ */ new Uint8Array([7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8]), rf = /* @__PURE__ */ new Uint8Array(new Array(16).fill(0).map((e, t) => t)), id = /* @__PURE__ */ rf.map((e) => (9 * e + 5) % 16);
2113
+ let No = [rf], Ho = [id];
2114
2114
  for (let e = 0; e < 4; e++)
2115
2115
  for (let t of [No, Ho])
2116
- t.push(t[e].map((r) => td[r]));
2116
+ t.push(t[e].map((r) => nd[r]));
2117
2117
  const nf = /* @__PURE__ */ [
2118
2118
  [11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8],
2119
2119
  [12, 13, 11, 15, 6, 9, 9, 7, 12, 15, 11, 13, 7, 8, 7, 7],
2120
2120
  [13, 15, 14, 11, 7, 7, 6, 8, 13, 14, 13, 12, 5, 5, 6, 9],
2121
2121
  [14, 11, 12, 14, 8, 6, 5, 5, 15, 12, 15, 14, 9, 9, 8, 6],
2122
2122
  [15, 12, 13, 13, 9, 5, 8, 6, 14, 11, 12, 11, 8, 6, 5, 5]
2123
- ].map((e) => new Uint8Array(e)), nd = /* @__PURE__ */ No.map((e, t) => e.map((r) => nf[t][r])), id = /* @__PURE__ */ Ho.map((e, t) => e.map((r) => nf[t][r])), sd = /* @__PURE__ */ new Uint32Array([
2123
+ ].map((e) => new Uint8Array(e)), sd = /* @__PURE__ */ No.map((e, t) => e.map((r) => nf[t][r])), od = /* @__PURE__ */ Ho.map((e, t) => e.map((r) => nf[t][r])), ad = /* @__PURE__ */ new Uint32Array([
2124
2124
  0,
2125
2125
  1518500249,
2126
2126
  1859775393,
2127
2127
  2400959708,
2128
2128
  2840853838
2129
- ]), od = /* @__PURE__ */ new Uint32Array([
2129
+ ]), cd = /* @__PURE__ */ new Uint32Array([
2130
2130
  1352829926,
2131
2131
  1548603684,
2132
2132
  1836072691,
@@ -2137,7 +2137,7 @@ function Ea(e, t, r, n) {
2137
2137
  return e === 0 ? t ^ r ^ n : e === 1 ? t & r | ~t & n : e === 2 ? (t | ~r) ^ n : e === 3 ? t & n | r & ~n : t ^ (r | ~n);
2138
2138
  }
2139
2139
  const ui = /* @__PURE__ */ new Uint32Array(16);
2140
- let sf = class extends ed.HashMD {
2140
+ let sf = class extends rd.HashMD {
2141
2141
  constructor() {
2142
2142
  super(64, 20, 8, !0), this.h0 = 1732584193, this.h1 = -271733879, this.h2 = -1732584194, this.h3 = 271733878, this.h4 = -1009589776;
2143
2143
  }
@@ -2153,7 +2153,7 @@ let sf = class extends ed.HashMD {
2153
2153
  ui[y] = t.getUint32(r, !0);
2154
2154
  let n = this.h0 | 0, i = n, s = this.h1 | 0, o = s, a = this.h2 | 0, f = a, l = this.h3 | 0, d = l, p = this.h4 | 0, w = p;
2155
2155
  for (let y = 0; y < 5; y++) {
2156
- const I = 4 - y, S = sd[y], _ = od[y], A = No[y], k = Ho[y], E = nd[y], v = id[y];
2156
+ const I = 4 - y, S = ad[y], _ = cd[y], A = No[y], k = Ho[y], E = sd[y], v = od[y];
2157
2157
  for (let B = 0; B < 16; B++) {
2158
2158
  const x = (0, Ln.rotl)(n + Ea(y, s, a, l) + ui[A[B]] + S, E[B]) + p | 0;
2159
2159
  n = p, p = l, l = (0, Ln.rotl)(a, 10) | 0, a = s, s = x;
@@ -2221,7 +2221,7 @@ nn.sha1 = (0, Si.wrapConstructor)(() => new of());
2221
2221
  var $t = {};
2222
2222
  Object.defineProperty($t, "__esModule", { value: !0 });
2223
2223
  $t.sha224 = $t.sha256 = $t.SHA256 = void 0;
2224
- const Ps = It, at = Wn, ad = /* @__PURE__ */ new Uint32Array([
2224
+ const Ps = It, at = Wn, fd = /* @__PURE__ */ new Uint32Array([
2225
2225
  1116352408,
2226
2226
  1899447441,
2227
2227
  3049323471,
@@ -2317,7 +2317,7 @@ let Fo = class extends Ps.HashMD {
2317
2317
  }
2318
2318
  let { A: n, B: i, C: s, D: o, E: a, F: f, G: l, H: d } = this;
2319
2319
  for (let p = 0; p < 64; p++) {
2320
- const w = (0, at.rotr)(a, 6) ^ (0, at.rotr)(a, 11) ^ (0, at.rotr)(a, 25), y = d + w + (0, Ps.Chi)(a, f, l) + ad[p] + Jt[p] | 0, S = ((0, at.rotr)(n, 2) ^ (0, at.rotr)(n, 13) ^ (0, at.rotr)(n, 22)) + (0, Ps.Maj)(n, i, s) | 0;
2320
+ const w = (0, at.rotr)(a, 6) ^ (0, at.rotr)(a, 11) ^ (0, at.rotr)(a, 25), y = d + w + (0, Ps.Chi)(a, f, l) + fd[p] + Jt[p] | 0, S = ((0, at.rotr)(n, 2) ^ (0, at.rotr)(n, 13) ^ (0, at.rotr)(n, 22)) + (0, Ps.Maj)(n, i, s) | 0;
2321
2321
  d = l, l = f, f = a, a = o + y | 0, o = s, s = i, i = n, n = y + S | 0;
2322
2322
  }
2323
2323
  n = n + this.A | 0, i = i + this.B | 0, s = s + this.C | 0, o = o + this.D | 0, a = a + this.E | 0, f = f + this.F | 0, l = l + this.G | 0, d = d + this.H | 0, this.set(n, i, s, o, a, f, l, d);
@@ -2330,13 +2330,13 @@ let Fo = class extends Ps.HashMD {
2330
2330
  }
2331
2331
  };
2332
2332
  $t.SHA256 = Fo;
2333
- class cd extends Fo {
2333
+ class ud extends Fo {
2334
2334
  constructor() {
2335
2335
  super(), this.A = -1056596264, this.B = 914150663, this.C = 812702999, this.D = -150054599, this.E = -4191439, this.F = 1750603025, this.G = 1694076839, this.H = -1090891868, this.outputLen = 28;
2336
2336
  }
2337
2337
  }
2338
2338
  $t.sha256 = (0, at.wrapConstructor)(() => new Fo());
2339
- $t.sha224 = (0, at.wrapConstructor)(() => new cd());
2339
+ $t.sha224 = (0, at.wrapConstructor)(() => new ud());
2340
2340
  (function(e) {
2341
2341
  Object.defineProperty(e, "__esModule", { value: !0 }), e.taggedHash = e.TAGGED_HASH_PREFIXES = e.TAGS = e.hash256 = e.hash160 = e.sha256 = e.sha1 = e.ripemd160 = void 0;
2342
2342
  const t = rn, r = nn, n = $t;
@@ -2977,15 +2977,15 @@ $t.sha224 = (0, at.wrapConstructor)(() => new cd());
2977
2977
  var Os = {}, jt = {};
2978
2978
  Object.defineProperty(jt, "__esModule", { value: !0 });
2979
2979
  jt.encode = jt.decode = jt.check = void 0;
2980
- function fd(e) {
2980
+ function ld(e) {
2981
2981
  if (e.length < 8 || e.length > 72 || e[0] !== 48 || e[1] !== e.length - 2 || e[2] !== 2) return !1;
2982
2982
  const t = e[3];
2983
2983
  if (t === 0 || 5 + t >= e.length || e[4 + t] !== 2) return !1;
2984
2984
  const r = e[5 + t];
2985
2985
  return !(r === 0 || 6 + t + r !== e.length || e[4] & 128 || t > 1 && e[4] === 0 && !(e[5] & 128) || e[t + 6] & 128 || r > 1 && e[t + 6] === 0 && !(e[t + 7] & 128));
2986
2986
  }
2987
- jt.check = fd;
2988
- function ud(e) {
2987
+ jt.check = ld;
2988
+ function dd(e) {
2989
2989
  if (e.length < 8) throw new Error("DER sequence length is too short");
2990
2990
  if (e.length > 72) throw new Error("DER sequence length is too long");
2991
2991
  if (e[0] !== 48) throw new Error("Expected DER sequence");
@@ -3010,8 +3010,8 @@ function ud(e) {
3010
3010
  s: e.slice(6 + t)
3011
3011
  };
3012
3012
  }
3013
- jt.decode = ud;
3014
- function ld(e, t) {
3013
+ jt.decode = dd;
3014
+ function hd(e, t) {
3015
3015
  const r = e.length, n = t.length;
3016
3016
  if (r === 0) throw new Error("R length is zero");
3017
3017
  if (n === 0) throw new Error("S length is zero");
@@ -3026,7 +3026,7 @@ function ld(e, t) {
3026
3026
  const i = Buffer.allocUnsafe(6 + r + n);
3027
3027
  return i[0] = 48, i[1] = i.length - 2, i[2] = 2, i[3] = e.length, e.copy(i, 4), i[4 + r] = 2, i[5 + r] = t.length, t.copy(i, 6 + r), i;
3028
3028
  }
3029
- jt.encode = ld;
3029
+ jt.encode = hd;
3030
3030
  var Or = {};
3031
3031
  Object.defineProperty(Or, "__esModule", { value: !0 });
3032
3032
  Or.REVERSE_OPS = Or.OPS = void 0;
@@ -3166,12 +3166,12 @@ function cf(e) {
3166
3166
  return e < fr.OPS.OP_PUSHDATA1 ? 1 : e <= 255 ? 2 : e <= 65535 ? 3 : 5;
3167
3167
  }
3168
3168
  lr.encodingLength = cf;
3169
- function dd(e, t, r) {
3169
+ function pd(e, t, r) {
3170
3170
  const n = cf(t);
3171
3171
  return n === 1 ? e.writeUInt8(t, r) : n === 2 ? (e.writeUInt8(fr.OPS.OP_PUSHDATA1, r), e.writeUInt8(t, r + 1)) : n === 3 ? (e.writeUInt8(fr.OPS.OP_PUSHDATA2, r), e.writeUInt16LE(t, r + 1)) : (e.writeUInt8(fr.OPS.OP_PUSHDATA4, r), e.writeUInt32LE(t, r + 1)), n;
3172
3172
  }
3173
- lr.encode = dd;
3174
- function hd(e, t) {
3173
+ lr.encode = pd;
3174
+ function yd(e, t) {
3175
3175
  const r = e.readUInt8(t);
3176
3176
  let n, i;
3177
3177
  if (r < fr.OPS.OP_PUSHDATA1)
@@ -3193,11 +3193,11 @@ function hd(e, t) {
3193
3193
  size: i
3194
3194
  };
3195
3195
  }
3196
- lr.decode = hd;
3196
+ lr.decode = yd;
3197
3197
  var sn = {};
3198
3198
  Object.defineProperty(sn, "__esModule", { value: !0 });
3199
3199
  sn.encode = sn.decode = void 0;
3200
- function pd(e, t, r) {
3200
+ function md(e, t, r) {
3201
3201
  t = t || 4, r = r === void 0 ? !0 : r;
3202
3202
  const n = e.length;
3203
3203
  if (n === 0) return 0;
@@ -3213,20 +3213,20 @@ function pd(e, t, r) {
3213
3213
  i |= e[s] << 8 * s;
3214
3214
  return e[n - 1] & 128 ? -(i & ~(128 << 8 * (n - 1))) : i;
3215
3215
  }
3216
- sn.decode = pd;
3217
- function yd(e) {
3216
+ sn.decode = md;
3217
+ function bd(e) {
3218
3218
  return e > 2147483647 ? 5 : e > 8388607 ? 4 : e > 32767 ? 3 : e > 127 ? 2 : e > 0 ? 1 : 0;
3219
3219
  }
3220
- function md(e) {
3220
+ function gd(e) {
3221
3221
  let t = Math.abs(e);
3222
- const r = yd(t), n = Buffer.allocUnsafe(r), i = e < 0;
3222
+ const r = bd(t), n = Buffer.allocUnsafe(r), i = e < 0;
3223
3223
  for (let s = 0; s < r; ++s)
3224
3224
  n.writeUInt8(t & 255, s), t >>= 8;
3225
3225
  return n[r - 1] & 128 ? n.writeUInt8(i ? 128 : 0, r - 1) : i && (n[r - 1] |= 128), n;
3226
3226
  }
3227
- sn.encode = md;
3227
+ sn.encode = gd;
3228
3228
  var Sr = {}, xa;
3229
- function bd() {
3229
+ function wd() {
3230
3230
  if (xa) return Sr;
3231
3231
  xa = 1, Object.defineProperty(Sr, "__esModule", { value: !0 }), Sr.encode = Sr.decode = void 0;
3232
3232
  const e = jt, t = nt(), r = qe, { typeforce: n } = r, i = Buffer.alloc(1, 0);
@@ -3275,7 +3275,7 @@ function nt() {
3275
3275
  return r.OPS;
3276
3276
  }
3277
3277
  });
3278
- const n = lr, i = sn, s = bd(), o = qe, { typeforce: a } = o, f = r.OPS.OP_RESERVED;
3278
+ const n = lr, i = sn, s = wd(), o = qe, { typeforce: a } = o, f = r.OPS.OP_RESERVED;
3279
3279
  function l(P) {
3280
3280
  return o.Number(P) && (P === r.OPS.OP_0 || P >= r.OPS.OP_1 && P <= r.OPS.OP_16 || P === r.OPS.OP_1NEGATE);
3281
3281
  }
@@ -3385,12 +3385,12 @@ function nt() {
3385
3385
  }
3386
3386
  Object.defineProperty(qn, "__esModule", { value: !0 });
3387
3387
  qn.Transaction = void 0;
3388
- const ke = He, We = br, Aa = nt(), gd = nt(), oe = qe, { typeforce: gt } = oe;
3388
+ const ke = He, We = br, Aa = nt(), _d = nt(), oe = qe, { typeforce: gt } = oe;
3389
3389
  function Et(e) {
3390
3390
  const t = e.length;
3391
3391
  return ke.varuint.encodingLength(t) + t;
3392
3392
  }
3393
- function wd(e) {
3393
+ function vd(e) {
3394
3394
  const t = e.length;
3395
3395
  return ke.varuint.encodingLength(t) + e.reduce((r, n) => r + Et(n), 0);
3396
3396
  }
@@ -3400,11 +3400,11 @@ const ir = Buffer.allocUnsafe(0), Ba = [], Rs = Buffer.from(
3400
3400
  ), Ia = Buffer.from(
3401
3401
  "0000000000000000000000000000000000000000000000000000000000000001",
3402
3402
  "hex"
3403
- ), _d = Buffer.from("ffffffffffffffff", "hex"), vd = {
3403
+ ), Ed = Buffer.from("ffffffffffffffff", "hex"), xd = {
3404
3404
  script: ir,
3405
- valueBuffer: _d
3405
+ valueBuffer: Ed
3406
3406
  };
3407
- function Ed(e) {
3407
+ function Sd(e) {
3408
3408
  return e.value !== void 0;
3409
3409
  }
3410
3410
  class re {
@@ -3490,7 +3490,7 @@ class re {
3490
3490
  }
3491
3491
  byteLength(t = !0) {
3492
3492
  const r = t && this.hasWitnesses();
3493
- return (r ? 10 : 8) + ke.varuint.encodingLength(this.ins.length) + ke.varuint.encodingLength(this.outs.length) + this.ins.reduce((n, i) => n + 40 + Et(i.script), 0) + this.outs.reduce((n, i) => n + 8 + Et(i.script), 0) + (r ? this.ins.reduce((n, i) => n + wd(i.witness), 0) : 0);
3493
+ return (r ? 10 : 8) + ke.varuint.encodingLength(this.ins.length) + ke.varuint.encodingLength(this.outs.length) + this.ins.reduce((n, i) => n + 40 + Et(i.script), 0) + this.outs.reduce((n, i) => n + 8 + Et(i.script), 0) + (r ? this.ins.reduce((n, i) => n + vd(i.witness), 0) : 0);
3494
3494
  }
3495
3495
  clone() {
3496
3496
  const t = new re();
@@ -3524,7 +3524,7 @@ class re {
3524
3524
  arguments
3525
3525
  ), t >= this.ins.length) return Ia;
3526
3526
  const i = Aa.compile(
3527
- Aa.decompile(r).filter((a) => a !== gd.OPS.OP_CODESEPARATOR)
3527
+ Aa.decompile(r).filter((a) => a !== _d.OPS.OP_CODESEPARATOR)
3528
3528
  ), s = this.clone();
3529
3529
  if ((n & 31) === re.SIGHASH_NONE)
3530
3530
  s.outs = [], s.ins.forEach((a, f) => {
@@ -3534,7 +3534,7 @@ class re {
3534
3534
  if (t >= this.outs.length) return Ia;
3535
3535
  s.outs.length = t + 1;
3536
3536
  for (let a = 0; a < t; a++)
3537
- s.outs[a] = vd;
3537
+ s.outs[a] = xd;
3538
3538
  s.ins.forEach((a, f) => {
3539
3539
  f !== t && (a.sequence = 0);
3540
3540
  });
@@ -3658,7 +3658,7 @@ class re {
3658
3658
  return s && (i.writeUInt8(re.ADVANCED_TRANSACTION_MARKER), i.writeUInt8(re.ADVANCED_TRANSACTION_FLAG)), i.writeVarInt(this.ins.length), this.ins.forEach((o) => {
3659
3659
  i.writeSlice(o.hash), i.writeUInt32(o.index), i.writeVarSlice(o.script), i.writeUInt32(o.sequence);
3660
3660
  }), i.writeVarInt(this.outs.length), this.outs.forEach((o) => {
3661
- Ed(o) ? i.writeUInt64(o.value) : i.writeSlice(o.valueBuffer), i.writeVarSlice(o.script);
3661
+ Sd(o) ? i.writeUInt64(o.value) : i.writeSlice(o.valueBuffer), i.writeVarSlice(o.script);
3662
3662
  }), s && this.ins.forEach((o) => {
3663
3663
  i.writeVector(o.witness);
3664
3664
  }), i.writeUInt32(this.locktime), r !== void 0 ? t.slice(r, i.offset) : t;
@@ -3677,9 +3677,9 @@ re.ADVANCED_TRANSACTION_MARKER = 0;
3677
3677
  re.ADVANCED_TRANSACTION_FLAG = 1;
3678
3678
  var pe = {}, Kn = {};
3679
3679
  Object.defineProperty(Kn, "__esModule", { value: !0 });
3680
- const xd = 9007199254740991;
3680
+ const Ad = 9007199254740991;
3681
3681
  function Mo(e) {
3682
- if (e < 0 || e > xd || e % 1 !== 0)
3682
+ if (e < 0 || e > Ad || e % 1 !== 0)
3683
3683
  throw new RangeError("value out of range");
3684
3684
  }
3685
3685
  function Nn(e, t, r) {
@@ -3776,7 +3776,7 @@ Ge.testnet = {
3776
3776
  var rt = {};
3777
3777
  Object.defineProperty(rt, "__esModule", { value: !0 });
3778
3778
  rt.value = rt.prop = void 0;
3779
- function Sd(e, t, r) {
3779
+ function Bd(e, t, r) {
3780
3780
  Object.defineProperty(e, t, {
3781
3781
  configurable: !0,
3782
3782
  enumerable: !0,
@@ -3794,16 +3794,16 @@ function Sd(e, t, r) {
3794
3794
  }
3795
3795
  });
3796
3796
  }
3797
- rt.prop = Sd;
3798
- function Ad(e) {
3797
+ rt.prop = Bd;
3798
+ function Id(e) {
3799
3799
  let t;
3800
3800
  return () => (t !== void 0 || (t = e()), t);
3801
3801
  }
3802
- rt.value = Ad;
3802
+ rt.value = Id;
3803
3803
  Object.defineProperty(Ki, "__esModule", { value: !0 });
3804
3804
  Ki.p2data = void 0;
3805
- const Bd = Ge, Ai = nt(), wt = qe, Ta = rt, ka = Ai.OPS;
3806
- function Id(e, t) {
3805
+ const Td = Ge, Ai = nt(), wt = qe, Ta = rt, ka = Ai.OPS;
3806
+ function kd(e, t) {
3807
3807
  if (!e.data && !e.output) throw new TypeError("Not enough data");
3808
3808
  t = Object.assign({ validate: !0 }, t || {}), (0, wt.typeforce)(
3809
3809
  {
@@ -3815,7 +3815,7 @@ function Id(e, t) {
3815
3815
  },
3816
3816
  e
3817
3817
  );
3818
- const n = { name: "embed", network: e.network || Bd.bitcoin };
3818
+ const n = { name: "embed", network: e.network || Td.bitcoin };
3819
3819
  if (Ta.prop(n, "output", () => {
3820
3820
  if (e.data)
3821
3821
  return Ai.compile([ka.OP_RETURN].concat(e.data));
@@ -3832,12 +3832,12 @@ function Id(e, t) {
3832
3832
  }
3833
3833
  return Object.assign(n, e);
3834
3834
  }
3835
- Ki.p2data = Id;
3835
+ Ki.p2data = kd;
3836
3836
  var Yi = {};
3837
3837
  Object.defineProperty(Yi, "__esModule", { value: !0 });
3838
3838
  Yi.p2ms = void 0;
3839
- const Td = Ge, Wr = nt(), Ie = qe, Qt = rt, Kr = Wr.OPS, li = Kr.OP_RESERVED;
3840
- function kd(e, t) {
3839
+ const Pd = Ge, Wr = nt(), Ie = qe, Qt = rt, Kr = Wr.OPS, li = Kr.OP_RESERVED;
3840
+ function Od(e, t) {
3841
3841
  if (!e.input && !e.output && !(e.pubkeys && e.m !== void 0) && !e.signatures)
3842
3842
  throw new TypeError("Not enough data");
3843
3843
  t = Object.assign({ validate: !0 }, t || {});
@@ -3860,7 +3860,7 @@ function kd(e, t) {
3860
3860
  },
3861
3861
  e
3862
3862
  );
3863
- const i = { network: e.network || Td.bitcoin };
3863
+ const i = { network: e.network || Pd.bitcoin };
3864
3864
  let s = [], o = !1;
3865
3865
  function a(f) {
3866
3866
  o || (o = !0, s = Wr.decompile(f), i.m = s[0] - li, i.n = s[s.length - 2] - li, i.pubkeys = s.slice(1, -2));
@@ -3936,12 +3936,12 @@ function kd(e, t) {
3936
3936
  }
3937
3937
  return Object.assign(i, e);
3938
3938
  }
3939
- Yi.p2ms = kd;
3939
+ Yi.p2ms = Od;
3940
3940
  var Xi = {};
3941
3941
  Object.defineProperty(Xi, "__esModule", { value: !0 });
3942
3942
  Xi.p2pk = void 0;
3943
- const Pd = Ge, Yr = nt(), dt = qe, Vr = rt, Pa = Yr.OPS;
3944
- function Od(e, t) {
3943
+ const Rd = Ge, Yr = nt(), dt = qe, Vr = rt, Pa = Yr.OPS;
3944
+ function Cd(e, t) {
3945
3945
  if (!e.input && !e.output && !e.pubkey && !e.input && !e.signature)
3946
3946
  throw new TypeError("Not enough data");
3947
3947
  t = Object.assign({ validate: !0 }, t || {}), (0, dt.typeforce)(
@@ -3954,7 +3954,7 @@ function Od(e, t) {
3954
3954
  },
3955
3955
  e
3956
3956
  );
3957
- const r = Vr.value(() => Yr.decompile(e.input)), i = { name: "p2pk", network: e.network || Pd.bitcoin };
3957
+ const r = Vr.value(() => Yr.decompile(e.input)), i = { name: "p2pk", network: e.network || Rd.bitcoin };
3958
3958
  if (Vr.prop(i, "output", () => {
3959
3959
  if (e.pubkey)
3960
3960
  return Yr.compile([e.pubkey, Pa.OP_CHECKSIG]);
@@ -3989,9 +3989,9 @@ function Od(e, t) {
3989
3989
  }
3990
3990
  return Object.assign(i, e);
3991
3991
  }
3992
- Xi.p2pk = Od;
3992
+ Xi.p2pk = Cd;
3993
3993
  var Zi = {};
3994
- function Rd(e) {
3994
+ function Ud(e) {
3995
3995
  if (e.length >= 255)
3996
3996
  throw new TypeError("Alphabet too long");
3997
3997
  for (var t = new Uint8Array(256), r = 0; r < t.length; r++)
@@ -4058,9 +4058,9 @@ function Rd(e) {
4058
4058
  decode: w
4059
4059
  };
4060
4060
  }
4061
- var Cd = Rd;
4062
- const Ud = Cd, Ld = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
4063
- var Nd = Ud(Ld), Us = Nd, Hd = function(e) {
4061
+ var Ld = Ud;
4062
+ const Nd = Ld, Hd = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
4063
+ var Fd = Nd(Hd), Us = Fd, Md = function(e) {
4064
4064
  function t(s) {
4065
4065
  var o = Uint8Array.from(s), a = e(o), f = o.length + 4, l = new Uint8Array(f);
4066
4066
  return l.set(o, 0), l.set(a.subarray(0, 4), o.length), Us.encode(l, f);
@@ -4085,15 +4085,15 @@ var Nd = Ud(Ld), Us = Nd, Hd = function(e) {
4085
4085
  decode: i,
4086
4086
  decodeUnsafe: n
4087
4087
  };
4088
- }, { sha256: Oa } = $t, Fd = Hd;
4089
- function Md(e) {
4088
+ }, { sha256: Oa } = $t, Dd = Md;
4089
+ function $d(e) {
4090
4090
  return Oa(Oa(e));
4091
4091
  }
4092
- var Do = Fd(Md);
4092
+ var Do = Dd($d);
4093
4093
  Object.defineProperty(Zi, "__esModule", { value: !0 });
4094
4094
  Zi.p2pkh = void 0;
4095
- const Ls = br, Dd = Ge, Xr = nt(), Ke = qe, Ot = rt, Ra = Do, er = Xr.OPS;
4096
- function $d(e, t) {
4095
+ const Ls = br, jd = Ge, Xr = nt(), Ke = qe, Ot = rt, Ra = Do, er = Xr.OPS;
4096
+ function zd(e, t) {
4097
4097
  if (!e.address && !e.hash && !e.output && !e.pubkey && !e.input)
4098
4098
  throw new TypeError("Not enough data");
4099
4099
  t = Object.assign({ validate: !0 }, t || {}), (0, Ke.typeforce)(
@@ -4111,7 +4111,7 @@ function $d(e, t) {
4111
4111
  const r = Ot.value(() => {
4112
4112
  const o = Buffer.from(Ra.decode(e.address)), a = o.readUInt8(0), f = o.slice(1);
4113
4113
  return { version: a, hash: f };
4114
- }), n = Ot.value(() => Xr.decompile(e.input)), i = e.network || Dd.bitcoin, s = { name: "p2pkh", network: i };
4114
+ }), n = Ot.value(() => Xr.decompile(e.input)), i = e.network || jd.bitcoin, s = { name: "p2pkh", network: i };
4115
4115
  if (Ot.prop(s, "address", () => {
4116
4116
  if (!s.hash) return;
4117
4117
  const o = Buffer.allocUnsafe(21);
@@ -4186,12 +4186,12 @@ function $d(e, t) {
4186
4186
  }
4187
4187
  return Object.assign(s, e);
4188
4188
  }
4189
- Zi.p2pkh = $d;
4189
+ Zi.p2pkh = zd;
4190
4190
  var Ji = {};
4191
4191
  Object.defineProperty(Ji, "__esModule", { value: !0 });
4192
4192
  Ji.p2sh = void 0;
4193
- const Ca = br, jd = Ge, xt = nt(), ge = qe, _t = rt, Ua = Do, En = xt.OPS;
4194
- function zd(e, t) {
4193
+ const Ca = br, Vd = Ge, xt = nt(), ge = qe, _t = rt, Ua = Do, En = xt.OPS;
4194
+ function Gd(e, t) {
4195
4195
  if (!e.address && !e.hash && !e.output && !e.redeem && !e.input)
4196
4196
  throw new TypeError("Not enough data");
4197
4197
  t = Object.assign({ validate: !0 }, t || {}), (0, ge.typeforce)(
@@ -4216,7 +4216,7 @@ function zd(e, t) {
4216
4216
  e
4217
4217
  );
4218
4218
  let r = e.network;
4219
- r || (r = e.redeem && e.redeem.network || jd.bitcoin);
4219
+ r || (r = e.redeem && e.redeem.network || Vd.bitcoin);
4220
4220
  const n = { network: r }, i = _t.value(() => {
4221
4221
  const a = Buffer.from(Ua.decode(e.address)), f = a.readUInt8(0), l = a.slice(1);
4222
4222
  return { version: f, hash: l };
@@ -4329,7 +4329,7 @@ function zd(e, t) {
4329
4329
  }
4330
4330
  return Object.assign(n, e);
4331
4331
  }
4332
- Ji.p2sh = zd;
4332
+ Ji.p2sh = Gd;
4333
4333
  var Qi = {}, Vt = {};
4334
4334
  Object.defineProperty(Vt, "__esModule", { value: !0 });
4335
4335
  Vt.bech32m = Vt.bech32 = void 0;
@@ -4373,15 +4373,15 @@ function $o(e, t, r, n) {
4373
4373
  }
4374
4374
  return a;
4375
4375
  }
4376
- function Vd(e) {
4376
+ function qd(e) {
4377
4377
  return $o(e, 8, 5, !0);
4378
4378
  }
4379
- function Gd(e) {
4379
+ function Wd(e) {
4380
4380
  const t = $o(e, 5, 8, !1);
4381
4381
  if (Array.isArray(t))
4382
4382
  return t;
4383
4383
  }
4384
- function qd(e) {
4384
+ function Kd(e) {
4385
4385
  const t = $o(e, 5, 8, !1);
4386
4386
  if (Array.isArray(t))
4387
4387
  return t;
@@ -4457,17 +4457,17 @@ function lf(e) {
4457
4457
  decodeUnsafe: i,
4458
4458
  decode: s,
4459
4459
  encode: r,
4460
- toWords: Vd,
4461
- fromWordsUnsafe: Gd,
4462
- fromWords: qd
4460
+ toWords: qd,
4461
+ fromWordsUnsafe: Wd,
4462
+ fromWords: Kd
4463
4463
  };
4464
4464
  }
4465
4465
  Vt.bech32 = lf("bech32");
4466
4466
  Vt.bech32m = lf("bech32m");
4467
4467
  Object.defineProperty(Qi, "__esModule", { value: !0 });
4468
4468
  Qi.p2wpkh = void 0;
4469
- const Ns = br, Wd = Ge, Bi = nt(), Pe = qe, tr = rt, di = Vt, Na = Bi.OPS, Kd = Buffer.alloc(0);
4470
- function Yd(e, t) {
4469
+ const Ns = br, Yd = Ge, Bi = nt(), Pe = qe, tr = rt, di = Vt, Na = Bi.OPS, Xd = Buffer.alloc(0);
4470
+ function Zd(e, t) {
4471
4471
  if (!e.address && !e.hash && !e.output && !e.pubkey && !e.witness)
4472
4472
  throw new TypeError("Not enough data");
4473
4473
  t = Object.assign({ validate: !0 }, t || {}), (0, Pe.typeforce)(
@@ -4492,7 +4492,7 @@ function Yd(e, t) {
4492
4492
  prefix: s.prefix,
4493
4493
  data: Buffer.from(a)
4494
4494
  };
4495
- }), n = e.network || Wd.bitcoin, i = { name: "p2wpkh", network: n };
4495
+ }), n = e.network || Yd.bitcoin, i = { name: "p2wpkh", network: n };
4496
4496
  if (tr.prop(i, "address", () => {
4497
4497
  if (!i.hash) return;
4498
4498
  const s = di.bech32.toWords(i.hash);
@@ -4513,7 +4513,7 @@ function Yd(e, t) {
4513
4513
  return e.witness[0];
4514
4514
  }), tr.prop(i, "input", () => {
4515
4515
  if (i.witness)
4516
- return Kd;
4516
+ return Xd;
4517
4517
  }), tr.prop(i, "witness", () => {
4518
4518
  if (e.pubkey && e.signature)
4519
4519
  return [e.signature, e.pubkey];
@@ -4564,15 +4564,15 @@ function Yd(e, t) {
4564
4564
  }
4565
4565
  return Object.assign(i, e);
4566
4566
  }
4567
- Qi.p2wpkh = Yd;
4567
+ Qi.p2wpkh = Zd;
4568
4568
  var es = {};
4569
4569
  Object.defineProperty(es, "__esModule", { value: !0 });
4570
4570
  es.p2wsh = void 0;
4571
- const Ha = br, Xd = Ge, Nt = nt(), ye = qe, Rt = rt, hi = Vt, Fa = Nt.OPS, Hs = Buffer.alloc(0);
4571
+ const Ha = br, Jd = Ge, Nt = nt(), ye = qe, Rt = rt, hi = Vt, Fa = Nt.OPS, Hs = Buffer.alloc(0);
4572
4572
  function pi(e) {
4573
4573
  return !!(Buffer.isBuffer(e) && e.length === 65 && e[0] === 4 && (0, ye.isPoint)(e));
4574
4574
  }
4575
- function Zd(e, t) {
4575
+ function Qd(e, t) {
4576
4576
  if (!e.address && !e.hash && !e.output && !e.redeem && !e.witness)
4577
4577
  throw new TypeError("Not enough data");
4578
4578
  t = Object.assign({ validate: !0 }, t || {}), (0, ye.typeforce)(
@@ -4605,7 +4605,7 @@ function Zd(e, t) {
4605
4605
  };
4606
4606
  }), n = Rt.value(() => Nt.decompile(e.redeem.input));
4607
4607
  let i = e.network;
4608
- i || (i = e.redeem && e.redeem.network || Xd.bitcoin);
4608
+ i || (i = e.redeem && e.redeem.network || Jd.bitcoin);
4609
4609
  const s = { network: i };
4610
4610
  if (Rt.prop(s, "address", () => {
4611
4611
  if (!s.hash) return;
@@ -4705,25 +4705,25 @@ function Zd(e, t) {
4705
4705
  }
4706
4706
  return Object.assign(s, e);
4707
4707
  }
4708
- es.p2wsh = Zd;
4708
+ es.p2wsh = Qd;
4709
4709
  var xn = {}, Rr = {};
4710
4710
  Object.defineProperty(Rr, "__esModule", { value: !0 });
4711
4711
  Rr.getEccLib = Rr.initEccLib = void 0;
4712
4712
  const Fn = {};
4713
- function Jd(e) {
4714
- e ? e !== Fn.eccLib && (eh(e), Fn.eccLib = e) : Fn.eccLib = e;
4713
+ function eh(e) {
4714
+ e ? e !== Fn.eccLib && (rh(e), Fn.eccLib = e) : Fn.eccLib = e;
4715
4715
  }
4716
- Rr.initEccLib = Jd;
4717
- function Qd() {
4716
+ Rr.initEccLib = eh;
4717
+ function th() {
4718
4718
  if (!Fn.eccLib)
4719
4719
  throw new Error(
4720
4720
  "No ECC Library provided. You must call initEccLib() with a valid TinySecp256k1Interface instance"
4721
4721
  );
4722
4722
  return Fn.eccLib;
4723
4723
  }
4724
- Rr.getEccLib = Qd;
4724
+ Rr.getEccLib = th;
4725
4725
  const Ct = (e) => Buffer.from(e, "hex");
4726
- function eh(e) {
4726
+ function rh(e) {
4727
4727
  st(typeof e.isXOnlyPoint == "function"), st(
4728
4728
  e.isXOnlyPoint(
4729
4729
  Ct("79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798")
@@ -4748,7 +4748,7 @@ function eh(e) {
4748
4748
  !e.isXOnlyPoint(
4749
4749
  Ct("fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f")
4750
4750
  )
4751
- ), st(typeof e.xOnlyPointAddTweak == "function"), th.forEach((t) => {
4751
+ ), st(typeof e.xOnlyPointAddTweak == "function"), nh.forEach((t) => {
4752
4752
  const r = e.xOnlyPointAddTweak(Ct(t.pubkey), Ct(t.tweak));
4753
4753
  t.result === null ? st(r === null) : (st(r !== null), st(r.parity === t.parity), st(Buffer.from(r.xOnlyPubkey).equals(Ct(t.result))));
4754
4754
  });
@@ -4756,7 +4756,7 @@ function eh(e) {
4756
4756
  function st(e) {
4757
4757
  if (!e) throw new Error("ecc library invalid");
4758
4758
  }
4759
- const th = [
4759
+ const nh = [
4760
4760
  {
4761
4761
  pubkey: "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",
4762
4762
  tweak: "fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364140",
@@ -4855,7 +4855,7 @@ var jo = {};
4855
4855
  }
4856
4856
  })(jo);
4857
4857
  var Ye = {}, Ma;
4858
- function rh() {
4858
+ function ih() {
4859
4859
  if (Ma) return Ye;
4860
4860
  Ma = 1, Object.defineProperty(Ye, "__esModule", { value: !0 }), Ye.toOutputScript = Ye.fromOutputScript = Ye.toBech32 = Ye.toBase58Check = Ye.fromBech32 = Ye.fromBase58Check = void 0;
4861
4861
  const e = Ge, t = zo(), r = nt(), n = qe, i = Vt, s = Do, o = 40, a = 2, f = 16, l = 2, d = 80, p = "WARNING: Sending to a future segwit version address can lead to loss of funds. End users MUST be warned carefully in the GUI and asked if they wish to proceed with caution. Wallets should verify the segwit version from the output of fromBech32, then decide when it is safe to use which version of segwit.";
@@ -4978,10 +4978,10 @@ function rh() {
4978
4978
  return Ye.toOutputScript = k, Ye;
4979
4979
  }
4980
4980
  var Da;
4981
- function nh() {
4981
+ function sh() {
4982
4982
  if (Da) return xn;
4983
4983
  Da = 1, Object.defineProperty(xn, "__esModule", { value: !0 }), xn.p2tr = void 0;
4984
- const e = Wt, t = Ge, r = nt(), n = qe, i = Rr, s = jo, o = rt, a = Vt, f = rh(), l = r.OPS, d = 1, p = 80;
4984
+ const e = Wt, t = Ge, r = nt(), n = qe, i = Rr, s = jo, o = rt, a = Vt, f = ih(), l = r.OPS, d = 1, p = 80;
4985
4985
  function w(y, I) {
4986
4986
  if (!y.address && !y.output && !y.pubkey && !y.internalPubkey && !(y.witness && y.witness.length > 1))
4987
4987
  throw new TypeError("Not enough data");
@@ -5235,7 +5235,7 @@ function zo() {
5235
5235
  return a.p2wsh;
5236
5236
  }
5237
5237
  });
5238
- const f = nh();
5238
+ const f = sh();
5239
5239
  Object.defineProperty(e, "p2tr", {
5240
5240
  enumerable: !0,
5241
5241
  get: function() {
@@ -5246,7 +5246,7 @@ function zo() {
5246
5246
  }
5247
5247
  Object.defineProperty(pe, "__esModule", { value: !0 });
5248
5248
  pe.signatureBlocksAction = pe.checkInputForSig = pe.pubkeyInScript = pe.pubkeyPositionInScript = pe.witnessStackToScriptWitness = pe.isP2TR = pe.isP2SHScript = pe.isP2WSHScript = pe.isP2WPKH = pe.isP2PKH = pe.isP2PK = pe.isP2MS = void 0;
5249
- const ja = Kn, Mn = nt(), yi = qn, ih = br, Lr = zo();
5249
+ const ja = Kn, Mn = nt(), yi = qn, oh = br, Lr = zo();
5250
5250
  function Nr(e) {
5251
5251
  return (t) => {
5252
5252
  try {
@@ -5263,7 +5263,7 @@ pe.isP2WPKH = Nr(Lr.p2wpkh);
5263
5263
  pe.isP2WSHScript = Nr(Lr.p2wsh);
5264
5264
  pe.isP2SHScript = Nr(Lr.p2sh);
5265
5265
  pe.isP2TR = Nr(Lr.p2tr);
5266
- function sh(e) {
5266
+ function ah(e) {
5267
5267
  let t = Buffer.allocUnsafe(0);
5268
5268
  function r(o) {
5269
5269
  t = Buffer.concat([t, Buffer.from(o)]);
@@ -5280,23 +5280,23 @@ function sh(e) {
5280
5280
  }
5281
5281
  return s(e), t;
5282
5282
  }
5283
- pe.witnessStackToScriptWitness = sh;
5283
+ pe.witnessStackToScriptWitness = ah;
5284
5284
  function df(e, t) {
5285
- const r = (0, ih.hash160)(e), n = e.slice(1, 33), i = Mn.decompile(t);
5285
+ const r = (0, oh.hash160)(e), n = e.slice(1, 33), i = Mn.decompile(t);
5286
5286
  if (i === null) throw new Error("Unknown script error");
5287
5287
  return i.findIndex((s) => typeof s == "number" ? !1 : s.equals(e) || s.equals(r) || s.equals(n));
5288
5288
  }
5289
5289
  pe.pubkeyPositionInScript = df;
5290
- function oh(e, t) {
5290
+ function ch(e, t) {
5291
5291
  return df(e, t) !== -1;
5292
5292
  }
5293
- pe.pubkeyInScript = oh;
5294
- function ah(e, t) {
5295
- return ch(e).some(
5293
+ pe.pubkeyInScript = ch;
5294
+ function fh(e, t) {
5295
+ return uh(e).some(
5296
5296
  (n) => hf(n, Mn.signature.decode, t)
5297
5297
  );
5298
5298
  }
5299
- pe.checkInputForSig = ah;
5299
+ pe.checkInputForSig = fh;
5300
5300
  function hf(e, t, r) {
5301
5301
  const { hashType: n } = t(e), i = [];
5302
5302
  switch (n & yi.Transaction.SIGHASH_ANYONECANPAY && i.push("addInput"), n & 31) {
@@ -5310,31 +5310,31 @@ function hf(e, t, r) {
5310
5310
  return i.indexOf(r) === -1;
5311
5311
  }
5312
5312
  pe.signatureBlocksAction = hf;
5313
- function ch(e) {
5313
+ function uh(e) {
5314
5314
  let t = [];
5315
5315
  if ((e.partialSig || []).length === 0) {
5316
5316
  if (!e.finalScriptSig && !e.finalScriptWitness) return [];
5317
- t = fh(e);
5317
+ t = lh(e);
5318
5318
  } else
5319
5319
  t = e.partialSig;
5320
5320
  return t.map((r) => r.signature);
5321
5321
  }
5322
- function fh(e) {
5322
+ function lh(e) {
5323
5323
  const t = e.finalScriptSig ? Mn.decompile(e.finalScriptSig) || [] : [], r = e.finalScriptWitness ? Mn.decompile(e.finalScriptWitness) || [] : [];
5324
5324
  return t.concat(r).filter((n) => Buffer.isBuffer(n) && Mn.isCanonicalScriptSignature(n)).map((n) => ({ signature: n }));
5325
5325
  }
5326
5326
  Object.defineProperty(Se, "__esModule", { value: !0 });
5327
5327
  Se.checkTaprootInputForSigs = Se.tapTreeFromList = Se.tapTreeToList = Se.tweakInternalPubKey = Se.checkTaprootOutputFields = Se.checkTaprootInputFields = Se.isTaprootOutput = Se.isTaprootInput = Ii = Se.serializeTaprootSignature = Se.tapScriptFinalizer = Se.toXOnly = void 0;
5328
- const Vo = qe, uh = qn, ts = pe, pr = jo, lh = zo(), dh = pe, hh = (e) => e.length === 32 ? e : e.slice(1, 33);
5329
- Se.toXOnly = hh;
5330
- function ph(e, t, r) {
5331
- const n = Rh(
5328
+ const Vo = qe, dh = qn, ts = pe, pr = jo, hh = zo(), ph = pe, yh = (e) => e.length === 32 ? e : e.slice(1, 33);
5329
+ Se.toXOnly = yh;
5330
+ function mh(e, t, r) {
5331
+ const n = Uh(
5332
5332
  t,
5333
5333
  e,
5334
5334
  r
5335
5335
  );
5336
5336
  try {
5337
- const s = Ph(t, n).concat(n.script).concat(n.controlBlock);
5337
+ const s = Rh(t, n).concat(n.script).concat(n.controlBlock);
5338
5338
  return {
5339
5339
  finalScriptWitness: (0, ts.witnessStackToScriptWitness)(s)
5340
5340
  };
@@ -5342,12 +5342,12 @@ function ph(e, t, r) {
5342
5342
  throw new Error(`Can not finalize taproot input #${e}: ${i}`);
5343
5343
  }
5344
5344
  }
5345
- Se.tapScriptFinalizer = ph;
5346
- function yh(e, t) {
5345
+ Se.tapScriptFinalizer = mh;
5346
+ function bh(e, t) {
5347
5347
  const r = t ? Buffer.from([t]) : Buffer.from([]);
5348
5348
  return Buffer.concat([e, r]);
5349
5349
  }
5350
- var Ii = Se.serializeTaprootSignature = yh;
5350
+ var Ii = Se.serializeTaprootSignature = bh;
5351
5351
  function Ti(e) {
5352
5352
  return e && !!(e.tapInternalKey || e.tapMerkleRoot || e.tapLeafScript && e.tapLeafScript.length || e.tapBip32Derivation && e.tapBip32Derivation.length || e.witnessUtxo && (0, ts.isP2TR)(e.witnessUtxo.script));
5353
5353
  }
@@ -5356,31 +5356,31 @@ function ki(e, t) {
5356
5356
  return e && !!(e.tapInternalKey || e.tapTree || e.tapBip32Derivation && e.tapBip32Derivation.length || t && (0, ts.isP2TR)(t));
5357
5357
  }
5358
5358
  Se.isTaprootOutput = ki;
5359
- function mh(e, t, r) {
5360
- Ih(e, t, r), kh(e, t, r);
5359
+ function gh(e, t, r) {
5360
+ kh(e, t, r), Oh(e, t, r);
5361
5361
  }
5362
- Se.checkTaprootInputFields = mh;
5363
- function bh(e, t, r) {
5364
- Th(e, t, r), gh(e, t);
5362
+ Se.checkTaprootInputFields = gh;
5363
+ function wh(e, t, r) {
5364
+ Ph(e, t, r), _h(e, t);
5365
5365
  }
5366
- Se.checkTaprootOutputFields = bh;
5367
- function gh(e, t) {
5366
+ Se.checkTaprootOutputFields = wh;
5367
+ function _h(e, t) {
5368
5368
  if (!t.tapTree && !t.tapInternalKey) return;
5369
5369
  const r = t.tapInternalKey || e.tapInternalKey, n = t.tapTree || e.tapTree;
5370
5370
  if (r) {
5371
- const { script: i } = e, s = wh(r, n);
5371
+ const { script: i } = e, s = vh(r, n);
5372
5372
  if (i && !i.equals(s))
5373
5373
  throw new Error("Error adding output. Script or address missmatch.");
5374
5374
  }
5375
5375
  }
5376
- function wh(e, t) {
5377
- const r = t && pf(t.leaves), { output: n } = (0, lh.p2tr)({
5376
+ function vh(e, t) {
5377
+ const r = t && pf(t.leaves), { output: n } = (0, hh.p2tr)({
5378
5378
  internalPubkey: e,
5379
5379
  scriptTree: r
5380
5380
  });
5381
5381
  return n;
5382
5382
  }
5383
- function _h(e, t) {
5383
+ function Eh(e, t) {
5384
5384
  const r = t.tapInternalKey, n = r && (0, pr.tweakKey)(r, t.tapMerkleRoot);
5385
5385
  if (!n)
5386
5386
  throw new Error(
@@ -5388,43 +5388,43 @@ function _h(e, t) {
5388
5388
  );
5389
5389
  return n.x;
5390
5390
  }
5391
- Se.tweakInternalPubKey = _h;
5392
- function vh(e) {
5391
+ Se.tweakInternalPubKey = Eh;
5392
+ function xh(e) {
5393
5393
  if (!(0, Vo.isTaptree)(e))
5394
5394
  throw new Error(
5395
5395
  "Cannot convert taptree to tapleaf list. Expecting a tapree structure."
5396
5396
  );
5397
5397
  return lo(e);
5398
5398
  }
5399
- Se.tapTreeToList = vh;
5399
+ Se.tapTreeToList = xh;
5400
5400
  function pf(e = []) {
5401
5401
  return e.length === 1 && e[0].depth === 0 ? {
5402
5402
  output: e[0].script,
5403
5403
  version: e[0].leafVersion
5404
- } : Bh(e);
5404
+ } : Th(e);
5405
5405
  }
5406
5406
  Se.tapTreeFromList = pf;
5407
- function Eh(e, t) {
5408
- return Sh(e).some(
5409
- (n) => (0, dh.signatureBlocksAction)(n, xh, t)
5407
+ function Sh(e, t) {
5408
+ return Bh(e).some(
5409
+ (n) => (0, ph.signatureBlocksAction)(n, Ah, t)
5410
5410
  );
5411
5411
  }
5412
- Se.checkTaprootInputForSigs = Eh;
5413
- function xh(e) {
5412
+ Se.checkTaprootInputForSigs = Sh;
5413
+ function Ah(e) {
5414
5414
  return {
5415
5415
  signature: e.slice(0, 64),
5416
- hashType: e.slice(64)[0] || uh.Transaction.SIGHASH_DEFAULT
5416
+ hashType: e.slice(64)[0] || dh.Transaction.SIGHASH_DEFAULT
5417
5417
  };
5418
5418
  }
5419
- function Sh(e) {
5419
+ function Bh(e) {
5420
5420
  const t = [];
5421
5421
  if (e.tapKeySig && t.push(e.tapKeySig), e.tapScriptSig && t.push(...e.tapScriptSig.map((r) => r.signature)), !t.length) {
5422
- const r = Ah(e.finalScriptWitness);
5422
+ const r = Ih(e.finalScriptWitness);
5423
5423
  r && t.push(r);
5424
5424
  }
5425
5425
  return t;
5426
5426
  }
5427
- function Ah(e) {
5427
+ function Ih(e) {
5428
5428
  if (!e) return;
5429
5429
  const t = e.slice(2);
5430
5430
  if (t.length === 64 || t.length === 65) return t;
@@ -5438,7 +5438,7 @@ function lo(e, t = [], r = 0) {
5438
5438
  script: e.output
5439
5439
  }), t) : (e[0] && lo(e[0], t, r + 1), e[1] && lo(e[1], t, r + 1), t) : [];
5440
5440
  }
5441
- function Bh(e) {
5441
+ function Th(e) {
5442
5442
  let t;
5443
5443
  for (const r of e)
5444
5444
  if (t = ho(r, t), !t) throw new Error("No room left to insert tapleaf in tree");
@@ -5458,21 +5458,21 @@ function ho(e, t, r = 0) {
5458
5458
  const i = ho(e, t && t[1], r + 1);
5459
5459
  if (i) return [t && t[0], i];
5460
5460
  }
5461
- function Ih(e, t, r) {
5461
+ function kh(e, t, r) {
5462
5462
  const n = Ti(e) && en(t), i = en(e) && Ti(t), s = e === t && Ti(t) && en(t);
5463
5463
  if (n || i || s)
5464
5464
  throw new Error(
5465
5465
  `Invalid arguments for Psbt.${r}. Cannot use both taproot and non-taproot fields.`
5466
5466
  );
5467
5467
  }
5468
- function Th(e, t, r) {
5468
+ function Ph(e, t, r) {
5469
5469
  const n = ki(e) && en(t), i = en(e) && ki(t), s = e === t && ki(t) && en(t);
5470
5470
  if (n || i || s)
5471
5471
  throw new Error(
5472
5472
  `Invalid arguments for Psbt.${r}. Cannot use both taproot and non-taproot fields.`
5473
5473
  );
5474
5474
  }
5475
- function kh(e, t, r) {
5475
+ function Oh(e, t, r) {
5476
5476
  if (t.tapMerkleRoot) {
5477
5477
  const n = (t.tapLeafScript || []).every(
5478
5478
  (s) => Fs(s, t.tapMerkleRoot)
@@ -5501,14 +5501,14 @@ function Fs(e, t) {
5501
5501
  r
5502
5502
  ).equals(t);
5503
5503
  }
5504
- function Ph(e, t) {
5504
+ function Rh(e, t) {
5505
5505
  const r = (0, pr.tapleafHash)({
5506
5506
  output: t.script,
5507
5507
  version: t.leafVersion
5508
5508
  });
5509
- return (e.tapScriptSig || []).filter((n) => n.leafHash.equals(r)).map((n) => Oh(t.script, n)).sort((n, i) => i.positionInScript - n.positionInScript).map((n) => n.signature);
5509
+ return (e.tapScriptSig || []).filter((n) => n.leafHash.equals(r)).map((n) => Ch(t.script, n)).sort((n, i) => i.positionInScript - n.positionInScript).map((n) => n.signature);
5510
5510
  }
5511
- function Oh(e, t) {
5511
+ function Ch(e, t) {
5512
5512
  return Object.assign(
5513
5513
  {
5514
5514
  positionInScript: (0, ts.pubkeyPositionInScript)(
@@ -5519,13 +5519,13 @@ function Oh(e, t) {
5519
5519
  t
5520
5520
  );
5521
5521
  }
5522
- function Rh(e, t, r) {
5522
+ function Uh(e, t, r) {
5523
5523
  if (!e.tapScriptSig || !e.tapScriptSig.length)
5524
5524
  throw new Error(
5525
5525
  `Can not finalize taproot input #${t}. No tapleaf script signature provided.`
5526
5526
  );
5527
5527
  const n = (e.tapLeafScript || []).sort((i, s) => i.controlBlock.length - s.controlBlock.length).find(
5528
- (i) => Ch(i, e.tapScriptSig, r)
5528
+ (i) => Lh(i, e.tapScriptSig, r)
5529
5529
  );
5530
5530
  if (!n)
5531
5531
  throw new Error(
@@ -5533,7 +5533,7 @@ function Rh(e, t, r) {
5533
5533
  );
5534
5534
  return n;
5535
5535
  }
5536
- function Ch(e, t, r) {
5536
+ function Lh(e, t, r) {
5537
5537
  const n = (0, pr.tapleafHash)({
5538
5538
  output: e.script,
5539
5539
  version: e.leafVersion
@@ -5563,7 +5563,7 @@ class Dn {
5563
5563
  * Note: redeemerAddress and initiatorAddress should be x-only public key without 02 or 03 prefix
5564
5564
  */
5565
5565
  constructor(t, r, n, i, s, o, a, f) {
5566
- this.secretHash = n, this.redeemerPubkey = i, this.initiatorPubkey = s, this.expiry = o, this.signer = t, this.network = a, this.internalPubkey = kl(), this.initiateAmount = r, this.utxoHashes = f;
5566
+ this.secretHash = n, this.redeemerPubkey = i, this.initiatorPubkey = s, this.expiry = o, this.signer = t, this.network = a, this.internalPubkey = Ol(), this.initiateAmount = r, this.utxoHashes = f;
5567
5567
  }
5568
5568
  /**
5569
5569
  * Creates a GardenHTLC instance
@@ -5992,7 +5992,7 @@ class Dn {
5992
5992
  */
5993
5993
  leafHash(t) {
5994
5994
  let r = this.redeemLeaf();
5995
- return t === 0 && (r = this.refundLeaf()), t === 2 && (r = this.instantRefundLeaf()), le.crypto.taggedHash("TapLeaf", wl(r));
5995
+ return t === 0 && (r = this.refundLeaf()), t === 2 && (r = this.instantRefundLeaf()), le.crypto.taggedHash("TapLeaf", vl(r));
5996
5996
  }
5997
5997
  refundLeaf() {
5998
5998
  return le.script.fromASM(
@@ -6063,7 +6063,7 @@ class Dn {
6063
6063
  );
6064
6064
  switch (t) {
6065
6065
  case 1: {
6066
- const s = vl(
6066
+ const s = xl(
6067
6067
  i,
6068
6068
  n
6069
6069
  );
@@ -6089,7 +6089,7 @@ function Gr(e, t) {
6089
6089
  r.push(e);
6090
6090
  return r;
6091
6091
  }
6092
- class Uh {
6092
+ class Nh {
6093
6093
  constructor() {
6094
6094
  this.cache = {};
6095
6095
  }
@@ -6108,7 +6108,7 @@ class Uh {
6108
6108
  delete this.cache[`${r}_${t.create_order.create_id}`];
6109
6109
  }
6110
6110
  }
6111
- class Lh {
6111
+ class Hh {
6112
6112
  constructor() {
6113
6113
  this.cache = {};
6114
6114
  }
@@ -6119,7 +6119,7 @@ class Lh {
6119
6119
  return this.cache[t] || null;
6120
6120
  }
6121
6121
  }
6122
- class Nh {
6122
+ class Fh {
6123
6123
  constructor(t, r) {
6124
6124
  this.url = new cr("/blocknumber/" + r, t);
6125
6125
  }
@@ -6155,7 +6155,7 @@ const Sn = {
6155
6155
  strkRelay: ""
6156
6156
  }
6157
6157
  };
6158
- class Hh {
6158
+ class Mh {
6159
6159
  constructor(t) {
6160
6160
  this.quoteUrl = new cr("/quote", t);
6161
6161
  }
@@ -6197,7 +6197,7 @@ class Hh {
6197
6197
  return G("GetStrategies: Unexpected error, result is undefined");
6198
6198
  const r = {};
6199
6199
  for (const n of Object.values(t.result)) {
6200
- const i = xl(
6200
+ const i = Al(
6201
6201
  n.source_chain,
6202
6202
  n.source_asset.asset,
6203
6203
  n.dest_chain,
@@ -6290,16 +6290,16 @@ var po = { exports: {} }, yo = { exports: {} };
6290
6290
  return r.SlowBuffer(o);
6291
6291
  };
6292
6292
  })(yo, yo.exports);
6293
- var Je = yo.exports, Ms = 65536, Fh = 4294967295;
6294
- function Mh() {
6293
+ var Je = yo.exports, Ms = 65536, Dh = 4294967295;
6294
+ function $h() {
6295
6295
  throw new Error(`Secure random number generation is not supported by this browser.
6296
6296
  Use Chrome, Firefox or Internet Explorer 11`);
6297
6297
  }
6298
- var Dh = Je.Buffer, Ni = hr.crypto || hr.msCrypto;
6299
- Ni && Ni.getRandomValues ? po.exports = $h : po.exports = Mh;
6300
- function $h(e, t) {
6301
- if (e > Fh) throw new RangeError("requested too many random bytes");
6302
- var r = Dh.allocUnsafe(e);
6298
+ var jh = Je.Buffer, Ni = hr.crypto || hr.msCrypto;
6299
+ Ni && Ni.getRandomValues ? po.exports = zh : po.exports = $h;
6300
+ function zh(e, t) {
6301
+ if (e > Dh) throw new RangeError("requested too many random bytes");
6302
+ var r = jh.allocUnsafe(e);
6303
6303
  if (e > 0)
6304
6304
  if (e > Ms)
6305
6305
  for (var n = 0; n < e; n += Ms)
@@ -6310,7 +6310,7 @@ function $h(e, t) {
6310
6310
  t(null, r);
6311
6311
  }) : r;
6312
6312
  }
6313
- var jh = po.exports, mo = { exports: {} };
6313
+ var Vh = po.exports, mo = { exports: {} };
6314
6314
  typeof Object.create == "function" ? mo.exports = function(t, r) {
6315
6315
  r && (t.super_ = r, t.prototype = Object.create(r.prototype, {
6316
6316
  constructor: {
@@ -6336,7 +6336,7 @@ tn && typeof tn.ownKeys == "function" ? Pi = tn.ownKeys : Object.getOwnPropertyS
6336
6336
  } : Pi = function(t) {
6337
6337
  return Object.getOwnPropertyNames(t);
6338
6338
  };
6339
- function zh(e) {
6339
+ function Gh(e) {
6340
6340
  console && console.warn && console.warn(e);
6341
6341
  }
6342
6342
  var bf = Number.isNaN || function(t) {
@@ -6346,7 +6346,7 @@ function de() {
6346
6346
  de.init.call(this);
6347
6347
  }
6348
6348
  Go.exports = de;
6349
- Go.exports.once = Wh;
6349
+ Go.exports.once = Yh;
6350
6350
  de.EventEmitter = de;
6351
6351
  de.prototype._events = void 0;
6352
6352
  de.prototype._eventsCount = 0;
@@ -6416,7 +6416,7 @@ function wf(e, t, r, n) {
6416
6416
  else if (typeof o == "function" ? o = s[t] = n ? [r, o] : [o, r] : n ? o.unshift(r) : o.push(r), i = gf(e), i > 0 && o.length > i && !o.warned) {
6417
6417
  o.warned = !0;
6418
6418
  var a = new Error("Possible EventEmitter memory leak detected. " + o.length + " " + String(t) + " listeners added. Use emitter.setMaxListeners() to increase limit");
6419
- a.name = "MaxListenersExceededWarning", a.emitter = e, a.type = t, a.count = o.length, zh(a);
6419
+ a.name = "MaxListenersExceededWarning", a.emitter = e, a.type = t, a.count = o.length, Gh(a);
6420
6420
  }
6421
6421
  return e;
6422
6422
  }
@@ -6427,12 +6427,12 @@ de.prototype.on = de.prototype.addListener;
6427
6427
  de.prototype.prependListener = function(t, r) {
6428
6428
  return wf(this, t, r, !0);
6429
6429
  };
6430
- function Vh() {
6430
+ function qh() {
6431
6431
  if (!this.fired)
6432
6432
  return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
6433
6433
  }
6434
6434
  function _f(e, t, r) {
6435
- var n = { fired: !1, wrapFn: void 0, target: e, type: t, listener: r }, i = Vh.bind(n);
6435
+ var n = { fired: !1, wrapFn: void 0, target: e, type: t, listener: r }, i = qh.bind(n);
6436
6436
  return i.listener = r, n.wrapFn = i, i;
6437
6437
  }
6438
6438
  de.prototype.once = function(t, r) {
@@ -6457,7 +6457,7 @@ de.prototype.removeListener = function(t, r) {
6457
6457
  }
6458
6458
  if (s < 0)
6459
6459
  return this;
6460
- s === 0 ? n.shift() : Gh(n, s), n.length === 1 && (i[t] = n[0]), i.removeListener !== void 0 && this.emit("removeListener", t, a || r);
6460
+ s === 0 ? n.shift() : Wh(n, s), n.length === 1 && (i[t] = n[0]), i.removeListener !== void 0 && this.emit("removeListener", t, a || r);
6461
6461
  }
6462
6462
  return this;
6463
6463
  };
@@ -6486,7 +6486,7 @@ function vf(e, t, r) {
6486
6486
  if (n === void 0)
6487
6487
  return [];
6488
6488
  var i = n[t];
6489
- return i === void 0 ? [] : typeof i == "function" ? r ? [i.listener || i] : [i] : r ? qh(i) : xf(i, i.length);
6489
+ return i === void 0 ? [] : typeof i == "function" ? r ? [i.listener || i] : [i] : r ? Kh(i) : xf(i, i.length);
6490
6490
  }
6491
6491
  de.prototype.listeners = function(t) {
6492
6492
  return vf(this, t, !0);
@@ -6517,17 +6517,17 @@ function xf(e, t) {
6517
6517
  r[n] = e[n];
6518
6518
  return r;
6519
6519
  }
6520
- function Gh(e, t) {
6520
+ function Wh(e, t) {
6521
6521
  for (; t + 1 < e.length; t++)
6522
6522
  e[t] = e[t + 1];
6523
6523
  e.pop();
6524
6524
  }
6525
- function qh(e) {
6525
+ function Kh(e) {
6526
6526
  for (var t = new Array(e.length), r = 0; r < t.length; ++r)
6527
6527
  t[r] = e[r].listener || e[r];
6528
6528
  return t;
6529
6529
  }
6530
- function Wh(e, t) {
6530
+ function Yh(e, t) {
6531
6531
  return new Promise(function(r, n) {
6532
6532
  function i(o) {
6533
6533
  e.removeListener(t, s), n(o);
@@ -6535,10 +6535,10 @@ function Wh(e, t) {
6535
6535
  function s() {
6536
6536
  typeof e.removeListener == "function" && e.removeListener("error", i), r([].slice.call(arguments));
6537
6537
  }
6538
- Sf(e, t, s, { once: !0 }), t !== "error" && Kh(e, i, { once: !0 });
6538
+ Sf(e, t, s, { once: !0 }), t !== "error" && Xh(e, i, { once: !0 });
6539
6539
  });
6540
6540
  }
6541
- function Kh(e, t, r) {
6541
+ function Xh(e, t, r) {
6542
6542
  typeof e.on == "function" && Sf(e, "error", t, r);
6543
6543
  }
6544
6544
  function Sf(e, t, r, n) {
@@ -6552,12 +6552,12 @@ function Sf(e, t, r, n) {
6552
6552
  throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof e);
6553
6553
  }
6554
6554
  var Af = Go.exports, Bf = Af.EventEmitter;
6555
- const Yh = {}, Xh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6555
+ const Zh = {}, Jh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6556
6556
  __proto__: null,
6557
- default: Yh
6558
- }, Symbol.toStringTag, { value: "Module" })), qo = /* @__PURE__ */ Ol(Xh);
6557
+ default: Zh
6558
+ }, Symbol.toStringTag, { value: "Module" })), qo = /* @__PURE__ */ Cl(Jh);
6559
6559
  var Ds, Ga;
6560
- function Zh() {
6560
+ function Qh() {
6561
6561
  if (Ga) return Ds;
6562
6562
  Ga = 1;
6563
6563
  function e(I, S) {
@@ -6721,7 +6721,7 @@ function Zh() {
6721
6721
  }]), I;
6722
6722
  }(), Ds;
6723
6723
  }
6724
- function Jh(e, t) {
6724
+ function e0(e, t) {
6725
6725
  var r = this, n = this._readableState && this._readableState.destroyed, i = this._writableState && this._writableState.destroyed;
6726
6726
  return n || i ? (t ? t(e) : e && (this._writableState ? this._writableState.errorEmitted || (this._writableState.errorEmitted = !0, process.nextTick(go, this, e)) : process.nextTick(go, this, e)), this) : (this._readableState && (this._readableState.destroyed = !0), this._writableState && (this._writableState.destroyed = !0), this._destroy(e || null, function(s) {
6727
6727
  !t && s ? r._writableState ? r._writableState.errorEmitted ? process.nextTick(Oi, r) : (r._writableState.errorEmitted = !0, process.nextTick(qa, r, s)) : process.nextTick(qa, r, s) : t ? (process.nextTick(Oi, r), t(s)) : process.nextTick(Oi, r);
@@ -6733,22 +6733,22 @@ function qa(e, t) {
6733
6733
  function Oi(e) {
6734
6734
  e._writableState && !e._writableState.emitClose || e._readableState && !e._readableState.emitClose || e.emit("close");
6735
6735
  }
6736
- function Qh() {
6736
+ function t0() {
6737
6737
  this._readableState && (this._readableState.destroyed = !1, this._readableState.reading = !1, this._readableState.ended = !1, this._readableState.endEmitted = !1), this._writableState && (this._writableState.destroyed = !1, this._writableState.ended = !1, this._writableState.ending = !1, this._writableState.finalCalled = !1, this._writableState.prefinished = !1, this._writableState.finished = !1, this._writableState.errorEmitted = !1);
6738
6738
  }
6739
6739
  function go(e, t) {
6740
6740
  e.emit("error", t);
6741
6741
  }
6742
- function e0(e, t) {
6742
+ function r0(e, t) {
6743
6743
  var r = e._readableState, n = e._writableState;
6744
6744
  r && r.autoDestroy || n && n.autoDestroy ? e.destroy(t) : e.emit("error", t);
6745
6745
  }
6746
6746
  var If = {
6747
- destroy: Jh,
6748
- undestroy: Qh,
6749
- errorOrDestroy: e0
6747
+ destroy: e0,
6748
+ undestroy: t0,
6749
+ errorOrDestroy: r0
6750
6750
  }, Hr = {};
6751
- function t0(e, t) {
6751
+ function n0(e, t) {
6752
6752
  e.prototype = Object.create(t.prototype), e.prototype.constructor = e, e.__proto__ = t;
6753
6753
  }
6754
6754
  var Tf = {};
@@ -6758,7 +6758,7 @@ function lt(e, t, r) {
6758
6758
  return typeof t == "string" ? t : t(s, o, a);
6759
6759
  }
6760
6760
  var i = /* @__PURE__ */ function(s) {
6761
- t0(o, s);
6761
+ n0(o, s);
6762
6762
  function o(a, f, l) {
6763
6763
  return s.call(this, n(a, f, l)) || this;
6764
6764
  }
@@ -6775,13 +6775,13 @@ function Wa(e, t) {
6775
6775
  } else
6776
6776
  return "of ".concat(t, " ").concat(String(e));
6777
6777
  }
6778
- function r0(e, t, r) {
6778
+ function i0(e, t, r) {
6779
6779
  return e.substr(0, t.length) === t;
6780
6780
  }
6781
- function n0(e, t, r) {
6781
+ function s0(e, t, r) {
6782
6782
  return (r === void 0 || r > e.length) && (r = e.length), e.substring(r - t.length, r) === t;
6783
6783
  }
6784
- function i0(e, t, r) {
6784
+ function o0(e, t, r) {
6785
6785
  return typeof r != "number" && (r = 0), r + t.length > e.length ? !1 : e.indexOf(t, r) !== -1;
6786
6786
  }
6787
6787
  lt("ERR_INVALID_OPT_VALUE", function(e, t) {
@@ -6789,12 +6789,12 @@ lt("ERR_INVALID_OPT_VALUE", function(e, t) {
6789
6789
  }, TypeError);
6790
6790
  lt("ERR_INVALID_ARG_TYPE", function(e, t, r) {
6791
6791
  var n;
6792
- typeof t == "string" && r0(t, "not ") ? (n = "must not be", t = t.replace(/^not /, "")) : n = "must be";
6792
+ typeof t == "string" && i0(t, "not ") ? (n = "must not be", t = t.replace(/^not /, "")) : n = "must be";
6793
6793
  var i;
6794
- if (n0(e, " argument"))
6794
+ if (s0(e, " argument"))
6795
6795
  i = "The ".concat(e, " ").concat(n, " ").concat(Wa(t, "type"));
6796
6796
  else {
6797
- var s = i0(e, ".") ? "property" : "argument";
6797
+ var s = o0(e, ".") ? "property" : "argument";
6798
6798
  i = 'The "'.concat(e, '" ').concat(s, " ").concat(n, " ").concat(Wa(t, "type"));
6799
6799
  }
6800
6800
  return i += ". Received type ".concat(typeof r), i;
@@ -6816,25 +6816,25 @@ lt("ERR_UNKNOWN_ENCODING", function(e) {
6816
6816
  }, TypeError);
6817
6817
  lt("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event");
6818
6818
  Hr.codes = Tf;
6819
- var s0 = Hr.codes.ERR_INVALID_OPT_VALUE;
6820
- function o0(e, t, r) {
6819
+ var a0 = Hr.codes.ERR_INVALID_OPT_VALUE;
6820
+ function c0(e, t, r) {
6821
6821
  return e.highWaterMark != null ? e.highWaterMark : t ? e[r] : null;
6822
6822
  }
6823
- function a0(e, t, r, n) {
6824
- var i = o0(t, n, r);
6823
+ function f0(e, t, r, n) {
6824
+ var i = c0(t, n, r);
6825
6825
  if (i != null) {
6826
6826
  if (!(isFinite(i) && Math.floor(i) === i) || i < 0) {
6827
6827
  var s = n ? r : "highWaterMark";
6828
- throw new s0(s, i);
6828
+ throw new a0(s, i);
6829
6829
  }
6830
6830
  return Math.floor(i);
6831
6831
  }
6832
6832
  return e.objectMode ? 16 : 16 * 1024;
6833
6833
  }
6834
6834
  var kf = {
6835
- getHighWaterMark: a0
6836
- }, c0 = f0;
6837
- function f0(e, t) {
6835
+ getHighWaterMark: f0
6836
+ }, u0 = l0;
6837
+ function l0(e, t) {
6838
6838
  if ($s("noDeprecation"))
6839
6839
  return e;
6840
6840
  var r = !1;
@@ -6870,7 +6870,7 @@ function Pf() {
6870
6870
  var t;
6871
6871
  M.WritableState = x;
6872
6872
  var r = {
6873
- deprecate: c0
6873
+ deprecate: u0
6874
6874
  }, n = Bf, i = Wt.Buffer, s = (typeof hr < "u" ? hr : typeof window < "u" ? window : typeof self < "u" ? self : {}).Uint8Array || function() {
6875
6875
  };
6876
6876
  function o(O) {
@@ -7166,7 +7166,7 @@ var Hi = {}, Wo = Je.Buffer, Xa = Wo.isEncoding || function(e) {
7166
7166
  return !1;
7167
7167
  }
7168
7168
  };
7169
- function u0(e) {
7169
+ function d0(e) {
7170
7170
  if (!e) return "utf8";
7171
7171
  for (var t; ; )
7172
7172
  switch (e) {
@@ -7190,27 +7190,27 @@ function u0(e) {
7190
7190
  e = ("" + e).toLowerCase(), t = !0;
7191
7191
  }
7192
7192
  }
7193
- function l0(e) {
7194
- var t = u0(e);
7193
+ function h0(e) {
7194
+ var t = d0(e);
7195
7195
  if (typeof t != "string" && (Wo.isEncoding === Xa || !Xa(e))) throw new Error("Unknown encoding: " + e);
7196
7196
  return t || e;
7197
7197
  }
7198
7198
  Hi.StringDecoder = Yn;
7199
7199
  function Yn(e) {
7200
- this.encoding = l0(e);
7200
+ this.encoding = h0(e);
7201
7201
  var t;
7202
7202
  switch (this.encoding) {
7203
7203
  case "utf16le":
7204
- this.text = b0, this.end = g0, t = 4;
7204
+ this.text = w0, this.end = _0, t = 4;
7205
7205
  break;
7206
7206
  case "utf8":
7207
- this.fillLast = p0, t = 4;
7207
+ this.fillLast = m0, t = 4;
7208
7208
  break;
7209
7209
  case "base64":
7210
- this.text = w0, this.end = _0, t = 3;
7210
+ this.text = v0, this.end = E0, t = 3;
7211
7211
  break;
7212
7212
  default:
7213
- this.write = v0, this.end = E0;
7213
+ this.write = x0, this.end = S0;
7214
7214
  return;
7215
7215
  }
7216
7216
  this.lastNeed = 0, this.lastTotal = 0, this.lastChar = Wo.allocUnsafe(t);
@@ -7225,8 +7225,8 @@ Yn.prototype.write = function(e) {
7225
7225
  r = 0;
7226
7226
  return r < e.length ? t ? t + this.text(e, r) : this.text(e, r) : t || "";
7227
7227
  };
7228
- Yn.prototype.end = m0;
7229
- Yn.prototype.text = y0;
7228
+ Yn.prototype.end = g0;
7229
+ Yn.prototype.text = b0;
7230
7230
  Yn.prototype.fillLast = function(e) {
7231
7231
  if (this.lastNeed <= e.length)
7232
7232
  return e.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal);
@@ -7235,13 +7235,13 @@ Yn.prototype.fillLast = function(e) {
7235
7235
  function Vs(e) {
7236
7236
  return e <= 127 ? 0 : e >> 5 === 6 ? 2 : e >> 4 === 14 ? 3 : e >> 3 === 30 ? 4 : e >> 6 === 2 ? -1 : -2;
7237
7237
  }
7238
- function d0(e, t, r) {
7238
+ function p0(e, t, r) {
7239
7239
  var n = t.length - 1;
7240
7240
  if (n < r) return 0;
7241
7241
  var i = Vs(t[n]);
7242
7242
  return i >= 0 ? (i > 0 && (e.lastNeed = i - 1), i) : --n < r || i === -2 ? 0 : (i = Vs(t[n]), i >= 0 ? (i > 0 && (e.lastNeed = i - 2), i) : --n < r || i === -2 ? 0 : (i = Vs(t[n]), i >= 0 ? (i > 0 && (i === 2 ? i = 0 : e.lastNeed = i - 3), i) : 0));
7243
7243
  }
7244
- function h0(e, t, r) {
7244
+ function y0(e, t, r) {
7245
7245
  if ((t[0] & 192) !== 128)
7246
7246
  return e.lastNeed = 0, "�";
7247
7247
  if (e.lastNeed > 1 && t.length > 1) {
@@ -7251,25 +7251,25 @@ function h0(e, t, r) {
7251
7251
  return e.lastNeed = 2, "�";
7252
7252
  }
7253
7253
  }
7254
- function p0(e) {
7255
- var t = this.lastTotal - this.lastNeed, r = h0(this, e);
7254
+ function m0(e) {
7255
+ var t = this.lastTotal - this.lastNeed, r = y0(this, e);
7256
7256
  if (r !== void 0) return r;
7257
7257
  if (this.lastNeed <= e.length)
7258
7258
  return e.copy(this.lastChar, t, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal);
7259
7259
  e.copy(this.lastChar, t, 0, e.length), this.lastNeed -= e.length;
7260
7260
  }
7261
- function y0(e, t) {
7262
- var r = d0(this, e, t);
7261
+ function b0(e, t) {
7262
+ var r = p0(this, e, t);
7263
7263
  if (!this.lastNeed) return e.toString("utf8", t);
7264
7264
  this.lastTotal = r;
7265
7265
  var n = e.length - (r - this.lastNeed);
7266
7266
  return e.copy(this.lastChar, 0, n), e.toString("utf8", t, n);
7267
7267
  }
7268
- function m0(e) {
7268
+ function g0(e) {
7269
7269
  var t = e && e.length ? this.write(e) : "";
7270
7270
  return this.lastNeed ? t + "�" : t;
7271
7271
  }
7272
- function b0(e, t) {
7272
+ function w0(e, t) {
7273
7273
  if ((e.length - t) % 2 === 0) {
7274
7274
  var r = e.toString("utf16le", t);
7275
7275
  if (r) {
@@ -7281,7 +7281,7 @@ function b0(e, t) {
7281
7281
  }
7282
7282
  return this.lastNeed = 1, this.lastTotal = 2, this.lastChar[0] = e[e.length - 1], e.toString("utf16le", t, e.length - 1);
7283
7283
  }
7284
- function g0(e) {
7284
+ function _0(e) {
7285
7285
  var t = e && e.length ? this.write(e) : "";
7286
7286
  if (this.lastNeed) {
7287
7287
  var r = this.lastTotal - this.lastNeed;
@@ -7289,22 +7289,22 @@ function g0(e) {
7289
7289
  }
7290
7290
  return t;
7291
7291
  }
7292
- function w0(e, t) {
7292
+ function v0(e, t) {
7293
7293
  var r = (e.length - t) % 3;
7294
7294
  return r === 0 ? e.toString("base64", t) : (this.lastNeed = 3 - r, this.lastTotal = 3, r === 1 ? this.lastChar[0] = e[e.length - 1] : (this.lastChar[0] = e[e.length - 2], this.lastChar[1] = e[e.length - 1]), e.toString("base64", t, e.length - r));
7295
7295
  }
7296
- function _0(e) {
7296
+ function E0(e) {
7297
7297
  var t = e && e.length ? this.write(e) : "";
7298
7298
  return this.lastNeed ? t + this.lastChar.toString("base64", 0, 3 - this.lastNeed) : t;
7299
7299
  }
7300
- function v0(e) {
7300
+ function x0(e) {
7301
7301
  return e.toString(this.encoding);
7302
7302
  }
7303
- function E0(e) {
7303
+ function S0(e) {
7304
7304
  return e && e.length ? this.write(e) : "";
7305
7305
  }
7306
7306
  var Za = Hr.codes.ERR_STREAM_PREMATURE_CLOSE;
7307
- function x0(e) {
7307
+ function A0(e) {
7308
7308
  var t = !1;
7309
7309
  return function() {
7310
7310
  if (!t) {
@@ -7315,14 +7315,14 @@ function x0(e) {
7315
7315
  }
7316
7316
  };
7317
7317
  }
7318
- function S0() {
7318
+ function B0() {
7319
7319
  }
7320
- function A0(e) {
7320
+ function I0(e) {
7321
7321
  return e.setHeader && typeof e.abort == "function";
7322
7322
  }
7323
7323
  function Of(e, t, r) {
7324
7324
  if (typeof t == "function") return Of(e, null, t);
7325
- t || (t = {}), r = x0(r || S0);
7325
+ t || (t = {}), r = A0(r || B0);
7326
7326
  var n = t.readable || t.readable !== !1 && e.readable, i = t.writable || t.writable !== !1 && e.writable, s = function() {
7327
7327
  e.writable || a();
7328
7328
  }, o = e._writableState && e._writableState.finished, a = function() {
@@ -7340,12 +7340,12 @@ function Of(e, t, r) {
7340
7340
  }, w = function() {
7341
7341
  e.req.on("finish", a);
7342
7342
  };
7343
- return A0(e) ? (e.on("complete", a), e.on("abort", p), e.req ? w() : e.on("request", w)) : i && !e._writableState && (e.on("end", s), e.on("close", s)), e.on("end", l), e.on("finish", a), t.error !== !1 && e.on("error", d), e.on("close", p), function() {
7343
+ return I0(e) ? (e.on("complete", a), e.on("abort", p), e.req ? w() : e.on("request", w)) : i && !e._writableState && (e.on("end", s), e.on("close", s)), e.on("end", l), e.on("finish", a), t.error !== !1 && e.on("error", d), e.on("close", p), function() {
7344
7344
  e.removeListener("complete", a), e.removeListener("abort", p), e.removeListener("request", w), e.req && e.req.removeListener("finish", a), e.removeListener("end", s), e.removeListener("close", s), e.removeListener("finish", a), e.removeListener("end", l), e.removeListener("error", d), e.removeListener("close", p);
7345
7345
  };
7346
7346
  }
7347
7347
  var Ko = Of, Gs, Ja;
7348
- function B0() {
7348
+ function T0() {
7349
7349
  if (Ja) return Gs;
7350
7350
  Ja = 1;
7351
7351
  var e;
@@ -7471,7 +7471,7 @@ function B0() {
7471
7471
  return Gs = k, Gs;
7472
7472
  }
7473
7473
  var qs, Qa;
7474
- function I0() {
7474
+ function k0() {
7475
7475
  return Qa || (Qa = 1, qs = function() {
7476
7476
  throw new Error("Readable.from is not available in the browser");
7477
7477
  }), qs;
@@ -7495,7 +7495,7 @@ function Rf() {
7495
7495
  var a = qo, f;
7496
7496
  a && a.debuglog ? f = a.debuglog("stream") : f = function() {
7497
7497
  };
7498
- var l = Zh(), d = If, p = kf, w = p.getHighWaterMark, y = Hr.codes, I = y.ERR_INVALID_ARG_TYPE, S = y.ERR_STREAM_PUSH_AFTER_EOF, _ = y.ERR_METHOD_NOT_IMPLEMENTED, A = y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT, k, E, v;
7498
+ var l = Qh(), d = If, p = kf, w = p.getHighWaterMark, y = Hr.codes, I = y.ERR_INVALID_ARG_TYPE, S = y.ERR_STREAM_PUSH_AFTER_EOF, _ = y.ERR_METHOD_NOT_IMPLEMENTED, A = y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT, k, E, v;
7499
7499
  Me(P, r);
7500
7500
  var B = d.errorOrDestroy, x = ["error", "close", "destroy", "pause", "resume"];
7501
7501
  function L(b, g, F) {
@@ -7752,7 +7752,7 @@ function Rf() {
7752
7752
  f("wrapped _read", ue), V && (V = !1, b.resume());
7753
7753
  }, this;
7754
7754
  }, typeof Symbol == "function" && (P.prototype[Symbol.asyncIterator] = function() {
7755
- return E === void 0 && (E = B0()), E(this);
7755
+ return E === void 0 && (E = T0()), E(this);
7756
7756
  }), Object.defineProperty(P.prototype, "readableHighWaterMark", {
7757
7757
  // making it explicit this property is not enumerable
7758
7758
  // because otherwise some prototype manipulation in
@@ -7805,7 +7805,7 @@ function Rf() {
7805
7805
  }
7806
7806
  }
7807
7807
  typeof Symbol == "function" && (P.from = function(b, g) {
7808
- return v === void 0 && (v = I0()), v(P, b, g);
7808
+ return v === void 0 && (v = k0()), v(P, b, g);
7809
7809
  });
7810
7810
  function J(b, g) {
7811
7811
  for (var F = 0, V = b.length; F < V; F++)
@@ -7814,14 +7814,14 @@ function Rf() {
7814
7814
  }
7815
7815
  return Ws;
7816
7816
  }
7817
- var Cf = Gt, ns = Hr.codes, T0 = ns.ERR_METHOD_NOT_IMPLEMENTED, k0 = ns.ERR_MULTIPLE_CALLBACK, P0 = ns.ERR_TRANSFORM_ALREADY_TRANSFORMING, O0 = ns.ERR_TRANSFORM_WITH_LENGTH_0, is = cn();
7817
+ var Cf = Gt, ns = Hr.codes, P0 = ns.ERR_METHOD_NOT_IMPLEMENTED, O0 = ns.ERR_MULTIPLE_CALLBACK, R0 = ns.ERR_TRANSFORM_ALREADY_TRANSFORMING, C0 = ns.ERR_TRANSFORM_WITH_LENGTH_0, is = cn();
7818
7818
  Me(Gt, is);
7819
- function R0(e, t) {
7819
+ function U0(e, t) {
7820
7820
  var r = this._transformState;
7821
7821
  r.transforming = !1;
7822
7822
  var n = r.writecb;
7823
7823
  if (n === null)
7824
- return this.emit("error", new k0());
7824
+ return this.emit("error", new O0());
7825
7825
  r.writechunk = null, r.writecb = null, t != null && this.push(t), n(e);
7826
7826
  var i = this._readableState;
7827
7827
  i.reading = !1, (i.needReadable || i.length < i.highWaterMark) && this._read(i.highWaterMark);
@@ -7829,15 +7829,15 @@ function R0(e, t) {
7829
7829
  function Gt(e) {
7830
7830
  if (!(this instanceof Gt)) return new Gt(e);
7831
7831
  is.call(this, e), this._transformState = {
7832
- afterTransform: R0.bind(this),
7832
+ afterTransform: U0.bind(this),
7833
7833
  needTransform: !1,
7834
7834
  transforming: !1,
7835
7835
  writecb: null,
7836
7836
  writechunk: null,
7837
7837
  writeencoding: null
7838
- }, this._readableState.needReadable = !0, this._readableState.sync = !1, e && (typeof e.transform == "function" && (this._transform = e.transform), typeof e.flush == "function" && (this._flush = e.flush)), this.on("prefinish", C0);
7838
+ }, this._readableState.needReadable = !0, this._readableState.sync = !1, e && (typeof e.transform == "function" && (this._transform = e.transform), typeof e.flush == "function" && (this._flush = e.flush)), this.on("prefinish", L0);
7839
7839
  }
7840
- function C0() {
7840
+ function L0() {
7841
7841
  var e = this;
7842
7842
  typeof this._flush == "function" && !this._readableState.destroyed ? this._flush(function(t, r) {
7843
7843
  tc(e, t, r);
@@ -7847,7 +7847,7 @@ Gt.prototype.push = function(e, t) {
7847
7847
  return this._transformState.needTransform = !1, is.prototype.push.call(this, e, t);
7848
7848
  };
7849
7849
  Gt.prototype._transform = function(e, t, r) {
7850
- r(new T0("_transform()"));
7850
+ r(new P0("_transform()"));
7851
7851
  };
7852
7852
  Gt.prototype._write = function(e, t, r) {
7853
7853
  var n = this._transformState;
@@ -7867,11 +7867,11 @@ Gt.prototype._destroy = function(e, t) {
7867
7867
  };
7868
7868
  function tc(e, t, r) {
7869
7869
  if (t) return e.emit("error", t);
7870
- if (r != null && e.push(r), e._writableState.length) throw new O0();
7871
- if (e._transformState.transforming) throw new P0();
7870
+ if (r != null && e.push(r), e._writableState.length) throw new C0();
7871
+ if (e._transformState.transforming) throw new R0();
7872
7872
  return e.push(null);
7873
7873
  }
7874
- var U0 = zn, Uf = Cf;
7874
+ var N0 = zn, Uf = Cf;
7875
7875
  Me(zn, Uf);
7876
7876
  function zn(e) {
7877
7877
  if (!(this instanceof zn)) return new zn(e);
@@ -7881,21 +7881,21 @@ zn.prototype._transform = function(e, t, r) {
7881
7881
  r(null, e);
7882
7882
  };
7883
7883
  var Ks;
7884
- function L0(e) {
7884
+ function H0(e) {
7885
7885
  var t = !1;
7886
7886
  return function() {
7887
7887
  t || (t = !0, e.apply(void 0, arguments));
7888
7888
  };
7889
7889
  }
7890
- var Lf = Hr.codes, N0 = Lf.ERR_MISSING_ARGS, H0 = Lf.ERR_STREAM_DESTROYED;
7890
+ var Lf = Hr.codes, F0 = Lf.ERR_MISSING_ARGS, M0 = Lf.ERR_STREAM_DESTROYED;
7891
7891
  function rc(e) {
7892
7892
  if (e) throw e;
7893
7893
  }
7894
- function F0(e) {
7894
+ function D0(e) {
7895
7895
  return e.setHeader && typeof e.abort == "function";
7896
7896
  }
7897
- function M0(e, t, r, n) {
7898
- n = L0(n);
7897
+ function $0(e, t, r, n) {
7898
+ n = H0(n);
7899
7899
  var i = !1;
7900
7900
  e.on("close", function() {
7901
7901
  i = !0;
@@ -7909,48 +7909,48 @@ function M0(e, t, r, n) {
7909
7909
  var s = !1;
7910
7910
  return function(o) {
7911
7911
  if (!i && !s) {
7912
- if (s = !0, F0(e)) return e.abort();
7912
+ if (s = !0, D0(e)) return e.abort();
7913
7913
  if (typeof e.destroy == "function") return e.destroy();
7914
- n(o || new H0("pipe"));
7914
+ n(o || new M0("pipe"));
7915
7915
  }
7916
7916
  };
7917
7917
  }
7918
7918
  function nc(e) {
7919
7919
  e();
7920
7920
  }
7921
- function D0(e, t) {
7921
+ function j0(e, t) {
7922
7922
  return e.pipe(t);
7923
7923
  }
7924
- function $0(e) {
7924
+ function z0(e) {
7925
7925
  return !e.length || typeof e[e.length - 1] != "function" ? rc : e.pop();
7926
7926
  }
7927
- function j0() {
7927
+ function V0() {
7928
7928
  for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
7929
7929
  t[r] = arguments[r];
7930
- var n = $0(t);
7930
+ var n = z0(t);
7931
7931
  if (Array.isArray(t[0]) && (t = t[0]), t.length < 2)
7932
- throw new N0("streams");
7932
+ throw new F0("streams");
7933
7933
  var i, s = t.map(function(o, a) {
7934
7934
  var f = a < t.length - 1, l = a > 0;
7935
- return M0(o, f, l, function(d) {
7935
+ return $0(o, f, l, function(d) {
7936
7936
  i || (i = d), d && s.forEach(nc), !f && (s.forEach(nc), n(i));
7937
7937
  });
7938
7938
  });
7939
- return t.reduce(D0);
7939
+ return t.reduce(j0);
7940
7940
  }
7941
- var z0 = j0;
7941
+ var G0 = V0;
7942
7942
  (function(e, t) {
7943
- t = e.exports = Rf(), t.Stream = t, t.Readable = t, t.Writable = Pf(), t.Duplex = cn(), t.Transform = Cf, t.PassThrough = U0, t.finished = Ko, t.pipeline = z0;
7943
+ t = e.exports = Rf(), t.Stream = t, t.Readable = t, t.Writable = Pf(), t.Duplex = cn(), t.Transform = Cf, t.PassThrough = N0, t.finished = Ko, t.pipeline = G0;
7944
7944
  })(bo, bo.exports);
7945
- var Nf = bo.exports, Fi = Je.Buffer, Hf = Nf.Transform, V0 = Me;
7946
- function G0(e, t) {
7945
+ var Nf = bo.exports, Fi = Je.Buffer, Hf = Nf.Transform, q0 = Me;
7946
+ function W0(e, t) {
7947
7947
  if (!Fi.isBuffer(e) && typeof e != "string")
7948
7948
  throw new TypeError(t + " must be a string or a buffer");
7949
7949
  }
7950
7950
  function gr(e) {
7951
7951
  Hf.call(this), this._block = Fi.allocUnsafe(e), this._blockSize = e, this._blockOffset = 0, this._length = [0, 0, 0, 0], this._finalized = !1;
7952
7952
  }
7953
- V0(gr, Hf);
7953
+ q0(gr, Hf);
7954
7954
  gr.prototype._transform = function(e, t, r) {
7955
7955
  var n = null;
7956
7956
  try {
@@ -7970,7 +7970,7 @@ gr.prototype._flush = function(e) {
7970
7970
  e(t);
7971
7971
  };
7972
7972
  gr.prototype.update = function(e, t) {
7973
- if (G0(e, "Data"), this._finalized) throw new Error("Digest already called");
7973
+ if (W0(e, "Data"), this._finalized) throw new Error("Digest already called");
7974
7974
  Fi.isBuffer(e) || (e = Fi.from(e, t));
7975
7975
  for (var r = this._block, n = 0; this._blockOffset + e.length - n >= this._blockSize; ) {
7976
7976
  for (var i = this._blockOffset; i < this._blockSize; ) r[i++] = e[n++];
@@ -7995,19 +7995,19 @@ gr.prototype.digest = function(e) {
7995
7995
  gr.prototype._digest = function() {
7996
7996
  throw new Error("_digest is not implemented");
7997
7997
  };
7998
- var q0 = gr, W0 = Me, Ff = q0, K0 = Je.Buffer, Y0 = new Array(16);
7998
+ var K0 = gr, Y0 = Me, Ff = K0, X0 = Je.Buffer, Z0 = new Array(16);
7999
7999
  function ss() {
8000
8000
  Ff.call(this, 64), this._a = 1732584193, this._b = 4023233417, this._c = 2562383102, this._d = 271733878;
8001
8001
  }
8002
- W0(ss, Ff);
8002
+ Y0(ss, Ff);
8003
8003
  ss.prototype._update = function() {
8004
- for (var e = Y0, t = 0; t < 16; ++t) e[t] = this._block.readInt32LE(t * 4);
8004
+ for (var e = Z0, t = 0; t < 16; ++t) e[t] = this._block.readInt32LE(t * 4);
8005
8005
  var r = this._a, n = this._b, i = this._c, s = this._d;
8006
8006
  r = $e(r, n, i, s, e[0], 3614090360, 7), s = $e(s, r, n, i, e[1], 3905402710, 12), i = $e(i, s, r, n, e[2], 606105819, 17), n = $e(n, i, s, r, e[3], 3250441966, 22), r = $e(r, n, i, s, e[4], 4118548399, 7), s = $e(s, r, n, i, e[5], 1200080426, 12), i = $e(i, s, r, n, e[6], 2821735955, 17), n = $e(n, i, s, r, e[7], 4249261313, 22), r = $e(r, n, i, s, e[8], 1770035416, 7), s = $e(s, r, n, i, e[9], 2336552879, 12), i = $e(i, s, r, n, e[10], 4294925233, 17), n = $e(n, i, s, r, e[11], 2304563134, 22), r = $e(r, n, i, s, e[12], 1804603682, 7), s = $e(s, r, n, i, e[13], 4254626195, 12), i = $e(i, s, r, n, e[14], 2792965006, 17), n = $e(n, i, s, r, e[15], 1236535329, 22), r = je(r, n, i, s, e[1], 4129170786, 5), s = je(s, r, n, i, e[6], 3225465664, 9), i = je(i, s, r, n, e[11], 643717713, 14), n = je(n, i, s, r, e[0], 3921069994, 20), r = je(r, n, i, s, e[5], 3593408605, 5), s = je(s, r, n, i, e[10], 38016083, 9), i = je(i, s, r, n, e[15], 3634488961, 14), n = je(n, i, s, r, e[4], 3889429448, 20), r = je(r, n, i, s, e[9], 568446438, 5), s = je(s, r, n, i, e[14], 3275163606, 9), i = je(i, s, r, n, e[3], 4107603335, 14), n = je(n, i, s, r, e[8], 1163531501, 20), r = je(r, n, i, s, e[13], 2850285829, 5), s = je(s, r, n, i, e[2], 4243563512, 9), i = je(i, s, r, n, e[7], 1735328473, 14), n = je(n, i, s, r, e[12], 2368359562, 20), r = ze(r, n, i, s, e[5], 4294588738, 4), s = ze(s, r, n, i, e[8], 2272392833, 11), i = ze(i, s, r, n, e[11], 1839030562, 16), n = ze(n, i, s, r, e[14], 4259657740, 23), r = ze(r, n, i, s, e[1], 2763975236, 4), s = ze(s, r, n, i, e[4], 1272893353, 11), i = ze(i, s, r, n, e[7], 4139469664, 16), n = ze(n, i, s, r, e[10], 3200236656, 23), r = ze(r, n, i, s, e[13], 681279174, 4), s = ze(s, r, n, i, e[0], 3936430074, 11), i = ze(i, s, r, n, e[3], 3572445317, 16), n = ze(n, i, s, r, e[6], 76029189, 23), r = ze(r, n, i, s, e[9], 3654602809, 4), s = ze(s, r, n, i, e[12], 3873151461, 11), i = ze(i, s, r, n, e[15], 530742520, 16), n = ze(n, i, s, r, e[2], 3299628645, 23), r = Ve(r, n, i, s, e[0], 4096336452, 6), s = Ve(s, r, n, i, e[7], 1126891415, 10), i = Ve(i, s, r, n, e[14], 2878612391, 15), n = Ve(n, i, s, r, e[5], 4237533241, 21), r = Ve(r, n, i, s, e[12], 1700485571, 6), s = Ve(s, r, n, i, e[3], 2399980690, 10), i = Ve(i, s, r, n, e[10], 4293915773, 15), n = Ve(n, i, s, r, e[1], 2240044497, 21), r = Ve(r, n, i, s, e[8], 1873313359, 6), s = Ve(s, r, n, i, e[15], 4264355552, 10), i = Ve(i, s, r, n, e[6], 2734768916, 15), n = Ve(n, i, s, r, e[13], 1309151649, 21), r = Ve(r, n, i, s, e[4], 4149444226, 6), s = Ve(s, r, n, i, e[11], 3174756917, 10), i = Ve(i, s, r, n, e[2], 718787259, 15), n = Ve(n, i, s, r, e[9], 3951481745, 21), this._a = this._a + r | 0, this._b = this._b + n | 0, this._c = this._c + i | 0, this._d = this._d + s | 0;
8007
8007
  };
8008
8008
  ss.prototype._digest = function() {
8009
8009
  this._block[this._blockOffset++] = 128, this._blockOffset > 56 && (this._block.fill(0, this._blockOffset, 64), this._update(), this._blockOffset = 0), this._block.fill(0, this._blockOffset, 56), this._block.writeUInt32LE(this._length[0], 56), this._block.writeUInt32LE(this._length[1], 60), this._update();
8010
- var e = K0.allocUnsafe(16);
8010
+ var e = X0.allocUnsafe(16);
8011
8011
  return e.writeInt32LE(this._a, 0), e.writeInt32LE(this._b, 4), e.writeInt32LE(this._c, 8), e.writeInt32LE(this._d, 12), e;
8012
8012
  };
8013
8013
  function os(e, t) {
@@ -8025,15 +8025,15 @@ function ze(e, t, r, n, i, s, o) {
8025
8025
  function Ve(e, t, r, n, i, s, o) {
8026
8026
  return os(e + (r ^ (t | ~n)) + i + s | 0, o) + t | 0;
8027
8027
  }
8028
- var X0 = ss, Mi = Je.Buffer, Mf = Nf.Transform, Z0 = Me;
8029
- function J0(e, t) {
8028
+ var J0 = ss, Mi = Je.Buffer, Mf = Nf.Transform, Q0 = Me;
8029
+ function ep(e, t) {
8030
8030
  if (!Mi.isBuffer(e) && typeof e != "string")
8031
8031
  throw new TypeError(t + " must be a string or a buffer");
8032
8032
  }
8033
8033
  function wr(e) {
8034
8034
  Mf.call(this), this._block = Mi.allocUnsafe(e), this._blockSize = e, this._blockOffset = 0, this._length = [0, 0, 0, 0], this._finalized = !1;
8035
8035
  }
8036
- Z0(wr, Mf);
8036
+ Q0(wr, Mf);
8037
8037
  wr.prototype._transform = function(e, t, r) {
8038
8038
  var n = null;
8039
8039
  try {
@@ -8053,7 +8053,7 @@ wr.prototype._flush = function(e) {
8053
8053
  e(t);
8054
8054
  };
8055
8055
  wr.prototype.update = function(e, t) {
8056
- if (J0(e, "Data"), this._finalized) throw new Error("Digest already called");
8056
+ if (ep(e, "Data"), this._finalized) throw new Error("Digest already called");
8057
8057
  Mi.isBuffer(e) || (e = Mi.from(e, t));
8058
8058
  for (var r = this._block, n = 0; this._blockOffset + e.length - n >= this._blockSize; ) {
8059
8059
  for (var i = this._blockOffset; i < this._blockSize; ) r[i++] = e[n++];
@@ -8078,7 +8078,7 @@ wr.prototype.digest = function(e) {
8078
8078
  wr.prototype._digest = function() {
8079
8079
  throw new Error("_digest is not implemented");
8080
8080
  };
8081
- var Q0 = wr, Ys = Wt.Buffer, ep = Me, Df = Q0, tp = new Array(16), An = [
8081
+ var tp = wr, Ys = Wt.Buffer, rp = Me, Df = tp, np = new Array(16), An = [
8082
8082
  0,
8083
8083
  1,
8084
8084
  2,
@@ -8406,9 +8406,9 @@ var Q0 = wr, Ys = Wt.Buffer, ep = Me, Df = Q0, tp = new Array(16), An = [
8406
8406
  function as() {
8407
8407
  Df.call(this, 64), this._a = 1732584193, this._b = 4023233417, this._c = 2562383102, this._d = 271733878, this._e = 3285377520;
8408
8408
  }
8409
- ep(as, Df);
8409
+ rp(as, Df);
8410
8410
  as.prototype._update = function() {
8411
- for (var e = tp, t = 0; t < 16; ++t) e[t] = this._block.readInt32LE(t * 4);
8411
+ for (var e = np, t = 0; t < 16; ++t) e[t] = this._block.readInt32LE(t * 4);
8412
8412
  for (var r = this._a | 0, n = this._b | 0, i = this._c | 0, s = this._d | 0, o = this._e | 0, a = this._a | 0, f = this._b | 0, l = this._c | 0, d = this._d | 0, p = this._e | 0, w = 0; w < 80; w += 1) {
8413
8413
  var y, I;
8414
8414
  w < 16 ? (y = ic(r, n, i, s, o, e[An[w]], kn[0], In[w]), I = cc(a, f, l, d, p, e[Bn[w]], Pn[0], Tn[w])) : w < 32 ? (y = sc(r, n, i, s, o, e[An[w]], kn[1], In[w]), I = ac(a, f, l, d, p, e[Bn[w]], Pn[1], Tn[w])) : w < 48 ? (y = oc(r, n, i, s, o, e[An[w]], kn[2], In[w]), I = oc(a, f, l, d, p, e[Bn[w]], Pn[2], Tn[w])) : w < 64 ? (y = ac(r, n, i, s, o, e[An[w]], kn[3], In[w]), I = sc(a, f, l, d, p, e[Bn[w]], Pn[3], Tn[w])) : (y = cc(r, n, i, s, o, e[An[w]], kn[4], In[w]), I = ic(a, f, l, d, p, e[Bn[w]], Pn[4], Tn[w])), r = o, o = s, s = Cr(i, 10), i = n, n = y, a = p, p = d, d = Cr(l, 10), l = f, f = I;
@@ -8439,7 +8439,7 @@ function ac(e, t, r, n, i, s, o, a) {
8439
8439
  function cc(e, t, r, n, i, s, o, a) {
8440
8440
  return Cr(e + (t ^ (r | ~n)) + s + o | 0, a) + i | 0;
8441
8441
  }
8442
- var rp = as, $f = { exports: {} }, jf = Je.Buffer;
8442
+ var ip = as, $f = { exports: {} }, jf = Je.Buffer;
8443
8443
  function cs(e, t) {
8444
8444
  this._block = jf.alloc(e), this._finalSize = t, this._blockSize = e, this._len = 0;
8445
8445
  }
@@ -8469,80 +8469,80 @@ cs.prototype.digest = function(e) {
8469
8469
  cs.prototype._update = function() {
8470
8470
  throw new Error("_update must be implemented by subclass");
8471
8471
  };
8472
- var pn = cs, np = Me, zf = pn, ip = Je.Buffer, sp = [
8472
+ var pn = cs, sp = Me, zf = pn, op = Je.Buffer, ap = [
8473
8473
  1518500249,
8474
8474
  1859775393,
8475
8475
  -1894007588,
8476
8476
  -899497514
8477
- ], op = new Array(80);
8477
+ ], cp = new Array(80);
8478
8478
  function Xn() {
8479
- this.init(), this._w = op, zf.call(this, 64, 56);
8479
+ this.init(), this._w = cp, zf.call(this, 64, 56);
8480
8480
  }
8481
- np(Xn, zf);
8481
+ sp(Xn, zf);
8482
8482
  Xn.prototype.init = function() {
8483
8483
  return this._a = 1732584193, this._b = 4023233417, this._c = 2562383102, this._d = 271733878, this._e = 3285377520, this;
8484
8484
  };
8485
- function ap(e) {
8485
+ function fp(e) {
8486
8486
  return e << 5 | e >>> 27;
8487
8487
  }
8488
- function cp(e) {
8488
+ function up(e) {
8489
8489
  return e << 30 | e >>> 2;
8490
8490
  }
8491
- function fp(e, t, r, n) {
8491
+ function lp(e, t, r, n) {
8492
8492
  return e === 0 ? t & r | ~t & n : e === 2 ? t & r | t & n | r & n : t ^ r ^ n;
8493
8493
  }
8494
8494
  Xn.prototype._update = function(e) {
8495
8495
  for (var t = this._w, r = this._a | 0, n = this._b | 0, i = this._c | 0, s = this._d | 0, o = this._e | 0, a = 0; a < 16; ++a) t[a] = e.readInt32BE(a * 4);
8496
8496
  for (; a < 80; ++a) t[a] = t[a - 3] ^ t[a - 8] ^ t[a - 14] ^ t[a - 16];
8497
8497
  for (var f = 0; f < 80; ++f) {
8498
- var l = ~~(f / 20), d = ap(r) + fp(l, n, i, s) + o + t[f] + sp[l] | 0;
8499
- o = s, s = i, i = cp(n), n = r, r = d;
8498
+ var l = ~~(f / 20), d = fp(r) + lp(l, n, i, s) + o + t[f] + ap[l] | 0;
8499
+ o = s, s = i, i = up(n), n = r, r = d;
8500
8500
  }
8501
8501
  this._a = r + this._a | 0, this._b = n + this._b | 0, this._c = i + this._c | 0, this._d = s + this._d | 0, this._e = o + this._e | 0;
8502
8502
  };
8503
8503
  Xn.prototype._hash = function() {
8504
- var e = ip.allocUnsafe(20);
8504
+ var e = op.allocUnsafe(20);
8505
8505
  return e.writeInt32BE(this._a | 0, 0), e.writeInt32BE(this._b | 0, 4), e.writeInt32BE(this._c | 0, 8), e.writeInt32BE(this._d | 0, 12), e.writeInt32BE(this._e | 0, 16), e;
8506
8506
  };
8507
- var up = Xn, lp = Me, Vf = pn, dp = Je.Buffer, hp = [
8507
+ var dp = Xn, hp = Me, Vf = pn, pp = Je.Buffer, yp = [
8508
8508
  1518500249,
8509
8509
  1859775393,
8510
8510
  -1894007588,
8511
8511
  -899497514
8512
- ], pp = new Array(80);
8512
+ ], mp = new Array(80);
8513
8513
  function Zn() {
8514
- this.init(), this._w = pp, Vf.call(this, 64, 56);
8514
+ this.init(), this._w = mp, Vf.call(this, 64, 56);
8515
8515
  }
8516
- lp(Zn, Vf);
8516
+ hp(Zn, Vf);
8517
8517
  Zn.prototype.init = function() {
8518
8518
  return this._a = 1732584193, this._b = 4023233417, this._c = 2562383102, this._d = 271733878, this._e = 3285377520, this;
8519
8519
  };
8520
- function yp(e) {
8520
+ function bp(e) {
8521
8521
  return e << 1 | e >>> 31;
8522
8522
  }
8523
- function mp(e) {
8523
+ function gp(e) {
8524
8524
  return e << 5 | e >>> 27;
8525
8525
  }
8526
- function bp(e) {
8526
+ function wp(e) {
8527
8527
  return e << 30 | e >>> 2;
8528
8528
  }
8529
- function gp(e, t, r, n) {
8529
+ function _p(e, t, r, n) {
8530
8530
  return e === 0 ? t & r | ~t & n : e === 2 ? t & r | t & n | r & n : t ^ r ^ n;
8531
8531
  }
8532
8532
  Zn.prototype._update = function(e) {
8533
8533
  for (var t = this._w, r = this._a | 0, n = this._b | 0, i = this._c | 0, s = this._d | 0, o = this._e | 0, a = 0; a < 16; ++a) t[a] = e.readInt32BE(a * 4);
8534
- for (; a < 80; ++a) t[a] = yp(t[a - 3] ^ t[a - 8] ^ t[a - 14] ^ t[a - 16]);
8534
+ for (; a < 80; ++a) t[a] = bp(t[a - 3] ^ t[a - 8] ^ t[a - 14] ^ t[a - 16]);
8535
8535
  for (var f = 0; f < 80; ++f) {
8536
- var l = ~~(f / 20), d = mp(r) + gp(l, n, i, s) + o + t[f] + hp[l] | 0;
8537
- o = s, s = i, i = bp(n), n = r, r = d;
8536
+ var l = ~~(f / 20), d = gp(r) + _p(l, n, i, s) + o + t[f] + yp[l] | 0;
8537
+ o = s, s = i, i = wp(n), n = r, r = d;
8538
8538
  }
8539
8539
  this._a = r + this._a | 0, this._b = n + this._b | 0, this._c = i + this._c | 0, this._d = s + this._d | 0, this._e = o + this._e | 0;
8540
8540
  };
8541
8541
  Zn.prototype._hash = function() {
8542
- var e = dp.allocUnsafe(20);
8542
+ var e = pp.allocUnsafe(20);
8543
8543
  return e.writeInt32BE(this._a | 0, 0), e.writeInt32BE(this._b | 0, 4), e.writeInt32BE(this._c | 0, 8), e.writeInt32BE(this._d | 0, 12), e.writeInt32BE(this._e | 0, 16), e;
8544
8544
  };
8545
- var wp = Zn, _p = Me, Gf = pn, vp = Je.Buffer, Ep = [
8545
+ var vp = Zn, Ep = Me, Gf = pn, xp = Je.Buffer, Sp = [
8546
8546
  1116352408,
8547
8547
  1899447441,
8548
8548
  3049323471,
@@ -8607,58 +8607,58 @@ var wp = Zn, _p = Me, Gf = pn, vp = Je.Buffer, Ep = [
8607
8607
  2756734187,
8608
8608
  3204031479,
8609
8609
  3329325298
8610
- ], xp = new Array(64);
8610
+ ], Ap = new Array(64);
8611
8611
  function Jn() {
8612
- this.init(), this._w = xp, Gf.call(this, 64, 56);
8612
+ this.init(), this._w = Ap, Gf.call(this, 64, 56);
8613
8613
  }
8614
- _p(Jn, Gf);
8614
+ Ep(Jn, Gf);
8615
8615
  Jn.prototype.init = function() {
8616
8616
  return this._a = 1779033703, this._b = 3144134277, this._c = 1013904242, this._d = 2773480762, this._e = 1359893119, this._f = 2600822924, this._g = 528734635, this._h = 1541459225, this;
8617
8617
  };
8618
- function Sp(e, t, r) {
8618
+ function Bp(e, t, r) {
8619
8619
  return r ^ e & (t ^ r);
8620
8620
  }
8621
- function Ap(e, t, r) {
8621
+ function Ip(e, t, r) {
8622
8622
  return e & t | r & (e | t);
8623
8623
  }
8624
- function Bp(e) {
8624
+ function Tp(e) {
8625
8625
  return (e >>> 2 | e << 30) ^ (e >>> 13 | e << 19) ^ (e >>> 22 | e << 10);
8626
8626
  }
8627
- function Ip(e) {
8627
+ function kp(e) {
8628
8628
  return (e >>> 6 | e << 26) ^ (e >>> 11 | e << 21) ^ (e >>> 25 | e << 7);
8629
8629
  }
8630
- function Tp(e) {
8630
+ function Pp(e) {
8631
8631
  return (e >>> 7 | e << 25) ^ (e >>> 18 | e << 14) ^ e >>> 3;
8632
8632
  }
8633
- function kp(e) {
8633
+ function Op(e) {
8634
8634
  return (e >>> 17 | e << 15) ^ (e >>> 19 | e << 13) ^ e >>> 10;
8635
8635
  }
8636
8636
  Jn.prototype._update = function(e) {
8637
8637
  for (var t = this._w, r = this._a | 0, n = this._b | 0, i = this._c | 0, s = this._d | 0, o = this._e | 0, a = this._f | 0, f = this._g | 0, l = this._h | 0, d = 0; d < 16; ++d) t[d] = e.readInt32BE(d * 4);
8638
- for (; d < 64; ++d) t[d] = kp(t[d - 2]) + t[d - 7] + Tp(t[d - 15]) + t[d - 16] | 0;
8638
+ for (; d < 64; ++d) t[d] = Op(t[d - 2]) + t[d - 7] + Pp(t[d - 15]) + t[d - 16] | 0;
8639
8639
  for (var p = 0; p < 64; ++p) {
8640
- var w = l + Ip(o) + Sp(o, a, f) + Ep[p] + t[p] | 0, y = Bp(r) + Ap(r, n, i) | 0;
8640
+ var w = l + kp(o) + Bp(o, a, f) + Sp[p] + t[p] | 0, y = Tp(r) + Ip(r, n, i) | 0;
8641
8641
  l = f, f = a, a = o, o = s + w | 0, s = i, i = n, n = r, r = w + y | 0;
8642
8642
  }
8643
8643
  this._a = r + this._a | 0, this._b = n + this._b | 0, this._c = i + this._c | 0, this._d = s + this._d | 0, this._e = o + this._e | 0, this._f = a + this._f | 0, this._g = f + this._g | 0, this._h = l + this._h | 0;
8644
8644
  };
8645
8645
  Jn.prototype._hash = function() {
8646
- var e = vp.allocUnsafe(32);
8646
+ var e = xp.allocUnsafe(32);
8647
8647
  return e.writeInt32BE(this._a, 0), e.writeInt32BE(this._b, 4), e.writeInt32BE(this._c, 8), e.writeInt32BE(this._d, 12), e.writeInt32BE(this._e, 16), e.writeInt32BE(this._f, 20), e.writeInt32BE(this._g, 24), e.writeInt32BE(this._h, 28), e;
8648
8648
  };
8649
- var qf = Jn, Pp = Me, Op = qf, Rp = pn, Cp = Je.Buffer, Up = new Array(64);
8649
+ var qf = Jn, Rp = Me, Cp = qf, Up = pn, Lp = Je.Buffer, Np = new Array(64);
8650
8650
  function fs() {
8651
- this.init(), this._w = Up, Rp.call(this, 64, 56);
8651
+ this.init(), this._w = Np, Up.call(this, 64, 56);
8652
8652
  }
8653
- Pp(fs, Op);
8653
+ Rp(fs, Cp);
8654
8654
  fs.prototype.init = function() {
8655
8655
  return this._a = 3238371032, this._b = 914150663, this._c = 812702999, this._d = 4144912697, this._e = 4290775857, this._f = 1750603025, this._g = 1694076839, this._h = 3204075428, this;
8656
8656
  };
8657
8657
  fs.prototype._hash = function() {
8658
- var e = Cp.allocUnsafe(28);
8658
+ var e = Lp.allocUnsafe(28);
8659
8659
  return e.writeInt32BE(this._a, 0), e.writeInt32BE(this._b, 4), e.writeInt32BE(this._c, 8), e.writeInt32BE(this._d, 12), e.writeInt32BE(this._e, 16), e.writeInt32BE(this._f, 20), e.writeInt32BE(this._g, 24), e;
8660
8660
  };
8661
- var Lp = fs, Np = Me, Wf = pn, Hp = Je.Buffer, fc = [
8661
+ var Hp = fs, Fp = Me, Wf = pn, Mp = Je.Buffer, fc = [
8662
8662
  1116352408,
8663
8663
  3609767458,
8664
8664
  1899447441,
@@ -8819,11 +8819,11 @@ var Lp = fs, Np = Me, Wf = pn, Hp = Je.Buffer, fc = [
8819
8819
  987167468,
8820
8820
  1816402316,
8821
8821
  1246189591
8822
- ], Fp = new Array(160);
8822
+ ], Dp = new Array(160);
8823
8823
  function Qn() {
8824
- this.init(), this._w = Fp, Wf.call(this, 128, 112);
8824
+ this.init(), this._w = Dp, Wf.call(this, 128, 112);
8825
8825
  }
8826
- Np(Qn, Wf);
8826
+ Fp(Qn, Wf);
8827
8827
  Qn.prototype.init = function() {
8828
8828
  return this._ah = 1779033703, this._bh = 3144134277, this._ch = 1013904242, this._dh = 2773480762, this._eh = 1359893119, this._fh = 2600822924, this._gh = 528734635, this._hh = 1541459225, this._al = 4089235720, this._bl = 2227873595, this._cl = 4271175723, this._dl = 1595750129, this._el = 2917565137, this._fl = 725511199, this._gl = 4215389547, this._hl = 327033209, this;
8829
8829
  };
@@ -8839,16 +8839,16 @@ function dc(e, t) {
8839
8839
  function hc(e, t) {
8840
8840
  return (e >>> 14 | t << 18) ^ (e >>> 18 | t << 14) ^ (t >>> 9 | e << 23);
8841
8841
  }
8842
- function Mp(e, t) {
8842
+ function $p(e, t) {
8843
8843
  return (e >>> 1 | t << 31) ^ (e >>> 8 | t << 24) ^ e >>> 7;
8844
8844
  }
8845
- function Dp(e, t) {
8845
+ function jp(e, t) {
8846
8846
  return (e >>> 1 | t << 31) ^ (e >>> 8 | t << 24) ^ (e >>> 7 | t << 25);
8847
8847
  }
8848
- function $p(e, t) {
8848
+ function zp(e, t) {
8849
8849
  return (e >>> 19 | t << 13) ^ (t >>> 29 | e << 3) ^ e >>> 6;
8850
8850
  }
8851
- function jp(e, t) {
8851
+ function Vp(e, t) {
8852
8852
  return (e >>> 19 | t << 13) ^ (t >>> 29 | e << 3) ^ (e >>> 6 | t << 26);
8853
8853
  }
8854
8854
  function Re(e, t) {
@@ -8858,9 +8858,9 @@ Qn.prototype._update = function(e) {
8858
8858
  for (var t = this._w, r = this._ah | 0, n = this._bh | 0, i = this._ch | 0, s = this._dh | 0, o = this._eh | 0, a = this._fh | 0, f = this._gh | 0, l = this._hh | 0, d = this._al | 0, p = this._bl | 0, w = this._cl | 0, y = this._dl | 0, I = this._el | 0, S = this._fl | 0, _ = this._gl | 0, A = this._hl | 0, k = 0; k < 32; k += 2)
8859
8859
  t[k] = e.readInt32BE(k * 4), t[k + 1] = e.readInt32BE(k * 4 + 4);
8860
8860
  for (; k < 160; k += 2) {
8861
- var E = t[k - 30], v = t[k - 15 * 2 + 1], B = Mp(E, v), x = Dp(v, E);
8861
+ var E = t[k - 30], v = t[k - 15 * 2 + 1], B = $p(E, v), x = jp(v, E);
8862
8862
  E = t[k - 2 * 2], v = t[k - 2 * 2 + 1];
8863
- var L = $p(E, v), M = jp(v, E), P = t[k - 7 * 2], q = t[k - 7 * 2 + 1], K = t[k - 16 * 2], C = t[k - 16 * 2 + 1], j = x + q | 0, N = B + P + Re(j, x) | 0;
8863
+ var L = zp(E, v), M = Vp(v, E), P = t[k - 7 * 2], q = t[k - 7 * 2 + 1], K = t[k - 16 * 2], C = t[k - 16 * 2 + 1], j = x + q | 0, N = B + P + Re(j, x) | 0;
8864
8864
  j = j + M | 0, N = N + L + Re(j, M) | 0, j = j + C | 0, N = N + K + Re(j, C) | 0, t[k] = N, t[k + 1] = j;
8865
8865
  }
8866
8866
  for (var $ = 0; $ < 160; $ += 2) {
@@ -8873,44 +8873,44 @@ Qn.prototype._update = function(e) {
8873
8873
  this._al = this._al + d | 0, this._bl = this._bl + p | 0, this._cl = this._cl + w | 0, this._dl = this._dl + y | 0, this._el = this._el + I | 0, this._fl = this._fl + S | 0, this._gl = this._gl + _ | 0, this._hl = this._hl + A | 0, this._ah = this._ah + r + Re(this._al, d) | 0, this._bh = this._bh + n + Re(this._bl, p) | 0, this._ch = this._ch + i + Re(this._cl, w) | 0, this._dh = this._dh + s + Re(this._dl, y) | 0, this._eh = this._eh + o + Re(this._el, I) | 0, this._fh = this._fh + a + Re(this._fl, S) | 0, this._gh = this._gh + f + Re(this._gl, _) | 0, this._hh = this._hh + l + Re(this._hl, A) | 0;
8874
8874
  };
8875
8875
  Qn.prototype._hash = function() {
8876
- var e = Hp.allocUnsafe(64);
8876
+ var e = Mp.allocUnsafe(64);
8877
8877
  function t(r, n, i) {
8878
8878
  e.writeInt32BE(r, i), e.writeInt32BE(n, i + 4);
8879
8879
  }
8880
8880
  return t(this._ah, this._al, 0), t(this._bh, this._bl, 8), t(this._ch, this._cl, 16), t(this._dh, this._dl, 24), t(this._eh, this._el, 32), t(this._fh, this._fl, 40), t(this._gh, this._gl, 48), t(this._hh, this._hl, 56), e;
8881
8881
  };
8882
- var Kf = Qn, zp = Me, Vp = Kf, Gp = pn, qp = Je.Buffer, Wp = new Array(160);
8882
+ var Kf = Qn, Gp = Me, qp = Kf, Wp = pn, Kp = Je.Buffer, Yp = new Array(160);
8883
8883
  function us() {
8884
- this.init(), this._w = Wp, Gp.call(this, 128, 112);
8884
+ this.init(), this._w = Yp, Wp.call(this, 128, 112);
8885
8885
  }
8886
- zp(us, Vp);
8886
+ Gp(us, qp);
8887
8887
  us.prototype.init = function() {
8888
8888
  return this._ah = 3418070365, this._bh = 1654270250, this._ch = 2438529370, this._dh = 355462360, this._eh = 1731405415, this._fh = 2394180231, this._gh = 3675008525, this._hh = 1203062813, this._al = 3238371032, this._bl = 914150663, this._cl = 812702999, this._dl = 4144912697, this._el = 4290775857, this._fl = 1750603025, this._gl = 1694076839, this._hl = 3204075428, this;
8889
8889
  };
8890
8890
  us.prototype._hash = function() {
8891
- var e = qp.allocUnsafe(48);
8891
+ var e = Kp.allocUnsafe(48);
8892
8892
  function t(r, n, i) {
8893
8893
  e.writeInt32BE(r, i), e.writeInt32BE(n, i + 4);
8894
8894
  }
8895
8895
  return t(this._ah, this._al, 0), t(this._bh, this._bl, 8), t(this._ch, this._cl, 16), t(this._dh, this._dl, 24), t(this._eh, this._el, 32), t(this._fh, this._fl, 40), e;
8896
8896
  };
8897
- var Kp = us, Fr = $f.exports = function(t) {
8897
+ var Xp = us, Fr = $f.exports = function(t) {
8898
8898
  t = t.toLowerCase();
8899
8899
  var r = Fr[t];
8900
8900
  if (!r) throw new Error(t + " is not supported (we accept pull requests)");
8901
8901
  return new r();
8902
8902
  };
8903
- Fr.sha = up;
8904
- Fr.sha1 = wp;
8905
- Fr.sha224 = Lp;
8903
+ Fr.sha = dp;
8904
+ Fr.sha1 = vp;
8905
+ Fr.sha224 = Hp;
8906
8906
  Fr.sha256 = qf;
8907
- Fr.sha384 = Kp;
8907
+ Fr.sha384 = Xp;
8908
8908
  Fr.sha512 = Kf;
8909
- var Yp = $f.exports, Yf = Je.Buffer, Xf = qo.Transform, Xp = Hi.StringDecoder, Zp = Me;
8909
+ var Zp = $f.exports, Yf = Je.Buffer, Xf = qo.Transform, Jp = Hi.StringDecoder, Qp = Me;
8910
8910
  function bt(e) {
8911
8911
  Xf.call(this), this.hashMode = typeof e == "string", this.hashMode ? this[e] = this._finalOrDigest : this.final = this._finalOrDigest, this._final && (this.__final = this._final, this._final = null), this._decoder = null, this._encoding = null;
8912
8912
  }
8913
- Zp(bt, Xf);
8913
+ Qp(bt, Xf);
8914
8914
  bt.prototype.update = function(e, t, r) {
8915
8915
  typeof e == "string" && (e = Yf.from(e, t));
8916
8916
  var n = this._update(e);
@@ -8951,25 +8951,25 @@ bt.prototype._finalOrDigest = function(e) {
8951
8951
  return e && (t = this._toString(t, e, !0)), t;
8952
8952
  };
8953
8953
  bt.prototype._toString = function(e, t, r) {
8954
- if (this._decoder || (this._decoder = new Xp(t), this._encoding = t), this._encoding !== t) throw new Error("can't switch encodings");
8954
+ if (this._decoder || (this._decoder = new Jp(t), this._encoding = t), this._encoding !== t) throw new Error("can't switch encodings");
8955
8955
  var n = this._decoder.write(e);
8956
8956
  return r && (n += this._decoder.end()), n;
8957
8957
  };
8958
- var Jp = bt, Qp = Me, ey = X0, ty = rp, ry = Yp, Zf = Jp;
8958
+ var ey = bt, ty = Me, ry = J0, ny = ip, iy = Zp, Zf = ey;
8959
8959
  function ls(e) {
8960
8960
  Zf.call(this, "digest"), this._hash = e;
8961
8961
  }
8962
- Qp(ls, Zf);
8962
+ ty(ls, Zf);
8963
8963
  ls.prototype._update = function(e) {
8964
8964
  this._hash.update(e);
8965
8965
  };
8966
8966
  ls.prototype._final = function() {
8967
8967
  return this._hash.digest();
8968
8968
  };
8969
- var ny = function(t) {
8970
- return t = t.toLowerCase(), t === "md5" ? new ey() : t === "rmd160" || t === "ripemd160" ? new ty() : new ls(ry(t));
8969
+ var sy = function(t) {
8970
+ return t = t.toLowerCase(), t === "md5" ? new ry() : t === "rmd160" || t === "ripemd160" ? new ny() : new ls(iy(t));
8971
8971
  }, bi = Je.Buffer;
8972
- function iy(e) {
8972
+ function oy(e) {
8973
8973
  if (e.length >= 255)
8974
8974
  throw new TypeError("Alphabet too long");
8975
8975
  for (var t = new Uint8Array(256), r = 0; r < t.length; r++)
@@ -9038,10 +9038,10 @@ function iy(e) {
9038
9038
  decode: w
9039
9039
  };
9040
9040
  }
9041
- var sy = iy, oy = sy, ay = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz", cy = oy(ay), Xs = cy, fy = Je.Buffer, uy = function(e) {
9041
+ var ay = oy, cy = ay, fy = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz", uy = cy(fy), Xs = uy, ly = Je.Buffer, dy = function(e) {
9042
9042
  function t(s) {
9043
9043
  var o = e(s);
9044
- return Xs.encode(fy.concat([
9044
+ return Xs.encode(ly.concat([
9045
9045
  s,
9046
9046
  o
9047
9047
  ], s.length + 4));
@@ -9066,12 +9066,12 @@ var sy = iy, oy = sy, ay = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrst
9066
9066
  decode: i,
9067
9067
  decodeUnsafe: n
9068
9068
  };
9069
- }, pc = ny, ly = uy;
9070
- function dy(e) {
9069
+ }, pc = sy, hy = dy;
9070
+ function py(e) {
9071
9071
  var t = pc("sha256").update(e).digest();
9072
9072
  return pc("sha256").update(t).digest();
9073
9073
  }
9074
- var hy = ly(dy), wo = hy;
9074
+ var yy = hy(py), wo = yy;
9075
9075
  function Jf(e, t) {
9076
9076
  if (t !== void 0 && e[0] !== t) throw new Error("Invalid network version");
9077
9077
  if (e.length === 33)
@@ -9092,10 +9092,10 @@ function _o(e, t, r) {
9092
9092
  var n = new Buffer(r ? 34 : 33);
9093
9093
  return n.writeUInt8(e, 0), t.copy(n, 1), r && (n[33] = 1), n;
9094
9094
  }
9095
- function py(e, t) {
9095
+ function my(e, t) {
9096
9096
  return Jf(wo.decode(e), t);
9097
9097
  }
9098
- function yy(e, t, r) {
9098
+ function by(e, t, r) {
9099
9099
  return typeof e == "number" ? wo.encode(_o(e, t, r)) : wo.encode(
9100
9100
  _o(
9101
9101
  e.version,
@@ -9104,16 +9104,16 @@ function yy(e, t, r) {
9104
9104
  )
9105
9105
  );
9106
9106
  }
9107
- var my = {
9108
- decode: py,
9107
+ var gy = {
9108
+ decode: my,
9109
9109
  decodeRaw: Jf,
9110
- encode: yy,
9110
+ encode: by,
9111
9111
  encodeRaw: _o
9112
9112
  }, ds = {};
9113
9113
  Object.defineProperty(ds, "__esModule", { value: !0 });
9114
9114
  ds.testEcc = void 0;
9115
9115
  const X = (e) => Buffer.from(e, "hex");
9116
- function by(e) {
9116
+ function wy(e) {
9117
9117
  we(
9118
9118
  e.isPoint(
9119
9119
  X("0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798")
@@ -9303,7 +9303,7 @@ function by(e) {
9303
9303
  )
9304
9304
  );
9305
9305
  }
9306
- ds.testEcc = by;
9306
+ ds.testEcc = wy;
9307
9307
  function we(e) {
9308
9308
  if (!e) throw new Error("ecc library invalid");
9309
9309
  }
@@ -9311,14 +9311,14 @@ Object.defineProperty(on, "__esModule", { value: !0 });
9311
9311
  on.ECPairFactory = on.networks = void 0;
9312
9312
  const vo = an;
9313
9313
  on.networks = vo;
9314
- const Xe = mf, gy = jh, yc = my, wy = ds, Zs = Xe.typeforce.maybe(
9314
+ const Xe = mf, _y = Vh, yc = gy, vy = ds, Zs = Xe.typeforce.maybe(
9315
9315
  Xe.typeforce.compile({
9316
9316
  compressed: Xe.maybe(Xe.Boolean),
9317
9317
  network: Xe.maybe(Xe.Network)
9318
9318
  })
9319
- ), _y = (e) => e.length === 32 ? e : e.slice(1, 33);
9320
- function vy(e) {
9321
- (0, wy.testEcc)(e);
9319
+ ), Ey = (e) => e.length === 32 ? e : e.slice(1, 33);
9320
+ function xy(e) {
9321
+ (0, vy.testEcc)(e);
9322
9322
  function t(a) {
9323
9323
  return e.isPoint(a);
9324
9324
  }
@@ -9342,7 +9342,7 @@ function vy(e) {
9342
9342
  }
9343
9343
  function s(a) {
9344
9344
  Xe.typeforce(Zs, a), a === void 0 && (a = {});
9345
- const f = a.rng || gy;
9345
+ const f = a.rng || _y;
9346
9346
  let l;
9347
9347
  do
9348
9348
  l = f(32), Xe.typeforce(Xe.Buffer256bit, l);
@@ -9403,7 +9403,7 @@ function vy(e) {
9403
9403
  return e.verifySchnorr(f, this.publicKey.subarray(1, 33), l);
9404
9404
  }
9405
9405
  tweakFromPublicKey(f) {
9406
- const l = _y(this.publicKey), d = e.xOnlyPointAddTweak(l, f);
9406
+ const l = Ey(this.publicKey), d = e.xOnlyPointAddTweak(l, f);
9407
9407
  if (!d || d.xOnlyPubkey === null)
9408
9408
  throw new Error("Cannot tweak public key!");
9409
9409
  const p = Buffer.from([
@@ -9431,7 +9431,7 @@ function vy(e) {
9431
9431
  makeRandom: s
9432
9432
  };
9433
9433
  }
9434
- on.ECPairFactory = vy;
9434
+ on.ECPairFactory = xy;
9435
9435
  (function(e) {
9436
9436
  Object.defineProperty(e, "__esModule", { value: !0 }), e.networks = e.ECPairFactory = e.default = void 0;
9437
9437
  var t = on;
@@ -9452,7 +9452,7 @@ on.ECPairFactory = vy;
9452
9452
  }
9453
9453
  });
9454
9454
  })(yf);
9455
- const Ey = /* @__PURE__ */ Pl(yf);
9455
+ const Sy = /* @__PURE__ */ Rl(yf);
9456
9456
  class Di extends Uc {
9457
9457
  get isInitialized() {
9458
9458
  return !!this.digestKey;
@@ -9526,7 +9526,7 @@ class Di extends Uc {
9526
9526
  if (l.error) return G(l.error);
9527
9527
  this.digestKey = l.val;
9528
9528
  }
9529
- const r = Ey(Pr), n = "Garden.fi" + t.toString(), i = Buffer.from(n, "utf8"), s = ai(i), o = Buffer.from(Bt(this.digestKey), "hex");
9529
+ const r = Sy(Pr), n = "Garden.fi" + t.toString(), i = Buffer.from(n, "utf8"), s = ai(i), o = Buffer.from(Bt(this.digestKey), "hex");
9530
9530
  if (o.length !== 32)
9531
9531
  return G("Invalid private key length. Expected 32 bytes.");
9532
9532
  const f = r.fromPrivateKey(o).sign(Buffer.from(Bt(s), "hex"));
@@ -9537,16 +9537,16 @@ function $i(e) {
9537
9537
  if (!Number.isSafeInteger(e) || e < 0)
9538
9538
  throw new Error("positive integer expected, got " + e);
9539
9539
  }
9540
- function xy(e) {
9540
+ function Ay(e) {
9541
9541
  return e instanceof Uint8Array || ArrayBuffer.isView(e) && e.constructor.name === "Uint8Array";
9542
9542
  }
9543
9543
  function ei(e, ...t) {
9544
- if (!xy(e))
9544
+ if (!Ay(e))
9545
9545
  throw new Error("Uint8Array expected");
9546
9546
  if (t.length > 0 && !t.includes(e.length))
9547
9547
  throw new Error("Uint8Array expected of length " + t + ", got length=" + e.length);
9548
9548
  }
9549
- function Sy(e) {
9549
+ function By(e) {
9550
9550
  if (typeof e != "function" || typeof e.create != "function")
9551
9551
  throw new Error("Hash should be wrapped by utils.wrapConstructor");
9552
9552
  $i(e.outputLen), $i(e.blockLen);
@@ -9565,7 +9565,7 @@ function Qf(e, t) {
9565
9565
  }
9566
9566
  const qr = typeof globalThis == "object" && "crypto" in globalThis ? globalThis.crypto : void 0;
9567
9567
  /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
9568
- function Ay(e) {
9568
+ function Iy(e) {
9569
9569
  return new Uint32Array(e.buffer, e.byteOffset, Math.floor(e.byteLength / 4));
9570
9570
  }
9571
9571
  function Js(e) {
@@ -9575,22 +9575,22 @@ function vt(e, t) {
9575
9575
  return e << 32 - t | e >>> t;
9576
9576
  }
9577
9577
  const mc = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
9578
- function By(e) {
9578
+ function Ty(e) {
9579
9579
  return e << 24 & 4278190080 | e << 8 & 16711680 | e >>> 8 & 65280 | e >>> 24 & 255;
9580
9580
  }
9581
9581
  function bc(e) {
9582
9582
  for (let t = 0; t < e.length; t++)
9583
- e[t] = By(e[t]);
9583
+ e[t] = Ty(e[t]);
9584
9584
  }
9585
- function Iy(e) {
9585
+ function ky(e) {
9586
9586
  if (typeof e != "string")
9587
9587
  throw new Error("utf8ToBytes expected string, got " + typeof e);
9588
9588
  return new Uint8Array(new TextEncoder().encode(e));
9589
9589
  }
9590
9590
  function hs(e) {
9591
- return typeof e == "string" && (e = Iy(e)), ei(e), e;
9591
+ return typeof e == "string" && (e = ky(e)), ei(e), e;
9592
9592
  }
9593
- function Ty(...e) {
9593
+ function Py(...e) {
9594
9594
  let t = 0;
9595
9595
  for (let n = 0; n < e.length; n++) {
9596
9596
  const i = e[n];
@@ -9613,26 +9613,26 @@ function eu(e) {
9613
9613
  const t = (n) => e().update(hs(n)).digest(), r = e();
9614
9614
  return t.outputLen = r.outputLen, t.blockLen = r.blockLen, t.create = () => e(), t;
9615
9615
  }
9616
- function ky(e = 32) {
9616
+ function Oy(e = 32) {
9617
9617
  if (qr && typeof qr.getRandomValues == "function")
9618
9618
  return qr.getRandomValues(new Uint8Array(e));
9619
9619
  if (qr && typeof qr.randomBytes == "function")
9620
9620
  return qr.randomBytes(e);
9621
9621
  throw new Error("crypto.getRandomValues must be defined");
9622
9622
  }
9623
- function Py(e, t, r, n) {
9623
+ function Ry(e, t, r, n) {
9624
9624
  if (typeof e.setBigUint64 == "function")
9625
9625
  return e.setBigUint64(t, r, n);
9626
9626
  const i = BigInt(32), s = BigInt(4294967295), o = Number(r >> i & s), a = Number(r & s), f = n ? 4 : 0, l = n ? 0 : 4;
9627
9627
  e.setUint32(t + f, o, n), e.setUint32(t + l, a, n);
9628
9628
  }
9629
- function Oy(e, t, r) {
9629
+ function Cy(e, t, r) {
9630
9630
  return e & t ^ ~e & r;
9631
9631
  }
9632
- function Ry(e, t, r) {
9632
+ function Uy(e, t, r) {
9633
9633
  return e & t ^ e & r ^ t & r;
9634
9634
  }
9635
- class Cy extends Yo {
9635
+ class Ly extends Yo {
9636
9636
  constructor(t, r, n, i) {
9637
9637
  super(), this.blockLen = t, this.outputLen = r, this.padOffset = n, this.isLE = i, this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.buffer = new Uint8Array(t), this.view = Js(this.buffer);
9638
9638
  }
@@ -9660,7 +9660,7 @@ class Cy extends Yo {
9660
9660
  r[o++] = 128, this.buffer.subarray(o).fill(0), this.padOffset > i - o && (this.process(n, 0), o = 0);
9661
9661
  for (let p = o; p < i; p++)
9662
9662
  r[p] = 0;
9663
- Py(n, i - 8, BigInt(this.length * 8), s), this.process(n, 0);
9663
+ Ry(n, i - 8, BigInt(this.length * 8), s), this.process(n, 0);
9664
9664
  const a = Js(t), f = this.outputLen;
9665
9665
  if (f % 4)
9666
9666
  throw new Error("_sha2: outputLen should be aligned to 32bit");
@@ -9682,7 +9682,7 @@ class Cy extends Yo {
9682
9682
  return t.length = i, t.pos = a, t.finished = s, t.destroyed = o, i % r && t.buffer.set(n), t;
9683
9683
  }
9684
9684
  }
9685
- const Uy = /* @__PURE__ */ new Uint32Array([
9685
+ const Ny = /* @__PURE__ */ new Uint32Array([
9686
9686
  1116352408,
9687
9687
  1899447441,
9688
9688
  3049323471,
@@ -9757,7 +9757,7 @@ const Uy = /* @__PURE__ */ new Uint32Array([
9757
9757
  528734635,
9758
9758
  1541459225
9759
9759
  ]), nr = /* @__PURE__ */ new Uint32Array(64);
9760
- class Ly extends Cy {
9760
+ class Hy extends Ly {
9761
9761
  constructor() {
9762
9762
  super(64, 32, 8, !1), this.A = rr[0] | 0, this.B = rr[1] | 0, this.C = rr[2] | 0, this.D = rr[3] | 0, this.E = rr[4] | 0, this.F = rr[5] | 0, this.G = rr[6] | 0, this.H = rr[7] | 0;
9763
9763
  }
@@ -9778,7 +9778,7 @@ class Ly extends Cy {
9778
9778
  }
9779
9779
  let { A: n, B: i, C: s, D: o, E: a, F: f, G: l, H: d } = this;
9780
9780
  for (let p = 0; p < 64; p++) {
9781
- const w = vt(a, 6) ^ vt(a, 11) ^ vt(a, 25), y = d + w + Oy(a, f, l) + Uy[p] + nr[p] | 0, S = (vt(n, 2) ^ vt(n, 13) ^ vt(n, 22)) + Ry(n, i, s) | 0;
9781
+ const w = vt(a, 6) ^ vt(a, 11) ^ vt(a, 25), y = d + w + Cy(a, f, l) + Ny[p] + nr[p] | 0, S = (vt(n, 2) ^ vt(n, 13) ^ vt(n, 22)) + Uy(n, i, s) | 0;
9782
9782
  d = l, l = f, f = a, a = o + y | 0, o = s, s = i, i = n, n = y + S | 0;
9783
9783
  }
9784
9784
  n = n + this.A | 0, i = i + this.B | 0, s = s + this.C | 0, o = o + this.D | 0, a = a + this.E | 0, f = f + this.F | 0, l = l + this.G | 0, d = d + this.H | 0, this.set(n, i, s, o, a, f, l, d);
@@ -9790,10 +9790,10 @@ class Ly extends Cy {
9790
9790
  this.set(0, 0, 0, 0, 0, 0, 0, 0), this.buffer.fill(0);
9791
9791
  }
9792
9792
  }
9793
- const tu = /* @__PURE__ */ eu(() => new Ly());
9793
+ const tu = /* @__PURE__ */ eu(() => new Hy());
9794
9794
  class ru extends Yo {
9795
9795
  constructor(t, r) {
9796
- super(), this.finished = !1, this.destroyed = !1, Sy(t);
9796
+ super(), this.finished = !1, this.destroyed = !1, By(t);
9797
9797
  const n = hs(r);
9798
9798
  if (this.iHash = t.create(), typeof this.iHash.update != "function")
9799
9799
  throw new Error("Expected instance of class which extends utils.Hash");
@@ -9829,7 +9829,7 @@ class ru extends Yo {
9829
9829
  const nu = (e, t, r) => new ru(e, t).update(r).digest();
9830
9830
  nu.create = (e, t) => new ru(e, t);
9831
9831
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
9832
- const ps = /* @__PURE__ */ BigInt(0), ys = /* @__PURE__ */ BigInt(1), Ny = /* @__PURE__ */ BigInt(2);
9832
+ const ps = /* @__PURE__ */ BigInt(0), ys = /* @__PURE__ */ BigInt(1), Fy = /* @__PURE__ */ BigInt(2);
9833
9833
  function Ur(e) {
9834
9834
  return e instanceof Uint8Array || ArrayBuffer.isView(e) && e.constructor.name === "Uint8Array";
9835
9835
  }
@@ -9841,12 +9841,12 @@ function un(e, t) {
9841
9841
  if (typeof t != "boolean")
9842
9842
  throw new Error(e + " boolean expected, got " + t);
9843
9843
  }
9844
- const Hy = /* @__PURE__ */ Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0"));
9844
+ const My = /* @__PURE__ */ Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0"));
9845
9845
  function ln(e) {
9846
9846
  ti(e);
9847
9847
  let t = "";
9848
9848
  for (let r = 0; r < e.length; r++)
9849
- t += Hy[e[r]];
9849
+ t += My[e[r]];
9850
9850
  return t;
9851
9851
  }
9852
9852
  function Zr(e) {
@@ -9896,7 +9896,7 @@ function hn(e, t) {
9896
9896
  function Jo(e, t) {
9897
9897
  return hn(e, t).reverse();
9898
9898
  }
9899
- function Fy(e) {
9899
+ function Dy(e) {
9900
9900
  return dn(Zr(e));
9901
9901
  }
9902
9902
  function ht(e, t, r) {
@@ -9929,7 +9929,7 @@ function Vn(...e) {
9929
9929
  }
9930
9930
  return r;
9931
9931
  }
9932
- function My(e, t) {
9932
+ function $y(e, t) {
9933
9933
  if (e.length !== t.length)
9934
9934
  return !1;
9935
9935
  let r = 0;
@@ -9937,7 +9937,7 @@ function My(e, t) {
9937
9937
  r |= e[n] ^ t[n];
9938
9938
  return r === 0;
9939
9939
  }
9940
- function Dy(e) {
9940
+ function jy(e) {
9941
9941
  if (typeof e != "string")
9942
9942
  throw new Error("string expected");
9943
9943
  return new Uint8Array(new TextEncoder().encode(e));
@@ -9956,13 +9956,13 @@ function iu(e) {
9956
9956
  ;
9957
9957
  return t;
9958
9958
  }
9959
- function $y(e, t) {
9959
+ function zy(e, t) {
9960
9960
  return e >> BigInt(t) & ys;
9961
9961
  }
9962
- function jy(e, t, r) {
9962
+ function Vy(e, t, r) {
9963
9963
  return e | (r ? ys : ps) << BigInt(t);
9964
9964
  }
9965
- const Qo = (e) => (Ny << BigInt(e - 1)) - ys, eo = (e) => new Uint8Array(e), wc = (e) => Uint8Array.from(e);
9965
+ const Qo = (e) => (Fy << BigInt(e - 1)) - ys, eo = (e) => new Uint8Array(e), wc = (e) => Uint8Array.from(e);
9966
9966
  function su(e, t, r) {
9967
9967
  if (typeof e != "number" || e < 2)
9968
9968
  throw new Error("hashLen must be a number");
@@ -9995,7 +9995,7 @@ function su(e, t, r) {
9995
9995
  return o(), y;
9996
9996
  };
9997
9997
  }
9998
- const zy = {
9998
+ const Gy = {
9999
9999
  bigint: (e) => typeof e == "bigint",
10000
10000
  function: (e) => typeof e == "function",
10001
10001
  boolean: (e) => typeof e == "boolean",
@@ -10008,7 +10008,7 @@ const zy = {
10008
10008
  };
10009
10009
  function ri(e, t, r = {}) {
10010
10010
  const n = (i, s, o) => {
10011
- const a = zy[s];
10011
+ const a = Gy[s];
10012
10012
  if (typeof a != "function")
10013
10013
  throw new Error("invalid validator function");
10014
10014
  const f = e[i];
@@ -10021,7 +10021,7 @@ function ri(e, t, r = {}) {
10021
10021
  n(i, s, !0);
10022
10022
  return e;
10023
10023
  }
10024
- const Vy = () => {
10024
+ const qy = () => {
10025
10025
  throw new Error("not implemented");
10026
10026
  };
10027
10027
  function Eo(e) {
@@ -10034,42 +10034,42 @@ function Eo(e) {
10034
10034
  return t.set(r, s), s;
10035
10035
  };
10036
10036
  }
10037
- const Gy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10037
+ const Wy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10038
10038
  __proto__: null,
10039
10039
  aInRange: kr,
10040
10040
  abool: un,
10041
10041
  abytes: ti,
10042
- bitGet: $y,
10042
+ bitGet: zy,
10043
10043
  bitLen: iu,
10044
10044
  bitMask: Qo,
10045
- bitSet: jy,
10045
+ bitSet: Vy,
10046
10046
  bytesToHex: ln,
10047
10047
  bytesToNumberBE: Tr,
10048
10048
  bytesToNumberLE: Zo,
10049
10049
  concatBytes: Vn,
10050
10050
  createHmacDrbg: su,
10051
10051
  ensureBytes: ht,
10052
- equalBytes: My,
10052
+ equalBytes: $y,
10053
10053
  hexToBytes: dn,
10054
10054
  hexToNumber: Xo,
10055
10055
  inRange: ms,
10056
10056
  isBytes: Ur,
10057
10057
  memoized: Eo,
10058
- notImplemented: Vy,
10058
+ notImplemented: qy,
10059
10059
  numberToBytesBE: hn,
10060
10060
  numberToBytesLE: Jo,
10061
10061
  numberToHexUnpadded: Zr,
10062
- numberToVarBytesBE: Fy,
10063
- utf8ToBytes: Dy,
10062
+ numberToVarBytesBE: Dy,
10063
+ utf8ToBytes: jy,
10064
10064
  validateObject: ri
10065
10065
  }, Symbol.toStringTag, { value: "Module" }));
10066
10066
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
10067
- const Ue = BigInt(0), Te = BigInt(1), Ar = /* @__PURE__ */ BigInt(2), qy = /* @__PURE__ */ BigInt(3), xo = /* @__PURE__ */ BigInt(4), _c = /* @__PURE__ */ BigInt(5), vc = /* @__PURE__ */ BigInt(8);
10067
+ const Ue = BigInt(0), Te = BigInt(1), Ar = /* @__PURE__ */ BigInt(2), Ky = /* @__PURE__ */ BigInt(3), xo = /* @__PURE__ */ BigInt(4), _c = /* @__PURE__ */ BigInt(5), vc = /* @__PURE__ */ BigInt(8);
10068
10068
  function Qe(e, t) {
10069
10069
  const r = e % t;
10070
10070
  return r >= Ue ? r : t + r;
10071
10071
  }
10072
- function Wy(e, t, r) {
10072
+ function Yy(e, t, r) {
10073
10073
  if (t < Ue)
10074
10074
  throw new Error("invalid exponent, negatives unsupported");
10075
10075
  if (r <= Ue)
@@ -10101,12 +10101,12 @@ function So(e, t) {
10101
10101
  throw new Error("invert: does not exist");
10102
10102
  return Qe(i, t);
10103
10103
  }
10104
- function Ky(e) {
10104
+ function Xy(e) {
10105
10105
  const t = (e - Te) / Ar;
10106
10106
  let r, n, i;
10107
10107
  for (r = e - Te, n = 0; r % Ar === Ue; r /= Ar, n++)
10108
10108
  ;
10109
- for (i = Ar; i < e && Wy(i, t, e) !== e - Te; i++)
10109
+ for (i = Ar; i < e && Yy(i, t, e) !== e - Te; i++)
10110
10110
  if (i > 1e3)
10111
10111
  throw new Error("Cannot find square root: likely non-prime P");
10112
10112
  if (n === 1) {
@@ -10135,8 +10135,8 @@ function Ky(e) {
10135
10135
  return p;
10136
10136
  };
10137
10137
  }
10138
- function Yy(e) {
10139
- if (e % xo === qy) {
10138
+ function Zy(e) {
10139
+ if (e % xo === Ky) {
10140
10140
  const t = (e + Te) / xo;
10141
10141
  return function(n, i) {
10142
10142
  const s = n.pow(i, t);
@@ -10154,9 +10154,9 @@ function Yy(e) {
10154
10154
  return l;
10155
10155
  };
10156
10156
  }
10157
- return Ky(e);
10157
+ return Xy(e);
10158
10158
  }
10159
- const Xy = [
10159
+ const Jy = [
10160
10160
  "create",
10161
10161
  "isValid",
10162
10162
  "is0",
@@ -10175,16 +10175,16 @@ const Xy = [
10175
10175
  "mulN",
10176
10176
  "sqrN"
10177
10177
  ];
10178
- function Zy(e) {
10178
+ function Qy(e) {
10179
10179
  const t = {
10180
10180
  ORDER: "bigint",
10181
10181
  MASK: "bigint",
10182
10182
  BYTES: "isSafeInteger",
10183
10183
  BITS: "isSafeInteger"
10184
- }, r = Xy.reduce((n, i) => (n[i] = "function", n), t);
10184
+ }, r = Jy.reduce((n, i) => (n[i] = "function", n), t);
10185
10185
  return ri(e, r);
10186
10186
  }
10187
- function Jy(e, t, r) {
10187
+ function em(e, t, r) {
10188
10188
  if (r < Ue)
10189
10189
  throw new Error("invalid exponent, negatives unsupported");
10190
10190
  if (r === Ue)
@@ -10196,7 +10196,7 @@ function Jy(e, t, r) {
10196
10196
  r & Te && (n = e.mul(n, i)), i = e.sqr(i), r >>= Te;
10197
10197
  return n;
10198
10198
  }
10199
- function Qy(e, t) {
10199
+ function tm(e, t) {
10200
10200
  const r = new Array(t.length), n = t.reduce((s, o, a) => e.is0(o) ? s : (r[a] = s, e.mul(s, o)), e.ONE), i = e.inv(n);
10201
10201
  return t.reduceRight((s, o, a) => e.is0(o) ? s : (r[a] = e.mul(s, r[a]), e.mul(s, o)), i), r;
10202
10202
  }
@@ -10233,7 +10233,7 @@ function au(e, t, r = !1, n = {}) {
10233
10233
  add: (f, l) => Qe(f + l, e),
10234
10234
  sub: (f, l) => Qe(f - l, e),
10235
10235
  mul: (f, l) => Qe(f * l, e),
10236
- pow: (f, l) => Jy(a, f, l),
10236
+ pow: (f, l) => em(a, f, l),
10237
10237
  div: (f, l) => Qe(f * So(l, e), e),
10238
10238
  // Same as above, but doesn't normalize
10239
10239
  sqrN: (f) => f * f,
@@ -10241,8 +10241,8 @@ function au(e, t, r = !1, n = {}) {
10241
10241
  subN: (f, l) => f - l,
10242
10242
  mulN: (f, l) => f * l,
10243
10243
  inv: (f) => So(f, e),
10244
- sqrt: n.sqrt || ((f) => (o || (o = Yy(e)), o(a, f))),
10245
- invertBatch: (f) => Qy(a, f),
10244
+ sqrt: n.sqrt || ((f) => (o || (o = Zy(e)), o(a, f))),
10245
+ invertBatch: (f) => tm(a, f),
10246
10246
  // TODO: do we really need constant cmov?
10247
10247
  // We don't have const-time bigints anyway, so probably will be not very useful
10248
10248
  cmov: (f, l, d) => d ? l : f,
@@ -10265,7 +10265,7 @@ function fu(e) {
10265
10265
  const t = cu(e);
10266
10266
  return t + Math.ceil(t / 2);
10267
10267
  }
10268
- function em(e, t, r = !1) {
10268
+ function rm(e, t, r = !1) {
10269
10269
  const n = e.length, i = cu(t), s = fu(t);
10270
10270
  if (n < 16 || n < s || n > 1024)
10271
10271
  throw new Error("expected " + s + "-1024 bytes of input, got " + n);
@@ -10287,7 +10287,7 @@ function ro(e, t) {
10287
10287
  const r = Math.ceil(t / e) + 1, n = 2 ** (e - 1);
10288
10288
  return { windows: r, windowSize: n };
10289
10289
  }
10290
- function tm(e, t) {
10290
+ function nm(e, t) {
10291
10291
  if (!Array.isArray(e))
10292
10292
  throw new Error("array expected");
10293
10293
  e.forEach((r, n) => {
@@ -10295,7 +10295,7 @@ function tm(e, t) {
10295
10295
  throw new Error("invalid point at index " + n);
10296
10296
  });
10297
10297
  }
10298
- function rm(e, t) {
10298
+ function im(e, t) {
10299
10299
  if (!Array.isArray(e))
10300
10300
  throw new Error("array of scalars expected");
10301
10301
  e.forEach((r, n) => {
@@ -10307,7 +10307,7 @@ const no = /* @__PURE__ */ new WeakMap(), lu = /* @__PURE__ */ new WeakMap();
10307
10307
  function io(e) {
10308
10308
  return lu.get(e) || 1;
10309
10309
  }
10310
- function nm(e, t) {
10310
+ function sm(e, t) {
10311
10311
  return {
10312
10312
  constTimeNegate: to,
10313
10313
  hasPrecomputes(r) {
@@ -10405,8 +10405,8 @@ function nm(e, t) {
10405
10405
  }
10406
10406
  };
10407
10407
  }
10408
- function im(e, t, r, n) {
10409
- if (tm(r, e), rm(n, t), r.length !== n.length)
10408
+ function om(e, t, r, n) {
10409
+ if (nm(r, e), im(n, t), r.length !== n.length)
10410
10410
  throw new Error("arrays of points and scalars must have equal length");
10411
10411
  const i = e.ZERO, s = iu(BigInt(r.length)), o = s > 12 ? s - 3 : s > 4 ? s - 2 : s ? 2 : 1, a = (1 << o) - 1, f = new Array(a + 1).fill(i), l = Math.floor((t.BITS - 1) / o) * o;
10412
10412
  let d = i;
@@ -10426,7 +10426,7 @@ function im(e, t, r, n) {
10426
10426
  return d;
10427
10427
  }
10428
10428
  function du(e) {
10429
- return Zy(e.Fp), ri(e, {
10429
+ return Qy(e.Fp), ri(e, {
10430
10430
  n: "bigint",
10431
10431
  h: "bigint",
10432
10432
  Gx: "field",
@@ -10444,7 +10444,7 @@ function du(e) {
10444
10444
  function xc(e) {
10445
10445
  e.lowS !== void 0 && un("lowS", e.lowS), e.prehash !== void 0 && un("prehash", e.prehash);
10446
10446
  }
10447
- function sm(e) {
10447
+ function am(e) {
10448
10448
  const t = du(e);
10449
10449
  ri(t, {
10450
10450
  a: "field",
@@ -10467,15 +10467,15 @@ function sm(e) {
10467
10467
  }
10468
10468
  return Object.freeze({ ...t });
10469
10469
  }
10470
- const { bytesToNumberBE: om, hexToBytes: am } = Gy;
10471
- class cm extends Error {
10470
+ const { bytesToNumberBE: cm, hexToBytes: fm } = Wy;
10471
+ class um extends Error {
10472
10472
  constructor(t = "") {
10473
10473
  super(t);
10474
10474
  }
10475
10475
  }
10476
10476
  const Ht = {
10477
10477
  // asn.1 DER encoding utils
10478
- Err: cm,
10478
+ Err: um,
10479
10479
  // Basic building block is TLV (Tag-Length-Value)
10480
10480
  _tlv: {
10481
10481
  encode: (e, t) => {
@@ -10544,11 +10544,11 @@ const Ht = {
10544
10544
  throw new t("invalid signature integer: negative");
10545
10545
  if (e[0] === 0 && !(e[1] & 128))
10546
10546
  throw new t("invalid signature integer: unnecessary leading zero");
10547
- return om(e);
10547
+ return cm(e);
10548
10548
  }
10549
10549
  },
10550
10550
  toSig(e) {
10551
- const { Err: t, _int: r, _tlv: n } = Ht, i = typeof e == "string" ? am(e) : e;
10551
+ const { Err: t, _int: r, _tlv: n } = Ht, i = typeof e == "string" ? fm(e) : e;
10552
10552
  ti(i);
10553
10553
  const { v: s, l: o } = n.decode(48, i);
10554
10554
  if (o.length)
@@ -10566,8 +10566,8 @@ const Ht = {
10566
10566
  BigInt(2);
10567
10567
  const Sc = BigInt(3);
10568
10568
  BigInt(4);
10569
- function fm(e) {
10570
- const t = sm(e), { Fp: r } = t, n = au(t.n, t.nBitLength), i = t.toBytes || ((S, _, A) => {
10569
+ function lm(e) {
10570
+ const t = am(e), { Fp: r } = t, n = au(t.n, t.nBitLength), i = t.toBytes || ((S, _, A) => {
10571
10571
  const k = _.toAffine();
10572
10572
  return Vn(Uint8Array.from([4]), r.toBytes(k.x), r.toBytes(k.y));
10573
10573
  }), s = t.fromBytes || ((S) => {
@@ -10681,7 +10681,7 @@ function fm(e) {
10681
10681
  }
10682
10682
  // Multiscalar Multiplication
10683
10683
  static msm(_, A) {
10684
- return im(w, n, _, A);
10684
+ return om(w, n, _, A);
10685
10685
  }
10686
10686
  // "Private method", don't use it directly
10687
10687
  _setWindowSize(_) {
@@ -10822,7 +10822,7 @@ function fm(e) {
10822
10822
  }
10823
10823
  }
10824
10824
  w.BASE = new w(t.Gx, t.Gy, r.ONE), w.ZERO = new w(r.ZERO, r.ONE, r.ZERO);
10825
- const y = t.nBitLength, I = nm(w, t.endo ? Math.ceil(y / 2) : y);
10825
+ const y = t.nBitLength, I = sm(w, t.endo ? Math.ceil(y / 2) : y);
10826
10826
  return {
10827
10827
  CURVE: t,
10828
10828
  ProjectivePoint: w,
@@ -10831,7 +10831,7 @@ function fm(e) {
10831
10831
  isWithinCurveOrder: a
10832
10832
  };
10833
10833
  }
10834
- function um(e) {
10834
+ function dm(e) {
10835
10835
  const t = du(e);
10836
10836
  return ri(t, {
10837
10837
  hash: "hash",
@@ -10843,15 +10843,15 @@ function um(e) {
10843
10843
  lowS: "boolean"
10844
10844
  }), Object.freeze({ lowS: !0, ...t });
10845
10845
  }
10846
- function lm(e) {
10847
- const t = um(e), { Fp: r, n } = t, i = r.BYTES + 1, s = 2 * r.BYTES + 1;
10846
+ function hm(e) {
10847
+ const t = dm(e), { Fp: r, n } = t, i = r.BYTES + 1, s = 2 * r.BYTES + 1;
10848
10848
  function o(N) {
10849
10849
  return Qe(N, n);
10850
10850
  }
10851
10851
  function a(N) {
10852
10852
  return So(N, n);
10853
10853
  }
10854
- const { ProjectivePoint: f, normPrivateKeyToScalar: l, weierstrassEquation: d, isWithinCurveOrder: p } = fm({
10854
+ const { ProjectivePoint: f, normPrivateKeyToScalar: l, weierstrassEquation: d, isWithinCurveOrder: p } = lm({
10855
10855
  ...t,
10856
10856
  toBytes(N, $, z) {
10857
10857
  const W = $.toAffine(), Z = r.toBytes(W.x), ie = Vn;
@@ -10960,7 +10960,7 @@ function lm(e) {
10960
10960
  */
10961
10961
  randomPrivateKey: () => {
10962
10962
  const N = fu(t.n);
10963
- return em(t.randomBytes(N), t.n);
10963
+ return rm(t.randomBytes(N), t.n);
10964
10964
  },
10965
10965
  /**
10966
10966
  * Creates precompute table for an arbitrary EC point. Makes point "cached".
@@ -11077,26 +11077,26 @@ function lm(e) {
11077
11077
  };
11078
11078
  }
11079
11079
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
11080
- function dm(e) {
11080
+ function pm(e) {
11081
11081
  return {
11082
11082
  hash: e,
11083
- hmac: (t, ...r) => nu(e, t, Ty(...r)),
11084
- randomBytes: ky
11083
+ hmac: (t, ...r) => nu(e, t, Py(...r)),
11084
+ randomBytes: Oy
11085
11085
  };
11086
11086
  }
11087
- function hm(e, t) {
11088
- const r = (n) => lm({ ...e, ...dm(n) });
11087
+ function ym(e, t) {
11088
+ const r = (n) => hm({ ...e, ...pm(n) });
11089
11089
  return { ...r(t), create: r };
11090
11090
  }
11091
11091
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
11092
- const hu = BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"), Ac = BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"), pm = BigInt(1), Ao = BigInt(2), Bc = (e, t) => (e + t / Ao) / t;
11093
- function ym(e) {
11092
+ const hu = BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"), Ac = BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"), mm = BigInt(1), Ao = BigInt(2), Bc = (e, t) => (e + t / Ao) / t;
11093
+ function bm(e) {
11094
11094
  const t = hu, r = BigInt(3), n = BigInt(6), i = BigInt(11), s = BigInt(22), o = BigInt(23), a = BigInt(44), f = BigInt(88), l = e * e * e % t, d = l * l * e % t, p = ot(d, r, t) * d % t, w = ot(p, r, t) * d % t, y = ot(w, Ao, t) * l % t, I = ot(y, i, t) * y % t, S = ot(I, s, t) * I % t, _ = ot(S, a, t) * S % t, A = ot(_, f, t) * _ % t, k = ot(A, a, t) * S % t, E = ot(k, r, t) * d % t, v = ot(E, o, t) * I % t, B = ot(v, n, t) * l % t, x = ot(B, Ao, t);
11095
11095
  if (!Bo.eql(Bo.sqr(x), e))
11096
11096
  throw new Error("Cannot find square root");
11097
11097
  return x;
11098
11098
  }
11099
- const Bo = au(hu, void 0, void 0, { sqrt: ym }), bs = hm({
11099
+ const Bo = au(hu, void 0, void 0, { sqrt: bm }), bs = ym({
11100
11100
  a: BigInt(0),
11101
11101
  // equation params: a, b
11102
11102
  b: BigInt(7),
@@ -11115,7 +11115,7 @@ const Bo = au(hu, void 0, void 0, { sqrt: ym }), bs = hm({
11115
11115
  // Endomorphism, see above
11116
11116
  beta: BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),
11117
11117
  splitScalar: (e) => {
11118
- const t = Ac, r = BigInt("0x3086d221a7d46bcde86c90e49284eb15"), n = -pm * BigInt("0xe4437ed6010e88286f547fa90abfe4c3"), i = BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"), s = r, o = BigInt("0x100000000000000000000000000000000"), a = Bc(s * e, t), f = Bc(-n * e, t);
11118
+ const t = Ac, r = BigInt("0x3086d221a7d46bcde86c90e49284eb15"), n = -mm * BigInt("0xe4437ed6010e88286f547fa90abfe4c3"), i = BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"), s = r, o = BigInt("0x100000000000000000000000000000000"), a = Bc(s * e, t), f = Bc(-n * e, t);
11119
11119
  let l = Qe(e - a * r - f * i, t), d = Qe(-a * n - f * s, t);
11120
11120
  const p = l > o, w = d > o;
11121
11121
  if (p && (l = t - l), w && (d = t - d), l > o || d > o)
@@ -11190,7 +11190,7 @@ class mu extends se {
11190
11190
  super(`Number "${s}" is not in safe ${i ? `${i * 8}-bit ${n ? "signed" : "unsigned"} ` : ""}integer range ${t ? `(${r} to ${t})` : `(above ${r})`}`, { name: "IntegerOutOfRangeError" });
11191
11191
  }
11192
11192
  }
11193
- class mm extends se {
11193
+ class gm extends se {
11194
11194
  constructor({ givenSize: t, maxSize: r }) {
11195
11195
  super(`Size cannot exceed ${r} bytes. Given size: ${t} bytes.`, { name: "SizeOverflowError" });
11196
11196
  }
@@ -11206,7 +11206,7 @@ class gu extends se {
11206
11206
  }
11207
11207
  }
11208
11208
  function yn(e, { dir: t, size: r = 32 } = {}) {
11209
- return typeof e == "string" ? dr(e, { dir: t, size: r }) : bm(e, { dir: t, size: r });
11209
+ return typeof e == "string" ? dr(e, { dir: t, size: r }) : wm(e, { dir: t, size: r });
11210
11210
  }
11211
11211
  function dr(e, { dir: t, size: r = 32 } = {}) {
11212
11212
  if (r === null)
@@ -11220,7 +11220,7 @@ function dr(e, { dir: t, size: r = 32 } = {}) {
11220
11220
  });
11221
11221
  return `0x${n[t === "right" ? "padEnd" : "padStart"](r * 2, "0")}`;
11222
11222
  }
11223
- function bm(e, { dir: t, size: r = 32 } = {}) {
11223
+ function wm(e, { dir: t, size: r = 32 } = {}) {
11224
11224
  if (r === null)
11225
11225
  return e;
11226
11226
  if (e.length > r)
@@ -11248,11 +11248,11 @@ function ji(e, { dir: t = "left" } = {}) {
11248
11248
  n++;
11249
11249
  return r = t === "left" ? r.slice(n) : r.slice(0, r.length - n), typeof e == "string" ? (r.length === 1 && t === "right" && (r = `${r}0`), `0x${r.length % 2 === 1 ? `0${r}` : r}`) : r;
11250
11250
  }
11251
- const gm = /* @__PURE__ */ new TextEncoder();
11251
+ const _m = /* @__PURE__ */ new TextEncoder();
11252
11252
  function wu(e, t = {}) {
11253
- return typeof e == "number" || typeof e == "bigint" ? _m(e, t) : typeof e == "boolean" ? wm(e, t) : ni(e) ? qt(e, t) : _u(e, t);
11253
+ return typeof e == "number" || typeof e == "bigint" ? Em(e, t) : typeof e == "boolean" ? vm(e, t) : ni(e) ? qt(e, t) : _u(e, t);
11254
11254
  }
11255
- function wm(e, t = {}) {
11255
+ function vm(e, t = {}) {
11256
11256
  const r = new Uint8Array(1);
11257
11257
  return r[0] = Number(e), typeof t.size == "number" ? (mn(r, { size: t.size }), yn(r, { size: t.size })) : r;
11258
11258
  }
@@ -11286,17 +11286,17 @@ function qt(e, t = {}) {
11286
11286
  }
11287
11287
  return s;
11288
11288
  }
11289
- function _m(e, t) {
11289
+ function Em(e, t) {
11290
11290
  const r = ut(e, t);
11291
11291
  return qt(r);
11292
11292
  }
11293
11293
  function _u(e, t = {}) {
11294
- const r = gm.encode(e);
11294
+ const r = _m.encode(e);
11295
11295
  return typeof t.size == "number" ? (mn(r, { size: t.size }), yn(r, { dir: "right", size: t.size })) : r;
11296
11296
  }
11297
11297
  function mn(e, { size: t }) {
11298
11298
  if (Fe(e) > t)
11299
- throw new mm({
11299
+ throw new gm({
11300
11300
  givenSize: Fe(e),
11301
11301
  maxSize: t
11302
11302
  });
@@ -11313,7 +11313,7 @@ function or(e, t = {}) {
11313
11313
  function zi(e, t = {}) {
11314
11314
  return Number(or(e, t));
11315
11315
  }
11316
- const vm = /* @__PURE__ */ Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0"));
11316
+ const xm = /* @__PURE__ */ Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0"));
11317
11317
  function Q(e, t = {}) {
11318
11318
  return typeof e == "number" || typeof e == "bigint" ? ut(e, t) : typeof e == "string" ? Vi(e, t) : typeof e == "boolean" ? vu(e, t) : Kt(e, t);
11319
11319
  }
@@ -11324,7 +11324,7 @@ function vu(e, t = {}) {
11324
11324
  function Kt(e, t = {}) {
11325
11325
  let r = "";
11326
11326
  for (let i = 0; i < e.length; i++)
11327
- r += vm[e[i]];
11327
+ r += xm[e[i]];
11328
11328
  const n = `0x${r}`;
11329
11329
  return typeof t.size == "number" ? (mn(n, { size: t.size }), yn(n, { dir: "right", size: t.size })) : n;
11330
11330
  }
@@ -11346,9 +11346,9 @@ function ut(e, t = {}) {
11346
11346
  const a = `0x${(r && i < 0 ? (1n << BigInt(n * 8)) + BigInt(i) : i).toString(16)}`;
11347
11347
  return n ? yn(a, { size: n }) : a;
11348
11348
  }
11349
- const Em = /* @__PURE__ */ new TextEncoder();
11349
+ const Sm = /* @__PURE__ */ new TextEncoder();
11350
11350
  function Vi(e, t = {}) {
11351
- const r = Em.encode(e);
11351
+ const r = Sm.encode(e);
11352
11352
  return Kt(r, t);
11353
11353
  }
11354
11354
  class pt extends se {
@@ -11384,27 +11384,27 @@ class Eu extends Map {
11384
11384
  }
11385
11385
  }
11386
11386
  const wi = /* @__PURE__ */ BigInt(2 ** 32 - 1), Tc = /* @__PURE__ */ BigInt(32);
11387
- function xm(e, t = !1) {
11387
+ function Am(e, t = !1) {
11388
11388
  return t ? { h: Number(e & wi), l: Number(e >> Tc & wi) } : { h: Number(e >> Tc & wi) | 0, l: Number(e & wi) | 0 };
11389
11389
  }
11390
- function Sm(e, t = !1) {
11390
+ function Bm(e, t = !1) {
11391
11391
  let r = new Uint32Array(e.length), n = new Uint32Array(e.length);
11392
11392
  for (let i = 0; i < e.length; i++) {
11393
- const { h: s, l: o } = xm(e[i], t);
11393
+ const { h: s, l: o } = Am(e[i], t);
11394
11394
  [r[i], n[i]] = [s, o];
11395
11395
  }
11396
11396
  return [r, n];
11397
11397
  }
11398
- const Am = (e, t, r) => e << r | t >>> 32 - r, Bm = (e, t, r) => t << r | e >>> 32 - r, Im = (e, t, r) => t << r - 32 | e >>> 64 - r, Tm = (e, t, r) => e << r - 32 | t >>> 64 - r, xu = [], Su = [], Au = [], km = /* @__PURE__ */ BigInt(0), Rn = /* @__PURE__ */ BigInt(1), Pm = /* @__PURE__ */ BigInt(2), Om = /* @__PURE__ */ BigInt(7), Rm = /* @__PURE__ */ BigInt(256), Cm = /* @__PURE__ */ BigInt(113);
11398
+ const Im = (e, t, r) => e << r | t >>> 32 - r, Tm = (e, t, r) => t << r | e >>> 32 - r, km = (e, t, r) => t << r - 32 | e >>> 64 - r, Pm = (e, t, r) => e << r - 32 | t >>> 64 - r, xu = [], Su = [], Au = [], Om = /* @__PURE__ */ BigInt(0), Rn = /* @__PURE__ */ BigInt(1), Rm = /* @__PURE__ */ BigInt(2), Cm = /* @__PURE__ */ BigInt(7), Um = /* @__PURE__ */ BigInt(256), Lm = /* @__PURE__ */ BigInt(113);
11399
11399
  for (let e = 0, t = Rn, r = 1, n = 0; e < 24; e++) {
11400
11400
  [r, n] = [n, (2 * r + 3 * n) % 5], xu.push(2 * (5 * n + r)), Su.push((e + 1) * (e + 2) / 2 % 64);
11401
- let i = km;
11401
+ let i = Om;
11402
11402
  for (let s = 0; s < 7; s++)
11403
- t = (t << Rn ^ (t >> Om) * Cm) % Rm, t & Pm && (i ^= Rn << (Rn << /* @__PURE__ */ BigInt(s)) - Rn);
11403
+ t = (t << Rn ^ (t >> Cm) * Lm) % Um, t & Rm && (i ^= Rn << (Rn << /* @__PURE__ */ BigInt(s)) - Rn);
11404
11404
  Au.push(i);
11405
11405
  }
11406
- const [Um, Lm] = /* @__PURE__ */ Sm(Au, !0), kc = (e, t, r) => r > 32 ? Im(e, t, r) : Am(e, t, r), Pc = (e, t, r) => r > 32 ? Tm(e, t, r) : Bm(e, t, r);
11407
- function Nm(e, t = 24) {
11406
+ const [Nm, Hm] = /* @__PURE__ */ Bm(Au, !0), kc = (e, t, r) => r > 32 ? km(e, t, r) : Im(e, t, r), Pc = (e, t, r) => r > 32 ? Pm(e, t, r) : Tm(e, t, r);
11407
+ function Fm(e, t = 24) {
11408
11408
  const r = new Uint32Array(10);
11409
11409
  for (let n = 24 - t; n < 24; n++) {
11410
11410
  for (let o = 0; o < 10; o++)
@@ -11425,7 +11425,7 @@ function Nm(e, t = 24) {
11425
11425
  for (let a = 0; a < 10; a++)
11426
11426
  e[o + a] ^= ~r[(a + 2) % 10] & r[(a + 4) % 10];
11427
11427
  }
11428
- e[0] ^= Um[n], e[1] ^= Lm[n];
11428
+ e[0] ^= Nm[n], e[1] ^= Hm[n];
11429
11429
  }
11430
11430
  r.fill(0);
11431
11431
  }
@@ -11434,10 +11434,10 @@ class ea extends Yo {
11434
11434
  constructor(t, r, n, i = !1, s = 24) {
11435
11435
  if (super(), this.blockLen = t, this.suffix = r, this.outputLen = n, this.enableXOF = i, this.rounds = s, this.pos = 0, this.posOut = 0, this.finished = !1, this.destroyed = !1, $i(n), 0 >= this.blockLen || this.blockLen >= 200)
11436
11436
  throw new Error("Sha3 supports only keccak-f1600 function");
11437
- this.state = new Uint8Array(200), this.state32 = Ay(this.state);
11437
+ this.state = new Uint8Array(200), this.state32 = Iy(this.state);
11438
11438
  }
11439
11439
  keccak() {
11440
- mc || bc(this.state32), Nm(this.state32, this.rounds), mc || bc(this.state32), this.posOut = 0, this.pos = 0;
11440
+ mc || bc(this.state32), Fm(this.state32, this.rounds), mc || bc(this.state32), this.posOut = 0, this.pos = 0;
11441
11441
  }
11442
11442
  update(t) {
11443
11443
  fn(this);
@@ -11493,9 +11493,9 @@ class ea extends Yo {
11493
11493
  return t || (t = new ea(r, n, i, o, s)), t.state32.set(this.state32), t.pos = this.pos, t.posOut = this.posOut, t.finished = this.finished, t.rounds = s, t.suffix = n, t.outputLen = i, t.enableXOF = o, t.destroyed = this.destroyed, t;
11494
11494
  }
11495
11495
  }
11496
- const Hm = (e, t, r) => eu(() => new ea(t, e, r)), Fm = /* @__PURE__ */ Hm(1, 136, 256 / 8);
11496
+ const Mm = (e, t, r) => eu(() => new ea(t, e, r)), Dm = /* @__PURE__ */ Mm(1, 136, 256 / 8);
11497
11497
  function ft(e, t) {
11498
- const r = t || "hex", n = Fm(ni(e, { strict: !1 }) ? wu(e) : e);
11498
+ const r = t || "hex", n = Dm(ni(e, { strict: !1 }) ? wu(e) : e);
11499
11499
  return r === "bytes" ? n : Q(n);
11500
11500
  }
11501
11501
  const so = /* @__PURE__ */ new Eu(8192);
@@ -11508,15 +11508,15 @@ function Bu(e, t) {
11508
11508
  const s = `0x${i.join("")}`;
11509
11509
  return so.set(`${e}.${t}`, s), s;
11510
11510
  }
11511
- const Mm = /^0x[a-fA-F0-9]{40}$/, oo = /* @__PURE__ */ new Eu(8192);
11511
+ const $m = /^0x[a-fA-F0-9]{40}$/, oo = /* @__PURE__ */ new Eu(8192);
11512
11512
  function yt(e, t) {
11513
11513
  const { strict: r = !0 } = t ?? {}, n = `${e}.${r}`;
11514
11514
  if (oo.has(n))
11515
11515
  return oo.get(n);
11516
- const i = Mm.test(e) ? e.toLowerCase() === e ? !0 : r ? Bu(e) === e : !0 : !1;
11516
+ const i = $m.test(e) ? e.toLowerCase() === e ? !0 : r ? Bu(e) === e : !0 : !1;
11517
11517
  return oo.set(n, i), i;
11518
11518
  }
11519
- function Dm(e) {
11519
+ function jm(e) {
11520
11520
  if (typeof e == "string") {
11521
11521
  if (!yt(e, { strict: !1 }))
11522
11522
  throw new pt({ address: e });
@@ -11539,11 +11539,11 @@ function Dm(e) {
11539
11539
  type: "local"
11540
11540
  };
11541
11541
  }
11542
- function $m(e) {
11542
+ function zm(e) {
11543
11543
  const t = ft(`0x${e.substring(4)}`).substring(26);
11544
11544
  return Bu(`0x${t}`);
11545
11545
  }
11546
- function jm({ r: e, s: t, to: r = "hex", v: n, yParity: i }) {
11546
+ function Vm({ r: e, s: t, to: r = "hex", v: n, yParity: i }) {
11547
11547
  const s = (() => {
11548
11548
  if (i === 0 || i === 1)
11549
11549
  return i;
@@ -11553,20 +11553,20 @@ function jm({ r: e, s: t, to: r = "hex", v: n, yParity: i }) {
11553
11553
  })(), o = `0x${new bs.Signature(or(e), or(t)).toCompactHex()}${s === 0 ? "1b" : "1c"}`;
11554
11554
  return r === "hex" ? o : qt(o);
11555
11555
  }
11556
- let zm = !1;
11556
+ let Gm = !1;
11557
11557
  async function ii({ hash: e, privateKey: t, to: r = "object" }) {
11558
- const { r: n, s: i, recovery: s } = bs.sign(e.slice(2), t.slice(2), { lowS: !0, extraEntropy: zm }), o = {
11558
+ const { r: n, s: i, recovery: s } = bs.sign(e.slice(2), t.slice(2), { lowS: !0, extraEntropy: Gm }), o = {
11559
11559
  r: ut(n, { size: 32 }),
11560
11560
  s: ut(i, { size: 32 }),
11561
11561
  v: s ? 28n : 27n,
11562
11562
  yParity: s
11563
11563
  };
11564
- return r === "bytes" || r === "hex" ? jm({ ...o, to: r }) : o;
11564
+ return r === "bytes" || r === "hex" ? Vm({ ...o, to: r }) : o;
11565
11565
  }
11566
11566
  function yr(e) {
11567
- return typeof e[0] == "string" ? Mr(e) : Vm(e);
11567
+ return typeof e[0] == "string" ? Mr(e) : qm(e);
11568
11568
  }
11569
- function Vm(e) {
11569
+ function qm(e) {
11570
11570
  let t = 0;
11571
11571
  for (const i of e)
11572
11572
  t += i.length;
@@ -11586,17 +11586,17 @@ class Oc extends se {
11586
11586
  });
11587
11587
  }
11588
11588
  }
11589
- class Gm extends se {
11589
+ class Wm extends se {
11590
11590
  constructor({ length: t, position: r }) {
11591
11591
  super(`Position \`${r}\` is out of bounds (\`0 < position < ${t}\`).`, { name: "PositionOutOfBoundsError" });
11592
11592
  }
11593
11593
  }
11594
- class qm extends se {
11594
+ class Km extends se {
11595
11595
  constructor({ count: t, limit: r }) {
11596
11596
  super(`Recursive read limit of \`${r}\` exceeded (recursive read count: \`${t}\`).`, { name: "RecursiveReadLimitExceededError" });
11597
11597
  }
11598
11598
  }
11599
- const Wm = {
11599
+ const Ym = {
11600
11600
  bytes: new Uint8Array(),
11601
11601
  dataView: new DataView(new ArrayBuffer(0)),
11602
11602
  position: 0,
@@ -11605,14 +11605,14 @@ const Wm = {
11605
11605
  recursiveReadLimit: Number.POSITIVE_INFINITY,
11606
11606
  assertReadLimit() {
11607
11607
  if (this.recursiveReadCount >= this.recursiveReadLimit)
11608
- throw new qm({
11608
+ throw new Km({
11609
11609
  count: this.recursiveReadCount + 1,
11610
11610
  limit: this.recursiveReadLimit
11611
11611
  });
11612
11612
  },
11613
11613
  assertPosition(e) {
11614
11614
  if (e < 0 || e > this.bytes.length - 1)
11615
- throw new Gm({
11615
+ throw new Wm({
11616
11616
  length: this.bytes.length,
11617
11617
  position: e
11618
11618
  });
@@ -11719,7 +11719,7 @@ const Wm = {
11719
11719
  }
11720
11720
  };
11721
11721
  function Iu(e, { recursiveReadLimit: t = 8192 } = {}) {
11722
- const r = Object.create(Wm);
11722
+ const r = Object.create(Ym);
11723
11723
  return r.bytes = e, r.dataView = new DataView(e.buffer, e.byteOffset, e.byteLength), r.positionReadCount = /* @__PURE__ */ new Map(), r.recursiveReadLimit = t, r;
11724
11724
  }
11725
11725
  function mr(e, t = "hex") {
@@ -11727,9 +11727,9 @@ function mr(e, t = "hex") {
11727
11727
  return r.encode(n), t === "hex" ? Kt(n.bytes) : n.bytes;
11728
11728
  }
11729
11729
  function Tu(e) {
11730
- return Array.isArray(e) ? Km(e.map((t) => Tu(t))) : Ym(e);
11730
+ return Array.isArray(e) ? Xm(e.map((t) => Tu(t))) : Zm(e);
11731
11731
  }
11732
- function Km(e) {
11732
+ function Xm(e) {
11733
11733
  const t = e.reduce((i, s) => i + s.length, 0), r = ku(t);
11734
11734
  return {
11735
11735
  length: t <= 55 ? 1 + t : 1 + r + t,
@@ -11740,7 +11740,7 @@ function Km(e) {
11740
11740
  }
11741
11741
  };
11742
11742
  }
11743
- function Ym(e) {
11743
+ function Zm(e) {
11744
11744
  const t = typeof e == "string" ? qt(e) : e, r = ku(t.length);
11745
11745
  return {
11746
11746
  length: t.length === 1 && t[0] < 128 ? 1 : t.length <= 55 ? 1 + t.length : 1 + r + t.length,
@@ -11760,7 +11760,7 @@ function ku(e) {
11760
11760
  return 4;
11761
11761
  throw new se("Length is too large.");
11762
11762
  }
11763
- function Xm(e) {
11763
+ function Jm(e) {
11764
11764
  const { chainId: t, contractAddress: r, nonce: n, to: i } = e, s = ft(Mr([
11765
11765
  "0x05",
11766
11766
  mr([
@@ -11771,9 +11771,9 @@ function Xm(e) {
11771
11771
  ]));
11772
11772
  return i === "bytes" ? qt(s) : s;
11773
11773
  }
11774
- async function Zm(e) {
11774
+ async function Qm(e) {
11775
11775
  const { contractAddress: t, chainId: r, nonce: n, privateKey: i, to: s = "object" } = e, o = await ii({
11776
- hash: Xm({ contractAddress: t, chainId: r, nonce: n }),
11776
+ hash: Jm({ contractAddress: t, chainId: r, nonce: n }),
11777
11777
  privateKey: i,
11778
11778
  to: s
11779
11779
  });
@@ -11784,23 +11784,23 @@ async function Zm(e) {
11784
11784
  ...o
11785
11785
  } : o;
11786
11786
  }
11787
- const Jm = `Ethereum Signed Message:
11787
+ const eb = `Ethereum Signed Message:
11788
11788
  `;
11789
- function Qm(e) {
11790
- const t = typeof e == "string" ? Vi(e) : typeof e.raw == "string" ? e.raw : Kt(e.raw), r = Vi(`${Jm}${Fe(t)}`);
11789
+ function tb(e) {
11790
+ const t = typeof e == "string" ? Vi(e) : typeof e.raw == "string" ? e.raw : Kt(e.raw), r = Vi(`${eb}${Fe(t)}`);
11791
11791
  return yr([r, t]);
11792
11792
  }
11793
- function eb(e, t) {
11794
- return ft(Qm(e), t);
11793
+ function rb(e, t) {
11794
+ return ft(tb(e), t);
11795
11795
  }
11796
- async function tb({ message: e, privateKey: t }) {
11797
- return await ii({ hash: eb(e), privateKey: t, to: "hex" });
11796
+ async function nb({ message: e, privateKey: t }) {
11797
+ return await ii({ hash: rb(e), privateKey: t, to: "hex" });
11798
11798
  }
11799
- const rb = {
11799
+ const ib = {
11800
11800
  ether: -9,
11801
11801
  wei: 9
11802
11802
  };
11803
- function nb(e, t) {
11803
+ function sb(e, t) {
11804
11804
  let r = e.toString();
11805
11805
  const n = r.startsWith("-");
11806
11806
  n && (r = r.slice(1)), r = r.padStart(t, "0");
@@ -11811,27 +11811,27 @@ function nb(e, t) {
11811
11811
  return s = s.replace(/(0+)$/, ""), `${n ? "-" : ""}${i || "0"}${s ? `.${s}` : ""}`;
11812
11812
  }
11813
11813
  function Io(e, t = "wei") {
11814
- return nb(e, rb[t]);
11814
+ return sb(e, ib[t]);
11815
11815
  }
11816
- function ib(e) {
11816
+ function ob(e) {
11817
11817
  const t = Object.entries(e).map(([n, i]) => i === void 0 || i === !1 ? null : [n, i]).filter(Boolean), r = t.reduce((n, [i]) => Math.max(n, i.length), 0);
11818
11818
  return t.map(([n, i]) => ` ${`${n}:`.padEnd(r + 1)} ${i}`).join(`
11819
11819
  `);
11820
11820
  }
11821
- class sb extends se {
11821
+ class ab extends se {
11822
11822
  constructor({ v: t }) {
11823
11823
  super(`Invalid \`v\` value "${t}". Expected 27 or 28.`, {
11824
11824
  name: "InvalidLegacyVError"
11825
11825
  });
11826
11826
  }
11827
11827
  }
11828
- class ob extends se {
11828
+ class cb extends se {
11829
11829
  constructor({ transaction: t }) {
11830
11830
  super("Cannot infer a transaction type from provided transaction.", {
11831
11831
  metaMessages: [
11832
11832
  "Provided Transaction:",
11833
11833
  "{",
11834
- ib(t),
11834
+ ob(t),
11835
11835
  "}",
11836
11836
  "",
11837
11837
  "To infer the type, either provide:",
@@ -11846,7 +11846,7 @@ class ob extends se {
11846
11846
  });
11847
11847
  }
11848
11848
  }
11849
- class ab extends se {
11849
+ class fb extends se {
11850
11850
  constructor({ storageKey: t }) {
11851
11851
  super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${Math.floor((t.length - 2) / 2)} bytes.`, { name: "InvalidStorageKeySizeError" });
11852
11852
  }
@@ -11865,17 +11865,17 @@ function Ou(e) {
11865
11865
  }
11866
11866
  return r === "bytes" ? s : s.map((o) => Kt(o));
11867
11867
  }
11868
- function cb(e, t) {
11868
+ function ub(e, t) {
11869
11869
  return tu(ni(e, { strict: !1 }) ? wu(e) : e);
11870
11870
  }
11871
- function fb(e) {
11872
- const { commitment: t, version: r = 1 } = e, n = e.to ?? (typeof t == "string" ? "hex" : "bytes"), i = cb(t);
11871
+ function lb(e) {
11872
+ const { commitment: t, version: r = 1 } = e, n = e.to ?? (typeof t == "string" ? "hex" : "bytes"), i = ub(t);
11873
11873
  return i.set([r], 0), n === "bytes" ? i : Kt(i);
11874
11874
  }
11875
- function ub(e) {
11875
+ function db(e) {
11876
11876
  const { commitments: t, version: r } = e, n = e.to ?? (typeof t[0] == "string" ? "hex" : "bytes"), i = [];
11877
11877
  for (const s of t)
11878
- i.push(fb({
11878
+ i.push(lb({
11879
11879
  commitment: s,
11880
11880
  to: n,
11881
11881
  version: r
@@ -11885,7 +11885,7 @@ function ub(e) {
11885
11885
  const Rc = 6, Ru = 32, ta = 4096, Cu = Ru * ta, Cc = Cu * Rc - // terminator byte (0x80).
11886
11886
  1 - // zero byte (0x00) appended to each field element.
11887
11887
  1 * ta * Rc, Uu = 1;
11888
- class lb extends se {
11888
+ class hb extends se {
11889
11889
  constructor({ maxSize: t, size: r }) {
11890
11890
  super("Blob size is too large.", {
11891
11891
  metaMessages: [`Max: ${t} bytes`, `Given: ${r} bytes`],
@@ -11898,7 +11898,7 @@ class Lu extends se {
11898
11898
  super("Blob data must not be empty.", { name: "EmptyBlobError" });
11899
11899
  }
11900
11900
  }
11901
- class db extends se {
11901
+ class pb extends se {
11902
11902
  constructor({ hash: t, size: r }) {
11903
11903
  super(`Versioned hash "${t}" size is invalid.`, {
11904
11904
  metaMessages: ["Expected: 32", `Received: ${r}`],
@@ -11906,7 +11906,7 @@ class db extends se {
11906
11906
  });
11907
11907
  }
11908
11908
  }
11909
- class hb extends se {
11909
+ class yb extends se {
11910
11910
  constructor({ hash: t, version: r }) {
11911
11911
  super(`Versioned hash "${t}" version is invalid.`, {
11912
11912
  metaMessages: [
@@ -11917,12 +11917,12 @@ class hb extends se {
11917
11917
  });
11918
11918
  }
11919
11919
  }
11920
- function pb(e) {
11920
+ function mb(e) {
11921
11921
  const t = e.to ?? (typeof e.data == "string" ? "hex" : "bytes"), r = typeof e.data == "string" ? qt(e.data) : e.data, n = Fe(r);
11922
11922
  if (!n)
11923
11923
  throw new Lu();
11924
11924
  if (n > Cc)
11925
- throw new lb({
11925
+ throw new hb({
11926
11926
  maxSize: Cc,
11927
11927
  size: n
11928
11928
  });
@@ -11943,8 +11943,8 @@ function pb(e) {
11943
11943
  }
11944
11944
  return t === "bytes" ? i.map((a) => a.bytes) : i.map((a) => Kt(a.bytes));
11945
11945
  }
11946
- function yb(e) {
11947
- const { data: t, kzg: r, to: n } = e, i = e.blobs ?? pb({ data: t, to: n }), s = e.commitments ?? Pu({ blobs: i, kzg: r, to: n }), o = e.proofs ?? Ou({ blobs: i, commitments: s, kzg: r, to: n }), a = [];
11946
+ function bb(e) {
11947
+ const { data: t, kzg: r, to: n } = e, i = e.blobs ?? mb({ data: t, to: n }), s = e.commitments ?? Pu({ blobs: i, kzg: r, to: n }), o = e.proofs ?? Ou({ blobs: i, commitments: s, kzg: r, to: n }), a = [];
11948
11948
  for (let f = 0; f < i.length; f++)
11949
11949
  a.push({
11950
11950
  blob: i[f],
@@ -11953,7 +11953,7 @@ function yb(e) {
11953
11953
  });
11954
11954
  return a;
11955
11955
  }
11956
- function mb(e) {
11956
+ function gb(e) {
11957
11957
  if (!e || e.length === 0)
11958
11958
  return [];
11959
11959
  const t = [];
@@ -12006,9 +12006,9 @@ Object.defineProperty(Nu, "nodeMessage", {
12006
12006
  value: /max priority fee per gas higher than max fee per gas|tip higher than fee cap/
12007
12007
  });
12008
12008
  function Hu(e, t, r, { strict: n } = {}) {
12009
- return ni(e, { strict: !1 }) ? gb(e, t, r, {
12009
+ return ni(e, { strict: !1 }) ? _b(e, t, r, {
12010
12010
  strict: n
12011
- }) : bb(e, t, r, {
12011
+ }) : wb(e, t, r, {
12012
12012
  strict: n
12013
12013
  });
12014
12014
  }
@@ -12028,17 +12028,17 @@ function Mu(e, t, r) {
12028
12028
  size: Fe(e)
12029
12029
  });
12030
12030
  }
12031
- function bb(e, t, r, { strict: n } = {}) {
12031
+ function wb(e, t, r, { strict: n } = {}) {
12032
12032
  Fu(e, t);
12033
12033
  const i = e.slice(t, r);
12034
12034
  return n && Mu(i, t, r), i;
12035
12035
  }
12036
- function gb(e, t, r, { strict: n } = {}) {
12036
+ function _b(e, t, r, { strict: n } = {}) {
12037
12037
  Fu(e, t);
12038
12038
  const i = `0x${e.replace("0x", "").slice((t ?? 0) * 2, (r ?? e.length) * 2)}`;
12039
12039
  return n && Mu(i, t, r), i;
12040
12040
  }
12041
- function wb(e) {
12041
+ function vb(e) {
12042
12042
  const { authorizationList: t } = e;
12043
12043
  if (t)
12044
12044
  for (const r of t) {
@@ -12050,7 +12050,7 @@ function wb(e) {
12050
12050
  }
12051
12051
  na(e);
12052
12052
  }
12053
- function _b(e) {
12053
+ function Eb(e) {
12054
12054
  const { blobVersionedHashes: t } = e;
12055
12055
  if (t) {
12056
12056
  if (t.length === 0)
@@ -12058,9 +12058,9 @@ function _b(e) {
12058
12058
  for (const r of t) {
12059
12059
  const n = Fe(r), i = zi(Hu(r, 0, 1));
12060
12060
  if (n !== 32)
12061
- throw new db({ hash: r, size: n });
12061
+ throw new pb({ hash: r, size: n });
12062
12062
  if (i !== Uu)
12063
- throw new hb({
12063
+ throw new yb({
12064
12064
  hash: r,
12065
12065
  version: i
12066
12066
  });
@@ -12079,7 +12079,7 @@ function na(e) {
12079
12079
  if (r && n && r > n)
12080
12080
  throw new Nu({ maxFeePerGas: n, maxPriorityFeePerGas: r });
12081
12081
  }
12082
- function vb(e) {
12082
+ function xb(e) {
12083
12083
  const { chainId: t, maxPriorityFeePerGas: r, gasPrice: n, maxFeePerGas: i, to: s } = e;
12084
12084
  if (t <= 0)
12085
12085
  throw new gs({ chainId: t });
@@ -12090,7 +12090,7 @@ function vb(e) {
12090
12090
  if (n && n > ra)
12091
12091
  throw new ws({ maxFeePerGas: n });
12092
12092
  }
12093
- function Eb(e) {
12093
+ function Sb(e) {
12094
12094
  const { chainId: t, maxPriorityFeePerGas: r, gasPrice: n, maxFeePerGas: i, to: s } = e;
12095
12095
  if (s && !yt(s))
12096
12096
  throw new pt({ address: s });
@@ -12101,7 +12101,7 @@ function Eb(e) {
12101
12101
  if (n && n > ra)
12102
12102
  throw new ws({ maxFeePerGas: n });
12103
12103
  }
12104
- function xb(e) {
12104
+ function Ab(e) {
12105
12105
  if (e.type)
12106
12106
  return e.type;
12107
12107
  if (typeof e.authorizationList < "u")
@@ -12112,7 +12112,7 @@ function xb(e) {
12112
12112
  return "eip1559";
12113
12113
  if (typeof e.gasPrice < "u")
12114
12114
  return typeof e.accessList < "u" ? "eip2930" : "legacy";
12115
- throw new ob({ transaction: e });
12115
+ throw new cb({ transaction: e });
12116
12116
  }
12117
12117
  function _s(e) {
12118
12118
  if (!e || e.length === 0)
@@ -12122,7 +12122,7 @@ function _s(e) {
12122
12122
  const { address: n, storageKeys: i } = e[r];
12123
12123
  for (let s = 0; s < i.length; s++)
12124
12124
  if (i[s].length - 2 !== 64)
12125
- throw new ab({ storageKey: i[s] });
12125
+ throw new fb({ storageKey: i[s] });
12126
12126
  if (!yt(n, { strict: !1 }))
12127
12127
  throw new pt({ address: n });
12128
12128
  t.push([n, i]);
@@ -12130,13 +12130,13 @@ function _s(e) {
12130
12130
  return t;
12131
12131
  }
12132
12132
  function Du(e, t) {
12133
- const r = xb(e);
12134
- return r === "eip1559" ? Bb(e, t) : r === "eip2930" ? Ib(e, t) : r === "eip4844" ? Ab(e, t) : r === "eip7702" ? Sb(e, t) : Tb(e, t);
12133
+ const r = Ab(e);
12134
+ return r === "eip1559" ? Tb(e, t) : r === "eip2930" ? kb(e, t) : r === "eip4844" ? Ib(e, t) : r === "eip7702" ? Bb(e, t) : Pb(e, t);
12135
12135
  }
12136
- function Sb(e, t) {
12136
+ function Bb(e, t) {
12137
12137
  const { authorizationList: r, chainId: n, gas: i, nonce: s, to: o, value: a, maxFeePerGas: f, maxPriorityFeePerGas: l, accessList: d, data: p } = e;
12138
- wb(e);
12139
- const w = _s(d), y = mb(r);
12138
+ vb(e);
12139
+ const w = _s(d), y = gb(r);
12140
12140
  return Mr([
12141
12141
  "0x04",
12142
12142
  mr([
@@ -12154,20 +12154,20 @@ function Sb(e, t) {
12154
12154
  ])
12155
12155
  ]);
12156
12156
  }
12157
- function Ab(e, t) {
12157
+ function Ib(e, t) {
12158
12158
  const { chainId: r, gas: n, nonce: i, to: s, value: o, maxFeePerBlobGas: a, maxFeePerGas: f, maxPriorityFeePerGas: l, accessList: d, data: p } = e;
12159
- _b(e);
12159
+ Eb(e);
12160
12160
  let w = e.blobVersionedHashes, y = e.sidecars;
12161
12161
  if (e.blobs && (typeof w > "u" || typeof y > "u")) {
12162
12162
  const E = typeof e.blobs[0] == "string" ? e.blobs : e.blobs.map((x) => Kt(x)), v = e.kzg, B = Pu({
12163
12163
  blobs: E,
12164
12164
  kzg: v
12165
12165
  });
12166
- if (typeof w > "u" && (w = ub({
12166
+ if (typeof w > "u" && (w = db({
12167
12167
  commitments: B
12168
12168
  })), typeof y > "u") {
12169
12169
  const x = Ou({ blobs: E, commitments: B, kzg: v });
12170
- y = yb({ blobs: E, commitments: B, proofs: x });
12170
+ y = bb({ blobs: E, commitments: B, proofs: x });
12171
12171
  }
12172
12172
  }
12173
12173
  const I = _s(d), S = [
@@ -12195,7 +12195,7 @@ function Ab(e, t) {
12195
12195
  mr(y ? [S, _, A, k] : S)
12196
12196
  ]);
12197
12197
  }
12198
- function Bb(e, t) {
12198
+ function Tb(e, t) {
12199
12199
  const { chainId: r, gas: n, nonce: i, to: s, value: o, maxFeePerGas: a, maxPriorityFeePerGas: f, accessList: l, data: d } = e;
12200
12200
  na(e);
12201
12201
  const p = _s(l), w = [
@@ -12215,9 +12215,9 @@ function Bb(e, t) {
12215
12215
  mr(w)
12216
12216
  ]);
12217
12217
  }
12218
- function Ib(e, t) {
12218
+ function kb(e, t) {
12219
12219
  const { chainId: r, gas: n, data: i, nonce: s, to: o, value: a, accessList: f, gasPrice: l } = e;
12220
- vb(e);
12220
+ xb(e);
12221
12221
  const d = _s(f), p = [
12222
12222
  Q(r),
12223
12223
  s ? Q(s) : "0x",
@@ -12234,9 +12234,9 @@ function Ib(e, t) {
12234
12234
  mr(p)
12235
12235
  ]);
12236
12236
  }
12237
- function Tb(e, t) {
12237
+ function Pb(e, t) {
12238
12238
  const { chainId: r = 0, gas: n, data: i, nonce: s, to: o, value: a, gasPrice: f } = e;
12239
- Eb(e);
12239
+ Sb(e);
12240
12240
  let l = [
12241
12241
  s ? Q(s) : "0x",
12242
12242
  f ? Q(f) : "0x",
@@ -12253,7 +12253,7 @@ function Tb(e, t) {
12253
12253
  return BigInt(r * 2) + BigInt(35n + t.v - 27n);
12254
12254
  const y = 27n + (t.v === 27n ? 0n : 1n);
12255
12255
  if (t.v !== y)
12256
- throw new sb({ v: t.v });
12256
+ throw new ab({ v: t.v });
12257
12257
  return y;
12258
12258
  })(), p = ji(t.r), w = ji(t.s);
12259
12259
  l = [
@@ -12281,7 +12281,7 @@ function si(e, t) {
12281
12281
  const s = ji(r.r), o = ji(r.s);
12282
12282
  return [typeof i == "number" ? i ? Q(1) : "0x" : n === 0n ? "0x" : n === 1n ? Q(1) : n === 27n ? "0x" : Q(1), s === "0x00" ? "0x" : s, o === "0x00" ? "0x" : o];
12283
12283
  }
12284
- async function kb(e) {
12284
+ async function Ob(e) {
12285
12285
  const { privateKey: t, transaction: r, serializer: n = Du } = e, i = r.type === "eip4844" ? {
12286
12286
  ...r,
12287
12287
  sidecars: !1
@@ -12291,7 +12291,7 @@ async function kb(e) {
12291
12291
  });
12292
12292
  return n(r, s);
12293
12293
  }
12294
- class Pb extends se {
12294
+ class Rb extends se {
12295
12295
  constructor({ expectedLength: t, givenLength: r, type: n }) {
12296
12296
  super([
12297
12297
  `ABI encoding array length mismatch for type ${n}.`,
@@ -12301,12 +12301,12 @@ class Pb extends se {
12301
12301
  `), { name: "AbiEncodingArrayLengthMismatchError" });
12302
12302
  }
12303
12303
  }
12304
- class Ob extends se {
12304
+ class Cb extends se {
12305
12305
  constructor({ expectedSize: t, value: r }) {
12306
12306
  super(`Size of bytes "${r}" (bytes${Fe(r)}) does not match expected size (bytes${t}).`, { name: "AbiEncodingBytesSizeMismatchError" });
12307
12307
  }
12308
12308
  }
12309
- class Rb extends se {
12309
+ class Ub extends se {
12310
12310
  constructor({ expectedLength: t, givenLength: r }) {
12311
12311
  super([
12312
12312
  "ABI encoding params/values length mismatch.",
@@ -12316,14 +12316,14 @@ class Rb extends se {
12316
12316
  `), { name: "AbiEncodingLengthMismatchError" });
12317
12317
  }
12318
12318
  }
12319
- class Cb extends se {
12319
+ class Lb extends se {
12320
12320
  constructor({ expectedSize: t, givenSize: r }) {
12321
12321
  super(`Expected bytes${t}, got bytes${r}.`, {
12322
12322
  name: "BytesSizeMismatchError"
12323
12323
  });
12324
12324
  }
12325
12325
  }
12326
- class Ub extends se {
12326
+ class Nb extends se {
12327
12327
  constructor(t, { docsPath: r }) {
12328
12328
  super([
12329
12329
  `Type "${t}" is not a valid encoding type.`,
@@ -12332,7 +12332,7 @@ class Ub extends se {
12332
12332
  `), { docsPath: r, name: "InvalidAbiEncodingType" });
12333
12333
  }
12334
12334
  }
12335
- class Lb extends se {
12335
+ class Hb extends se {
12336
12336
  constructor(t) {
12337
12337
  super([`Value "${t}" is not a valid array.`].join(`
12338
12338
  `), {
@@ -12340,51 +12340,51 @@ class Lb extends se {
12340
12340
  });
12341
12341
  }
12342
12342
  }
12343
- const Nb = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/, $u = /^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;
12343
+ const Fb = /^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/, $u = /^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;
12344
12344
  function ju(e, t) {
12345
12345
  if (e.length !== t.length)
12346
- throw new Rb({
12346
+ throw new Ub({
12347
12347
  expectedLength: e.length,
12348
12348
  givenLength: t.length
12349
12349
  });
12350
- const r = Hb({
12350
+ const r = Mb({
12351
12351
  params: e,
12352
12352
  values: t
12353
12353
  }), n = sa(r);
12354
12354
  return n.length === 0 ? "0x" : n;
12355
12355
  }
12356
- function Hb({ params: e, values: t }) {
12356
+ function Mb({ params: e, values: t }) {
12357
12357
  const r = [];
12358
12358
  for (let n = 0; n < e.length; n++)
12359
12359
  r.push(ia({ param: e[n], value: t[n] }));
12360
12360
  return r;
12361
12361
  }
12362
12362
  function ia({ param: e, value: t }) {
12363
- const r = Gb(e.type);
12363
+ const r = Wb(e.type);
12364
12364
  if (r) {
12365
12365
  const [n, i] = r;
12366
- return Mb(t, { length: n, param: { ...e, type: i } });
12366
+ return $b(t, { length: n, param: { ...e, type: i } });
12367
12367
  }
12368
12368
  if (e.type === "tuple")
12369
- return Vb(t, {
12369
+ return qb(t, {
12370
12370
  param: e
12371
12371
  });
12372
12372
  if (e.type === "address")
12373
- return Fb(t);
12373
+ return Db(t);
12374
12374
  if (e.type === "bool")
12375
- return $b(t);
12375
+ return zb(t);
12376
12376
  if (e.type.startsWith("uint") || e.type.startsWith("int")) {
12377
12377
  const n = e.type.startsWith("int"), [, , i = "256"] = $u.exec(e.type) ?? [];
12378
- return jb(t, {
12378
+ return Vb(t, {
12379
12379
  signed: n,
12380
12380
  size: Number(i)
12381
12381
  });
12382
12382
  }
12383
12383
  if (e.type.startsWith("bytes"))
12384
- return Db(t, { param: e });
12384
+ return jb(t, { param: e });
12385
12385
  if (e.type === "string")
12386
- return zb(t);
12387
- throw new Ub(e.type, {
12386
+ return Gb(t);
12387
+ throw new Nb(e.type, {
12388
12388
  docsPath: "/docs/contract/encodeAbiParameters"
12389
12389
  });
12390
12390
  }
@@ -12402,17 +12402,17 @@ function sa(e) {
12402
12402
  }
12403
12403
  return yr([...r, ...n]);
12404
12404
  }
12405
- function Fb(e) {
12405
+ function Db(e) {
12406
12406
  if (!yt(e))
12407
12407
  throw new pt({ address: e });
12408
12408
  return { dynamic: !1, encoded: dr(e.toLowerCase()) };
12409
12409
  }
12410
- function Mb(e, { length: t, param: r }) {
12410
+ function $b(e, { length: t, param: r }) {
12411
12411
  const n = t === null;
12412
12412
  if (!Array.isArray(e))
12413
- throw new Lb(e);
12413
+ throw new Hb(e);
12414
12414
  if (!n && e.length !== t)
12415
- throw new Pb({
12415
+ throw new Rb({
12416
12416
  expectedLength: t,
12417
12417
  givenLength: e.length,
12418
12418
  type: `${r.type}[${t}]`
@@ -12440,7 +12440,7 @@ function Mb(e, { length: t, param: r }) {
12440
12440
  encoded: yr(s.map(({ encoded: o }) => o))
12441
12441
  };
12442
12442
  }
12443
- function Db(e, { param: t }) {
12443
+ function jb(e, { param: t }) {
12444
12444
  const [, r] = t.type.split("bytes"), n = Fe(e);
12445
12445
  if (!r) {
12446
12446
  let i = e;
@@ -12453,18 +12453,18 @@ function Db(e, { param: t }) {
12453
12453
  };
12454
12454
  }
12455
12455
  if (n !== Number.parseInt(r))
12456
- throw new Ob({
12456
+ throw new Cb({
12457
12457
  expectedSize: Number.parseInt(r),
12458
12458
  value: e
12459
12459
  });
12460
12460
  return { dynamic: !1, encoded: dr(e, { dir: "right" }) };
12461
12461
  }
12462
- function $b(e) {
12462
+ function zb(e) {
12463
12463
  if (typeof e != "boolean")
12464
12464
  throw new se(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);
12465
12465
  return { dynamic: !1, encoded: dr(vu(e)) };
12466
12466
  }
12467
- function jb(e, { signed: t, size: r = 256 }) {
12467
+ function Vb(e, { signed: t, size: r = 256 }) {
12468
12468
  if (typeof r == "number") {
12469
12469
  const n = 2n ** (BigInt(r) - (t ? 1n : 0n)) - 1n, i = t ? -n - 1n : 0n;
12470
12470
  if (e > n || e < i)
@@ -12484,7 +12484,7 @@ function jb(e, { signed: t, size: r = 256 }) {
12484
12484
  })
12485
12485
  };
12486
12486
  }
12487
- function zb(e) {
12487
+ function Gb(e) {
12488
12488
  const t = Vi(e), r = Math.ceil(Fe(t) / 32), n = [];
12489
12489
  for (let i = 0; i < r; i++)
12490
12490
  n.push(dr(Hu(t, i * 32, (i + 1) * 32), {
@@ -12498,7 +12498,7 @@ function zb(e) {
12498
12498
  ])
12499
12499
  };
12500
12500
  }
12501
- function Vb(e, { param: t }) {
12501
+ function qb(e, { param: t }) {
12502
12502
  let r = !1;
12503
12503
  const n = [];
12504
12504
  for (let i = 0; i < t.components.length; i++) {
@@ -12513,22 +12513,22 @@ function Vb(e, { param: t }) {
12513
12513
  encoded: r ? sa(n) : yr(n.map(({ encoded: i }) => i))
12514
12514
  };
12515
12515
  }
12516
- function Gb(e) {
12516
+ function Wb(e) {
12517
12517
  const t = e.match(/^(.*)\[(\d+)?\]$/);
12518
12518
  return t ? (
12519
12519
  // Return `null` if the array is dynamic.
12520
12520
  [t[2] ? Number(t[2]) : null, t[1]]
12521
12521
  ) : void 0;
12522
12522
  }
12523
- const qb = (e, t, r) => JSON.stringify(e, (n, i) => typeof i == "bigint" ? i.toString() : i, r);
12524
- class Wb extends se {
12523
+ const Kb = (e, t, r) => JSON.stringify(e, (n, i) => typeof i == "bigint" ? i.toString() : i, r);
12524
+ class Yb extends se {
12525
12525
  constructor({ domain: t }) {
12526
- super(`Invalid domain "${qb(t)}".`, {
12526
+ super(`Invalid domain "${Kb(t)}".`, {
12527
12527
  metaMessages: ["Must be a valid EIP-712 domain."]
12528
12528
  });
12529
12529
  }
12530
12530
  }
12531
- class Kb extends se {
12531
+ class Xb extends se {
12532
12532
  constructor({ primaryType: t, types: r }) {
12533
12533
  super(`Invalid primary type \`${t}\` must be one of \`${JSON.stringify(Object.keys(r))}\`.`, {
12534
12534
  docsPath: "/api/glossary/Errors#typeddatainvalidprimarytypeerror",
@@ -12536,7 +12536,7 @@ class Kb extends se {
12536
12536
  });
12537
12537
  }
12538
12538
  }
12539
- class Yb extends se {
12539
+ class Zb extends se {
12540
12540
  constructor({ type: t }) {
12541
12541
  super(`Struct type "${t}" is invalid.`, {
12542
12542
  metaMessages: ["Struct type must not be a Solidity type."],
@@ -12544,7 +12544,7 @@ class Yb extends se {
12544
12544
  });
12545
12545
  }
12546
12546
  }
12547
- function Xb(e) {
12547
+ function Jb(e) {
12548
12548
  const { domain: t, message: r, primaryType: n, types: i } = e, s = (o, a) => {
12549
12549
  for (const f of o) {
12550
12550
  const { name: l, type: d } = f, p = a[l], w = d.match($u);
@@ -12557,31 +12557,31 @@ function Xb(e) {
12557
12557
  }
12558
12558
  if (d === "address" && typeof p == "string" && !yt(p))
12559
12559
  throw new pt({ address: p });
12560
- const y = d.match(Nb);
12560
+ const y = d.match(Fb);
12561
12561
  if (y) {
12562
12562
  const [S, _] = y;
12563
12563
  if (_ && Fe(p) !== Number.parseInt(_))
12564
- throw new Cb({
12564
+ throw new Lb({
12565
12565
  expectedSize: Number.parseInt(_),
12566
12566
  givenSize: Fe(p)
12567
12567
  });
12568
12568
  }
12569
12569
  const I = i[d];
12570
- I && (Jb(d), s(I, p));
12570
+ I && (e1(d), s(I, p));
12571
12571
  }
12572
12572
  };
12573
12573
  if (i.EIP712Domain && t) {
12574
12574
  if (typeof t != "object")
12575
- throw new Wb({ domain: t });
12575
+ throw new Yb({ domain: t });
12576
12576
  s(i.EIP712Domain, t);
12577
12577
  }
12578
12578
  if (n !== "EIP712Domain")
12579
12579
  if (i[n])
12580
12580
  s(i[n], r);
12581
12581
  else
12582
- throw new Kb({ primaryType: n, types: i });
12582
+ throw new Xb({ primaryType: n, types: i });
12583
12583
  }
12584
- function Zb({ domain: e }) {
12584
+ function Qb({ domain: e }) {
12585
12585
  return [
12586
12586
  typeof (e == null ? void 0 : e.name) == "string" && { name: "name", type: "string" },
12587
12587
  (e == null ? void 0 : e.version) && { name: "version", type: "string" },
@@ -12596,23 +12596,23 @@ function Zb({ domain: e }) {
12596
12596
  (e == null ? void 0 : e.salt) && { name: "salt", type: "bytes32" }
12597
12597
  ].filter(Boolean);
12598
12598
  }
12599
- function Jb(e) {
12599
+ function e1(e) {
12600
12600
  if (e === "address" || e === "bool" || e === "string" || e.startsWith("bytes") || e.startsWith("uint") || e.startsWith("int"))
12601
- throw new Yb({ type: e });
12601
+ throw new Zb({ type: e });
12602
12602
  }
12603
- function Qb(e) {
12603
+ function t1(e) {
12604
12604
  const { domain: t = {}, message: r, primaryType: n } = e, i = {
12605
- EIP712Domain: Zb({ domain: t }),
12605
+ EIP712Domain: Qb({ domain: t }),
12606
12606
  ...e.types
12607
12607
  };
12608
- Xb({
12608
+ Jb({
12609
12609
  domain: t,
12610
12610
  message: r,
12611
12611
  primaryType: n,
12612
12612
  types: i
12613
12613
  });
12614
12614
  const s = ["0x1901"];
12615
- return t && s.push(e1({
12615
+ return t && s.push(r1({
12616
12616
  domain: t,
12617
12617
  types: i
12618
12618
  })), n !== "EIP712Domain" && s.push(zu({
@@ -12621,7 +12621,7 @@ function Qb(e) {
12621
12621
  types: i
12622
12622
  })), ft(yr(s));
12623
12623
  }
12624
- function e1({ domain: e, types: t }) {
12624
+ function r1({ domain: e, types: t }) {
12625
12625
  return zu({
12626
12626
  data: e,
12627
12627
  primaryType: "EIP712Domain",
@@ -12637,7 +12637,7 @@ function zu({ data: e, primaryType: t, types: r }) {
12637
12637
  return ft(n);
12638
12638
  }
12639
12639
  function Vu({ data: e, primaryType: t, types: r }) {
12640
- const n = [{ type: "bytes32" }], i = [t1({ primaryType: t, types: r })];
12640
+ const n = [{ type: "bytes32" }], i = [n1({ primaryType: t, types: r })];
12641
12641
  for (const s of r[t]) {
12642
12642
  const [o, a] = qu({
12643
12643
  types: r,
@@ -12649,11 +12649,11 @@ function Vu({ data: e, primaryType: t, types: r }) {
12649
12649
  }
12650
12650
  return ju(n, i);
12651
12651
  }
12652
- function t1({ primaryType: e, types: t }) {
12653
- const r = Q(r1({ primaryType: e, types: t }));
12652
+ function n1({ primaryType: e, types: t }) {
12653
+ const r = Q(i1({ primaryType: e, types: t }));
12654
12654
  return ft(r);
12655
12655
  }
12656
- function r1({ primaryType: e, types: t }) {
12656
+ function i1({ primaryType: e, types: t }) {
12657
12657
  let r = "";
12658
12658
  const n = Gu({ primaryType: e, types: t });
12659
12659
  n.delete(e);
@@ -12695,34 +12695,34 @@ function qu({ types: e, name: t, type: r, value: n }) {
12695
12695
  }
12696
12696
  return [{ type: r }, n];
12697
12697
  }
12698
- async function n1(e) {
12698
+ async function s1(e) {
12699
12699
  const { privateKey: t, ...r } = e;
12700
12700
  return await ii({
12701
- hash: Qb(r),
12701
+ hash: t1(r),
12702
12702
  privateKey: t,
12703
12703
  to: "hex"
12704
12704
  });
12705
12705
  }
12706
- function i1(e, t = {}) {
12707
- const { nonceManager: r } = t, n = Q(bs.getPublicKey(e.slice(2), !1)), i = $m(n);
12706
+ function o1(e, t = {}) {
12707
+ const { nonceManager: r } = t, n = Q(bs.getPublicKey(e.slice(2), !1)), i = zm(n);
12708
12708
  return {
12709
- ...Dm({
12709
+ ...jm({
12710
12710
  address: i,
12711
12711
  nonceManager: r,
12712
12712
  async sign({ hash: o }) {
12713
12713
  return ii({ hash: o, privateKey: e, to: "hex" });
12714
12714
  },
12715
12715
  async experimental_signAuthorization(o) {
12716
- return Zm({ ...o, privateKey: e });
12716
+ return Qm({ ...o, privateKey: e });
12717
12717
  },
12718
12718
  async signMessage({ message: o }) {
12719
- return tb({ message: o, privateKey: e });
12719
+ return nb({ message: o, privateKey: e });
12720
12720
  },
12721
12721
  async signTransaction(o, { serializer: a } = {}) {
12722
- return kb({ privateKey: e, transaction: o, serializer: a });
12722
+ return Ob({ privateKey: e, transaction: o, serializer: a });
12723
12723
  },
12724
12724
  async signTypedData(o) {
12725
- return n1({ ...o, privateKey: e });
12725
+ return s1({ ...o, privateKey: e });
12726
12726
  }
12727
12727
  }),
12728
12728
  publicKey: n,
@@ -12732,7 +12732,7 @@ function i1(e, t = {}) {
12732
12732
  class sr {
12733
12733
  constructor(t) {
12734
12734
  this._digestKey = t;
12735
- const r = i1("0x" + t);
12735
+ const r = o1("0x" + t);
12736
12736
  this._userId = r.address;
12737
12737
  }
12738
12738
  static from(t) {
@@ -12766,7 +12766,7 @@ class sr {
12766
12766
  return this._userId;
12767
12767
  }
12768
12768
  }
12769
- const s1 = [
12769
+ const a1 = [
12770
12770
  {
12771
12771
  inputs: [
12772
12772
  {
@@ -13159,7 +13159,7 @@ const s1 = [
13159
13159
  type: "function"
13160
13160
  }
13161
13161
  ];
13162
- class o1 {
13162
+ class c1 {
13163
13163
  constructor(t, r, n) {
13164
13164
  this.url = new cr("/relayer", t), this.auth = n, this.wallet = r;
13165
13165
  }
@@ -13180,7 +13180,7 @@ class o1 {
13180
13180
  if (f.error) return tt(f.error);
13181
13181
  const l = cl({
13182
13182
  address: _i(t.source_swap.asset),
13183
- abi: s1,
13183
+ abi: a1,
13184
13184
  client: this.wallet
13185
13185
  }), d = await l.read.token(), p = await il(
13186
13186
  Number(a),
@@ -14390,7 +14390,7 @@ const Wu = [
14390
14390
  ).call("allowance", [
14391
14391
  fi(e.address),
14392
14392
  fi(r)
14393
- ]), f = BigInt((a == null ? void 0 : a.toString()) || "0"), l = ko.uint256(BigInt(n));
14393
+ ]), f = BigInt((a == null ? void 0 : a.toString()) || "0"), l = ko.uint256(BigInt(pl.UINT_256_MAX));
14394
14394
  if (f < n) {
14395
14395
  const d = await e.execute([
14396
14396
  {
@@ -14399,7 +14399,13 @@ const Wu = [
14399
14399
  calldata: [r, l.low, l.high]
14400
14400
  }
14401
14401
  ]);
14402
- return ae(d.transaction_hash);
14402
+ return await s.waitForTransaction(
14403
+ d.transaction_hash,
14404
+ {
14405
+ retryInterval: 3e3,
14406
+ successStates: [yl.SUCCEEDED]
14407
+ }
14408
+ ), ae(d.transaction_hash);
14403
14409
  }
14404
14410
  return ae("Allowance already approved");
14405
14411
  } catch (s) {
@@ -14660,12 +14666,12 @@ const Wu = [
14660
14666
  }
14661
14667
  ]
14662
14668
  }
14663
- ], a1 = {
14669
+ ], f1 = {
14664
14670
  name: "HTLC",
14665
- version: pl.encodeShortString("1"),
14671
+ version: ml.encodeShortString("1"),
14666
14672
  chainId: "0x534e5f5345504f4c4941",
14667
- revision: yl.ACTIVE
14668
- }, c1 = {
14673
+ revision: bl.ACTIVE
14674
+ }, u1 = {
14669
14675
  StarknetDomain: [
14670
14676
  { name: "name", type: "shortstring" },
14671
14677
  { name: "version", type: "shortstring" },
@@ -14678,10 +14684,10 @@ const Wu = [
14678
14684
  { name: "timelock", type: "u128" },
14679
14685
  { name: "secretHash", type: "u128*" }
14680
14686
  ]
14681
- }, f1 = "https://starknet-mainnet.public.blastapi.io";
14682
- class u1 {
14687
+ }, l1 = "https://starknet-sepolia.public.blastapi.io/rpc/v0_7";
14688
+ class d1 {
14683
14689
  constructor(t, r, n) {
14684
- this.nodeUrl = n || f1, this.url = new cr("/", t), this.account = r;
14690
+ this.nodeUrl = n || l1, this.url = new cr("/", t), this.account = r;
14685
14691
  }
14686
14692
  get htlcActorAddress() {
14687
14693
  if (!this.account.address) throw new Error("No account found");
@@ -14706,9 +14712,9 @@ class u1 {
14706
14712
  );
14707
14713
  if (l.error) return G(l.error);
14708
14714
  const d = {
14709
- domain: a1,
14715
+ domain: f1,
14710
14716
  primaryType: "Initiate",
14711
- types: c1,
14717
+ types: u1,
14712
14718
  message: {
14713
14719
  redeemer: i,
14714
14720
  amount: ko.uint256(s),
@@ -14764,7 +14770,7 @@ class u1 {
14764
14770
  }
14765
14771
  class Xu extends Uc {
14766
14772
  constructor(t) {
14767
- super(), this.getOrderThreshold = 20, this.refundSacpCache = /* @__PURE__ */ new Map(), this.bitcoinRedeemCache = new Lh();
14773
+ super(), this.getOrderThreshold = 20, this.refundSacpCache = /* @__PURE__ */ new Map(), this.bitcoinRedeemCache = new Hh();
14768
14774
  const r = sr.from(t.digestKey);
14769
14775
  if (r.error) throw new Error(r.error);
14770
14776
  this._digestKey = r.val, this.environment = t.environment;
@@ -14773,10 +14779,10 @@ class Xu extends Uc {
14773
14779
  throw new Error(
14774
14780
  "API not found, invalid environment " + t.environment
14775
14781
  );
14776
- this._orderbookUrl = new cr(t.api ?? n.orderbook), this._quote = t.quote ?? new Hh(n.quote), this._auth = fa.fromDigestKey(
14782
+ this._orderbookUrl = new cr(t.api ?? n.orderbook), this._quote = t.quote ?? new Mh(n.quote), this._auth = fa.fromDigestKey(
14777
14783
  new cr(t.api ?? n.orderbook),
14778
14784
  this._digestKey.digestKey
14779
- ), this._orderbook = new el(new cr(t.api ?? n.orderbook)), this._evmHTLC = t.htlc.evm, this._starknetHTLC = t.htlc.starknet, this._secretManager = t.secretManager ?? Di.fromDigestKey(this._digestKey.digestKey), this.orderExecutorCache = new Uh(), this._blockNumberFetcher = t.blockNumberFetcher ?? new Nh(n.info, t.environment);
14785
+ ), this._orderbook = new el(new cr(t.api ?? n.orderbook)), this._evmHTLC = t.htlc.evm, this._starknetHTLC = t.htlc.starknet, this._secretManager = t.secretManager ?? Di.fromDigestKey(this._digestKey.digestKey), this.orderExecutorCache = new Nh(), this._blockNumberFetcher = t.blockNumberFetcher ?? new Fh(n.info, t.environment);
14780
14786
  }
14781
14787
  static from(t) {
14782
14788
  const r = t.environment === ar.MAINNET ? Sn.mainnet : t.environment === ar.TESTNET ? Sn.testnet : void 0;
@@ -14785,12 +14791,12 @@ class Xu extends Uc {
14785
14791
  "API not found, invalid environment " + t.environment
14786
14792
  );
14787
14793
  const n = {
14788
- evm: new o1(
14794
+ evm: new c1(
14789
14795
  r.evmRelay,
14790
14796
  t.wallets.evm,
14791
14797
  fa.fromDigestKey(new cr(r.orderbook), t.digestKey)
14792
14798
  ),
14793
- starknet: new u1(r.starknetRelay, t.wallets.starknet)
14799
+ starknet: new d1(r.starknetRelay, t.wallets.starknet)
14794
14800
  };
14795
14801
  return new Xu({
14796
14802
  environment: t.environment,
@@ -14833,7 +14839,7 @@ class Xu extends Uc {
14833
14839
  return ae(this._btcWallet);
14834
14840
  const t = await this._secretManager.getDigestKey();
14835
14841
  if (t.error) return G(t.error);
14836
- const r = new ol(Sl(this.environment));
14842
+ const r = new ol(Bl(this.environment));
14837
14843
  return this._btcWallet = al.fromPrivateKey(t.val, r), ae(this._btcWallet);
14838
14844
  }
14839
14845
  async swap(t) {
@@ -14917,7 +14923,7 @@ class Xu extends Uc {
14917
14923
  return this._evmHTLC ? ae(this._evmHTLC.htlcActorAddress) : G("Please provide evmHTLC when initializing garden");
14918
14924
  case kt.Bitcoin: {
14919
14925
  const i = await ((n = this._btcWallet) == null ? void 0 : n.getPublicKey());
14920
- return !i || !El(i) ? G("Invalid btc public key") : ae(xr(i));
14926
+ return !i || !Sl(i) ? G("Invalid btc public key") : ae(xr(i));
14921
14927
  }
14922
14928
  case kt.Starknet:
14923
14929
  return this._starknetHTLC ? ae(this._starknetHTLC.htlcActorAddress) : G("Please provide starknetHTLC when initializing garden");
@@ -15286,10 +15292,10 @@ class Xu extends Uc {
15286
15292
  }
15287
15293
  }
15288
15294
  }
15289
- const l1 = "https://starknet-mainnet.public.blastapi.io";
15290
- class ig {
15295
+ const h1 = "https://starknet-sepolia.public.blastapi.io/rpc/v0_7";
15296
+ class og {
15291
15297
  constructor(t, r) {
15292
- this.callData = new ya(Wu), this.nodeUrl = r || l1, this.account = t;
15298
+ this.callData = new ya(Wu), this.nodeUrl = r || h1, this.account = t;
15293
15299
  }
15294
15300
  get htlcActorAddress() {
15295
15301
  return this.account.address;
@@ -15432,7 +15438,7 @@ function aa(e) {
15432
15438
  value: e.value ? BigInt(e.value) : void 0,
15433
15439
  v: e.v ? BigInt(e.v) : void 0
15434
15440
  };
15435
- return e.authorizationList && (t.authorizationList = h1(e.authorizationList)), t.yParity = (() => {
15441
+ return e.authorizationList && (t.authorizationList = y1(e.authorizationList)), t.yParity = (() => {
15436
15442
  if (e.yParity)
15437
15443
  return Number(e.yParity);
15438
15444
  if (typeof t.v == "bigint") {
@@ -15445,8 +15451,8 @@ function aa(e) {
15445
15451
  }
15446
15452
  })(), t.type === "legacy" && (delete t.accessList, delete t.maxFeePerBlobGas, delete t.maxFeePerGas, delete t.maxPriorityFeePerGas, delete t.yParity), t.type === "eip2930" && (delete t.maxFeePerBlobGas, delete t.maxFeePerGas, delete t.maxPriorityFeePerGas), t.type === "eip1559" && delete t.maxFeePerBlobGas, t;
15447
15453
  }
15448
- const d1 = /* @__PURE__ */ oa("transaction", aa);
15449
- function h1(e) {
15454
+ const p1 = /* @__PURE__ */ oa("transaction", aa);
15455
+ function y1(e) {
15450
15456
  return e.map((t) => ({
15451
15457
  contractAddress: t.address,
15452
15458
  chainId: Number(t.chainId),
@@ -15456,7 +15462,7 @@ function h1(e) {
15456
15462
  yParity: Number(t.yParity)
15457
15463
  }));
15458
15464
  }
15459
- function p1(e) {
15465
+ function m1(e) {
15460
15466
  const t = (e.transactions ?? []).map((r) => typeof r == "string" ? r : aa(r));
15461
15467
  return {
15462
15468
  ...e,
@@ -15476,8 +15482,8 @@ function p1(e) {
15476
15482
  totalDifficulty: e.totalDifficulty ? BigInt(e.totalDifficulty) : null
15477
15483
  };
15478
15484
  }
15479
- const y1 = /* @__PURE__ */ oa("block", p1);
15480
- function m1(e, { args: t, eventName: r } = {}) {
15485
+ const b1 = /* @__PURE__ */ oa("block", m1);
15486
+ function g1(e, { args: t, eventName: r } = {}) {
15481
15487
  return {
15482
15488
  ...e,
15483
15489
  blockHash: e.blockHash ? e.blockHash : null,
@@ -15488,11 +15494,11 @@ function m1(e, { args: t, eventName: r } = {}) {
15488
15494
  ...r ? { args: t, eventName: r } : {}
15489
15495
  };
15490
15496
  }
15491
- const b1 = {
15497
+ const w1 = {
15492
15498
  "0x0": "reverted",
15493
15499
  "0x1": "success"
15494
15500
  };
15495
- function g1(e) {
15501
+ function _1(e) {
15496
15502
  const t = {
15497
15503
  ...e,
15498
15504
  blockNumber: e.blockNumber ? BigInt(e.blockNumber) : null,
@@ -15500,15 +15506,15 @@ function g1(e) {
15500
15506
  cumulativeGasUsed: e.cumulativeGasUsed ? BigInt(e.cumulativeGasUsed) : null,
15501
15507
  effectiveGasPrice: e.effectiveGasPrice ? BigInt(e.effectiveGasPrice) : null,
15502
15508
  gasUsed: e.gasUsed ? BigInt(e.gasUsed) : null,
15503
- logs: e.logs ? e.logs.map((r) => m1(r)) : null,
15509
+ logs: e.logs ? e.logs.map((r) => g1(r)) : null,
15504
15510
  to: e.to ? e.to : null,
15505
15511
  transactionIndex: e.transactionIndex ? zi(e.transactionIndex) : null,
15506
- status: e.status ? b1[e.status] : null,
15512
+ status: e.status ? w1[e.status] : null,
15507
15513
  type: e.type ? Zu[e.type] || e.type : null
15508
15514
  };
15509
15515
  return e.blobGasPrice && (t.blobGasPrice = BigInt(e.blobGasPrice)), e.blobGasUsed && (t.blobGasUsed = BigInt(e.blobGasUsed)), t;
15510
15516
  }
15511
- const w1 = /* @__PURE__ */ oa("transactionReceipt", g1), _1 = {
15517
+ const v1 = /* @__PURE__ */ oa("transactionReceipt", _1), E1 = {
15512
15518
  gasPriceOracle: { address: "0x420000000000000000000000000000000000000F" },
15513
15519
  l1Block: { address: "0x4200000000000000000000000000000000000015" },
15514
15520
  l2CrossDomainMessenger: {
@@ -15519,8 +15525,8 @@ const w1 = /* @__PURE__ */ oa("transactionReceipt", g1), _1 = {
15519
15525
  l2ToL1MessagePasser: {
15520
15526
  address: "0x4200000000000000000000000000000000000016"
15521
15527
  }
15522
- }, v1 = {
15523
- block: /* @__PURE__ */ y1({
15528
+ }, x1 = {
15529
+ block: /* @__PURE__ */ b1({
15524
15530
  format(e) {
15525
15531
  var r;
15526
15532
  return {
@@ -15534,13 +15540,13 @@ const w1 = /* @__PURE__ */ oa("transactionReceipt", g1), _1 = {
15534
15540
  };
15535
15541
  }
15536
15542
  }),
15537
- transaction: /* @__PURE__ */ d1({
15543
+ transaction: /* @__PURE__ */ p1({
15538
15544
  format(e) {
15539
15545
  const t = {};
15540
15546
  return e.type === "0x7e" && (t.isSystemTx = e.isSystemTx, t.mint = e.mint ? or(e.mint) : void 0, t.sourceHash = e.sourceHash, t.type = "deposit"), t;
15541
15547
  }
15542
15548
  }),
15543
- transactionReceipt: /* @__PURE__ */ w1({
15549
+ transactionReceipt: /* @__PURE__ */ v1({
15544
15550
  format(e) {
15545
15551
  return {
15546
15552
  l1GasPrice: e.l1GasPrice ? or(e.l1GasPrice) : null,
@@ -15551,14 +15557,14 @@ const w1 = /* @__PURE__ */ oa("transactionReceipt", g1), _1 = {
15551
15557
  }
15552
15558
  })
15553
15559
  };
15554
- function E1(e, t) {
15555
- return A1(e) ? S1(e) : Du(e, t);
15560
+ function S1(e, t) {
15561
+ return I1(e) ? B1(e) : Du(e, t);
15556
15562
  }
15557
- const x1 = {
15558
- transaction: E1
15563
+ const A1 = {
15564
+ transaction: S1
15559
15565
  };
15560
- function S1(e) {
15561
- B1(e);
15566
+ function B1(e) {
15567
+ T1(e);
15562
15568
  const { sourceHash: t, data: r, from: n, gas: i, isSystemTx: s, mint: o, to: a, value: f } = e, l = [
15563
15569
  t,
15564
15570
  n,
@@ -15574,10 +15580,10 @@ function S1(e) {
15574
15580
  mr(l)
15575
15581
  ]);
15576
15582
  }
15577
- function A1(e) {
15583
+ function I1(e) {
15578
15584
  return e.type === "deposit" || typeof e.sourceHash < "u";
15579
15585
  }
15580
- function B1(e) {
15586
+ function T1(e) {
15581
15587
  const { from: t, to: r } = e;
15582
15588
  if (t && !yt(t))
15583
15589
  throw new pt({ address: t });
@@ -15585,10 +15591,10 @@ function B1(e) {
15585
15591
  throw new pt({ address: r });
15586
15592
  }
15587
15593
  const Gi = {
15588
- contracts: _1,
15589
- formatters: v1,
15590
- serializers: x1
15591
- }, I1 = /* @__PURE__ */ Tt({
15594
+ contracts: E1,
15595
+ formatters: x1,
15596
+ serializers: A1
15597
+ }, k1 = /* @__PURE__ */ Tt({
15592
15598
  id: 42161,
15593
15599
  name: "Arbitrum One",
15594
15600
  nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
@@ -15610,7 +15616,7 @@ const Gi = {
15610
15616
  blockCreated: 7654707
15611
15617
  }
15612
15618
  }
15613
- }), T1 = /* @__PURE__ */ Tt({
15619
+ }), P1 = /* @__PURE__ */ Tt({
15614
15620
  id: 421614,
15615
15621
  name: "Arbitrum Sepolia",
15616
15622
  nativeCurrency: {
@@ -15637,7 +15643,7 @@ const Gi = {
15637
15643
  }
15638
15644
  },
15639
15645
  testnet: !0
15640
- }), Cn = 1, k1 = /* @__PURE__ */ Tt({
15646
+ }), Cn = 1, O1 = /* @__PURE__ */ Tt({
15641
15647
  ...Gi,
15642
15648
  id: 8453,
15643
15649
  name: "Base",
@@ -15684,7 +15690,7 @@ const Gi = {
15684
15690
  }
15685
15691
  },
15686
15692
  sourceId: Cn
15687
- }), Un = 11155111, P1 = /* @__PURE__ */ Tt({
15693
+ }), Un = 11155111, R1 = /* @__PURE__ */ Tt({
15688
15694
  ...Gi,
15689
15695
  id: 84532,
15690
15696
  network: "base-sepolia",
@@ -15733,7 +15739,7 @@ const Gi = {
15733
15739
  },
15734
15740
  testnet: !0,
15735
15741
  sourceId: Un
15736
- }), O1 = /* @__PURE__ */ Tt({
15742
+ }), C1 = /* @__PURE__ */ Tt({
15737
15743
  id: 80094,
15738
15744
  name: "Berachain",
15739
15745
  nativeCurrency: {
@@ -15757,7 +15763,7 @@ const Gi = {
15757
15763
  }
15758
15764
  },
15759
15765
  testnet: !1
15760
- }), R1 = /* @__PURE__ */ Tt({
15766
+ }), U1 = /* @__PURE__ */ Tt({
15761
15767
  id: 80084,
15762
15768
  name: "Berachain bArtio",
15763
15769
  nativeCurrency: {
@@ -15789,7 +15795,7 @@ const Gi = {
15789
15795
  }
15790
15796
  },
15791
15797
  testnet: !0
15792
- }), C1 = /* @__PURE__ */ Tt({
15798
+ }), L1 = /* @__PURE__ */ Tt({
15793
15799
  id: 5115,
15794
15800
  name: "Citrea Testnet",
15795
15801
  nativeCurrency: { name: "cBTC", symbol: "cBTC", decimals: 18 },
@@ -15806,7 +15812,7 @@ const Gi = {
15806
15812
  }
15807
15813
  },
15808
15814
  testnet: !0
15809
- }), U1 = /* @__PURE__ */ Tt({
15815
+ }), N1 = /* @__PURE__ */ Tt({
15810
15816
  id: 1,
15811
15817
  name: "Ethereum",
15812
15818
  nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
@@ -15835,7 +15841,7 @@ const Gi = {
15835
15841
  blockCreated: 14353601
15836
15842
  }
15837
15843
  }
15838
- }), L1 = /* @__PURE__ */ Tt({
15844
+ }), H1 = /* @__PURE__ */ Tt({
15839
15845
  id: 10143,
15840
15846
  name: "Monad Testnet",
15841
15847
  nativeCurrency: {
@@ -15861,7 +15867,7 @@ const Gi = {
15861
15867
  }
15862
15868
  },
15863
15869
  testnet: !0
15864
- }), N1 = /* @__PURE__ */ Tt({
15870
+ }), F1 = /* @__PURE__ */ Tt({
15865
15871
  id: 11155111,
15866
15872
  name: "Sepolia",
15867
15873
  nativeCurrency: { name: "Sepolia Ether", symbol: "ETH", decimals: 18 },
@@ -15889,29 +15895,29 @@ const Gi = {
15889
15895
  }
15890
15896
  },
15891
15897
  testnet: !0
15892
- }), H1 = {
15893
- ...N1,
15898
+ }), M1 = {
15899
+ ...F1,
15894
15900
  rpcUrls: {
15895
15901
  default: {
15896
15902
  http: ["https://ethereum-sepolia-rpc.publicnode.com"]
15897
15903
  }
15898
15904
  }
15899
- }, F1 = {
15900
- ethereum: U1,
15901
- arbitrum: I1,
15902
- ethereum_sepolia: H1,
15903
- arbitrum_sepolia: T1,
15905
+ }, D1 = {
15906
+ ethereum: N1,
15907
+ arbitrum: k1,
15908
+ ethereum_sepolia: M1,
15909
+ arbitrum_sepolia: P1,
15904
15910
  ethereum_localnet: rl,
15905
15911
  arbitrum_localnet: nl,
15906
- base_sepolia: P1,
15907
- base: k1,
15908
- bera_testnet: R1,
15909
- citrea_testnet: C1,
15910
- bera: O1,
15911
- monad_testnet: L1
15912
- }, sg = async (e, t) => {
15912
+ base_sepolia: R1,
15913
+ base: O1,
15914
+ bera_testnet: U1,
15915
+ citrea_testnet: L1,
15916
+ bera: C1,
15917
+ monad_testnet: H1
15918
+ }, ag = async (e, t) => {
15913
15919
  var n;
15914
- const r = F1[e];
15920
+ const r = D1[e];
15915
15921
  if (r)
15916
15922
  try {
15917
15923
  if (r.id === ((n = t.chain) == null ? void 0 : n.id))
@@ -15927,7 +15933,7 @@ const Gi = {
15927
15933
  walletClient: i
15928
15934
  });
15929
15935
  } catch (i) {
15930
- if (M1(i))
15936
+ if ($1(i))
15931
15937
  try {
15932
15938
  await t.addChain({ chain: r });
15933
15939
  const s = da({
@@ -15947,27 +15953,27 @@ const Gi = {
15947
15953
  }
15948
15954
  else
15949
15955
  return G("Chain not supported");
15950
- }, M1 = (e) => typeof e == "object" && e !== null && "code" in e && e.code === 4902;
15956
+ }, $1 = (e) => typeof e == "object" && e !== null && "code" in e && e.code === 4902;
15951
15957
  export {
15952
15958
  Sn as API,
15953
- Nh as BlockNumberFetcher,
15954
- o1 as EvmRelay,
15959
+ Fh as BlockNumberFetcher,
15960
+ c1 as EvmRelay,
15955
15961
  Xu as Garden,
15956
15962
  Oe as OrderActions,
15957
15963
  ve as OrderStatus,
15958
15964
  Hc as ParseOrderStatus,
15959
15965
  ba as ParseSwapStatus,
15960
- Hh as Quote,
15966
+ Mh as Quote,
15961
15967
  Di as SecretManager,
15962
- ig as StarknetHTLC,
15963
- u1 as StarknetRelay,
15968
+ og as StarknetHTLC,
15969
+ d1 as StarknetRelay,
15964
15970
  xe as SwapStatus,
15965
- xl as constructOrderPair,
15966
- F1 as evmToViemChainMap,
15967
- Q1 as filterDeadlineExpiredOrders,
15971
+ Al as constructOrderPair,
15972
+ D1 as evmToViemChainMap,
15973
+ tg as filterDeadlineExpiredOrders,
15968
15974
  Ri as isExpired,
15969
- J1 as parseAction,
15975
+ eg as parseAction,
15970
15976
  Fc as parseActionFromStatus,
15971
- sg as switchOrAddNetwork,
15972
- Z1 as validateBTCAddress
15977
+ ag as switchOrAddNetwork,
15978
+ Q1 as validateBTCAddress
15973
15979
  };