@argent/x-shared 1.32.3 → 1.32.5

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,11 +1,11 @@
1
1
  import F, { z as h } from "zod";
2
- import { p as vt, H as K, a as Je, u as R, N as Ln, c as Lr, C as Dn, A as Et, i as Dr, b as Hr, n as Hn, d as Vr, e as Mr, f as Gr, g as zr, s as Q, h as nt, j as Qe, k as qr, S as Wr, l as tn, M as en, m as Kr, o as Zr, q as Vn, r as Yr, t as se, B as nn, v as oe, w as Rt, x as Xr, y as Jr, z as Qr, D as ts, E as es, F as ns, T as rs, G as ke, I as Mn, J as ss, K as ye, L as os, O as as, P as is, Q as cs, R as Nt } from "./transactionVersion-DLjpblNo.mjs";
3
- import { am as yd, aV as bd, bN as Sd, aX as Ed, aT as Ad, an as xd, af as vd, ah as Id, ag as Td, ai as Bd, bs as _d, bA as Nd, bg as Cd, bk as Od, a9 as kd, aa as Pd, a5 as Rd, a4 as $d, Z as Fd, W as Ud, X as jd, Y as Ld, aM as Dd, az as Hd, au as Vd, av as Md, as as Gd, at as zd, ax as qd, aw as Wd, ay as Kd, ar as Zd, aq as Yd, ap as Xd, ao as Jd, aA as Qd, aj as tf, ab as ef, b1 as nf, b5 as rf, b3 as sf, bn as of, bC as af, bx as cf, bI as lf, ae as uf, bc as df, b7 as ff, be as hf, bj as pf, aD as mf, aE as gf, aF as wf, bK as yf, bJ as bf, bG as Sf, bq as Ef, aB as Af, aC as xf, bo as vf, aK as If, aG as Tf, aL as Bf, aI as _f, aJ as Nf, b0 as Cf, bp as Of, bf as kf, bz as Pf, bv as Rf, bm as $f, bd as Ff, aY as Uf, $ as jf, _ as Lf, a1 as Df, a2 as Hf, bu as Vf, bt as Mf, aS as Gf, aZ as zf, b2 as qf, a0 as Wf, aP as Kf, ac as Zf, a7 as Yf, ak as Xf, a6 as Jf, aQ as Qf, bB as th, bw as eh, aU as nh, b9 as rh, a8 as sh, ad as oh, al as ah, aO as ih, aH as ch, br as lh, bH as uh, b8 as dh, ba as fh, bb as hh, bh as ph, bl as mh, bi as gh, bE as wh, bF as yh, bD as bh, a3 as Sh, b4 as Eh, by as Ah, aW as xh, a_ as vh, aR as Ih, a$ as Th, b6 as Bh, aN as _h, bP as Nh, bO as Ch, bL as Oh, bQ as kh, bM as Ph, U as Rh, V as $h } from "./transactionVersion-DLjpblNo.mjs";
4
- import { constants as Z, starknetId as Gn, CallData as gt, CairoOption as rn, CairoOptionVariant as sn, hash as zn, num as O, encode as dt, uint256 as Dt, ec as on, isSierra as ls, TransactionType as an } from "starknet";
5
- import { useEffect as Yt, useRef as cn, useState as us, useMemo as It, useCallback as qn } from "react";
6
- import { isFunction as zt, isString as Wn, upperCase as Pe, isNil as ds, upperFirst as fs, lowerCase as Kn, isUndefined as hs, isEmpty as ln, isArray as ps } from "lodash-es";
7
- import ae, { useSWRConfig as ms } from "swr";
8
- import { hex as Zn, base58 as Yn, stringToBytes as un } from "@scure/base";
2
+ import { p as xt, H as K, a as Qe, u as k, N as Fn, c as Ur, C as Un, A as St, i as jr, b as Lr, n as jn, d as Dr, e as Hr, f as Vr, g as Mr, s as Q, h as nt, j as tn, k as Gr, S as zr, l as en, M as nn, m as qr, o as Wr, q as Ln, r as Kr, t as se, B as rn, v as oe, w as Pt, x as Zr, y as Yr, z as Xr, D as Jr, E as Qr, F as ts, T as es, G as Pe, I as Dn, J as ns, K as ye, L as rs, O as ss, P as os, Q as as, R as _t } from "./transactionVersion-DLjpblNo.mjs";
3
+ import { am as Ed, aV as Ad, bN as xd, aX as vd, aT as Id, an as Td, af as Bd, ah as _d, ag as Nd, ai as Cd, bs as Od, bA as kd, bg as Pd, bk as Rd, a9 as $d, aa as Fd, a5 as Ud, a4 as jd, Z as Ld, W as Dd, X as Hd, Y as Vd, aM as Md, az as Gd, au as zd, av as qd, as as Wd, at as Kd, ax as Zd, aw as Yd, ay as Xd, ar as Jd, aq as Qd, ap as tf, ao as ef, aA as nf, aj as rf, ab as sf, b1 as of, b5 as af, b3 as cf, bn as lf, bC as uf, bx as df, bI as ff, ae as hf, bc as pf, b7 as mf, be as gf, bj as wf, aD as yf, aE as bf, aF as Sf, bK as Ef, bJ as Af, bG as xf, bq as vf, aB as If, aC as Tf, bo as Bf, aK as _f, aG as Nf, aL as Cf, aI as Of, aJ as kf, b0 as Pf, bp as Rf, bf as $f, bz as Ff, bv as Uf, bm as jf, bd as Lf, aY as Df, $ as Hf, _ as Vf, a1 as Mf, a2 as Gf, bu as zf, bt as qf, aS as Wf, aZ as Kf, b2 as Zf, a0 as Yf, aP as Xf, ac as Jf, a7 as Qf, ak as th, a6 as eh, aQ as nh, bB as rh, bw as sh, aU as oh, b9 as ah, a8 as ih, ad as ch, al as lh, aO as uh, aH as dh, br as fh, bH as hh, b8 as ph, ba as mh, bb as gh, bh as wh, bl as yh, bi as bh, bE as Sh, bF as Eh, bD as Ah, a3 as xh, b4 as vh, by as Ih, aW as Th, a_ as Bh, aR as _h, a$ as Nh, b6 as Ch, aN as Oh, bP as kh, bO as Ph, bL as Rh, bQ as $h, bM as Fh, U as Uh, V as jh } from "./transactionVersion-DLjpblNo.mjs";
4
+ import { constants as Z, starknetId as Hn, CallData as mt, CairoOption as sn, CairoOptionVariant as on, hash as Vn, num as O, encode as $t, uint256 as Dt, ec as is, isSierra as cs, TransactionType as an } from "starknet";
5
+ import { useEffect as Yt, useRef as cn, useState as ls, useMemo as vt, useCallback as Mn } from "react";
6
+ import { isFunction as zt, isString as Gn, upperCase as Re, isNil as us, upperFirst as ds, lowerCase as zn, isUndefined as fs, isEmpty as ln, isArray as hs } from "lodash-es";
7
+ import ae, { useSWRConfig as ps } from "swr";
8
+ import { hex as qn, base58 as Wn, stringToBytes as ms } from "@scure/base";
9
9
  import { UAParser as gs } from "ua-parser-js";
10
10
  import { validateMnemonic as ws } from "@scure/bip39";
11
11
  import { wordlist as ys } from "@scure/bip39/wordlists/english";
@@ -35,11 +35,11 @@ const Ss = h.object({
35
35
  guid: h.string().optional(),
36
36
  signerType: h.enum(["StarknetKey", "EthereumKey"]).optional()
37
37
  }).optional()
38
- }), Sl = h.object({
38
+ }), vl = h.object({
39
39
  address: h.string(),
40
40
  guardianAddress: h.string().optional(),
41
41
  account: Ss
42
- }), El = h.object({
42
+ }), Il = h.object({
43
43
  ownerAddress: h.string(),
44
44
  signature: h.object({
45
45
  r: h.string(),
@@ -49,25 +49,25 @@ const Ss = h.object({
49
49
  name: h.string().optional(),
50
50
  icon: h.string().optional()
51
51
  });
52
- function Al(t) {
52
+ function Tl(t) {
53
53
  return "transactionVersion" in t;
54
54
  }
55
- function xl(t) {
55
+ function Bl(t) {
56
56
  return "simulateTransaction" in t;
57
57
  }
58
- function vl(t) {
58
+ function _l(t) {
59
59
  return !("simulateTransaction" in t);
60
60
  }
61
61
  const Es = h.object({
62
62
  value: h.string(),
63
63
  platform: h.enum(["ios", "argentx", "android", "webwallet"]).nullable()
64
- }), Il = h.object({
64
+ }), Nl = h.object({
65
65
  preferences: h.record(Es)
66
66
  }), As = h.enum(["mainnet-alpha", "sepolia-alpha"]), xs = h.enum(["mainnet", "sepolia"]);
67
- function Tl(t) {
67
+ function Cl(t) {
68
68
  return As.safeParse(t).success;
69
69
  }
70
- function Bl(t) {
70
+ function Ol(t) {
71
71
  return xs.safeParse(t).success;
72
72
  }
73
73
  const Ht = 18;
@@ -79,60 +79,60 @@ function Vt({ value: t, decimals: e }) {
79
79
  const r = t.toString().padStart(e, "0"), s = r.slice(0, -e) || "0", o = r.slice(-e).replace(/0+$/, "");
80
80
  return `${n ? "-" : ""}${s}${o ? `.${o}` : ""}`;
81
81
  }
82
- const Re = (t, e) => ({
82
+ const $e = (t, e) => ({
83
83
  decimals: e,
84
84
  value: e >= t.decimals ? t.value * BigInt(10) ** BigInt(e - t.decimals) : t.value / BigInt(10) ** BigInt(t.decimals - e)
85
- }), Xn = (t) => {
85
+ }), Kn = (t) => {
86
86
  const e = t.value.toString().split("").reverse();
87
87
  let n = 0;
88
88
  for (let s = 0; s < e.length && e[s] === "0"; s++)
89
89
  n++;
90
90
  const r = t.decimals - n;
91
- return Re(t, r);
92
- }, Jn = (t, e) => {
93
- const n = Math.max(t.decimals, e.decimals), [r, s] = [t, e].map((o) => Re(o, n));
91
+ return $e(t, r);
92
+ }, Zn = (t, e) => {
93
+ const n = Math.max(t.decimals, e.decimals), [r, s] = [t, e].map((o) => $e(o, n));
94
94
  return [r.value, s.value, n];
95
95
  }, ie = (t) => (e, n) => {
96
- const [r, s, o] = Jn(e, n);
96
+ const [r, s, o] = Zn(e, n);
97
97
  return {
98
98
  decimals: o,
99
99
  value: t(r, s, o)
100
100
  };
101
101
  }, Mt = (t) => (e, n) => {
102
- const [r, s] = Jn(e, n);
102
+ const [r, s] = Zn(e, n);
103
103
  return t(r, s);
104
104
  }, vs = ie((t, e) => t + e), Is = ie((t, e) => t - e), Ts = ie((t, e, n) => {
105
105
  if (e === BigInt(0))
106
106
  throw new Error("Division by zero is not allowed");
107
107
  return t * BigInt(10) ** BigInt(n) / e;
108
- }), Bs = (t, e) => Xn({
108
+ }), Bs = (t, e) => Kn({
109
109
  decimals: t.decimals + e.decimals,
110
110
  value: t.value * e.value
111
111
  }), _s = ie((t, e) => {
112
112
  if (e === BigInt(0))
113
113
  throw new Error("Modulus by zero is not allowed");
114
114
  return t % e;
115
- }), $e = (t) => ({
115
+ }), Fe = (t) => ({
116
116
  decimals: t.decimals,
117
117
  value: t.value >= BigInt(0) ? t.value : -t.value
118
- }), Qn = Mt((t, e) => t === e), Ns = Mt((t, e) => t < e), Cs = Mt((t, e) => t > e), Os = Mt((t, e) => t <= e), ks = Mt((t, e) => t >= e), Ps = (t, e) => !Qn(t, e);
118
+ }), Yn = Mt((t, e) => t === e), Ns = Mt((t, e) => t < e), Cs = Mt((t, e) => t > e), Os = Mt((t, e) => t <= e), ks = Mt((t, e) => t >= e), Ps = (t, e) => !Yn(t, e);
119
119
  function Rs(t) {
120
120
  return Vt({ value: t, decimals: Ht });
121
121
  }
122
122
  function $s(t) {
123
- return vt(t, Ht);
123
+ return xt(t, Ht);
124
124
  }
125
125
  function Fs(t) {
126
126
  return Vt({ value: t, decimals: Ht });
127
127
  }
128
- function Fe(t) {
129
- return vt(t, Ht);
128
+ function Ue(t) {
129
+ return xt(t, Ht);
130
130
  }
131
131
  function Us(t) {
132
- return $e({ value: t, decimals: 0 }).value;
132
+ return Fe({ value: t, decimals: 0 }).value;
133
133
  }
134
134
  function js(t) {
135
- return $e(Fe(t));
135
+ return Fe(Ue(t));
136
136
  }
137
137
  function Ls(t, e) {
138
138
  return {
@@ -142,17 +142,17 @@ function Ls(t, e) {
142
142
  }
143
143
  const Ds = { value: 1n, decimals: 0 };
144
144
  function Hs(t) {
145
- return h.string().refine((e) => /^-?\d+(\.\d+)?$/.test(e), { message: "Invalid number format" }).transform((e) => vt(e, t));
145
+ return h.string().refine((e) => /^-?\d+(\.\d+)?$/.test(e), { message: "Invalid number format" }).transform((e) => xt(e, t));
146
146
  }
147
- const _l = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
147
+ const kl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
148
148
  __proto__: null,
149
149
  ONE: Ds,
150
- abs: $e,
150
+ abs: Fe,
151
151
  absBigInt: Us,
152
152
  add: vs,
153
153
  createUnitsSchema: Hs,
154
154
  div: Ts,
155
- eq: Qn,
155
+ eq: Yn,
156
156
  formatCurrency: Fs,
157
157
  formatEther: Rs,
158
158
  formatUnits: Vt,
@@ -163,16 +163,16 @@ const _l = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
163
163
  mod: _s,
164
164
  mul: Bs,
165
165
  not: Ps,
166
- parseCurrency: Fe,
166
+ parseCurrency: Ue,
167
167
  parseCurrencyAbs: js,
168
168
  parseEther: $s,
169
- parseUnits: vt,
169
+ parseUnits: xt,
170
170
  sub: Is,
171
171
  toBigDecimal: Ls,
172
- toFixedDecimals: Re,
173
- toTiniestPossibleDecimal: Xn
172
+ toFixedDecimals: $e,
173
+ toTiniestPossibleDecimal: Kn
174
174
  }, Symbol.toStringTag, { value: "Module" }));
175
- class Nl {
175
+ class Pl {
176
176
  constructor(e, n) {
177
177
  this.cachePromise = n.open(e).catch((r) => (console.error(new Error("Failed to open cache", { cause: r })), null));
178
178
  }
@@ -206,7 +206,7 @@ class Nl {
206
206
  await Promise.allSettled(n.map((r) => e.delete(r)));
207
207
  }
208
208
  }
209
- class Cl {
209
+ class Rl {
210
210
  constructor(e, n) {
211
211
  this.httpService = e, this.baseUrl = n, this.offsetInS = 0, this.syncIntervalInMs = 60 * 1e3, this.initialSync = this.syncWithServer(), setInterval(() => void this.syncWithServer(), this.syncIntervalInMs);
212
212
  }
@@ -220,7 +220,7 @@ class Cl {
220
220
  this.offsetInS = r;
221
221
  }
222
222
  }
223
- class Ue {
223
+ class je {
224
224
  constructor(e, n = "json") {
225
225
  this.requestInit = e, this.responseType = n;
226
226
  }
@@ -235,7 +235,7 @@ class Ue {
235
235
  ...n == null ? void 0 : n.headers
236
236
  }
237
237
  }, o = await fetch(e, s).catch(() => {
238
- throw new K(Je.FAILED_TO_FETCH_URL, 0);
238
+ throw new K(Qe.FAILED_TO_FETCH_URL, 0);
239
239
  });
240
240
  if (this.responseType === "json") {
241
241
  if (!o.ok)
@@ -255,7 +255,7 @@ class Ue {
255
255
  ...n == null ? void 0 : n.headers
256
256
  }
257
257
  }, a = await fetch(e, o).catch(() => {
258
- throw new K(Je.FAILED_TO_POST_URL, 0);
258
+ throw new K(Qe.FAILED_TO_POST_URL, 0);
259
259
  });
260
260
  if (!a.ok)
261
261
  throw new K(a.statusText, a.status, await a.json());
@@ -317,7 +317,7 @@ function Vs(t, e) {
317
317
  headers: r
318
318
  });
319
319
  }
320
- class Ol {
320
+ class $l {
321
321
  constructor(e, n, r, s) {
322
322
  this.dateService = e, this.cacheService = n, this.httpService = r, this.options = s, this.inFlightRequests = /* @__PURE__ */ new Map();
323
323
  }
@@ -369,7 +369,7 @@ const Xt = (t, e, n) => {
369
369
  } catch {
370
370
  }
371
371
  return r;
372
- }, tr = async (t, e) => {
372
+ }, Xn = async (t, e) => {
373
373
  const n = await fetch(t, e), r = await n.text();
374
374
  if (!n.ok)
375
375
  throw Xt("An error occurred while fetching", n, r);
@@ -378,7 +378,7 @@ const Xt = (t, e, n) => {
378
378
  } catch {
379
379
  throw Xt("An error occurred while parsing", n, r);
380
380
  }
381
- }, kl = async (t, e) => {
381
+ }, Fl = async (t, e) => {
382
382
  const n = await fetch(t, {
383
383
  method: "POST",
384
384
  ...e
@@ -390,18 +390,18 @@ const Xt = (t, e, n) => {
390
390
  } catch {
391
391
  throw Xt("An error occurred while parsing", n, r);
392
392
  }
393
- }, Pl = (t) => ({
393
+ }, Ul = (t) => ({
394
394
  refreshInterval: t,
395
395
  dedupingInterval: t
396
- }), Rl = (t) => `${t.networkId}::${t.address}`, Ms = () => {
396
+ }), jl = (t) => `${t.networkId}::${t.address}`, Ms = () => {
397
397
  };
398
398
  function Gs(t, e, n, r) {
399
- const { cache: s } = ms(), o = ae(t && e, t ? n : Ms, r);
399
+ const { cache: s } = ps(), o = ae(t && e, t ? n : Ms, r);
400
400
  return Yt(() => {
401
401
  t || (o.mutate(), s.delete(e));
402
402
  }, [t]), o;
403
403
  }
404
- const $l = {
404
+ const Ll = {
405
405
  revalidateOnFocus: !1,
406
406
  revalidateOnMount: !0,
407
407
  revalidateOnReconnect: !1,
@@ -410,14 +410,14 @@ const $l = {
410
410
  refreshInterval: 0
411
411
  }, zs = async (t, e) => {
412
412
  try {
413
- const { time: n } = await tr(R(t, "time"), {
413
+ const { time: n } = await Xn(k(t, "time"), {
414
414
  headers: e
415
415
  });
416
416
  return n;
417
417
  } catch {
418
418
  throw new Error("failed to request time");
419
419
  }
420
- }, Fl = async (t, e) => {
420
+ }, Dl = async (t, e) => {
421
421
  const n = await zs(t, e);
422
422
  return Math.floor(n);
423
423
  };
@@ -430,30 +430,30 @@ function qs(t) {
430
430
  case Z.NetworkName.SN_SEPOLIA:
431
431
  return Z.StarknetChainId.SN_SEPOLIA;
432
432
  default:
433
- throw new Ln({
433
+ throw new Fn({
434
434
  code: "NOT_FOUND",
435
435
  message: `Unknown networkId: ${t}`
436
436
  });
437
437
  }
438
438
  }
439
439
  function Ws(t) {
440
- return t.replace(".stark", "").split(".").map((r) => Gn.useEncoded(r).toString(10));
440
+ return t.replace(".stark", "").split(".").map((r) => Hn.useEncoded(r).toString(10));
441
441
  }
442
442
  function Ks(t) {
443
443
  const e = qs(t);
444
- return Gn.getStarknetIdContract(e);
444
+ return Hn.getStarknetIdContract(e);
445
445
  }
446
446
  function Zs(t, e) {
447
447
  const n = Ks(e), r = Ws(t);
448
448
  try {
449
449
  const o = { domain: r, hint: [] };
450
- return Lr.parse({
450
+ return Ur.parse({
451
451
  contractAddress: n,
452
452
  entrypoint: "domain_to_address",
453
453
  calldata: o
454
454
  });
455
455
  } catch (s) {
456
- throw new Dn({
456
+ throw new Un({
457
457
  code: "NOT_VALID",
458
458
  options: { error: s }
459
459
  });
@@ -461,14 +461,14 @@ function Zs(t, e) {
461
461
  }
462
462
  async function Ys(t, e, n) {
463
463
  if (!e || !n)
464
- throw new Ln({
464
+ throw new Fn({
465
465
  code: "NO_NETWORK_OR_MULTICALL"
466
466
  });
467
467
  let r = null;
468
468
  try {
469
469
  r = Zs(t, e);
470
470
  } catch (i) {
471
- throw new Dn({
471
+ throw new Un({
472
472
  code: "NOT_VALID",
473
473
  options: { error: i }
474
474
  });
@@ -477,47 +477,47 @@ async function Ys(t, e, n) {
477
477
  try {
478
478
  s = await n.callContract(r), o = s[0];
479
479
  } catch {
480
- throw new Et({
480
+ throw new St({
481
481
  code: "STARKNAME_ERROR"
482
482
  });
483
483
  }
484
- if (Dr(o))
485
- throw new Et({
484
+ if (jr(o))
485
+ throw new St({
486
486
  code: "STARKNAME_NOT_FOUND",
487
487
  message: `${t} not found`
488
488
  });
489
- if (!Hr(o))
490
- throw new Et({
489
+ if (!Lr(o))
490
+ throw new St({
491
491
  code: "STARKNAME_INVALID_ADDRESS",
492
492
  message: `${t} resolved to an invalid address (${o})`
493
493
  });
494
- return Hn(o);
494
+ return jn(o);
495
495
  }
496
- class Ul {
496
+ class Hl {
497
497
  constructor(e, n, r) {
498
498
  this.httpService = e, this.baseUrl = n, this.allowedArgentNameNetworkId = r;
499
499
  }
500
500
  async parseAddressOrDomain(e, n, r) {
501
- if (Vr(e))
502
- return Hn(e);
501
+ if (Dr(e))
502
+ return jn(e);
503
503
  try {
504
504
  return await this.getAddressFromDomainName(e, n, r);
505
505
  } catch {
506
- throw new Et({ code: "NOT_VALID" });
506
+ throw new St({ code: "NOT_VALID" });
507
507
  }
508
508
  }
509
509
  async getAddressFromDomainName(e, n, r) {
510
- if (Mr(e))
510
+ if (Hr(e))
511
511
  return Ys(e, n, r);
512
- if (Gr(e)) {
512
+ if (Vr(e)) {
513
513
  if (n !== this.allowedArgentNameNetworkId)
514
- throw new Et({
514
+ throw new St({
515
515
  code: "ARGENT_NAME_INVALID_NETWORK",
516
516
  message: `Argent name is only enabled on "${this.allowedArgentNameNetworkId}"`
517
517
  });
518
- return zr(e, this.httpService, this.baseUrl);
518
+ return Mr(e, this.httpService, this.baseUrl);
519
519
  }
520
- throw new Et({
520
+ throw new St({
521
521
  code: "NO_ADDRESS_FROM_DOMAIN"
522
522
  });
523
523
  }
@@ -539,42 +539,42 @@ const Xs = [
539
539
  "0.1.1": "0x6e150953b26271a740bf2b6e9bca17cc52c68d765f761295de51ceb8526ee72",
540
540
  "0.1.0": "0x737ee2f87ce571a58c6c8da558ec18a07ceb64a6172d5ec46171fbc80077a48"
541
541
  };
542
- var Js = typeof global == "object" && global && global.Object === Object && global, Qs = typeof self == "object" && self && self.Object === Object && self, ce = Js || Qs || Function("return this")(), Qt = ce.Symbol, er = Object.prototype, to = er.hasOwnProperty, eo = er.toString, Ct = Qt ? Qt.toStringTag : void 0;
542
+ var Js = typeof global == "object" && global && global.Object === Object && global, Qs = typeof self == "object" && self && self.Object === Object && self, ce = Js || Qs || Function("return this")(), Qt = ce.Symbol, Jn = Object.prototype, to = Jn.hasOwnProperty, eo = Jn.toString, Nt = Qt ? Qt.toStringTag : void 0;
543
543
  function no(t) {
544
- var e = to.call(t, Ct), n = t[Ct];
544
+ var e = to.call(t, Nt), n = t[Nt];
545
545
  try {
546
- t[Ct] = void 0;
546
+ t[Nt] = void 0;
547
547
  var r = !0;
548
548
  } catch {
549
549
  }
550
550
  var s = eo.call(t);
551
- return r && (e ? t[Ct] = n : delete t[Ct]), s;
551
+ return r && (e ? t[Nt] = n : delete t[Nt]), s;
552
552
  }
553
553
  var ro = Object.prototype, so = ro.toString;
554
554
  function oo(t) {
555
555
  return so.call(t);
556
556
  }
557
- var ao = "[object Null]", io = "[object Undefined]", dn = Qt ? Qt.toStringTag : void 0;
557
+ var ao = "[object Null]", io = "[object Undefined]", un = Qt ? Qt.toStringTag : void 0;
558
558
  function co(t) {
559
- return t == null ? t === void 0 ? io : ao : dn && dn in Object(t) ? no(t) : oo(t);
559
+ return t == null ? t === void 0 ? io : ao : un && un in Object(t) ? no(t) : oo(t);
560
560
  }
561
- function nr(t) {
561
+ function Qn(t) {
562
562
  var e = typeof t;
563
563
  return t != null && (e == "object" || e == "function");
564
564
  }
565
565
  var lo = "[object AsyncFunction]", uo = "[object Function]", fo = "[object GeneratorFunction]", ho = "[object Proxy]";
566
566
  function po(t) {
567
- if (!nr(t))
567
+ if (!Qn(t))
568
568
  return !1;
569
569
  var e = co(t);
570
570
  return e == uo || e == fo || e == lo || e == ho;
571
571
  }
572
- var be = ce["__core-js_shared__"], fn = function() {
572
+ var be = ce["__core-js_shared__"], dn = function() {
573
573
  var t = /[^.]+$/.exec(be && be.keys && be.keys.IE_PROTO || "");
574
574
  return t ? "Symbol(src)_1." + t : "";
575
575
  }();
576
576
  function mo(t) {
577
- return !!fn && fn in t;
577
+ return !!dn && dn in t;
578
578
  }
579
579
  var go = Function.prototype, wo = go.toString;
580
580
  function yo(t) {
@@ -594,7 +594,7 @@ var bo = /[\\^$.*+?()[\]{}|]/g, So = /^\[object .+?Constructor\]$/, Eo = Functio
594
594
  "^" + xo.call(vo).replace(bo, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
595
595
  );
596
596
  function To(t) {
597
- if (!nr(t) || mo(t))
597
+ if (!Qn(t) || mo(t))
598
598
  return !1;
599
599
  var e = po(t) ? Io : So;
600
600
  return e.test(yo(t));
@@ -602,11 +602,11 @@ function To(t) {
602
602
  function Bo(t, e) {
603
603
  return t == null ? void 0 : t[e];
604
604
  }
605
- function je(t, e) {
605
+ function Le(t, e) {
606
606
  var n = Bo(t, e);
607
607
  return To(n) ? n : void 0;
608
608
  }
609
- var Ft = je(Object, "create");
609
+ var Ft = Le(Object, "create");
610
610
  function _o() {
611
611
  this.__data__ = Ft ? Ft(null) : {}, this.size = 0;
612
612
  }
@@ -633,18 +633,18 @@ function jo(t, e) {
633
633
  var n = this.__data__;
634
634
  return this.size += this.has(t) ? 0 : 1, n[t] = Ft && e === void 0 ? Uo : e, this;
635
635
  }
636
- function ht(t) {
636
+ function ft(t) {
637
637
  var e = -1, n = t == null ? 0 : t.length;
638
638
  for (this.clear(); ++e < n; ) {
639
639
  var r = t[e];
640
640
  this.set(r[0], r[1]);
641
641
  }
642
642
  }
643
- ht.prototype.clear = _o;
644
- ht.prototype.delete = No;
645
- ht.prototype.get = Po;
646
- ht.prototype.has = Fo;
647
- ht.prototype.set = jo;
643
+ ft.prototype.clear = _o;
644
+ ft.prototype.delete = No;
645
+ ft.prototype.get = Po;
646
+ ft.prototype.has = Fo;
647
+ ft.prototype.set = jo;
648
648
  function Lo() {
649
649
  this.__data__ = [], this.size = 0;
650
650
  }
@@ -676,24 +676,24 @@ function qo(t, e) {
676
676
  var n = this.__data__, r = le(n, t);
677
677
  return r < 0 ? (++this.size, n.push([t, e])) : n[r][1] = e, this;
678
678
  }
679
- function Tt(t) {
679
+ function It(t) {
680
680
  var e = -1, n = t == null ? 0 : t.length;
681
681
  for (this.clear(); ++e < n; ) {
682
682
  var r = t[e];
683
683
  this.set(r[0], r[1]);
684
684
  }
685
685
  }
686
- Tt.prototype.clear = Lo;
687
- Tt.prototype.delete = Mo;
688
- Tt.prototype.get = Go;
689
- Tt.prototype.has = zo;
690
- Tt.prototype.set = qo;
691
- var Wo = je(ce, "Map");
686
+ It.prototype.clear = Lo;
687
+ It.prototype.delete = Mo;
688
+ It.prototype.get = Go;
689
+ It.prototype.has = zo;
690
+ It.prototype.set = qo;
691
+ var Wo = Le(ce, "Map");
692
692
  function Ko() {
693
693
  this.size = 0, this.__data__ = {
694
- hash: new ht(),
695
- map: new (Wo || Tt)(),
696
- string: new ht()
694
+ hash: new ft(),
695
+ map: new (Wo || It)(),
696
+ string: new ft()
697
697
  };
698
698
  }
699
699
  function Zo(t) {
@@ -718,18 +718,18 @@ function Qo(t, e) {
718
718
  var n = ue(this, t), r = n.size;
719
719
  return n.set(t, e), this.size += n.size == r ? 0 : 1, this;
720
720
  }
721
- function Bt(t) {
721
+ function Tt(t) {
722
722
  var e = -1, n = t == null ? 0 : t.length;
723
723
  for (this.clear(); ++e < n; ) {
724
724
  var r = t[e];
725
725
  this.set(r[0], r[1]);
726
726
  }
727
727
  }
728
- Bt.prototype.clear = Ko;
729
- Bt.prototype.delete = Yo;
730
- Bt.prototype.get = Xo;
731
- Bt.prototype.has = Jo;
732
- Bt.prototype.set = Qo;
728
+ Tt.prototype.clear = Ko;
729
+ Tt.prototype.delete = Yo;
730
+ Tt.prototype.get = Xo;
731
+ Tt.prototype.has = Jo;
732
+ Tt.prototype.set = Qo;
733
733
  var ta = "__lodash_hash_undefined__";
734
734
  function ea(t) {
735
735
  return this.__data__.set(t, ta), this;
@@ -739,7 +739,7 @@ function na(t) {
739
739
  }
740
740
  function te(t) {
741
741
  var e = -1, n = t == null ? 0 : t.length;
742
- for (this.__data__ = new Bt(); ++e < n; )
742
+ for (this.__data__ = new Tt(); ++e < n; )
743
743
  this.add(t[e]);
744
744
  }
745
745
  te.prototype.add = te.prototype.push = ea;
@@ -775,16 +775,16 @@ function ca(t, e, n) {
775
775
  function la(t, e) {
776
776
  return t.has(e);
777
777
  }
778
- var Se = je(ce, "Set");
778
+ var Se = Le(ce, "Set");
779
779
  function ua() {
780
780
  }
781
- function rr(t) {
781
+ function tr(t) {
782
782
  var e = -1, n = Array(t.size);
783
783
  return t.forEach(function(r) {
784
784
  n[++e] = r;
785
785
  }), n;
786
786
  }
787
- var da = 1 / 0, fa = Se && 1 / rr(new Se([, -0]))[1] == da ? function(t) {
787
+ var da = 1 / 0, fa = Se && 1 / tr(new Se([, -0]))[1] == da ? function(t) {
788
788
  return new Se(t);
789
789
  } : ua, ha = 200;
790
790
  function pa(t, e, n) {
@@ -794,7 +794,7 @@ function pa(t, e, n) {
794
794
  else if (o >= ha) {
795
795
  var l = fa(t);
796
796
  if (l)
797
- return rr(l);
797
+ return tr(l);
798
798
  a = !1, s = la, c = new te();
799
799
  } else
800
800
  c = i;
@@ -813,7 +813,7 @@ function pa(t, e, n) {
813
813
  function ma(t, e) {
814
814
  return e = typeof e == "function" ? e : void 0, t && t.length ? pa(t, void 0, e) : [];
815
815
  }
816
- function hn(t) {
816
+ function fn(t) {
817
817
  const e = Object.entries(tt), n = Object.entries(Jt);
818
818
  switch (t) {
819
819
  case "cairo0":
@@ -832,7 +832,7 @@ function ga() {
832
832
  throw new Error(`No argent account contract found: v${t} `);
833
833
  return tt[t];
834
834
  }
835
- function jl() {
835
+ function Vl() {
836
836
  const t = Q.maxSatisfying(Object.keys(Jt), "*");
837
837
  if (!t)
838
838
  throw new Error(`No argent multisig contract found: v${t} `);
@@ -841,7 +841,7 @@ function jl() {
841
841
  function wa() {
842
842
  return Object.entries(tt).filter(([t]) => Q.gte(t, "0.4.0")).map(([, t]) => t);
843
843
  }
844
- function Ll() {
844
+ function Ml() {
845
845
  const t = Q.maxSatisfying(Object.keys(tt), "<0.3.0");
846
846
  if (!t)
847
847
  throw new Error(`No argent account contract found: v${t} `);
@@ -851,23 +851,23 @@ function ya() {
851
851
  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);
852
852
  return [...t, ...e];
853
853
  }
854
- function Dl() {
854
+ function Gl() {
855
855
  return Object.entries(tt).filter(([t]) => Q.gte(t, "0.4.0")).map(([, t]) => t);
856
856
  }
857
- function Hl() {
857
+ function zl() {
858
858
  const t = Q.maxSatisfying(Object.keys(tt), ">=0.4.0");
859
859
  if (!t)
860
860
  throw new Error(`No ledger account contract found: v${t}`);
861
861
  return tt[t];
862
862
  }
863
863
  const ba = (t, e) => t.cairoVersion === e.cairoVersion && nt(t.accountClassHash, e.accountClassHash);
864
- function Vl(t, e, n = []) {
865
- const r = Qe.parse({
864
+ function ql(t, e, n = []) {
865
+ const r = tn.parse({
866
866
  cairoVersion: e.cairoVersion ?? "1",
867
867
  accountClassHash: e.classHash ?? ga()
868
- }), s = h.array(Qe).parse(n), o = [
869
- ...hn("cairo0").map((l) => ({ cairoVersion: "0", accountClassHash: l })),
870
- ...hn("cairo1").map((l) => ({ cairoVersion: "1", accountClassHash: l }))
868
+ }), s = h.array(tn).parse(n), o = [
869
+ ...fn("cairo0").map((l) => ({ cairoVersion: "0", accountClassHash: l })),
870
+ ...fn("cairo1").map((l) => ({ cairoVersion: "1", accountClassHash: l }))
871
871
  ], c = ma([
872
872
  r,
873
873
  ...s,
@@ -877,40 +877,40 @@ function Vl(t, e, n = []) {
877
877
  address: Aa(l.cairoVersion, l.accountClassHash, t, e.guardian, e.salt)
878
878
  })).find((l) => nt(l.address, e.address));
879
879
  if (!c)
880
- throw new qr({ code: "CALCULATED_ADDRESS_NO_MATCH" });
880
+ throw new Gr({ code: "CALCULATED_ADDRESS_NO_MATCH" });
881
881
  return c.implementation;
882
882
  }
883
883
  function Sa(t, e, n, r, s, o = Xs[0]) {
884
884
  const a = Ea(t, e, n, r);
885
885
  return {
886
886
  classHash: t === "0" ? o : e,
887
- constructorCalldata: gt.compile(a),
887
+ constructorCalldata: mt.compile(a),
888
888
  addressSalt: s || n
889
889
  };
890
890
  }
891
891
  function Ea(t, e, n, r) {
892
- const s = t !== "0" && nt(Wr, e), o = {
892
+ const s = t !== "0" && nt(zr, e), o = {
893
893
  pubkey: n,
894
894
  ...s ? {} : { guardian: r || "0" }
895
895
  };
896
896
  if (wa().some((i) => nt(i, e))) {
897
- const i = tn(n, en.Starknet), c = r ? new rn(sn.Some, tn(r, en.Starknet)) : new rn(sn.None, null);
897
+ const i = en(n, nn.Starknet), c = r ? new sn(on.Some, en(r, nn.Starknet)) : new sn(on.None, null);
898
898
  return { ownerSigner: i, guardianAsOption: c };
899
899
  }
900
- return t === "0" ? Kr.parse({
900
+ return t === "0" ? qr.parse({
901
901
  implementation: e,
902
- selector: zn.getSelectorFromName("initialize"),
903
- calldata: gt.compile(o)
904
- }) : Zr.parse({
902
+ selector: Vn.getSelectorFromName("initialize"),
903
+ calldata: mt.compile(o)
904
+ }) : Wr.parse({
905
905
  owner: n,
906
906
  guardian: r
907
907
  });
908
908
  }
909
909
  function Aa(t, e, n, r, s) {
910
910
  const o = Sa(t, e, n, r, s);
911
- return zn.calculateContractAddressFromHash(o.addressSalt, o.classHash, o.constructorCalldata, 0);
911
+ return Vn.calculateContractAddressFromHash(o.addressSalt, o.classHash, o.constructorCalldata, 0);
912
912
  }
913
- function Ml(t, e) {
913
+ function Wl(t, e) {
914
914
  const n = cn(t), r = cn();
915
915
  return Yt(() => {
916
916
  n.current = t;
@@ -920,8 +920,8 @@ function Ml(t, e) {
920
920
  r.current && clearTimeout(r.current), r.current = setTimeout(() => n.current(...s), e);
921
921
  };
922
922
  }
923
- function Gl(t, e) {
924
- const [n, r] = us(t);
923
+ function Kl(t, e) {
924
+ const [n, r] = ls(t);
925
925
  return Yt(() => {
926
926
  const s = setTimeout(() => {
927
927
  r(t);
@@ -943,7 +943,7 @@ const xa = h.object({
943
943
  url: h.string(),
944
944
  position: h.number()
945
945
  }), va = h.object({
946
- address: Vn,
946
+ address: Ln,
947
947
  chain: h.enum(["ethereum", "starknet"])
948
948
  }), Ia = h.object({
949
949
  dappId: h.string(),
@@ -960,9 +960,9 @@ const xa = h.object({
960
960
  brandColor: h.string().optional(),
961
961
  executeFromOutsideAllowed: h.boolean().default(!1).optional()
962
962
  }), Ta = h.array(Ia);
963
- class zl {
963
+ class Zl {
964
964
  constructor(e, n) {
965
- this.apiBase = e, this.httpService = new Ue(n, "json");
965
+ this.apiBase = e, this.httpService = new je(n, "json");
966
966
  }
967
967
  async getAll() {
968
968
  const e = await this.httpService.get(`${this.apiBase}/tokens/dapps`), n = Ta.safeParse(e);
@@ -975,16 +975,16 @@ function Ba(t) {
975
975
  var e;
976
976
  return (e = t == null ? void 0 : t.links) == null ? void 0 : e.find((n) => n.name === "dappland");
977
977
  }
978
- function ql(t) {
978
+ function Yl(t) {
979
979
  var e;
980
980
  return (e = Ba(t)) == null ? void 0 : e.url;
981
981
  }
982
- const sr = F.object({
983
- domain: Yr,
982
+ const er = F.object({
983
+ domain: Kr,
984
984
  address: se.optional(),
985
985
  avatar: F.string().optional(),
986
986
  status: F.union([F.literal("KNOWN"), F.literal("UNKNOWN")])
987
- }), _a = F.array(sr), Na = F.object({
987
+ }), _a = F.array(er), Na = F.object({
988
988
  provider: F.string(),
989
989
  name: F.string(),
990
990
  avatar: F.string().optional()
@@ -993,20 +993,20 @@ const sr = F.object({
993
993
  status: F.union([F.literal("KNOWN"), F.literal("UNKNOWN")]),
994
994
  resolutions: F.array(Na).optional()
995
995
  }), Oa = F.array(F.string()), ka = Ca.array();
996
- class Wl {
996
+ class Xl {
997
997
  constructor(e, n) {
998
- this.apiBase = e, this.headers = n, this.httpService = new Ue(this.headers, "json");
998
+ this.apiBase = e, this.headers = n, this.httpService = new je(this.headers, "json");
999
999
  }
1000
1000
  async getAddressFromMultipleStarknetId(e, n, r) {
1001
1001
  const s = new URLSearchParams(n.map((c) => ["domain", c]));
1002
1002
  r && s.set("includeAvatar", "true");
1003
- const o = R(this.apiBase, e, "starknet.id", `?${s}`), a = await this.httpService.get(o), i = _a.safeParse(a);
1003
+ const o = k(this.apiBase, e, "starknet.id", `?${s}`), a = await this.httpService.get(o), i = _a.safeParse(a);
1004
1004
  if (!i.success)
1005
1005
  throw new Error("Failed to parse name resolution");
1006
1006
  return i.data;
1007
1007
  }
1008
1008
  async getAddressFromStarknetId(e, n, r) {
1009
- const s = R(this.apiBase, e, "starknet.id", n, r ? "?includeAvatar=true" : ""), o = await this.httpService.get(s), a = sr.safeParse(o);
1009
+ const s = k(this.apiBase, e, "starknet.id", n, r ? "?includeAvatar=true" : ""), o = await this.httpService.get(s), a = er.safeParse(o);
1010
1010
  if (!a.success)
1011
1011
  throw new Error("Failed to parse name resolution");
1012
1012
  return a.data;
@@ -1017,20 +1017,20 @@ class Wl {
1017
1017
  async getStarknetIdFromAddress(e, n, r) {
1018
1018
  const s = new URLSearchParams(n.map((c) => ["address", c]));
1019
1019
  r && s.set("includeAvatar", "true");
1020
- const o = R(this.apiBase, e, "addresses", `?${s}`), a = await this.httpService.get(o), i = ka.safeParse(a);
1020
+ const o = k(this.apiBase, e, "addresses", `?${s}`), a = await this.httpService.get(o), i = ka.safeParse(a);
1021
1021
  if (!i.success)
1022
1022
  throw new Error("Failed to parse name resolution");
1023
1023
  return i.data;
1024
1024
  }
1025
1025
  async getProvidersNames(e) {
1026
- const n = R(this.apiBase, e, "providers", "name"), r = await this.httpService.get(n), s = Oa.safeParse(r);
1026
+ const n = k(this.apiBase, e, "providers", "name"), r = await this.httpService.get(n), s = Oa.safeParse(r);
1027
1027
  if (!s.success)
1028
1028
  throw new Error("Failed to parse name resolution");
1029
1029
  return s.data;
1030
1030
  }
1031
1031
  }
1032
- const or = (t) => t.slice(0, 6) + "..." + t.slice(-4);
1033
- function pn(t) {
1032
+ const nr = (t) => t.slice(0, 6) + "..." + t.slice(-4);
1033
+ function hn(t) {
1034
1034
  if (!Number.isSafeInteger(t) || t < 0)
1035
1035
  throw new Error(`positive integer expected, not ${t}`);
1036
1036
  }
@@ -1043,7 +1043,7 @@ function de(t, ...e) {
1043
1043
  if (e.length > 0 && !e.includes(t.length))
1044
1044
  throw new Error(`Uint8Array expected of length ${e}, not of length=${t.length}`);
1045
1045
  }
1046
- function mn(t, e = !0) {
1046
+ function pn(t, e = !0) {
1047
1047
  if (t.destroyed)
1048
1048
  throw new Error("Hash instance has been destroyed");
1049
1049
  if (e && t.finished)
@@ -1055,9 +1055,9 @@ function Ra(t, e) {
1055
1055
  if (t.length < n)
1056
1056
  throw new Error(`digestInto() expects output buffer of length at least ${n}`);
1057
1057
  }
1058
- const Wt = /* @__PURE__ */ BigInt(2 ** 32 - 1), gn = /* @__PURE__ */ BigInt(32);
1058
+ const Wt = /* @__PURE__ */ BigInt(2 ** 32 - 1), mn = /* @__PURE__ */ BigInt(32);
1059
1059
  function $a(t, e = !1) {
1060
- return e ? { h: Number(t & Wt), l: Number(t >> gn & Wt) } : { h: Number(t >> gn & Wt) | 0, l: Number(t & Wt) | 0 };
1060
+ return e ? { h: Number(t & Wt), l: Number(t >> mn & Wt) } : { h: Number(t >> mn & Wt) | 0, l: Number(t & Wt) | 0 };
1061
1061
  }
1062
1062
  function Fa(t, e = !1) {
1063
1063
  let n = new Uint32Array(t.length), r = new Uint32Array(t.length);
@@ -1069,8 +1069,8 @@ function Fa(t, e = !1) {
1069
1069
  }
1070
1070
  const Ua = (t, e, n) => t << n | e >>> 32 - n, ja = (t, e, n) => e << n | t >>> 32 - n, La = (t, e, n) => e << n - 32 | t >>> 64 - n, Da = (t, e, n) => t << n - 32 | e >>> 64 - n;
1071
1071
  /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
1072
- const Ha = (t) => new Uint32Array(t.buffer, t.byteOffset, Math.floor(t.byteLength / 4)), wn = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68, Va = (t) => t << 24 & 4278190080 | t << 8 & 16711680 | t >>> 8 & 65280 | t >>> 24 & 255;
1073
- function yn(t) {
1072
+ const Ha = (t) => new Uint32Array(t.buffer, t.byteOffset, Math.floor(t.byteLength / 4)), gn = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68, Va = (t) => t << 24 & 4278190080 | t << 8 & 16711680 | t >>> 8 & 65280 | t >>> 24 & 255;
1073
+ function wn(t) {
1074
1074
  for (let e = 0; e < t.length; e++)
1075
1075
  t[e] = Va(t[e]);
1076
1076
  }
@@ -1082,13 +1082,13 @@ function Ga(t) {
1082
1082
  e += Ma[t[n]];
1083
1083
  return e;
1084
1084
  }
1085
- function ar(t) {
1085
+ function rr(t) {
1086
1086
  if (typeof t != "string")
1087
1087
  throw new Error(`utf8ToBytes expected string, got ${typeof t}`);
1088
1088
  return new Uint8Array(new TextEncoder().encode(t));
1089
1089
  }
1090
- function ir(t) {
1091
- return typeof t == "string" && (t = ar(t)), de(t), t;
1090
+ function sr(t) {
1091
+ return typeof t == "string" && (t = rr(t)), de(t), t;
1092
1092
  }
1093
1093
  let za = class {
1094
1094
  // Safe version that clones internal state
@@ -1097,31 +1097,31 @@ let za = class {
1097
1097
  }
1098
1098
  };
1099
1099
  function qa(t) {
1100
- const e = (r) => t().update(ir(r)).digest(), n = t();
1100
+ const e = (r) => t().update(sr(r)).digest(), n = t();
1101
1101
  return e.outputLen = n.outputLen, e.blockLen = n.blockLen, e.create = () => t(), e;
1102
1102
  }
1103
- const cr = [], lr = [], ur = [], Wa = /* @__PURE__ */ BigInt(0), Ot = /* @__PURE__ */ BigInt(1), Ka = /* @__PURE__ */ BigInt(2), Za = /* @__PURE__ */ BigInt(7), Ya = /* @__PURE__ */ BigInt(256), Xa = /* @__PURE__ */ BigInt(113);
1104
- for (let t = 0, e = Ot, n = 1, r = 0; t < 24; t++) {
1105
- [n, r] = [r, (2 * n + 3 * r) % 5], cr.push(2 * (5 * r + n)), lr.push((t + 1) * (t + 2) / 2 % 64);
1103
+ const or = [], ar = [], ir = [], Wa = /* @__PURE__ */ BigInt(0), Ct = /* @__PURE__ */ BigInt(1), Ka = /* @__PURE__ */ BigInt(2), Za = /* @__PURE__ */ BigInt(7), Ya = /* @__PURE__ */ BigInt(256), Xa = /* @__PURE__ */ BigInt(113);
1104
+ for (let t = 0, e = Ct, n = 1, r = 0; t < 24; t++) {
1105
+ [n, r] = [r, (2 * n + 3 * r) % 5], or.push(2 * (5 * r + n)), ar.push((t + 1) * (t + 2) / 2 % 64);
1106
1106
  let s = Wa;
1107
1107
  for (let o = 0; o < 7; o++)
1108
- e = (e << Ot ^ (e >> Za) * Xa) % Ya, e & Ka && (s ^= Ot << (Ot << /* @__PURE__ */ BigInt(o)) - Ot);
1109
- ur.push(s);
1108
+ e = (e << Ct ^ (e >> Za) * Xa) % Ya, e & Ka && (s ^= Ct << (Ct << /* @__PURE__ */ BigInt(o)) - Ct);
1109
+ ir.push(s);
1110
1110
  }
1111
- const [Ja, Qa] = /* @__PURE__ */ Fa(ur, !0), bn = (t, e, n) => n > 32 ? La(t, e, n) : Ua(t, e, n), Sn = (t, e, n) => n > 32 ? Da(t, e, n) : ja(t, e, n);
1111
+ const [Ja, Qa] = /* @__PURE__ */ Fa(ir, !0), yn = (t, e, n) => n > 32 ? La(t, e, n) : Ua(t, e, n), bn = (t, e, n) => n > 32 ? Da(t, e, n) : ja(t, e, n);
1112
1112
  function ti(t, e = 24) {
1113
1113
  const n = new Uint32Array(10);
1114
1114
  for (let r = 24 - e; r < 24; r++) {
1115
1115
  for (let a = 0; a < 10; a++)
1116
1116
  n[a] = t[a] ^ t[a + 10] ^ t[a + 20] ^ t[a + 30] ^ t[a + 40];
1117
1117
  for (let a = 0; a < 10; a += 2) {
1118
- 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];
1118
+ const i = (a + 8) % 10, c = (a + 2) % 10, l = n[c], d = n[c + 1], u = yn(l, d, 1) ^ n[i], w = bn(l, d, 1) ^ n[i + 1];
1119
1119
  for (let m = 0; m < 50; m += 10)
1120
1120
  t[a + m] ^= u, t[a + m + 1] ^= w;
1121
1121
  }
1122
1122
  let s = t[2], o = t[3];
1123
1123
  for (let a = 0; a < 24; a++) {
1124
- const i = lr[a], c = bn(s, o, i), l = Sn(s, o, i), d = cr[a];
1124
+ const i = ar[a], c = yn(s, o, i), l = bn(s, o, i), d = or[a];
1125
1125
  s = t[d], o = t[d + 1], t[d] = c, t[d + 1] = l;
1126
1126
  }
1127
1127
  for (let a = 0; a < 50; a += 10) {
@@ -1134,20 +1134,20 @@ function ti(t, e = 24) {
1134
1134
  }
1135
1135
  n.fill(0);
1136
1136
  }
1137
- let ei = class dr extends za {
1137
+ let ei = class cr extends za {
1138
1138
  // NOTE: we accept arguments in bytes instead of bits here.
1139
1139
  constructor(e, n, r, s = !1, o = 24) {
1140
- 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, pn(r), 0 >= this.blockLen || this.blockLen >= 200)
1140
+ 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, hn(r), 0 >= this.blockLen || this.blockLen >= 200)
1141
1141
  throw new Error("Sha3 supports only keccak-f1600 function");
1142
1142
  this.state = new Uint8Array(200), this.state32 = Ha(this.state);
1143
1143
  }
1144
1144
  keccak() {
1145
- wn || yn(this.state32), ti(this.state32, this.rounds), wn || yn(this.state32), this.posOut = 0, this.pos = 0;
1145
+ gn || wn(this.state32), ti(this.state32, this.rounds), gn || wn(this.state32), this.posOut = 0, this.pos = 0;
1146
1146
  }
1147
1147
  update(e) {
1148
- mn(this);
1148
+ pn(this);
1149
1149
  const { blockLen: n, state: r } = this;
1150
- e = ir(e);
1150
+ e = sr(e);
1151
1151
  const s = e.length;
1152
1152
  for (let o = 0; o < s; ) {
1153
1153
  const a = Math.min(n - this.pos, s - o);
@@ -1165,7 +1165,7 @@ let ei = class dr extends za {
1165
1165
  e[r] ^= n, n & 128 && r === s - 1 && this.keccak(), e[s - 1] ^= 128, this.keccak();
1166
1166
  }
1167
1167
  writeInto(e) {
1168
- mn(this, !1), de(e), this.finish();
1168
+ pn(this, !1), de(e), this.finish();
1169
1169
  const n = this.state, { blockLen: r } = this;
1170
1170
  for (let s = 0, o = e.length; s < o; ) {
1171
1171
  this.posOut >= r && this.keccak();
@@ -1180,7 +1180,7 @@ let ei = class dr extends za {
1180
1180
  return this.writeInto(e);
1181
1181
  }
1182
1182
  xof(e) {
1183
- return pn(e), this.xofInto(new Uint8Array(e));
1183
+ return hn(e), this.xofInto(new Uint8Array(e));
1184
1184
  }
1185
1185
  digestInto(e) {
1186
1186
  if (Ra(e, this), this.finished)
@@ -1195,36 +1195,36 @@ let ei = class dr extends za {
1195
1195
  }
1196
1196
  _cloneInto(e) {
1197
1197
  const { blockLen: n, suffix: r, outputLen: s, rounds: o, enableXOF: a } = this;
1198
- return e || (e = new dr(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;
1198
+ return e || (e = new cr(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;
1199
1199
  }
1200
1200
  };
1201
1201
  const ni = (t, e, n) => qa(() => new ei(e, t, n)), ri = /* @__PURE__ */ ni(1, 136, 256 / 8);
1202
1202
  function si(t) {
1203
- return `0x${Ga(ri(ar(t)))}`;
1203
+ return `0x${Ga(ri(rr(t)))}`;
1204
1204
  }
1205
1205
  const oi = (t) => {
1206
- if (!Wn(t))
1206
+ if (!Gn(t))
1207
1207
  return;
1208
1208
  const e = /(\d+)$/, n = t.match(e);
1209
1209
  if (n)
1210
1210
  return n[1];
1211
1211
  }, ai = (t, e = !1) => {
1212
- if (!Wn(t))
1212
+ if (!Gn(t))
1213
1213
  return "";
1214
- const n = e ? t.replace(/[^0-9a-z ]/gi, "") : t, s = Pe(n).split(" "), o = oi(n), a = s.map((i) => i[0]);
1214
+ const n = e ? t.replace(/[^0-9a-z ]/gi, "") : t, s = Re(n).split(" "), o = oi(n), a = s.map((i) => i[0]);
1215
1215
  return o && o.length > 1 && o.length < n.length ? [a[0], o.substring(0, 2)].join("") : s.length === 1 ? s[0].substring(0, 2) : [a[0], a[a.length - 1]].join("");
1216
- }, { toBigInt: ii } = O, En = (t) => {
1216
+ }, { toBigInt: ii } = O, Sn = (t) => {
1217
1217
  const e = t.replace("#", "");
1218
1218
  if (!/^[0-9A-F]{6}$/i.test(e))
1219
1219
  throw new Error(`Invalid color ${t}`);
1220
1220
  return `#${e}`;
1221
1221
  }, ee = (t, e) => {
1222
- const n = En(e.background), r = En(e.color ?? "#ffffff"), s = ai(t, !0), o = `<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48">
1222
+ const n = Sn(e.background), r = Sn(e.color ?? "#ffffff"), s = ai(t, !0), o = `<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48">
1223
1223
  <rect width="48" height="48" fill="${n}" />
1224
1224
  <text x="50%" y="54%" dominant-baseline="middle" text-anchor="middle" font-size="16" font-family="Barlow, Helvetica, Arial, sans-serif" fill="${r}">${s}</text>
1225
1225
  </svg>`;
1226
1226
  return `data:image/svg+xml;base64,${btoa(o)}`;
1227
- }, An = [
1227
+ }, En = [
1228
1228
  "02BBA8",
1229
1229
  "29C5FF",
1230
1230
  "0078A4",
@@ -1234,45 +1234,45 @@ const oi = (t) => {
1234
1234
  "FF675C",
1235
1235
  "FF5C72"
1236
1236
  ], ci = (t) => {
1237
- const e = si(t).slice(-2), n = parseInt(e, 16) % An.length;
1238
- return An[n];
1237
+ const e = si(t).slice(-2), n = parseInt(e, 16) % En.length;
1238
+ return En[n];
1239
1239
  }, li = (t) => {
1240
1240
  try {
1241
1241
  return O.toHex(ii(O.hexToDecimalString(t)));
1242
1242
  } catch {
1243
1243
  }
1244
1244
  return "";
1245
- }, Zl = ({ accountName: t, networkId: e, accountAddress: n, backgroundColor: r }) => {
1245
+ }, Ql = ({ accountName: t, networkId: e, accountAddress: n, backgroundColor: r }) => {
1246
1246
  const s = li(n), o = `${e}::${s}`, a = r || ci(o);
1247
1247
  return ee(t, { background: a });
1248
1248
  }, ui = (t) => {
1249
- const e = dt.removeHexPrefix(dt.sanitizeHex(O.toHex(t))), n = Zn.decode(e);
1250
- return Yn.encode(n);
1251
- }, Yl = (t) => t.map(ui), di = (t) => {
1252
- const e = Yn.decode(t);
1253
- return dt.sanitizeHex(Zn.encode(e));
1254
- }, Xl = (t) => t.map(di);
1255
- function Jl(t, e) {
1249
+ const e = $t.removeHexPrefix($t.sanitizeHex(O.toHex(t))), n = qn.decode(e);
1250
+ return Wn.encode(n);
1251
+ }, tu = (t) => t.map(ui), di = (t) => {
1252
+ const e = Wn.decode(t);
1253
+ return $t.sanitizeHex(qn.encode(e));
1254
+ }, eu = (t) => t.map(di);
1255
+ function nu(t, e) {
1256
1256
  const n = t.getTime(), r = e.getTime(), s = Math.abs(n - r);
1257
1257
  return Math.floor(s / (1e3 * 60 * 60 * 24));
1258
1258
  }
1259
- const Ql = (t) => (t || "false") === "true", tu = async (t, e) => {
1259
+ const ru = (t) => (t || "false") === "true", su = async (t, e) => {
1260
1260
  try {
1261
1261
  return await t.getClassHashAt(e), !0;
1262
1262
  } catch {
1263
1263
  return !1;
1264
1264
  }
1265
1265
  };
1266
- function eu(t) {
1267
- return !ds(t);
1266
+ function ou(t) {
1267
+ return !us(t);
1268
1268
  }
1269
- const nu = (t) => {
1269
+ const au = (t) => {
1270
1270
  const e = /^(0|0x([a-f0-9A-F]+)?)$/;
1271
1271
  return !!(t === "" || e.test(t));
1272
- }, Y = (t) => !isNaN(parseFloat(t)) && isFinite(Number(t)), ru = (t, e = 16) => {
1272
+ }, Y = (t) => !isNaN(parseFloat(t)) && isFinite(Number(t)), iu = (t, e = 16) => {
1273
1273
  const n = new RegExp(`^[0-9]*.?[0-9]{0,${e}}$`);
1274
1274
  return t === "" ? !0 : Y(t) ? !!n.test(t) : !1;
1275
- }, Le = {
1275
+ }, De = {
1276
1276
  CURRENCY: {
1277
1277
  minDecimalPlaces: 2,
1278
1278
  maxDecimalPlaces: 10,
@@ -1287,19 +1287,19 @@ const nu = (t) => {
1287
1287
  decimalPlacesWhenZero: 1,
1288
1288
  allowLeadingZerosInDecimalPart: !0
1289
1289
  }
1290
- }, fi = (t, e) => fr(t, {
1291
- ...Le.CURRENCY,
1290
+ }, fi = (t, e) => lr(t, {
1291
+ ...De.CURRENCY,
1292
1292
  ...e || {}
1293
- }), hi = (t, e) => fr(t, {
1294
- ...Le.TOKEN,
1293
+ }), hi = (t, e) => lr(t, {
1294
+ ...De.TOKEN,
1295
1295
  ...e || {}
1296
- }), fr = (t, { minDecimalPlaces: e, maxDecimalPlaces: n, minDecimalSignificantDigits: r, decimalPlacesWhenZero: s, allowLeadingZerosInDecimalPart: o } = Le.CURRENCY) => {
1296
+ }), lr = (t, { minDecimalPlaces: e, maxDecimalPlaces: n, minDecimalSignificantDigits: r, decimalPlacesWhenZero: s, allowLeadingZerosInDecimalPart: o } = De.CURRENCY) => {
1297
1297
  if (!Y(t))
1298
1298
  return null;
1299
- const a = new nn(typeof t == "bigint" ? t.toString() : t);
1299
+ const a = new rn(typeof t == "bigint" ? t.toString() : t);
1300
1300
  let i;
1301
1301
  const c = `0.${"".padStart(s - 1, "0")}1`;
1302
- if (a.lt(new nn(c)) && !o)
1302
+ if (a.lt(new rn(c)) && !o)
1303
1303
  i = `0.${"".padStart(s, "0")}`;
1304
1304
  else if (a.gte(1))
1305
1305
  i = a.toFormat(e);
@@ -1312,30 +1312,30 @@ const nu = (t) => {
1312
1312
  return l.length < d && (l = i.substring(0, d)), l;
1313
1313
  }, pi = (t, e = 18) => {
1314
1314
  const n = t.replace(",", ".");
1315
- return !t || !Y(n) ? 0n : vt(n, Number(e)).value;
1315
+ return !t || !Y(n) ? 0n : xt(n, Number(e)).value;
1316
1316
  };
1317
1317
  function Ut(t) {
1318
1318
  return Dt.bnToUint256(t);
1319
1319
  }
1320
- const su = (t, e) => `${t} ${e}${t === 1 ? "" : "s"}`, ou = (t) => new Promise((e, n) => {
1320
+ const cu = (t, e) => `${t} ${e}${t === 1 ? "" : "s"}`, lu = (t) => new Promise((e, n) => {
1321
1321
  const r = new FileReader();
1322
1322
  r.onload = () => {
1323
1323
  var s;
1324
1324
  return r.result ? e((s = r.result) == null ? void 0 : s.toString()) : n(new Error("Could not read file"));
1325
1325
  }, r.onerror = n, r.onabort = n.bind(null, new Error("User aborted")), r.readAsText(t);
1326
1326
  });
1327
- function au(t) {
1327
+ function uu(t) {
1328
1328
  try {
1329
- return fs(Kn(t));
1329
+ return ds(zn(t));
1330
1330
  } catch {
1331
1331
  return t;
1332
1332
  }
1333
1333
  }
1334
- const iu = (t, e) => {
1334
+ const du = (t, e) => {
1335
1335
  const n = new URLSearchParams(e), r = n.size ? `?${n}` : "";
1336
- return R(...oe(t), r);
1336
+ return k(...oe(t), r);
1337
1337
  };
1338
- function cu(t) {
1338
+ function fu(t) {
1339
1339
  return (...e) => {
1340
1340
  t(...e);
1341
1341
  };
@@ -1345,18 +1345,18 @@ class mi extends Error {
1345
1345
  super(`${e}::${n}`), this.name = e, this.code = n, this.name = e;
1346
1346
  }
1347
1347
  }
1348
- class xn extends mi {
1348
+ class An extends mi {
1349
1349
  constructor(e) {
1350
1350
  super("BackendPaginationError", e);
1351
1351
  }
1352
1352
  }
1353
- const vn = 32;
1354
- class lu {
1353
+ const xn = 32;
1354
+ class hu {
1355
1355
  constructor(e, n, r) {
1356
- this.apiBase = e, this.headers = n, this.imageOptimizationUrl = r, this.httpService = new Ue(this.headers, "json");
1356
+ this.apiBase = e, this.headers = n, this.imageOptimizationUrl = r, this.httpService = new je(this.headers, "json");
1357
1357
  }
1358
1358
  async getNfts(e, n, r, s = 1) {
1359
- const o = this.normalizeAddress(r), a = R(this.apiBase, "pandora", e, n), i = this.pageToPageIndex(s), l = `${R(a, "profile", o, "nfts")}?page=${i}&size=${vn}`, d = await this.httpService.get(l), u = d.content.map((w) => this.mapItem(w, r));
1359
+ 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=${xn}`, d = await this.httpService.get(l), u = d.content.map((w) => this.mapItem(w, r));
1360
1360
  return {
1361
1361
  totalPages: d.totalPages,
1362
1362
  page: d.number + 1,
@@ -1365,7 +1365,7 @@ class lu {
1365
1365
  };
1366
1366
  }
1367
1367
  async getCollection(e, n, r) {
1368
- const s = this.normalizeAddress(r), o = R(this.apiBase, "pandora", e, n), a = R(o, "collection", s), i = `${o}/collection/${s}`, [c, l] = await Promise.all([
1368
+ 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([
1369
1369
  this.httpService.get(a),
1370
1370
  this.httpService.get(i)
1371
1371
  ]), d = Ee(c), u = l.content.map((w) => this.mapItem(w));
@@ -1380,11 +1380,11 @@ class lu {
1380
1380
  };
1381
1381
  }
1382
1382
  async getNft(e, n, r, s) {
1383
- const o = this.normalizeAddress(r), a = R(this.apiBase, "pandora", e, n), i = R(a, "nft", o, s), c = await this.httpService.get(i);
1383
+ const o = this.normalizeAddress(r), a = k(this.apiBase, "pandora", e, n), i = k(a, "nft", o, s), c = await this.httpService.get(i);
1384
1384
  return this.mapItem(c);
1385
1385
  }
1386
1386
  async getProfileCollections(e, n, r, s = 1, o = !1) {
1387
- const a = this.pageToPageIndex(s), i = this.normalizeAddress(r), c = R(this.apiBase, "pandora", e, n), l = R(c, "profile", i, "collections", `?page=${a}&size=${vn}`), d = await this.httpService.get(l), u = [];
1387
+ 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=${xn}`), d = await this.httpService.get(l), u = [];
1388
1388
  for (const w of d.content)
1389
1389
  if (o) {
1390
1390
  const m = await this.getCollectionMetrics(e, n, w.contractAddress);
@@ -1399,18 +1399,18 @@ class lu {
1399
1399
  };
1400
1400
  }
1401
1401
  async getCollectionMetrics(e, n, r) {
1402
- const s = this.normalizeAddress(r), o = R(this.apiBase, "pandora", e, n), a = R(o, "collection", s, "metrics");
1402
+ const s = this.normalizeAddress(r), o = k(this.apiBase, "pandora", e, n), a = k(o, "collection", s, "metrics");
1403
1403
  return this.httpService.get(a);
1404
1404
  }
1405
1405
  normalizeAddress(e) {
1406
- return Vn.parse(e);
1406
+ return Ln.parse(e);
1407
1407
  }
1408
1408
  pageToPageIndex(e) {
1409
1409
  if (!Number.isInteger(e))
1410
- throw new xn("notANumber");
1410
+ throw new An("notANumber");
1411
1411
  const n = e - 1;
1412
1412
  if (n < 0)
1413
- throw new xn("tooLow");
1413
+ throw new An("tooLow");
1414
1414
  return n;
1415
1415
  }
1416
1416
  optimizeImage(e, n, r) {
@@ -1447,7 +1447,7 @@ class lu {
1447
1447
  owner: {
1448
1448
  account_address: ((s = e.owner) == null ? void 0 : s.address) || n
1449
1449
  },
1450
- contract_name: or(e.contractAddress)
1450
+ contract_name: nr(e.contractAddress)
1451
1451
  };
1452
1452
  }
1453
1453
  }
@@ -1464,7 +1464,7 @@ function gi(t) {
1464
1464
  function Ee(t, e) {
1465
1465
  return {
1466
1466
  contractAddress: se.parse(t.contractAddress),
1467
- name: t.name || or(t.contractAddress),
1467
+ name: t.name || nr(t.contractAddress),
1468
1468
  description: t.description ?? "",
1469
1469
  imageUri: t.imageUrls.preview ?? ee(t.name || t.contractAddress.replace("0x", ""), {
1470
1470
  background: "#15192A",
@@ -1482,29 +1482,29 @@ function Ee(t, e) {
1482
1482
  }
1483
1483
  };
1484
1484
  }
1485
- const hr = async (t, e, n, r, s = 1) => {
1485
+ const ur = async (t, e, n, r, s = 1) => {
1486
1486
  const o = await t.getNfts(e, n, r, s);
1487
1487
  if (s < o.totalPages) {
1488
- const a = await hr(t, e, n, r, o.page + 1);
1488
+ const a = await ur(t, e, n, r, o.page + 1);
1489
1489
  return {
1490
1490
  ...o,
1491
1491
  nfts: o.nfts.concat(a.nfts)
1492
1492
  };
1493
1493
  }
1494
1494
  return o;
1495
- }, uu = (t, e, n, r, s) => {
1496
- const { data: o, ...a } = ae(r && [r, "nfts"], () => r && hr(t, e, n, r), {
1495
+ }, pu = (t, e, n, r, s) => {
1496
+ const { data: o, ...a } = ae(r && [r, "nfts"], () => r && ur(t, e, n, r), {
1497
1497
  refreshInterval: 3e5,
1498
1498
  ...s
1499
1499
  });
1500
1500
  return { nfts: o == null ? void 0 : o.nfts, ...a };
1501
- }, du = (t, e, n, r, s) => {
1501
+ }, mu = (t, e, n, r, s) => {
1502
1502
  const { data: o, ...a } = ae(r && [`${r}`, "nfts-collection"], () => r && t.getCollection(e, n, r), {
1503
1503
  refreshInterval: 6e4,
1504
1504
  ...s
1505
1505
  });
1506
1506
  return { collection: o, ...a };
1507
- }, fu = (t, e, n, r, s, o) => {
1507
+ }, gu = (t, e, n, r, s, o) => {
1508
1508
  const { data: a, ...i } = ae(s && r && [`${r}:${s}`, "nft"], () => s && r ? t.getNft(e, n, r, s) : void 0, {
1509
1509
  refreshInterval: 6e4,
1510
1510
  revalidateOnFocus: !1,
@@ -1512,7 +1512,7 @@ const hr = async (t, e, n, r, s = 1) => {
1512
1512
  ...o
1513
1513
  });
1514
1514
  return { nft: a, ...i };
1515
- }, hu = ({ image_uri: t, image_url_copy: e }) => {
1515
+ }, wu = ({ image_uri: t, image_url_copy: e }) => {
1516
1516
  if (t && e) {
1517
1517
  if (!e.startsWith("ipfs://"))
1518
1518
  return e;
@@ -1520,15 +1520,15 @@ const hr = async (t, e, n, r, s = 1) => {
1520
1520
  return t;
1521
1521
  }
1522
1522
  return e || t;
1523
- }, pu = (t, e) => t.token_id === e.token_id && nt(t.contract_address, e.contract_address);
1524
- function In(t) {
1523
+ }, yu = (t, e) => t.token_id === e.token_id && nt(t.contract_address, e.contract_address);
1524
+ function vn(t) {
1525
1525
  if (!Number.isSafeInteger(t) || t < 0)
1526
1526
  throw new Error(`Wrong positive integer: ${t}`);
1527
1527
  }
1528
1528
  function wi(t) {
1529
1529
  return t instanceof Uint8Array || t != null && typeof t == "object" && t.constructor.name === "Uint8Array";
1530
1530
  }
1531
- function pr(t, ...e) {
1531
+ function dr(t, ...e) {
1532
1532
  if (!wi(t))
1533
1533
  throw new Error("Expected Uint8Array");
1534
1534
  if (e.length > 0 && !e.includes(t.length))
@@ -1540,15 +1540,15 @@ function ne(t, e = !0) {
1540
1540
  if (e && t.finished)
1541
1541
  throw new Error("Hash#digest() has already been called");
1542
1542
  }
1543
- function mr(t, e) {
1544
- pr(t);
1543
+ function fr(t, e) {
1544
+ dr(t);
1545
1545
  const n = e.outputLen;
1546
1546
  if (t.length < n)
1547
1547
  throw new Error(`digestInto() expects output buffer of length at least ${n}`);
1548
1548
  }
1549
- const Kt = /* @__PURE__ */ BigInt(2 ** 32 - 1), Tn = /* @__PURE__ */ BigInt(32);
1549
+ const Kt = /* @__PURE__ */ BigInt(2 ** 32 - 1), In = /* @__PURE__ */ BigInt(32);
1550
1550
  function yi(t, e = !1) {
1551
- return e ? { h: Number(t & Kt), l: Number(t >> Tn & Kt) } : { h: Number(t >> Tn & Kt) | 0, l: Number(t & Kt) | 0 };
1551
+ return e ? { h: Number(t & Kt), l: Number(t >> In & Kt) } : { h: Number(t >> In & Kt) | 0, l: Number(t & Kt) | 0 };
1552
1552
  }
1553
1553
  function bi(t, e = !1) {
1554
1554
  let n = new Uint32Array(t.length), r = new Uint32Array(t.length);
@@ -1567,48 +1567,48 @@ function Ii(t) {
1567
1567
  const Ae = (t) => new DataView(t.buffer, t.byteOffset, t.byteLength), J = (t, e) => t << 32 - e | t >>> e, Ti = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
1568
1568
  if (!Ti)
1569
1569
  throw new Error("Non little-endian hardware is not supported");
1570
- function gr(t) {
1570
+ function hr(t) {
1571
1571
  if (typeof t != "string")
1572
1572
  throw new Error(`utf8ToBytes expected string, got ${typeof t}`);
1573
1573
  return new Uint8Array(new TextEncoder().encode(t));
1574
1574
  }
1575
- function De(t) {
1576
- if (typeof t == "string" && (t = gr(t)), !Ii(t))
1575
+ function He(t) {
1576
+ if (typeof t == "string" && (t = hr(t)), !Ii(t))
1577
1577
  throw new Error(`expected Uint8Array, got ${typeof t}`);
1578
1578
  return t;
1579
1579
  }
1580
- let wr = class {
1580
+ let pr = class {
1581
1581
  // Safe version that clones internal state
1582
1582
  clone() {
1583
1583
  return this._cloneInto();
1584
1584
  }
1585
1585
  };
1586
- function yr(t) {
1587
- const e = (r) => t().update(De(r)).digest(), n = t();
1586
+ function mr(t) {
1587
+ const e = (r) => t().update(He(r)).digest(), n = t();
1588
1588
  return e.outputLen = n.outputLen, e.blockLen = n.blockLen, e.create = () => t(), e;
1589
1589
  }
1590
- const [br, Sr, Er] = [[], [], []], Bi = /* @__PURE__ */ BigInt(0), kt = /* @__PURE__ */ BigInt(1), _i = /* @__PURE__ */ BigInt(2), Ni = /* @__PURE__ */ BigInt(7), Ci = /* @__PURE__ */ BigInt(256), Oi = /* @__PURE__ */ BigInt(113);
1591
- for (let t = 0, e = kt, n = 1, r = 0; t < 24; t++) {
1592
- [n, r] = [r, (2 * n + 3 * r) % 5], br.push(2 * (5 * r + n)), Sr.push((t + 1) * (t + 2) / 2 % 64);
1590
+ const [gr, wr, yr] = [[], [], []], Bi = /* @__PURE__ */ BigInt(0), Ot = /* @__PURE__ */ BigInt(1), _i = /* @__PURE__ */ BigInt(2), Ni = /* @__PURE__ */ BigInt(7), Ci = /* @__PURE__ */ BigInt(256), Oi = /* @__PURE__ */ BigInt(113);
1591
+ for (let t = 0, e = Ot, n = 1, r = 0; t < 24; t++) {
1592
+ [n, r] = [r, (2 * n + 3 * r) % 5], gr.push(2 * (5 * r + n)), wr.push((t + 1) * (t + 2) / 2 % 64);
1593
1593
  let s = Bi;
1594
1594
  for (let o = 0; o < 7; o++)
1595
- e = (e << kt ^ (e >> Ni) * Oi) % Ci, e & _i && (s ^= kt << (kt << /* @__PURE__ */ BigInt(o)) - kt);
1596
- Er.push(s);
1595
+ e = (e << Ot ^ (e >> Ni) * Oi) % Ci, e & _i && (s ^= Ot << (Ot << /* @__PURE__ */ BigInt(o)) - Ot);
1596
+ yr.push(s);
1597
1597
  }
1598
- const [ki, Pi] = /* @__PURE__ */ bi(Er, !0), Bn = (t, e, n) => n > 32 ? Ai(t, e, n) : Si(t, e, n), _n = (t, e, n) => n > 32 ? xi(t, e, n) : Ei(t, e, n);
1598
+ const [ki, Pi] = /* @__PURE__ */ bi(yr, !0), Tn = (t, e, n) => n > 32 ? Ai(t, e, n) : Si(t, e, n), Bn = (t, e, n) => n > 32 ? xi(t, e, n) : Ei(t, e, n);
1599
1599
  function Ri(t, e = 24) {
1600
1600
  const n = new Uint32Array(10);
1601
1601
  for (let r = 24 - e; r < 24; r++) {
1602
1602
  for (let a = 0; a < 10; a++)
1603
1603
  n[a] = t[a] ^ t[a + 10] ^ t[a + 20] ^ t[a + 30] ^ t[a + 40];
1604
1604
  for (let a = 0; a < 10; a += 2) {
1605
- 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];
1605
+ const i = (a + 8) % 10, c = (a + 2) % 10, l = n[c], d = n[c + 1], u = Tn(l, d, 1) ^ n[i], w = Bn(l, d, 1) ^ n[i + 1];
1606
1606
  for (let m = 0; m < 50; m += 10)
1607
1607
  t[a + m] ^= u, t[a + m + 1] ^= w;
1608
1608
  }
1609
1609
  let s = t[2], o = t[3];
1610
1610
  for (let a = 0; a < 24; a++) {
1611
- const i = Sr[a], c = Bn(s, o, i), l = _n(s, o, i), d = br[a];
1611
+ const i = wr[a], c = Tn(s, o, i), l = Bn(s, o, i), d = gr[a];
1612
1612
  s = t[d], o = t[d + 1], t[d] = c, t[d + 1] = l;
1613
1613
  }
1614
1614
  for (let a = 0; a < 50; a += 10) {
@@ -1621,10 +1621,10 @@ function Ri(t, e = 24) {
1621
1621
  }
1622
1622
  n.fill(0);
1623
1623
  }
1624
- class He extends wr {
1624
+ class Ve extends pr {
1625
1625
  // NOTE: we accept arguments in bytes instead of bits here.
1626
1626
  constructor(e, n, r, s = !1, o = 24) {
1627
- 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)
1627
+ 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, vn(r), 0 >= this.blockLen || this.blockLen >= 200)
1628
1628
  throw new Error("Sha3 supports only keccak-f1600 function");
1629
1629
  this.state = new Uint8Array(200), this.state32 = vi(this.state);
1630
1630
  }
@@ -1634,7 +1634,7 @@ class He extends wr {
1634
1634
  update(e) {
1635
1635
  ne(this);
1636
1636
  const { blockLen: n, state: r } = this;
1637
- e = De(e);
1637
+ e = He(e);
1638
1638
  const s = e.length;
1639
1639
  for (let o = 0; o < s; ) {
1640
1640
  const a = Math.min(n - this.pos, s - o);
@@ -1652,7 +1652,7 @@ class He extends wr {
1652
1652
  e[r] ^= n, n & 128 && r === s - 1 && this.keccak(), e[s - 1] ^= 128, this.keccak();
1653
1653
  }
1654
1654
  writeInto(e) {
1655
- ne(this, !1), pr(e), this.finish();
1655
+ ne(this, !1), dr(e), this.finish();
1656
1656
  const n = this.state, { blockLen: r } = this;
1657
1657
  for (let s = 0, o = e.length; s < o; ) {
1658
1658
  this.posOut >= r && this.keccak();
@@ -1667,10 +1667,10 @@ class He extends wr {
1667
1667
  return this.writeInto(e);
1668
1668
  }
1669
1669
  xof(e) {
1670
- return In(e), this.xofInto(new Uint8Array(e));
1670
+ return vn(e), this.xofInto(new Uint8Array(e));
1671
1671
  }
1672
1672
  digestInto(e) {
1673
- if (mr(e, this), this.finished)
1673
+ if (fr(e, this), this.finished)
1674
1674
  throw new Error("digest() was already called");
1675
1675
  return this.writeInto(e), this.destroy(), e;
1676
1676
  }
@@ -1682,24 +1682,24 @@ class He extends wr {
1682
1682
  }
1683
1683
  _cloneInto(e) {
1684
1684
  const { blockLen: n, suffix: r, outputLen: s, rounds: o, enableXOF: a } = this;
1685
- return e || (e = new He(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;
1685
+ return e || (e = new Ve(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;
1686
1686
  }
1687
1687
  }
1688
- const $i = (t, e, n) => yr(() => new He(e, t, n)), Fi = /* @__PURE__ */ $i(1, 136, 256 / 8);
1688
+ const $i = (t, e, n) => mr(() => new Ve(e, t, n)), Fi = /* @__PURE__ */ $i(1, 136, 256 / 8);
1689
1689
  function Ui(t, e, n, r) {
1690
1690
  if (typeof t.setBigUint64 == "function")
1691
1691
  return t.setBigUint64(e, n, r);
1692
1692
  const s = BigInt(32), o = BigInt(4294967295), a = Number(n >> s & o), i = Number(n & o), c = r ? 4 : 0, l = r ? 0 : 4;
1693
1693
  t.setUint32(e + c, a, r), t.setUint32(e + l, i, r);
1694
1694
  }
1695
- class ji extends wr {
1695
+ class ji extends pr {
1696
1696
  constructor(e, n, r, s) {
1697
1697
  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);
1698
1698
  }
1699
1699
  update(e) {
1700
1700
  ne(this);
1701
1701
  const { view: n, buffer: r, blockLen: s } = this;
1702
- e = De(e);
1702
+ e = He(e);
1703
1703
  const o = e.length;
1704
1704
  for (let a = 0; a < o; ) {
1705
1705
  const i = Math.min(s - this.pos, o - a);
@@ -1714,7 +1714,7 @@ class ji extends wr {
1714
1714
  return this.length += e.length, this.roundClean(), this;
1715
1715
  }
1716
1716
  digestInto(e) {
1717
- ne(this), mr(e, this), this.finished = !0;
1717
+ ne(this), fr(e, this), this.finished = !0;
1718
1718
  const { buffer: n, view: r, blockLen: s, isLE: o } = this;
1719
1719
  let { pos: a } = this;
1720
1720
  n[a++] = 128, this.buffer.subarray(a).fill(0), this.padOffset > s - a && (this.process(r, 0), a = 0);
@@ -1850,10 +1850,10 @@ class Vi extends ji {
1850
1850
  this.set(0, 0, 0, 0, 0, 0, 0, 0), this.buffer.fill(0);
1851
1851
  }
1852
1852
  }
1853
- const Ar = /* @__PURE__ */ yr(() => new Vi());
1853
+ const br = /* @__PURE__ */ mr(() => new Vi());
1854
1854
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
1855
- const xr = BigInt(0), fe = BigInt(1), Mi = BigInt(2), he = (t) => t instanceof Uint8Array, Gi = Array.from({ length: 256 }, (t, e) => e.toString(16).padStart(2, "0"));
1856
- function pt(t) {
1855
+ const Sr = BigInt(0), fe = BigInt(1), Mi = BigInt(2), he = (t) => t instanceof Uint8Array, Gi = Array.from({ length: 256 }, (t, e) => e.toString(16).padStart(2, "0"));
1856
+ function ht(t) {
1857
1857
  if (!he(t))
1858
1858
  throw new Error("Uint8Array expected");
1859
1859
  let e = "";
@@ -1861,16 +1861,16 @@ function pt(t) {
1861
1861
  e += Gi[t[n]];
1862
1862
  return e;
1863
1863
  }
1864
- function vr(t) {
1864
+ function Er(t) {
1865
1865
  const e = t.toString(16);
1866
1866
  return e.length & 1 ? `0${e}` : e;
1867
1867
  }
1868
- function Ve(t) {
1868
+ function Me(t) {
1869
1869
  if (typeof t != "string")
1870
1870
  throw new Error("hex string expected, got " + typeof t);
1871
1871
  return BigInt(t === "" ? "0" : `0x${t}`);
1872
1872
  }
1873
- function mt(t) {
1873
+ function pt(t) {
1874
1874
  if (typeof t != "string")
1875
1875
  throw new Error("hex string expected, got " + typeof t);
1876
1876
  if (t.length % 2)
@@ -1885,19 +1885,19 @@ function mt(t) {
1885
1885
  return e;
1886
1886
  }
1887
1887
  function X(t) {
1888
- return Ve(pt(t));
1888
+ return Me(ht(t));
1889
1889
  }
1890
- function Me(t) {
1890
+ function Ge(t) {
1891
1891
  if (!he(t))
1892
1892
  throw new Error("Uint8Array expected");
1893
- return Ve(pt(Uint8Array.from(t).reverse()));
1893
+ return Me(ht(Uint8Array.from(t).reverse()));
1894
1894
  }
1895
- const At = (t, e) => mt(t.toString(16).padStart(e * 2, "0")), Ir = (t, e) => At(t, e).reverse(), zi = (t) => mt(vr(t));
1895
+ const Et = (t, e) => pt(t.toString(16).padStart(e * 2, "0")), Ar = (t, e) => Et(t, e).reverse(), zi = (t) => pt(Er(t));
1896
1896
  function V(t, e, n) {
1897
1897
  let r;
1898
1898
  if (typeof e == "string")
1899
1899
  try {
1900
- r = mt(e);
1900
+ r = pt(e);
1901
1901
  } catch (o) {
1902
1902
  throw new Error(`${t} must be valid hex string, got "${e}". Cause: ${o}`);
1903
1903
  }
@@ -1934,12 +1934,12 @@ function Wi(t) {
1934
1934
  }
1935
1935
  function Ki(t) {
1936
1936
  let e;
1937
- for (e = 0; t > xr; t >>= fe, e += 1)
1937
+ for (e = 0; t > Sr; t >>= fe, e += 1)
1938
1938
  ;
1939
1939
  return e;
1940
1940
  }
1941
- const Zi = (t, e) => t >> BigInt(e) & fe, Yi = (t, e, n) => t | (n ? fe : xr) << BigInt(e), pe = (t) => (Mi << BigInt(t - 1)) - fe, xe = (t) => new Uint8Array(t), Nn = (t) => Uint8Array.from(t);
1942
- function Tr(t, e, n) {
1941
+ const Zi = (t, e) => t >> BigInt(e) & fe, Yi = (t, e, n) => t | (n ? fe : Sr) << BigInt(e), pe = (t) => (Mi << BigInt(t - 1)) - fe, xe = (t) => new Uint8Array(t), _n = (t) => Uint8Array.from(t);
1942
+ function xr(t, e, n) {
1943
1943
  if (typeof t != "number" || t < 2)
1944
1944
  throw new Error("hashLen must be a number");
1945
1945
  if (typeof e != "number" || e < 2)
@@ -1950,7 +1950,7 @@ function Tr(t, e, n) {
1950
1950
  const a = () => {
1951
1951
  r.fill(1), s.fill(0), o = 0;
1952
1952
  }, i = (...u) => n(s, r, ...u), c = (u = xe()) => {
1953
- s = i(Nn([0]), u), r = i(), u.length !== 0 && (s = i(Nn([1]), u), r = i());
1953
+ s = i(_n([0]), u), r = i(), u.length !== 0 && (s = i(_n([1]), u), r = i());
1954
1954
  }, l = () => {
1955
1955
  if (o++ >= 1e3)
1956
1956
  throw new Error("drbg: tried 1000 values");
@@ -2002,24 +2002,24 @@ const Ji = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2002
2002
  bitLen: Ki,
2003
2003
  bitMask: pe,
2004
2004
  bitSet: Yi,
2005
- bytesToHex: pt,
2005
+ bytesToHex: ht,
2006
2006
  bytesToNumberBE: X,
2007
- bytesToNumberLE: Me,
2007
+ bytesToNumberLE: Ge,
2008
2008
  concatBytes: jt,
2009
- createHmacDrbg: Tr,
2009
+ createHmacDrbg: xr,
2010
2010
  ensureBytes: V,
2011
2011
  equalBytes: qi,
2012
- hexToBytes: mt,
2013
- hexToNumber: Ve,
2014
- numberToBytesBE: At,
2015
- numberToBytesLE: Ir,
2016
- numberToHexUnpadded: vr,
2012
+ hexToBytes: pt,
2013
+ hexToNumber: Me,
2014
+ numberToBytesBE: Et,
2015
+ numberToBytesLE: Ar,
2016
+ numberToHexUnpadded: Er,
2017
2017
  numberToVarBytesBE: zi,
2018
2018
  utf8ToBytes: Wi,
2019
2019
  validateObject: Gt
2020
2020
  }, Symbol.toStringTag, { value: "Module" }));
2021
2021
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
2022
- const U = BigInt(0), $ = BigInt(1), ut = BigInt(2), Qi = BigInt(3), _e = BigInt(4), Cn = BigInt(5), On = BigInt(8);
2022
+ const U = BigInt(0), $ = BigInt(1), ut = BigInt(2), Qi = BigInt(3), _e = BigInt(4), Nn = BigInt(5), Cn = BigInt(8);
2023
2023
  BigInt(9);
2024
2024
  BigInt(16);
2025
2025
  function M(t, e) {
@@ -2091,8 +2091,8 @@ function nc(t) {
2091
2091
  return o;
2092
2092
  };
2093
2093
  }
2094
- if (t % On === Cn) {
2095
- const e = (t - Cn) / On;
2094
+ if (t % Cn === Nn) {
2095
+ const e = (t - Nn) / Cn;
2096
2096
  return function(r, s) {
2097
2097
  const o = r.mul(s, ut), a = r.pow(o, e), i = r.mul(s, a), c = r.mul(r.mul(i, ut), a), l = r.mul(i, r.sub(c, r.ONE));
2098
2098
  if (!r.eql(r.sqr(l), s))
@@ -2121,7 +2121,7 @@ const rc = [
2121
2121
  "mulN",
2122
2122
  "sqrN"
2123
2123
  ];
2124
- function Ge(t) {
2124
+ function ze(t) {
2125
2125
  const e = {
2126
2126
  ORDER: "bigint",
2127
2127
  MASK: "bigint",
@@ -2130,7 +2130,7 @@ function Ge(t) {
2130
2130
  }, n = rc.reduce((r, s) => (r[s] = "function", r), e);
2131
2131
  return Gt(t, n);
2132
2132
  }
2133
- function Br(t, e, n) {
2133
+ function vr(t, e, n) {
2134
2134
  if (n < U)
2135
2135
  throw new Error("Expected power > 0");
2136
2136
  if (n === U)
@@ -2146,14 +2146,14 @@ function sc(t, e) {
2146
2146
  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);
2147
2147
  return e.reduceRight((o, a, i) => t.is0(a) ? o : (n[i] = t.mul(o, n[i]), t.mul(o, a)), s), n;
2148
2148
  }
2149
- function ze(t, e) {
2149
+ function qe(t, e) {
2150
2150
  const n = e !== void 0 ? e : t.toString(2).length, r = Math.ceil(n / 8);
2151
2151
  return { nBitLength: n, nByteLength: r };
2152
2152
  }
2153
- function qe(t, e, n = !1, r = {}) {
2153
+ function We(t, e, n = !1, r = {}) {
2154
2154
  if (t <= U)
2155
2155
  throw new Error(`Expected Fp ORDER > 0, got ${t}`);
2156
- const { nBitLength: s, nByteLength: o } = ze(t, e);
2156
+ const { nBitLength: s, nByteLength: o } = qe(t, e);
2157
2157
  if (o > 2048)
2158
2158
  throw new Error("Field lengths over 2048 bytes are not supported");
2159
2159
  const a = nc(t), i = Object.freeze({
@@ -2177,7 +2177,7 @@ function qe(t, e, n = !1, r = {}) {
2177
2177
  add: (c, l) => M(c + l, t),
2178
2178
  sub: (c, l) => M(c - l, t),
2179
2179
  mul: (c, l) => M(c * l, t),
2180
- pow: (c, l) => Br(i, c, l),
2180
+ pow: (c, l) => vr(i, c, l),
2181
2181
  div: (c, l) => M(c * Ne(l, t), t),
2182
2182
  // Same as above, but doesn't normalize
2183
2183
  sqrN: (c) => c * c,
@@ -2190,27 +2190,27 @@ function qe(t, e, n = !1, r = {}) {
2190
2190
  // TODO: do we really need constant cmov?
2191
2191
  // We don't have const-time bigints anyway, so probably will be not very useful
2192
2192
  cmov: (c, l, d) => d ? l : c,
2193
- toBytes: (c) => n ? Ir(c, o) : At(c, o),
2193
+ toBytes: (c) => n ? Ar(c, o) : Et(c, o),
2194
2194
  fromBytes: (c) => {
2195
2195
  if (c.length !== o)
2196
2196
  throw new Error(`Fp.fromBytes: expected ${o}, got ${c.length}`);
2197
- return n ? Me(c) : X(c);
2197
+ return n ? Ge(c) : X(c);
2198
2198
  }
2199
2199
  });
2200
2200
  return Object.freeze(i);
2201
2201
  }
2202
2202
  function oc(t, e, n = !1) {
2203
2203
  t = V("privateHash", t);
2204
- const r = t.length, s = ze(e).nByteLength + 8;
2204
+ const r = t.length, s = qe(e).nByteLength + 8;
2205
2205
  if (s < 24 || r < s || r > 1024)
2206
2206
  throw new Error(`hashToPrivateScalar: expected ${s}-1024 bytes of input, got ${r}`);
2207
- const o = n ? Me(t) : X(t);
2207
+ const o = n ? Ge(t) : X(t);
2208
2208
  return M(o, e - $) + $;
2209
2209
  }
2210
2210
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
2211
2211
  function ac(t) {
2212
2212
  const { Fp: e } = t;
2213
- Ge(e);
2213
+ ze(e);
2214
2214
  for (const c of ["t", "roundsFull", "roundsPartial"])
2215
2215
  if (typeof t[c] != "number" || !Number.isSafeInteger(t[c]))
2216
2216
  throw new Error(`Poseidon: invalid param ${c}=${t[c]} (${typeof t[c]})`);
@@ -2220,7 +2220,7 @@ function ac(t) {
2220
2220
  if (n === void 0 && (n = 5), typeof n != "number" || !Number.isSafeInteger(n))
2221
2221
  throw new Error(`Poseidon wrong sboxPower=${n}`);
2222
2222
  const r = BigInt(n);
2223
- let s = (c) => Br(e, c, r);
2223
+ let s = (c) => vr(e, c, r);
2224
2224
  if (n === 3 ? s = (c) => e.mul(e.sqrN(c), c) : n === 5 && (s = (c) => e.mul(e.sqrN(e.sqrN(c)), c)), t.roundsFull % 2 !== 0)
2225
2225
  throw new Error(`Poseidon roundsFull is not even: ${t.roundsFull}`);
2226
2226
  const o = t.roundsFull + t.roundsPartial;
@@ -2337,8 +2337,8 @@ function lc(t, e) {
2337
2337
  }
2338
2338
  };
2339
2339
  }
2340
- function _r(t) {
2341
- return Ge(t.Fp), Gt(t, {
2340
+ function Ir(t) {
2341
+ return ze(t.Fp), Gt(t, {
2342
2342
  n: "bigint",
2343
2343
  h: "bigint",
2344
2344
  Gx: "field",
@@ -2347,14 +2347,14 @@ function _r(t) {
2347
2347
  nBitLength: "isSafeInteger",
2348
2348
  nByteLength: "isSafeInteger"
2349
2349
  }), Object.freeze({
2350
- ...ze(t.n, t.nBitLength),
2350
+ ...qe(t.n, t.nBitLength),
2351
2351
  ...t,
2352
2352
  p: t.Fp.ORDER
2353
2353
  });
2354
2354
  }
2355
2355
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
2356
2356
  function uc(t) {
2357
- const e = _r(t);
2357
+ const e = Ir(t);
2358
2358
  Gt(e, {
2359
2359
  a: "field",
2360
2360
  b: "field"
@@ -2376,7 +2376,7 @@ function uc(t) {
2376
2376
  }
2377
2377
  return Object.freeze({ ...e });
2378
2378
  }
2379
- const { bytesToNumberBE: dc, hexToBytes: fc } = Ji, ft = {
2379
+ const { bytesToNumberBE: dc, hexToBytes: fc } = Ji, dt = {
2380
2380
  // asn.1 DER encoding utils
2381
2381
  Err: class extends Error {
2382
2382
  constructor(e = "") {
@@ -2384,7 +2384,7 @@ const { bytesToNumberBE: dc, hexToBytes: fc } = Ji, ft = {
2384
2384
  }
2385
2385
  },
2386
2386
  _parseInt(t) {
2387
- const { Err: e } = ft;
2387
+ const { Err: e } = dt;
2388
2388
  if (t.length < 2 || t[0] !== 2)
2389
2389
  throw new e("Invalid signature integer tag");
2390
2390
  const n = t[1], r = t.subarray(2, n + 2);
@@ -2397,7 +2397,7 @@ const { bytesToNumberBE: dc, hexToBytes: fc } = Ji, ft = {
2397
2397
  return { d: dc(r), l: t.subarray(n + 2) };
2398
2398
  },
2399
2399
  toSig(t) {
2400
- const { Err: e } = ft, n = typeof t == "string" ? fc(t) : t;
2400
+ const { Err: e } = dt, n = typeof t == "string" ? fc(t) : t;
2401
2401
  if (!(n instanceof Uint8Array))
2402
2402
  throw new Error("ui8a expected");
2403
2403
  let r = n.length;
@@ -2405,7 +2405,7 @@ const { bytesToNumberBE: dc, hexToBytes: fc } = Ji, ft = {
2405
2405
  throw new e("Invalid signature tag");
2406
2406
  if (n[1] !== r - 2)
2407
2407
  throw new e("Invalid signature: incorrect length");
2408
- const { d: s, l: o } = ft._parseInt(n.subarray(2)), { d: a, l: i } = ft._parseInt(o);
2408
+ const { d: s, l: o } = dt._parseInt(n.subarray(2)), { d: a, l: i } = dt._parseInt(o);
2409
2409
  if (i.length)
2410
2410
  throw new e("Invalid signature: left bytes after parsing");
2411
2411
  return { r: s, s: a };
@@ -2419,7 +2419,7 @@ const { bytesToNumberBE: dc, hexToBytes: fc } = Ji, ft = {
2419
2419
  }
2420
2420
  }, et = BigInt(0), q = BigInt(1);
2421
2421
  BigInt(2);
2422
- const kn = BigInt(3);
2422
+ const On = BigInt(3);
2423
2423
  BigInt(4);
2424
2424
  function hc(t) {
2425
2425
  const e = uc(t), { Fp: n } = e, r = e.toBytes || ((S, f, g) => {
@@ -2445,7 +2445,7 @@ function hc(t) {
2445
2445
  function c(S) {
2446
2446
  const { allowedPrivateKeyLengths: f, nByteLength: g, wrapPrivateKey: b, n: E } = e;
2447
2447
  if (f && typeof S != "bigint") {
2448
- if (S instanceof Uint8Array && (S = pt(S)), typeof S != "string" || !f.includes(S.length))
2448
+ if (S instanceof Uint8Array && (S = ht(S)), typeof S != "string" || !f.includes(S.length))
2449
2449
  throw new Error("Invalid key");
2450
2450
  S = S.padStart(g * 2, "0");
2451
2451
  }
@@ -2555,9 +2555,9 @@ function hc(t) {
2555
2555
  // https://eprint.iacr.org/2015/1060, algorithm 3
2556
2556
  // Cost: 8M + 3S + 3*a + 2*b3 + 15add.
2557
2557
  double() {
2558
- const { a: f, b: g } = e, b = n.mul(g, kn), { px: E, py: x, pz: _ } = this;
2559
- let B = n.ZERO, A = n.ZERO, v = n.ZERO, T = n.mul(E, E), G = n.mul(x, x), P = n.mul(_, _), N = n.mul(E, x);
2560
- return N = n.add(N, N), v = n.mul(E, _), v = n.add(v, v), B = n.mul(f, v), A = n.mul(b, P), 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), P = n.mul(f, P), N = n.sub(T, P), N = n.mul(f, N), N = n.add(N, v), v = n.add(T, T), T = n.add(v, T), T = n.add(T, P), T = n.mul(T, N), A = n.add(A, T), P = n.mul(x, _), P = n.add(P, P), T = n.mul(P, N), B = n.sub(B, T), v = n.mul(P, G), v = n.add(v, v), v = n.add(v, v), new u(B, A, v);
2558
+ const { a: f, b: g } = e, b = n.mul(g, On), { px: E, py: x, pz: _ } = this;
2559
+ 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);
2560
+ 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
2561
  }
2562
2562
  // Renes-Costello-Batina exception-free addition formula.
2563
2563
  // There is 30% faster Jacobian formula, but it is not complete.
@@ -2567,11 +2567,11 @@ function hc(t) {
2567
2567
  d(f);
2568
2568
  const { px: g, py: b, pz: E } = this, { px: x, py: _, pz: B } = f;
2569
2569
  let A = n.ZERO, v = n.ZERO, T = n.ZERO;
2570
- const G = e.a, P = n.mul(e.b, kn);
2570
+ const G = e.a, R = n.mul(e.b, On);
2571
2571
  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
2572
  rt = n.mul(rt, p), p = n.add(N, L), rt = n.sub(rt, p), p = n.add(g, E);
2573
2573
  let y = n.add(x, B);
2574
- 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(P, 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(P, 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
+ 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);
2575
2575
  }
2576
2576
  subtract(f) {
2577
2577
  return this.add(f.negate());
@@ -2619,8 +2619,8 @@ function hc(t) {
2619
2619
  const { endo: x } = e;
2620
2620
  if (x) {
2621
2621
  const { k1neg: _, k1: B, k2neg: A, k2: v } = x.splitScalar(g);
2622
- let { p: T, f: G } = this.wNAF(B), { p: P, f: N } = this.wNAF(v);
2623
- T = m.constTimeNegate(_, T), P = m.constTimeNegate(A, P), P = new u(n.mul(P.px, x.beta), P.py, P.pz), b = T.add(P), E = G.add(N);
2622
+ let { p: T, f: G } = this.wNAF(B), { p: R, f: N } = this.wNAF(v);
2623
+ 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
2624
  } else {
2625
2625
  const { p: _, f: B } = this.wNAF(g);
2626
2626
  b = _, E = B;
@@ -2666,7 +2666,7 @@ function hc(t) {
2666
2666
  return this.assertValidity(), r(u, this, f);
2667
2667
  }
2668
2668
  toHex(f = !0) {
2669
- return pt(this.toRawBytes(f));
2669
+ return ht(this.toRawBytes(f));
2670
2670
  }
2671
2671
  }
2672
2672
  u.BASE = new u(e.Gx, e.Gy, n.ONE), u.ZERO = new u(n.ZERO, n.ONE, n.ZERO);
@@ -2680,7 +2680,7 @@ function hc(t) {
2680
2680
  };
2681
2681
  }
2682
2682
  function pc(t) {
2683
- const e = _r(t);
2683
+ const e = Ir(t);
2684
2684
  return Gt(e, {
2685
2685
  hash: "hash",
2686
2686
  hmac: "function",
@@ -2705,13 +2705,13 @@ function mc(t) {
2705
2705
  const { ProjectivePoint: l, normPrivateKeyToScalar: d, weierstrassEquation: u, isWithinCurveOrder: w } = hc({
2706
2706
  ...e,
2707
2707
  toBytes(p, y, I) {
2708
- const k = y.toAffine(), C = n.toBytes(k.x), j = jt;
2709
- return I ? j(Uint8Array.from([y.hasEvenY() ? 2 : 3]), C) : j(Uint8Array.from([4]), C, n.toBytes(k.y));
2708
+ const P = y.toAffine(), C = n.toBytes(P.x), j = jt;
2709
+ return I ? j(Uint8Array.from([y.hasEvenY() ? 2 : 3]), C) : j(Uint8Array.from([4]), C, n.toBytes(P.y));
2710
2710
  },
2711
2711
  fromBytes(p) {
2712
- const y = p.length, I = p[0], k = p.subarray(1);
2712
+ const y = p.length, I = p[0], P = p.subarray(1);
2713
2713
  if (y === s && (I === 2 || I === 3)) {
2714
- const C = X(k);
2714
+ const C = X(P);
2715
2715
  if (!a(C))
2716
2716
  throw new Error("Point is not on curve");
2717
2717
  const j = u(C);
@@ -2719,12 +2719,12 @@ function mc(t) {
2719
2719
  const H = (z & q) === q;
2720
2720
  return (I & 1) === 1 !== H && (z = n.neg(z)), { x: C, y: z };
2721
2721
  } else if (y === o && I === 4) {
2722
- const C = n.fromBytes(k.subarray(0, n.BYTES)), j = n.fromBytes(k.subarray(n.BYTES, 2 * n.BYTES));
2722
+ const C = n.fromBytes(P.subarray(0, n.BYTES)), j = n.fromBytes(P.subarray(n.BYTES, 2 * n.BYTES));
2723
2723
  return { x: C, y: j };
2724
2724
  } else
2725
2725
  throw new Error(`Point of length ${y} was invalid. Expected ${s} compressed bytes or ${o} uncompressed bytes`);
2726
2726
  }
2727
- }), m = (p) => pt(At(p, e.nByteLength));
2727
+ }), m = (p) => ht(Et(p, e.nByteLength));
2728
2728
  function S(p) {
2729
2729
  const y = r >> q;
2730
2730
  return p > y;
@@ -2734,8 +2734,8 @@ function mc(t) {
2734
2734
  }
2735
2735
  const g = (p, y, I) => X(p.slice(y, I));
2736
2736
  class b {
2737
- constructor(y, I, k) {
2738
- this.r = y, this.s = I, this.recovery = k, this.assertValidity();
2737
+ constructor(y, I, P) {
2738
+ this.r = y, this.s = I, this.recovery = P, this.assertValidity();
2739
2739
  }
2740
2740
  // pair (bytes of r, bytes of s)
2741
2741
  static fromCompact(y) {
@@ -2745,8 +2745,8 @@ function mc(t) {
2745
2745
  // DER encoded ECDSA signature
2746
2746
  // https://bitcoin.stackexchange.com/questions/57644/what-are-the-parts-of-a-bitcoin-transaction-input-script
2747
2747
  static fromDER(y) {
2748
- const { r: I, s: k } = ft.toSig(V("DER", y));
2749
- return new b(I, k);
2748
+ const { r: I, s: P } = dt.toSig(V("DER", y));
2749
+ return new b(I, P);
2750
2750
  }
2751
2751
  assertValidity() {
2752
2752
  if (!w(this.r))
@@ -2758,13 +2758,13 @@ function mc(t) {
2758
2758
  return new b(this.r, this.s, y);
2759
2759
  }
2760
2760
  recoverPublicKey(y) {
2761
- const { r: I, s: k, recovery: C } = this, j = v(V("msgHash", y));
2761
+ const { r: I, s: P, recovery: C } = this, j = v(V("msgHash", y));
2762
2762
  if (C == null || ![0, 1, 2, 3].includes(C))
2763
2763
  throw new Error("recovery id invalid");
2764
2764
  const z = C === 2 || C === 3 ? I + e.n : I;
2765
2765
  if (z >= n.ORDER)
2766
2766
  throw new Error("recovery id 2 or 3 invalid");
2767
- const H = C & 1 ? "03" : "02", st = l.fromHex(H + m(z)), ot = c(z), wt = i(-j * ot), _t = i(k * ot), at = l.BASE.multiplyAndAddUnsafe(st, wt, _t);
2767
+ const H = C & 1 ? "03" : "02", st = l.fromHex(H + m(z)), ot = c(z), gt = i(-j * ot), Bt = i(P * ot), at = l.BASE.multiplyAndAddUnsafe(st, gt, Bt);
2768
2768
  if (!at)
2769
2769
  throw new Error("point at infinify");
2770
2770
  return at.assertValidity(), at;
@@ -2778,14 +2778,14 @@ function mc(t) {
2778
2778
  }
2779
2779
  // DER-encoded
2780
2780
  toDERRawBytes() {
2781
- return mt(this.toDERHex());
2781
+ return pt(this.toDERHex());
2782
2782
  }
2783
2783
  toDERHex() {
2784
- return ft.hexFromSig({ r: this.r, s: this.s });
2784
+ return dt.hexFromSig({ r: this.r, s: this.s });
2785
2785
  }
2786
2786
  // padded bytes of r, then padded bytes of s
2787
2787
  toCompactRawBytes() {
2788
- return mt(this.toCompactHex());
2788
+ return pt(this.toCompactHex());
2789
2789
  }
2790
2790
  toCompactHex() {
2791
2791
  return m(this.r) + m(this.s);
@@ -2806,7 +2806,7 @@ function mc(t) {
2806
2806
  */
2807
2807
  randomPrivateKey: () => {
2808
2808
  const p = e.randomBytes(n.BYTES + 8), y = oc(p, r);
2809
- return At(y, e.nByteLength);
2809
+ return Et(y, e.nByteLength);
2810
2810
  },
2811
2811
  /**
2812
2812
  * Creates precompute table for an arbitrary EC point. Makes point "cached".
@@ -2824,8 +2824,8 @@ function mc(t) {
2824
2824
  return l.fromPrivateKey(p).toRawBytes(y);
2825
2825
  }
2826
2826
  function _(p) {
2827
- const y = p instanceof Uint8Array, I = typeof p == "string", k = (y || I) && p.length;
2828
- return y ? k === s || k === o : I ? k === 2 * s || k === 2 * o : p instanceof l;
2827
+ const y = p instanceof Uint8Array, I = typeof p == "string", P = (y || I) && p.length;
2828
+ return y ? P === s || P === o : I ? P === 2 * s || P === 2 * o : p instanceof l;
2829
2829
  }
2830
2830
  function B(p, y, I = !0) {
2831
2831
  if (_(p))
@@ -2845,60 +2845,60 @@ function mc(t) {
2845
2845
  throw new Error("bigint expected");
2846
2846
  if (!(et <= p && p < T))
2847
2847
  throw new Error(`bigint expected < 2^${e.nBitLength}`);
2848
- return At(p, e.nByteLength);
2848
+ return Et(p, e.nByteLength);
2849
2849
  }
2850
- function P(p, y, I = N) {
2850
+ function R(p, y, I = N) {
2851
2851
  if (["recovered", "canonical"].some((lt) => lt in I))
2852
2852
  throw new Error("sign() legacy options not supported");
2853
- const { hash: k, randomBytes: C } = e;
2853
+ const { hash: P, randomBytes: C } = e;
2854
2854
  let { lowS: j, prehash: z, extraEntropy: H } = I;
2855
- j == null && (j = !0), p = V("msgHash", p), z && (p = V("prehashed msgHash", k(p)));
2856
- const st = v(p), ot = d(y), wt = [G(ot), G(st)];
2855
+ j == null && (j = !0), p = V("msgHash", p), z && (p = V("prehashed msgHash", P(p)));
2856
+ const st = v(p), ot = d(y), gt = [G(ot), G(st)];
2857
2857
  if (H != null) {
2858
2858
  const lt = H === !0 ? C(n.BYTES) : H;
2859
- wt.push(V("extraEntropy", lt, n.BYTES));
2859
+ gt.push(V("extraEntropy", lt, n.BYTES));
2860
2860
  }
2861
- const _t = jt(...wt), at = st;
2861
+ const Bt = jt(...gt), at = st;
2862
2862
  function we(lt) {
2863
- const yt = A(lt);
2864
- if (!w(yt))
2863
+ const wt = A(lt);
2864
+ if (!w(wt))
2865
2865
  return;
2866
- const Ze = c(yt), bt = l.BASE.multiply(yt).toAffine(), W = i(bt.x);
2866
+ const Ye = c(wt), yt = l.BASE.multiply(wt).toAffine(), W = i(yt.x);
2867
2867
  if (W === et)
2868
2868
  return;
2869
- const St = i(Ze * i(at + W * ot));
2870
- if (St === et)
2869
+ const bt = i(Ye * i(at + W * ot));
2870
+ if (bt === et)
2871
2871
  return;
2872
- let Ye = (bt.x === W ? 0 : 2) | Number(bt.y & q), Xe = St;
2873
- return j && S(St) && (Xe = f(St), Ye ^= 1), new b(W, Xe, Ye);
2872
+ let Xe = (yt.x === W ? 0 : 2) | Number(yt.y & q), Je = bt;
2873
+ return j && S(bt) && (Je = f(bt), Xe ^= 1), new b(W, Je, Xe);
2874
2874
  }
2875
- return { seed: _t, k2sig: we };
2875
+ return { seed: Bt, k2sig: we };
2876
2876
  }
2877
2877
  const N = { lowS: e.lowS, prehash: !1 }, L = { lowS: e.lowS, prehash: !1 };
2878
2878
  function D(p, y, I = N) {
2879
- const { seed: k, k2sig: C } = P(p, y, I);
2880
- return Tr(e.hash.outputLen, e.nByteLength, e.hmac)(k, C);
2879
+ const { seed: P, k2sig: C } = R(p, y, I);
2880
+ return xr(e.hash.outputLen, e.nByteLength, e.hmac)(P, C);
2881
2881
  }
2882
2882
  l.BASE._setWindowSize(8);
2883
- function rt(p, y, I, k = L) {
2884
- var bt;
2883
+ function rt(p, y, I, P = L) {
2884
+ var yt;
2885
2885
  const C = p;
2886
- if (y = V("msgHash", y), I = V("publicKey", I), "strict" in k)
2886
+ if (y = V("msgHash", y), I = V("publicKey", I), "strict" in P)
2887
2887
  throw new Error("options.strict was renamed to lowS");
2888
- const { lowS: j, prehash: z } = k;
2888
+ const { lowS: j, prehash: z } = P;
2889
2889
  let H, st;
2890
2890
  try {
2891
2891
  if (typeof C == "string" || C instanceof Uint8Array)
2892
2892
  try {
2893
2893
  H = b.fromDER(C);
2894
2894
  } catch (W) {
2895
- if (!(W instanceof ft.Err))
2895
+ if (!(W instanceof dt.Err))
2896
2896
  throw W;
2897
2897
  H = b.fromCompact(C);
2898
2898
  }
2899
2899
  else if (typeof C == "object" && typeof C.r == "bigint" && typeof C.s == "bigint") {
2900
- const { r: W, s: St } = C;
2901
- H = new b(W, St);
2900
+ const { r: W, s: bt } = C;
2901
+ H = new b(W, bt);
2902
2902
  } else
2903
2903
  throw new Error("PARSE");
2904
2904
  st = l.fromHex(I);
@@ -2910,8 +2910,8 @@ function mc(t) {
2910
2910
  if (j && H.hasHighS())
2911
2911
  return !1;
2912
2912
  z && (y = e.hash(y));
2913
- const { r: ot, s: wt } = H, _t = v(y), at = c(wt), we = i(_t * at), lt = i(ot * at), yt = (bt = l.BASE.multiplyAndAddUnsafe(st, we, lt)) == null ? void 0 : bt.toAffine();
2914
- return yt ? i(yt.x) === ot : !1;
2913
+ 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();
2914
+ return wt ? i(wt.x) === ot : !1;
2915
2915
  }
2916
2916
  return {
2917
2917
  CURVE: e,
@@ -2932,7 +2932,7 @@ function gc(t) {
2932
2932
  if (typeof t != "boolean")
2933
2933
  throw new Error(`Expected boolean, not ${t}`);
2934
2934
  }
2935
- function Nr(t, ...e) {
2935
+ function Tr(t, ...e) {
2936
2936
  if (!(t instanceof Uint8Array))
2937
2937
  throw new TypeError("Expected Uint8Array");
2938
2938
  if (e.length > 0 && !e.includes(t.length))
@@ -2950,7 +2950,7 @@ function yc(t, e = !0) {
2950
2950
  throw new Error("Hash#digest() has already been called");
2951
2951
  }
2952
2952
  function bc(t, e) {
2953
- Nr(t);
2953
+ Tr(t);
2954
2954
  const n = e.outputLen;
2955
2955
  if (t.length < n)
2956
2956
  throw new Error(`digestInto() expects output buffer of length at least ${n}`);
@@ -2958,7 +2958,7 @@ function bc(t, e) {
2958
2958
  const Zt = {
2959
2959
  number: Ce,
2960
2960
  bool: gc,
2961
- bytes: Nr,
2961
+ bytes: Tr,
2962
2962
  hash: wc,
2963
2963
  exists: yc,
2964
2964
  output: bc
@@ -3001,7 +3001,7 @@ function Ic(t = 32) {
3001
3001
  return Ie.getRandomValues(new Uint8Array(t));
3002
3002
  throw new Error("crypto.getRandomValues must be defined");
3003
3003
  }
3004
- class Cr extends vc {
3004
+ class Br extends vc {
3005
3005
  constructor(e, n) {
3006
3006
  super(), this.finished = !1, this.destroyed = !1, Zt.hash(e);
3007
3007
  const r = Ac(n);
@@ -3036,61 +3036,61 @@ class Cr extends vc {
3036
3036
  this.destroyed = !0, this.oHash.destroy(), this.iHash.destroy();
3037
3037
  }
3038
3038
  }
3039
- const Or = (t, e, n) => new Cr(t, e).update(n).digest();
3040
- Or.create = (t, e) => new Cr(t, e);
3039
+ const _r = (t, e, n) => new Br(t, e).update(n).digest();
3040
+ _r.create = (t, e) => new Br(t, e);
3041
3041
  /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
3042
3042
  function Tc(t) {
3043
3043
  return {
3044
3044
  hash: t,
3045
- hmac: (e, ...n) => Or(t, e, xc(...n)),
3045
+ hmac: (e, ...n) => _r(t, e, xc(...n)),
3046
3046
  randomBytes: Ic
3047
3047
  };
3048
3048
  }
3049
- const Pn = BigInt("3618502788666131213697322783095070105526743751716087489154079457884512865583"), kr = 252;
3050
- function Rn(t) {
3049
+ const kn = BigInt("3618502788666131213697322783095070105526743751716087489154079457884512865583"), Nr = 252;
3050
+ function Pn(t) {
3051
3051
  for (; t[0] === 0; )
3052
3052
  t = t.subarray(1);
3053
- const e = t.length * 8 - kr, n = X(t);
3053
+ const e = t.length * 8 - Nr, n = X(t);
3054
3054
  return e > 0 ? n >> BigInt(e) : n;
3055
3055
  }
3056
- function Pr(t) {
3057
- return typeof t == "string" && (t = Nc(t), t.length & 1 && (t = "0" + t)), mt(t);
3056
+ function Cr(t) {
3057
+ return typeof t == "string" && (t = Nc(t), t.length & 1 && (t = "0" + t)), pt(t);
3058
3058
  }
3059
- const Rr = mc({
3059
+ const Or = mc({
3060
3060
  a: BigInt(1),
3061
3061
  b: BigInt("3141592653589793238462643383279502884197169399375105820974944592307816406665"),
3062
- Fp: qe(BigInt("0x800000000000011000000000000000000000000000000000000000000000001")),
3063
- n: Pn,
3064
- nBitLength: kr,
3062
+ Fp: We(BigInt("0x800000000000011000000000000000000000000000000000000000000000001")),
3063
+ n: kn,
3064
+ nBitLength: Nr,
3065
3065
  Gx: BigInt("874739451078007766457464989774322083649278607533249481151382481072868806602"),
3066
3066
  Gy: BigInt("152666792071518830868575557812948353041420400780739481342941381225525861407"),
3067
3067
  h: BigInt(1),
3068
3068
  lowS: !1,
3069
- ...Tc(Ar),
3070
- bits2int: Rn,
3069
+ ...Tc(br),
3070
+ bits2int: Pn,
3071
3071
  bits2int_modN: (t) => {
3072
3072
  const e = X(t).toString(16);
3073
- return e.length === 63 && (t = Pr(e + "0")), M(Rn(t), Pn);
3073
+ return e.length === 63 && (t = Cr(e + "0")), M(Pn(t), kn);
3074
3074
  }
3075
3075
  });
3076
3076
  function Bc(t) {
3077
- return V("", typeof t == "string" ? Pr(t) : t);
3077
+ return V("", typeof t == "string" ? Cr(t) : t);
3078
3078
  }
3079
- const { CURVE: wu, ProjectivePoint: Pt, Signature: yu, utils: bu } = Rr;
3079
+ const { CURVE: Eu, ProjectivePoint: kt, Signature: Au, utils: xu } = Or;
3080
3080
  function _c(t) {
3081
- return `0x${pt(t.subarray(1)).replace(/^0+/gm, "")}`;
3081
+ return `0x${ht(t.subarray(1)).replace(/^0+/gm, "")}`;
3082
3082
  }
3083
3083
  function Nc(t) {
3084
3084
  return t.replace(/^0x/i, "");
3085
3085
  }
3086
3086
  const Lt = [
3087
- new Pt(2089986280348253421170679821480865132823066470938446095505822317253594081284n, 1713931329540660377023406109199410414810705867260802078187082345529207694986n, 1n),
3088
- new Pt(996781205833008774514500082376783249102396023663454813447423147977397232763n, 1668503676786377725805489344771023921079126552019160156920634619255970485781n, 1n),
3089
- new Pt(2251563274489750535117886426533222435294046428347329203627021249169616184184n, 1798716007562728905295480679789526322175868328062420237419143593021674992973n, 1n),
3090
- new Pt(2138414695194151160943305727036575959195309218611738193261179310511854807447n, 113410276730064486255102093846540133784865286929052426931474106396135072156n, 1n),
3091
- new Pt(2379962749567351885752724891227938183011949129833673362440656643086021394946n, 776496453633298175483985398648758586525933812536653089401905292063708816422n, 1n)
3087
+ new kt(2089986280348253421170679821480865132823066470938446095505822317253594081284n, 1713931329540660377023406109199410414810705867260802078187082345529207694986n, 1n),
3088
+ new kt(996781205833008774514500082376783249102396023663454813447423147977397232763n, 1668503676786377725805489344771023921079126552019160156920634619255970485781n, 1n),
3089
+ new kt(2251563274489750535117886426533222435294046428347329203627021249169616184184n, 1798716007562728905295480679789526322175868328062420237419143593021674992973n, 1n),
3090
+ new kt(2138414695194151160943305727036575959195309218611738193261179310511854807447n, 113410276730064486255102093846540133784865286929052426931474106396135072156n, 1n),
3091
+ new kt(2379962749567351885752724891227938183011949129833673362440656643086021394946n, 776496453633298175483985398648758586525933812536653089401905292063708816422n, 1n)
3092
3092
  ];
3093
- function $r(t, e) {
3093
+ function kr(t, e) {
3094
3094
  const n = [];
3095
3095
  let r = t;
3096
3096
  for (let s = 0; s < 248; s++)
@@ -3100,7 +3100,7 @@ function $r(t, e) {
3100
3100
  n.push(r), r = r.double();
3101
3101
  return n;
3102
3102
  }
3103
- const Cc = $r(Lt[1], Lt[2]), Oc = $r(Lt[3], Lt[4]);
3103
+ const Cc = kr(Lt[1], Lt[2]), Oc = kr(Lt[3], Lt[4]);
3104
3104
  function kc(t) {
3105
3105
  let e;
3106
3106
  if (typeof t == "bigint")
@@ -3111,11 +3111,11 @@ function kc(t) {
3111
3111
  e = BigInt(t);
3112
3112
  } else
3113
3113
  e = X(Bc(t));
3114
- if (!(0n <= e && e < Rr.CURVE.Fp.ORDER))
3114
+ if (!(0n <= e && e < Or.CURVE.Fp.ORDER))
3115
3115
  throw new Error(`PedersenArg should be 0 <= value < CURVE.P: ${e}`);
3116
3116
  return e;
3117
3117
  }
3118
- function $n(t, e, n) {
3118
+ function Rn(t, e, n) {
3119
3119
  let r = kc(e);
3120
3120
  for (let s = 0; s < 252; s++) {
3121
3121
  const o = n[s];
@@ -3125,30 +3125,30 @@ function $n(t, e, n) {
3125
3125
  }
3126
3126
  return t;
3127
3127
  }
3128
- function Fn(t, e) {
3128
+ function Pc(t, e) {
3129
3129
  let n = Lt[0];
3130
- return n = $n(n, t, Cc), n = $n(n, e, Oc), _c(n.toRawBytes(!0));
3130
+ return n = Rn(n, t, Cc), n = Rn(n, e, Oc), _c(n.toRawBytes(!0));
3131
3131
  }
3132
- const Pc = pe(250), Un = (t) => X(Fi(t)) & Pc;
3133
- qe(BigInt("14474011154664525231415395255581126252639794253786371766033694892385558855681"));
3134
- const Rc = qe(BigInt("3618502788666131213697322783095070105623107215331596699973092056135872020481"));
3135
- function $c(t, e, n) {
3136
- const r = t.fromBytes(Ar(gr(`${e}${n}`)));
3132
+ const Rc = pe(250), $c = (t) => X(Fi(t)) & Rc;
3133
+ We(BigInt("14474011154664525231415395255581126252639794253786371766033694892385558855681"));
3134
+ const Fc = We(BigInt("3618502788666131213697322783095070105623107215331596699973092056135872020481"));
3135
+ function Uc(t, e, n) {
3136
+ const r = t.fromBytes(br(hr(`${e}${n}`)));
3137
3137
  return t.create(r);
3138
3138
  }
3139
- const Fc = [
3139
+ const jc = [
3140
3140
  [3, 1, 1],
3141
3141
  [1, -1, 1],
3142
3142
  [1, 1, -2]
3143
3143
  ].map((t) => t.map(BigInt));
3144
- function Uc(t, e) {
3145
- if (Ge(t.Fp), !Number.isSafeInteger(t.rate) || !Number.isSafeInteger(t.capacity))
3144
+ function Lc(t, e) {
3145
+ if (ze(t.Fp), !Number.isSafeInteger(t.rate) || !Number.isSafeInteger(t.capacity))
3146
3146
  throw new Error(`Wrong poseidon opts: ${t}`);
3147
3147
  const n = t.rate + t.capacity, r = t.roundsFull + t.roundsPartial, s = [];
3148
3148
  for (let a = 0; a < r; a++) {
3149
3149
  const i = [];
3150
3150
  for (let c = 0; c < n; c++)
3151
- i.push($c(t.Fp, "Hades", n * a + c));
3151
+ i.push(Uc(t.Fp, "Hades", n * a + c));
3152
3152
  s.push(i);
3153
3153
  }
3154
3154
  const o = ic({
@@ -3161,39 +3161,64 @@ function Uc(t, e) {
3161
3161
  });
3162
3162
  return o.m = n, o.rate = t.rate, o.capacity = t.capacity, o;
3163
3163
  }
3164
- Uc({ Fp: Rc, rate: 2, capacity: 1, roundsFull: 8, roundsPartial: 83 }, Fc);
3165
- const jc = h.object({
3164
+ Lc({ Fp: Fc, rate: 2, capacity: 1, roundsFull: 8, roundsPartial: 83 }, jc);
3165
+ var Oe;
3166
+ (function(t) {
3167
+ 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";
3168
+ })(Oe || (Oe = {}));
3169
+ const Dc = h.object({
3166
3170
  recoveryId: h.number()
3167
- }), Su = h.object({
3171
+ }), vu = h.object({
3168
3172
  feeToken: se,
3169
3173
  signerSignature: h.object({
3170
3174
  type: h.literal("StarknetKey"),
3171
3175
  signer: h.object({
3172
- publicKey: Rt,
3173
- r: Rt,
3174
- s: Rt
3176
+ publicKey: Pt,
3177
+ r: Pt,
3178
+ s: Pt
3175
3179
  })
3176
3180
  })
3177
- }), Lc = h.enum([
3178
- "ONGOING",
3179
- "COMPLETED",
3180
- "ERROR",
3181
- "CANCELLED",
3182
- "AWAITING_FUNDS"
3183
- ]), Eu = h.object({
3184
- status: Lc.optional(),
3185
- recoveryId: h.number().optional(),
3181
+ }), Hc = h.nativeEnum(Oe), Pr = h.object({
3182
+ recoveryId: h.number(),
3183
+ status: Hc,
3186
3184
  completionTime: h.array(h.number()).optional()
3187
- }), Dc = h.enum([
3185
+ }), Vc = h.object({
3186
+ activeRecovery: Pr.optional().or(h.null()).optional(),
3187
+ minFees: h.record(h.number()).optional()
3188
+ }), Mc = h.object({
3189
+ recovery: Pr.optional().or(h.null()).optional(),
3190
+ minFees: h.record(h.number()).optional()
3191
+ }), Gc = h.enum([
3188
3192
  "undeployedAccount",
3189
3193
  "notEnoughToPayFees"
3190
- ]), Au = h.object({
3191
- status: Dc
3194
+ ]), Iu = h.object({
3195
+ status: Gc
3192
3196
  });
3193
- class xu {
3197
+ class Tu {
3194
3198
  constructor(e, n) {
3195
3199
  this.apiBase = e, this.httpService = n;
3196
3200
  }
3201
+ /**
3202
+ * Retrieves the on-chain recovery details for a given address and recovery ID.
3203
+ * If no recovery ID is provided, it retrieves the latest recovery details.
3204
+ * @param address - The address to retrieve the recovery details.
3205
+ * @param recoveryId - The recovery ID to retrieve the details.
3206
+ * @returns A promise that resolves to the on-chain recovery details.
3207
+ */
3208
+ async getRecovery(e, n) {
3209
+ const r = k(this.apiBase, "accounts", "starknet", e, "recovery", `${n}`), s = await this.httpService.get(r), o = Mc.safeParse(s);
3210
+ return o.error ? null : o.data;
3211
+ }
3212
+ /**
3213
+ * Retrieves the on-chain recovery details for a given address and recovery ID.
3214
+ * If no recovery ID is provided, it retrieves the latest recovery details.
3215
+ * @param address - The address to retrieve the current active recovery details.
3216
+ * @returns A promise that resolves to the on-chain recovery details.
3217
+ */
3218
+ async getActiveRecovery(e) {
3219
+ const n = k(this.apiBase, "accounts", "starknet", e, "recovery"), r = await this.httpService.get(n), s = Vc.safeParse(r);
3220
+ return s.error ? null : s.data;
3221
+ }
3197
3222
  /**
3198
3223
  * Starts the recovery process for a given address.
3199
3224
  * @param address - The address to recover.
@@ -3203,56 +3228,34 @@ class xu {
3203
3228
  * @returns A promise that resolves to the recovery details.
3204
3229
  */
3205
3230
  async startRecovery(e, n, r, s) {
3206
- const { r: o, s: a } = on.starkCurve.sign(Fn(Un(un("utf8", "starknet:recovery")), r), s), i = {
3231
+ const { r: o, s: a } = is.starkCurve.sign(Pc($c(ms("utf8", "starknet:recovery")), r), s), i = {
3207
3232
  feeToken: n,
3208
3233
  signerSignature: {
3209
3234
  type: "StarknetKey",
3210
3235
  signer: {
3211
3236
  publicKey: r,
3212
- r: dt.addHexPrefix(o.toString(16)),
3213
- s: dt.addHexPrefix(a.toString(16))
3237
+ r: $t.addHexPrefix(o.toString(16)),
3238
+ s: $t.addHexPrefix(a.toString(16))
3214
3239
  }
3215
3240
  }
3216
3241
  };
3217
3242
  return await this.httpService.post(`${this.apiBase}/accounts/starknet/${e}/recovery`, {
3218
3243
  body: JSON.stringify(i)
3219
- }, jc);
3244
+ }, Dc);
3220
3245
  }
3221
3246
  /**
3222
- * Retrieves the on-chain recovery details for a given address and recovery ID.
3223
- * If no recovery ID is provided, it retrieves the latest recovery details.
3224
- * @param address - The address to retrieve the recovery details for.
3225
- * @param recoveryId - (Optional) The recovery ID to retrieve the details for. If not provided, retrieves the latest recovery details.
3226
- * @returns A promise that resolves to the on-chain recovery details.
3247
+ * Completes the recovery process for a given address and recovery ID.
3248
+ * @param address - The address to recover.
3249
+ * @param recoveryId - The recovery ID to complete.
3250
+ * @returns A promise that resolves to the recovery details
3251
+ *
3227
3252
  */
3228
- async getRecovery(e, n) {
3229
- const r = R(this.apiBase, "accounts", "starknet", e, "recovery", n ? `${n}` : "");
3230
- return await this.httpService.get(r);
3231
- }
3232
- /**
3233
- * Cancels the on-chain recovery process for a given address.
3234
- * @param address - The address for which to cancel the recovery process.
3235
- * @param publicKey - The public key of the signer.
3236
- * @param privateKey - The private key of the signer.
3237
- * @returns A promise that resolves when the recovery process is successfully canceled.
3238
- */
3239
- async cancelRecovery(e, n, r) {
3240
- const { r: s, s: o } = on.starkCurve.sign(Fn(Un(un("utf8", "starknet:recovery:cancel")), n), r), a = {
3241
- signerSignature: {
3242
- type: "StarknetKey",
3243
- signer: {
3244
- publicKey: n,
3245
- r: dt.addHexPrefix(s.toString(16)),
3246
- s: dt.addHexPrefix(o.toString(16))
3247
- }
3248
- }
3249
- };
3250
- await this.httpService.post(`${this.apiBase}/accounts/starknet/${e}/recovery/cancel`, {
3251
- body: JSON.stringify(a)
3252
- });
3253
+ async completeRecovery(e, n) {
3254
+ const r = k(this.apiBase, "accounts", "starknet", e, "recovery", `${n}`, "complete");
3255
+ return await this.httpService.post(r);
3253
3256
  }
3254
3257
  }
3255
- async function vu() {
3258
+ async function Bu() {
3256
3259
  if ("brave" in navigator)
3257
3260
  try {
3258
3261
  return await navigator.brave.isBrave();
@@ -3261,25 +3264,25 @@ async function vu() {
3261
3264
  return !1;
3262
3265
  }
3263
3266
  let Te;
3264
- function Hc() {
3267
+ function zc() {
3265
3268
  return Te || (Te = new gs(navigator.userAgent).getResult()), Te;
3266
3269
  }
3267
3270
  function me(t) {
3268
- return Hc().browser.name === t;
3271
+ return zc().browser.name === t;
3269
3272
  }
3270
- function Iu() {
3273
+ function _u() {
3271
3274
  return me("Firefox");
3272
3275
  }
3273
- function Tu() {
3276
+ function Nu() {
3274
3277
  return me("Chrome");
3275
3278
  }
3276
- function Bu() {
3279
+ function Cu() {
3277
3280
  return me("Safari");
3278
3281
  }
3279
- function _u() {
3282
+ function Ou() {
3280
3283
  return me("Edge");
3281
3284
  }
3282
- const Nu = h.string().refine((t) => ws(t, ys), "Invalid seedphrase"), We = [
3285
+ const ku = h.string().refine((t) => ws(t, ys), "Invalid seedphrase"), Ke = [
3283
3286
  {
3284
3287
  address: "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
3285
3288
  name: "Ether",
@@ -3456,7 +3459,7 @@ const Nu = h.string().refine((t) => ws(t, ys), "Invalid seedphrase"), We = [
3456
3459
  networkId: "mainnet-alpha",
3457
3460
  image: "https://dv3jj1unlp2jl.cloudfront.net/128/color/ekubo.png"
3458
3461
  }
3459
- ], Vc = async (t, e, n) => {
3462
+ ], qc = async (t, e, n) => {
3460
3463
  const r = await n.callContract({
3461
3464
  contractAddress: t,
3462
3465
  entrypoint: "balanceOf",
@@ -3466,14 +3469,14 @@ const Nu = h.string().refine((t) => ws(t, ys), "Invalid seedphrase"), We = [
3466
3469
  low: r[0],
3467
3470
  high: r[1]
3468
3471
  })));
3469
- }, Cu = async (t, e, n) => {
3470
- const r = We.filter((o) => o.networkId === t);
3472
+ }, Pu = async (t, e, n) => {
3473
+ const r = Ke.filter((o) => o.networkId === t);
3471
3474
  return (await Promise.allSettled(r.map((o) => e.callContract({
3472
3475
  contractAddress: o.address,
3473
3476
  entrypoint: "balanceOf",
3474
3477
  calldata: [n]
3475
3478
  })))).reduce((o, a, i) => {
3476
- if (a.status === "fulfilled" && hs(a.value) || a.status === "rejected" || a.value[0] === "0x0" && a.value[1] === "0x0")
3479
+ if (a.status === "fulfilled" && fs(a.value) || a.status === "rejected" || a.value[0] === "0x0" && a.value[1] === "0x0")
3477
3480
  return o;
3478
3481
  const c = BigInt(O.toHex(Dt.uint256ToBN({
3479
3482
  low: a.value[0],
@@ -3484,29 +3487,29 @@ const Nu = h.string().refine((t) => ws(t, ys), "Invalid seedphrase"), We = [
3484
3487
  };
3485
3488
  return o.push(l), o;
3486
3489
  }, []);
3487
- }, Ou = async () => We, ku = ({ address: t, networkId: e }) => We.find((r) => r.address === t && r.networkId === e), Pu = ({ amount: t, decimals: e, unitCurrencyValue: n }) => {
3490
+ }, Ru = async () => Ke, $u = ({ address: t, networkId: e }) => Ke.find((r) => r.address === t && r.networkId === e), Fu = ({ amount: t, decimals: e, unitCurrencyValue: n }) => {
3488
3491
  if (!Y(t) || !Y(e) || !Y(n))
3489
3492
  return;
3490
- const r = Number(e), s = BigInt(t) * Fe(n.toString()).value;
3493
+ const r = Number(e), s = BigInt(t) * Ue(n.toString()).value;
3491
3494
  return Vt({
3492
3495
  value: s,
3493
3496
  decimals: r + Ht
3494
3497
  });
3495
- }, Ru = ({ unitAmount: t, decimals: e }) => {
3498
+ }, Uu = ({ unitAmount: t, decimals: e }) => {
3496
3499
  if (t === void 0 || !Y(t) || e === void 0 || !Y(e))
3497
3500
  return;
3498
3501
  const n = Number(e);
3499
- return vt(t.toString(), n).value.toString();
3500
- }, $u = (t) => Y(t) ? Number(t) : 18, { UINT_256_MAX: Mc } = Dt, Gc = (t) => String(t) === String(Mc), Fu = (t, e = "$", n) => {
3502
+ return xt(t.toString(), n).value.toString();
3503
+ }, ju = (t) => Y(t) ? Number(t) : 18, { UINT_256_MAX: Wc } = Dt, Kc = (t) => String(t) === String(Wc), Lu = (t, e = "$", n) => {
3501
3504
  if (t === void 0 || !Y(t))
3502
3505
  return null;
3503
3506
  const r = fi(t, n);
3504
3507
  return [e, r].filter(Boolean).join("");
3505
- }, zc = "Unlimited", Uu = ({ amount: t, decimals: e, symbol: n, showPlusSign: r = !1, withSymbol: s = !0, unlimitedText: o = zc, prettyConfigOverrides: a }) => {
3508
+ }, Zc = "Unlimited", Du = ({ amount: t, decimals: e, symbol: n, showPlusSign: r = !1, withSymbol: s = !0, unlimitedText: o = Zc, prettyConfigOverrides: a }) => {
3506
3509
  if (!Y(t))
3507
3510
  return null;
3508
3511
  let i, c = !1;
3509
- if (Gc(t))
3512
+ if (Kc(t))
3510
3513
  i = o;
3511
3514
  else {
3512
3515
  const d = Number(e), u = BigInt(t);
@@ -3517,11 +3520,11 @@ const Nu = h.string().refine((t) => ws(t, ys), "Invalid seedphrase"), We = [
3517
3520
  const l = [i, s && n].filter(Boolean).join(" ");
3518
3521
  return r && c ? `+${l}` : l;
3519
3522
  };
3520
- var qc = Xr, Wc = qc;
3521
- function Kc(t, e) {
3523
+ var Yc = Zr, Xc = Yc;
3524
+ function Jc(t, e) {
3522
3525
  function n(r, s) {
3523
3526
  var o = e || {}, a;
3524
- "randomize" in o || (o.randomize = !0), a = Wc.operation(o);
3527
+ "randomize" in o || (o.randomize = !0), a = Xc.operation(o);
3525
3528
  function i(d) {
3526
3529
  s(d || new Error("Aborted"));
3527
3530
  }
@@ -3548,9 +3551,9 @@ function Kc(t, e) {
3548
3551
  }
3549
3552
  return new Promise(n);
3550
3553
  }
3551
- var Zc = Kc;
3552
- const Yc = /* @__PURE__ */ Jr(Zc);
3553
- class ju {
3554
+ var Qc = Jc;
3555
+ const tl = /* @__PURE__ */ Yr(Qc);
3556
+ class Hu {
3554
3557
  constructor(e, n) {
3555
3558
  this.apiBase = e, this.httpService = n, this.TOKENS_INFO_URL = "/tokens/info", this.TOKENS_DEFI_DECOMPOSITION_URL = "/tokens/defi/decomposition";
3556
3559
  }
@@ -3560,10 +3563,10 @@ class ju {
3560
3563
  * @returns {Promise<ApiTokenInfo[]>} - The fetched tokens or undefined if there was an error or not default network
3561
3564
  */
3562
3565
  async fetchTokensInfoFromBackend(e) {
3563
- const n = R(this.apiBase, this.TOKENS_INFO_URL, e ?? "", "?chain=starknet"), r = await this.httpService.get(n), s = Qr.safeParse(r);
3566
+ const n = k(this.apiBase, this.TOKENS_INFO_URL, e ?? "", "?chain=starknet"), r = await this.httpService.get(n), s = Xr.safeParse(r);
3564
3567
  if (s.success)
3565
3568
  return s.data.tokens;
3566
- const o = ts.safeParse(r);
3569
+ const o = Jr.safeParse(r);
3567
3570
  if (o.success)
3568
3571
  return [o.data];
3569
3572
  }
@@ -3573,8 +3576,8 @@ class ju {
3573
3576
  * @returns {Promise<BaseTokenWithBalance[]>} - The fetched balances for the account address.
3574
3577
  */
3575
3578
  async fetchAddressTokenBalancesFromBackend(e, n, r) {
3576
- const s = R(this.apiBase, "activity", "starknet", n, "account", e, "balance");
3577
- return (await Yc(
3579
+ const s = k(this.apiBase, "activity", "starknet", n, "account", e, "balance");
3580
+ return (await tl(
3578
3581
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
3579
3582
  async (i) => {
3580
3583
  let c;
@@ -3583,7 +3586,7 @@ class ju {
3583
3586
  } catch {
3584
3587
  return i(new Error("Error fetching")), [];
3585
3588
  }
3586
- const l = es.safeParse(c);
3589
+ const l = Qr.safeParse(c);
3587
3590
  if (!l.success)
3588
3591
  return i(new Error("Error parsing response")), [];
3589
3592
  if (l.data.status !== "initialised")
@@ -3603,32 +3606,32 @@ class ju {
3603
3606
  }));
3604
3607
  }
3605
3608
  async fetchDefiDecomposition(e) {
3606
- const n = R(this.apiBase, this.TOKENS_DEFI_DECOMPOSITION_URL, e, "?chain=starknet"), r = await this.httpService.get(n);
3607
- if (!ns.safeParse(r).success)
3608
- throw new rs({ code: "TOKEN_DEFI_DECOMPOSITION_PARSING_ERROR" });
3609
+ const n = k(this.apiBase, this.TOKENS_DEFI_DECOMPOSITION_URL, e, "?chain=starknet"), r = await this.httpService.get(n);
3610
+ if (!ts.safeParse(r).success)
3611
+ throw new es({ code: "TOKEN_DEFI_DECOMPOSITION_PARSING_ERROR" });
3609
3612
  return r.dapps;
3610
3613
  }
3611
3614
  }
3612
- const Lu = (t, e, n, r) => ({
3615
+ const Vu = (t, e, n, r) => ({
3613
3616
  contractAddress: t,
3614
3617
  entrypoint: "transfer",
3615
- calldata: gt.compile({
3618
+ calldata: mt.compile({
3616
3619
  recipient: e,
3617
3620
  amount: Ut(pi(n, r))
3618
3621
  })
3619
- }), Du = (t, e, n, r) => ({
3622
+ }), Mu = (t, e, n, r) => ({
3620
3623
  contractAddress: t,
3621
3624
  entrypoint: "transferFrom",
3622
- calldata: gt.compile({
3625
+ calldata: mt.compile({
3623
3626
  from_: e,
3624
3627
  to: n,
3625
3628
  tokenId: Ut(r)
3626
3629
  // OZ specs need a uint256 as tokenId
3627
3630
  })
3628
- }), Hu = (t, e, n, r) => ({
3631
+ }), Gu = (t, e, n, r) => ({
3629
3632
  contractAddress: t,
3630
3633
  entrypoint: "safeTransferFrom",
3631
- calldata: gt.compile({
3634
+ calldata: mt.compile({
3632
3635
  from_: e,
3633
3636
  to: n,
3634
3637
  tokenId: Ut(r),
@@ -3636,14 +3639,14 @@ const Lu = (t, e, n, r) => ({
3636
3639
  data_len: "0"
3637
3640
  })
3638
3641
  });
3639
- function Fr(t) {
3640
- return Pe(t.unit) === "WEI";
3642
+ function Rr(t) {
3643
+ return Re(t.unit) === "WEI";
3641
3644
  }
3642
- function Xc(t) {
3643
- return Pe(t.unit) === "FRI";
3645
+ function el(t) {
3646
+ return Re(t.unit) === "FRI";
3644
3647
  }
3645
- function xt(t, e) {
3646
- return Fr(t) ? {
3648
+ function At(t, e) {
3649
+ return Rr(t) ? {
3647
3650
  ...t,
3648
3651
  maxFee: e(t.maxFee),
3649
3652
  overallFee: e(t.overallFee),
@@ -3658,8 +3661,8 @@ function xt(t, e) {
3658
3661
  maxPricePerUnit: e(t.maxPricePerUnit)
3659
3662
  };
3660
3663
  }
3661
- function $t(t) {
3662
- return Fr(t) ? {
3664
+ function Rt(t) {
3665
+ return Rr(t) ? {
3663
3666
  maxFee: t.maxFee
3664
3667
  } : {
3665
3668
  amount: t.maxAmount,
@@ -3667,13 +3670,13 @@ function $t(t) {
3667
3670
  };
3668
3671
  }
3669
3672
  function Be(t) {
3670
- return Xc({ unit: t }) ? ke : Mn;
3673
+ return el({ unit: t }) ? Pe : Dn;
3671
3674
  }
3672
- function Vu(t, e, n = 2) {
3675
+ function zu(t, e, n = 2) {
3673
3676
  const r = BigInt(10 ** n), s = BigInt(Math.round(e * 10 ** n));
3674
3677
  return t * s / r;
3675
3678
  }
3676
- const Mu = [ke], Ur = (t, e = nl) => {
3679
+ const qu = [Pe], $r = (t, e = al) => {
3677
3680
  if (t.max && "amount" in t.max)
3678
3681
  return {
3679
3682
  ...t,
@@ -3682,7 +3685,7 @@ const Mu = [ke], Ur = (t, e = nl) => {
3682
3685
  const n = 10000n, { amount: r, pricePerUnit: s, dataGasConsumed: o = 0n, dataGasPrice: a = 0n } = t, i = r * s + o * a;
3683
3686
  if (i < 0)
3684
3687
  throw Error("Cannot calculate max fee for negative fee");
3685
- const c = O.toBigInt(as({ estimatedFee: i })), l = Number(c) / Number(i), d = e(l), u = BigInt(Math.trunc(d * Number(n)));
3688
+ const c = O.toBigInt(ss({ estimatedFee: i })), l = Number(c) / Number(i), d = e(l), u = BigInt(Math.trunc(d * Number(n)));
3686
3689
  return {
3687
3690
  ...t,
3688
3691
  amount: r * u / n,
@@ -3693,38 +3696,38 @@ const Mu = [ke], Ur = (t, e = nl) => {
3693
3696
  }, re = (t) => {
3694
3697
  const { amount: e, pricePerUnit: n, dataGasConsumed: r = 0n, dataGasPrice: s = 0n } = t;
3695
3698
  return e * n + r * s;
3696
- }, Jc = (t) => {
3699
+ }, nl = (t) => {
3697
3700
  if (t.max)
3698
3701
  return "maxFee" in t.max ? t.max.maxFee : re(t.max);
3699
- }, Oe = (t) => {
3700
- const e = Jc(t);
3701
- return e || re(Ur(t));
3702
- }, Gu = (t) => {
3702
+ }, ke = (t) => {
3703
+ const e = nl(t);
3704
+ return e || re($r(t));
3705
+ }, Wu = (t) => {
3703
3706
  if (t.deployment && !nt(t.deployment.feeTokenAddress, t.transactions.feeTokenAddress))
3704
3707
  throw Error("Cannot calculate estimated fees for different tokens");
3705
3708
  const e = re(t.transactions), n = t.deployment ? re(t.deployment) : 0n;
3706
3709
  return e + n;
3707
- }, zu = (t) => {
3710
+ }, Ku = (t) => {
3708
3711
  if (t.deployment && !nt(t.deployment.feeTokenAddress, t.transactions.feeTokenAddress))
3709
3712
  throw Error("Cannot calculate estimated fees for different tokens");
3710
- const e = t.deployment ? Oe(t.deployment) : 0n, n = Oe(t.transactions);
3713
+ const e = t.deployment ? ke(t.deployment) : 0n, n = ke(t.transactions);
3711
3714
  return e + n;
3712
- }, qu = (t, e) => [
3715
+ }, Zu = (t, e) => [
3713
3716
  {
3714
3717
  contractAddress: t,
3715
3718
  entrypoint: "transfer",
3716
- calldata: gt.compile(ss.parse({
3719
+ calldata: mt.compile(ns.parse({
3717
3720
  // We are using a dummy address (ETH here) as recipient to estimate the fee given we don't have a receipient yet
3718
3721
  recipient: e,
3719
3722
  // We are using the smallest possible amount to make sure this doesn't throw an error
3720
3723
  amount: Dt.bnToUint256(BigInt(1))
3721
3724
  }))
3722
3725
  }
3723
- ], Qc = (t, e) => {
3726
+ ], rl = (t, e) => {
3724
3727
  if (!t)
3725
3728
  return {
3726
3729
  transactions: {
3727
- feeTokenAddress: e ?? Mn,
3730
+ feeTokenAddress: e ?? Dn,
3728
3731
  amount: 0n,
3729
3732
  pricePerUnit: 0n,
3730
3733
  dataGasConsumed: 0n,
@@ -3740,7 +3743,7 @@ const Mu = [ke], Ur = (t, e = nl) => {
3740
3743
  feeTokenAddress: Be(n.unit),
3741
3744
  amount: O.toBigInt(n.gasUsage),
3742
3745
  pricePerUnit: O.toBigInt(n.gasPrice),
3743
- max: $t(xt(n, O.toBigInt)),
3746
+ max: Rt(At(n, O.toBigInt)),
3744
3747
  dataGasConsumed: n.dataGasConsumed ? O.toBigInt(n.dataGasConsumed) : 0n,
3745
3748
  dataGasPrice: n.dataGasPrice ? O.toBigInt(n.dataGasPrice) : 0n
3746
3749
  }
@@ -3753,7 +3756,7 @@ const Mu = [ke], Ur = (t, e = nl) => {
3753
3756
  feeTokenAddress: Be(n.unit),
3754
3757
  amount: O.toBigInt(n.gasUsage),
3755
3758
  pricePerUnit: O.toBigInt(n.gasPrice),
3756
- max: $t(xt(n, O.toBigInt)),
3759
+ max: Rt(At(n, O.toBigInt)),
3757
3760
  dataGasConsumed: n.dataGasConsumed ? O.toBigInt(n.dataGasConsumed) : 0n,
3758
3761
  dataGasPrice: n.dataGasPrice ? O.toBigInt(n.dataGasPrice) : 0n
3759
3762
  },
@@ -3761,14 +3764,14 @@ const Mu = [ke], Ur = (t, e = nl) => {
3761
3764
  feeTokenAddress: Be(r.unit),
3762
3765
  amount: O.toBigInt(r.gasUsage),
3763
3766
  pricePerUnit: O.toBigInt(r.gasPrice),
3764
- max: $t(xt(r, O.toBigInt)),
3767
+ max: Rt(At(r, O.toBigInt)),
3765
3768
  dataGasConsumed: r.dataGasConsumed ? O.toBigInt(r.dataGasConsumed) : 0n,
3766
3769
  dataGasPrice: r.dataGasPrice ? O.toBigInt(r.dataGasPrice) : 0n
3767
3770
  }
3768
3771
  };
3769
3772
  }
3770
3773
  throw Error("Unexpected simulation response length");
3771
- }, tl = ({ transaction: t, nonce: e, chainId: n, version: r, isDeploymentTransaction: s, cairoVersion: o, address: a, appDomain: i }) => {
3774
+ }, sl = ({ transaction: t, nonce: e, chainId: n, version: r, isDeploymentTransaction: s, cairoVersion: o, address: a, appDomain: i }) => {
3772
3775
  let c = e;
3773
3776
  s && t.type !== "DEPLOY_ACCOUNT" && (c = O.toHex(1));
3774
3777
  const l = oe(t.calls);
@@ -3787,32 +3790,32 @@ const Mu = [ke], Ur = (t, e = nl) => {
3787
3790
  appDomain: i
3788
3791
  // appDomain: "https://starknetkit-blacked-listed.vercel.app", // to simulate blacklisted domain
3789
3792
  };
3790
- }, el = (t, e) => {
3793
+ }, ol = (t, e) => {
3791
3794
  const { transactions: n } = t, r = n.map((c) => {
3792
3795
  if (!c.simulation)
3793
- throw new os({ code: "SIMULATE_AND_REVIEW_FAILED" });
3796
+ throw new rs({ code: "SIMULATE_AND_REVIEW_FAILED" });
3794
3797
  return c;
3795
3798
  }), s = r.map((c) => ({
3796
3799
  ...c.simulation,
3797
- feeEstimation: xt(c.simulation.feeEstimation, Number)
3798
- })), o = Qc(s, e), [a, i] = r.length === 1 ? [r[0], void 0] : [r[1], r[0]];
3800
+ feeEstimation: At(c.simulation.feeEstimation, Number)
3801
+ })), o = rl(s, e), [a, i] = r.length === 1 ? [r[0], void 0] : [r[1], r[0]];
3799
3802
  return {
3800
3803
  ...o,
3801
3804
  transactions: {
3802
3805
  ...o.transactions,
3803
3806
  dataGasConsumed: o.transactions.dataGasConsumed ?? 0n,
3804
3807
  dataGasPrice: o.transactions.dataGasPrice ?? 0n,
3805
- max: $t(xt(a.simulation.feeEstimation, O.toBigInt))
3808
+ max: Rt(At(a.simulation.feeEstimation, O.toBigInt))
3806
3809
  },
3807
3810
  deployment: o.deployment && i ? {
3808
3811
  ...o.deployment,
3809
3812
  dataGasConsumed: o.deployment.dataGasConsumed ?? 0n,
3810
3813
  dataGasPrice: o.deployment.dataGasPrice ?? 0n,
3811
- max: $t(xt(i.simulation.feeEstimation, O.toBigInt))
3814
+ max: Rt(At(i.simulation.feeEstimation, O.toBigInt))
3812
3815
  } : void 0
3813
3816
  };
3814
- }, Wu = (t) => {
3815
- const e = Ur(t), n = Oe(t);
3817
+ }, Yu = (t) => {
3818
+ const e = $r(t), n = ke(t);
3816
3819
  return {
3817
3820
  // for v1 transactions
3818
3821
  maxFee: n,
@@ -3830,31 +3833,31 @@ const Mu = [ke], Ur = (t, e = nl) => {
3830
3833
  }
3831
3834
  }
3832
3835
  };
3833
- }, Ku = (t) => {
3836
+ }, Xu = (t) => {
3834
3837
  const e = Math.sqrt(t);
3835
3838
  return isNaN(e) ? Math.sqrt(2) : e;
3836
- }, nl = (t) => {
3839
+ }, al = (t) => {
3837
3840
  const e = Math.cbrt(t);
3838
3841
  return isNaN(e) ? Math.cbrt(2) : e;
3839
- }, Zu = (t) => t < 1 || isNaN(t) ? 1.1 : Math.log(t + 1) + 1, rl = [ke];
3840
- function Ke({ address: t }) {
3841
- return rl.some((e) => nt(t, e));
3842
+ }, Ju = (t) => t < 1 || isNaN(t) ? 1.1 : Math.log(t + 1) + 1, il = [Pe];
3843
+ function Ze({ address: t }) {
3844
+ return il.some((e) => nt(t, e));
3842
3845
  }
3843
- function Yu(t) {
3846
+ function Qu(t) {
3844
3847
  return t ? ya().some((e) => nt(e, t)) : !1;
3845
3848
  }
3846
- function jn(t) {
3847
- return Ke({
3849
+ function $n(t) {
3850
+ return Ze({
3848
3851
  address: t
3849
3852
  }) ? Z.TRANSACTION_VERSION.V3 : Z.TRANSACTION_VERSION.V1;
3850
3853
  }
3851
- function Xu(t) {
3852
- return Ke({ address: t }) ? Z.TRANSACTION_VERSION.F3 : Z.TRANSACTION_VERSION.F1;
3854
+ function td(t) {
3855
+ return Ze({ address: t }) ? Z.TRANSACTION_VERSION.F3 : Z.TRANSACTION_VERSION.F1;
3853
3856
  }
3854
- function Ju(t, e) {
3855
- return ls(e.contract) ? Ke({ address: t }) ? Z.TRANSACTION_VERSION.V3 : Z.TRANSACTION_VERSION.V2 : Z.TRANSACTION_VERSION.V1;
3857
+ function ed(t, e) {
3858
+ return cs(e.contract) ? Ze({ address: t }) ? Z.TRANSACTION_VERSION.V3 : Z.TRANSACTION_VERSION.V2 : Z.TRANSACTION_VERSION.V1;
3856
3859
  }
3857
- class Qu {
3860
+ class nd {
3858
3861
  constructor(e, n) {
3859
3862
  this.apiBase = e, this.httpService = n;
3860
3863
  }
@@ -3863,7 +3866,7 @@ class Qu {
3863
3866
  * @returns {Promise<TransactionReviewLabel[] | undefined>} The account activities.
3864
3867
  */
3865
3868
  async getLabels() {
3866
- const e = R(this.apiBase, "reviewer", "labels");
3869
+ const e = k(this.apiBase, "reviewer", "labels");
3867
3870
  return await this.httpService.get(e);
3868
3871
  }
3869
3872
  /**
@@ -3871,7 +3874,7 @@ class Qu {
3871
3874
  * @returns {Promise<TransactionReviewWarning[] | undefined>} The account activities.
3872
3875
  */
3873
3876
  async getWarnings() {
3874
- const e = R(this.apiBase, "reviewer", "warnings/reasons");
3877
+ const e = k(this.apiBase, "reviewer", "warnings/reasons");
3875
3878
  return await this.httpService.get(e);
3876
3879
  }
3877
3880
  async simulateAndReview(e, n, r, s, o) {
@@ -3879,9 +3882,9 @@ class Qu {
3879
3882
  try {
3880
3883
  if (!("getChainId" in e))
3881
3884
  throw new Error("MISSING_METHOD");
3882
- const i = jn(r), c = a ? "0x0" : await e.getNonce(), l = await e.getChainId(), d = {
3885
+ const i = $n(r), c = a ? "0x0" : await e.getNonce(), l = await e.getChainId(), d = {
3883
3886
  transactions: n.map((f) => ({
3884
- ...tl({
3887
+ ...sl({
3885
3888
  transaction: f,
3886
3889
  nonce: c,
3887
3890
  version: i,
@@ -3893,16 +3896,16 @@ class Qu {
3893
3896
  }),
3894
3897
  type: f.type
3895
3898
  }))
3896
- }, u = R(this.apiBase, "reviewer", "transactions", "v2", "review", "starknet"), w = await this.httpService.post(u, {
3899
+ }, u = k(this.apiBase, "reviewer", "transactions", "v2", "review", "starknet"), w = await this.httpService.post(u, {
3897
3900
  headers: {
3898
3901
  Accept: "application/json",
3899
3902
  "Content-Type": "application/json"
3900
3903
  },
3901
3904
  body: JSON.stringify(d)
3902
- }, is);
3903
- if (w.transactions.some((f) => cs(f)))
3905
+ }, os);
3906
+ if (w.transactions.some((f) => as(f)))
3904
3907
  return w;
3905
- const S = el(w, r);
3908
+ const S = ol(w, r);
3906
3909
  return {
3907
3910
  ...w,
3908
3911
  enrichedFeeEstimation: S
@@ -3925,7 +3928,7 @@ class Qu {
3925
3928
  try {
3926
3929
  const a = r ? this.getCallsFromTx(e[1]) : this.getCallsFromTx(e[0]);
3927
3930
  if (!a)
3928
- throw new Nt({
3931
+ throw new _t({
3929
3932
  code: "NO_CALLS_FOUND"
3930
3933
  });
3931
3934
  const i = await this.fetchFeesOnchain({
@@ -3941,7 +3944,7 @@ class Qu {
3941
3944
  isBackendDown: !0
3942
3945
  };
3943
3946
  } catch (a) {
3944
- throw console.error(a), new Nt({
3947
+ throw console.error(a), new _t({
3945
3948
  message: `${a}`,
3946
3949
  code: "SIMULATE_AND_REVIEW_FAILED"
3947
3950
  });
@@ -3949,7 +3952,7 @@ class Qu {
3949
3952
  }
3950
3953
  async fetchFeesOnchain({ starknetAccount: e, calls: n, isDeployed: r, feeTokenAddress: s, accountDeployTransaction: o }) {
3951
3954
  try {
3952
- const a = jn(s), i = {
3955
+ const a = $n(s), i = {
3953
3956
  transactions: {
3954
3957
  feeTokenAddress: s,
3955
3958
  amount: 0n,
@@ -3980,7 +3983,7 @@ class Qu {
3980
3983
  throw console.error(u), u;
3981
3984
  });
3982
3985
  if (!l.gas_consumed || !l.gas_price || !d.gas_consumed || !d.gas_price)
3983
- throw new Nt({
3986
+ throw new _t({
3984
3987
  code: "ONCHAIN_FEE_ESTIMATION_FAILED",
3985
3988
  message: "Missing gas_consumed or gas_price"
3986
3989
  });
@@ -4004,7 +4007,7 @@ class Qu {
4004
4007
  version: a
4005
4008
  });
4006
4009
  if (!c || !l)
4007
- throw new Nt({
4010
+ throw new _t({
4008
4011
  code: "ONCHAIN_FEE_ESTIMATION_FAILED",
4009
4012
  message: "Missing gas_consumed or gas_price"
4010
4013
  });
@@ -4018,43 +4021,43 @@ class Qu {
4018
4021
  }
4019
4022
  return i;
4020
4023
  } catch (a) {
4021
- throw new Nt({
4024
+ throw new _t({
4022
4025
  code: "ONCHAIN_FEE_ESTIMATION_FAILED",
4023
4026
  message: `${a}`
4024
4027
  });
4025
4028
  }
4026
4029
  }
4027
4030
  }
4028
- const td = [
4031
+ const rd = [
4029
4032
  "account-upgrade",
4030
4033
  "approve",
4031
4034
  "set-approval-for-all",
4032
4035
  "swap",
4033
4036
  "transfer"
4034
- ], ed = (t) => ({ showBalanceChange: It(() => {
4037
+ ], sd = (t) => ({ showBalanceChange: vt(() => {
4035
4038
  const n = t == null ? void 0 : t.some((s) => !ln(s.transfers)), r = t == null ? void 0 : t.some((s) => !ln(s.approvals));
4036
4039
  return t && (n || r);
4037
- }, [t]) }), ge = (t) => t ? t.filter((e) => e.token.type === "erc20") : [], nd = (t) => It(() => ge(t), [t]), rd = (t) => ge(t).length > 0, sd = (t) => ge(t).some((n) => n.amount > 0n), od = (t) => ge(t).some((n) => n.amount < 0n), jr = (t) => t ? t.filter((e) => e.token.type === "erc721") : [], ad = (t) => It(() => jr(t), [t]), sl = (t) => jr(t).length > 0, id = (t) => It(() => sl(t), [t]), cd = (t, e) => It(() => t && e ? [
4040
+ }, [t]) }), ge = (t) => t ? t.filter((e) => e.token.type === "erc20") : [], od = (t) => vt(() => ge(t), [t]), ad = (t) => ge(t).length > 0, id = (t) => ge(t).some((n) => n.amount > 0n), cd = (t) => ge(t).some((n) => n.amount < 0n), Fr = (t) => t ? t.filter((e) => e.token.type === "erc721") : [], ld = (t) => vt(() => Fr(t), [t]), cl = (t) => Fr(t).length > 0, ud = (t) => vt(() => cl(t), [t]), dd = (t, e) => vt(() => t && e ? [
4038
4041
  {
4039
4042
  contractAddress: t.address,
4040
4043
  entrypoint: "transfer",
4041
- calldata: gt.compile({
4044
+ calldata: mt.compile({
4042
4045
  recipient: e,
4043
4046
  amount: Ut(t.balance)
4044
4047
  })
4045
4048
  }
4046
- ] : [], [t, e]), ld = ({ apiData: { apiBaseUrl: t, apiHeaders: e }, address: n, network: r, transactionReviewEnabled: s = !0, transactions: o }) => {
4047
- const a = qn(async () => {
4049
+ ] : [], [t, e]), fd = ({ apiData: { apiBaseUrl: t, apiHeaders: e }, address: n, network: r, transactionReviewEnabled: s = !0, transactions: o }) => {
4050
+ const a = Mn(async () => {
4048
4051
  if (!n || !r)
4049
4052
  return;
4050
4053
  if (!t)
4051
4054
  throw "Transaction review endpoint is not defined";
4052
- const c = R(t, "reviewer/transactions/review/starknet"), l = ps(o) ? o : [o], d = {
4055
+ const c = k(t, "reviewer/transactions/review/starknet"), l = hs(o) ? o : [o], d = {
4053
4056
  network: r,
4054
4057
  account: n,
4055
4058
  calls: l
4056
4059
  };
4057
- return tr(c, {
4060
+ return Xn(c, {
4058
4061
  method: "POST",
4059
4062
  headers: {
4060
4063
  "Content-Type": "application/json",
@@ -4062,32 +4065,32 @@ const td = [
4062
4065
  },
4063
4066
  body: JSON.stringify(d)
4064
4067
  });
4065
- }, [n, r, o]), i = It(() => bs({ transactions: o, address: n, network: r }), [o, n, r]);
4068
+ }, [n, r, o]), i = vt(() => bs({ transactions: o, address: n, network: r }), [o, n, r]);
4066
4069
  return Gs(!!s, [i, "transactionReview"], a);
4067
- }, ud = (t) => {
4070
+ }, hd = (t) => {
4068
4071
  if (!t)
4069
4072
  return {};
4070
- const e = t.assessment === "warn" && t.reason !== "contract_is_not_verified", n = t.reason ? ` (Reason: ${Kn(t.reason)})` : "", r = e ? t.reason === "recipient_is_token_address" ? "You are sending tokens to their own address. This is likely to burn them." : `This transaction has been flagged as dangerous. We recommend you reject this transaction unless you are sure.${n}` : void 0;
4073
+ const e = t.assessment === "warn" && t.reason !== "contract_is_not_verified", n = t.reason ? ` (Reason: ${zn(t.reason)})` : "", r = e ? t.reason === "recipient_is_token_address" ? "You are sending tokens to their own address. This is likely to burn them." : `This transaction has been flagged as dangerous. We recommend you reject this transaction unless you are sure.${n}` : void 0;
4071
4074
  return {
4072
4075
  warn: e,
4073
4076
  reason: r
4074
4077
  };
4075
- }, ol = (t) => {
4078
+ }, ll = (t) => {
4076
4079
  var e;
4077
4080
  if (t) {
4078
4081
  for (const n of t.reviews)
4079
4082
  if (((e = n.activity) == null ? void 0 : e.type) === "swap")
4080
4083
  return n;
4081
4084
  }
4082
- }, dd = (t) => {
4083
- }, fd = (t, e) => {
4085
+ }, pd = (t) => {
4086
+ }, md = (t, e) => {
4084
4087
  var n;
4085
4088
  if (e) {
4086
4089
  for (const r of e.reviews)
4087
4090
  if (((n = r.activity) == null ? void 0 : n.type) === t)
4088
4091
  return r.activity;
4089
4092
  }
4090
- }, hd = (t) => !!ol(t), pd = (t) => {
4093
+ }, gd = (t) => !!ll(t), wd = (t) => {
4091
4094
  var e, n;
4092
4095
  if (t) {
4093
4096
  for (const r of t.reviews)
@@ -4097,7 +4100,7 @@ const td = [
4097
4100
  type: (n = r.activity) == null ? void 0 : n.type
4098
4101
  };
4099
4102
  }
4100
- }, al = async ({ feeTokenAddress: t, calls: e, selectedAccount: n, transactionReviewService: r, appDomain: s, accountDeployTransaction: o }) => {
4103
+ }, ul = async ({ feeTokenAddress: t, calls: e, selectedAccount: n, transactionReviewService: r, appDomain: s, accountDeployTransaction: o }) => {
4101
4104
  const a = {
4102
4105
  type: "INVOKE",
4103
4106
  calls: oe(e)
@@ -4106,7 +4109,7 @@ const td = [
4106
4109
  return;
4107
4110
  const i = o ? [o, a] : [a];
4108
4111
  return { result: await r.simulateAndReview(n, i, t, s, o) };
4109
- }, il = async (t, e, n, r) => {
4112
+ }, dl = async (t, e, n, r) => {
4110
4113
  var w, m, S, f, g, b;
4111
4114
  let s = !1;
4112
4115
  const o = e.transactions.find((E) => {
@@ -4121,365 +4124,368 @@ const td = [
4121
4124
  const c = "amount" in e.enrichedFeeEstimation.transactions.max ? e.enrichedFeeEstimation.transactions.max.amount : "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;
4122
4125
  if (!c || !l)
4123
4126
  return s;
4124
- const d = await Vc(n, t, r) ?? 0n;
4127
+ const d = await qc(n, t, r) ?? 0n;
4125
4128
  return BigInt(d) > c + BigInt(l) || (s = !0), s;
4126
- }, md = () => qn(async ({ feeTokenAddress: e, calls: n, selectedAccount: r, transactionReviewService: s, appDomain: o, accountDeployPayload: a, provider: i }) => {
4129
+ }, yd = () => Mn(async ({ feeTokenAddress: e, calls: n, selectedAccount: r, transactionReviewService: s, appDomain: o, accountDeployPayload: a, provider: i }) => {
4127
4130
  if (!r)
4128
4131
  return;
4129
- const c = await al({
4132
+ const c = await ul({
4130
4133
  feeTokenAddress: e,
4131
4134
  calls: n,
4132
4135
  selectedAccount: r,
4133
4136
  transactionReviewService: s,
4134
4137
  appDomain: o,
4135
- accountDeployTransaction: cl(a)
4138
+ accountDeployTransaction: fl(a)
4136
4139
  });
4137
4140
  if (!c || !c.result || !e)
4138
4141
  return;
4139
- const l = await il(r.address, c.result, e, i);
4142
+ const l = await dl(r.address, c.result, e, i);
4140
4143
  return { ...c.result, isSendingMoreThanBalanceAndGas: l };
4141
- }, []), cl = (t) => t ? {
4144
+ }, []), fl = (t) => t ? {
4142
4145
  type: "DEPLOY_ACCOUNT",
4143
4146
  calldata: t.calldata,
4144
- classHash: Rt.parse(t.class_hash),
4145
- salt: Rt.parse(t.salt),
4147
+ classHash: Pt.parse(t.class_hash),
4148
+ salt: Pt.parse(t.salt),
4146
4149
  signature: []
4147
4150
  } : void 0;
4148
4151
  export {
4149
4152
  tt as ARGENT_ACCOUNT_CONTRACT_CLASS_HASHES,
4150
4153
  Jt as ARGENT_MULTISIG_CONTRACT_CLASS_HASHES,
4151
- Sl as AddSmartAccountResponseSchema,
4152
- El as AddSmartAcountRequestSchema,
4154
+ vl as AddSmartAccountResponseSchema,
4155
+ Il as AddSmartAcountRequestSchema,
4153
4156
  Ss as BackendAccountSchema,
4154
- lu as BackendNftService,
4155
- yd as BaseError,
4157
+ hu as BackendNftService,
4158
+ Ed as BaseError,
4156
4159
  Xs as C0_PROXY_CONTRACT_CLASS_HASHES,
4157
- Nl as CacheService,
4160
+ Pl as CacheService,
4158
4161
  Ht as DEFAULT_TOKEN_DECIMALS,
4159
- Cl as DateService,
4160
- bd as ESTIMATE_ERROR_MESSAGES,
4161
- Mn as ETH_TOKEN_ADDRESS,
4162
- os as EstimateError,
4163
- Sd as EventEmitterProvider,
4164
- Ed as EventsBySelector,
4165
- Ad as FEE_OVERHEAD,
4166
- Ue as HTTPService,
4167
- Je as HTTP_ERROR_MESSAGE,
4162
+ Rl as DateService,
4163
+ Ad as ESTIMATE_ERROR_MESSAGES,
4164
+ Dn as ETH_TOKEN_ADDRESS,
4165
+ rs as EstimateError,
4166
+ xd as EventEmitterProvider,
4167
+ vd as EventsBySelector,
4168
+ Id as FEE_OVERHEAD,
4169
+ je as HTTPService,
4170
+ Qe as HTTP_ERROR_MESSAGE,
4168
4171
  K as HttpError,
4169
- zl as KnownDappsBackendService,
4170
- en as MultiSigner,
4171
- xu as OnchainRecoveryService,
4172
- zc as PRETTY_UNLIMITED,
4173
- Wl as ResolveNameService,
4174
- Wr as STANDARD_DEVNET_ACCOUNT_CLASS_HASH,
4175
- ke as STRK_TOKEN_ADDRESS,
4176
- Ol as SWRService,
4177
- Ul as StarknetAddressService,
4178
- xd as TOKEN_ERROR_MESSAGES,
4179
- vd as TXV1_ACCOUNT_CLASS_HASH,
4180
- Id as TXV1_MULTISIG_CLASS_HASH,
4181
- Td as TXV3_ACCOUNT_CLASS_HASH,
4182
- Bd as TXV3_MULTISIG_CLASS_HASH,
4183
- rs as TokenError,
4184
- ju as TokenServiceWeb,
4185
- Qu as TransactionReviewServiceWeb,
4186
- _d as abiEntrySchema,
4187
- Nd as abiSchema,
4188
- Cd as addOwnersCalldataSchema,
4189
- Od as addPluginCalldataSchema,
4190
- kd as addressInputCharactersAndLengthSchema,
4191
- Pd as addressInputSchema,
4192
- Rd as addressOrDomainInputSchema,
4193
- $d as addressOrDomainSchema,
4194
- Fd as addressOrEmptyUndefinedSchema,
4172
+ Zl as KnownDappsBackendService,
4173
+ nn as MultiSigner,
4174
+ Tu as OnchainRecoveryService,
4175
+ Zc as PRETTY_UNLIMITED,
4176
+ Oe as RecoveryStatusEnum,
4177
+ Xl as ResolveNameService,
4178
+ zr as STANDARD_DEVNET_ACCOUNT_CLASS_HASH,
4179
+ Pe as STRK_TOKEN_ADDRESS,
4180
+ $l as SWRService,
4181
+ Hl as StarknetAddressService,
4182
+ Td as TOKEN_ERROR_MESSAGES,
4183
+ Bd as TXV1_ACCOUNT_CLASS_HASH,
4184
+ _d as TXV1_MULTISIG_CLASS_HASH,
4185
+ Nd as TXV3_ACCOUNT_CLASS_HASH,
4186
+ Cd as TXV3_MULTISIG_CLASS_HASH,
4187
+ es as TokenError,
4188
+ Hu as TokenServiceWeb,
4189
+ nd as TransactionReviewServiceWeb,
4190
+ Od as abiEntrySchema,
4191
+ kd as abiSchema,
4192
+ Vc as activeOnchainRecoverySchema,
4193
+ Pd as addOwnersCalldataSchema,
4194
+ Rd as addPluginCalldataSchema,
4195
+ $d as addressInputCharactersAndLengthSchema,
4196
+ Fd as addressInputSchema,
4197
+ Ud as addressOrDomainInputSchema,
4198
+ jd as addressOrDomainSchema,
4199
+ Ld as addressOrEmptyUndefinedSchema,
4195
4200
  se as addressSchema,
4196
- Vn as addressSchemaArgentBackend,
4197
- Ud as addressSchemaBase,
4198
- jd as addressSchemaLooseLength,
4199
- Ld as addressSchemaStrictLength,
4200
- Dd as airdropSchema,
4201
- es as apiAccountTokenBalancesSchema,
4202
- Hd as apiAirdropSchema,
4203
- Vd as apiCollateralizedDebtPositionSchema,
4204
- Md as apiCollateralizedDebtPositionsSchema,
4205
- Gd as apiConcentratedLiquidityPositionSchema,
4206
- zd as apiConcentratedLiquidityPositionsSchema,
4207
- qd as apiDefiDecompositionProduct,
4208
- Wd as apiDefiDecompositionProducts,
4209
- Kd as apiDefiDecompositionSchema,
4210
- Zd as apiDefiDecompositionToken,
4211
- ns as apiDefiPositionsSchema,
4212
- Yd as apiPriceDataResponseSchema,
4213
- Xd as apiPriceDetailsSchema,
4214
- ts as apiTokenInfoResponseSchema,
4215
- Jd as apiTokenInfoSchema,
4216
- Qr as apiTokensInfoResponseSchema,
4217
- td as apiTransactionReviewActivityType,
4218
- Qd as apiUnclaimedRewardsSchema,
4219
- tf as apiWalletResponseSchema,
4201
+ Ln as addressSchemaArgentBackend,
4202
+ Dd as addressSchemaBase,
4203
+ Hd as addressSchemaLooseLength,
4204
+ Vd as addressSchemaStrictLength,
4205
+ Md as airdropSchema,
4206
+ Qr as apiAccountTokenBalancesSchema,
4207
+ Gd as apiAirdropSchema,
4208
+ zd as apiCollateralizedDebtPositionSchema,
4209
+ qd as apiCollateralizedDebtPositionsSchema,
4210
+ Wd as apiConcentratedLiquidityPositionSchema,
4211
+ Kd as apiConcentratedLiquidityPositionsSchema,
4212
+ Zd as apiDefiDecompositionProduct,
4213
+ Yd as apiDefiDecompositionProducts,
4214
+ Xd as apiDefiDecompositionSchema,
4215
+ Jd as apiDefiDecompositionToken,
4216
+ ts as apiDefiPositionsSchema,
4217
+ Qd as apiPriceDataResponseSchema,
4218
+ tf as apiPriceDetailsSchema,
4219
+ Jr as apiTokenInfoResponseSchema,
4220
+ ef as apiTokenInfoSchema,
4221
+ Xr as apiTokensInfoResponseSchema,
4222
+ rd as apiTransactionReviewActivityType,
4223
+ nf as apiUnclaimedRewardsSchema,
4224
+ rf as apiWalletResponseSchema,
4220
4225
  xs as argentBackendNetworkIdSchema,
4221
- as as argentMaxFee,
4222
- ef as argentNameSchema,
4226
+ ss as argentMaxFee,
4227
+ sf as argentNameSchema,
4223
4228
  As as argentNetworkIdSchema,
4224
- _l as bigDecimal,
4225
- nf as bigNumberSchema,
4226
- rf as bigNumberishSchema,
4227
- sf as booleanToStringSchema,
4228
- cl as buildAccountDeployTransaction,
4229
+ kl as bigDecimal,
4230
+ of as bigNumberSchema,
4231
+ af as bigNumberishSchema,
4232
+ cf as booleanToStringSchema,
4233
+ fl as buildAccountDeployTransaction,
4229
4234
  Ea as buildConstructorCalldata,
4230
- qu as buildDummyTx,
4231
- of as builtinsSchema,
4232
- af as byteCodeSchema,
4233
- cf as cairo1EventSchema,
4234
- lf as cairoAssemblySchema,
4235
- uf as cairoVersionSchema,
4236
- nl as calculateCubeRootAdjustment,
4237
- Zu as calculateNonLinearAdjustment,
4238
- Ku as calculateSqrtAdjustment,
4239
- df as callDetailsSchema,
4240
- Lr as callSchema,
4241
- ff as calldataSchema,
4242
- xt as castFeeEstimation,
4243
- hf as changeGuardianCalldataSchema,
4244
- pf as changeThresholdCalldataSchema,
4245
- il as checkGasFeeBalance,
4246
- Yu as classHashSupportsTxV3,
4247
- mf as collateralizedDebtGroupSchema,
4248
- gf as collateralizedDebtPositionSchema,
4249
- wf as collateralizedDebtPositionsSchema,
4250
- yf as compiledContractClassSchema,
4251
- bf as compiledSierraCasmSchema,
4252
- Sf as compiledSierraSchema,
4253
- Ef as compressedProgramSchema,
4254
- Af as concentratedLiquidityPositionSchema,
4255
- xf as concentratedLiquidityPositionsSchema,
4256
- Kr as constructorCallDataSchemaC0,
4257
- Zr as constructorCallDataSchemaC1V1,
4258
- vf as contractEntryPointFieldsSchema,
4259
- Pu as convertTokenAmountToCurrencyValue,
4260
- Ru as convertTokenUnitAmountWithDecimals,
4235
+ Zu as buildDummyTx,
4236
+ lf as builtinsSchema,
4237
+ uf as byteCodeSchema,
4238
+ df as cairo1EventSchema,
4239
+ ff as cairoAssemblySchema,
4240
+ hf as cairoVersionSchema,
4241
+ al as calculateCubeRootAdjustment,
4242
+ Ju as calculateNonLinearAdjustment,
4243
+ Xu as calculateSqrtAdjustment,
4244
+ pf as callDetailsSchema,
4245
+ Ur as callSchema,
4246
+ mf as calldataSchema,
4247
+ At as castFeeEstimation,
4248
+ gf as changeGuardianCalldataSchema,
4249
+ wf as changeThresholdCalldataSchema,
4250
+ dl as checkGasFeeBalance,
4251
+ Qu as classHashSupportsTxV3,
4252
+ yf as collateralizedDebtGroupSchema,
4253
+ bf as collateralizedDebtPositionSchema,
4254
+ Sf as collateralizedDebtPositionsSchema,
4255
+ Ef as compiledContractClassSchema,
4256
+ Af as compiledSierraCasmSchema,
4257
+ xf as compiledSierraSchema,
4258
+ vf as compressedProgramSchema,
4259
+ If as concentratedLiquidityPositionSchema,
4260
+ Tf as concentratedLiquidityPositionsSchema,
4261
+ qr as constructorCallDataSchemaC0,
4262
+ Wr as constructorCallDataSchemaC1V1,
4263
+ Bf as contractEntryPointFieldsSchema,
4264
+ Fu as convertTokenAmountToCurrencyValue,
4265
+ Uu as convertTokenUnitAmountWithDecimals,
4261
4266
  va as dappContractSchema,
4262
4267
  xa as dappLinkSchema,
4263
- Jl as daysBetween,
4268
+ nu as daysBetween,
4264
4269
  di as decodeBase58,
4265
- Xl as decodeBase58Array,
4266
- If as defiDappsProductsSchema,
4267
- Tf as defiPositionSchema,
4268
- Bf as defiPositionTypeSchema,
4269
- _f as defiProductSchema,
4270
- Nf as defiProductsSchema,
4271
- Cf as denyTxV3,
4270
+ eu as decodeBase58Array,
4271
+ _f as defiDappsProductsSchema,
4272
+ Nf as defiPositionSchema,
4273
+ Cf as defiPositionTypeSchema,
4274
+ Of as defiProductSchema,
4275
+ kf as defiProductsSchema,
4276
+ Pf as denyTxV3,
4272
4277
  ui as encodeBase58,
4273
- Yl as encodeBase58Array,
4278
+ tu as encodeBase58Array,
4274
4279
  oe as ensureArray,
4275
- $u as ensureDecimals,
4276
- au as entryPointToHumanReadable,
4277
- Of as entryPointsByTypeSchema,
4278
- pu as equalNft,
4279
- Lu as erc20TransferTransaction,
4280
- Hu as erc721SafeTransferFromTransaction,
4281
- Du as erc721TransferFromTransaction,
4282
- kf as escapeGuardianCalldataSchema,
4283
- Oe as estimatedFeeToMaxFeeTotal,
4284
- Wu as estimatedFeeToMaxResourceBounds,
4280
+ ju as ensureDecimals,
4281
+ uu as entryPointToHumanReadable,
4282
+ Rf as entryPointsByTypeSchema,
4283
+ yu as equalNft,
4284
+ Vu as erc20TransferTransaction,
4285
+ Gu as erc721SafeTransferFromTransaction,
4286
+ Mu as erc721TransferFromTransaction,
4287
+ $f as escapeGuardianCalldataSchema,
4288
+ ke as estimatedFeeToMaxFeeTotal,
4289
+ Yu as estimatedFeeToMaxResourceBounds,
4285
4290
  re as estimatedFeeToTotal,
4286
- zu as estimatedFeesToMaxFeeTotal,
4287
- Gu as estimatedFeesToTotal,
4288
- Pf as eventAbiSchema,
4289
- Rf as eventEntrySchema,
4290
- $f as executeOnPluginCalldataSchema,
4291
- Ke as feeTokenNeedsTxV3Support,
4292
- Ff as feltSchema,
4293
- tr as fetchData,
4291
+ Ku as estimatedFeesToMaxFeeTotal,
4292
+ Wu as estimatedFeesToTotal,
4293
+ Ff as eventAbiSchema,
4294
+ Uf as eventEntrySchema,
4295
+ jf as executeOnPluginCalldataSchema,
4296
+ Ze as feeTokenNeedsTxV3Support,
4297
+ Lf as feltSchema,
4298
+ Xn as fetchData,
4294
4299
  Xt as fetcherError,
4295
- Vl as findImplementationForAccount,
4296
- Uf as findTransfersAndApprovals,
4297
- or as formatAddress,
4298
- jf as formatFullAddress,
4299
- Lf as formatTruncatedAddress,
4300
- Df as formatTruncatedSignerKey,
4301
- Hf as formatTruncatedString,
4302
- Vf as functionAbiSchema,
4303
- Mf as functionAbiTypeSchema,
4300
+ ql as findImplementationForAccount,
4301
+ Df as findTransfersAndApprovals,
4302
+ nr as formatAddress,
4303
+ Hf as formatFullAddress,
4304
+ Vf as formatTruncatedAddress,
4305
+ Mf as formatTruncatedSignerKey,
4306
+ Gf as formatTruncatedString,
4307
+ zf as functionAbiSchema,
4308
+ qf as functionAbiTypeSchema,
4304
4309
  ee as generateAvatarImage,
4305
4310
  Aa as getAccountContractAddress,
4306
4311
  Sa as getAccountDeploymentPayload,
4307
- Rl as getAccountIdentifier,
4308
- zr as getAddressFromArgentName,
4312
+ jl as getAccountIdentifier,
4313
+ Mr as getAddressFromArgentName,
4309
4314
  Ys as getAddressFromStarkName,
4310
- hn as getArgentAccountClassHashes,
4315
+ fn as getArgentAccountClassHashes,
4311
4316
  ya as getArgentAccountClassHashesWithTxV3Support,
4312
4317
  wa as getArgentAccountWithMultiSignerClassHashes,
4313
- Fl as getBackendTimeNowSeconds,
4318
+ Dl as getBackendTimeNowSeconds,
4314
4319
  zs as getBackendTimeSeconds,
4315
4320
  Zs as getCallFromStarkName,
4316
4321
  qs as getChainIdFromNetworkId,
4317
4322
  ci as getColor,
4318
4323
  Ba as getDapplandLinkForDapp,
4319
- ql as getDapplandUrlForDapp,
4320
- ud as getDisplayWarnAndReasonForTransactionReview,
4324
+ Yl as getDapplandUrlForDapp,
4325
+ hd as getDisplayWarnAndReasonForTransactionReview,
4321
4326
  ge as getERC20Transactions,
4322
- jr as getERC721Transactions,
4323
- Qc as getEstimatedFeeFromBulkSimulation,
4324
- el as getEstimatedFeeFromSimulationAndRespectWatermarkFee,
4327
+ Fr as getERC721Transactions,
4328
+ rl as getEstimatedFeeFromBulkSimulation,
4329
+ ol as getEstimatedFeeFromSimulationAndRespectWatermarkFee,
4325
4330
  ai as getInitials,
4326
- Ll as getLastCairo0ArgentAccountClassHash,
4331
+ Ml as getLastCairo0ArgentAccountClassHash,
4327
4332
  ga as getLatestArgentAccountClassHash,
4328
- jl as getLatestArgentMultisigClassHash,
4329
- Hl as getLatestLedgerAccountClassHash,
4330
- Dl as getLedgerAccountClassHashes,
4331
- Gf as getMessageFromTrpcError,
4332
- dd as getNFTTransferActivity,
4333
- Zl as getNetworkAccountImageUrl,
4334
- hu as getNftPicture,
4335
- tl as getPayloadFromTransaction,
4336
- zf as getPrettyRpcError,
4337
- al as getReviewForTransactions,
4338
- tn as getSignerForMultiSigner,
4339
- Xu as getSimulationTxVersionFromFeeToken,
4333
+ Vl as getLatestArgentMultisigClassHash,
4334
+ zl as getLatestLedgerAccountClassHash,
4335
+ Gl as getLedgerAccountClassHashes,
4336
+ Wf as getMessageFromTrpcError,
4337
+ pd as getNFTTransferActivity,
4338
+ Ql as getNetworkAccountImageUrl,
4339
+ wu as getNftPicture,
4340
+ sl as getPayloadFromTransaction,
4341
+ Kf as getPrettyRpcError,
4342
+ ul as getReviewForTransactions,
4343
+ en as getSignerForMultiSigner,
4344
+ td as getSimulationTxVersionFromFeeToken,
4340
4345
  Ks as getStarknetIdContractAddressFromNetworkId,
4341
- Vc as getTokenBalance,
4342
- Ou as getTokens,
4343
- Cu as getTokensBalances,
4344
- fd as getTransactionReviewActivityOfType,
4345
- hd as getTransactionReviewHasSwap,
4346
- ol as getTransactionReviewSwap,
4347
- pd as getTransactionReviewWithType,
4348
- jn as getTxVersionFromFeeToken,
4349
- Ju as getTxVersionFromFeeTokenForDeclareContract,
4350
- Hc as getUAParserResult,
4346
+ qc as getTokenBalance,
4347
+ Ru as getTokens,
4348
+ Pu as getTokensBalances,
4349
+ md as getTransactionReviewActivityOfType,
4350
+ gd as getTransactionReviewHasSwap,
4351
+ ll as getTransactionReviewSwap,
4352
+ wd as getTransactionReviewWithType,
4353
+ $n as getTxVersionFromFeeToken,
4354
+ ed as getTxVersionFromFeeTokenForDeclareContract,
4355
+ zc as getUAParserResult,
4351
4356
  Ut as getUint256CalldataFromBN,
4352
- Jc as getWatermarkedMaxFeeTotal,
4353
- rd as hasERC20Transactions,
4354
- sl as hasERC721Transactions,
4355
- sd as hasIncomingERC20Transactions,
4356
- od as hasOutgoingERC20Transactions,
4357
- Rt as hexSchema,
4358
- qf as hexSchemaBase,
4357
+ nl as getWatermarkedMaxFeeTotal,
4358
+ ad as hasERC20Transactions,
4359
+ cl as hasERC721Transactions,
4360
+ id as hasIncomingERC20Transactions,
4361
+ cd as hasOutgoingERC20Transactions,
4362
+ Pt as hexSchema,
4363
+ Zf as hexSchemaBase,
4359
4364
  si as id,
4360
- Qe as implementationSchema,
4361
- Wf as includesAddress,
4362
- Kf as inputAmountSchema,
4363
- vl as isAccountV4,
4364
- xl as isAccountV5,
4365
- Al as isAccountV6,
4366
- Vr as isAddress,
4367
- nu as isAllowedAddressHexInputValue,
4368
- ru as isAllowedNumericInputValue,
4369
- Bl as isArgentBackendNetworkId,
4370
- Gr as isArgentName,
4371
- Tl as isArgentNetworkId,
4372
- vu as isBraveBrowser,
4365
+ tn as implementationSchema,
4366
+ Yf as includesAddress,
4367
+ Xf as inputAmountSchema,
4368
+ _l as isAccountV4,
4369
+ Bl as isAccountV5,
4370
+ Tl as isAccountV6,
4371
+ Dr as isAddress,
4372
+ au as isAllowedAddressHexInputValue,
4373
+ iu as isAllowedNumericInputValue,
4374
+ Ol as isArgentBackendNetworkId,
4375
+ Vr as isArgentName,
4376
+ Cl as isArgentNetworkId,
4377
+ Bu as isBraveBrowser,
4373
4378
  me as isBrowser,
4374
- Tu as isChromeBrowser,
4375
- tu as isContractDeployed,
4376
- _u as isEdgeBrowser,
4379
+ Nu as isChromeBrowser,
4380
+ su as isContractDeployed,
4381
+ Ou as isEdgeBrowser,
4377
4382
  nt as isEqualAddress,
4378
- Zf as isEqualArgentName,
4383
+ Jf as isEqualArgentName,
4379
4384
  ba as isEqualImplementation,
4380
- Yf as isEqualStarknetDomainName,
4381
- Xf as isEqualStarknetId,
4382
- Xc as isFRI,
4383
- Ql as isFeatureEnabled,
4384
- Iu as isFirefoxBrowser,
4385
+ Qf as isEqualStarknetDomainName,
4386
+ th as isEqualStarknetId,
4387
+ el as isFRI,
4388
+ ru as isFeatureEnabled,
4389
+ _u as isFirefoxBrowser,
4385
4390
  Y as isNumeric,
4386
- Bu as isSafariBrowser,
4387
- Jf as isStarknetDomainName,
4388
- Mr as isStarknetId,
4389
- Gc as isUnlimitedAmount,
4390
- Hr as isValidAddress,
4391
- Qf as isValidInputAmount,
4392
- Fr as isWEI,
4393
- Dr as isZeroAddress,
4391
+ Cu as isSafariBrowser,
4392
+ eh as isStarknetDomainName,
4393
+ Hr as isStarknetId,
4394
+ Kc as isUnlimitedAmount,
4395
+ Lr as isValidAddress,
4396
+ nh as isValidInputAmount,
4397
+ Rr as isWEI,
4398
+ jr as isZeroAddress,
4394
4399
  Ia as knownDappSchema,
4395
4400
  Ta as knownDappsSchema,
4396
- th as legacyContractClassSchema,
4397
- eh as legacyEventSchema,
4398
- nh as modifySnjsFeeOverhead,
4399
- rh as multiTypeSchema,
4400
- Vu as multiplyBigIntByFloat,
4401
+ rh as legacyContractClassSchema,
4402
+ sh as legacyEventSchema,
4403
+ oh as modifySnjsFeeOverhead,
4404
+ ah as multiTypeSchema,
4405
+ zu as multiplyBigIntByFloat,
4401
4406
  Na as nameProviderResolutionSchema,
4402
4407
  Ca as nameResolutionAddressSchema,
4403
4408
  ka as nameResolutionAddressesSchema,
4404
- sr as nameResolutionStarknetIdSchema,
4409
+ er as nameResolutionStarknetIdSchema,
4405
4410
  _a as nameResolutionStarknetIdsSchema,
4406
- eu as nonNullable,
4407
- Hn as normalizeAddress,
4408
- sh as normalizeAddressOrDomain,
4409
- oh as normalizeArgentName,
4410
- ah as normalizeStarknetId,
4411
- Eu as onchainRecoverySchema,
4412
- ih as parseAmount,
4411
+ ou as nonNullable,
4412
+ jn as normalizeAddress,
4413
+ ih as normalizeAddressOrDomain,
4414
+ ch as normalizeArgentName,
4415
+ lh as normalizeStarknetId,
4416
+ Mc as onchainRecoverySchema,
4417
+ uh as parseAmount,
4413
4418
  pi as parseAmountValue,
4414
- su as pluralise,
4415
- kl as postData,
4416
- Il as preferencesEndpointPayload,
4419
+ cu as pluralise,
4420
+ Fl as postData,
4421
+ Nl as preferencesEndpointPayload,
4417
4422
  Es as preferencesSchema,
4418
4423
  fi as prettifyCurrencyNumber,
4419
- Fu as prettifyCurrencyValue,
4420
- fr as prettifyNumber,
4421
- Le as prettifyNumberConfig,
4422
- Uu as prettifyTokenAmount,
4424
+ Lu as prettifyCurrencyValue,
4425
+ lr as prettifyNumber,
4426
+ De as prettifyNumberConfig,
4427
+ Du as prettifyTokenAmount,
4423
4428
  hi as prettifyTokenNumber,
4424
- ch as productGroupsSchema,
4425
- lh as programSchema,
4429
+ dh as productGroupsSchema,
4430
+ fh as programSchema,
4426
4431
  Oa as providersNamesSchema,
4427
- uh as pythonicHintsSchema,
4428
- dh as rawArgsArraySchema,
4429
- fh as rawArgsObjectSchema,
4430
- hh as rawArgsSchema,
4431
- ou as readFileAsString,
4432
- Su as recoveryBodySchema,
4433
- Lc as recoveryStatusSchema,
4434
- ph as removeOwnersCalldataSchema,
4435
- mh as removePluginCalldataSchema,
4436
- gh as replaceSignerCalldataSchema,
4437
- Nu as seedphraseSchema,
4438
- wh as sierraContractEntryPointFieldsSchema,
4439
- yh as sierraEntryPointsByTypeSchema,
4440
- bh as sierraProgramDebugInfoSchema,
4432
+ hh as pythonicHintsSchema,
4433
+ ph as rawArgsArraySchema,
4434
+ mh as rawArgsObjectSchema,
4435
+ gh as rawArgsSchema,
4436
+ lu as readFileAsString,
4437
+ Pr as recoveryBaseSchema,
4438
+ vu as recoveryBodySchema,
4439
+ Hc as recoveryStatusSchema,
4440
+ wh as removeOwnersCalldataSchema,
4441
+ yh as removePluginCalldataSchema,
4442
+ bh as replaceSignerCalldataSchema,
4443
+ ku as seedphraseSchema,
4444
+ Sh as sierraContractEntryPointFieldsSchema,
4445
+ Eh as sierraEntryPointsByTypeSchema,
4446
+ Ah as sierraProgramDebugInfoSchema,
4441
4447
  Ws as starkNameToCallDataDomain,
4442
- Sh as starknetDomainNameSchema,
4443
- Yr as starknetIdSchema,
4444
- Au as startOnchainRecoveryErrorSchema,
4445
- Dc as startOnchainRecoveryErrorStatusSchema,
4446
- jc as startOnchainRecoverySchema,
4447
- Eh as stringToBooleanSchema,
4448
+ xh as starknetDomainNameSchema,
4449
+ Kr as starknetIdSchema,
4450
+ Iu as startOnchainRecoveryErrorSchema,
4451
+ Gc as startOnchainRecoveryErrorStatusSchema,
4452
+ Dc as startOnchainRecoverySchema,
4453
+ vh as stringToBooleanSchema,
4448
4454
  li as stripAddressZeroPadding,
4449
- Ah as structAbiSchema,
4450
- $l as swrRefetchDisabledConfig,
4451
- $t as toMax,
4452
- Mu as tokensRequireTxV3Support,
4453
- xh as transactionReviewTransactionsSchema,
4454
- vh as transactionReviewWarningSchema,
4455
- ss as transferCalldataSchema,
4456
- Ih as trpcErrorSchema,
4457
- Th as txVersionSchema,
4458
- Bh as uint256Schema,
4459
- _h as unclaimedRewardsSchema,
4455
+ Ih as structAbiSchema,
4456
+ Ll as swrRefetchDisabledConfig,
4457
+ Rt as toMax,
4458
+ qu as tokensRequireTxV3Support,
4459
+ Th as transactionReviewTransactionsSchema,
4460
+ Bh as transactionReviewWarningSchema,
4461
+ ns as transferCalldataSchema,
4462
+ _h as trpcErrorSchema,
4463
+ Nh as txVersionSchema,
4464
+ Ch as uint256Schema,
4465
+ Oh as unclaimedRewardsSchema,
4460
4466
  Be as unitToFeeTokenAddress,
4461
- iu as urlWithQuery,
4462
- ed as useBalanceChange,
4463
- du as useCollection,
4467
+ du as urlWithQuery,
4468
+ sd as useBalanceChange,
4469
+ mu as useCollection,
4464
4470
  Gs as useConditionallyEnabledSWR,
4465
- Ml as useDebounce,
4466
- Gl as useDebouncedValue,
4467
- nd as useERC20Transactions,
4468
- ad as useERC721Transactions,
4469
- Nh as useEmitEvent,
4470
- Ch as useEventEmitter,
4471
- Oh as useEventEmitterContext,
4472
- kh as useEventListener,
4473
- id as useHasERC721Transaction,
4474
- Ph as useIsEventEmitterEnabled,
4475
- cd as useMaxAmountTransaction,
4476
- fu as useNft,
4477
- uu as useNfts,
4478
- ku as useToken,
4479
- ld as useTransactionReview,
4480
- md as useTransactionReviewV2webFetcher,
4481
- Rh as validChecksumAddressSchema,
4482
- $h as validateAddressRangeSchema,
4483
- cu as voidify,
4484
- Pl as withPolling
4471
+ Wl as useDebounce,
4472
+ Kl as useDebouncedValue,
4473
+ od as useERC20Transactions,
4474
+ ld as useERC721Transactions,
4475
+ kh as useEmitEvent,
4476
+ Ph as useEventEmitter,
4477
+ Rh as useEventEmitterContext,
4478
+ $h as useEventListener,
4479
+ ud as useHasERC721Transaction,
4480
+ Fh as useIsEventEmitterEnabled,
4481
+ dd as useMaxAmountTransaction,
4482
+ gu as useNft,
4483
+ pu as useNfts,
4484
+ $u as useToken,
4485
+ fd as useTransactionReview,
4486
+ yd as useTransactionReviewV2webFetcher,
4487
+ Uh as validChecksumAddressSchema,
4488
+ jh as validateAddressRangeSchema,
4489
+ fu as voidify,
4490
+ Ul as withPolling
4485
4491
  };