@argent/x-shared 1.33.0 → 1.33.2

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.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import F, { z as h } from "zod";
2
- import { p as xt, H as K, a as tn, u as k, N as jn, c as Dr, C as Ln, A as St, i as Hr, b as Vr, n as Dn, d as Mr, e as Gr, f as zr, g as qr, s as Q, h as nt, j as en, k as Wr, S as Kr, l as nn, M as rn, m as Zr, o as Yr, q as Hn, r as Xr, t as se, B as sn, v as oe, w as Pt, x as Jr, y as Qr, z as ts, D as es, E as ns, F as rs, T as ss, G as Re, I as Vn, J as os, K as ye, L as as, O as is, P as cs, Q as ls, R as _t } from "./transactionVersion-xln1MPWP.mjs";
3
- import { am as Nd, aV as Cd, bO as Od, aX as kd, aT as Pd, an as Rd, af as $d, ah as Fd, ag as Ud, ai as jd, bt as Ld, bB as Dd, bh as Hd, bl as Vd, a9 as Md, aa as Gd, a5 as zd, a4 as qd, Z as Wd, W as Kd, X as Zd, Y as Yd, aM as Xd, az as Jd, au as Qd, av as tf, as as ef, at as nf, ax as rf, aw as sf, ay as of, ar as af, aq as cf, ap as lf, ao as uf, aA as df, aj as ff, ab as hf, b1 as pf, b5 as mf, b3 as gf, bo as wf, bD as yf, by as bf, bJ as Sf, ae as Ef, bd as Af, b7 as xf, bf as vf, bk as If, aD as Tf, aE as Bf, aF as _f, bL as Nf, bK as Cf, bH as Of, br as kf, aB as Pf, aC as Rf, bp as $f, aK as Ff, aG as Uf, aL as jf, aI as Lf, aJ as Df, b0 as Hf, bq as Vf, bg as Mf, bA as Gf, bw as zf, bn as qf, be as Wf, aY as Kf, $ as Zf, _ as Yf, a1 as Xf, a2 as Jf, bv as Qf, bu as th, aS as eh, aZ as nh, b2 as rh, a0 as sh, aP as oh, ac as ah, a7 as ih, ak as ch, a6 as lh, aQ as uh, bC as dh, bx as fh, bc as hh, aU as ph, b9 as mh, a8 as gh, ad as wh, al as yh, aO as bh, aH as Sh, bs as Eh, bI as Ah, b8 as xh, ba as vh, bb as Ih, bi as Th, bm as Bh, bj as _h, bF as Nh, bG as Ch, bE as Oh, a3 as kh, b4 as Ph, bz as Rh, aW as $h, a_ as Fh, aR as Uh, a$ as jh, b6 as Lh, aN as Dh, bQ as Hh, bP as Vh, bM as Mh, bR as Gh, bN as zh, U as qh, V as Wh } from "./transactionVersion-xln1MPWP.mjs";
2
+ import { p as xt, H as K, a as tn, u as k, N as jn, c as Dr, C as Ln, A as St, i as Hr, b as Vr, n as Dn, d as Mr, e as Gr, f as zr, g as qr, s as Q, h as nt, j as en, k as Wr, S as Kr, l as nn, M as rn, m as Zr, o as Yr, q as Hn, r as Xr, t as se, B as sn, v as oe, w as Pt, x as Jr, y as Qr, z as ts, D as es, E as ns, F as rs, T as ss, G as Re, I as Vn, J as os, K as ye, L as as, O as is, P as cs, Q as ls, R as _t } from "./transactionVersion-BxOdbj7v.mjs";
3
+ import { am as Nd, aV as Cd, bO as Od, aX as kd, aT as Pd, an as Rd, af as $d, ah as Fd, ag as Ud, ai as jd, bt as Ld, bB as Dd, bh as Hd, bl as Vd, a9 as Md, aa as Gd, a5 as zd, a4 as qd, Z as Wd, W as Kd, X as Zd, Y as Yd, aM as Xd, az as Jd, au as Qd, av as tf, as as ef, at as nf, ax as rf, aw as sf, ay as of, ar as af, aq as cf, ap as lf, ao as uf, aA as df, aj as ff, ab as hf, b1 as pf, b5 as mf, b3 as gf, bo as wf, bD as yf, by as bf, bJ as Sf, ae as Ef, bd as Af, b7 as xf, bf as vf, bk as If, aD as Tf, aE as Bf, aF as _f, bL as Nf, bK as Cf, bH as Of, br as kf, aB as Pf, aC as Rf, bp as $f, aK as Ff, aG as Uf, aL as jf, aI as Lf, aJ as Df, b0 as Hf, bq as Vf, bg as Mf, bA as Gf, bw as zf, bn as qf, be as Wf, aY as Kf, $ as Zf, _ as Yf, a1 as Xf, a2 as Jf, bv as Qf, bu as th, aS as eh, aZ as nh, b2 as rh, a0 as sh, aP as oh, ac as ah, a7 as ih, ak as ch, a6 as lh, aQ as uh, bC as dh, bx as fh, bc as hh, aU as ph, b9 as mh, a8 as gh, ad as wh, al as yh, aO as bh, aH as Sh, bs as Eh, bI as Ah, b8 as xh, ba as vh, bb as Ih, bi as Th, bm as Bh, bj as _h, bF as Nh, bG as Ch, bE as Oh, a3 as kh, b4 as Ph, bz as Rh, aW as $h, a_ as Fh, aR as Uh, a$ as jh, b6 as Lh, aN as Dh, bQ as Hh, bP as Vh, bM as Mh, bR as Gh, bN as zh, U as qh, V as Wh } from "./transactionVersion-BxOdbj7v.mjs";
4
4
  import { constants as Z, starknetId as Mn, CallData as mt, CairoOption as on, CairoOptionVariant as an, hash as Gn, num as O, encode as $t, uint256 as Ht, ec as us, isSierra as ds, TransactionType as cn } from "starknet";
5
5
  import { useEffect as Ft, useRef as ln, useState as zn, useMemo as vt, useCallback as qn, createContext as fs } from "react";
6
6
  import { isFunction as qt, isString as Wn, upperCase as $e, isNil as hs, upperFirst as ps, lowerCase as Kn, isUndefined as ms, isEmpty as un, isArray as gs } from "lodash-es";
@@ -36,11 +36,11 @@ const vs = h.object({
36
36
  guid: h.string().optional(),
37
37
  signerType: h.enum(["StarknetKey", "EthereumKey"]).optional()
38
38
  }).optional()
39
- }), Cl = h.object({
39
+ }), Ol = h.object({
40
40
  address: h.string(),
41
41
  guardianAddress: h.string().optional(),
42
42
  account: vs
43
- }), Ol = h.object({
43
+ }), kl = h.object({
44
44
  ownerAddress: h.string(),
45
45
  signature: h.object({
46
46
  r: h.string(),
@@ -50,25 +50,25 @@ const vs = h.object({
50
50
  name: h.string().optional(),
51
51
  icon: h.string().optional()
52
52
  });
53
- function kl(t) {
53
+ function Pl(t) {
54
54
  return "transactionVersion" in t;
55
55
  }
56
- function Pl(t) {
56
+ function Rl(t) {
57
57
  return "simulateTransaction" in t;
58
58
  }
59
- function Rl(t) {
59
+ function $l(t) {
60
60
  return !("simulateTransaction" in t);
61
61
  }
62
62
  const Is = h.object({
63
63
  value: h.string(),
64
64
  platform: h.enum(["ios", "argentx", "android", "webwallet"]).nullable()
65
- }), $l = h.object({
65
+ }), Fl = h.object({
66
66
  preferences: h.record(Is)
67
67
  }), Ts = h.enum(["mainnet-alpha", "sepolia-alpha"]), Bs = h.enum(["mainnet", "sepolia"]);
68
- function Fl(t) {
68
+ function Ul(t) {
69
69
  return Ts.safeParse(t).success;
70
70
  }
71
- function Ul(t) {
71
+ function jl(t) {
72
72
  return Bs.safeParse(t).success;
73
73
  }
74
74
  const Vt = 18;
@@ -145,7 +145,7 @@ const Gs = { value: 1n, decimals: 0 };
145
145
  function zs(t) {
146
146
  return h.string().refine((e) => /^-?\d+(\.\d+)?$/.test(e), { message: "Invalid number format" }).transform((e) => xt(e, t));
147
147
  }
148
- const jl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
148
+ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
149
149
  __proto__: null,
150
150
  ONE: Gs,
151
151
  abs: Ue,
@@ -173,7 +173,7 @@ const jl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
173
173
  toFixedDecimals: Fe,
174
174
  toTiniestPossibleDecimal: Xn
175
175
  }, Symbol.toStringTag, { value: "Module" }));
176
- class Ll {
176
+ class Dl {
177
177
  constructor(e, n) {
178
178
  this.cachePromise = n.open(e).catch((r) => (console.error(new Error("Failed to open cache", { cause: r })), null));
179
179
  }
@@ -207,7 +207,7 @@ class Ll {
207
207
  await Promise.allSettled(n.map((r) => e.delete(r)));
208
208
  }
209
209
  }
210
- class Dl {
210
+ class Hl {
211
211
  constructor(e, n) {
212
212
  this.httpService = e, this.baseUrl = n, this.offsetInS = 0, this.syncIntervalInMs = 60 * 1e3, this.initialSync = this.syncWithServer(), setInterval(() => void this.syncWithServer(), this.syncIntervalInMs);
213
213
  }
@@ -318,7 +318,7 @@ function qs(t, e) {
318
318
  headers: r
319
319
  });
320
320
  }
321
- class Hl {
321
+ class Vl {
322
322
  constructor(e, n, r, s) {
323
323
  this.dateService = e, this.cacheService = n, this.httpService = r, this.options = s, this.inFlightRequests = /* @__PURE__ */ new Map();
324
324
  }
@@ -379,7 +379,7 @@ const Xt = (t, e, n) => {
379
379
  } catch {
380
380
  throw Xt("An error occurred while parsing", n, r);
381
381
  }
382
- }, Vl = async (t, e) => {
382
+ }, Ml = async (t, e) => {
383
383
  const n = await fetch(t, {
384
384
  method: "POST",
385
385
  ...e
@@ -391,10 +391,10 @@ const Xt = (t, e, n) => {
391
391
  } catch {
392
392
  throw Xt("An error occurred while parsing", n, r);
393
393
  }
394
- }, Ml = (t) => ({
394
+ }, Gl = (t) => ({
395
395
  refreshInterval: t,
396
396
  dedupingInterval: t
397
- }), Gl = (t) => `${t.networkId}::${t.address}`, Ws = () => {
397
+ }), zl = (t) => `${t.networkId}::${t.address}`, Ws = () => {
398
398
  };
399
399
  function Ks(t, e, n, r) {
400
400
  const { cache: s } = ws(), o = ae(t && e, t ? n : Ws, r);
@@ -402,7 +402,7 @@ function Ks(t, e, n, r) {
402
402
  t || (o.mutate(), s.delete(e));
403
403
  }, [t]), o;
404
404
  }
405
- const zl = {
405
+ const ql = {
406
406
  revalidateOnFocus: !1,
407
407
  revalidateOnMount: !0,
408
408
  revalidateOnReconnect: !1,
@@ -418,7 +418,7 @@ const zl = {
418
418
  } catch {
419
419
  throw new Error("failed to request time");
420
420
  }
421
- }, ql = async (t, e) => {
421
+ }, Wl = async (t, e) => {
422
422
  const n = await Zs(t, e);
423
423
  return Math.floor(n);
424
424
  };
@@ -494,7 +494,7 @@ async function to(t, e, n) {
494
494
  });
495
495
  return Dn(o);
496
496
  }
497
- class Wl {
497
+ class Kl {
498
498
  constructor(e, n, r) {
499
499
  this.httpService = e, this.baseUrl = n, this.allowedArgentNameNetworkId = r;
500
500
  }
@@ -803,8 +803,8 @@ function ya(t, e, n) {
803
803
  for (; ++r < o; ) {
804
804
  var d = t[r], u = d;
805
805
  if (d = n || d !== 0 ? d : 0, a && u === u) {
806
- for (var w = c.length; w--; )
807
- if (c[w] === u)
806
+ for (var y = c.length; y--; )
807
+ if (c[y] === u)
808
808
  continue t;
809
809
  i.push(d);
810
810
  } else s(c, u, n) || (c !== i && c.push(u), i.push(d));
@@ -833,7 +833,7 @@ function Sa() {
833
833
  throw new Error(`No argent account contract found: v${t} `);
834
834
  return tt[t];
835
835
  }
836
- function Kl() {
836
+ function Zl() {
837
837
  const t = Q.maxSatisfying(Object.keys(Jt), "*");
838
838
  if (!t)
839
839
  throw new Error(`No argent multisig contract found: v${t} `);
@@ -842,7 +842,7 @@ function Kl() {
842
842
  function Ea() {
843
843
  return Object.entries(tt).filter(([t]) => Q.gte(t, "0.4.0")).map(([, t]) => t);
844
844
  }
845
- function Zl() {
845
+ function Yl() {
846
846
  const t = Q.maxSatisfying(Object.keys(tt), "<0.3.0");
847
847
  if (!t)
848
848
  throw new Error(`No argent account contract found: v${t} `);
@@ -852,17 +852,17 @@ function Aa() {
852
852
  const t = Object.entries(tt).filter(([n]) => Q.gte(n, "0.3.1")).map(([, n]) => n), e = Object.entries(Jt).filter(([n]) => Q.gte(n, "0.1.1")).map(([, n]) => n);
853
853
  return [...t, ...e];
854
854
  }
855
- function Yl() {
855
+ function Xl() {
856
856
  return Object.entries(tt).filter(([t]) => Q.gte(t, "0.4.0")).map(([, t]) => t);
857
857
  }
858
- function Xl() {
858
+ function Jl() {
859
859
  const t = Q.maxSatisfying(Object.keys(tt), ">=0.4.0");
860
860
  if (!t)
861
861
  throw new Error(`No ledger account contract found: v${t}`);
862
862
  return tt[t];
863
863
  }
864
864
  const xa = (t, e) => t.cairoVersion === e.cairoVersion && nt(t.accountClassHash, e.accountClassHash);
865
- function Jl(t, e, n = []) {
865
+ function Ql(t, e, n = []) {
866
866
  const r = en.parse({
867
867
  cairoVersion: e.cairoVersion ?? "1",
868
868
  accountClassHash: e.classHash ?? Sa()
@@ -911,7 +911,7 @@ function Ta(t, e, n, r, s) {
911
911
  const o = va(t, e, n, r, s);
912
912
  return Gn.calculateContractAddressFromHash(o.addressSalt, o.classHash, o.constructorCalldata, 0);
913
913
  }
914
- function Ql(t, e) {
914
+ function tu(t, e) {
915
915
  const n = ln(t), r = ln();
916
916
  return Ft(() => {
917
917
  n.current = t;
@@ -921,7 +921,7 @@ function Ql(t, e) {
921
921
  r.current && clearTimeout(r.current), r.current = setTimeout(() => n.current(...s), e);
922
922
  };
923
923
  }
924
- function tu(t, e) {
924
+ function eu(t, e) {
925
925
  const [n, r] = zn(t);
926
926
  return Ft(() => {
927
927
  const s = setTimeout(() => {
@@ -961,7 +961,7 @@ const Ba = h.object({
961
961
  brandColor: h.string().optional(),
962
962
  executeFromOutsideAllowed: h.boolean().default(!1).optional()
963
963
  }), Ca = h.array(Na);
964
- class eu {
964
+ class nu {
965
965
  constructor(e, n) {
966
966
  this.apiBase = e, this.httpService = new Le(n, "json");
967
967
  }
@@ -976,7 +976,7 @@ function Oa(t) {
976
976
  var e;
977
977
  return (e = t == null ? void 0 : t.links) == null ? void 0 : e.find((n) => n.name === "dappland");
978
978
  }
979
- function nu(t) {
979
+ function ru(t) {
980
980
  var e;
981
981
  return (e = Oa(t)) == null ? void 0 : e.url;
982
982
  }
@@ -994,7 +994,7 @@ const sr = F.object({
994
994
  status: F.union([F.literal("KNOWN"), F.literal("UNKNOWN")]),
995
995
  resolutions: F.array(Pa).optional()
996
996
  }), $a = F.array(F.string()), Fa = Ra.array();
997
- class ru {
997
+ class su {
998
998
  constructor(e, n) {
999
999
  this.apiBase = e, this.headers = n, this.httpService = new Le(this.headers, "json");
1000
1000
  }
@@ -1116,9 +1116,9 @@ function si(t, e = 24) {
1116
1116
  for (let a = 0; a < 10; a++)
1117
1117
  n[a] = t[a] ^ t[a + 10] ^ t[a + 20] ^ t[a + 30] ^ t[a + 40];
1118
1118
  for (let a = 0; a < 10; a += 2) {
1119
- const i = (a + 8) % 10, c = (a + 2) % 10, l = n[c], d = n[c + 1], u = bn(l, d, 1) ^ n[i], w = Sn(l, d, 1) ^ n[i + 1];
1119
+ const i = (a + 8) % 10, c = (a + 2) % 10, l = n[c], d = n[c + 1], u = bn(l, d, 1) ^ n[i], y = Sn(l, d, 1) ^ n[i + 1];
1120
1120
  for (let m = 0; m < 50; m += 10)
1121
- t[a + m] ^= u, t[a + m + 1] ^= w;
1121
+ t[a + m] ^= u, t[a + m + 1] ^= y;
1122
1122
  }
1123
1123
  let s = t[2], o = t[3];
1124
1124
  for (let a = 0; a < 24; a++) {
@@ -1243,34 +1243,34 @@ const li = (t) => {
1243
1243
  } catch {
1244
1244
  }
1245
1245
  return "";
1246
- }, ou = ({ accountName: t, networkId: e, accountAddress: n, backgroundColor: r }) => {
1246
+ }, au = ({ accountName: t, networkId: e, accountAddress: n, backgroundColor: r }) => {
1247
1247
  const s = hi(n), o = `${e}::${s}`, a = r || fi(o);
1248
1248
  return ee(t, { background: a });
1249
1249
  }, pi = (t) => {
1250
1250
  const e = $t.removeHexPrefix($t.sanitizeHex(O.toHex(t))), n = Zn.decode(e);
1251
1251
  return Yn.encode(n);
1252
- }, au = (t) => t.map(pi), mi = (t) => {
1252
+ }, iu = (t) => t.map(pi), mi = (t) => {
1253
1253
  const e = Yn.decode(t);
1254
1254
  return $t.sanitizeHex(Zn.encode(e));
1255
- }, iu = (t) => t.map(mi);
1256
- function cu(t, e) {
1255
+ }, cu = (t) => t.map(mi);
1256
+ function lu(t, e) {
1257
1257
  const n = t.getTime(), r = e.getTime(), s = Math.abs(n - r);
1258
1258
  return Math.floor(s / (1e3 * 60 * 60 * 24));
1259
1259
  }
1260
- const lu = (t) => (t || "false") === "true", uu = async (t, e) => {
1260
+ const uu = (t) => (t || "false") === "true", du = async (t, e) => {
1261
1261
  try {
1262
1262
  return await t.getClassHashAt(e), !0;
1263
1263
  } catch {
1264
1264
  return !1;
1265
1265
  }
1266
1266
  };
1267
- function du(t) {
1267
+ function fu(t) {
1268
1268
  return !hs(t);
1269
1269
  }
1270
- const fu = (t) => {
1270
+ const hu = (t) => {
1271
1271
  const e = /^(0|0x([a-f0-9A-F]+)?)$/;
1272
1272
  return !!(t === "" || e.test(t));
1273
- }, Y = (t) => !isNaN(parseFloat(t)) && isFinite(Number(t)), hu = (t, e = 16) => {
1273
+ }, Y = (t) => !isNaN(parseFloat(t)) && isFinite(Number(t)), pu = (t, e = 16) => {
1274
1274
  const n = new RegExp(`^[0-9]*.?[0-9]{0,${e}}$`);
1275
1275
  return t === "" ? !0 : Y(t) ? !!n.test(t) : !1;
1276
1276
  }, He = {
@@ -1318,21 +1318,21 @@ const fu = (t) => {
1318
1318
  function jt(t) {
1319
1319
  return Ht.bnToUint256(t);
1320
1320
  }
1321
- const pu = (t, e) => `${t} ${e}${t === 1 ? "" : "s"}`, mu = (t) => new Promise((e, n) => {
1321
+ const mu = (t, e) => `${t} ${e}${t === 1 ? "" : "s"}`, gu = (t) => new Promise((e, n) => {
1322
1322
  const r = new FileReader();
1323
1323
  r.onload = () => {
1324
1324
  var s;
1325
1325
  return r.result ? e((s = r.result) == null ? void 0 : s.toString()) : n(new Error("Could not read file"));
1326
1326
  }, r.onerror = n, r.onabort = n.bind(null, new Error("User aborted")), r.readAsText(t);
1327
1327
  });
1328
- function gu(t) {
1328
+ function wu(t) {
1329
1329
  try {
1330
1330
  return ps(Kn(t));
1331
1331
  } catch {
1332
1332
  return t;
1333
1333
  }
1334
1334
  }
1335
- const wu = (t, e) => {
1335
+ const bi = (t, e) => {
1336
1336
  const n = new URLSearchParams(e), r = n.size ? `?${n}` : "";
1337
1337
  return k(...oe(t), r);
1338
1338
  };
@@ -1341,12 +1341,12 @@ function yu(t) {
1341
1341
  t(...e);
1342
1342
  };
1343
1343
  }
1344
- class bi extends Error {
1344
+ class Si extends Error {
1345
1345
  constructor(e, n) {
1346
1346
  super(`${e}::${n}`), this.name = e, this.code = n, this.name = e;
1347
1347
  }
1348
1348
  }
1349
- class xn extends bi {
1349
+ class xn extends Si {
1350
1350
  constructor(e) {
1351
1351
  super("BackendPaginationError", e);
1352
1352
  }
@@ -1357,7 +1357,7 @@ class bu {
1357
1357
  this.apiBase = e, this.headers = n, this.imageOptimizationUrl = r, this.httpService = new Le(this.headers, "json");
1358
1358
  }
1359
1359
  async getNfts(e, n, r, s = 1) {
1360
- const o = this.normalizeAddress(r), a = k(this.apiBase, "pandora", e, n), i = this.pageToPageIndex(s), l = `${k(a, "profile", o, "nfts")}?page=${i}&size=${vn}`, d = await this.httpService.get(l), u = d.content.map((w) => this.mapItem(w, r));
1360
+ const o = this.normalizeAddress(r), a = k(this.apiBase, "pandora", e, n), i = this.pageToPageIndex(s), l = `${k(a, "profile", o, "nfts")}?page=${i}&size=${vn}`, d = await this.httpService.get(l), u = d.content.map((y) => this.mapItem(y, r));
1361
1361
  return {
1362
1362
  totalPages: d.totalPages,
1363
1363
  page: d.number + 1,
@@ -1369,7 +1369,7 @@ class bu {
1369
1369
  const s = this.normalizeAddress(r), o = k(this.apiBase, "pandora", e, n), a = k(o, "collection", s), i = `${o}/collection/${s}`, [c, l] = await Promise.all([
1370
1370
  this.httpService.get(a),
1371
1371
  this.httpService.get(i)
1372
- ]), d = Ee(c), u = l.content.map((w) => this.mapItem(w));
1372
+ ]), d = Ee(c), u = l.content.map((y) => this.mapItem(y));
1373
1373
  return {
1374
1374
  ...d,
1375
1375
  nfts: {
@@ -1386,12 +1386,12 @@ class bu {
1386
1386
  }
1387
1387
  async getProfileCollections(e, n, r, s = 1, o = !1) {
1388
1388
  const a = this.pageToPageIndex(s), i = this.normalizeAddress(r), c = k(this.apiBase, "pandora", e, n), l = k(c, "profile", i, "collections", `?page=${a}&size=${vn}`), d = await this.httpService.get(l), u = [];
1389
- for (const w of d.content)
1389
+ for (const y of d.content)
1390
1390
  if (o) {
1391
- const m = await this.getCollectionMetrics(e, n, w.contractAddress);
1392
- u.push(Ee(w, m));
1391
+ const m = await this.getCollectionMetrics(e, n, y.contractAddress);
1392
+ u.push(Ee(y, m));
1393
1393
  } else
1394
- u.push(Ee(w));
1394
+ u.push(Ee(y));
1395
1395
  return {
1396
1396
  totalPages: d.totalPages,
1397
1397
  page: d.number + 1,
@@ -1431,7 +1431,7 @@ class bu {
1431
1431
  token_id: e.tokenId,
1432
1432
  contract_address: e.contractAddress,
1433
1433
  name: r,
1434
- spec: "spec" in e ? Si(e.spec) : void 0,
1434
+ spec: "spec" in e ? Ei(e.spec) : void 0,
1435
1435
  description: "",
1436
1436
  best_bid_order: {
1437
1437
  payment_amount: "bestListPrice" in e ? BigInt(e.bestListPrice) : void 0
@@ -1452,7 +1452,7 @@ class bu {
1452
1452
  };
1453
1453
  }
1454
1454
  }
1455
- function Si(t) {
1455
+ function Ei(t) {
1456
1456
  switch (t) {
1457
1457
  case "erc721":
1458
1458
  case "starknetErc721":
@@ -1526,11 +1526,11 @@ function In(t) {
1526
1526
  if (!Number.isSafeInteger(t) || t < 0)
1527
1527
  throw new Error(`Wrong positive integer: ${t}`);
1528
1528
  }
1529
- function Ei(t) {
1529
+ function Ai(t) {
1530
1530
  return t instanceof Uint8Array || t != null && typeof t == "object" && t.constructor.name === "Uint8Array";
1531
1531
  }
1532
1532
  function pr(t, ...e) {
1533
- if (!Ei(t))
1533
+ if (!Ai(t))
1534
1534
  throw new Error("Expected Uint8Array");
1535
1535
  if (e.length > 0 && !e.includes(t.length))
1536
1536
  throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`);
@@ -1548,25 +1548,25 @@ function mr(t, e) {
1548
1548
  throw new Error(`digestInto() expects output buffer of length at least ${n}`);
1549
1549
  }
1550
1550
  const Zt = /* @__PURE__ */ BigInt(2 ** 32 - 1), Tn = /* @__PURE__ */ BigInt(32);
1551
- function Ai(t, e = !1) {
1551
+ function xi(t, e = !1) {
1552
1552
  return e ? { h: Number(t & Zt), l: Number(t >> Tn & Zt) } : { h: Number(t >> Tn & Zt) | 0, l: Number(t & Zt) | 0 };
1553
1553
  }
1554
- function xi(t, e = !1) {
1554
+ function vi(t, e = !1) {
1555
1555
  let n = new Uint32Array(t.length), r = new Uint32Array(t.length);
1556
1556
  for (let s = 0; s < t.length; s++) {
1557
- const { h: o, l: a } = Ai(t[s], e);
1557
+ const { h: o, l: a } = xi(t[s], e);
1558
1558
  [n[s], r[s]] = [o, a];
1559
1559
  }
1560
1560
  return [n, r];
1561
1561
  }
1562
- const vi = (t, e, n) => t << n | e >>> 32 - n, Ii = (t, e, n) => e << n | t >>> 32 - n, Ti = (t, e, n) => e << n - 32 | t >>> 64 - n, Bi = (t, e, n) => t << n - 32 | e >>> 64 - n;
1562
+ const Ii = (t, e, n) => t << n | e >>> 32 - n, Ti = (t, e, n) => e << n | t >>> 32 - n, Bi = (t, e, n) => e << n - 32 | t >>> 64 - n, _i = (t, e, n) => t << n - 32 | e >>> 64 - n;
1563
1563
  /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
1564
- const _i = (t) => new Uint32Array(t.buffer, t.byteOffset, Math.floor(t.byteLength / 4));
1565
- function Ni(t) {
1564
+ const Ni = (t) => new Uint32Array(t.buffer, t.byteOffset, Math.floor(t.byteLength / 4));
1565
+ function Ci(t) {
1566
1566
  return t instanceof Uint8Array || t != null && typeof t == "object" && t.constructor.name === "Uint8Array";
1567
1567
  }
1568
- const Ae = (t) => new DataView(t.buffer, t.byteOffset, t.byteLength), J = (t, e) => t << 32 - e | t >>> e, Ci = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
1569
- if (!Ci)
1568
+ const Ae = (t) => new DataView(t.buffer, t.byteOffset, t.byteLength), J = (t, e) => t << 32 - e | t >>> e, Oi = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
1569
+ if (!Oi)
1570
1570
  throw new Error("Non little-endian hardware is not supported");
1571
1571
  function gr(t) {
1572
1572
  if (typeof t != "string")
@@ -1574,7 +1574,7 @@ function gr(t) {
1574
1574
  return new Uint8Array(new TextEncoder().encode(t));
1575
1575
  }
1576
1576
  function Ve(t) {
1577
- if (typeof t == "string" && (t = gr(t)), !Ni(t))
1577
+ if (typeof t == "string" && (t = gr(t)), !Ci(t))
1578
1578
  throw new Error(`expected Uint8Array, got ${typeof t}`);
1579
1579
  return t;
1580
1580
  }
@@ -1588,24 +1588,24 @@ function yr(t) {
1588
1588
  const e = (r) => t().update(Ve(r)).digest(), n = t();
1589
1589
  return e.outputLen = n.outputLen, e.blockLen = n.blockLen, e.create = () => t(), e;
1590
1590
  }
1591
- const [br, Sr, Er] = [[], [], []], Oi = /* @__PURE__ */ BigInt(0), Ot = /* @__PURE__ */ BigInt(1), ki = /* @__PURE__ */ BigInt(2), Pi = /* @__PURE__ */ BigInt(7), Ri = /* @__PURE__ */ BigInt(256), $i = /* @__PURE__ */ BigInt(113);
1591
+ const [br, Sr, Er] = [[], [], []], ki = /* @__PURE__ */ BigInt(0), Ot = /* @__PURE__ */ BigInt(1), Pi = /* @__PURE__ */ BigInt(2), Ri = /* @__PURE__ */ BigInt(7), $i = /* @__PURE__ */ BigInt(256), Fi = /* @__PURE__ */ BigInt(113);
1592
1592
  for (let t = 0, e = Ot, n = 1, r = 0; t < 24; t++) {
1593
1593
  [n, r] = [r, (2 * n + 3 * r) % 5], br.push(2 * (5 * r + n)), Sr.push((t + 1) * (t + 2) / 2 % 64);
1594
- let s = Oi;
1594
+ let s = ki;
1595
1595
  for (let o = 0; o < 7; o++)
1596
- e = (e << Ot ^ (e >> Pi) * $i) % Ri, e & ki && (s ^= Ot << (Ot << /* @__PURE__ */ BigInt(o)) - Ot);
1596
+ e = (e << Ot ^ (e >> Ri) * Fi) % $i, e & Pi && (s ^= Ot << (Ot << /* @__PURE__ */ BigInt(o)) - Ot);
1597
1597
  Er.push(s);
1598
1598
  }
1599
- const [Fi, Ui] = /* @__PURE__ */ xi(Er, !0), Bn = (t, e, n) => n > 32 ? Ti(t, e, n) : vi(t, e, n), _n = (t, e, n) => n > 32 ? Bi(t, e, n) : Ii(t, e, n);
1600
- function ji(t, e = 24) {
1599
+ const [Ui, ji] = /* @__PURE__ */ vi(Er, !0), Bn = (t, e, n) => n > 32 ? Bi(t, e, n) : Ii(t, e, n), _n = (t, e, n) => n > 32 ? _i(t, e, n) : Ti(t, e, n);
1600
+ function Li(t, e = 24) {
1601
1601
  const n = new Uint32Array(10);
1602
1602
  for (let r = 24 - e; r < 24; r++) {
1603
1603
  for (let a = 0; a < 10; a++)
1604
1604
  n[a] = t[a] ^ t[a + 10] ^ t[a + 20] ^ t[a + 30] ^ t[a + 40];
1605
1605
  for (let a = 0; a < 10; a += 2) {
1606
- const i = (a + 8) % 10, c = (a + 2) % 10, l = n[c], d = n[c + 1], u = Bn(l, d, 1) ^ n[i], w = _n(l, d, 1) ^ n[i + 1];
1606
+ const i = (a + 8) % 10, c = (a + 2) % 10, l = n[c], d = n[c + 1], u = Bn(l, d, 1) ^ n[i], y = _n(l, d, 1) ^ n[i + 1];
1607
1607
  for (let m = 0; m < 50; m += 10)
1608
- t[a + m] ^= u, t[a + m + 1] ^= w;
1608
+ t[a + m] ^= u, t[a + m + 1] ^= y;
1609
1609
  }
1610
1610
  let s = t[2], o = t[3];
1611
1611
  for (let a = 0; a < 24; a++) {
@@ -1618,7 +1618,7 @@ function ji(t, e = 24) {
1618
1618
  for (let i = 0; i < 10; i++)
1619
1619
  t[a + i] ^= ~n[(i + 2) % 10] & n[(i + 4) % 10];
1620
1620
  }
1621
- t[0] ^= Fi[r], t[1] ^= Ui[r];
1621
+ t[0] ^= Ui[r], t[1] ^= ji[r];
1622
1622
  }
1623
1623
  n.fill(0);
1624
1624
  }
@@ -1627,10 +1627,10 @@ class Me extends wr {
1627
1627
  constructor(e, n, r, s = !1, o = 24) {
1628
1628
  if (super(), this.blockLen = e, this.suffix = n, this.outputLen = r, this.enableXOF = s, this.rounds = o, this.pos = 0, this.posOut = 0, this.finished = !1, this.destroyed = !1, In(r), 0 >= this.blockLen || this.blockLen >= 200)
1629
1629
  throw new Error("Sha3 supports only keccak-f1600 function");
1630
- this.state = new Uint8Array(200), this.state32 = _i(this.state);
1630
+ this.state = new Uint8Array(200), this.state32 = Ni(this.state);
1631
1631
  }
1632
1632
  keccak() {
1633
- ji(this.state32, this.rounds), this.posOut = 0, this.pos = 0;
1633
+ Li(this.state32, this.rounds), this.posOut = 0, this.pos = 0;
1634
1634
  }
1635
1635
  update(e) {
1636
1636
  ne(this);
@@ -1686,14 +1686,14 @@ class Me extends wr {
1686
1686
  return e || (e = new Me(n, r, s, a, o)), e.state32.set(this.state32), e.pos = this.pos, e.posOut = this.posOut, e.finished = this.finished, e.rounds = o, e.suffix = r, e.outputLen = s, e.enableXOF = a, e.destroyed = this.destroyed, e;
1687
1687
  }
1688
1688
  }
1689
- const Li = (t, e, n) => yr(() => new Me(e, t, n)), Di = /* @__PURE__ */ Li(1, 136, 256 / 8);
1690
- function Hi(t, e, n, r) {
1689
+ const Di = (t, e, n) => yr(() => new Me(e, t, n)), Hi = /* @__PURE__ */ Di(1, 136, 256 / 8);
1690
+ function Vi(t, e, n, r) {
1691
1691
  if (typeof t.setBigUint64 == "function")
1692
1692
  return t.setBigUint64(e, n, r);
1693
1693
  const s = BigInt(32), o = BigInt(4294967295), a = Number(n >> s & o), i = Number(n & o), c = r ? 4 : 0, l = r ? 0 : 4;
1694
1694
  t.setUint32(e + c, a, r), t.setUint32(e + l, i, r);
1695
1695
  }
1696
- class Vi extends wr {
1696
+ class Mi extends wr {
1697
1697
  constructor(e, n, r, s) {
1698
1698
  super(), this.blockLen = e, this.outputLen = n, this.padOffset = r, this.isLE = s, this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.buffer = new Uint8Array(e), this.view = Ae(this.buffer);
1699
1699
  }
@@ -1721,7 +1721,7 @@ class Vi extends wr {
1721
1721
  n[a++] = 128, this.buffer.subarray(a).fill(0), this.padOffset > s - a && (this.process(r, 0), a = 0);
1722
1722
  for (let u = a; u < s; u++)
1723
1723
  n[u] = 0;
1724
- Hi(r, s - 8, BigInt(this.length * 8), o), this.process(r, 0);
1724
+ Vi(r, s - 8, BigInt(this.length * 8), o), this.process(r, 0);
1725
1725
  const i = Ae(e), c = this.outputLen;
1726
1726
  if (c % 4)
1727
1727
  throw new Error("_sha2: outputLen should be aligned to 32bit");
@@ -1743,7 +1743,7 @@ class Vi extends wr {
1743
1743
  return e.length = s, e.pos = i, e.finished = o, e.destroyed = a, s % n && e.buffer.set(r), e;
1744
1744
  }
1745
1745
  }
1746
- const Mi = (t, e, n) => t & e ^ ~t & n, Gi = (t, e, n) => t & e ^ t & n ^ e & n, zi = /* @__PURE__ */ new Uint32Array([
1746
+ const Gi = (t, e, n) => t & e ^ ~t & n, zi = (t, e, n) => t & e ^ t & n ^ e & n, qi = /* @__PURE__ */ new Uint32Array([
1747
1747
  1116352408,
1748
1748
  1899447441,
1749
1749
  3049323471,
@@ -1818,7 +1818,7 @@ const Mi = (t, e, n) => t & e ^ ~t & n, Gi = (t, e, n) => t & e ^ t & n ^ e & n,
1818
1818
  528734635,
1819
1819
  1541459225
1820
1820
  ]), ct = /* @__PURE__ */ new Uint32Array(64);
1821
- class qi extends Vi {
1821
+ class Wi extends Mi {
1822
1822
  constructor() {
1823
1823
  super(64, 32, 8, !1), this.A = it[0] | 0, this.B = it[1] | 0, this.C = it[2] | 0, this.D = it[3] | 0, this.E = it[4] | 0, this.F = it[5] | 0, this.G = it[6] | 0, this.H = it[7] | 0;
1824
1824
  }
@@ -1834,12 +1834,12 @@ class qi extends Vi {
1834
1834
  for (let u = 0; u < 16; u++, n += 4)
1835
1835
  ct[u] = e.getUint32(n, !1);
1836
1836
  for (let u = 16; u < 64; u++) {
1837
- const w = ct[u - 15], m = ct[u - 2], S = J(w, 7) ^ J(w, 18) ^ w >>> 3, f = J(m, 17) ^ J(m, 19) ^ m >>> 10;
1837
+ const y = ct[u - 15], m = ct[u - 2], S = J(y, 7) ^ J(y, 18) ^ y >>> 3, f = J(m, 17) ^ J(m, 19) ^ m >>> 10;
1838
1838
  ct[u] = f + ct[u - 7] + S + ct[u - 16] | 0;
1839
1839
  }
1840
1840
  let { A: r, B: s, C: o, D: a, E: i, F: c, G: l, H: d } = this;
1841
1841
  for (let u = 0; u < 64; u++) {
1842
- const w = J(i, 6) ^ J(i, 11) ^ J(i, 25), m = d + w + Mi(i, c, l) + zi[u] + ct[u] | 0, f = (J(r, 2) ^ J(r, 13) ^ J(r, 22)) + Gi(r, s, o) | 0;
1842
+ const y = J(i, 6) ^ J(i, 11) ^ J(i, 25), m = d + y + Gi(i, c, l) + qi[u] + ct[u] | 0, f = (J(r, 2) ^ J(r, 13) ^ J(r, 22)) + zi(r, s, o) | 0;
1843
1843
  d = l, l = c, c = i, i = a + m | 0, a = o, o = s, s = r, r = m + f | 0;
1844
1844
  }
1845
1845
  r = r + this.A | 0, s = s + this.B | 0, o = o + this.C | 0, a = a + this.D | 0, i = i + this.E | 0, c = c + this.F | 0, l = l + this.G | 0, d = d + this.H | 0, this.set(r, s, o, a, i, c, l, d);
@@ -1851,15 +1851,15 @@ class qi extends Vi {
1851
1851
  this.set(0, 0, 0, 0, 0, 0, 0, 0), this.buffer.fill(0);
1852
1852
  }
1853
1853
  }
1854
- const Ar = /* @__PURE__ */ yr(() => new qi());
1854
+ const Ar = /* @__PURE__ */ yr(() => new Wi());
1855
1855
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
1856
- const xr = BigInt(0), fe = BigInt(1), Wi = BigInt(2), he = (t) => t instanceof Uint8Array, Ki = Array.from({ length: 256 }, (t, e) => e.toString(16).padStart(2, "0"));
1856
+ const xr = BigInt(0), fe = BigInt(1), Ki = BigInt(2), he = (t) => t instanceof Uint8Array, Zi = Array.from({ length: 256 }, (t, e) => e.toString(16).padStart(2, "0"));
1857
1857
  function ht(t) {
1858
1858
  if (!he(t))
1859
1859
  throw new Error("Uint8Array expected");
1860
1860
  let e = "";
1861
1861
  for (let n = 0; n < t.length; n++)
1862
- e += Ki[t[n]];
1862
+ e += Zi[t[n]];
1863
1863
  return e;
1864
1864
  }
1865
1865
  function vr(t) {
@@ -1893,7 +1893,7 @@ function ze(t) {
1893
1893
  throw new Error("Uint8Array expected");
1894
1894
  return Ge(ht(Uint8Array.from(t).reverse()));
1895
1895
  }
1896
- const Et = (t, e) => pt(t.toString(16).padStart(e * 2, "0")), Ir = (t, e) => Et(t, e).reverse(), Zi = (t) => pt(vr(t));
1896
+ const Et = (t, e) => pt(t.toString(16).padStart(e * 2, "0")), Ir = (t, e) => Et(t, e).reverse(), Yi = (t) => pt(vr(t));
1897
1897
  function V(t, e, n) {
1898
1898
  let r;
1899
1899
  if (typeof e == "string")
@@ -1920,7 +1920,7 @@ function Lt(...t) {
1920
1920
  e.set(r, n), n += r.length;
1921
1921
  }), e;
1922
1922
  }
1923
- function Yi(t, e) {
1923
+ function Xi(t, e) {
1924
1924
  if (t.length !== e.length)
1925
1925
  return !1;
1926
1926
  for (let n = 0; n < t.length; n++)
@@ -1928,18 +1928,18 @@ function Yi(t, e) {
1928
1928
  return !1;
1929
1929
  return !0;
1930
1930
  }
1931
- function Xi(t) {
1931
+ function Ji(t) {
1932
1932
  if (typeof t != "string")
1933
1933
  throw new Error(`utf8ToBytes expected string, got ${typeof t}`);
1934
1934
  return new TextEncoder().encode(t);
1935
1935
  }
1936
- function Ji(t) {
1936
+ function Qi(t) {
1937
1937
  let e;
1938
1938
  for (e = 0; t > xr; t >>= fe, e += 1)
1939
1939
  ;
1940
1940
  return e;
1941
1941
  }
1942
- const Qi = (t, e) => t >> BigInt(e) & fe, tc = (t, e, n) => t | (n ? fe : xr) << BigInt(e), pe = (t) => (Wi << BigInt(t - 1)) - fe, xe = (t) => new Uint8Array(t), Nn = (t) => Uint8Array.from(t);
1942
+ const tc = (t, e) => t >> BigInt(e) & fe, ec = (t, e, n) => t | (n ? fe : xr) << BigInt(e), pe = (t) => (Ki << BigInt(t - 1)) - fe, xe = (t) => new Uint8Array(t), Nn = (t) => Uint8Array.from(t);
1943
1943
  function Tr(t, e, n) {
1944
1944
  if (typeof t != "number" || t < 2)
1945
1945
  throw new Error("hashLen must be a number");
@@ -1956,23 +1956,23 @@ function Tr(t, e, n) {
1956
1956
  if (o++ >= 1e3)
1957
1957
  throw new Error("drbg: tried 1000 values");
1958
1958
  let u = 0;
1959
- const w = [];
1959
+ const y = [];
1960
1960
  for (; u < e; ) {
1961
1961
  r = i();
1962
1962
  const m = r.slice();
1963
- w.push(m), u += r.length;
1963
+ y.push(m), u += r.length;
1964
1964
  }
1965
- return Lt(...w);
1965
+ return Lt(...y);
1966
1966
  };
1967
- return (u, w) => {
1967
+ return (u, y) => {
1968
1968
  a(), c(u);
1969
1969
  let m;
1970
- for (; !(m = w(l())); )
1970
+ for (; !(m = y(l())); )
1971
1971
  c();
1972
1972
  return a(), m;
1973
1973
  };
1974
1974
  }
1975
- const ec = {
1975
+ const nc = {
1976
1976
  bigint: (t) => typeof t == "bigint",
1977
1977
  function: (t) => typeof t == "function",
1978
1978
  boolean: (t) => typeof t == "boolean",
@@ -1984,7 +1984,7 @@ const ec = {
1984
1984
  };
1985
1985
  function zt(t, e, n = {}) {
1986
1986
  const r = (s, o, a) => {
1987
- const i = ec[o];
1987
+ const i = nc[o];
1988
1988
  if (typeof i != "function")
1989
1989
  throw new Error(`Invalid validator "${o}", expected function`);
1990
1990
  const c = t[s];
@@ -1997,37 +1997,37 @@ function zt(t, e, n = {}) {
1997
1997
  r(s, o, !0);
1998
1998
  return t;
1999
1999
  }
2000
- const nc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2000
+ const rc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2001
2001
  __proto__: null,
2002
- bitGet: Qi,
2003
- bitLen: Ji,
2002
+ bitGet: tc,
2003
+ bitLen: Qi,
2004
2004
  bitMask: pe,
2005
- bitSet: tc,
2005
+ bitSet: ec,
2006
2006
  bytesToHex: ht,
2007
2007
  bytesToNumberBE: X,
2008
2008
  bytesToNumberLE: ze,
2009
2009
  concatBytes: Lt,
2010
2010
  createHmacDrbg: Tr,
2011
2011
  ensureBytes: V,
2012
- equalBytes: Yi,
2012
+ equalBytes: Xi,
2013
2013
  hexToBytes: pt,
2014
2014
  hexToNumber: Ge,
2015
2015
  numberToBytesBE: Et,
2016
2016
  numberToBytesLE: Ir,
2017
2017
  numberToHexUnpadded: vr,
2018
- numberToVarBytesBE: Zi,
2019
- utf8ToBytes: Xi,
2018
+ numberToVarBytesBE: Yi,
2019
+ utf8ToBytes: Ji,
2020
2020
  validateObject: zt
2021
2021
  }, Symbol.toStringTag, { value: "Module" }));
2022
2022
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
2023
- const U = BigInt(0), $ = BigInt(1), ut = BigInt(2), rc = BigInt(3), _e = BigInt(4), Cn = BigInt(5), On = BigInt(8);
2023
+ const U = BigInt(0), $ = BigInt(1), ut = BigInt(2), sc = BigInt(3), _e = BigInt(4), Cn = BigInt(5), On = BigInt(8);
2024
2024
  BigInt(9);
2025
2025
  BigInt(16);
2026
2026
  function M(t, e) {
2027
2027
  const n = t % e;
2028
2028
  return n >= U ? n : e + n;
2029
2029
  }
2030
- function sc(t, e, n) {
2030
+ function oc(t, e, n) {
2031
2031
  if (n <= U || e < U)
2032
2032
  throw new Error("Expected power/modulo > 0");
2033
2033
  if (n === $)
@@ -2049,12 +2049,12 @@ function Ne(t, e) {
2049
2049
  throw new Error("invert: does not exist");
2050
2050
  return M(s, e);
2051
2051
  }
2052
- function oc(t) {
2052
+ function ac(t) {
2053
2053
  const e = (t - $) / ut;
2054
2054
  let n, r, s;
2055
2055
  for (n = t - $, r = 0; n % ut === U; n /= ut, r++)
2056
2056
  ;
2057
- for (s = ut; s < t && sc(s, e, t) !== t - $; s++)
2057
+ for (s = ut; s < t && oc(s, e, t) !== t - $; s++)
2058
2058
  ;
2059
2059
  if (r === 1) {
2060
2060
  const a = (t + $) / _e;
@@ -2069,21 +2069,21 @@ function oc(t) {
2069
2069
  return function(i, c) {
2070
2070
  if (i.pow(c, e) === i.neg(i.ONE))
2071
2071
  throw new Error("Cannot find square root");
2072
- let l = r, d = i.pow(i.mul(i.ONE, s), n), u = i.pow(c, o), w = i.pow(c, n);
2073
- for (; !i.eql(w, i.ONE); ) {
2074
- if (i.eql(w, i.ZERO))
2072
+ let l = r, d = i.pow(i.mul(i.ONE, s), n), u = i.pow(c, o), y = i.pow(c, n);
2073
+ for (; !i.eql(y, i.ONE); ) {
2074
+ if (i.eql(y, i.ZERO))
2075
2075
  return i.ZERO;
2076
2076
  let m = 1;
2077
- for (let f = i.sqr(w); m < l && !i.eql(f, i.ONE); m++)
2077
+ for (let f = i.sqr(y); m < l && !i.eql(f, i.ONE); m++)
2078
2078
  f = i.sqr(f);
2079
2079
  const S = i.pow(d, $ << BigInt(l - m - 1));
2080
- d = i.sqr(S), u = i.mul(u, S), w = i.mul(w, d), l = m;
2080
+ d = i.sqr(S), u = i.mul(u, S), y = i.mul(y, d), l = m;
2081
2081
  }
2082
2082
  return u;
2083
2083
  };
2084
2084
  }
2085
- function ac(t) {
2086
- if (t % _e === rc) {
2085
+ function ic(t) {
2086
+ if (t % _e === sc) {
2087
2087
  const e = (t + $) / _e;
2088
2088
  return function(r, s) {
2089
2089
  const o = r.pow(s, e);
@@ -2101,9 +2101,9 @@ function ac(t) {
2101
2101
  return l;
2102
2102
  };
2103
2103
  }
2104
- return oc(t);
2104
+ return ac(t);
2105
2105
  }
2106
- const ic = [
2106
+ const cc = [
2107
2107
  "create",
2108
2108
  "isValid",
2109
2109
  "is0",
@@ -2128,7 +2128,7 @@ function qe(t) {
2128
2128
  MASK: "bigint",
2129
2129
  BYTES: "isSafeInteger",
2130
2130
  BITS: "isSafeInteger"
2131
- }, n = ic.reduce((r, s) => (r[s] = "function", r), e);
2131
+ }, n = cc.reduce((r, s) => (r[s] = "function", r), e);
2132
2132
  return zt(t, n);
2133
2133
  }
2134
2134
  function Br(t, e, n) {
@@ -2143,7 +2143,7 @@ function Br(t, e, n) {
2143
2143
  n & $ && (r = t.mul(r, s)), s = t.sqr(s), n >>= $;
2144
2144
  return r;
2145
2145
  }
2146
- function cc(t, e) {
2146
+ function lc(t, e) {
2147
2147
  const n = new Array(e.length), r = e.reduce((o, a, i) => t.is0(a) ? o : (n[i] = o, t.mul(o, a)), t.ONE), s = t.inv(r);
2148
2148
  return e.reduceRight((o, a, i) => t.is0(a) ? o : (n[i] = t.mul(o, n[i]), t.mul(o, a)), s), n;
2149
2149
  }
@@ -2157,7 +2157,7 @@ function Ke(t, e, n = !1, r = {}) {
2157
2157
  const { nBitLength: s, nByteLength: o } = We(t, e);
2158
2158
  if (o > 2048)
2159
2159
  throw new Error("Field lengths over 2048 bytes are not supported");
2160
- const a = ac(t), i = Object.freeze({
2160
+ const a = ic(t), i = Object.freeze({
2161
2161
  ORDER: t,
2162
2162
  BITS: s,
2163
2163
  BYTES: o,
@@ -2187,7 +2187,7 @@ function Ke(t, e, n = !1, r = {}) {
2187
2187
  mulN: (c, l) => c * l,
2188
2188
  inv: (c) => Ne(c, t),
2189
2189
  sqrt: r.sqrt || ((c) => a(i, c)),
2190
- invertBatch: (c) => cc(i, c),
2190
+ invertBatch: (c) => lc(i, c),
2191
2191
  // TODO: do we really need constant cmov?
2192
2192
  // We don't have const-time bigints anyway, so probably will be not very useful
2193
2193
  cmov: (c, l, d) => d ? l : c,
@@ -2200,7 +2200,7 @@ function Ke(t, e, n = !1, r = {}) {
2200
2200
  });
2201
2201
  return Object.freeze(i);
2202
2202
  }
2203
- function lc(t, e, n = !1) {
2203
+ function uc(t, e, n = !1) {
2204
2204
  t = V("privateHash", t);
2205
2205
  const r = t.length, s = We(e).nByteLength + 8;
2206
2206
  if (s < 24 || r < s || r > 1024)
@@ -2209,7 +2209,7 @@ function lc(t, e, n = !1) {
2209
2209
  return M(o, e - $) + $;
2210
2210
  }
2211
2211
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
2212
- function uc(t) {
2212
+ function dc(t) {
2213
2213
  const { Fp: e } = t;
2214
2214
  qe(e);
2215
2215
  for (const c of ["t", "roundsFull", "roundsPartial"])
@@ -2249,8 +2249,8 @@ function uc(t) {
2249
2249
  });
2250
2250
  return Object.freeze({ ...t, rounds: o, sboxFn: s, roundConstants: a, mds: i });
2251
2251
  }
2252
- function dc(t) {
2253
- const { t: e, Fp: n, rounds: r, sboxFn: s, reversePartialPowIdx: o } = uc(t), a = Math.floor(t.roundsFull / 2), i = o ? e - 1 : 0, c = (d, u, w) => (d = d.map((m, S) => n.add(m, t.roundConstants[w][S])), u ? d = d.map((m) => s(m)) : d[i] = s(d[i]), d = t.mds.map((m) => m.reduce((S, f, g) => n.add(S, n.mulN(f, d[g])), n.ZERO)), d), l = function(u) {
2252
+ function fc(t) {
2253
+ const { t: e, Fp: n, rounds: r, sboxFn: s, reversePartialPowIdx: o } = dc(t), a = Math.floor(t.roundsFull / 2), i = o ? e - 1 : 0, c = (d, u, y) => (d = d.map((m, S) => n.add(m, t.roundConstants[y][S])), u ? d = d.map((m) => s(m)) : d[i] = s(d[i]), d = t.mds.map((m) => m.reduce((S, f, g) => n.add(S, n.mulN(f, d[g])), n.ZERO)), d), l = function(u) {
2254
2254
  if (!Array.isArray(u) || u.length !== e)
2255
2255
  throw new Error(`Poseidon: wrong values (expected array of bigints with length ${e})`);
2256
2256
  u = u.map((m) => {
@@ -2258,22 +2258,22 @@ function dc(t) {
2258
2258
  throw new Error(`Poseidon: wrong value=${m} (${typeof m})`);
2259
2259
  return n.create(m);
2260
2260
  });
2261
- let w = 0;
2261
+ let y = 0;
2262
2262
  for (let m = 0; m < a; m++)
2263
- u = c(u, !0, w++);
2263
+ u = c(u, !0, y++);
2264
2264
  for (let m = 0; m < t.roundsPartial; m++)
2265
- u = c(u, !1, w++);
2265
+ u = c(u, !1, y++);
2266
2266
  for (let m = 0; m < a; m++)
2267
- u = c(u, !0, w++);
2268
- if (w !== r)
2269
- throw new Error(`Poseidon: wrong number of rounds: last round=${w}, total=${r}`);
2267
+ u = c(u, !0, y++);
2268
+ if (y !== r)
2269
+ throw new Error(`Poseidon: wrong number of rounds: last round=${y}, total=${r}`);
2270
2270
  return u;
2271
2271
  };
2272
2272
  return l.roundConstants = t.roundConstants, l;
2273
2273
  }
2274
2274
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
2275
- const fc = BigInt(0), ve = BigInt(1);
2276
- function hc(t, e) {
2275
+ const hc = BigInt(0), ve = BigInt(1);
2276
+ function pc(t, e) {
2277
2277
  const n = (s, o) => {
2278
2278
  const a = o.negate();
2279
2279
  return s ? a : o;
@@ -2286,7 +2286,7 @@ function hc(t, e) {
2286
2286
  // non-const time multiplication ladder
2287
2287
  unsafeLadder(s, o) {
2288
2288
  let a = t.ZERO, i = s;
2289
- for (; o > fc; )
2289
+ for (; o > hc; )
2290
2290
  o & ve && (a = a.add(i)), i = i.double(), o >>= ve;
2291
2291
  return a;
2292
2292
  },
@@ -2305,7 +2305,7 @@ function hc(t, e) {
2305
2305
  let l = s, d = l;
2306
2306
  for (let u = 0; u < a; u++) {
2307
2307
  d = l, c.push(d);
2308
- for (let w = 1; w < i; w++)
2308
+ for (let y = 1; y < i; y++)
2309
2309
  d = d.add(l), c.push(d);
2310
2310
  l = d.double();
2311
2311
  }
@@ -2321,13 +2321,13 @@ function hc(t, e) {
2321
2321
  wNAF(s, o, a) {
2322
2322
  const { windows: i, windowSize: c } = r(s);
2323
2323
  let l = t.ZERO, d = t.BASE;
2324
- const u = BigInt(2 ** s - 1), w = 2 ** s, m = BigInt(s);
2324
+ const u = BigInt(2 ** s - 1), y = 2 ** s, m = BigInt(s);
2325
2325
  for (let S = 0; S < i; S++) {
2326
2326
  const f = S * c;
2327
2327
  let g = Number(a & u);
2328
- a >>= m, g > c && (g -= w, a += ve);
2329
- const b = f, E = f + Math.abs(g) - 1, x = S % 2 !== 0, _ = g < 0;
2330
- g === 0 ? d = d.add(n(x, o[b])) : l = l.add(n(_, o[E]));
2328
+ a >>= m, g > c && (g -= y, a += ve);
2329
+ const w = f, E = f + Math.abs(g) - 1, x = S % 2 !== 0, _ = g < 0;
2330
+ g === 0 ? d = d.add(n(x, o[w])) : l = l.add(n(_, o[E]));
2331
2331
  }
2332
2332
  return { p: l, f: d };
2333
2333
  },
@@ -2354,7 +2354,7 @@ function _r(t) {
2354
2354
  });
2355
2355
  }
2356
2356
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
2357
- function pc(t) {
2357
+ function mc(t) {
2358
2358
  const e = _r(t);
2359
2359
  zt(e, {
2360
2360
  a: "field",
@@ -2377,7 +2377,7 @@ function pc(t) {
2377
2377
  }
2378
2378
  return Object.freeze({ ...e });
2379
2379
  }
2380
- const { bytesToNumberBE: mc, hexToBytes: gc } = nc, dt = {
2380
+ const { bytesToNumberBE: gc, hexToBytes: wc } = rc, dt = {
2381
2381
  // asn.1 DER encoding utils
2382
2382
  Err: class extends Error {
2383
2383
  constructor(e = "") {
@@ -2395,10 +2395,10 @@ const { bytesToNumberBE: mc, hexToBytes: gc } = nc, dt = {
2395
2395
  throw new e("Invalid signature integer: negative");
2396
2396
  if (r[0] === 0 && !(r[1] & 128))
2397
2397
  throw new e("Invalid signature integer: unnecessary leading zero");
2398
- return { d: mc(r), l: t.subarray(n + 2) };
2398
+ return { d: gc(r), l: t.subarray(n + 2) };
2399
2399
  },
2400
2400
  toSig(t) {
2401
- const { Err: e } = dt, n = typeof t == "string" ? gc(t) : t;
2401
+ const { Err: e } = dt, n = typeof t == "string" ? wc(t) : t;
2402
2402
  if (!(n instanceof Uint8Array))
2403
2403
  throw new Error("ui8a expected");
2404
2404
  let r = n.length;
@@ -2422,16 +2422,16 @@ const { bytesToNumberBE: mc, hexToBytes: gc } = nc, dt = {
2422
2422
  BigInt(2);
2423
2423
  const kn = BigInt(3);
2424
2424
  BigInt(4);
2425
- function wc(t) {
2426
- const e = pc(t), { Fp: n } = e, r = e.toBytes || ((S, f, g) => {
2427
- const b = f.toAffine();
2428
- return Lt(Uint8Array.from([4]), n.toBytes(b.x), n.toBytes(b.y));
2425
+ function yc(t) {
2426
+ const e = mc(t), { Fp: n } = e, r = e.toBytes || ((S, f, g) => {
2427
+ const w = f.toAffine();
2428
+ return Lt(Uint8Array.from([4]), n.toBytes(w.x), n.toBytes(w.y));
2429
2429
  }), s = e.fromBytes || ((S) => {
2430
- const f = S.subarray(1), g = n.fromBytes(f.subarray(0, n.BYTES)), b = n.fromBytes(f.subarray(n.BYTES, 2 * n.BYTES));
2431
- return { x: g, y: b };
2430
+ const f = S.subarray(1), g = n.fromBytes(f.subarray(0, n.BYTES)), w = n.fromBytes(f.subarray(n.BYTES, 2 * n.BYTES));
2431
+ return { x: g, y: w };
2432
2432
  });
2433
2433
  function o(S) {
2434
- const { a: f, b: g } = e, b = n.sqr(S), E = n.mul(b, S);
2434
+ const { a: f, b: g } = e, w = n.sqr(S), E = n.mul(w, S);
2435
2435
  return n.add(n.add(E, n.mul(S, f)), g);
2436
2436
  }
2437
2437
  if (!n.eql(n.sqr(e.Gy), o(e.Gx)))
@@ -2444,7 +2444,7 @@ function wc(t) {
2444
2444
  throw new Error("Expected valid bigint: 0 < bigint < curve.n");
2445
2445
  }
2446
2446
  function c(S) {
2447
- const { allowedPrivateKeyLengths: f, nByteLength: g, wrapPrivateKey: b, n: E } = e;
2447
+ const { allowedPrivateKeyLengths: f, nByteLength: g, wrapPrivateKey: w, n: E } = e;
2448
2448
  if (f && typeof S != "bigint") {
2449
2449
  if (S instanceof Uint8Array && (S = ht(S)), typeof S != "string" || !f.includes(S.length))
2450
2450
  throw new Error("Invalid key");
@@ -2456,7 +2456,7 @@ function wc(t) {
2456
2456
  } catch {
2457
2457
  throw new Error(`private key must be ${g} bytes, hex or bigint, not ${typeof S}`);
2458
2458
  }
2459
- return b && (x = M(x, E)), i(x), x;
2459
+ return w && (x = M(x, E)), i(x), x;
2460
2460
  }
2461
2461
  const l = /* @__PURE__ */ new Map();
2462
2462
  function d(S) {
@@ -2464,24 +2464,24 @@ function wc(t) {
2464
2464
  throw new Error("ProjectivePoint expected");
2465
2465
  }
2466
2466
  class u {
2467
- constructor(f, g, b) {
2468
- if (this.px = f, this.py = g, this.pz = b, f == null || !n.isValid(f))
2467
+ constructor(f, g, w) {
2468
+ if (this.px = f, this.py = g, this.pz = w, f == null || !n.isValid(f))
2469
2469
  throw new Error("x required");
2470
2470
  if (g == null || !n.isValid(g))
2471
2471
  throw new Error("y required");
2472
- if (b == null || !n.isValid(b))
2472
+ if (w == null || !n.isValid(w))
2473
2473
  throw new Error("z required");
2474
2474
  }
2475
2475
  // Does not validate if the point is on-curve.
2476
2476
  // Use fromHex instead, or call assertValidity() later.
2477
2477
  static fromAffine(f) {
2478
- const { x: g, y: b } = f || {};
2479
- if (!f || !n.isValid(g) || !n.isValid(b))
2478
+ const { x: g, y: w } = f || {};
2479
+ if (!f || !n.isValid(g) || !n.isValid(w))
2480
2480
  throw new Error("invalid affine point");
2481
2481
  if (f instanceof u)
2482
2482
  throw new Error("projective point not allowed");
2483
2483
  const E = (x) => n.eql(x, n.ZERO);
2484
- return E(g) && E(b) ? u.ZERO : new u(g, b, n.ONE);
2484
+ return E(g) && E(w) ? u.ZERO : new u(g, w, n.ONE);
2485
2485
  }
2486
2486
  get x() {
2487
2487
  return this.toAffine().x;
@@ -2496,8 +2496,8 @@ function wc(t) {
2496
2496
  * Optimization: converts a list of projective points to a list of identical points with Z=1.
2497
2497
  */
2498
2498
  static normalizeZ(f) {
2499
- const g = n.invertBatch(f.map((b) => b.pz));
2500
- return f.map((b, E) => b.toAffine(g[E])).map(u.fromAffine);
2499
+ const g = n.invertBatch(f.map((w) => w.pz));
2500
+ return f.map((w, E) => w.toAffine(g[E])).map(u.fromAffine);
2501
2501
  }
2502
2502
  /**
2503
2503
  * Converts hash string or Uint8Array to Point.
@@ -2525,8 +2525,8 @@ function wc(t) {
2525
2525
  const { x: f, y: g } = this.toAffine();
2526
2526
  if (!n.isValid(f) || !n.isValid(g))
2527
2527
  throw new Error("bad point: x or y not FE");
2528
- const b = n.sqr(g), E = o(f);
2529
- if (!n.eql(b, E))
2528
+ const w = n.sqr(g), E = o(f);
2529
+ if (!n.eql(w, E))
2530
2530
  throw new Error("bad point: equation left != right");
2531
2531
  if (!this.isTorsionFree())
2532
2532
  throw new Error("bad point: not in prime-order subgroup");
@@ -2542,7 +2542,7 @@ function wc(t) {
2542
2542
  */
2543
2543
  equals(f) {
2544
2544
  d(f);
2545
- const { px: g, py: b, pz: E } = this, { px: x, py: _, pz: B } = f, A = n.eql(n.mul(g, B), n.mul(x, E)), v = n.eql(n.mul(b, B), n.mul(_, E));
2545
+ const { px: g, py: w, pz: E } = this, { px: x, py: _, pz: B } = f, A = n.eql(n.mul(g, B), n.mul(x, E)), v = n.eql(n.mul(w, B), n.mul(_, E));
2546
2546
  return A && v;
2547
2547
  }
2548
2548
  /**
@@ -2556,9 +2556,9 @@ function wc(t) {
2556
2556
  // https://eprint.iacr.org/2015/1060, algorithm 3
2557
2557
  // Cost: 8M + 3S + 3*a + 2*b3 + 15add.
2558
2558
  double() {
2559
- const { a: f, b: g } = e, b = n.mul(g, kn), { px: E, py: x, pz: _ } = this;
2559
+ const { a: f, b: g } = e, w = n.mul(g, kn), { px: E, py: x, pz: _ } = this;
2560
2560
  let B = n.ZERO, A = n.ZERO, v = n.ZERO, T = n.mul(E, E), G = n.mul(x, x), R = n.mul(_, _), N = n.mul(E, x);
2561
- return N = n.add(N, N), v = n.mul(E, _), v = n.add(v, v), B = n.mul(f, v), A = n.mul(b, R), A = n.add(B, A), B = n.sub(G, A), A = n.add(G, A), A = n.mul(B, A), B = n.mul(N, B), v = n.mul(b, v), R = n.mul(f, R), N = n.sub(T, R), N = n.mul(f, N), N = n.add(N, v), v = n.add(T, T), T = n.add(v, T), T = n.add(T, R), T = n.mul(T, N), A = n.add(A, T), R = n.mul(x, _), R = n.add(R, R), T = n.mul(R, N), B = n.sub(B, T), v = n.mul(R, G), v = n.add(v, v), v = n.add(v, v), new u(B, A, v);
2561
+ return N = n.add(N, N), v = n.mul(E, _), v = n.add(v, v), B = n.mul(f, v), A = n.mul(w, R), A = n.add(B, A), B = n.sub(G, A), A = n.add(G, A), A = n.mul(B, A), B = n.mul(N, B), v = n.mul(w, v), R = n.mul(f, R), N = n.sub(T, R), N = n.mul(f, N), N = n.add(N, v), v = n.add(T, T), T = n.add(v, T), T = n.add(T, R), T = n.mul(T, N), A = n.add(A, T), R = n.mul(x, _), R = n.add(R, R), T = n.mul(R, N), B = n.sub(B, T), v = n.mul(R, G), v = n.add(v, v), v = n.add(v, v), new u(B, A, v);
2562
2562
  }
2563
2563
  // Renes-Costello-Batina exception-free addition formula.
2564
2564
  // There is 30% faster Jacobian formula, but it is not complete.
@@ -2566,13 +2566,13 @@ function wc(t) {
2566
2566
  // Cost: 12M + 0S + 3*a + 3*b3 + 23add.
2567
2567
  add(f) {
2568
2568
  d(f);
2569
- const { px: g, py: b, pz: E } = this, { px: x, py: _, pz: B } = f;
2569
+ const { px: g, py: w, pz: E } = this, { px: x, py: _, pz: B } = f;
2570
2570
  let A = n.ZERO, v = n.ZERO, T = n.ZERO;
2571
2571
  const G = e.a, R = n.mul(e.b, kn);
2572
- let N = n.mul(g, x), L = n.mul(b, _), D = n.mul(E, B), rt = n.add(g, b), p = n.add(x, _);
2572
+ let N = n.mul(g, x), L = n.mul(w, _), D = n.mul(E, B), rt = n.add(g, w), p = n.add(x, _);
2573
2573
  rt = n.mul(rt, p), p = n.add(N, L), rt = n.sub(rt, p), p = n.add(g, E);
2574
- let y = n.add(x, B);
2575
- return p = n.mul(p, y), y = n.add(N, D), p = n.sub(p, y), y = n.add(b, E), A = n.add(_, B), y = n.mul(y, A), A = n.add(L, D), y = n.sub(y, A), T = n.mul(G, p), A = n.mul(R, D), T = n.add(A, T), A = n.sub(L, T), T = n.add(L, T), v = n.mul(A, T), L = n.add(N, N), L = n.add(L, N), D = n.mul(G, D), p = n.mul(R, p), L = n.add(L, D), D = n.sub(N, D), D = n.mul(G, D), p = n.add(p, D), N = n.mul(L, p), v = n.add(v, N), N = n.mul(y, p), A = n.mul(rt, A), A = n.sub(A, N), N = n.mul(rt, L), T = n.mul(y, T), T = n.add(T, N), new u(A, v, T);
2574
+ let b = n.add(x, B);
2575
+ return p = n.mul(p, b), b = n.add(N, D), p = n.sub(p, b), b = n.add(w, E), A = n.add(_, B), b = n.mul(b, A), A = n.add(L, D), b = n.sub(b, A), T = n.mul(G, p), A = n.mul(R, D), T = n.add(A, T), A = n.sub(L, T), T = n.add(L, T), v = n.mul(A, T), L = n.add(N, N), L = n.add(L, N), D = n.mul(G, D), p = n.mul(R, p), L = n.add(L, D), D = n.sub(N, D), D = n.mul(G, D), p = n.add(p, D), N = n.mul(L, p), v = n.add(v, N), N = n.mul(b, p), A = n.mul(rt, A), A = n.sub(A, N), N = n.mul(rt, L), T = n.mul(b, T), T = n.add(T, N), new u(A, v, T);
2576
2576
  }
2577
2577
  subtract(f) {
2578
2578
  return this.add(f.negate());
@@ -2582,8 +2582,8 @@ function wc(t) {
2582
2582
  }
2583
2583
  wNAF(f) {
2584
2584
  return m.wNAFCached(this, l, f, (g) => {
2585
- const b = n.invertBatch(g.map((E) => E.pz));
2586
- return g.map((E, x) => E.toAffine(b[x])).map(u.fromAffine);
2585
+ const w = n.invertBatch(g.map((E) => E.pz));
2586
+ return g.map((E, x) => E.toAffine(w[x])).map(u.fromAffine);
2587
2587
  });
2588
2588
  }
2589
2589
  /**
@@ -2597,13 +2597,13 @@ function wc(t) {
2597
2597
  return g;
2598
2598
  if (i(f), f === q)
2599
2599
  return this;
2600
- const { endo: b } = e;
2601
- if (!b)
2600
+ const { endo: w } = e;
2601
+ if (!w)
2602
2602
  return m.unsafeLadder(this, f);
2603
- let { k1neg: E, k1: x, k2neg: _, k2: B } = b.splitScalar(f), A = g, v = g, T = this;
2603
+ let { k1neg: E, k1: x, k2neg: _, k2: B } = w.splitScalar(f), A = g, v = g, T = this;
2604
2604
  for (; x > et || B > et; )
2605
2605
  x & q && (A = A.add(T)), B & q && (v = v.add(T)), T = T.double(), x >>= q, B >>= q;
2606
- return E && (A = A.negate()), _ && (v = v.negate()), v = new u(n.mul(v.px, b.beta), v.py, v.pz), A.add(v);
2606
+ return E && (A = A.negate()), _ && (v = v.negate()), v = new u(n.mul(v.px, w.beta), v.py, v.pz), A.add(v);
2607
2607
  }
2608
2608
  /**
2609
2609
  * Constant time multiplication.
@@ -2616,17 +2616,17 @@ function wc(t) {
2616
2616
  */
2617
2617
  multiply(f) {
2618
2618
  i(f);
2619
- let g = f, b, E;
2619
+ let g = f, w, E;
2620
2620
  const { endo: x } = e;
2621
2621
  if (x) {
2622
2622
  const { k1neg: _, k1: B, k2neg: A, k2: v } = x.splitScalar(g);
2623
2623
  let { p: T, f: G } = this.wNAF(B), { p: R, f: N } = this.wNAF(v);
2624
- T = m.constTimeNegate(_, T), R = m.constTimeNegate(A, R), R = new u(n.mul(R.px, x.beta), R.py, R.pz), b = T.add(R), E = G.add(N);
2624
+ T = m.constTimeNegate(_, T), R = m.constTimeNegate(A, R), R = new u(n.mul(R.px, x.beta), R.py, R.pz), w = T.add(R), E = G.add(N);
2625
2625
  } else {
2626
2626
  const { p: _, f: B } = this.wNAF(g);
2627
- b = _, E = B;
2627
+ w = _, E = B;
2628
2628
  }
2629
- return u.normalizeZ([b, E])[0];
2629
+ return u.normalizeZ([w, E])[0];
2630
2630
  }
2631
2631
  /**
2632
2632
  * Efficiently calculate `aP + bQ`. Unsafe, can expose private key, if used incorrectly.
@@ -2634,17 +2634,17 @@ function wc(t) {
2634
2634
  * The trick could be useful if both P and Q are not G (not in our case).
2635
2635
  * @returns non-zero affine point
2636
2636
  */
2637
- multiplyAndAddUnsafe(f, g, b) {
2638
- const E = u.BASE, x = (B, A) => A === et || A === q || !B.equals(E) ? B.multiplyUnsafe(A) : B.multiply(A), _ = x(this, g).add(x(f, b));
2637
+ multiplyAndAddUnsafe(f, g, w) {
2638
+ const E = u.BASE, x = (B, A) => A === et || A === q || !B.equals(E) ? B.multiplyUnsafe(A) : B.multiply(A), _ = x(this, g).add(x(f, w));
2639
2639
  return _.is0() ? void 0 : _;
2640
2640
  }
2641
2641
  // Converts Projective point to affine (x, y) coordinates.
2642
2642
  // Can accept precomputed Z^-1 - for example, from invertBatch.
2643
2643
  // (x, y, z) ∋ (x=x/z, y=y/z)
2644
2644
  toAffine(f) {
2645
- const { px: g, py: b, pz: E } = this, x = this.is0();
2645
+ const { px: g, py: w, pz: E } = this, x = this.is0();
2646
2646
  f == null && (f = x ? n.ONE : n.inv(E));
2647
- const _ = n.mul(g, f), B = n.mul(b, f), A = n.mul(E, f);
2647
+ const _ = n.mul(g, f), B = n.mul(w, f), A = n.mul(E, f);
2648
2648
  if (x)
2649
2649
  return { x: n.ZERO, y: n.ZERO };
2650
2650
  if (!n.eql(A, n.ONE))
@@ -2671,7 +2671,7 @@ function wc(t) {
2671
2671
  }
2672
2672
  }
2673
2673
  u.BASE = new u(e.Gx, e.Gy, n.ONE), u.ZERO = new u(n.ZERO, n.ONE, n.ZERO);
2674
- const w = e.nBitLength, m = hc(u, e.endo ? Math.ceil(w / 2) : w);
2674
+ const y = e.nBitLength, m = pc(u, e.endo ? Math.ceil(y / 2) : y);
2675
2675
  return {
2676
2676
  CURVE: e,
2677
2677
  ProjectivePoint: u,
@@ -2680,7 +2680,7 @@ function wc(t) {
2680
2680
  isWithinCurveOrder: a
2681
2681
  };
2682
2682
  }
2683
- function yc(t) {
2683
+ function bc(t) {
2684
2684
  const e = _r(t);
2685
2685
  return zt(e, {
2686
2686
  hash: "hash",
@@ -2692,8 +2692,8 @@ function yc(t) {
2692
2692
  lowS: "boolean"
2693
2693
  }), Object.freeze({ lowS: !0, ...e });
2694
2694
  }
2695
- function bc(t) {
2696
- const e = yc(t), { Fp: n, n: r } = e, s = n.BYTES + 1, o = 2 * n.BYTES + 1;
2695
+ function Sc(t) {
2696
+ const e = bc(t), { Fp: n, n: r } = e, s = n.BYTES + 1, o = 2 * n.BYTES + 1;
2697
2697
  function a(p) {
2698
2698
  return et < p && p < n.ORDER;
2699
2699
  }
@@ -2703,15 +2703,15 @@ function bc(t) {
2703
2703
  function c(p) {
2704
2704
  return Ne(p, r);
2705
2705
  }
2706
- const { ProjectivePoint: l, normPrivateKeyToScalar: d, weierstrassEquation: u, isWithinCurveOrder: w } = wc({
2706
+ const { ProjectivePoint: l, normPrivateKeyToScalar: d, weierstrassEquation: u, isWithinCurveOrder: y } = yc({
2707
2707
  ...e,
2708
- toBytes(p, y, I) {
2709
- const P = y.toAffine(), C = n.toBytes(P.x), j = Lt;
2710
- return I ? j(Uint8Array.from([y.hasEvenY() ? 2 : 3]), C) : j(Uint8Array.from([4]), C, n.toBytes(P.y));
2708
+ toBytes(p, b, I) {
2709
+ const P = b.toAffine(), C = n.toBytes(P.x), j = Lt;
2710
+ return I ? j(Uint8Array.from([b.hasEvenY() ? 2 : 3]), C) : j(Uint8Array.from([4]), C, n.toBytes(P.y));
2711
2711
  },
2712
2712
  fromBytes(p) {
2713
- const y = p.length, I = p[0], P = p.subarray(1);
2714
- if (y === s && (I === 2 || I === 3)) {
2713
+ const b = p.length, I = p[0], P = p.subarray(1);
2714
+ if (b === s && (I === 2 || I === 3)) {
2715
2715
  const C = X(P);
2716
2716
  if (!a(C))
2717
2717
  throw new Error("Point is not on curve");
@@ -2719,47 +2719,47 @@ function bc(t) {
2719
2719
  let z = n.sqrt(j);
2720
2720
  const H = (z & q) === q;
2721
2721
  return (I & 1) === 1 !== H && (z = n.neg(z)), { x: C, y: z };
2722
- } else if (y === o && I === 4) {
2722
+ } else if (b === o && I === 4) {
2723
2723
  const C = n.fromBytes(P.subarray(0, n.BYTES)), j = n.fromBytes(P.subarray(n.BYTES, 2 * n.BYTES));
2724
2724
  return { x: C, y: j };
2725
2725
  } else
2726
- throw new Error(`Point of length ${y} was invalid. Expected ${s} compressed bytes or ${o} uncompressed bytes`);
2726
+ throw new Error(`Point of length ${b} was invalid. Expected ${s} compressed bytes or ${o} uncompressed bytes`);
2727
2727
  }
2728
2728
  }), m = (p) => ht(Et(p, e.nByteLength));
2729
2729
  function S(p) {
2730
- const y = r >> q;
2731
- return p > y;
2730
+ const b = r >> q;
2731
+ return p > b;
2732
2732
  }
2733
2733
  function f(p) {
2734
2734
  return S(p) ? i(-p) : p;
2735
2735
  }
2736
- const g = (p, y, I) => X(p.slice(y, I));
2737
- class b {
2738
- constructor(y, I, P) {
2739
- this.r = y, this.s = I, this.recovery = P, this.assertValidity();
2736
+ const g = (p, b, I) => X(p.slice(b, I));
2737
+ class w {
2738
+ constructor(b, I, P) {
2739
+ this.r = b, this.s = I, this.recovery = P, this.assertValidity();
2740
2740
  }
2741
2741
  // pair (bytes of r, bytes of s)
2742
- static fromCompact(y) {
2742
+ static fromCompact(b) {
2743
2743
  const I = e.nByteLength;
2744
- return y = V("compactSignature", y, I * 2), new b(g(y, 0, I), g(y, I, 2 * I));
2744
+ return b = V("compactSignature", b, I * 2), new w(g(b, 0, I), g(b, I, 2 * I));
2745
2745
  }
2746
2746
  // DER encoded ECDSA signature
2747
2747
  // https://bitcoin.stackexchange.com/questions/57644/what-are-the-parts-of-a-bitcoin-transaction-input-script
2748
- static fromDER(y) {
2749
- const { r: I, s: P } = dt.toSig(V("DER", y));
2750
- return new b(I, P);
2748
+ static fromDER(b) {
2749
+ const { r: I, s: P } = dt.toSig(V("DER", b));
2750
+ return new w(I, P);
2751
2751
  }
2752
2752
  assertValidity() {
2753
- if (!w(this.r))
2753
+ if (!y(this.r))
2754
2754
  throw new Error("r must be 0 < r < CURVE.n");
2755
- if (!w(this.s))
2755
+ if (!y(this.s))
2756
2756
  throw new Error("s must be 0 < s < CURVE.n");
2757
2757
  }
2758
- addRecoveryBit(y) {
2759
- return new b(this.r, this.s, y);
2758
+ addRecoveryBit(b) {
2759
+ return new w(this.r, this.s, b);
2760
2760
  }
2761
- recoverPublicKey(y) {
2762
- const { r: I, s: P, recovery: C } = this, j = v(V("msgHash", y));
2761
+ recoverPublicKey(b) {
2762
+ const { r: I, s: P, recovery: C } = this, j = v(V("msgHash", b));
2763
2763
  if (C == null || ![0, 1, 2, 3].includes(C))
2764
2764
  throw new Error("recovery id invalid");
2765
2765
  const z = C === 2 || C === 3 ? I + e.n : I;
@@ -2775,7 +2775,7 @@ function bc(t) {
2775
2775
  return S(this.s);
2776
2776
  }
2777
2777
  normalizeS() {
2778
- return this.hasHighS() ? new b(this.r, i(-this.s), this.recovery) : this;
2778
+ return this.hasHighS() ? new w(this.r, i(-this.s), this.recovery) : this;
2779
2779
  }
2780
2780
  // DER-encoded
2781
2781
  toDERRawBytes() {
@@ -2806,8 +2806,8 @@ function bc(t) {
2806
2806
  * as per FIPS 186 B.4.1 with modulo bias being neglible.
2807
2807
  */
2808
2808
  randomPrivateKey: () => {
2809
- const p = e.randomBytes(n.BYTES + 8), y = lc(p, r);
2810
- return Et(y, e.nByteLength);
2809
+ const p = e.randomBytes(n.BYTES + 8), b = uc(p, r);
2810
+ return Et(b, e.nByteLength);
2811
2811
  },
2812
2812
  /**
2813
2813
  * Creates precompute table for an arbitrary EC point. Makes point "cached".
@@ -2817,27 +2817,27 @@ function bc(t) {
2817
2817
  * const fast = utils.precompute(8, ProjectivePoint.fromHex(someonesPubKey));
2818
2818
  * fast.multiply(privKey); // much faster ECDH now
2819
2819
  */
2820
- precompute(p = 8, y = l.BASE) {
2821
- return y._setWindowSize(p), y.multiply(BigInt(3)), y;
2820
+ precompute(p = 8, b = l.BASE) {
2821
+ return b._setWindowSize(p), b.multiply(BigInt(3)), b;
2822
2822
  }
2823
2823
  };
2824
- function x(p, y = !0) {
2825
- return l.fromPrivateKey(p).toRawBytes(y);
2824
+ function x(p, b = !0) {
2825
+ return l.fromPrivateKey(p).toRawBytes(b);
2826
2826
  }
2827
2827
  function _(p) {
2828
- const y = p instanceof Uint8Array, I = typeof p == "string", P = (y || I) && p.length;
2829
- return y ? P === s || P === o : I ? P === 2 * s || P === 2 * o : p instanceof l;
2828
+ const b = p instanceof Uint8Array, I = typeof p == "string", P = (b || I) && p.length;
2829
+ return b ? P === s || P === o : I ? P === 2 * s || P === 2 * o : p instanceof l;
2830
2830
  }
2831
- function B(p, y, I = !0) {
2831
+ function B(p, b, I = !0) {
2832
2832
  if (_(p))
2833
2833
  throw new Error("first arg must be private key");
2834
- if (!_(y))
2834
+ if (!_(b))
2835
2835
  throw new Error("second arg must be public key");
2836
- return l.fromHex(y).multiply(d(p)).toRawBytes(I);
2836
+ return l.fromHex(b).multiply(d(p)).toRawBytes(I);
2837
2837
  }
2838
2838
  const A = e.bits2int || function(p) {
2839
- const y = X(p), I = p.length * 8 - e.nBitLength;
2840
- return I > 0 ? y >> BigInt(I) : y;
2839
+ const b = X(p), I = p.length * 8 - e.nBitLength;
2840
+ return I > 0 ? b >> BigInt(I) : b;
2841
2841
  }, v = e.bits2int_modN || function(p) {
2842
2842
  return i(A(p));
2843
2843
  }, T = pe(e.nBitLength);
@@ -2848,13 +2848,13 @@ function bc(t) {
2848
2848
  throw new Error(`bigint expected < 2^${e.nBitLength}`);
2849
2849
  return Et(p, e.nByteLength);
2850
2850
  }
2851
- function R(p, y, I = N) {
2851
+ function R(p, b, I = N) {
2852
2852
  if (["recovered", "canonical"].some((lt) => lt in I))
2853
2853
  throw new Error("sign() legacy options not supported");
2854
2854
  const { hash: P, randomBytes: C } = e;
2855
2855
  let { lowS: j, prehash: z, extraEntropy: H } = I;
2856
2856
  j == null && (j = !0), p = V("msgHash", p), z && (p = V("prehashed msgHash", P(p)));
2857
- const st = v(p), ot = d(y), gt = [G(ot), G(st)];
2857
+ const st = v(p), ot = d(b), gt = [G(ot), G(st)];
2858
2858
  if (H != null) {
2859
2859
  const lt = H === !0 ? C(n.BYTES) : H;
2860
2860
  gt.push(V("extraEntropy", lt, n.BYTES));
@@ -2862,7 +2862,7 @@ function bc(t) {
2862
2862
  const Bt = Lt(...gt), at = st;
2863
2863
  function we(lt) {
2864
2864
  const wt = A(lt);
2865
- if (!w(wt))
2865
+ if (!y(wt))
2866
2866
  return;
2867
2867
  const Xe = c(wt), yt = l.BASE.multiply(wt).toAffine(), W = i(yt.x);
2868
2868
  if (W === et)
@@ -2871,35 +2871,35 @@ function bc(t) {
2871
2871
  if (bt === et)
2872
2872
  return;
2873
2873
  let Je = (yt.x === W ? 0 : 2) | Number(yt.y & q), Qe = bt;
2874
- return j && S(bt) && (Qe = f(bt), Je ^= 1), new b(W, Qe, Je);
2874
+ return j && S(bt) && (Qe = f(bt), Je ^= 1), new w(W, Qe, Je);
2875
2875
  }
2876
2876
  return { seed: Bt, k2sig: we };
2877
2877
  }
2878
2878
  const N = { lowS: e.lowS, prehash: !1 }, L = { lowS: e.lowS, prehash: !1 };
2879
- function D(p, y, I = N) {
2880
- const { seed: P, k2sig: C } = R(p, y, I);
2879
+ function D(p, b, I = N) {
2880
+ const { seed: P, k2sig: C } = R(p, b, I);
2881
2881
  return Tr(e.hash.outputLen, e.nByteLength, e.hmac)(P, C);
2882
2882
  }
2883
2883
  l.BASE._setWindowSize(8);
2884
- function rt(p, y, I, P = L) {
2884
+ function rt(p, b, I, P = L) {
2885
2885
  var yt;
2886
2886
  const C = p;
2887
- if (y = V("msgHash", y), I = V("publicKey", I), "strict" in P)
2887
+ if (b = V("msgHash", b), I = V("publicKey", I), "strict" in P)
2888
2888
  throw new Error("options.strict was renamed to lowS");
2889
2889
  const { lowS: j, prehash: z } = P;
2890
2890
  let H, st;
2891
2891
  try {
2892
2892
  if (typeof C == "string" || C instanceof Uint8Array)
2893
2893
  try {
2894
- H = b.fromDER(C);
2894
+ H = w.fromDER(C);
2895
2895
  } catch (W) {
2896
2896
  if (!(W instanceof dt.Err))
2897
2897
  throw W;
2898
- H = b.fromCompact(C);
2898
+ H = w.fromCompact(C);
2899
2899
  }
2900
2900
  else if (typeof C == "object" && typeof C.r == "bigint" && typeof C.s == "bigint") {
2901
2901
  const { r: W, s: bt } = C;
2902
- H = new b(W, bt);
2902
+ H = new w(W, bt);
2903
2903
  } else
2904
2904
  throw new Error("PARSE");
2905
2905
  st = l.fromHex(I);
@@ -2910,8 +2910,8 @@ function bc(t) {
2910
2910
  }
2911
2911
  if (j && H.hasHighS())
2912
2912
  return !1;
2913
- z && (y = e.hash(y));
2914
- const { r: ot, s: gt } = H, Bt = v(y), at = c(gt), we = i(Bt * at), lt = i(ot * at), wt = (yt = l.BASE.multiplyAndAddUnsafe(st, we, lt)) == null ? void 0 : yt.toAffine();
2913
+ z && (b = e.hash(b));
2914
+ const { r: ot, s: gt } = H, Bt = v(b), at = c(gt), we = i(Bt * at), lt = i(ot * at), wt = (yt = l.BASE.multiplyAndAddUnsafe(st, we, lt)) == null ? void 0 : yt.toAffine();
2915
2915
  return wt ? i(wt.x) === ot : !1;
2916
2916
  }
2917
2917
  return {
@@ -2921,7 +2921,7 @@ function bc(t) {
2921
2921
  sign: D,
2922
2922
  verify: rt,
2923
2923
  ProjectivePoint: l,
2924
- Signature: b,
2924
+ Signature: w,
2925
2925
  utils: E
2926
2926
  };
2927
2927
  }
@@ -2929,7 +2929,7 @@ function Ce(t) {
2929
2929
  if (!Number.isSafeInteger(t) || t < 0)
2930
2930
  throw new Error(`Wrong positive integer: ${t}`);
2931
2931
  }
2932
- function Sc(t) {
2932
+ function Ec(t) {
2933
2933
  if (typeof t != "boolean")
2934
2934
  throw new Error(`Expected boolean, not ${t}`);
2935
2935
  }
@@ -2939,18 +2939,18 @@ function Nr(t, ...e) {
2939
2939
  if (e.length > 0 && !e.includes(t.length))
2940
2940
  throw new TypeError(`Expected Uint8Array of length ${e}, not of length=${t.length}`);
2941
2941
  }
2942
- function Ec(t) {
2942
+ function Ac(t) {
2943
2943
  if (typeof t != "function" || typeof t.create != "function")
2944
2944
  throw new Error("Hash should be wrapped by utils.wrapConstructor");
2945
2945
  Ce(t.outputLen), Ce(t.blockLen);
2946
2946
  }
2947
- function Ac(t, e = !0) {
2947
+ function xc(t, e = !0) {
2948
2948
  if (t.destroyed)
2949
2949
  throw new Error("Hash instance has been destroyed");
2950
2950
  if (e && t.finished)
2951
2951
  throw new Error("Hash#digest() has already been called");
2952
2952
  }
2953
- function xc(t, e) {
2953
+ function vc(t, e) {
2954
2954
  Nr(t);
2955
2955
  const n = e.outputLen;
2956
2956
  if (t.length < n)
@@ -2958,28 +2958,28 @@ function xc(t, e) {
2958
2958
  }
2959
2959
  const Yt = {
2960
2960
  number: Ce,
2961
- bool: Sc,
2961
+ bool: Ec,
2962
2962
  bytes: Nr,
2963
- hash: Ec,
2964
- exists: Ac,
2965
- output: xc
2963
+ hash: Ac,
2964
+ exists: xc,
2965
+ output: vc
2966
2966
  }, Ie = typeof globalThis == "object" && "crypto" in globalThis ? globalThis.crypto : void 0;
2967
2967
  /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
2968
- const vc = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
2969
- if (!vc)
2968
+ const Ic = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
2969
+ if (!Ic)
2970
2970
  throw new Error("Non little-endian hardware is not supported");
2971
2971
  Array.from({ length: 256 }, (t, e) => e.toString(16).padStart(2, "0"));
2972
- function Ic(t) {
2972
+ function Tc(t) {
2973
2973
  if (typeof t != "string")
2974
2974
  throw new TypeError(`utf8ToBytes expected string, got ${typeof t}`);
2975
2975
  return new TextEncoder().encode(t);
2976
2976
  }
2977
- function Tc(t) {
2978
- if (typeof t == "string" && (t = Ic(t)), !(t instanceof Uint8Array))
2977
+ function Bc(t) {
2978
+ if (typeof t == "string" && (t = Tc(t)), !(t instanceof Uint8Array))
2979
2979
  throw new TypeError(`Expected input type is Uint8Array (got ${typeof t})`);
2980
2980
  return t;
2981
2981
  }
2982
- function Bc(...t) {
2982
+ function _c(...t) {
2983
2983
  if (!t.every((r) => r instanceof Uint8Array))
2984
2984
  throw new Error("Uint8Array list expected");
2985
2985
  if (t.length === 1)
@@ -2991,21 +2991,21 @@ function Bc(...t) {
2991
2991
  }
2992
2992
  return n;
2993
2993
  }
2994
- class _c {
2994
+ class Nc {
2995
2995
  // Safe version that clones internal state
2996
2996
  clone() {
2997
2997
  return this._cloneInto();
2998
2998
  }
2999
2999
  }
3000
- function Nc(t = 32) {
3000
+ function Cc(t = 32) {
3001
3001
  if (Ie && typeof Ie.getRandomValues == "function")
3002
3002
  return Ie.getRandomValues(new Uint8Array(t));
3003
3003
  throw new Error("crypto.getRandomValues must be defined");
3004
3004
  }
3005
- class Cr extends _c {
3005
+ class Cr extends Nc {
3006
3006
  constructor(e, n) {
3007
3007
  super(), this.finished = !1, this.destroyed = !1, Yt.hash(e);
3008
- const r = Tc(n);
3008
+ const r = Bc(n);
3009
3009
  if (this.iHash = e.create(), typeof this.iHash.update != "function")
3010
3010
  throw new TypeError("Expected instance of class which extends utils.Hash");
3011
3011
  this.blockLen = this.iHash.blockLen, this.outputLen = this.iHash.outputLen;
@@ -3040,11 +3040,11 @@ class Cr extends _c {
3040
3040
  const Or = (t, e, n) => new Cr(t, e).update(n).digest();
3041
3041
  Or.create = (t, e) => new Cr(t, e);
3042
3042
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
3043
- function Cc(t) {
3043
+ function Oc(t) {
3044
3044
  return {
3045
3045
  hash: t,
3046
- hmac: (e, ...n) => Or(t, e, Bc(...n)),
3047
- randomBytes: Nc
3046
+ hmac: (e, ...n) => Or(t, e, _c(...n)),
3047
+ randomBytes: Cc
3048
3048
  };
3049
3049
  }
3050
3050
  const Pn = BigInt("3618502788666131213697322783095070105526743751716087489154079457884512865583"), kr = 252;
@@ -3055,9 +3055,9 @@ function Rn(t) {
3055
3055
  return e > 0 ? n >> BigInt(e) : n;
3056
3056
  }
3057
3057
  function Pr(t) {
3058
- return typeof t == "string" && (t = Pc(t), t.length & 1 && (t = "0" + t)), pt(t);
3058
+ return typeof t == "string" && (t = Rc(t), t.length & 1 && (t = "0" + t)), pt(t);
3059
3059
  }
3060
- const Rr = bc({
3060
+ const Rr = Sc({
3061
3061
  a: BigInt(1),
3062
3062
  b: BigInt("3141592653589793238462643383279502884197169399375105820974944592307816406665"),
3063
3063
  Fp: Ke(BigInt("0x800000000000011000000000000000000000000000000000000000000000001")),
@@ -3067,21 +3067,21 @@ const Rr = bc({
3067
3067
  Gy: BigInt("152666792071518830868575557812948353041420400780739481342941381225525861407"),
3068
3068
  h: BigInt(1),
3069
3069
  lowS: !1,
3070
- ...Cc(Ar),
3070
+ ...Oc(Ar),
3071
3071
  bits2int: Rn,
3072
3072
  bits2int_modN: (t) => {
3073
3073
  const e = X(t).toString(16);
3074
3074
  return e.length === 63 && (t = Pr(e + "0")), M(Rn(t), Pn);
3075
3075
  }
3076
3076
  });
3077
- function Oc(t) {
3077
+ function kc(t) {
3078
3078
  return V("", typeof t == "string" ? Pr(t) : t);
3079
3079
  }
3080
3080
  const { CURVE: Bu, ProjectivePoint: kt, Signature: _u, utils: Nu } = Rr;
3081
- function kc(t) {
3081
+ function Pc(t) {
3082
3082
  return `0x${ht(t.subarray(1)).replace(/^0+/gm, "")}`;
3083
3083
  }
3084
- function Pc(t) {
3084
+ function Rc(t) {
3085
3085
  return t.replace(/^0x/i, "");
3086
3086
  }
3087
3087
  const Dt = [
@@ -3101,8 +3101,8 @@ function $r(t, e) {
3101
3101
  n.push(r), r = r.double();
3102
3102
  return n;
3103
3103
  }
3104
- const Rc = $r(Dt[1], Dt[2]), $c = $r(Dt[3], Dt[4]);
3105
- function Fc(t) {
3104
+ const $c = $r(Dt[1], Dt[2]), Fc = $r(Dt[3], Dt[4]);
3105
+ function Uc(t) {
3106
3106
  let e;
3107
3107
  if (typeof t == "bigint")
3108
3108
  e = t;
@@ -3111,13 +3111,13 @@ function Fc(t) {
3111
3111
  throw new Error(`Invalid pedersenArg: ${t}`);
3112
3112
  e = BigInt(t);
3113
3113
  } else
3114
- e = X(Oc(t));
3114
+ e = X(kc(t));
3115
3115
  if (!(0n <= e && e < Rr.CURVE.Fp.ORDER))
3116
3116
  throw new Error(`PedersenArg should be 0 <= value < CURVE.P: ${e}`);
3117
3117
  return e;
3118
3118
  }
3119
3119
  function $n(t, e, n) {
3120
- let r = Fc(e);
3120
+ let r = Uc(e);
3121
3121
  for (let s = 0; s < 252; s++) {
3122
3122
  const o = n[s];
3123
3123
  if (o.equals(t))
@@ -3126,33 +3126,33 @@ function $n(t, e, n) {
3126
3126
  }
3127
3127
  return t;
3128
3128
  }
3129
- function Uc(t, e) {
3129
+ function jc(t, e) {
3130
3130
  let n = Dt[0];
3131
- return n = $n(n, t, Rc), n = $n(n, e, $c), kc(n.toRawBytes(!0));
3131
+ return n = $n(n, t, $c), n = $n(n, e, Fc), Pc(n.toRawBytes(!0));
3132
3132
  }
3133
- const jc = pe(250), Lc = (t) => X(Di(t)) & jc;
3133
+ const Lc = pe(250), Dc = (t) => X(Hi(t)) & Lc;
3134
3134
  Ke(BigInt("14474011154664525231415395255581126252639794253786371766033694892385558855681"));
3135
- const Dc = Ke(BigInt("3618502788666131213697322783095070105623107215331596699973092056135872020481"));
3136
- function Hc(t, e, n) {
3135
+ const Hc = Ke(BigInt("3618502788666131213697322783095070105623107215331596699973092056135872020481"));
3136
+ function Vc(t, e, n) {
3137
3137
  const r = t.fromBytes(Ar(gr(`${e}${n}`)));
3138
3138
  return t.create(r);
3139
3139
  }
3140
- const Vc = [
3140
+ const Mc = [
3141
3141
  [3, 1, 1],
3142
3142
  [1, -1, 1],
3143
3143
  [1, 1, -2]
3144
3144
  ].map((t) => t.map(BigInt));
3145
- function Mc(t, e) {
3145
+ function Gc(t, e) {
3146
3146
  if (qe(t.Fp), !Number.isSafeInteger(t.rate) || !Number.isSafeInteger(t.capacity))
3147
3147
  throw new Error(`Wrong poseidon opts: ${t}`);
3148
3148
  const n = t.rate + t.capacity, r = t.roundsFull + t.roundsPartial, s = [];
3149
3149
  for (let a = 0; a < r; a++) {
3150
3150
  const i = [];
3151
3151
  for (let c = 0; c < n; c++)
3152
- i.push(Hc(t.Fp, "Hades", n * a + c));
3152
+ i.push(Vc(t.Fp, "Hades", n * a + c));
3153
3153
  s.push(i);
3154
3154
  }
3155
- const o = dc({
3155
+ const o = fc({
3156
3156
  ...t,
3157
3157
  t: n,
3158
3158
  sboxPower: 3,
@@ -3162,12 +3162,12 @@ function Mc(t, e) {
3162
3162
  });
3163
3163
  return o.m = n, o.rate = t.rate, o.capacity = t.capacity, o;
3164
3164
  }
3165
- Mc({ Fp: Dc, rate: 2, capacity: 1, roundsFull: 8, roundsPartial: 83 }, Vc);
3165
+ Gc({ Fp: Hc, rate: 2, capacity: 1, roundsFull: 8, roundsPartial: 83 }, Mc);
3166
3166
  var Oe;
3167
3167
  (function(t) {
3168
3168
  t.NOT_STARTED = "NOT_STARTED", t.ONGOING = "ONGOING", t.AWAITING_FUNDS = "AWAITING_FUNDS", t.AWAITING_COMPLETION = "AWAITING_COMPLETION", t.COMPLETED = "COMPLETED", t.CANCELLED = "CANCELLED", t.ERROR = "ERROR";
3169
3169
  })(Oe || (Oe = {}));
3170
- const Gc = h.object({
3170
+ const zc = h.object({
3171
3171
  recoveryId: h.number()
3172
3172
  }), Cu = h.object({
3173
3173
  feeToken: se,
@@ -3179,14 +3179,14 @@ const Gc = h.object({
3179
3179
  s: Pt
3180
3180
  })
3181
3181
  })
3182
- }), zc = h.nativeEnum(Oe), Fr = h.object({
3182
+ }), qc = h.nativeEnum(Oe), Fr = h.object({
3183
3183
  recoveryId: h.number(),
3184
- status: zc,
3184
+ status: qc,
3185
3185
  completionTime: h.array(h.number()).optional()
3186
- }), qc = h.object({
3186
+ }), Wc = h.object({
3187
3187
  activeRecovery: Fr.optional().or(h.null()).optional(),
3188
3188
  minFees: h.record(h.number()).optional()
3189
- }), Wc = h.object({
3189
+ }), Kc = h.object({
3190
3190
  recovery: Fr.optional().or(h.null()).optional(),
3191
3191
  minFees: h.record(h.number()).optional()
3192
3192
  });
@@ -3194,8 +3194,8 @@ var ke;
3194
3194
  (function(t) {
3195
3195
  t.UNDEPLOYED_ACCOUNT = "undeployedAccount", t.NOT_ENOUGH_TO_PAY_FEES = "notEnoughToPayFees", t.RECOVERY_ALREADY_EXISTS = "recoveryAlreadyExists";
3196
3196
  })(ke || (ke = {}));
3197
- const Kc = h.nativeEnum(ke), Ou = h.object({
3198
- status: Kc
3197
+ const Zc = h.nativeEnum(ke), Ou = h.object({
3198
+ status: Zc
3199
3199
  });
3200
3200
  class ku {
3201
3201
  constructor(e, n) {
@@ -3209,7 +3209,7 @@ class ku {
3209
3209
  * @returns A promise that resolves to the on-chain recovery details.
3210
3210
  */
3211
3211
  async getRecovery(e, n) {
3212
- const r = k(this.apiBase, "accounts", "starknet", e, "recovery", `${n}`), s = await this.httpService.get(r), o = Wc.safeParse(s);
3212
+ const r = k(this.apiBase, "accounts", "starknet", e, "recovery", `${n}`), s = await this.httpService.get(r), o = Kc.safeParse(s);
3213
3213
  return o.error ? null : o.data;
3214
3214
  }
3215
3215
  /**
@@ -3219,7 +3219,7 @@ class ku {
3219
3219
  * @returns A promise that resolves to the on-chain recovery details.
3220
3220
  */
3221
3221
  async getActiveRecovery(e) {
3222
- const n = k(this.apiBase, "accounts", "starknet", e, "recovery"), r = await this.httpService.get(n), s = qc.safeParse(r);
3222
+ const n = k(this.apiBase, "accounts", "starknet", e, "recovery"), r = await this.httpService.get(n), s = Wc.safeParse(r);
3223
3223
  return s.error ? null : s.data;
3224
3224
  }
3225
3225
  /**
@@ -3231,7 +3231,7 @@ class ku {
3231
3231
  * @returns A promise that resolves to the recovery details.
3232
3232
  */
3233
3233
  async startRecovery(e, n, r, s) {
3234
- const { r: o, s: a } = us.starkCurve.sign(Uc(Lc(ys("utf8", "starknet:recovery")), r), s), i = {
3234
+ const { r: o, s: a } = us.starkCurve.sign(jc(Dc(ys("utf8", "starknet:recovery")), r), s), i = {
3235
3235
  feeToken: n,
3236
3236
  signerSignature: {
3237
3237
  type: "StarknetKey",
@@ -3244,7 +3244,7 @@ class ku {
3244
3244
  };
3245
3245
  return await this.httpService.post(`${this.apiBase}/accounts/starknet/${e}/recovery`, {
3246
3246
  body: JSON.stringify(i)
3247
- }, Gc);
3247
+ }, zc);
3248
3248
  }
3249
3249
  /**
3250
3250
  * Completes the recovery process for a given address and recovery ID.
@@ -3267,11 +3267,11 @@ async function Pu() {
3267
3267
  return !1;
3268
3268
  }
3269
3269
  let Te;
3270
- function Zc() {
3270
+ function Yc() {
3271
3271
  return Te || (Te = new bs(navigator.userAgent).getResult()), Te;
3272
3272
  }
3273
3273
  function me(t) {
3274
- return Zc().browser.name === t;
3274
+ return Yc().browser.name === t;
3275
3275
  }
3276
3276
  function Ru() {
3277
3277
  return me("Firefox");
@@ -3462,7 +3462,7 @@ const ju = h.string().refine((t) => Ss(t, Es), "Invalid seedphrase"), Ze = [
3462
3462
  networkId: "mainnet-alpha",
3463
3463
  image: "https://dv3jj1unlp2jl.cloudfront.net/128/color/ekubo.png"
3464
3464
  }
3465
- ], Yc = async (t, e, n) => {
3465
+ ], Xc = async (t, e, n) => {
3466
3466
  const r = await n.callContract({
3467
3467
  contractAddress: t,
3468
3468
  entrypoint: "balanceOf",
@@ -3503,31 +3503,31 @@ const ju = h.string().refine((t) => Ss(t, Es), "Invalid seedphrase"), Ze = [
3503
3503
  return;
3504
3504
  const n = Number(e);
3505
3505
  return xt(t.toString(), n).value.toString();
3506
- }, Gu = (t) => Y(t) ? Number(t) : 18, { UINT_256_MAX: Xc } = Ht, Jc = (t) => String(t) === String(Xc), zu = (t, e = "$", n) => {
3506
+ }, Gu = (t) => Y(t) ? Number(t) : 18, { UINT_256_MAX: Jc } = Ht, Qc = (t) => String(t) === String(Jc), zu = (t, e = "$", n) => {
3507
3507
  if (t === void 0 || !Y(t))
3508
3508
  return null;
3509
3509
  const r = gi(t, n);
3510
3510
  return [e, r].filter(Boolean).join("");
3511
- }, Qc = "Unlimited", qu = ({ amount: t, decimals: e, symbol: n, showPlusSign: r = !1, withSymbol: s = !0, unlimitedText: o = Qc, prettyConfigOverrides: a }) => {
3511
+ }, tl = "Unlimited", qu = ({ amount: t, decimals: e, symbol: n, showPlusSign: r = !1, withSymbol: s = !0, unlimitedText: o = tl, prettyConfigOverrides: a }) => {
3512
3512
  if (!Y(t))
3513
3513
  return null;
3514
3514
  let i, c = !1;
3515
- if (Jc(t))
3515
+ if (Qc(t))
3516
3516
  i = o;
3517
3517
  else {
3518
3518
  const d = Number(e), u = BigInt(t);
3519
3519
  c = u > 0n;
3520
- const w = d > 0 ? Mt({ value: u, decimals: d }) : u.toString();
3521
- i = d > 0 ? wi(w, a) : w;
3520
+ const y = d > 0 ? Mt({ value: u, decimals: d }) : u.toString();
3521
+ i = d > 0 ? wi(y, a) : y;
3522
3522
  }
3523
3523
  const l = [i, s && n].filter(Boolean).join(" ");
3524
3524
  return r && c ? `+${l}` : l;
3525
3525
  };
3526
- var tl = Jr, el = tl;
3527
- function nl(t, e) {
3526
+ var el = Jr, nl = el;
3527
+ function rl(t, e) {
3528
3528
  function n(r, s) {
3529
3529
  var o = e || {}, a;
3530
- "randomize" in o || (o.randomize = !0), a = el.operation(o);
3530
+ "randomize" in o || (o.randomize = !0), a = nl.operation(o);
3531
3531
  function i(d) {
3532
3532
  s(d || new Error("Aborted"));
3533
3533
  }
@@ -3542,8 +3542,8 @@ function nl(t, e) {
3542
3542
  var u;
3543
3543
  try {
3544
3544
  u = t(i, d);
3545
- } catch (w) {
3546
- c(w, d);
3545
+ } catch (y) {
3546
+ c(y, d);
3547
3547
  return;
3548
3548
  }
3549
3549
  Promise.resolve(u).then(r).catch(function(m) {
@@ -3554,8 +3554,8 @@ function nl(t, e) {
3554
3554
  }
3555
3555
  return new Promise(n);
3556
3556
  }
3557
- var rl = nl;
3558
- const sl = /* @__PURE__ */ Qr(rl);
3557
+ var sl = rl;
3558
+ const ol = /* @__PURE__ */ Qr(sl);
3559
3559
  class Wu {
3560
3560
  constructor(e, n) {
3561
3561
  this.apiBase = e, this.httpService = n, this.TOKENS_INFO_URL = "/tokens/info", this.TOKENS_DEFI_DECOMPOSITION_URL = "/tokens/defi/decomposition";
@@ -3580,7 +3580,7 @@ class Wu {
3580
3580
  */
3581
3581
  async fetchAddressTokenBalancesFromBackend(e, n, r) {
3582
3582
  const s = k(this.apiBase, "activity", "starknet", n, "account", e, "balance");
3583
- return (await sl(
3583
+ return (await ol(
3584
3584
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
3585
3585
  async (i) => {
3586
3586
  let c;
@@ -3645,7 +3645,7 @@ const Ku = (t, e, n, r) => ({
3645
3645
  function Ur(t) {
3646
3646
  return $e(t.unit) === "WEI";
3647
3647
  }
3648
- function ol(t) {
3648
+ function al(t) {
3649
3649
  return $e(t.unit) === "FRI";
3650
3650
  }
3651
3651
  function At(t, e) {
@@ -3673,13 +3673,13 @@ function Rt(t) {
3673
3673
  };
3674
3674
  }
3675
3675
  function Be(t) {
3676
- return ol({ unit: t }) ? Re : Vn;
3676
+ return al({ unit: t }) ? Re : Vn;
3677
3677
  }
3678
3678
  function Xu(t, e, n = 2) {
3679
3679
  const r = BigInt(10 ** n), s = BigInt(Math.round(e * 10 ** n));
3680
3680
  return t * s / r;
3681
3681
  }
3682
- const Ju = [Re], jr = (t, e = ul) => {
3682
+ const Ju = [Re], jr = (t, e = dl) => {
3683
3683
  if (t.max && "amount" in t.max)
3684
3684
  return {
3685
3685
  ...t,
@@ -3699,11 +3699,11 @@ const Ju = [Re], jr = (t, e = ul) => {
3699
3699
  }, re = (t) => {
3700
3700
  const { amount: e, pricePerUnit: n, dataGasConsumed: r = 0n, dataGasPrice: s = 0n } = t;
3701
3701
  return e * n + r * s;
3702
- }, al = (t) => {
3702
+ }, il = (t) => {
3703
3703
  if (t.max)
3704
3704
  return "maxFee" in t.max ? t.max.maxFee : re(t.max);
3705
3705
  }, Pe = (t) => {
3706
- const e = al(t);
3706
+ const e = il(t);
3707
3707
  return e || re(jr(t));
3708
3708
  }, Qu = (t) => {
3709
3709
  if (t.deployment && !nt(t.deployment.feeTokenAddress, t.transactions.feeTokenAddress))
@@ -3726,7 +3726,7 @@ const Ju = [Re], jr = (t, e = ul) => {
3726
3726
  amount: Ht.bnToUint256(BigInt(1))
3727
3727
  }))
3728
3728
  }
3729
- ], il = (t, e) => {
3729
+ ], cl = (t, e) => {
3730
3730
  if (!t)
3731
3731
  return {
3732
3732
  transactions: {
@@ -3774,7 +3774,7 @@ const Ju = [Re], jr = (t, e = ul) => {
3774
3774
  };
3775
3775
  }
3776
3776
  throw Error("Unexpected simulation response length");
3777
- }, cl = ({ transaction: t, nonce: e, chainId: n, version: r, isDeploymentTransaction: s, cairoVersion: o, address: a, appDomain: i }) => {
3777
+ }, ll = ({ transaction: t, nonce: e, chainId: n, version: r, isDeploymentTransaction: s, cairoVersion: o, address: a, appDomain: i }) => {
3778
3778
  let c = e;
3779
3779
  s && t.type !== "DEPLOY_ACCOUNT" && (c = O.toHex(1));
3780
3780
  const l = oe(t.calls);
@@ -3793,7 +3793,7 @@ const Ju = [Re], jr = (t, e = ul) => {
3793
3793
  appDomain: i
3794
3794
  // appDomain: "https://starknetkit-blacked-listed.vercel.app", // to simulate blacklisted domain
3795
3795
  };
3796
- }, ll = (t, e) => {
3796
+ }, ul = (t, e) => {
3797
3797
  const { transactions: n } = t, r = n.map((c) => {
3798
3798
  if (!c.simulation)
3799
3799
  throw new as({ code: "SIMULATE_AND_REVIEW_FAILED" });
@@ -3801,7 +3801,7 @@ const Ju = [Re], jr = (t, e = ul) => {
3801
3801
  }), s = r.map((c) => ({
3802
3802
  ...c.simulation,
3803
3803
  feeEstimation: At(c.simulation.feeEstimation, Number)
3804
- })), o = il(s, e), [a, i] = r.length === 1 ? [r[0], void 0] : [r[1], r[0]];
3804
+ })), o = cl(s, e), [a, i] = r.length === 1 ? [r[0], void 0] : [r[1], r[0]];
3805
3805
  return {
3806
3806
  ...o,
3807
3807
  transactions: {
@@ -3839,12 +3839,12 @@ const Ju = [Re], jr = (t, e = ul) => {
3839
3839
  }, rd = (t) => {
3840
3840
  const e = Math.sqrt(t);
3841
3841
  return isNaN(e) ? Math.sqrt(2) : e;
3842
- }, ul = (t) => {
3842
+ }, dl = (t) => {
3843
3843
  const e = Math.cbrt(t);
3844
3844
  return isNaN(e) ? Math.cbrt(2) : e;
3845
- }, sd = (t) => t < 1 || isNaN(t) ? 1.1 : Math.log(t + 1) + 1, dl = [Re];
3845
+ }, sd = (t) => t < 1 || isNaN(t) ? 1.1 : Math.log(t + 1) + 1, fl = [Re];
3846
3846
  function Ye({ address: t }) {
3847
- return dl.some((e) => nt(t, e));
3847
+ return fl.some((e) => nt(t, e));
3848
3848
  }
3849
3849
  function od(t) {
3850
3850
  return t ? Aa().some((e) => nt(e, t)) : !1;
@@ -3880,44 +3880,44 @@ class cd {
3880
3880
  const e = k(this.apiBase, "reviewer", "warnings/reasons");
3881
3881
  return await this.httpService.get(e);
3882
3882
  }
3883
- async simulateAndReview(e, n, r, s, o) {
3884
- const a = n.some((i) => i.type === "DEPLOY_ACCOUNT");
3883
+ async simulateAndReview(e, n, r, s, o, a) {
3884
+ const i = n.some((c) => c.type === "DEPLOY_ACCOUNT");
3885
3885
  try {
3886
3886
  if (!("getChainId" in e))
3887
3887
  throw new Error("MISSING_METHOD");
3888
- const i = Fn(r), c = a ? "0x0" : await e.getNonce(), l = await e.getChainId(), d = {
3889
- transactions: n.map((f) => ({
3890
- ...cl({
3891
- transaction: f,
3892
- nonce: c,
3893
- version: i,
3894
- chainId: l,
3895
- isDeploymentTransaction: a,
3888
+ const c = Fn(r), l = i ? "0x0" : await e.getNonce(), d = await e.getChainId(), u = {
3889
+ transactions: n.map((w) => ({
3890
+ ...ll({
3891
+ transaction: w,
3892
+ nonce: l,
3893
+ version: c,
3894
+ chainId: d,
3895
+ isDeploymentTransaction: i,
3896
3896
  appDomain: s,
3897
3897
  cairoVersion: e.cairoVersion,
3898
3898
  address: e.address
3899
3899
  }),
3900
- type: f.type
3900
+ type: w.type
3901
3901
  }))
3902
- }, u = k(this.apiBase, "reviewer", "transactions", "v2", "review", "starknet"), w = await this.httpService.post(u, {
3902
+ }, y = k(this.apiBase, "reviewer", "transactions", "v2", "review", "starknet"), m = a ? bi(y, { delayedTransaction: "true" }) : y, S = await this.httpService.post(m, {
3903
3903
  headers: {
3904
3904
  Accept: "application/json",
3905
3905
  "Content-Type": "application/json"
3906
3906
  },
3907
- body: JSON.stringify(d)
3907
+ body: JSON.stringify(u)
3908
3908
  }, cs);
3909
- if (w.transactions.some((f) => ls(f)))
3910
- return w;
3911
- const S = ll(w, r);
3909
+ if (S.transactions.some((w) => ls(w)))
3910
+ return S;
3911
+ const g = ul(S, r);
3912
3912
  return {
3913
- ...w,
3914
- enrichedFeeEstimation: S
3913
+ ...S,
3914
+ enrichedFeeEstimation: g
3915
3915
  };
3916
- } catch (i) {
3917
- return console.error(i), this.fallbackToOnchainFeeEstimation({
3916
+ } catch (c) {
3917
+ return console.error(c), this.fallbackToOnchainFeeEstimation({
3918
3918
  transactions: n,
3919
3919
  account: e,
3920
- isDeploymentTransaction: a,
3920
+ isDeploymentTransaction: i,
3921
3921
  feeTokenAddress: r,
3922
3922
  accountDeployTransaction: o
3923
3923
  });
@@ -4040,7 +4040,7 @@ const ld = [
4040
4040
  ], ud = (t) => ({ showBalanceChange: vt(() => {
4041
4041
  const n = t == null ? void 0 : t.some((s) => !un(s.transfers)), r = t == null ? void 0 : t.some((s) => !un(s.approvals));
4042
4042
  return t && (n || r);
4043
- }, [t]) }), ge = (t) => t ? t.filter((e) => e.token.type === "erc20") : [], dd = (t) => vt(() => ge(t), [t]), fd = (t) => ge(t).length > 0, hd = (t) => ge(t).some((n) => n.amount > 0n), pd = (t) => ge(t).some((n) => n.amount < 0n), Lr = (t) => t ? t.filter((e) => e.token.type === "erc721") : [], md = (t) => vt(() => Lr(t), [t]), fl = (t) => Lr(t).length > 0, gd = (t) => vt(() => fl(t), [t]), wd = (t, e) => vt(() => t && e ? [
4043
+ }, [t]) }), ge = (t) => t ? t.filter((e) => e.token.type === "erc20") : [], dd = (t) => vt(() => ge(t), [t]), fd = (t) => ge(t).length > 0, hd = (t) => ge(t).some((n) => n.amount > 0n), pd = (t) => ge(t).some((n) => n.amount < 0n), Lr = (t) => t ? t.filter((e) => e.token.type === "erc721") : [], md = (t) => vt(() => Lr(t), [t]), hl = (t) => Lr(t).length > 0, gd = (t) => vt(() => hl(t), [t]), wd = (t, e) => vt(() => t && e ? [
4044
4044
  {
4045
4045
  contractAddress: t.address,
4046
4046
  entrypoint: "transfer",
@@ -4078,7 +4078,7 @@ const ld = [
4078
4078
  warn: e,
4079
4079
  reason: r
4080
4080
  };
4081
- }, hl = (t) => {
4081
+ }, pl = (t) => {
4082
4082
  var e;
4083
4083
  if (t) {
4084
4084
  for (const n of t.reviews)
@@ -4093,7 +4093,7 @@ const ld = [
4093
4093
  if (((n = r.activity) == null ? void 0 : n.type) === t)
4094
4094
  return r.activity;
4095
4095
  }
4096
- }, Ad = (t) => !!hl(t), xd = (t) => {
4096
+ }, Ad = (t) => !!pl(t), xd = (t) => {
4097
4097
  var e, n;
4098
4098
  if (t) {
4099
4099
  for (const r of t.reviews)
@@ -4103,48 +4103,49 @@ const ld = [
4103
4103
  type: (n = r.activity) == null ? void 0 : n.type
4104
4104
  };
4105
4105
  }
4106
- }, pl = async ({ feeTokenAddress: t, calls: e, selectedAccount: n, transactionReviewService: r, appDomain: s, accountDeployTransaction: o }) => {
4107
- const a = {
4106
+ }, ml = async ({ feeTokenAddress: t, calls: e, selectedAccount: n, transactionReviewService: r, appDomain: s, accountDeployTransaction: o, isDelayedTransaction: a }) => {
4107
+ const i = {
4108
4108
  type: "INVOKE",
4109
4109
  calls: oe(e)
4110
4110
  };
4111
4111
  if (!n || !t)
4112
4112
  return;
4113
- const i = o ? [o, a] : [a];
4114
- return { result: await r.simulateAndReview(n, i, t, s, o) };
4115
- }, ml = async (t, e, n, r) => {
4116
- var w, m, S, f, g, b;
4113
+ const c = o ? [o, i] : [i];
4114
+ return { result: await r.simulateAndReview(n, c, t, s, o, a) };
4115
+ }, gl = async (t, e, n, r) => {
4116
+ var y, m, S, f, g, w;
4117
4117
  let s = !1;
4118
4118
  const o = e.transactions.find((E) => {
4119
4119
  var x, _;
4120
4120
  return (_ = (x = E == null ? void 0 : E.simulation) == null ? void 0 : x.summary) == null ? void 0 : _.find((B) => B.sent);
4121
4121
  });
4122
- if (!o || !((w = o.simulation) != null && w.summary))
4122
+ if (!o || !((y = o.simulation) != null && y.summary))
4123
4123
  return s;
4124
4124
  const a = o.simulation.summary.filter((E) => E.sent).map((E) => E.token.address);
4125
4125
  if (!(((m = e.enrichedFeeEstimation) == null ? void 0 : m.transactions.feeTokenAddress) && a.includes((S = e.enrichedFeeEstimation) == null ? void 0 : S.transactions.feeTokenAddress)) || !((g = (f = e.enrichedFeeEstimation) == null ? void 0 : f.transactions) != null && g.max))
4126
4126
  return s;
4127
- const c = "amount" in e.enrichedFeeEstimation.transactions.max ? e.enrichedFeeEstimation.transactions.max.amount * e.enrichedFeeEstimation.transactions.max.pricePerUnit : "maxFee" in e.enrichedFeeEstimation.transactions.max ? e.enrichedFeeEstimation.transactions.max.maxFee : void 0, l = (b = o.simulation.summary.find((E) => E.sent && E.token.address === n)) == null ? void 0 : b.value;
4127
+ const c = "amount" in e.enrichedFeeEstimation.transactions.max ? e.enrichedFeeEstimation.transactions.max.amount * e.enrichedFeeEstimation.transactions.max.pricePerUnit : "maxFee" in e.enrichedFeeEstimation.transactions.max ? e.enrichedFeeEstimation.transactions.max.maxFee : void 0, l = (w = o.simulation.summary.find((E) => E.sent && E.token.address === n)) == null ? void 0 : w.value;
4128
4128
  if (!c || !l)
4129
4129
  return s;
4130
- const d = await Yc(n, t, r) ?? 0n;
4130
+ const d = await Xc(n, t, r) ?? 0n;
4131
4131
  return BigInt(d) > c + BigInt(l) || (s = !0), s;
4132
- }, vd = () => qn(async ({ feeTokenAddress: e, calls: n, selectedAccount: r, transactionReviewService: s, appDomain: o, accountDeployPayload: a, provider: i }) => {
4132
+ }, vd = () => qn(async ({ feeTokenAddress: e, calls: n, selectedAccount: r, transactionReviewService: s, appDomain: o, accountDeployPayload: a, provider: i, isDelayedTransaction: c }) => {
4133
4133
  if (!r)
4134
4134
  return;
4135
- const c = await pl({
4135
+ const l = await ml({
4136
4136
  feeTokenAddress: e,
4137
4137
  calls: n,
4138
4138
  selectedAccount: r,
4139
4139
  transactionReviewService: s,
4140
4140
  appDomain: o,
4141
- accountDeployTransaction: gl(a)
4141
+ accountDeployTransaction: wl(a),
4142
+ isDelayedTransaction: c
4142
4143
  });
4143
- if (!c || !c.result || !e)
4144
+ if (!l || !l.result || !e)
4144
4145
  return;
4145
- const l = await ml(r.address, c.result, e, i);
4146
- return { ...c.result, isSendingMoreThanBalanceAndGas: l };
4147
- }, []), gl = (t) => t ? {
4146
+ const d = await gl(r.address, l.result, e, i);
4147
+ return { ...l.result, isSendingMoreThanBalanceAndGas: d };
4148
+ }, []), wl = (t) => t ? {
4148
4149
  type: "DEPLOY_ACCOUNT",
4149
4150
  calldata: t.calldata,
4150
4151
  classHash: Pt.parse(t.class_hash),
@@ -4169,24 +4170,24 @@ function Id(t) {
4169
4170
  }
4170
4171
  };
4171
4172
  }
4172
- const wl = fs({}), Td = ({ enabled: t, initialize: e, children: n }) => {
4173
+ const yl = fs({}), Td = ({ enabled: t, initialize: e, children: n }) => {
4173
4174
  const [r, s] = zn(!1);
4174
4175
  return Ft(() => {
4175
4176
  !r && t && e().then(() => s(!0));
4176
- }, [r, t, e]), /* @__PURE__ */ xs(wl.Provider, { value: {}, children: n });
4177
+ }, [r, t, e]), /* @__PURE__ */ xs(yl.Provider, { value: {}, children: n });
4177
4178
  };
4178
4179
  export {
4179
4180
  tt as ARGENT_ACCOUNT_CONTRACT_CLASS_HASHES,
4180
4181
  Jt as ARGENT_MULTISIG_CONTRACT_CLASS_HASHES,
4181
- Cl as AddSmartAccountResponseSchema,
4182
- Ol as AddSmartAcountRequestSchema,
4182
+ Ol as AddSmartAccountResponseSchema,
4183
+ kl as AddSmartAcountRequestSchema,
4183
4184
  vs as BackendAccountSchema,
4184
4185
  bu as BackendNftService,
4185
4186
  Nd as BaseError,
4186
4187
  eo as C0_PROXY_CONTRACT_CLASS_HASHES,
4187
- Ll as CacheService,
4188
+ Dl as CacheService,
4188
4189
  Vt as DEFAULT_TOKEN_DECIMALS,
4189
- Dl as DateService,
4190
+ Hl as DateService,
4190
4191
  Cd as ESTIMATE_ERROR_MESSAGES,
4191
4192
  Vn as ETH_TOKEN_ADDRESS,
4192
4193
  as as EstimateError,
@@ -4196,16 +4197,16 @@ export {
4196
4197
  Le as HTTPService,
4197
4198
  tn as HTTP_ERROR_MESSAGE,
4198
4199
  K as HttpError,
4199
- eu as KnownDappsBackendService,
4200
+ nu as KnownDappsBackendService,
4200
4201
  rn as MultiSigner,
4201
4202
  ku as OnchainRecoveryService,
4202
- Qc as PRETTY_UNLIMITED,
4203
+ tl as PRETTY_UNLIMITED,
4203
4204
  Oe as RecoveryStatusEnum,
4204
- ru as ResolveNameService,
4205
+ su as ResolveNameService,
4205
4206
  Kr as STANDARD_DEVNET_ACCOUNT_CLASS_HASH,
4206
4207
  Re as STRK_TOKEN_ADDRESS,
4207
- Hl as SWRService,
4208
- Wl as StarknetAddressService,
4208
+ Vl as SWRService,
4209
+ Kl as StarknetAddressService,
4209
4210
  ke as StartOnchainRecoveryErrorStatusEnum,
4210
4211
  Rd as TOKEN_ERROR_MESSAGES,
4211
4212
  $d as TXV1_ACCOUNT_CLASS_HASH,
@@ -4219,7 +4220,7 @@ export {
4219
4220
  Id as WebAnalyticsServiceFactory,
4220
4221
  Ld as abiEntrySchema,
4221
4222
  Dd as abiSchema,
4222
- qc as activeOnchainRecoverySchema,
4223
+ Wc as activeOnchainRecoverySchema,
4223
4224
  Hd as addOwnersCalldataSchema,
4224
4225
  Vd as addPluginCalldataSchema,
4225
4226
  Md as addressInputCharactersAndLengthSchema,
@@ -4256,11 +4257,11 @@ export {
4256
4257
  is as argentMaxFee,
4257
4258
  hf as argentNameSchema,
4258
4259
  Ts as argentNetworkIdSchema,
4259
- jl as bigDecimal,
4260
+ Ll as bigDecimal,
4260
4261
  pf as bigNumberSchema,
4261
4262
  mf as bigNumberishSchema,
4262
4263
  gf as booleanToStringSchema,
4263
- gl as buildAccountDeployTransaction,
4264
+ wl as buildAccountDeployTransaction,
4264
4265
  Ia as buildConstructorCalldata,
4265
4266
  ed as buildDummyTx,
4266
4267
  wf as builtinsSchema,
@@ -4268,7 +4269,7 @@ export {
4268
4269
  bf as cairo1EventSchema,
4269
4270
  Sf as cairoAssemblySchema,
4270
4271
  Ef as cairoVersionSchema,
4271
- ul as calculateCubeRootAdjustment,
4272
+ dl as calculateCubeRootAdjustment,
4272
4273
  sd as calculateNonLinearAdjustment,
4273
4274
  rd as calculateSqrtAdjustment,
4274
4275
  Af as callDetailsSchema,
@@ -4277,7 +4278,7 @@ export {
4277
4278
  At as castFeeEstimation,
4278
4279
  vf as changeGuardianCalldataSchema,
4279
4280
  If as changeThresholdCalldataSchema,
4280
- ml as checkGasFeeBalance,
4281
+ gl as checkGasFeeBalance,
4281
4282
  od as classHashSupportsTxV3,
4282
4283
  Tf as collateralizedDebtGroupSchema,
4283
4284
  Bf as collateralizedDebtPositionSchema,
@@ -4295,9 +4296,9 @@ export {
4295
4296
  Mu as convertTokenUnitAmountWithDecimals,
4296
4297
  _a as dappContractSchema,
4297
4298
  Ba as dappLinkSchema,
4298
- cu as daysBetween,
4299
+ lu as daysBetween,
4299
4300
  mi as decodeBase58,
4300
- iu as decodeBase58Array,
4301
+ cu as decodeBase58Array,
4301
4302
  Ff as defiDappsProductsSchema,
4302
4303
  Uf as defiPositionSchema,
4303
4304
  jf as defiPositionTypeSchema,
@@ -4305,10 +4306,10 @@ export {
4305
4306
  Df as defiProductsSchema,
4306
4307
  Hf as denyTxV3,
4307
4308
  pi as encodeBase58,
4308
- au as encodeBase58Array,
4309
+ iu as encodeBase58Array,
4309
4310
  oe as ensureArray,
4310
4311
  Gu as ensureDecimals,
4311
- gu as entryPointToHumanReadable,
4312
+ wu as entryPointToHumanReadable,
4312
4313
  Vf as entryPointsByTypeSchema,
4313
4314
  vu as equalNft,
4314
4315
  Ku as erc20TransferTransaction,
@@ -4327,7 +4328,7 @@ export {
4327
4328
  Wf as feltSchema,
4328
4329
  tr as fetchData,
4329
4330
  Xt as fetcherError,
4330
- Jl as findImplementationForAccount,
4331
+ Ql as findImplementationForAccount,
4331
4332
  Kf as findTransfersAndApprovals,
4332
4333
  or as formatAddress,
4333
4334
  Zf as formatFullAddress,
@@ -4339,54 +4340,54 @@ export {
4339
4340
  ee as generateAvatarImage,
4340
4341
  Ta as getAccountContractAddress,
4341
4342
  va as getAccountDeploymentPayload,
4342
- Gl as getAccountIdentifier,
4343
+ zl as getAccountIdentifier,
4343
4344
  qr as getAddressFromArgentName,
4344
4345
  to as getAddressFromStarkName,
4345
4346
  hn as getArgentAccountClassHashes,
4346
4347
  Aa as getArgentAccountClassHashesWithTxV3Support,
4347
4348
  Ea as getArgentAccountWithMultiSignerClassHashes,
4348
- ql as getBackendTimeNowSeconds,
4349
+ Wl as getBackendTimeNowSeconds,
4349
4350
  Zs as getBackendTimeSeconds,
4350
4351
  Qs as getCallFromStarkName,
4351
4352
  Ys as getChainIdFromNetworkId,
4352
4353
  fi as getColor,
4353
4354
  Oa as getDapplandLinkForDapp,
4354
- nu as getDapplandUrlForDapp,
4355
+ ru as getDapplandUrlForDapp,
4355
4356
  bd as getDisplayWarnAndReasonForTransactionReview,
4356
4357
  ge as getERC20Transactions,
4357
4358
  Lr as getERC721Transactions,
4358
- il as getEstimatedFeeFromBulkSimulation,
4359
- ll as getEstimatedFeeFromSimulationAndRespectWatermarkFee,
4359
+ cl as getEstimatedFeeFromBulkSimulation,
4360
+ ul as getEstimatedFeeFromSimulationAndRespectWatermarkFee,
4360
4361
  ui as getInitials,
4361
- Zl as getLastCairo0ArgentAccountClassHash,
4362
+ Yl as getLastCairo0ArgentAccountClassHash,
4362
4363
  Sa as getLatestArgentAccountClassHash,
4363
- Kl as getLatestArgentMultisigClassHash,
4364
- Xl as getLatestLedgerAccountClassHash,
4365
- Yl as getLedgerAccountClassHashes,
4364
+ Zl as getLatestArgentMultisigClassHash,
4365
+ Jl as getLatestLedgerAccountClassHash,
4366
+ Xl as getLedgerAccountClassHashes,
4366
4367
  eh as getMessageFromTrpcError,
4367
4368
  Sd as getNFTTransferActivity,
4368
- ou as getNetworkAccountImageUrl,
4369
+ au as getNetworkAccountImageUrl,
4369
4370
  xu as getNftPicture,
4370
- cl as getPayloadFromTransaction,
4371
+ ll as getPayloadFromTransaction,
4371
4372
  nh as getPrettyRpcError,
4372
- pl as getReviewForTransactions,
4373
+ ml as getReviewForTransactions,
4373
4374
  nn as getSignerForMultiSigner,
4374
4375
  ad as getSimulationTxVersionFromFeeToken,
4375
4376
  Js as getStarknetIdContractAddressFromNetworkId,
4376
- Yc as getTokenBalance,
4377
+ Xc as getTokenBalance,
4377
4378
  Du as getTokens,
4378
4379
  Lu as getTokensBalances,
4379
4380
  Ed as getTransactionReviewActivityOfType,
4380
4381
  Ad as getTransactionReviewHasSwap,
4381
- hl as getTransactionReviewSwap,
4382
+ pl as getTransactionReviewSwap,
4382
4383
  xd as getTransactionReviewWithType,
4383
4384
  Fn as getTxVersionFromFeeToken,
4384
4385
  id as getTxVersionFromFeeTokenForDeclareContract,
4385
- Zc as getUAParserResult,
4386
+ Yc as getUAParserResult,
4386
4387
  jt as getUint256CalldataFromBN,
4387
- al as getWatermarkedMaxFeeTotal,
4388
+ il as getWatermarkedMaxFeeTotal,
4388
4389
  fd as hasERC20Transactions,
4389
- fl as hasERC721Transactions,
4390
+ hl as hasERC721Transactions,
4390
4391
  hd as hasIncomingERC20Transactions,
4391
4392
  pd as hasOutgoingERC20Transactions,
4392
4393
  Pt as hexSchema,
@@ -4395,33 +4396,33 @@ export {
4395
4396
  en as implementationSchema,
4396
4397
  sh as includesAddress,
4397
4398
  oh as inputAmountSchema,
4398
- Rl as isAccountV4,
4399
- Pl as isAccountV5,
4400
- kl as isAccountV6,
4399
+ $l as isAccountV4,
4400
+ Rl as isAccountV5,
4401
+ Pl as isAccountV6,
4401
4402
  Mr as isAddress,
4402
- fu as isAllowedAddressHexInputValue,
4403
- hu as isAllowedNumericInputValue,
4404
- Ul as isArgentBackendNetworkId,
4403
+ hu as isAllowedAddressHexInputValue,
4404
+ pu as isAllowedNumericInputValue,
4405
+ jl as isArgentBackendNetworkId,
4405
4406
  zr as isArgentName,
4406
- Fl as isArgentNetworkId,
4407
+ Ul as isArgentNetworkId,
4407
4408
  Pu as isBraveBrowser,
4408
4409
  me as isBrowser,
4409
4410
  $u as isChromeBrowser,
4410
- uu as isContractDeployed,
4411
+ du as isContractDeployed,
4411
4412
  Uu as isEdgeBrowser,
4412
4413
  nt as isEqualAddress,
4413
4414
  ah as isEqualArgentName,
4414
4415
  xa as isEqualImplementation,
4415
4416
  ih as isEqualStarknetDomainName,
4416
4417
  ch as isEqualStarknetId,
4417
- ol as isFRI,
4418
- lu as isFeatureEnabled,
4418
+ al as isFRI,
4419
+ uu as isFeatureEnabled,
4419
4420
  Ru as isFirefoxBrowser,
4420
4421
  Y as isNumeric,
4421
4422
  Fu as isSafariBrowser,
4422
4423
  lh as isStarknetDomainName,
4423
4424
  Gr as isStarknetId,
4424
- Jc as isUnlimitedAmount,
4425
+ Qc as isUnlimitedAmount,
4425
4426
  Vr as isValidAddress,
4426
4427
  uh as isValidInputAmount,
4427
4428
  Ur as isWEI,
@@ -4439,17 +4440,17 @@ export {
4439
4440
  Fa as nameResolutionAddressesSchema,
4440
4441
  sr as nameResolutionStarknetIdSchema,
4441
4442
  ka as nameResolutionStarknetIdsSchema,
4442
- du as nonNullable,
4443
+ fu as nonNullable,
4443
4444
  Dn as normalizeAddress,
4444
4445
  gh as normalizeAddressOrDomain,
4445
4446
  wh as normalizeArgentName,
4446
4447
  yh as normalizeStarknetId,
4447
- Wc as onchainRecoverySchema,
4448
+ Kc as onchainRecoverySchema,
4448
4449
  bh as parseAmount,
4449
4450
  yi as parseAmountValue,
4450
- pu as pluralise,
4451
- Vl as postData,
4452
- $l as preferencesEndpointPayload,
4451
+ mu as pluralise,
4452
+ Ml as postData,
4453
+ Fl as preferencesEndpointPayload,
4453
4454
  Is as preferencesSchema,
4454
4455
  gi as prettifyCurrencyNumber,
4455
4456
  zu as prettifyCurrencyValue,
@@ -4464,10 +4465,10 @@ export {
4464
4465
  xh as rawArgsArraySchema,
4465
4466
  vh as rawArgsObjectSchema,
4466
4467
  Ih as rawArgsSchema,
4467
- mu as readFileAsString,
4468
+ gu as readFileAsString,
4468
4469
  Fr as recoveryBaseSchema,
4469
4470
  Cu as recoveryBodySchema,
4470
- zc as recoveryStatusSchema,
4471
+ qc as recoveryStatusSchema,
4471
4472
  Th as removeOwnersCalldataSchema,
4472
4473
  Bh as removePluginCalldataSchema,
4473
4474
  _h as replaceSignerCalldataSchema,
@@ -4479,12 +4480,12 @@ export {
4479
4480
  kh as starknetDomainNameSchema,
4480
4481
  Xr as starknetIdSchema,
4481
4482
  Ou as startOnchainRecoveryErrorSchema,
4482
- Kc as startOnchainRecoveryErrorStatusSchema,
4483
- Gc as startOnchainRecoverySchema,
4483
+ Zc as startOnchainRecoveryErrorStatusSchema,
4484
+ zc as startOnchainRecoverySchema,
4484
4485
  Ph as stringToBooleanSchema,
4485
4486
  hi as stripAddressZeroPadding,
4486
4487
  Rh as structAbiSchema,
4487
- zl as swrRefetchDisabledConfig,
4488
+ ql as swrRefetchDisabledConfig,
4488
4489
  Rt as toMax,
4489
4490
  Ju as tokensRequireTxV3Support,
4490
4491
  $h as transactionReviewTransactionsSchema,
@@ -4495,12 +4496,12 @@ export {
4495
4496
  Lh as uint256Schema,
4496
4497
  Dh as unclaimedRewardsSchema,
4497
4498
  Be as unitToFeeTokenAddress,
4498
- wu as urlWithQuery,
4499
+ bi as urlWithQuery,
4499
4500
  ud as useBalanceChange,
4500
4501
  Eu as useCollection,
4501
4502
  Ks as useConditionallyEnabledSWR,
4502
- Ql as useDebounce,
4503
- tu as useDebouncedValue,
4503
+ tu as useDebounce,
4504
+ eu as useDebouncedValue,
4504
4505
  dd as useERC20Transactions,
4505
4506
  md as useERC721Transactions,
4506
4507
  Hh as useEmitEvent,
@@ -4518,5 +4519,5 @@ export {
4518
4519
  qh as validChecksumAddressSchema,
4519
4520
  Wh as validateAddressRangeSchema,
4520
4521
  yu as voidify,
4521
- Ml as withPolling
4522
+ Gl as withPolling
4522
4523
  };