@gardenfi/core 2.0.24 → 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
@@ -174,7 +174,7 @@ let co = class {
174
174
  }
175
175
  };
176
176
  vi = /* @__PURE__ */ new WeakMap(), Ei = /* @__PURE__ */ new WeakMap(), xi = /* @__PURE__ */ new WeakMap();
177
- const ae = (e) => new co(!0, e), q = (e, ...t) => {
177
+ const ae = (e) => new co(!0, e), G = (e, ...t) => {
178
178
  if (typeof e == "string" && t && t.length > 0) {
179
179
  let r = [e, ...t].map((n) => {
180
180
  if (n) {
@@ -357,10 +357,10 @@ function Cl(e) {
357
357
  });
358
358
  }), r;
359
359
  }
360
- var Se = {}, Ge = {}, Wt = {}, Gi = {};
361
- Gi.byteLength = Nl;
362
- Gi.toByteArray = Fl;
363
- Gi.fromByteArray = $l;
360
+ var Se = {}, qe = {}, Wt = {}, qi = {};
361
+ qi.byteLength = Nl;
362
+ qi.toByteArray = Fl;
363
+ qi.fromByteArray = $l;
364
364
  var At = [], ct = [], Ul = typeof Uint8Array < "u" ? Uint8Array : Array, Bs = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
365
365
  for (var zr = 0, Ll = Bs.length; zr < Ll; ++zr)
366
366
  At[zr] = Bs[zr], ct[Bs.charCodeAt(zr)] = zr;
@@ -437,7 +437,7 @@ Po.write = function(e, t, r, n, i, s) {
437
437
  * @license MIT
438
438
  */
439
439
  (function(e) {
440
- const t = Gi, r = Po, n = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
440
+ const t = qi, r = Po, n = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
441
441
  e.Buffer = a, e.SlowBuffer = k, e.INSPECT_MAX_BYTES = 50;
442
442
  const i = 2147483647;
443
443
  e.kMaxLength = i, a.TYPED_ARRAY_SUPPORT = s(), !a.TYPED_ARRAY_SUPPORT && typeof console < "u" && typeof console.error == "function" && console.error(
@@ -830,7 +830,7 @@ Po.write = function(e, t, r, n, i, s) {
830
830
  function P(h, c, u, m) {
831
831
  return $r(ue(c, h.length - u), h, u, m);
832
832
  }
833
- function G(h, c, u, m) {
833
+ function q(h, c, u, m) {
834
834
  return $r(Yt(c), h, u, m);
835
835
  }
836
836
  function K(h, c, u, m) {
@@ -865,7 +865,7 @@ Po.write = function(e, t, r, n, i, s) {
865
865
  case "ascii":
866
866
  case "latin1":
867
867
  case "binary":
868
- return G(this, c, u, m);
868
+ return q(this, c, u, m);
869
869
  case "base64":
870
870
  return K(this, c, u, m);
871
871
  case "ucs2":
@@ -1442,7 +1442,7 @@ Jr.prototype.constructor = zt;
1442
1442
  function Vl(e, t) {
1443
1443
  return new zt(e, {}, t);
1444
1444
  }
1445
- function ql(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,
@@ -1461,11 +1461,11 @@ var zc = {
1461
1461
  TfTypeError: zt,
1462
1462
  TfPropertyTypeError: Jr,
1463
1463
  tfCustomError: Vl,
1464
- tfSubError: ql,
1464
+ tfSubError: Gl,
1465
1465
  tfJSON: Ci,
1466
1466
  getValueTypeName: Ro
1467
1467
  }, Is, _a;
1468
- function Gl() {
1468
+ function ql() {
1469
1469
  if (_a) return Is;
1470
1470
  _a = 1;
1471
1471
  var e = Oo, t = zc;
@@ -1477,10 +1477,10 @@ function Gl() {
1477
1477
  }
1478
1478
  function i(x, L) {
1479
1479
  var M = x.toJSON();
1480
- function P(G) {
1481
- if (!x(G)) return !1;
1482
- if (G.length === L) return !0;
1483
- throw t.tfCustomError(M + "(Length: " + L + ")", M + "(Length: " + G.length + ")");
1480
+ function P(q) {
1481
+ if (!x(q)) return !1;
1482
+ if (q.length === L) return !0;
1483
+ throw t.tfCustomError(M + "(Length: " + L + ")", M + "(Length: " + q.length + ")");
1484
1484
  }
1485
1485
  return P.toJSON = function() {
1486
1486
  return M;
@@ -1489,8 +1489,8 @@ function Gl() {
1489
1489
  var s = i.bind(null, e.Array), o = i.bind(null, r), a = i.bind(null, n), f = i.bind(null, e.String);
1490
1490
  function l(x, L, M) {
1491
1491
  M = M || e.Number;
1492
- function P(G, K) {
1493
- return M(G, K) && G > x && G < L;
1492
+ function P(q, K) {
1493
+ return M(q, K) && q > x && q < L;
1494
1494
  }
1495
1495
  return P.toJSON = function() {
1496
1496
  return `${M.toJSON()} between [${x}, ${L}]`;
@@ -1548,7 +1548,7 @@ function Gl() {
1548
1548
  }).bind(null, B);
1549
1549
  return Is = v, Is;
1550
1550
  }
1551
- var qn = zc, Ne = Oo, Pt = qn.tfJSON, Vc = qn.TfTypeError, qc = qn.TfPropertyTypeError, wn = qn.tfSubError, Wl = qn.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) {
@@ -1617,7 +1617,7 @@ var qn = zc, Ne = Oo, Pt = qn.tfJSON, Vc = qn.TfTypeError, qc = qn.TfPropertyTyp
1617
1617
  if (o) {
1618
1618
  for (a in s)
1619
1619
  if (!r[a])
1620
- throw new qc(void 0, a);
1620
+ throw new Gc(void 0, a);
1621
1621
  }
1622
1622
  return !0;
1623
1623
  }
@@ -1712,17 +1712,17 @@ 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 = Gl();
1715
+ var va = ql();
1716
1716
  for (ur in va)
1717
1717
  Ze[ur] = va[ur];
1718
1718
  Ze.compile = St;
1719
1719
  Ze.TfTypeError = Vc;
1720
- Ze.TfPropertyTypeError = qc;
1721
- var Gc = Ze;
1720
+ Ze.TfPropertyTypeError = Gc;
1721
+ var qc = Ze;
1722
1722
  (function(e) {
1723
1723
  Object.defineProperty(e, "__esModule", { value: !0 }), e.oneOf = e.Null = e.BufferN = e.Function = e.UInt32 = e.UInt8 = e.tuple = e.maybe = e.Hex = e.Buffer = e.String = e.Boolean = e.Array = e.Number = e.Hash256bit = e.Hash160bit = e.Buffer256bit = e.isTaptree = e.isTapleaf = e.TAPLEAF_VERSION_MASK = e.Satoshi = e.isPoint = e.stacksEqual = e.typeforce = void 0;
1724
1724
  const t = Wt;
1725
- e.typeforce = Gc;
1725
+ e.typeforce = qc;
1726
1726
  const r = t.Buffer.alloc(32, 0), n = t.Buffer.from(
1727
1727
  "fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f",
1728
1728
  "hex"
@@ -1754,11 +1754,11 @@ var Gc = Ze;
1754
1754
  return (0, e.Array)(d) ? d.length !== 2 ? !1 : d.every((p) => l(p)) : f(d);
1755
1755
  }
1756
1756
  e.isTaptree = l, e.Buffer256bit = e.typeforce.BufferN(32), e.Hash160bit = e.typeforce.BufferN(20), e.Hash256bit = e.typeforce.BufferN(32), e.Number = e.typeforce.Number, e.Array = e.typeforce.Array, e.Boolean = e.typeforce.Boolean, e.String = e.typeforce.String, e.Buffer = e.typeforce.Buffer, e.Hex = e.typeforce.Hex, e.maybe = e.typeforce.maybe, e.tuple = e.typeforce.tuple, e.UInt8 = e.typeforce.UInt8, e.UInt32 = e.typeforce.UInt32, e.Function = e.typeforce.Function, e.BufferN = e.typeforce.BufferN, e.Null = e.typeforce.Null, e.oneOf = e.typeforce.oneOf;
1757
- })(Ge);
1758
- var Gn = {}, He = {};
1757
+ })(qe);
1758
+ var qn = {}, He = {};
1759
1759
  Object.defineProperty(He, "__esModule", { value: !0 });
1760
1760
  He.BufferReader = He.BufferWriter = He.cloneBuffer = He.reverseBuffer = He.writeUInt64LE = He.readUInt64LE = He.varuint = void 0;
1761
- const Ir = Ge, { typeforce: Wc } = Ir, jn = fl;
1761
+ const Ir = qe, { typeforce: Wc } = Ir, jn = fl;
1762
1762
  He.varuint = jn;
1763
1763
  function Kc(e, t) {
1764
1764
  if (typeof e != "number")
@@ -1923,7 +1923,7 @@ Wi.crypto = void 0;
1923
1923
  Wi.crypto = typeof globalThis == "object" && "crypto" in globalThis ? globalThis.crypto : void 0;
1924
1924
  (function(e) {
1925
1925
  /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
1926
- Object.defineProperty(e, "__esModule", { value: !0 }), e.Hash = e.nextTick = e.byteSwapIfBE = e.byteSwap = e.isLE = e.rotl = e.rotr = e.createView = e.u32 = e.u8 = void 0, e.isBytes = n, e.byteSwap32 = d, e.bytesToHex = w, e.hexToBytes = S, e.asyncLoop = A, e.utf8ToBytes = k, e.toBytes = E, e.concatBytes = v, e.checkOpts = L, e.wrapConstructor = M, e.wrapConstructorWithOpts = P, e.wrapXOFConstructorWithOpts = G, e.randomBytes = K;
1926
+ Object.defineProperty(e, "__esModule", { value: !0 }), e.Hash = e.nextTick = e.byteSwapIfBE = e.byteSwap = e.isLE = e.rotl = e.rotr = e.createView = e.u32 = e.u8 = void 0, e.isBytes = n, e.byteSwap32 = d, e.bytesToHex = w, e.hexToBytes = S, e.asyncLoop = A, e.utf8ToBytes = k, e.toBytes = E, e.concatBytes = v, e.checkOpts = L, e.wrapConstructor = M, e.wrapConstructorWithOpts = P, e.wrapXOFConstructorWithOpts = q, e.randomBytes = K;
1927
1927
  const t = Wi, r = mt;
1928
1928
  function n(C) {
1929
1929
  return C instanceof Uint8Array || C != null && typeof C == "object" && C.constructor.name === "Uint8Array";
@@ -2031,7 +2031,7 @@ Wi.crypto = typeof globalThis == "object" && "crypto" in globalThis ? globalThis
2031
2031
  const j = ($, z) => C(z).update(E($)).digest(), N = C({});
2032
2032
  return j.outputLen = N.outputLen, j.blockLen = N.blockLen, j.create = ($) => C($), j;
2033
2033
  }
2034
- function G(C) {
2034
+ function q(C) {
2035
2035
  const j = ($, z) => C(z).update(E($)).digest(), N = C({});
2036
2036
  return j.outputLen = N.outputLen, j.blockLen = N.blockLen, j.create = ($) => C($), j;
2037
2037
  }
@@ -3229,7 +3229,7 @@ var Sr = {}, xa;
3229
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
- const e = jt, t = nt(), r = Ge, { typeforce: n } = r, i = Buffer.alloc(1, 0);
3232
+ const e = jt, t = nt(), r = qe, { typeforce: n } = r, i = Buffer.alloc(1, 0);
3233
3233
  function s(l) {
3234
3234
  let d = 0;
3235
3235
  for (; l[d] === 0; ) ++d;
@@ -3275,7 +3275,7 @@ function nt() {
3275
3275
  return r.OPS;
3276
3276
  }
3277
3277
  });
3278
- const n = lr, i = sn, s = wd(), o = Ge, { 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
  }
@@ -3309,7 +3309,7 @@ function nt() {
3309
3309
  function A(P) {
3310
3310
  if (I(P)) return P;
3311
3311
  a(o.Array, P);
3312
- const G = P.reduce((j, N) => _(N) ? N.length === 1 && y(N) !== void 0 ? j + 1 : j + n.encodingLength(N.length) + N.length : j + 1, 0), K = Buffer.allocUnsafe(G);
3312
+ const q = P.reduce((j, N) => _(N) ? N.length === 1 && y(N) !== void 0 ? j + 1 : j + n.encodingLength(N.length) + N.length : j + 1, 0), K = Buffer.allocUnsafe(q);
3313
3313
  let C = 0;
3314
3314
  if (P.forEach((j) => {
3315
3315
  if (_(j)) {
@@ -3328,7 +3328,7 @@ function nt() {
3328
3328
  function k(P) {
3329
3329
  if (S(P)) return P;
3330
3330
  a(o.Buffer, P);
3331
- const G = [];
3331
+ const q = [];
3332
3332
  let K = 0;
3333
3333
  for (; K < P.length; ) {
3334
3334
  const C = P[K];
@@ -3338,34 +3338,34 @@ function nt() {
3338
3338
  const N = P.slice(K, K + j.number);
3339
3339
  K += j.number;
3340
3340
  const $ = y(N);
3341
- $ !== void 0 ? G.push($) : G.push(N);
3341
+ $ !== void 0 ? q.push($) : q.push(N);
3342
3342
  } else
3343
- G.push(C), K += 1;
3343
+ q.push(C), K += 1;
3344
3344
  }
3345
- return G;
3345
+ return q;
3346
3346
  }
3347
3347
  e.decompile = k;
3348
3348
  function E(P) {
3349
3349
  if (I(P) && (P = k(P)), !P)
3350
3350
  throw new Error("Could not convert invalid chunks to ASM");
3351
- return P.map((G) => {
3352
- if (_(G)) {
3353
- const K = y(G);
3354
- if (K === void 0) return G.toString("hex");
3355
- G = K;
3351
+ return P.map((q) => {
3352
+ if (_(q)) {
3353
+ const K = y(q);
3354
+ if (K === void 0) return q.toString("hex");
3355
+ q = K;
3356
3356
  }
3357
- return r.REVERSE_OPS[G];
3357
+ return r.REVERSE_OPS[q];
3358
3358
  }).join(" ");
3359
3359
  }
3360
3360
  e.toASM = E;
3361
3361
  function v(P) {
3362
3362
  return a(o.String, P), A(
3363
- P.split(" ").map((G) => r.OPS[G] !== void 0 ? r.OPS[G] : (a(o.Hex, G), Buffer.from(G, "hex")))
3363
+ P.split(" ").map((q) => r.OPS[q] !== void 0 ? r.OPS[q] : (a(o.Hex, q), Buffer.from(q, "hex")))
3364
3364
  );
3365
3365
  }
3366
3366
  e.fromASM = v;
3367
3367
  function B(P) {
3368
- return P = k(P), a(p, P), P.map((G) => _(G) ? G : G === r.OPS.OP_0 ? Buffer.allocUnsafe(0) : i.encode(G - f));
3368
+ return P = k(P), a(p, P), P.map((q) => _(q) ? q : q === r.OPS.OP_0 ? Buffer.allocUnsafe(0) : i.encode(q - f));
3369
3369
  }
3370
3370
  e.toStack = B;
3371
3371
  function x(P) {
@@ -3373,8 +3373,8 @@ function nt() {
3373
3373
  }
3374
3374
  e.isCanonicalPubKey = x;
3375
3375
  function L(P) {
3376
- const G = P & -129;
3377
- return G > 0 && G < 4;
3376
+ const q = P & -129;
3377
+ return q > 0 && q < 4;
3378
3378
  }
3379
3379
  e.isDefinedHashType = L;
3380
3380
  function M(P) {
@@ -3383,9 +3383,9 @@ function nt() {
3383
3383
  e.isCanonicalScriptSignature = M, e.number = i, e.signature = s;
3384
3384
  }(Os)), Os;
3385
3385
  }
3386
- Object.defineProperty(Gn, "__esModule", { value: !0 });
3387
- Gn.Transaction = void 0;
3388
- const ke = He, We = br, Aa = nt(), _d = nt(), oe = Ge, { typeforce: gt } = oe;
3386
+ Object.defineProperty(qn, "__esModule", { value: !0 });
3387
+ qn.Transaction = void 0;
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;
@@ -3664,7 +3664,7 @@ class re {
3664
3664
  }), i.writeUInt32(this.locktime), r !== void 0 ? t.slice(r, i.offset) : t;
3665
3665
  }
3666
3666
  }
3667
- Gn.Transaction = re;
3667
+ qn.Transaction = re;
3668
3668
  re.DEFAULT_SEQUENCE = 4294967295;
3669
3669
  re.SIGHASH_DEFAULT = 0;
3670
3670
  re.SIGHASH_ALL = 1;
@@ -3710,10 +3710,10 @@ function ff(e) {
3710
3710
  return Mo(e), e < 253 ? 1 : e <= 65535 ? 3 : e <= 4294967295 ? 5 : 9;
3711
3711
  }
3712
3712
  Kn.encodingLength = ff;
3713
- var Cs = {}, Ki = {}, qe = {};
3714
- Object.defineProperty(qe, "__esModule", { value: !0 });
3715
- qe.testnet = qe.regtest = qe.bitcoin = void 0;
3716
- qe.bitcoin = {
3713
+ var Cs = {}, Ki = {}, Ge = {};
3714
+ Object.defineProperty(Ge, "__esModule", { value: !0 });
3715
+ Ge.testnet = Ge.regtest = Ge.bitcoin = void 0;
3716
+ Ge.bitcoin = {
3717
3717
  /**
3718
3718
  * The message prefix used for signing Bitcoin messages.
3719
3719
  */
@@ -3749,7 +3749,7 @@ qe.bitcoin = {
3749
3749
  */
3750
3750
  wif: 128
3751
3751
  };
3752
- qe.regtest = {
3752
+ Ge.regtest = {
3753
3753
  messagePrefix: `Bitcoin Signed Message:
3754
3754
  `,
3755
3755
  bech32: "bcrt",
@@ -3761,7 +3761,7 @@ qe.regtest = {
3761
3761
  scriptHash: 196,
3762
3762
  wif: 239
3763
3763
  };
3764
- qe.testnet = {
3764
+ Ge.testnet = {
3765
3765
  messagePrefix: `Bitcoin Signed Message:
3766
3766
  `,
3767
3767
  bech32: "tb",
@@ -3802,7 +3802,7 @@ function Id(e) {
3802
3802
  rt.value = Id;
3803
3803
  Object.defineProperty(Ki, "__esModule", { value: !0 });
3804
3804
  Ki.p2data = void 0;
3805
- const Td = qe, Ai = nt(), wt = Ge, Ta = rt, ka = Ai.OPS;
3805
+ const Td = Ge, Ai = nt(), wt = qe, Ta = rt, ka = Ai.OPS;
3806
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)(
@@ -3836,7 +3836,7 @@ Ki.p2data = kd;
3836
3836
  var Yi = {};
3837
3837
  Object.defineProperty(Yi, "__esModule", { value: !0 });
3838
3838
  Yi.p2ms = void 0;
3839
- const Pd = qe, Wr = nt(), Ie = Ge, Qt = rt, Kr = Wr.OPS, li = Kr.OP_RESERVED;
3839
+ const Pd = Ge, Wr = nt(), Ie = qe, Qt = rt, Kr = Wr.OPS, li = Kr.OP_RESERVED;
3840
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");
@@ -3940,7 +3940,7 @@ Yi.p2ms = Od;
3940
3940
  var Xi = {};
3941
3941
  Object.defineProperty(Xi, "__esModule", { value: !0 });
3942
3942
  Xi.p2pk = void 0;
3943
- const Rd = qe, Yr = nt(), dt = Ge, Vr = rt, Pa = Yr.OPS;
3943
+ const Rd = Ge, Yr = nt(), dt = qe, Vr = rt, Pa = Yr.OPS;
3944
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");
@@ -4092,7 +4092,7 @@ function $d(e) {
4092
4092
  var Do = Dd($d);
4093
4093
  Object.defineProperty(Zi, "__esModule", { value: !0 });
4094
4094
  Zi.p2pkh = void 0;
4095
- const Ls = br, jd = qe, Xr = nt(), Ke = Ge, Ot = rt, Ra = Do, er = Xr.OPS;
4095
+ const Ls = br, jd = Ge, Xr = nt(), Ke = qe, Ot = rt, Ra = Do, er = Xr.OPS;
4096
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");
@@ -4190,8 +4190,8 @@ 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, Vd = qe, xt = nt(), ge = Ge, _t = rt, Ua = Do, En = xt.OPS;
4194
- function qd(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)(
@@ -4329,7 +4329,7 @@ function qd(e, t) {
4329
4329
  }
4330
4330
  return Object.assign(n, e);
4331
4331
  }
4332
- Ji.p2sh = qd;
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,7 +4373,7 @@ function $o(e, t, r, n) {
4373
4373
  }
4374
4374
  return a;
4375
4375
  }
4376
- function Gd(e) {
4376
+ function qd(e) {
4377
4377
  return $o(e, 8, 5, !0);
4378
4378
  }
4379
4379
  function Wd(e) {
@@ -4457,7 +4457,7 @@ function lf(e) {
4457
4457
  decodeUnsafe: i,
4458
4458
  decode: s,
4459
4459
  encode: r,
4460
- toWords: Gd,
4460
+ toWords: qd,
4461
4461
  fromWordsUnsafe: Wd,
4462
4462
  fromWords: Kd
4463
4463
  };
@@ -4466,7 +4466,7 @@ 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, Yd = qe, Bi = nt(), Pe = Ge, tr = rt, di = Vt, Na = Bi.OPS, Xd = Buffer.alloc(0);
4469
+ const Ns = br, Yd = Ge, Bi = nt(), Pe = qe, tr = rt, di = Vt, Na = Bi.OPS, Xd = Buffer.alloc(0);
4470
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");
@@ -4568,7 +4568,7 @@ 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, Jd = qe, Nt = nt(), ye = Ge, 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
  }
@@ -4779,7 +4779,7 @@ const nh = [
4779
4779
  var jo = {};
4780
4780
  (function(e) {
4781
4781
  Object.defineProperty(e, "__esModule", { value: !0 }), e.tweakKey = e.tapTweakHash = e.tapleafHash = e.findScriptPath = e.toHashTree = e.rootHashFromPath = e.MAX_TAPTREE_DEPTH = e.LEAF_VERSION_TAPSCRIPT = void 0;
4782
- const t = Wt, r = Rr, n = br, i = He, s = Ge;
4782
+ const t = Wt, r = Rr, n = br, i = He, s = qe;
4783
4783
  e.LEAF_VERSION_TAPSCRIPT = 192, e.MAX_TAPTREE_DEPTH = 128;
4784
4784
  const o = (S) => "left" in S && "right" in S;
4785
4785
  function a(S, _) {
@@ -4858,7 +4858,7 @@ var Ye = {}, Ma;
4858
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
- const e = qe, t = zo(), r = nt(), n = Ge, 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.";
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.";
4862
4862
  function w(E, v) {
4863
4863
  const B = E.slice(2);
4864
4864
  if (B.length < a || B.length > o)
@@ -4981,7 +4981,7 @@ var Da;
4981
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 = qe, r = nt(), n = Ge, i = Rr, s = jo, o = rt, a = Vt, f = ih(), 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");
@@ -5166,9 +5166,9 @@ function sh() {
5166
5166
  throw new TypeError("Internal pubkey mismatch");
5167
5167
  if (!(0, i.getEccLib)().isXOnlyPoint(P))
5168
5168
  throw new TypeError("Invalid internalPubkey for p2tr witness");
5169
- const G = L[0] & n.TAPLEAF_VERSION_MASK, K = x[x.length - 2], C = (0, s.tapleafHash)({
5169
+ const q = L[0] & n.TAPLEAF_VERSION_MASK, K = x[x.length - 2], C = (0, s.tapleafHash)({
5170
5170
  output: K,
5171
- version: G
5171
+ version: q
5172
5172
  }), j = (0, s.rootHashFromPath)(L, C), N = (0, s.tweakKey)(P, j);
5173
5173
  if (!N)
5174
5174
  throw new TypeError("Invalid outputKey for p2tr witness");
@@ -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 = Gn, oh = 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 {
@@ -5325,7 +5325,7 @@ function lh(e) {
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 = Ge, dh = Gn, ts = pe, pr = jo, hh = zo(), ph = pe, yh = (e) => e.length === 32 ? e : e.slice(1, 33);
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
5329
  Se.toXOnly = yh;
5330
5330
  function mh(e, t, r) {
5331
5331
  const n = Uh(
@@ -5702,7 +5702,7 @@ class Dn {
5702
5702
  const { tx: i, usedUtxos: s } = await this._buildRawTx(r, n), o = this.getOutputScript(), a = le.Transaction.SIGHASH_SINGLE | le.Transaction.SIGHASH_ANYONECANPAY, f = this.leafHash(
5703
5703
  1
5704
5704
  /* REDEEM */
5705
- ), l = s.map((p) => p.value), d = qr(o, s.length);
5705
+ ), l = s.map((p) => p.value), d = Gr(o, s.length);
5706
5706
  for (let p = 0; p < i.ins.length; p++) {
5707
5707
  const w = i.hashForWitnessV1(
5708
5708
  p,
@@ -5727,7 +5727,7 @@ class Dn {
5727
5727
  const { tx: n, usedUtxos: i } = await this._buildRawTx(t, r), s = this.getOutputScript(), o = le.Transaction.SIGHASH_SINGLE | le.Transaction.SIGHASH_ANYONECANPAY, a = this.leafHash(
5728
5728
  2
5729
5729
  /* INSTANT_REFUND */
5730
- ), f = i.map((d) => d.value), l = qr(s, i.length);
5730
+ ), f = i.map((d) => d.value), l = Gr(s, i.length);
5731
5731
  for (let d = 0; d < n.ins.length; d++) {
5732
5732
  const p = n.hashForWitnessV1(
5733
5733
  d,
@@ -5765,7 +5765,7 @@ class Dn {
5765
5765
  const s = this.getOutputScript(), o = le.Transaction.SIGHASH_DEFAULT, a = this.leafHash(
5766
5766
  2
5767
5767
  /* INSTANT_REFUND */
5768
- ), f = i.map((p) => p.value), l = qr(s, i.length);
5768
+ ), f = i.map((p) => p.value), l = Gr(s, i.length);
5769
5769
  for (let p = 0; p < n.ins.length; p++) {
5770
5770
  const w = n.hashForWitnessV1(
5771
5771
  p,
@@ -5810,7 +5810,7 @@ class Dn {
5810
5810
  ), o = this.leafHash(
5811
5811
  1
5812
5812
  /* REDEEM */
5813
- ), a = s.map((w) => w.value), f = qr(this.getOutputScript(), s.length), l = le.Transaction.SIGHASH_DEFAULT;
5813
+ ), a = s.map((w) => w.value), f = Gr(this.getOutputScript(), s.length), l = le.Transaction.SIGHASH_DEFAULT;
5814
5814
  for (let w = 0; w < i.ins.length; w++) {
5815
5815
  const y = i.hashForWitnessV1(
5816
5816
  w,
@@ -5865,7 +5865,7 @@ class Dn {
5865
5865
  const o = this.leafHash(
5866
5866
  1
5867
5867
  /* REDEEM */
5868
- ), a = s.map((p) => p.value), f = qr(this.getOutputScript(), s.length), l = le.Transaction.SIGHASH_DEFAULT;
5868
+ ), a = s.map((p) => p.value), f = Gr(this.getOutputScript(), s.length), l = le.Transaction.SIGHASH_DEFAULT;
5869
5869
  for (let p = 0; p < i.ins.length; p++) {
5870
5870
  const w = i.hashForWitnessV1(
5871
5871
  p,
@@ -5921,7 +5921,7 @@ class Dn {
5921
5921
  const a = this.leafHash(
5922
5922
  0
5923
5923
  /* REFUND */
5924
- ), f = i.map((w) => w.value), l = qr(this.getOutputScript(), i.length), d = le.Transaction.SIGHASH_DEFAULT;
5924
+ ), f = i.map((w) => w.value), l = Gr(this.getOutputScript(), i.length), d = le.Transaction.SIGHASH_DEFAULT;
5925
5925
  for (let w = 0; w < n.ins.length; w++) {
5926
5926
  n.ins[w].sequence = this.expiry;
5927
5927
  const y = n.hashForWitnessV1(
@@ -6083,7 +6083,7 @@ class Dn {
6083
6083
  }
6084
6084
  }
6085
6085
  }
6086
- function qr(e, t) {
6086
+ function Gr(e, t) {
6087
6087
  const r = [];
6088
6088
  for (let n = 0; n < t; n++)
6089
6089
  r.push(e);
@@ -6128,7 +6128,7 @@ class Fh {
6128
6128
  const t = await Dt.get(this.url);
6129
6129
  return ae(t);
6130
6130
  } catch (t) {
6131
- return q("Failed to fetch block numbers", t);
6131
+ return G("Failed to fetch block numbers", t);
6132
6132
  }
6133
6133
  }
6134
6134
  }
@@ -6169,9 +6169,9 @@ class Mh {
6169
6169
  retryCount: 0,
6170
6170
  ...i
6171
6171
  });
6172
- return o.error ? q(o.error) : o.result ? ae(o.result) : q("GetQuote: Unexpected error, result is undefined");
6172
+ return o.error ? G(o.error) : o.result ? ae(o.result) : G("GetQuote: Unexpected error, result is undefined");
6173
6173
  } catch (s) {
6174
- return q("GetQuote:", String(s));
6174
+ return G("GetQuote:", String(s));
6175
6175
  }
6176
6176
  }
6177
6177
  async getAttestedQuote(t) {
@@ -6182,9 +6182,9 @@ class Mh {
6182
6182
  "Content-Type": "application/json"
6183
6183
  }
6184
6184
  });
6185
- return r.error ? q(r.error) : r.result ? ae(r.result) : q("GetAttestedQuote: Unexpected error, result is undefined");
6185
+ return r.error ? G(r.error) : r.result ? ae(r.result) : G("GetAttestedQuote: Unexpected error, result is undefined");
6186
6186
  } catch (r) {
6187
- return console.log("error :", r), q("GetAttestedQuote:", String(r));
6187
+ return console.log("error :", r), G("GetAttestedQuote:", String(r));
6188
6188
  }
6189
6189
  }
6190
6190
  async getStrategies() {
@@ -6192,9 +6192,9 @@ class Mh {
6192
6192
  const t = await Dt.get(
6193
6193
  this.quoteUrl.endpoint("/strategies")
6194
6194
  );
6195
- if (t.error) return q(t.error);
6195
+ if (t.error) return G(t.error);
6196
6196
  if (!t.result)
6197
- return q("GetStrategies: Unexpected error, result is undefined");
6197
+ return G("GetStrategies: Unexpected error, result is undefined");
6198
6198
  const r = {};
6199
6199
  for (const n of Object.values(t.result)) {
6200
6200
  const i = Al(
@@ -6212,7 +6212,7 @@ class Mh {
6212
6212
  }
6213
6213
  return ae(r);
6214
6214
  } catch (t) {
6215
- return q("GetStrategies:", String(t));
6215
+ return G("GetStrategies:", String(t));
6216
6216
  }
6217
6217
  }
6218
6218
  }
@@ -6245,7 +6245,7 @@ an.testnet = {
6245
6245
  };
6246
6246
  var mf = {};
6247
6247
  (function(e) {
6248
- Object.defineProperty(e, "__esModule", { value: !0 }), e.maybe = e.Boolean = e.Array = e.Buffer256bit = e.Network = e.typeforce = void 0, e.typeforce = Gc, e.Network = e.typeforce.compile({
6248
+ Object.defineProperty(e, "__esModule", { value: !0 }), e.maybe = e.Boolean = e.Array = e.Buffer256bit = e.Network = e.typeforce = void 0, e.typeforce = qc, e.Network = e.typeforce.compile({
6249
6249
  messagePrefix: e.typeforce.oneOf(
6250
6250
  e.typeforce.Buffer,
6251
6251
  e.typeforce.String
@@ -6328,7 +6328,7 @@ typeof Object.create == "function" ? mo.exports = function(t, r) {
6328
6328
  n.prototype = r.prototype, t.prototype = new n(), t.prototype.constructor = t;
6329
6329
  }
6330
6330
  };
6331
- var Me = mo.exports, bo = { exports: {} }, qo = { exports: {} }, tn = typeof Reflect == "object" ? Reflect : null, za = tn && typeof tn.apply == "function" ? tn.apply : function(t, r, n) {
6331
+ var Me = mo.exports, bo = { exports: {} }, Go = { exports: {} }, tn = typeof Reflect == "object" ? Reflect : null, za = tn && typeof tn.apply == "function" ? tn.apply : function(t, r, n) {
6332
6332
  return Function.prototype.apply.call(t, r, n);
6333
6333
  }, Pi;
6334
6334
  tn && typeof tn.ownKeys == "function" ? Pi = tn.ownKeys : Object.getOwnPropertySymbols ? Pi = function(t) {
@@ -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 qh(e) {
6339
+ function Gh(e) {
6340
6340
  console && console.warn && console.warn(e);
6341
6341
  }
6342
6342
  var bf = Number.isNaN || function(t) {
@@ -6345,8 +6345,8 @@ var bf = Number.isNaN || function(t) {
6345
6345
  function de() {
6346
6346
  de.init.call(this);
6347
6347
  }
6348
- qo.exports = de;
6349
- qo.exports.once = Yh;
6348
+ Go.exports = de;
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, qh(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 Gh() {
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 = Gh.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) {
@@ -6551,15 +6551,15 @@ function Sf(e, t, r, n) {
6551
6551
  else
6552
6552
  throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof e);
6553
6553
  }
6554
- var Af = qo.exports, Bf = Af.EventEmitter;
6554
+ var Af = Go.exports, Bf = Af.EventEmitter;
6555
6555
  const Zh = {}, Jh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6556
6556
  __proto__: null,
6557
6557
  default: Zh
6558
- }, Symbol.toStringTag, { value: "Module" })), Go = /* @__PURE__ */ Cl(Jh);
6559
- var Ds, qa;
6558
+ }, Symbol.toStringTag, { value: "Module" })), qo = /* @__PURE__ */ Cl(Jh);
6559
+ var Ds, Ga;
6560
6560
  function Qh() {
6561
- if (qa) return Ds;
6562
- qa = 1;
6561
+ if (Ga) return Ds;
6562
+ Ga = 1;
6563
6563
  function e(I, S) {
6564
6564
  var _ = Object.keys(I);
6565
6565
  if (Object.getOwnPropertySymbols) {
@@ -6611,7 +6611,7 @@ function Qh() {
6611
6611
  }
6612
6612
  return (S === "string" ? String : Number)(I);
6613
6613
  }
6614
- var f = Wt, l = f.Buffer, d = Go, p = d.inspect, w = p && p.custom || "inspect";
6614
+ var f = Wt, l = f.Buffer, d = qo, p = d.inspect, w = p && p.custom || "inspect";
6615
6615
  function y(I, S, _) {
6616
6616
  l.prototype.copy.call(I, S, _);
6617
6617
  }
@@ -6724,10 +6724,10 @@ function Qh() {
6724
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
- !t && s ? r._writableState ? r._writableState.errorEmitted ? process.nextTick(Oi, r) : (r._writableState.errorEmitted = !0, process.nextTick(Ga, r, s)) : process.nextTick(Ga, r, s) : t ? (process.nextTick(Oi, r), t(s)) : process.nextTick(Oi, r);
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);
6728
6728
  }), this);
6729
6729
  }
6730
- function Ga(e, t) {
6730
+ function qa(e, t) {
6731
6731
  go(e, t), Oi(e);
6732
6732
  }
6733
6733
  function Oi(e) {
@@ -6925,13 +6925,13 @@ function Pf() {
6925
6925
  var D = new k();
6926
6926
  v(O, D), process.nextTick(R, D);
6927
6927
  }
6928
- function G(O, R, D, Y) {
6928
+ function q(O, R, D, Y) {
6929
6929
  var J;
6930
6930
  return D === null ? J = new A() : typeof D != "string" && !R.objectMode && (J = new w("chunk", ["string", "Buffer"], D)), J ? (v(O, J), process.nextTick(Y, J), !1) : !0;
6931
6931
  }
6932
6932
  M.prototype.write = function(O, R, D) {
6933
6933
  var Y = this._writableState, J = !1, b = !Y.objectMode && a(O);
6934
- return b && !i.isBuffer(O) && (O = o(O)), typeof R == "function" && (D = R, R = null), b ? R = "buffer" : R || (R = Y.defaultEncoding), typeof D != "function" && (D = B), Y.ending ? P(this, D) : (b || G(this, Y, O, D)) && (Y.pendingcb++, J = C(this, Y, b, O, R, D)), J;
6934
+ return b && !i.isBuffer(O) && (O = o(O)), typeof R == "function" && (D = R, R = null), b ? R = "buffer" : R || (R = Y.defaultEncoding), typeof D != "function" && (D = B), Y.ending ? P(this, D) : (b || q(this, Y, O, D)) && (Y.pendingcb++, J = C(this, Y, b, O, R, D)), J;
6935
6935
  }, M.prototype.cork = function() {
6936
6936
  this._writableState.corked++;
6937
6937
  }, M.prototype.uncork = function() {
@@ -7344,9 +7344,9 @@ function Of(e, t, r) {
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
- var Ko = Of, qs, Ja;
7347
+ var Ko = Of, Gs, Ja;
7348
7348
  function T0() {
7349
- if (Ja) return qs;
7349
+ if (Ja) return Gs;
7350
7350
  Ja = 1;
7351
7351
  var e;
7352
7352
  function t(E, v, B) {
@@ -7406,9 +7406,9 @@ function T0() {
7406
7406
  if (this[f])
7407
7407
  return Promise.resolve(w(void 0, !0));
7408
7408
  if (this[p].destroyed)
7409
- return new Promise(function(P, G) {
7409
+ return new Promise(function(P, q) {
7410
7410
  process.nextTick(function() {
7411
- v[a] ? G(v[a]) : P(w(void 0, !0));
7411
+ v[a] ? q(v[a]) : P(w(void 0, !0));
7412
7412
  });
7413
7413
  });
7414
7414
  var x = this[l], L;
@@ -7453,8 +7453,8 @@ function T0() {
7453
7453
  writable: !0
7454
7454
  }), t(B, d, {
7455
7455
  value: function(M, P) {
7456
- var G = x[p].read();
7457
- G ? (x[l] = null, x[s] = null, x[o] = null, M(w(G, !1))) : (x[s] = M, x[o] = P);
7456
+ var q = x[p].read();
7457
+ q ? (x[l] = null, x[s] = null, x[o] = null, M(w(q, !1))) : (x[s] = M, x[o] = P);
7458
7458
  },
7459
7459
  writable: !0
7460
7460
  }), B));
@@ -7468,13 +7468,13 @@ function T0() {
7468
7468
  P !== null && (x[l] = null, x[s] = null, x[o] = null, P(w(void 0, !0))), x[f] = !0;
7469
7469
  }), v.on("readable", I.bind(null, x)), x;
7470
7470
  };
7471
- return qs = k, qs;
7471
+ return Gs = k, Gs;
7472
7472
  }
7473
- var Gs, Qa;
7473
+ var qs, Qa;
7474
7474
  function k0() {
7475
- return Qa || (Qa = 1, Gs = function() {
7475
+ return Qa || (Qa = 1, qs = function() {
7476
7476
  throw new Error("Readable.from is not available in the browser");
7477
- }), Gs;
7477
+ }), qs;
7478
7478
  }
7479
7479
  var Ws, ec;
7480
7480
  function Rf() {
@@ -7492,7 +7492,7 @@ function Rf() {
7492
7492
  function o(b) {
7493
7493
  return n.isBuffer(b) || b instanceof i;
7494
7494
  }
7495
- var a = Go, f;
7495
+ var a = qo, f;
7496
7496
  a && a.debuglog ? f = a.debuglog("stream") : f = function() {
7497
7497
  };
7498
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;
@@ -7525,11 +7525,11 @@ function Rf() {
7525
7525
  g(b);
7526
7526
  }, P.prototype.push = function(b, g) {
7527
7527
  var F = this._readableState, V;
7528
- return F.objectMode ? V = !0 : typeof b == "string" && (g = g || F.defaultEncoding, g !== F.encoding && (b = n.from(b, g), g = ""), V = !0), G(this, b, g, !1, V);
7528
+ return F.objectMode ? V = !0 : typeof b == "string" && (g = g || F.defaultEncoding, g !== F.encoding && (b = n.from(b, g), g = ""), V = !0), q(this, b, g, !1, V);
7529
7529
  }, P.prototype.unshift = function(b) {
7530
- return G(this, b, null, !0, !1);
7530
+ return q(this, b, null, !0, !1);
7531
7531
  };
7532
- function G(b, g, F, V, fe) {
7532
+ function q(b, g, F, V, fe) {
7533
7533
  f("readableAddChunk", g);
7534
7534
  var te = b._readableState;
7535
7535
  if (g === null)
@@ -7814,8 +7814,8 @@ function Rf() {
7814
7814
  }
7815
7815
  return Ws;
7816
7816
  }
7817
- var Cf = qt, 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
- Me(qt, is);
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
+ Me(Gt, is);
7819
7819
  function U0(e, t) {
7820
7820
  var r = this._transformState;
7821
7821
  r.transforming = !1;
@@ -7826,8 +7826,8 @@ function U0(e, t) {
7826
7826
  var i = this._readableState;
7827
7827
  i.reading = !1, (i.needReadable || i.length < i.highWaterMark) && this._read(i.highWaterMark);
7828
7828
  }
7829
- function qt(e) {
7830
- if (!(this instanceof qt)) return new qt(e);
7829
+ function Gt(e) {
7830
+ if (!(this instanceof Gt)) return new Gt(e);
7831
7831
  is.call(this, e), this._transformState = {
7832
7832
  afterTransform: U0.bind(this),
7833
7833
  needTransform: !1,
@@ -7843,24 +7843,24 @@ function L0() {
7843
7843
  tc(e, t, r);
7844
7844
  }) : tc(this, null, null);
7845
7845
  }
7846
- qt.prototype.push = function(e, t) {
7846
+ Gt.prototype.push = function(e, t) {
7847
7847
  return this._transformState.needTransform = !1, is.prototype.push.call(this, e, t);
7848
7848
  };
7849
- qt.prototype._transform = function(e, t, r) {
7849
+ Gt.prototype._transform = function(e, t, r) {
7850
7850
  r(new P0("_transform()"));
7851
7851
  };
7852
- qt.prototype._write = function(e, t, r) {
7852
+ Gt.prototype._write = function(e, t, r) {
7853
7853
  var n = this._transformState;
7854
7854
  if (n.writecb = r, n.writechunk = e, n.writeencoding = t, !n.transforming) {
7855
7855
  var i = this._readableState;
7856
7856
  (n.needTransform || i.needReadable || i.length < i.highWaterMark) && this._read(i.highWaterMark);
7857
7857
  }
7858
7858
  };
7859
- qt.prototype._read = function(e) {
7859
+ Gt.prototype._read = function(e) {
7860
7860
  var t = this._transformState;
7861
7861
  t.writechunk !== null && !t.transforming ? (t.transforming = !0, this._transform(t.writechunk, t.writeencoding, t.afterTransform)) : t.needTransform = !0;
7862
7862
  };
7863
- qt.prototype._destroy = function(e, t) {
7863
+ Gt.prototype._destroy = function(e, t) {
7864
7864
  is.prototype._destroy.call(this, e, function(r) {
7865
7865
  t(r);
7866
7866
  });
@@ -7938,11 +7938,11 @@ function V0() {
7938
7938
  });
7939
7939
  return t.reduce(j0);
7940
7940
  }
7941
- var q0 = V0;
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 = N0, t.finished = Ko, t.pipeline = q0;
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, G0 = Me;
7945
+ var Nf = bo.exports, Fi = Je.Buffer, Hf = Nf.Transform, q0 = Me;
7946
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");
@@ -7950,7 +7950,7 @@ function W0(e, t) {
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
- G0(gr, Hf);
7953
+ q0(gr, Hf);
7954
7954
  gr.prototype._transform = function(e, t, r) {
7955
7955
  var n = null;
7956
7956
  try {
@@ -8542,7 +8542,7 @@ Zn.prototype._hash = function() {
8542
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 vp = Zn, Ep = Me, qf = pn, xp = Je.Buffer, Sp = [
8545
+ var vp = Zn, Ep = Me, Gf = pn, xp = Je.Buffer, Sp = [
8546
8546
  1116352408,
8547
8547
  1899447441,
8548
8548
  3049323471,
@@ -8609,9 +8609,9 @@ var vp = Zn, Ep = Me, qf = pn, xp = Je.Buffer, Sp = [
8609
8609
  3329325298
8610
8610
  ], Ap = new Array(64);
8611
8611
  function Jn() {
8612
- this.init(), this._w = Ap, qf.call(this, 64, 56);
8612
+ this.init(), this._w = Ap, Gf.call(this, 64, 56);
8613
8613
  }
8614
- Ep(Jn, qf);
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
  };
@@ -8646,7 +8646,7 @@ Jn.prototype._hash = function() {
8646
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 Gf = Jn, Rp = Me, Cp = Gf, Up = pn, Lp = Je.Buffer, Np = 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
8651
  this.init(), this._w = Np, Up.call(this, 64, 56);
8652
8652
  }
@@ -8860,7 +8860,7 @@ Qn.prototype._update = function(e) {
8860
8860
  for (; k < 160; k += 2) {
8861
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 = zp(E, v), M = Vp(v, E), P = t[k - 7 * 2], G = t[k - 7 * 2 + 1], K = t[k - 16 * 2], C = t[k - 16 * 2 + 1], j = x + G | 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) {
@@ -8879,11 +8879,11 @@ Qn.prototype._hash = function() {
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, qp = Me, Gp = Kf, Wp = pn, Kp = Je.Buffer, Yp = 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
8884
  this.init(), this._w = Yp, Wp.call(this, 128, 112);
8885
8885
  }
8886
- qp(us, Gp);
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
  };
@@ -8903,10 +8903,10 @@ var Xp = us, Fr = $f.exports = function(t) {
8903
8903
  Fr.sha = dp;
8904
8904
  Fr.sha1 = vp;
8905
8905
  Fr.sha224 = Hp;
8906
- Fr.sha256 = Gf;
8906
+ Fr.sha256 = qf;
8907
8907
  Fr.sha384 = Xp;
8908
8908
  Fr.sha512 = Kf;
8909
- var Zp = $f.exports, Yf = Je.Buffer, Xf = Go.Transform, Jp = Hi.StringDecoder, Qp = 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
  }
@@ -9469,11 +9469,11 @@ class Di extends Uc {
9469
9469
  async initialize() {
9470
9470
  if (this.digestKey) return ae("Already initialized");
9471
9471
  const t = await this.deriveDigestKeyFromWalletClient();
9472
- return t.error ? q(t.error) : (this.emit("initialized", !0), ae("Initialized"));
9472
+ return t.error ? G(t.error) : (this.emit("initialized", !0), ae("Initialized"));
9473
9473
  }
9474
9474
  async deriveDigestKeyFromWalletClient() {
9475
- if (!this.walletClient) return q("No walletClient found");
9476
- if (!this.walletClient.account) return q("No account found");
9475
+ if (!this.walletClient) return G("No walletClient found");
9476
+ if (!this.walletClient.account) return G("No account found");
9477
9477
  try {
9478
9478
  const t = await this.walletClient.signTypedData({
9479
9479
  account: this.walletClient.account,
@@ -9501,34 +9501,34 @@ class Di extends Uc {
9501
9501
  });
9502
9502
  return this.digestKey = Bt(ai(t)), this.emit("initialized", !0), ae(this.digestKey);
9503
9503
  } catch (t) {
9504
- return q("Failed to initialize: " + t);
9504
+ return G("Failed to initialize: " + t);
9505
9505
  }
9506
9506
  }
9507
9507
  async getDigestKey() {
9508
9508
  if (!this.digestKey && !this.walletClient)
9509
- return q("No private key or wallet client found");
9509
+ return G("No private key or wallet client found");
9510
9510
  if (!this.digestKey && this.walletClient) {
9511
9511
  const t = await this.deriveDigestKeyFromWalletClient();
9512
9512
  if (t.error)
9513
- return q(t.error);
9513
+ return G(t.error);
9514
9514
  }
9515
- return this.digestKey ? ae(this.digestKey) : q("No private key found");
9515
+ return this.digestKey ? ae(this.digestKey) : G("No private key found");
9516
9516
  }
9517
9517
  async generateSecret(t) {
9518
9518
  const r = await this.signMessage(t);
9519
- if (r.error) return q(r.error);
9519
+ if (r.error) return G(r.error);
9520
9520
  const n = ai(_i(r.val)), i = ai(n);
9521
9521
  return ae({ secret: n, secretHash: i });
9522
9522
  }
9523
9523
  async signMessage(t) {
9524
9524
  if (!this.digestKey) {
9525
9525
  const l = await this.getDigestKey();
9526
- if (l.error) return q(l.error);
9526
+ if (l.error) return G(l.error);
9527
9527
  this.digestKey = l.val;
9528
9528
  }
9529
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
- return q("Invalid private key length. Expected 32 bytes.");
9531
+ return G("Invalid private key length. Expected 32 bytes.");
9532
9532
  const f = r.fromPrivateKey(o).sign(Buffer.from(Bt(s), "hex"));
9533
9533
  return ae(f.toString("hex"));
9534
9534
  }
@@ -9563,7 +9563,7 @@ function Qf(e, t) {
9563
9563
  if (e.length < r)
9564
9564
  throw new Error("digestInto() expects output buffer of length at least " + r);
9565
9565
  }
9566
- const Gr = typeof globalThis == "object" && "crypto" in globalThis ? globalThis.crypto : void 0;
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
9568
  function Iy(e) {
9569
9569
  return new Uint32Array(e.buffer, e.byteOffset, Math.floor(e.byteLength / 4));
@@ -9614,10 +9614,10 @@ function eu(e) {
9614
9614
  return t.outputLen = r.outputLen, t.blockLen = r.blockLen, t.create = () => e(), t;
9615
9615
  }
9616
9616
  function Oy(e = 32) {
9617
- if (Gr && typeof Gr.getRandomValues == "function")
9618
- return Gr.getRandomValues(new Uint8Array(e));
9619
- if (Gr && typeof Gr.randomBytes == "function")
9620
- return Gr.randomBytes(e);
9617
+ if (qr && typeof qr.getRandomValues == "function")
9618
+ return qr.getRandomValues(new Uint8Array(e));
9619
+ if (qr && typeof qr.randomBytes == "function")
9620
+ return qr.randomBytes(e);
9621
9621
  throw new Error("crypto.getRandomValues must be defined");
9622
9622
  }
9623
9623
  function Ry(e, t, r, n) {
@@ -9995,7 +9995,7 @@ function su(e, t, r) {
9995
9995
  return o(), y;
9996
9996
  };
9997
9997
  }
9998
- const qy = {
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 qy = {
10008
10008
  };
10009
10009
  function ri(e, t, r = {}) {
10010
10010
  const n = (i, s, o) => {
10011
- const a = qy[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 Gy = () => {
10024
+ const qy = () => {
10025
10025
  throw new Error("not implemented");
10026
10026
  };
10027
10027
  function Eo(e) {
@@ -10055,7 +10055,7 @@ const Wy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10055
10055
  inRange: ms,
10056
10056
  isBytes: Ur,
10057
10057
  memoized: Eo,
10058
- notImplemented: Gy,
10058
+ notImplemented: qy,
10059
10059
  numberToBytesBE: hn,
10060
10060
  numberToBytesLE: Jo,
10061
10061
  numberToHexUnpadded: Zr,
@@ -10717,8 +10717,8 @@ function lm(e) {
10717
10717
  // Cost: 8M + 3S + 3*a + 2*b3 + 15add.
10718
10718
  double() {
10719
10719
  const { a: _, b: A } = t, k = r.mul(A, Sc), { px: E, py: v, pz: B } = this;
10720
- let x = r.ZERO, L = r.ZERO, M = r.ZERO, P = r.mul(E, E), G = r.mul(v, v), K = r.mul(B, B), C = r.mul(E, v);
10721
- return C = r.add(C, C), M = r.mul(E, B), M = r.add(M, M), x = r.mul(_, M), L = r.mul(k, K), L = r.add(x, L), x = r.sub(G, L), L = r.add(G, L), L = r.mul(x, L), x = r.mul(C, x), M = r.mul(k, M), K = r.mul(_, K), C = r.sub(P, K), C = r.mul(_, C), C = r.add(C, M), M = r.add(P, P), P = r.add(M, P), P = r.add(P, K), P = r.mul(P, C), L = r.add(L, P), K = r.mul(v, B), K = r.add(K, K), P = r.mul(K, C), x = r.sub(x, P), M = r.mul(K, G), M = r.add(M, M), M = r.add(M, M), new w(x, L, M);
10720
+ let x = r.ZERO, L = r.ZERO, M = r.ZERO, P = r.mul(E, E), q = r.mul(v, v), K = r.mul(B, B), C = r.mul(E, v);
10721
+ return C = r.add(C, C), M = r.mul(E, B), M = r.add(M, M), x = r.mul(_, M), L = r.mul(k, K), L = r.add(x, L), x = r.sub(q, L), L = r.add(q, L), L = r.mul(x, L), x = r.mul(C, x), M = r.mul(k, M), K = r.mul(_, K), C = r.sub(P, K), C = r.mul(_, C), C = r.add(C, M), M = r.add(P, P), P = r.add(M, P), P = r.add(P, K), P = r.mul(P, C), L = r.add(L, P), K = r.mul(v, B), K = r.add(K, K), P = r.mul(K, C), x = r.sub(x, P), M = r.mul(K, q), M = r.add(M, M), M = r.add(M, M), new w(x, L, M);
10722
10722
  }
10723
10723
  // Renes-Costello-Batina exception-free addition formula.
10724
10724
  // There is 30% faster Jacobian formula, but it is not complete.
@@ -10728,11 +10728,11 @@ function lm(e) {
10728
10728
  l(_);
10729
10729
  const { px: A, py: k, pz: E } = this, { px: v, py: B, pz: x } = _;
10730
10730
  let L = r.ZERO, M = r.ZERO, P = r.ZERO;
10731
- const G = t.a, K = r.mul(t.b, Sc);
10731
+ const q = t.a, K = r.mul(t.b, Sc);
10732
10732
  let C = r.mul(A, v), j = r.mul(k, B), N = r.mul(E, x), $ = r.add(A, k), z = r.add(v, B);
10733
10733
  $ = r.mul($, z), z = r.add(C, j), $ = r.sub($, z), z = r.add(A, E);
10734
10734
  let W = r.add(v, x);
10735
- return z = r.mul(z, W), W = r.add(C, N), z = r.sub(z, W), W = r.add(k, E), L = r.add(B, x), W = r.mul(W, L), L = r.add(j, N), W = r.sub(W, L), P = r.mul(G, z), L = r.mul(K, N), P = r.add(L, P), L = r.sub(j, P), P = r.add(j, P), M = r.mul(L, P), j = r.add(C, C), j = r.add(j, C), N = r.mul(G, N), z = r.mul(K, z), j = r.add(j, N), N = r.sub(C, N), N = r.mul(G, N), z = r.add(z, N), C = r.mul(j, z), M = r.add(M, C), C = r.mul(W, z), L = r.mul($, L), L = r.sub(L, C), C = r.mul($, j), P = r.mul(W, P), P = r.add(P, C), new w(L, M, P);
10735
+ return z = r.mul(z, W), W = r.add(C, N), z = r.sub(z, W), W = r.add(k, E), L = r.add(B, x), W = r.mul(W, L), L = r.add(j, N), W = r.sub(W, L), P = r.mul(q, z), L = r.mul(K, N), P = r.add(L, P), L = r.sub(j, P), P = r.add(j, P), M = r.mul(L, P), j = r.add(C, C), j = r.add(j, C), N = r.mul(q, N), z = r.mul(K, z), j = r.add(j, N), N = r.sub(C, N), N = r.mul(q, N), z = r.add(z, N), C = r.mul(j, z), M = r.add(M, C), C = r.mul(W, z), L = r.mul($, L), L = r.sub(L, C), C = r.mul($, j), P = r.mul(W, P), P = r.add(P, C), new w(L, M, P);
10736
10736
  }
10737
10737
  subtract(_) {
10738
10738
  return this.add(_.negate());
@@ -10758,9 +10758,9 @@ function lm(e) {
10758
10758
  return this;
10759
10759
  if (!A || I.hasPrecomputes(this))
10760
10760
  return I.wNAFCachedUnsafe(this, _, w.normalizeZ);
10761
- let { k1neg: v, k1: B, k2neg: x, k2: L } = A.splitScalar(_), M = E, P = E, G = this;
10761
+ let { k1neg: v, k1: B, k2neg: x, k2: L } = A.splitScalar(_), M = E, P = E, q = this;
10762
10762
  for (; B > Mt || L > Mt; )
10763
- B & Ce && (M = M.add(G)), L & Ce && (P = P.add(G)), G = G.double(), B >>= Ce, L >>= Ce;
10763
+ B & Ce && (M = M.add(q)), L & Ce && (P = P.add(q)), q = q.double(), B >>= Ce, L >>= Ce;
10764
10764
  return v && (M = M.negate()), x && (P = P.negate()), P = new w(r.mul(P.px, A.beta), P.py, P.pz), M.add(P);
10765
10765
  }
10766
10766
  /**
@@ -10778,8 +10778,8 @@ function lm(e) {
10778
10778
  let E, v;
10779
10779
  if (A) {
10780
10780
  const { k1neg: B, k1: x, k2neg: L, k2: M } = A.splitScalar(_);
10781
- let { p: P, f: G } = this.wNAF(x), { p: K, f: C } = this.wNAF(M);
10782
- P = I.constTimeNegate(B, P), K = I.constTimeNegate(L, K), K = new w(r.mul(K.px, A.beta), K.py, K.pz), E = P.add(K), v = G.add(C);
10781
+ let { p: P, f: q } = this.wNAF(x), { p: K, f: C } = this.wNAF(M);
10782
+ P = I.constTimeNegate(B, P), K = I.constTimeNegate(L, K), K = new w(r.mul(K.px, A.beta), K.py, K.pz), E = P.add(K), v = q.add(C);
10783
10783
  } else {
10784
10784
  const { p: B, f: x } = this.wNAF(_);
10785
10785
  E = B, v = x;
@@ -10999,7 +10999,7 @@ function hm(e) {
10999
10999
  function M(N) {
11000
11000
  return kr("num < 2^" + t.nBitLength, N, Mt, L), hn(N, t.nByteLength);
11001
11001
  }
11002
- function P(N, $, z = G) {
11002
+ function P(N, $, z = q) {
11003
11003
  if (["recovered", "canonical"].some((D) => D in z))
11004
11004
  throw new Error("sign() legacy options not supported");
11005
11005
  const { hash: W, randomBytes: Z } = t;
@@ -11026,8 +11026,8 @@ function hm(e) {
11026
11026
  }
11027
11027
  return { seed: De, k2sig: R };
11028
11028
  }
11029
- const G = { lowS: t.lowS, prehash: !1 }, K = { lowS: t.lowS, prehash: !1 };
11030
- function C(N, $, z = G) {
11029
+ const q = { lowS: t.lowS, prehash: !1 }, K = { lowS: t.lowS, prehash: !1 };
11030
+ function C(N, $, z = q) {
11031
11031
  const { seed: W, k2sig: Z } = P(N, $, z), ie = t;
11032
11032
  return su(ie.hash.outputLen, ie.nByteLength, ie.hmac)(W, Z);
11033
11033
  }
@@ -11250,7 +11250,7 @@ function ji(e, { dir: t = "left" } = {}) {
11250
11250
  }
11251
11251
  const _m = /* @__PURE__ */ new TextEncoder();
11252
11252
  function wu(e, t = {}) {
11253
- return typeof e == "number" || typeof e == "bigint" ? Em(e, t) : typeof e == "boolean" ? vm(e, t) : ni(e) ? Gt(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
11255
  function vm(e, t = {}) {
11256
11256
  const r = new Uint8Array(1);
@@ -11272,7 +11272,7 @@ function Ic(e) {
11272
11272
  if (e >= Lt.a && e <= Lt.f)
11273
11273
  return e - (Lt.a - 10);
11274
11274
  }
11275
- function Gt(e, t = {}) {
11275
+ function qt(e, t = {}) {
11276
11276
  let r = e;
11277
11277
  t.size && (mn(r, { size: t.size }), r = yn(r, { dir: "right", size: t.size }));
11278
11278
  let n = r.slice(2);
@@ -11288,7 +11288,7 @@ function Gt(e, t = {}) {
11288
11288
  }
11289
11289
  function Em(e, t) {
11290
11290
  const r = ut(e, t);
11291
- return Gt(r);
11291
+ return qt(r);
11292
11292
  }
11293
11293
  function _u(e, t = {}) {
11294
11294
  const r = _m.encode(e);
@@ -11551,11 +11551,11 @@ function Vm({ r: e, s: t, to: r = "hex", v: n, yParity: i }) {
11551
11551
  return n % 2n === 0n ? 1 : 0;
11552
11552
  throw new Error("Invalid `v` or `yParity` value");
11553
11553
  })(), o = `0x${new bs.Signature(or(e), or(t)).toCompactHex()}${s === 0 ? "1b" : "1c"}`;
11554
- return r === "hex" ? o : Gt(o);
11554
+ return r === "hex" ? o : qt(o);
11555
11555
  }
11556
- let qm = !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: qm }), 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,
@@ -11564,9 +11564,9 @@ async function ii({ hash: e, privateKey: t, to: r = "object" }) {
11564
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) : Gm(e);
11567
+ return typeof e[0] == "string" ? Mr(e) : qm(e);
11568
11568
  }
11569
- function Gm(e) {
11569
+ function qm(e) {
11570
11570
  let t = 0;
11571
11571
  for (const i of e)
11572
11572
  t += i.length;
@@ -11741,7 +11741,7 @@ function Xm(e) {
11741
11741
  };
11742
11742
  }
11743
11743
  function Zm(e) {
11744
- const t = typeof e == "string" ? Gt(e) : e, r = ku(t.length);
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,
11747
11747
  encode(i) {
@@ -11769,7 +11769,7 @@ function Jm(e) {
11769
11769
  n ? ut(n) : "0x"
11770
11770
  ])
11771
11771
  ]));
11772
- return i === "bytes" ? Gt(s) : s;
11772
+ return i === "bytes" ? qt(s) : s;
11773
11773
  }
11774
11774
  async function Qm(e) {
11775
11775
  const { contractAddress: t, chainId: r, nonce: n, privateKey: i, to: s = "object" } = e, o = await ii({
@@ -11852,13 +11852,13 @@ class fb extends se {
11852
11852
  }
11853
11853
  }
11854
11854
  function Pu(e) {
11855
- const { kzg: t } = e, r = e.to ?? (typeof e.blobs[0] == "string" ? "hex" : "bytes"), n = typeof e.blobs[0] == "string" ? e.blobs.map((s) => Gt(s)) : e.blobs, i = [];
11855
+ const { kzg: t } = e, r = e.to ?? (typeof e.blobs[0] == "string" ? "hex" : "bytes"), n = typeof e.blobs[0] == "string" ? e.blobs.map((s) => qt(s)) : e.blobs, i = [];
11856
11856
  for (const s of n)
11857
11857
  i.push(Uint8Array.from(t.blobToKzgCommitment(s)));
11858
11858
  return r === "bytes" ? i : i.map((s) => Kt(s));
11859
11859
  }
11860
11860
  function Ou(e) {
11861
- const { kzg: t } = e, r = e.to ?? (typeof e.blobs[0] == "string" ? "hex" : "bytes"), n = typeof e.blobs[0] == "string" ? e.blobs.map((o) => Gt(o)) : e.blobs, i = typeof e.commitments[0] == "string" ? e.commitments.map((o) => Gt(o)) : e.commitments, s = [];
11861
+ const { kzg: t } = e, r = e.to ?? (typeof e.blobs[0] == "string" ? "hex" : "bytes"), n = typeof e.blobs[0] == "string" ? e.blobs.map((o) => qt(o)) : e.blobs, i = typeof e.commitments[0] == "string" ? e.commitments.map((o) => qt(o)) : e.commitments, s = [];
11862
11862
  for (let o = 0; o < n.length; o++) {
11863
11863
  const a = n[o], f = i[o];
11864
11864
  s.push(Uint8Array.from(t.computeBlobKzgProof(a, f)));
@@ -11918,7 +11918,7 @@ class yb extends se {
11918
11918
  }
11919
11919
  }
11920
11920
  function mb(e) {
11921
- const t = e.to ?? (typeof e.data == "string" ? "hex" : "bytes"), r = typeof e.data == "string" ? Gt(e.data) : e.data, n = Fe(r);
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)
@@ -12366,7 +12366,7 @@ function ia({ param: e, value: t }) {
12366
12366
  return $b(t, { length: n, param: { ...e, type: i } });
12367
12367
  }
12368
12368
  if (e.type === "tuple")
12369
- return Gb(t, {
12369
+ return qb(t, {
12370
12370
  param: e
12371
12371
  });
12372
12372
  if (e.type === "address")
@@ -12383,7 +12383,7 @@ function ia({ param: e, value: t }) {
12383
12383
  if (e.type.startsWith("bytes"))
12384
12384
  return jb(t, { param: e });
12385
12385
  if (e.type === "string")
12386
- return qb(t);
12386
+ return Gb(t);
12387
12387
  throw new Nb(e.type, {
12388
12388
  docsPath: "/docs/contract/encodeAbiParameters"
12389
12389
  });
@@ -12484,7 +12484,7 @@ function Vb(e, { signed: t, size: r = 256 }) {
12484
12484
  })
12485
12485
  };
12486
12486
  }
12487
- function qb(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 qb(e) {
12498
12498
  ])
12499
12499
  };
12500
12500
  }
12501
- function Gb(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++) {
@@ -12639,7 +12639,7 @@ function zu({ data: e, primaryType: t, types: r }) {
12639
12639
  function Vu({ data: e, primaryType: t, types: r }) {
12640
12640
  const n = [{ type: "bytes32" }], i = [n1({ primaryType: t, types: r })];
12641
12641
  for (const s of r[t]) {
12642
- const [o, a] = Gu({
12642
+ const [o, a] = qu({
12643
12643
  types: r,
12644
12644
  name: s.name,
12645
12645
  type: s.type,
@@ -12655,23 +12655,23 @@ function n1({ primaryType: e, types: t }) {
12655
12655
  }
12656
12656
  function i1({ primaryType: e, types: t }) {
12657
12657
  let r = "";
12658
- const n = qu({ primaryType: e, types: t });
12658
+ const n = Gu({ primaryType: e, types: t });
12659
12659
  n.delete(e);
12660
12660
  const i = [e, ...Array.from(n).sort()];
12661
12661
  for (const s of i)
12662
12662
  r += `${s}(${t[s].map(({ name: o, type: a }) => `${a} ${o}`).join(",")})`;
12663
12663
  return r;
12664
12664
  }
12665
- function qu({ primaryType: e, types: t }, r = /* @__PURE__ */ new Set()) {
12665
+ function Gu({ primaryType: e, types: t }, r = /* @__PURE__ */ new Set()) {
12666
12666
  const n = e.match(/^\w*/u), i = n == null ? void 0 : n[0];
12667
12667
  if (r.has(i) || t[i] === void 0)
12668
12668
  return r;
12669
12669
  r.add(i);
12670
12670
  for (const s of t[i])
12671
- qu({ primaryType: s.type, types: t }, r);
12671
+ Gu({ primaryType: s.type, types: t }, r);
12672
12672
  return r;
12673
12673
  }
12674
- function Gu({ types: e, name: t, type: r, value: n }) {
12674
+ function qu({ types: e, name: t, type: r, value: n }) {
12675
12675
  if (e[r] !== void 0)
12676
12676
  return [
12677
12677
  { type: "bytes32" },
@@ -12682,7 +12682,7 @@ function Gu({ types: e, name: t, type: r, value: n }) {
12682
12682
  if (r === "string")
12683
12683
  return [{ type: "bytes32" }, ft(Q(n))];
12684
12684
  if (r.lastIndexOf("]") === r.length - 1) {
12685
- const i = r.slice(0, r.lastIndexOf("[")), s = n.map((o) => Gu({
12685
+ const i = r.slice(0, r.lastIndexOf("[")), s = n.map((o) => qu({
12686
12686
  name: t,
12687
12687
  type: i,
12688
12688
  types: e,
@@ -12736,7 +12736,7 @@ class sr {
12736
12736
  this._userId = r.address;
12737
12737
  }
12738
12738
  static from(t) {
12739
- return t = Bt(t), /^[0-9a-fA-F]{64}$/.test(t) ? sr.isValidPrivateKey(t) ? ae(new sr(t)) : q("Invalid private key") : q("Invalid digest key format");
12739
+ return t = Bt(t), /^[0-9a-fA-F]{64}$/.test(t) ? sr.isValidPrivateKey(t) ? ae(new sr(t)) : G("Invalid private key") : G("Invalid digest key format");
12740
12740
  }
12741
12741
  static generateRandom() {
12742
12742
  const t = sr.generateRandomDigestKey();
@@ -14409,7 +14409,7 @@ const Wu = [
14409
14409
  }
14410
14410
  return ae("Allowance already approved");
14411
14411
  } catch (s) {
14412
- return q(
14412
+ return G(
14413
14413
  `Failed to check or approve allowance: ${s instanceof Error ? s.message : String(s)}`
14414
14414
  );
14415
14415
  }
@@ -14684,7 +14684,7 @@ const Wu = [
14684
14684
  { name: "timelock", type: "u128" },
14685
14685
  { name: "secretHash", type: "u128*" }
14686
14686
  ]
14687
- }, l1 = "https://starknet-sepolia.g.alchemy.com/starknet/version/rpc/v0_7/Ry6QmtzfnqANtpqP3kLqe08y80ZorPoY";
14687
+ }, l1 = "https://starknet-sepolia.public.blastapi.io/rpc/v0_7";
14688
14688
  class d1 {
14689
14689
  constructor(t, r, n) {
14690
14690
  this.nodeUrl = n || l1, this.url = new cr("/", t), this.account = r;
@@ -14694,10 +14694,10 @@ class d1 {
14694
14694
  return this.account.address;
14695
14695
  }
14696
14696
  async initiate(t) {
14697
- if (!this.account.address) return q("No account address");
14697
+ if (!this.account.address) return G("No account address");
14698
14698
  const { create_order: r, source_swap: n } = t, { redeemer: i, amount: s } = n;
14699
14699
  if (!s || !i || !r.secret_hash || !r.timelock)
14700
- return q("Invalid order");
14700
+ return G("Invalid order");
14701
14701
  try {
14702
14702
  const o = new To(
14703
14703
  Yu,
@@ -14710,7 +14710,7 @@ class d1 {
14710
14710
  BigInt(s),
14711
14711
  this.nodeUrl
14712
14712
  );
14713
- if (l.error) return q(l.error);
14713
+ if (l.error) return G(l.error);
14714
14714
  const d = {
14715
14715
  domain: f1,
14716
14716
  primaryType: "Initiate",
@@ -14739,9 +14739,9 @@ class d1 {
14739
14739
  }
14740
14740
  }
14741
14741
  );
14742
- return I.error ? q(I.error) : I.result ? ae(I.result) : q("Init: No result found");
14742
+ return I.error ? G(I.error) : I.result ? ae(I.result) : G("Init: No result found");
14743
14743
  } catch (o) {
14744
- return q(String(o));
14744
+ return G(String(o));
14745
14745
  }
14746
14746
  }
14747
14747
  async redeem(t, r) {
@@ -14759,13 +14759,13 @@ class d1 {
14759
14759
  }
14760
14760
  }
14761
14761
  );
14762
- return n.error ? q(n.error) : n.result ? ae(n.result) : q("Redeem: No result found");
14762
+ return n.error ? G(n.error) : n.result ? ae(n.result) : G("Redeem: No result found");
14763
14763
  } catch (n) {
14764
- return q(String(n));
14764
+ return G(String(n));
14765
14765
  }
14766
14766
  }
14767
14767
  async refund() {
14768
- return q("Refund is taken care of by the relayer");
14768
+ return G("Refund is taken care of by the relayer");
14769
14769
  }
14770
14770
  }
14771
14771
  class Xu extends Uc {
@@ -14838,15 +14838,15 @@ class Xu extends Uc {
14838
14838
  if (this._secretManager.isInitialized && this._btcWallet)
14839
14839
  return ae(this._btcWallet);
14840
14840
  const t = await this._secretManager.getDigestKey();
14841
- if (t.error) return q(t.error);
14841
+ if (t.error) return G(t.error);
14842
14842
  const r = new ol(Bl(this.environment));
14843
14843
  return this._btcWallet = al.fromPrivateKey(t.val, r), ae(this._btcWallet);
14844
14844
  }
14845
14845
  async swap(t) {
14846
14846
  const r = await this.validateAndFillParams(t);
14847
- if (r.error) return q(r.error);
14847
+ if (r.error) return G(r.error);
14848
14848
  const { sendAddress: n, receiveAddress: i, timelock: s } = r.val, o = Date.now().toString(), a = await this._secretManager.generateSecret(o);
14849
- if (a.error) return q(a.error);
14849
+ if (a.error) return G(a.error);
14850
14850
  const { strategyId: f, btcAddress: l } = t.additionalData, d = {
14851
14851
  strategy_id: f,
14852
14852
  ...l && {
@@ -14868,49 +14868,49 @@ class Xu extends Uc {
14868
14868
  min_destination_confirmations: t.minDestinationConfirmations ?? 0,
14869
14869
  additional_data: d
14870
14870
  }, w = await this._quote.getAttestedQuote(p);
14871
- if (w.error) return q(w.error);
14871
+ if (w.error) return G(w.error);
14872
14872
  const y = await this._orderbook.createOrder(
14873
14873
  w.val,
14874
14874
  this.auth
14875
14875
  );
14876
- if (y.error) return q(y.error);
14876
+ if (y.error) return G(y.error);
14877
14877
  const I = await this.pollOrder(y.val);
14878
- return I.error ? q(I.error) : ae(I.val);
14878
+ return I.error ? G(I.error) : ae(I.val);
14879
14879
  }
14880
14880
  async validateAndFillParams(t) {
14881
- if (!t.additionalData.strategyId) return q("StrategyId is required");
14881
+ if (!t.additionalData.strategyId) return G("StrategyId is required");
14882
14882
  if (!t.fromAsset || !t.toAsset)
14883
- return q("Source and destination assets are required for swap");
14883
+ return G("Source and destination assets are required for swap");
14884
14884
  if (t.fromAsset.chain === t.toAsset.chain && t.fromAsset.atomicSwapAddress === t.toAsset.atomicSwapAddress)
14885
- return q("Source and destination assets cannot be the same");
14885
+ return G("Source and destination assets cannot be the same");
14886
14886
  if (oi(t.fromAsset.chain) && !oi(t.toAsset.chain) || !oi(t.fromAsset.chain) && oi(t.toAsset.chain))
14887
- return q(
14887
+ return G(
14888
14888
  "Both assets should be on the same network (either mainnet or testnet)"
14889
14889
  );
14890
14890
  const r = this.validateAmount(t.sendAmount);
14891
- if (r.error) return q(r.error);
14891
+ if (r.error) return G(r.error);
14892
14892
  const n = this.validateAmount(t.receiveAmount);
14893
- if (n.error) return q(n.error);
14893
+ if (n.error) return G(n.error);
14894
14894
  if (r < n)
14895
- return q("Send amount should be greater than receive amount");
14895
+ return G("Send amount should be greater than receive amount");
14896
14896
  const i = tl(t.fromAsset.chain);
14897
- if (!i) return q("Unsupported chain for timelock");
14897
+ if (!i) return G("Unsupported chain for timelock");
14898
14898
  if (vs(t.fromAsset.chain) || vs(t.toAsset.chain)) {
14899
14899
  if (!t.additionalData.btcAddress)
14900
- return q(
14900
+ return G(
14901
14901
  "btcAddress in additionalData is required if source or destination chain is bitcoin, it is used as refund or redeem address."
14902
14902
  );
14903
14903
  const a = await this.initializeSMandBTCWallet();
14904
- if (a.error) return q(a.error);
14904
+ if (a.error) return G(a.error);
14905
14905
  if (!this._btcWallet)
14906
- return q(
14906
+ return G(
14907
14907
  "btcWallet is required for bitcoin chain. Please provide btcWallet in the constructor"
14908
14908
  );
14909
14909
  }
14910
14910
  const s = await this.getAddresses(t.fromAsset.chain);
14911
- if (s.error) return q(s.error);
14911
+ if (s.error) return G(s.error);
14912
14912
  const o = await this.getAddresses(t.toAsset.chain);
14913
- return o.error ? q(o.error) : ae({
14913
+ return o.error ? G(o.error) : ae({
14914
14914
  sendAddress: s.val,
14915
14915
  receiveAddress: o.val,
14916
14916
  timelock: t.timelock ?? i
@@ -14920,34 +14920,34 @@ class Xu extends Uc {
14920
14920
  var n;
14921
14921
  switch (Es(t)) {
14922
14922
  case kt.EVM:
14923
- return this._evmHTLC ? ae(this._evmHTLC.htlcActorAddress) : q("Please provide evmHTLC when initializing garden");
14923
+ return this._evmHTLC ? ae(this._evmHTLC.htlcActorAddress) : G("Please provide evmHTLC when initializing garden");
14924
14924
  case kt.Bitcoin: {
14925
14925
  const i = await ((n = this._btcWallet) == null ? void 0 : n.getPublicKey());
14926
- return !i || !Sl(i) ? q("Invalid btc public key") : ae(xr(i));
14926
+ return !i || !Sl(i) ? G("Invalid btc public key") : ae(xr(i));
14927
14927
  }
14928
14928
  case kt.Starknet:
14929
- return this._starknetHTLC ? ae(this._starknetHTLC.htlcActorAddress) : q("Please provide starknetHTLC when initializing garden");
14929
+ return this._starknetHTLC ? ae(this._starknetHTLC.htlcActorAddress) : G("Please provide starknetHTLC when initializing garden");
14930
14930
  default:
14931
- return q("Unsupported chain");
14931
+ return G("Unsupported chain");
14932
14932
  }
14933
14933
  }
14934
14934
  validateAmount(t) {
14935
14935
  if (t == null || t.includes("."))
14936
- return q("Invalid amount ", t);
14936
+ return G("Invalid amount ", t);
14937
14937
  const r = new ll(t);
14938
- return !r.isInteger() || r.isNaN() || r.lt(0) || r.isLessThanOrEqualTo(0) ? q("Invalid amount ", t) : ae(r);
14938
+ return !r.isInteger() || r.isNaN() || r.lt(0) || r.isLessThanOrEqualTo(0) ? G("Invalid amount ", t) : ae(r);
14939
14939
  }
14940
14940
  async pollOrder(t) {
14941
14941
  let r = await this._orderbook.getOrder(t, !0), n = 0;
14942
14942
  for (; n < this.getOrderThreshold; ) {
14943
14943
  if (await sl(1e3), n++, r.error) {
14944
14944
  if (!r.error.includes("result is undefined"))
14945
- return q(r.error);
14945
+ return G(r.error);
14946
14946
  } else if (r.val && r.val.create_order.create_id.toLowerCase() === t.toLowerCase())
14947
14947
  return ae(r.val);
14948
14948
  r = await this._orderbook.getOrder(t, !0);
14949
14949
  }
14950
- return q(`Order not found, createOrder id: ${t}`);
14950
+ return G(`Order not found, createOrder id: ${t}`);
14951
14951
  }
14952
14952
  async execute(t = 5e3) {
14953
14953
  return await this.initializeSMandBTCWallet(), await this._orderbook.subscribeOrders(
@@ -15250,7 +15250,7 @@ class Xu extends Uc {
15250
15250
  var i;
15251
15251
  if (t.length === 0) return ae([]);
15252
15252
  const r = await ((i = this._blockNumberFetcher) == null ? void 0 : i.fetchBlockNumbers());
15253
- if (r.error) return q(r.error);
15253
+ if (r.error) return G(r.error);
15254
15254
  const n = [];
15255
15255
  for (let s = 0; s < t.length; s++) {
15256
15256
  const o = t[s];
@@ -15286,13 +15286,13 @@ class Xu extends Uc {
15286
15286
  order_id: r
15287
15287
  })
15288
15288
  })).json();
15289
- return o.status === "Ok" && o.result ? ae(o.result) : q(o.error);
15289
+ return o.status === "Ok" && o.result ? ae(o.result) : G(o.error);
15290
15290
  } catch (n) {
15291
- return q("Failed to broadcast redeem tx: " + n);
15291
+ return G("Failed to broadcast redeem tx: " + n);
15292
15292
  }
15293
15293
  }
15294
15294
  }
15295
- const h1 = "https://starknet-mainnet.public.blastapi.io";
15295
+ const h1 = "https://starknet-sepolia.public.blastapi.io/rpc/v0_7";
15296
15296
  class og {
15297
15297
  constructor(t, r) {
15298
15298
  this.callData = new ya(Wu), this.nodeUrl = r || h1, this.account = t;
@@ -15323,9 +15323,9 @@ class og {
15323
15323
  BigInt(t.source_swap.amount),
15324
15324
  this.nodeUrl
15325
15325
  );
15326
- if (a.error) return q(a.error);
15326
+ if (a.error) return G(a.error);
15327
15327
  } catch (a) {
15328
- return q(`Allowance check failed: ${a}`);
15328
+ return G(`Allowance check failed: ${a}`);
15329
15329
  }
15330
15330
  const o = await this.account.execute({
15331
15331
  contractAddress: t.source_swap.asset,
@@ -15342,7 +15342,7 @@ class og {
15342
15342
  throw new Error("Failed to initiate HTLC transaction");
15343
15343
  return ae(o.transaction_hash);
15344
15344
  } catch (r) {
15345
- return q(`HTLC Initiation Error: ${r}`);
15345
+ return G(`HTLC Initiation Error: ${r}`);
15346
15346
  }
15347
15347
  }
15348
15348
  /**
@@ -15362,9 +15362,9 @@ class og {
15362
15362
  secret: ao(r)
15363
15363
  })
15364
15364
  });
15365
- return s.transaction_hash ? ae(s.transaction_hash) : q("Failed to redeem HTLC transaction");
15365
+ return s.transaction_hash ? ae(s.transaction_hash) : G("Failed to redeem HTLC transaction");
15366
15366
  } catch {
15367
- return q("HTLC Redeem Error");
15367
+ return G("HTLC Redeem Error");
15368
15368
  }
15369
15369
  }
15370
15370
  /**
@@ -15382,9 +15382,9 @@ class og {
15382
15382
  orderId: r
15383
15383
  }
15384
15384
  });
15385
- return i.transaction_hash ? ae(i.transaction_hash) : q("Failed to refund HTLC transaction");
15385
+ return i.transaction_hash ? ae(i.transaction_hash) : G("Failed to refund HTLC transaction");
15386
15386
  } catch {
15387
- return q("HTLC Refund Error");
15387
+ return G("HTLC Refund Error");
15388
15388
  }
15389
15389
  }
15390
15390
  }
@@ -15590,7 +15590,7 @@ function T1(e) {
15590
15590
  if (r && !yt(r))
15591
15591
  throw new pt({ address: r });
15592
15592
  }
15593
- const qi = {
15593
+ const Gi = {
15594
15594
  contracts: E1,
15595
15595
  formatters: x1,
15596
15596
  serializers: A1
@@ -15644,7 +15644,7 @@ const qi = {
15644
15644
  },
15645
15645
  testnet: !0
15646
15646
  }), Cn = 1, O1 = /* @__PURE__ */ Tt({
15647
- ...qi,
15647
+ ...Gi,
15648
15648
  id: 8453,
15649
15649
  name: "Base",
15650
15650
  nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
@@ -15661,7 +15661,7 @@ const qi = {
15661
15661
  }
15662
15662
  },
15663
15663
  contracts: {
15664
- ...qi.contracts,
15664
+ ...Gi.contracts,
15665
15665
  disputeGameFactory: {
15666
15666
  [Cn]: {
15667
15667
  address: "0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e"
@@ -15691,7 +15691,7 @@ const qi = {
15691
15691
  },
15692
15692
  sourceId: Cn
15693
15693
  }), Un = 11155111, R1 = /* @__PURE__ */ Tt({
15694
- ...qi,
15694
+ ...Gi,
15695
15695
  id: 84532,
15696
15696
  network: "base-sepolia",
15697
15697
  name: "Base Sepolia",
@@ -15709,7 +15709,7 @@ const qi = {
15709
15709
  }
15710
15710
  },
15711
15711
  contracts: {
15712
- ...qi.contracts,
15712
+ ...Gi.contracts,
15713
15713
  disputeGameFactory: {
15714
15714
  [Un]: {
15715
15715
  address: "0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1"
@@ -15946,13 +15946,13 @@ const qi = {
15946
15946
  walletClient: s
15947
15947
  });
15948
15948
  } catch {
15949
- return q("Failed to add network");
15949
+ return G("Failed to add network");
15950
15950
  }
15951
15951
  else
15952
- return q("Failed to switch network");
15952
+ return G("Failed to switch network");
15953
15953
  }
15954
15954
  else
15955
- return q("Chain not supported");
15955
+ return G("Chain not supported");
15956
15956
  }, $1 = (e) => typeof e == "object" && e !== null && "code" in e && e.code === 4902;
15957
15957
  export {
15958
15958
  Sn as API,