@argent/x-shared 1.35.0 → 1.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -2
- package/dist/index.mjs +345 -332
- package/dist/tokens/getCurrencySymbol.d.ts +2 -0
- package/dist/tokens/index.d.ts +1 -0
- package/package.json +6 -6
package/dist/index.mjs
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { O as Or, a as kr, b as Pr, c as Rr, d as
|
|
3
|
-
import { x as
|
|
4
|
-
import { p as Qt, H as K, a as ze, u as P, N as kn, c as ts, C as Pn, A as St, i as es, b as ns, n as Rn, d as rs, e as ss, f as os, g as as, s as Q, h as nt, j as Ke, k as is, l as
|
|
5
|
-
import { a7 as
|
|
6
|
-
import { S as ws, r as ys, T as bs, a as Oe, E as
|
|
7
|
-
import { G as
|
|
8
|
-
import { constants as
|
|
9
|
-
import { useEffect as
|
|
1
|
+
import F, { z as f } from "zod";
|
|
2
|
+
import { O as Or, a as kr, b as Pr, c as Rr, d as $r, e as Fr, f as Ur, g as jr, h as Be, i as Lr, j as Dr, l as Hr, k as Vr, m as Mr, n as Gr, o as qr, p as On, q as Wr, r as zr, s as Kr, t as Yr, u as Zr, v as Xr, D as Jr, w as Qr } from "./bips-zBtnMbia.mjs";
|
|
3
|
+
import { x as Cd } from "./bips-zBtnMbia.mjs";
|
|
4
|
+
import { p as Qt, H as K, a as ze, u as P, N as kn, c as ts, C as Pn, A as St, i as es, b as ns, n as Rn, d as rs, e as ss, f as os, g as as, s as Q, h as nt, j as Ke, k as is, l as Ye, M as Ze, m as cs, o as ls, q as Ne, r as us, t as te, B as Xe, v as kt, w as ds, x as fs, y as hs, z as ps, D as ms, E as gs, F as Ce } from "./webToken.model-Cl4dvcmj.mjs";
|
|
5
|
+
import { a7 as kd, bg as Pd, aX as Rd, b3 as $d, aL as Fd, aP as Ud, _ as jd, $ as Ld, W as Dd, V as Hd, O as Vd, J as Md, K as Gd, L as qd, aj as Wd, ae as zd, af as Kd, ac as Yd, ad as Zd, ah as Xd, ag as Jd, ai as Qd, ab as tf, aa as ef, a9 as nf, a8 as rf, ak as sf, a4 as of, a0 as af, av as cf, az as lf, ax as uf, aS as df, b5 as ff, b0 as hf, bb as pf, a3 as mf, aH as gf, aB as wf, aJ as yf, aO as bf, bd as Sf, bc as Ef, b9 as Af, aV as xf, aT as vf, al as Tf, aU as If, aK as _f, b2 as Bf, a_ as Nf, aR as Cf, aI as Of, Q as kf, P as Pf, S as Rf, T as $f, aZ as Ff, aY as Uf, aw as jf, R as Lf, a1 as Df, Y as Hf, a5 as Vf, X as Mf, b4 as Gf, a$ as qf, aG as Wf, aD as zf, Z as Kf, a2 as Yf, a6 as Zf, aW as Xf, ba as Jf, aC as Qf, aE as th, aF as eh, aM as nh, aQ as rh, aN as sh, b7 as oh, b8 as ah, b6 as ih, U as ch, ay as lh, b1 as uh, aA as dh, bi as fh, bh as hh, be as ph, bj as mh, bf as gh, G as wh, I as yh, am as bh, an as Sh, au as Eh, at as Ah, ao as xh, ar as vh, ap as Th, aq as Ih, as as _h } from "./webToken.model-Cl4dvcmj.mjs";
|
|
6
|
+
import { S as ws, r as ys, T as bs, a as Oe, E as $n, f as fe, b as Ss, c as Es, s as As, i as xs, R as _t } from "./transactionVersion-CACUj2ch.mjs";
|
|
7
|
+
import { G as Nh, I as Ch, F as Oh, j as kh, d as Ph, g as Rh, e as $h, h as Fh, w as Uh, m as jh, n as Lh, o as Dh, k as Hh, l as Vh, v as Mh, p as Gh, t as qh, u as Wh, N as zh, J as Kh, C as Yh, K as Zh, z as Xh, A as Jh, D as Qh, y as tp, q as ep, H as np, L as rp, B as sp, M as op, x as ap } from "./transactionVersion-CACUj2ch.mjs";
|
|
8
|
+
import { constants as Y, starknetId as Fn, CallData as mt, CairoOption as Je, CairoOptionVariant as Qe, hash as Un, num as O, encode as Rt, uint256 as Dt, ec as vs, isSierra as Ts, TransactionType as tn } from "starknet";
|
|
9
|
+
import { useEffect as $t, useRef as en, useState as jn, useMemo as xt, useCallback as Ln, createContext as Is } from "react";
|
|
10
10
|
import { isFunction as Vt, isString as Dn, upperCase as ke, isNil as _s, upperFirst as Bs, lowerCase as Hn, isUndefined as Ns, isEmpty as nn, isArray as Cs } from "lodash-es";
|
|
11
11
|
import ee, { useSWRConfig as Os } from "swr";
|
|
12
12
|
import { hex as Vn, base58 as Mn, stringToBytes as ks } from "@scure/base";
|
|
13
13
|
import { UAParser as Ps } from "ua-parser-js";
|
|
14
14
|
import { validateMnemonic as Rs } from "@scure/bip39";
|
|
15
|
-
import { wordlist as
|
|
16
|
-
import
|
|
15
|
+
import { wordlist as $s } from "@scure/bip39/wordlists/english";
|
|
16
|
+
import Fs from "object-hash";
|
|
17
17
|
import { jsx as Us } from "react/jsx-runtime";
|
|
18
18
|
const js = f.object({
|
|
19
19
|
name: f.string().optional(),
|
|
@@ -60,13 +60,13 @@ function Pl(t) {
|
|
|
60
60
|
function Rl(t) {
|
|
61
61
|
return "simulateTransaction" in t;
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function $l(t) {
|
|
64
64
|
return !("simulateTransaction" in t);
|
|
65
65
|
}
|
|
66
66
|
const Ls = f.object({
|
|
67
67
|
value: f.string(),
|
|
68
68
|
platform: f.enum(["ios", "argentx", "android", "webwallet"]).nullable()
|
|
69
|
-
}),
|
|
69
|
+
}), Fl = f.object({
|
|
70
70
|
preferences: f.record(Ls)
|
|
71
71
|
}), Ds = f.enum(["mainnet-alpha", "sepolia-alpha"]), Hs = f.enum(["mainnet", "sepolia"]);
|
|
72
72
|
function Ul(t) {
|
|
@@ -85,8 +85,8 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
85
85
|
absBigInt: Pr,
|
|
86
86
|
add: Rr,
|
|
87
87
|
createUnitsSchema: Vs,
|
|
88
|
-
div:
|
|
89
|
-
eq:
|
|
88
|
+
div: $r,
|
|
89
|
+
eq: Fr,
|
|
90
90
|
formatCurrency: Ur,
|
|
91
91
|
formatEther: jr,
|
|
92
92
|
formatUnits: Be,
|
|
@@ -102,8 +102,8 @@ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
102
102
|
parseEther: zr,
|
|
103
103
|
parseUnits: Qt,
|
|
104
104
|
sub: Kr,
|
|
105
|
-
toBigDecimal:
|
|
106
|
-
toFixedDecimals:
|
|
105
|
+
toBigDecimal: Yr,
|
|
106
|
+
toFixedDecimals: Zr,
|
|
107
107
|
toTiniestPossibleDecimal: Xr
|
|
108
108
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
109
109
|
class Dl {
|
|
@@ -331,7 +331,7 @@ const zt = (t, e, n) => {
|
|
|
331
331
|
};
|
|
332
332
|
function qs(t, e, n, r) {
|
|
333
333
|
const { cache: s } = Os(), o = ee(t && e, t ? n : Gs, r);
|
|
334
|
-
return
|
|
334
|
+
return $t(() => {
|
|
335
335
|
t || (o.mutate(), s.delete(e));
|
|
336
336
|
}, [t]), o;
|
|
337
337
|
}
|
|
@@ -358,11 +358,11 @@ const Wl = {
|
|
|
358
358
|
function zs(t) {
|
|
359
359
|
switch (t) {
|
|
360
360
|
case "mainnet-alpha":
|
|
361
|
-
case
|
|
362
|
-
return
|
|
361
|
+
case Y.NetworkName.SN_MAIN:
|
|
362
|
+
return Y.StarknetChainId.SN_MAIN;
|
|
363
363
|
case "sepolia-alpha":
|
|
364
|
-
case
|
|
365
|
-
return
|
|
364
|
+
case Y.NetworkName.SN_SEPOLIA:
|
|
365
|
+
return Y.StarknetChainId.SN_SEPOLIA;
|
|
366
366
|
default:
|
|
367
367
|
throw new kn({
|
|
368
368
|
code: "NOT_FOUND",
|
|
@@ -371,14 +371,14 @@ function zs(t) {
|
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
373
|
function Ks(t) {
|
|
374
|
-
return t.replace(".stark", "").split(".").map((r) =>
|
|
374
|
+
return t.replace(".stark", "").split(".").map((r) => Fn.useEncoded(r).toString(10));
|
|
375
375
|
}
|
|
376
|
-
function
|
|
376
|
+
function Ys(t) {
|
|
377
377
|
const e = zs(t);
|
|
378
|
-
return
|
|
378
|
+
return Fn.getStarknetIdContract(e);
|
|
379
379
|
}
|
|
380
|
-
function
|
|
381
|
-
const n =
|
|
380
|
+
function Zs(t, e) {
|
|
381
|
+
const n = Ys(e), r = Ks(t);
|
|
382
382
|
try {
|
|
383
383
|
const o = { domain: r, hint: [] };
|
|
384
384
|
return ts.parse({
|
|
@@ -400,7 +400,7 @@ async function Xs(t, e, n) {
|
|
|
400
400
|
});
|
|
401
401
|
let r = null;
|
|
402
402
|
try {
|
|
403
|
-
r =
|
|
403
|
+
r = Zs(t, e);
|
|
404
404
|
} catch (i) {
|
|
405
405
|
throw new Pn({
|
|
406
406
|
code: "NOT_VALID",
|
|
@@ -473,7 +473,7 @@ const Js = [
|
|
|
473
473
|
"0.1.1": "0x6e150953b26271a740bf2b6e9bca17cc52c68d765f761295de51ceb8526ee72",
|
|
474
474
|
"0.1.0": "0x737ee2f87ce571a58c6c8da558ec18a07ceb64a6172d5ec46171fbc80077a48"
|
|
475
475
|
};
|
|
476
|
-
var Qs = typeof global == "object" && global && global.Object === Object && global, to = typeof self == "object" && self && self.Object === Object && self, ne = Qs || to || Function("return this")(),
|
|
476
|
+
var Qs = typeof global == "object" && global && global.Object === Object && global, to = typeof self == "object" && self && self.Object === Object && self, ne = Qs || to || Function("return this")(), Yt = ne.Symbol, Wn = Object.prototype, eo = Wn.hasOwnProperty, no = Wn.toString, Bt = Yt ? Yt.toStringTag : void 0;
|
|
477
477
|
function ro(t) {
|
|
478
478
|
var e = eo.call(t, Bt), n = t[Bt];
|
|
479
479
|
try {
|
|
@@ -488,7 +488,7 @@ var so = Object.prototype, oo = so.toString;
|
|
|
488
488
|
function ao(t) {
|
|
489
489
|
return oo.call(t);
|
|
490
490
|
}
|
|
491
|
-
var io = "[object Null]", co = "[object Undefined]", rn =
|
|
491
|
+
var io = "[object Null]", co = "[object Undefined]", rn = Yt ? Yt.toStringTag : void 0;
|
|
492
492
|
function lo(t) {
|
|
493
493
|
return t == null ? t === void 0 ? co : io : rn && rn in Object(t) ? ro(t) : ao(t);
|
|
494
494
|
}
|
|
@@ -540,9 +540,9 @@ function Pe(t, e) {
|
|
|
540
540
|
var n = Bo(t, e);
|
|
541
541
|
return _o(n) ? n : void 0;
|
|
542
542
|
}
|
|
543
|
-
var
|
|
543
|
+
var Ft = Pe(Object, "create");
|
|
544
544
|
function No() {
|
|
545
|
-
this.__data__ =
|
|
545
|
+
this.__data__ = Ft ? Ft(null) : {}, this.size = 0;
|
|
546
546
|
}
|
|
547
547
|
function Co(t) {
|
|
548
548
|
var e = this.has(t) && delete this.__data__[t];
|
|
@@ -551,21 +551,21 @@ function Co(t) {
|
|
|
551
551
|
var Oo = "__lodash_hash_undefined__", ko = Object.prototype, Po = ko.hasOwnProperty;
|
|
552
552
|
function Ro(t) {
|
|
553
553
|
var e = this.__data__;
|
|
554
|
-
if (
|
|
554
|
+
if (Ft) {
|
|
555
555
|
var n = e[t];
|
|
556
556
|
return n === Oo ? void 0 : n;
|
|
557
557
|
}
|
|
558
558
|
return Po.call(e, t) ? e[t] : void 0;
|
|
559
559
|
}
|
|
560
|
-
var
|
|
560
|
+
var $o = Object.prototype, Fo = $o.hasOwnProperty;
|
|
561
561
|
function Uo(t) {
|
|
562
562
|
var e = this.__data__;
|
|
563
|
-
return
|
|
563
|
+
return Ft ? e[t] !== void 0 : Fo.call(e, t);
|
|
564
564
|
}
|
|
565
565
|
var jo = "__lodash_hash_undefined__";
|
|
566
566
|
function Lo(t, e) {
|
|
567
567
|
var n = this.__data__;
|
|
568
|
-
return this.size += this.has(t) ? 0 : 1, n[t] =
|
|
568
|
+
return this.size += this.has(t) ? 0 : 1, n[t] = Ft && e === void 0 ? jo : e, this;
|
|
569
569
|
}
|
|
570
570
|
function ft(t) {
|
|
571
571
|
var e = -1, n = t == null ? 0 : t.length;
|
|
@@ -623,20 +623,20 @@ vt.prototype.get = qo;
|
|
|
623
623
|
vt.prototype.has = Wo;
|
|
624
624
|
vt.prototype.set = zo;
|
|
625
625
|
var Ko = Pe(ne, "Map");
|
|
626
|
-
function
|
|
626
|
+
function Yo() {
|
|
627
627
|
this.size = 0, this.__data__ = {
|
|
628
628
|
hash: new ft(),
|
|
629
629
|
map: new (Ko || vt)(),
|
|
630
630
|
string: new ft()
|
|
631
631
|
};
|
|
632
632
|
}
|
|
633
|
-
function
|
|
633
|
+
function Zo(t) {
|
|
634
634
|
var e = typeof t;
|
|
635
635
|
return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
|
|
636
636
|
}
|
|
637
637
|
function se(t, e) {
|
|
638
638
|
var n = t.__data__;
|
|
639
|
-
return
|
|
639
|
+
return Zo(e) ? n[typeof e == "string" ? "string" : "hash"] : n.map;
|
|
640
640
|
}
|
|
641
641
|
function Xo(t) {
|
|
642
642
|
var e = se(this, t).delete(t);
|
|
@@ -659,7 +659,7 @@ function Tt(t) {
|
|
|
659
659
|
this.set(r[0], r[1]);
|
|
660
660
|
}
|
|
661
661
|
}
|
|
662
|
-
Tt.prototype.clear =
|
|
662
|
+
Tt.prototype.clear = Yo;
|
|
663
663
|
Tt.prototype.delete = Xo;
|
|
664
664
|
Tt.prototype.get = Jo;
|
|
665
665
|
Tt.prototype.has = Qo;
|
|
@@ -671,13 +671,13 @@ function na(t) {
|
|
|
671
671
|
function ra(t) {
|
|
672
672
|
return this.__data__.has(t);
|
|
673
673
|
}
|
|
674
|
-
function
|
|
674
|
+
function Zt(t) {
|
|
675
675
|
var e = -1, n = t == null ? 0 : t.length;
|
|
676
676
|
for (this.__data__ = new Tt(); ++e < n; )
|
|
677
677
|
this.add(t[e]);
|
|
678
678
|
}
|
|
679
|
-
|
|
680
|
-
|
|
679
|
+
Zt.prototype.add = Zt.prototype.push = na;
|
|
680
|
+
Zt.prototype.has = ra;
|
|
681
681
|
function sa(t, e, n, r) {
|
|
682
682
|
for (var s = t.length, o = n + -1; ++o < s; )
|
|
683
683
|
if (e(t[o], o, t))
|
|
@@ -729,7 +729,7 @@ function ma(t, e, n) {
|
|
|
729
729
|
var l = ha(t);
|
|
730
730
|
if (l)
|
|
731
731
|
return Kn(l);
|
|
732
|
-
a = !1, s = ua, c = new
|
|
732
|
+
a = !1, s = ua, c = new Zt();
|
|
733
733
|
} else
|
|
734
734
|
c = i;
|
|
735
735
|
t:
|
|
@@ -766,7 +766,7 @@ function wa() {
|
|
|
766
766
|
throw new Error(`No argent account contract found: v${t} `);
|
|
767
767
|
return tt[t];
|
|
768
768
|
}
|
|
769
|
-
function
|
|
769
|
+
function Yl() {
|
|
770
770
|
const t = Q.maxSatisfying(Object.keys(Kt), "*");
|
|
771
771
|
if (!t)
|
|
772
772
|
throw new Error(`No argent multisig contract found: v${t} `);
|
|
@@ -775,7 +775,7 @@ function Zl() {
|
|
|
775
775
|
function ya() {
|
|
776
776
|
return Object.entries(tt).filter(([t]) => Q.gte(t, "0.4.0")).map(([, t]) => t);
|
|
777
777
|
}
|
|
778
|
-
function
|
|
778
|
+
function Zl() {
|
|
779
779
|
const t = Q.maxSatisfying(Object.keys(tt), "<0.3.0");
|
|
780
780
|
if (!t)
|
|
781
781
|
throw new Error(`No argent account contract found: v${t} `);
|
|
@@ -830,7 +830,7 @@ function Aa(t, e, n, r) {
|
|
|
830
830
|
...s ? {} : { guardian: r || "0" }
|
|
831
831
|
};
|
|
832
832
|
if (ya().some((i) => nt(i, e))) {
|
|
833
|
-
const i =
|
|
833
|
+
const i = Ye(n, Ze.Starknet), c = r ? new Je(Qe.Some, Ye(r, Ze.Starknet)) : new Je(Qe.None, null);
|
|
834
834
|
return { ownerSigner: i, guardianAsOption: c };
|
|
835
835
|
}
|
|
836
836
|
return t === "0" ? cs.parse({
|
|
@@ -848,9 +848,9 @@ function xa(t, e, n, r, s) {
|
|
|
848
848
|
}
|
|
849
849
|
function tu(t, e) {
|
|
850
850
|
const n = en(t), r = en();
|
|
851
|
-
return
|
|
851
|
+
return $t(() => {
|
|
852
852
|
n.current = t;
|
|
853
|
-
}, [t]),
|
|
853
|
+
}, [t]), $t(() => () => {
|
|
854
854
|
r.current && clearTimeout(r.current);
|
|
855
855
|
}, []), (...s) => {
|
|
856
856
|
r.current && clearTimeout(r.current), r.current = setTimeout(() => n.current(...s), e);
|
|
@@ -858,7 +858,7 @@ function tu(t, e) {
|
|
|
858
858
|
}
|
|
859
859
|
function eu(t, e) {
|
|
860
860
|
const [n, r] = jn(t);
|
|
861
|
-
return
|
|
861
|
+
return $t(() => {
|
|
862
862
|
const s = setTimeout(() => {
|
|
863
863
|
r(t);
|
|
864
864
|
}, e);
|
|
@@ -922,20 +922,20 @@ function ru(t) {
|
|
|
922
922
|
var e;
|
|
923
923
|
return (e = Na(t)) == null ? void 0 : e.url;
|
|
924
924
|
}
|
|
925
|
-
const
|
|
925
|
+
const Yn = F.object({
|
|
926
926
|
domain: us,
|
|
927
927
|
address: te.optional(),
|
|
928
|
-
avatar:
|
|
929
|
-
status:
|
|
930
|
-
}), Ca =
|
|
931
|
-
provider:
|
|
932
|
-
name:
|
|
933
|
-
avatar:
|
|
934
|
-
}), ka =
|
|
928
|
+
avatar: F.string().optional(),
|
|
929
|
+
status: F.union([F.literal("KNOWN"), F.literal("UNKNOWN")])
|
|
930
|
+
}), Ca = F.array(Yn), Oa = F.object({
|
|
931
|
+
provider: F.string(),
|
|
932
|
+
name: F.string(),
|
|
933
|
+
avatar: F.string().optional()
|
|
934
|
+
}), ka = F.object({
|
|
935
935
|
address: te,
|
|
936
|
-
status:
|
|
937
|
-
resolutions:
|
|
938
|
-
}), Pa =
|
|
936
|
+
status: F.union([F.literal("KNOWN"), F.literal("UNKNOWN")]),
|
|
937
|
+
resolutions: F.array(Oa).optional()
|
|
938
|
+
}), Pa = F.array(F.string()), Ra = ka.array();
|
|
939
939
|
class su {
|
|
940
940
|
constructor(e, n) {
|
|
941
941
|
this.apiBase = e, this.headers = n, this.httpService = new Gn(this.headers, "json");
|
|
@@ -949,7 +949,7 @@ class su {
|
|
|
949
949
|
return i.data;
|
|
950
950
|
}
|
|
951
951
|
async getAddressFromStarknetId(e, n, r) {
|
|
952
|
-
const s = P(this.apiBase, e, "starknet.id", n, r ? "?includeAvatar=true" : ""), o = await this.httpService.get(s), a =
|
|
952
|
+
const s = P(this.apiBase, e, "starknet.id", n, r ? "?includeAvatar=true" : ""), o = await this.httpService.get(s), a = Yn.safeParse(o);
|
|
953
953
|
if (!a.success)
|
|
954
954
|
throw new Error("Failed to parse name resolution");
|
|
955
955
|
return a.data;
|
|
@@ -972,16 +972,16 @@ class su {
|
|
|
972
972
|
return s.data;
|
|
973
973
|
}
|
|
974
974
|
}
|
|
975
|
-
const
|
|
975
|
+
const Zn = (t) => t.slice(0, 6) + "..." + t.slice(-4);
|
|
976
976
|
function an(t) {
|
|
977
977
|
if (!Number.isSafeInteger(t) || t < 0)
|
|
978
978
|
throw new Error(`positive integer expected, not ${t}`);
|
|
979
979
|
}
|
|
980
|
-
function
|
|
980
|
+
function $a(t) {
|
|
981
981
|
return t instanceof Uint8Array || t != null && typeof t == "object" && t.constructor.name === "Uint8Array";
|
|
982
982
|
}
|
|
983
983
|
function oe(t, ...e) {
|
|
984
|
-
if (
|
|
984
|
+
if (!$a(t))
|
|
985
985
|
throw new Error("Uint8Array expected");
|
|
986
986
|
if (e.length > 0 && !e.includes(t.length))
|
|
987
987
|
throw new Error(`Uint8Array expected of length ${e}, not of length=${t.length}`);
|
|
@@ -992,7 +992,7 @@ function cn(t, e = !0) {
|
|
|
992
992
|
if (e && t.finished)
|
|
993
993
|
throw new Error("Hash#digest() has already been called");
|
|
994
994
|
}
|
|
995
|
-
function
|
|
995
|
+
function Fa(t, e) {
|
|
996
996
|
oe(t);
|
|
997
997
|
const n = e.outputLen;
|
|
998
998
|
if (t.length < n)
|
|
@@ -1043,12 +1043,12 @@ function Ka(t) {
|
|
|
1043
1043
|
const e = (r) => t().update(Jn(r)).digest(), n = t();
|
|
1044
1044
|
return e.outputLen = n.outputLen, e.blockLen = n.blockLen, e.create = () => t(), e;
|
|
1045
1045
|
}
|
|
1046
|
-
const Qn = [], tr = [], er = [],
|
|
1046
|
+
const Qn = [], tr = [], er = [], Ya = /* @__PURE__ */ BigInt(0), Nt = /* @__PURE__ */ BigInt(1), Za = /* @__PURE__ */ BigInt(2), Xa = /* @__PURE__ */ BigInt(7), Ja = /* @__PURE__ */ BigInt(256), Qa = /* @__PURE__ */ BigInt(113);
|
|
1047
1047
|
for (let t = 0, e = Nt, n = 1, r = 0; t < 24; t++) {
|
|
1048
1048
|
[n, r] = [r, (2 * n + 3 * r) % 5], Qn.push(2 * (5 * r + n)), tr.push((t + 1) * (t + 2) / 2 % 64);
|
|
1049
|
-
let s =
|
|
1049
|
+
let s = Ya;
|
|
1050
1050
|
for (let o = 0; o < 7; o++)
|
|
1051
|
-
e = (e << Nt ^ (e >> Xa) * Qa) % Ja, e &
|
|
1051
|
+
e = (e << Nt ^ (e >> Xa) * Qa) % Ja, e & Za && (s ^= Nt << (Nt << /* @__PURE__ */ BigInt(o)) - Nt);
|
|
1052
1052
|
er.push(s);
|
|
1053
1053
|
}
|
|
1054
1054
|
const [ti, ei] = /* @__PURE__ */ ja(er, !0), fn = (t, e, n) => n > 32 ? Ha(t, e, n) : La(t, e, n), hn = (t, e, n) => n > 32 ? Va(t, e, n) : Da(t, e, n);
|
|
@@ -1126,7 +1126,7 @@ let ri = class nr extends za {
|
|
|
1126
1126
|
return an(e), this.xofInto(new Uint8Array(e));
|
|
1127
1127
|
}
|
|
1128
1128
|
digestInto(e) {
|
|
1129
|
-
if (
|
|
1129
|
+
if (Fa(e, this), this.finished)
|
|
1130
1130
|
throw new Error("digest() was already called");
|
|
1131
1131
|
return this.writeInto(e), this.destroy(), e;
|
|
1132
1132
|
}
|
|
@@ -1212,9 +1212,9 @@ function fu(t) {
|
|
|
1212
1212
|
const hu = (t) => {
|
|
1213
1213
|
const e = /^(0|0x([a-f0-9A-F]+)?)$/;
|
|
1214
1214
|
return !!(t === "" || e.test(t));
|
|
1215
|
-
},
|
|
1215
|
+
}, Z = (t) => !isNaN(parseFloat(t)) && isFinite(Number(t)), pu = (t, e = 16) => {
|
|
1216
1216
|
const n = new RegExp(`^[0-9]*.?[0-9]{0,${e}}$`);
|
|
1217
|
-
return t === "" ? !0 :
|
|
1217
|
+
return t === "" ? !0 : Z(t) ? !!n.test(t) : !1;
|
|
1218
1218
|
}, Re = {
|
|
1219
1219
|
CURRENCY: {
|
|
1220
1220
|
minDecimalPlaces: 2,
|
|
@@ -1237,7 +1237,7 @@ const hu = (t) => {
|
|
|
1237
1237
|
...Re.TOKEN,
|
|
1238
1238
|
...e || {}
|
|
1239
1239
|
}), rr = (t, { minDecimalPlaces: e, maxDecimalPlaces: n, minDecimalSignificantDigits: r, decimalPlacesWhenZero: s, allowLeadingZerosInDecimalPart: o } = Re.CURRENCY) => {
|
|
1240
|
-
if (!
|
|
1240
|
+
if (!Z(t))
|
|
1241
1241
|
return null;
|
|
1242
1242
|
const a = new Xe(typeof t == "bigint" ? t.toString() : t);
|
|
1243
1243
|
let i;
|
|
@@ -1255,7 +1255,7 @@ const hu = (t) => {
|
|
|
1255
1255
|
return l.length < d && (l = i.substring(0, d)), l;
|
|
1256
1256
|
}, wi = (t, e = 18) => {
|
|
1257
1257
|
const n = t.replace(",", ".");
|
|
1258
|
-
return !t || !
|
|
1258
|
+
return !t || !Z(n) ? 0n : Qt(n, Number(e)).value;
|
|
1259
1259
|
};
|
|
1260
1260
|
function Ut(t) {
|
|
1261
1261
|
return Dt.bnToUint256(t);
|
|
@@ -1370,7 +1370,7 @@ class bu {
|
|
|
1370
1370
|
owner: {
|
|
1371
1371
|
account_address: ((s = e.owner) == null ? void 0 : s.address) || n
|
|
1372
1372
|
},
|
|
1373
|
-
contract_name:
|
|
1373
|
+
contract_name: Zn(e.contractAddress)
|
|
1374
1374
|
};
|
|
1375
1375
|
}
|
|
1376
1376
|
}
|
|
@@ -1387,7 +1387,7 @@ function bi(t) {
|
|
|
1387
1387
|
function me(t, e) {
|
|
1388
1388
|
return {
|
|
1389
1389
|
contractAddress: te.parse(t.contractAddress),
|
|
1390
|
-
name: t.name ||
|
|
1390
|
+
name: t.name || Zn(t.contractAddress),
|
|
1391
1391
|
description: t.description ?? "",
|
|
1392
1392
|
imageUri: t.imageUrls.preview,
|
|
1393
1393
|
...e && {
|
|
@@ -1491,7 +1491,7 @@ function ir(t) {
|
|
|
1491
1491
|
throw new Error(`utf8ToBytes expected string, got ${typeof t}`);
|
|
1492
1492
|
return new Uint8Array(new TextEncoder().encode(t));
|
|
1493
1493
|
}
|
|
1494
|
-
function
|
|
1494
|
+
function $e(t) {
|
|
1495
1495
|
if (typeof t == "string" && (t = ir(t)), !Bi(t))
|
|
1496
1496
|
throw new Error(`expected Uint8Array, got ${typeof t}`);
|
|
1497
1497
|
return t;
|
|
@@ -1503,7 +1503,7 @@ let cr = class {
|
|
|
1503
1503
|
}
|
|
1504
1504
|
};
|
|
1505
1505
|
function lr(t) {
|
|
1506
|
-
const e = (r) => t().update(
|
|
1506
|
+
const e = (r) => t().update($e(r)).digest(), n = t();
|
|
1507
1507
|
return e.outputLen = n.outputLen, e.blockLen = n.blockLen, e.create = () => t(), e;
|
|
1508
1508
|
}
|
|
1509
1509
|
const [ur, dr, fr] = [[], [], []], Ci = /* @__PURE__ */ BigInt(0), Ct = /* @__PURE__ */ BigInt(1), Oi = /* @__PURE__ */ BigInt(2), ki = /* @__PURE__ */ BigInt(7), Pi = /* @__PURE__ */ BigInt(256), Ri = /* @__PURE__ */ BigInt(113);
|
|
@@ -1514,7 +1514,7 @@ for (let t = 0, e = Ct, n = 1, r = 0; t < 24; t++) {
|
|
|
1514
1514
|
e = (e << Ct ^ (e >> ki) * Ri) % Pi, e & Oi && (s ^= Ct << (Ct << /* @__PURE__ */ BigInt(o)) - Ct);
|
|
1515
1515
|
fr.push(s);
|
|
1516
1516
|
}
|
|
1517
|
-
const [
|
|
1517
|
+
const [$i, Fi] = /* @__PURE__ */ Ai(fr, !0), Sn = (t, e, n) => n > 32 ? Ti(t, e, n) : xi(t, e, n), En = (t, e, n) => n > 32 ? Ii(t, e, n) : vi(t, e, n);
|
|
1518
1518
|
function Ui(t, e = 24) {
|
|
1519
1519
|
const n = new Uint32Array(10);
|
|
1520
1520
|
for (let r = 24 - e; r < 24; r++) {
|
|
@@ -1536,11 +1536,11 @@ function Ui(t, e = 24) {
|
|
|
1536
1536
|
for (let i = 0; i < 10; i++)
|
|
1537
1537
|
t[a + i] ^= ~n[(i + 2) % 10] & n[(i + 4) % 10];
|
|
1538
1538
|
}
|
|
1539
|
-
t[0] ^=
|
|
1539
|
+
t[0] ^= $i[r], t[1] ^= Fi[r];
|
|
1540
1540
|
}
|
|
1541
1541
|
n.fill(0);
|
|
1542
1542
|
}
|
|
1543
|
-
class
|
|
1543
|
+
class Fe extends cr {
|
|
1544
1544
|
// NOTE: we accept arguments in bytes instead of bits here.
|
|
1545
1545
|
constructor(e, n, r, s = !1, o = 24) {
|
|
1546
1546
|
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, yn(r), 0 >= this.blockLen || this.blockLen >= 200)
|
|
@@ -1553,7 +1553,7 @@ class $e extends cr {
|
|
|
1553
1553
|
update(e) {
|
|
1554
1554
|
Xt(this);
|
|
1555
1555
|
const { blockLen: n, state: r } = this;
|
|
1556
|
-
e =
|
|
1556
|
+
e = $e(e);
|
|
1557
1557
|
const s = e.length;
|
|
1558
1558
|
for (let o = 0; o < s; ) {
|
|
1559
1559
|
const a = Math.min(n - this.pos, s - o);
|
|
@@ -1601,10 +1601,10 @@ class $e extends cr {
|
|
|
1601
1601
|
}
|
|
1602
1602
|
_cloneInto(e) {
|
|
1603
1603
|
const { blockLen: n, suffix: r, outputLen: s, rounds: o, enableXOF: a } = this;
|
|
1604
|
-
return e || (e = new
|
|
1604
|
+
return e || (e = new Fe(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;
|
|
1605
1605
|
}
|
|
1606
1606
|
}
|
|
1607
|
-
const ji = (t, e, n) => lr(() => new
|
|
1607
|
+
const ji = (t, e, n) => lr(() => new Fe(e, t, n)), Li = /* @__PURE__ */ ji(1, 136, 256 / 8);
|
|
1608
1608
|
function Di(t, e, n, r) {
|
|
1609
1609
|
if (typeof t.setBigUint64 == "function")
|
|
1610
1610
|
return t.setBigUint64(e, n, r);
|
|
@@ -1618,7 +1618,7 @@ class Hi extends cr {
|
|
|
1618
1618
|
update(e) {
|
|
1619
1619
|
Xt(this);
|
|
1620
1620
|
const { view: n, buffer: r, blockLen: s } = this;
|
|
1621
|
-
e =
|
|
1621
|
+
e = $e(e);
|
|
1622
1622
|
const o = e.length;
|
|
1623
1623
|
for (let a = 0; a < o; ) {
|
|
1624
1624
|
const i = Math.min(s - this.pos, o - a);
|
|
@@ -1838,7 +1838,7 @@ function jt(...t) {
|
|
|
1838
1838
|
e.set(r, n), n += r.length;
|
|
1839
1839
|
}), e;
|
|
1840
1840
|
}
|
|
1841
|
-
function
|
|
1841
|
+
function Yi(t, e) {
|
|
1842
1842
|
if (t.length !== e.length)
|
|
1843
1843
|
return !1;
|
|
1844
1844
|
for (let n = 0; n < t.length; n++)
|
|
@@ -1846,7 +1846,7 @@ function Zi(t, e) {
|
|
|
1846
1846
|
return !1;
|
|
1847
1847
|
return !0;
|
|
1848
1848
|
}
|
|
1849
|
-
function
|
|
1849
|
+
function Zi(t) {
|
|
1850
1850
|
if (typeof t != "string")
|
|
1851
1851
|
throw new Error(`utf8ToBytes expected string, got ${typeof t}`);
|
|
1852
1852
|
return new TextEncoder().encode(t);
|
|
@@ -1927,18 +1927,18 @@ const ec = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1927
1927
|
concatBytes: jt,
|
|
1928
1928
|
createHmacDrbg: wr,
|
|
1929
1929
|
ensureBytes: V,
|
|
1930
|
-
equalBytes:
|
|
1930
|
+
equalBytes: Yi,
|
|
1931
1931
|
hexToBytes: pt,
|
|
1932
1932
|
hexToNumber: Ue,
|
|
1933
1933
|
numberToBytesBE: Et,
|
|
1934
1934
|
numberToBytesLE: gr,
|
|
1935
1935
|
numberToHexUnpadded: mr,
|
|
1936
1936
|
numberToVarBytesBE: Ki,
|
|
1937
|
-
utf8ToBytes:
|
|
1937
|
+
utf8ToBytes: Zi,
|
|
1938
1938
|
validateObject: Ht
|
|
1939
1939
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1940
1940
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
1941
|
-
const U = BigInt(0),
|
|
1941
|
+
const U = BigInt(0), $ = BigInt(1), ut = BigInt(2), nc = BigInt(3), Ae = BigInt(4), xn = BigInt(5), vn = BigInt(8);
|
|
1942
1942
|
BigInt(9);
|
|
1943
1943
|
BigInt(16);
|
|
1944
1944
|
function M(t, e) {
|
|
@@ -1948,34 +1948,34 @@ function M(t, e) {
|
|
|
1948
1948
|
function rc(t, e, n) {
|
|
1949
1949
|
if (n <= U || e < U)
|
|
1950
1950
|
throw new Error("Expected power/modulo > 0");
|
|
1951
|
-
if (n ===
|
|
1951
|
+
if (n === $)
|
|
1952
1952
|
return U;
|
|
1953
|
-
let r =
|
|
1953
|
+
let r = $;
|
|
1954
1954
|
for (; e > U; )
|
|
1955
|
-
e &
|
|
1955
|
+
e & $ && (r = r * t % n), t = t * t % n, e >>= $;
|
|
1956
1956
|
return r;
|
|
1957
1957
|
}
|
|
1958
1958
|
function xe(t, e) {
|
|
1959
1959
|
if (t === U || e <= U)
|
|
1960
1960
|
throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);
|
|
1961
|
-
let n = M(t, e), r = e, s = U, o =
|
|
1961
|
+
let n = M(t, e), r = e, s = U, o = $;
|
|
1962
1962
|
for (; n !== U; ) {
|
|
1963
1963
|
const i = r / n, c = r % n, l = s - o * i;
|
|
1964
1964
|
r = n, n = c, s = o, o = l;
|
|
1965
1965
|
}
|
|
1966
|
-
if (r !==
|
|
1966
|
+
if (r !== $)
|
|
1967
1967
|
throw new Error("invert: does not exist");
|
|
1968
1968
|
return M(s, e);
|
|
1969
1969
|
}
|
|
1970
1970
|
function sc(t) {
|
|
1971
|
-
const e = (t -
|
|
1971
|
+
const e = (t - $) / ut;
|
|
1972
1972
|
let n, r, s;
|
|
1973
|
-
for (n = t -
|
|
1973
|
+
for (n = t - $, r = 0; n % ut === U; n /= ut, r++)
|
|
1974
1974
|
;
|
|
1975
|
-
for (s = ut; s < t && rc(s, e, t) !== t -
|
|
1975
|
+
for (s = ut; s < t && rc(s, e, t) !== t - $; s++)
|
|
1976
1976
|
;
|
|
1977
1977
|
if (r === 1) {
|
|
1978
|
-
const a = (t +
|
|
1978
|
+
const a = (t + $) / Ae;
|
|
1979
1979
|
return function(c, l) {
|
|
1980
1980
|
const d = c.pow(l, a);
|
|
1981
1981
|
if (!c.eql(c.sqr(d), l))
|
|
@@ -1983,7 +1983,7 @@ function sc(t) {
|
|
|
1983
1983
|
return d;
|
|
1984
1984
|
};
|
|
1985
1985
|
}
|
|
1986
|
-
const o = (n +
|
|
1986
|
+
const o = (n + $) / ut;
|
|
1987
1987
|
return function(i, c) {
|
|
1988
1988
|
if (i.pow(c, e) === i.neg(i.ONE))
|
|
1989
1989
|
throw new Error("Cannot find square root");
|
|
@@ -1994,7 +1994,7 @@ function sc(t) {
|
|
|
1994
1994
|
let m = 1;
|
|
1995
1995
|
for (let h = i.sqr(y); m < l && !i.eql(h, i.ONE); m++)
|
|
1996
1996
|
h = i.sqr(h);
|
|
1997
|
-
const S = i.pow(d,
|
|
1997
|
+
const S = i.pow(d, $ << BigInt(l - m - 1));
|
|
1998
1998
|
d = i.sqr(S), u = i.mul(u, S), y = i.mul(y, d), l = m;
|
|
1999
1999
|
}
|
|
2000
2000
|
return u;
|
|
@@ -2002,7 +2002,7 @@ function sc(t) {
|
|
|
2002
2002
|
}
|
|
2003
2003
|
function oc(t) {
|
|
2004
2004
|
if (t % Ae === nc) {
|
|
2005
|
-
const e = (t +
|
|
2005
|
+
const e = (t + $) / Ae;
|
|
2006
2006
|
return function(r, s) {
|
|
2007
2007
|
const o = r.pow(s, e);
|
|
2008
2008
|
if (!r.eql(r.sqr(o), s))
|
|
@@ -2054,11 +2054,11 @@ function yr(t, e, n) {
|
|
|
2054
2054
|
throw new Error("Expected power > 0");
|
|
2055
2055
|
if (n === U)
|
|
2056
2056
|
return t.ONE;
|
|
2057
|
-
if (n ===
|
|
2057
|
+
if (n === $)
|
|
2058
2058
|
return e;
|
|
2059
2059
|
let r = t.ONE, s = e;
|
|
2060
2060
|
for (; n > U; )
|
|
2061
|
-
n &
|
|
2061
|
+
n & $ && (r = t.mul(r, s)), s = t.sqr(s), n >>= $;
|
|
2062
2062
|
return r;
|
|
2063
2063
|
}
|
|
2064
2064
|
function ic(t, e) {
|
|
@@ -2081,7 +2081,7 @@ function He(t, e, n = !1, r = {}) {
|
|
|
2081
2081
|
BYTES: o,
|
|
2082
2082
|
MASK: ce(s),
|
|
2083
2083
|
ZERO: U,
|
|
2084
|
-
ONE:
|
|
2084
|
+
ONE: $,
|
|
2085
2085
|
create: (c) => M(c, t),
|
|
2086
2086
|
isValid: (c) => {
|
|
2087
2087
|
if (typeof c != "bigint")
|
|
@@ -2089,7 +2089,7 @@ function He(t, e, n = !1, r = {}) {
|
|
|
2089
2089
|
return U <= c && c < t;
|
|
2090
2090
|
},
|
|
2091
2091
|
is0: (c) => c === U,
|
|
2092
|
-
isOdd: (c) => (c &
|
|
2092
|
+
isOdd: (c) => (c & $) === $,
|
|
2093
2093
|
neg: (c) => M(-c, t),
|
|
2094
2094
|
eql: (c, l) => c === l,
|
|
2095
2095
|
sqr: (c) => M(c * c, t),
|
|
@@ -2124,7 +2124,7 @@ function cc(t, e, n = !1) {
|
|
|
2124
2124
|
if (s < 24 || r < s || r > 1024)
|
|
2125
2125
|
throw new Error(`hashToPrivateScalar: expected ${s}-1024 bytes of input, got ${r}`);
|
|
2126
2126
|
const o = n ? je(t) : X(t);
|
|
2127
|
-
return M(o, e -
|
|
2127
|
+
return M(o, e - $) + $;
|
|
2128
2128
|
}
|
|
2129
2129
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
2130
2130
|
function lc(t) {
|
|
@@ -3020,7 +3020,7 @@ function Ir(t, e) {
|
|
|
3020
3020
|
return n;
|
|
3021
3021
|
}
|
|
3022
3022
|
const Pc = Ir(Lt[1], Lt[2]), Rc = Ir(Lt[3], Lt[4]);
|
|
3023
|
-
function
|
|
3023
|
+
function $c(t) {
|
|
3024
3024
|
let e;
|
|
3025
3025
|
if (typeof t == "bigint")
|
|
3026
3026
|
e = t;
|
|
@@ -3035,7 +3035,7 @@ function Fc(t) {
|
|
|
3035
3035
|
return e;
|
|
3036
3036
|
}
|
|
3037
3037
|
function Bn(t, e, n) {
|
|
3038
|
-
let r =
|
|
3038
|
+
let r = $c(e);
|
|
3039
3039
|
for (let s = 0; s < 252; s++) {
|
|
3040
3040
|
const o = n[s];
|
|
3041
3041
|
if (o.equals(t))
|
|
@@ -3044,7 +3044,7 @@ function Bn(t, e, n) {
|
|
|
3044
3044
|
}
|
|
3045
3045
|
return t;
|
|
3046
3046
|
}
|
|
3047
|
-
function
|
|
3047
|
+
function Fc(t, e) {
|
|
3048
3048
|
let n = Lt[0];
|
|
3049
3049
|
return n = Bn(n, t, Pc), n = Bn(n, e, Rc), Oc(n.toRawBytes(!0));
|
|
3050
3050
|
}
|
|
@@ -3149,7 +3149,7 @@ class ku {
|
|
|
3149
3149
|
* @returns A promise that resolves to the recovery details.
|
|
3150
3150
|
*/
|
|
3151
3151
|
async startRecovery(e, n, r, s) {
|
|
3152
|
-
const { r: o, s: a } = vs.starkCurve.sign(
|
|
3152
|
+
const { r: o, s: a } = vs.starkCurve.sign(Fc(jc(ks("utf8", "starknet:recovery")), r), s), i = {
|
|
3153
3153
|
feeToken: n,
|
|
3154
3154
|
signerSignature: {
|
|
3155
3155
|
type: "StarknetKey",
|
|
@@ -3194,16 +3194,16 @@ function le(t) {
|
|
|
3194
3194
|
function Ru() {
|
|
3195
3195
|
return le("Firefox");
|
|
3196
3196
|
}
|
|
3197
|
-
function
|
|
3197
|
+
function $u() {
|
|
3198
3198
|
return le("Chrome");
|
|
3199
3199
|
}
|
|
3200
|
-
function
|
|
3200
|
+
function Fu() {
|
|
3201
3201
|
return le("Safari");
|
|
3202
3202
|
}
|
|
3203
3203
|
function Uu() {
|
|
3204
3204
|
return le("Edge");
|
|
3205
3205
|
}
|
|
3206
|
-
const ju = f.string().refine((t) => Rs(t,
|
|
3206
|
+
const ju = f.string().refine((t) => Rs(t, $s), "Invalid seedphrase"), Ve = [
|
|
3207
3207
|
{
|
|
3208
3208
|
address: "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
|
|
3209
3209
|
name: "Ether",
|
|
@@ -3380,7 +3380,7 @@ const ju = f.string().refine((t) => Rs(t, Fs), "Invalid seedphrase"), Ve = [
|
|
|
3380
3380
|
networkId: "mainnet-alpha",
|
|
3381
3381
|
image: "https://dv3jj1unlp2jl.cloudfront.net/128/color/ekubo.png"
|
|
3382
3382
|
}
|
|
3383
|
-
],
|
|
3383
|
+
], Yc = async (t, e, n) => {
|
|
3384
3384
|
const r = await n.callContract({
|
|
3385
3385
|
contractAddress: t,
|
|
3386
3386
|
entrypoint: "balanceOf",
|
|
@@ -3409,7 +3409,7 @@ const ju = f.string().refine((t) => Rs(t, Fs), "Invalid seedphrase"), Ve = [
|
|
|
3409
3409
|
return o.push(l), o;
|
|
3410
3410
|
}, []);
|
|
3411
3411
|
}, Du = async () => Ve, Hu = ({ address: t, networkId: e }) => Ve.find((r) => r.address === t && r.networkId === e), Vu = ({ amount: t, decimals: e, unitCurrencyValue: n }) => {
|
|
3412
|
-
if (!
|
|
3412
|
+
if (!Z(t) || !Z(e) || !Z(n))
|
|
3413
3413
|
return;
|
|
3414
3414
|
const r = Number(e), s = BigInt(t) * On(n.toString()).value;
|
|
3415
3415
|
return Be({
|
|
@@ -3417,17 +3417,17 @@ const ju = f.string().refine((t) => Rs(t, Fs), "Invalid seedphrase"), Ve = [
|
|
|
3417
3417
|
decimals: r + Jr
|
|
3418
3418
|
});
|
|
3419
3419
|
}, Mu = ({ unitAmount: t, decimals: e }) => {
|
|
3420
|
-
if (t === void 0 || !
|
|
3420
|
+
if (t === void 0 || !Z(t) || e === void 0 || !Z(e))
|
|
3421
3421
|
return;
|
|
3422
3422
|
const n = Number(e);
|
|
3423
3423
|
return Qt(t.toString(), n).value.toString();
|
|
3424
|
-
}, Gu = (t) =>
|
|
3425
|
-
if (t === void 0 || !
|
|
3424
|
+
}, Gu = (t) => Z(t) ? Number(t) : 18, { UINT_256_MAX: Zc } = Dt, Xc = (t) => String(t) === String(Zc), qu = (t, e = "$", n) => {
|
|
3425
|
+
if (t === void 0 || !Z(t))
|
|
3426
3426
|
return null;
|
|
3427
3427
|
const r = mi(t, n);
|
|
3428
3428
|
return [e, r].filter(Boolean).join("");
|
|
3429
3429
|
}, Jc = "Unlimited", Wu = ({ amount: t, decimals: e, symbol: n, showPlusSign: r = !1, withSymbol: s = !0, unlimitedText: o = Jc, prettyConfigOverrides: a }) => {
|
|
3430
|
-
if (!
|
|
3430
|
+
if (!Z(t))
|
|
3431
3431
|
return null;
|
|
3432
3432
|
let i, c = !1;
|
|
3433
3433
|
if (Xc(t))
|
|
@@ -3441,6 +3441,18 @@ const ju = f.string().refine((t) => Rs(t, Fs), "Invalid seedphrase"), Ve = [
|
|
|
3441
3441
|
const l = [i, s && n].filter(Boolean).join(" ");
|
|
3442
3442
|
return r && c ? `+${l}` : l;
|
|
3443
3443
|
};
|
|
3444
|
+
function zu(t) {
|
|
3445
|
+
return {
|
|
3446
|
+
USD: "$",
|
|
3447
|
+
EUR: "€",
|
|
3448
|
+
GBP: "£",
|
|
3449
|
+
JPY: "¥",
|
|
3450
|
+
CAD: "C$",
|
|
3451
|
+
AUD: "A$",
|
|
3452
|
+
CHF: "CHF",
|
|
3453
|
+
CNY: "CN¥"
|
|
3454
|
+
}[t.toUpperCase()] || "$";
|
|
3455
|
+
}
|
|
3444
3456
|
var Qc = ys, tl = Qc;
|
|
3445
3457
|
function el(t, e) {
|
|
3446
3458
|
function n(r, s) {
|
|
@@ -3474,7 +3486,7 @@ function el(t, e) {
|
|
|
3474
3486
|
}
|
|
3475
3487
|
var nl = el;
|
|
3476
3488
|
const rl = /* @__PURE__ */ ds(nl);
|
|
3477
|
-
class
|
|
3489
|
+
class Ku {
|
|
3478
3490
|
constructor(e, n) {
|
|
3479
3491
|
this.apiBase = e, this.httpService = n, this.TOKENS_INFO_URL = "/tokens/info", this.TOKENS_DEFI_DECOMPOSITION_URL = "/tokens/defi/decomposition";
|
|
3480
3492
|
}
|
|
@@ -3533,7 +3545,7 @@ class zu {
|
|
|
3533
3545
|
return r.dapps;
|
|
3534
3546
|
}
|
|
3535
3547
|
}
|
|
3536
|
-
const
|
|
3548
|
+
const Yu = (t, e, n, r) => ({
|
|
3537
3549
|
contractAddress: t,
|
|
3538
3550
|
entrypoint: "transfer",
|
|
3539
3551
|
calldata: mt.compile({
|
|
@@ -3549,7 +3561,7 @@ const Ku = (t, e, n, r) => ({
|
|
|
3549
3561
|
tokenId: Ut(r)
|
|
3550
3562
|
// OZ specs need a uint256 as tokenId
|
|
3551
3563
|
})
|
|
3552
|
-
}),
|
|
3564
|
+
}), Xu = (t, e, n, r) => ({
|
|
3553
3565
|
contractAddress: t,
|
|
3554
3566
|
entrypoint: "safeTransferFrom",
|
|
3555
3567
|
calldata: mt.compile({
|
|
@@ -3591,13 +3603,13 @@ function Pt(t) {
|
|
|
3591
3603
|
};
|
|
3592
3604
|
}
|
|
3593
3605
|
function Ee(t) {
|
|
3594
|
-
return sl({ unit: t }) ? Oe :
|
|
3606
|
+
return sl({ unit: t }) ? Oe : $n;
|
|
3595
3607
|
}
|
|
3596
|
-
function
|
|
3608
|
+
function Ju(t, e, n = 2) {
|
|
3597
3609
|
const r = BigInt(10 ** n), s = BigInt(Math.round(e * 10 ** n));
|
|
3598
3610
|
return t * s / r;
|
|
3599
3611
|
}
|
|
3600
|
-
const
|
|
3612
|
+
const Qu = [Oe], Nr = (t, e = ll) => {
|
|
3601
3613
|
if (t.max && "amount" in t.max)
|
|
3602
3614
|
return {
|
|
3603
3615
|
...t,
|
|
@@ -3623,17 +3635,17 @@ const Ju = [Oe], Nr = (t, e = ll) => {
|
|
|
3623
3635
|
}, _e = (t) => {
|
|
3624
3636
|
const e = ol(t);
|
|
3625
3637
|
return e || Jt(Nr(t));
|
|
3626
|
-
},
|
|
3638
|
+
}, td = (t) => {
|
|
3627
3639
|
if (t.deployment && !nt(t.deployment.feeTokenAddress, t.transactions.feeTokenAddress))
|
|
3628
3640
|
throw Error("Cannot calculate estimated fees for different tokens");
|
|
3629
3641
|
const e = Jt(t.transactions), n = t.deployment ? Jt(t.deployment) : 0n;
|
|
3630
3642
|
return e + n;
|
|
3631
|
-
},
|
|
3643
|
+
}, ed = (t) => {
|
|
3632
3644
|
if (t.deployment && !nt(t.deployment.feeTokenAddress, t.transactions.feeTokenAddress))
|
|
3633
3645
|
throw Error("Cannot calculate estimated fees for different tokens");
|
|
3634
3646
|
const e = t.deployment ? _e(t.deployment) : 0n, n = _e(t.transactions);
|
|
3635
3647
|
return e + n;
|
|
3636
|
-
},
|
|
3648
|
+
}, nd = (t, e) => [
|
|
3637
3649
|
{
|
|
3638
3650
|
contractAddress: t,
|
|
3639
3651
|
entrypoint: "transfer",
|
|
@@ -3648,7 +3660,7 @@ const Ju = [Oe], Nr = (t, e = ll) => {
|
|
|
3648
3660
|
if (!t)
|
|
3649
3661
|
return {
|
|
3650
3662
|
transactions: {
|
|
3651
|
-
feeTokenAddress: e ??
|
|
3663
|
+
feeTokenAddress: e ?? $n,
|
|
3652
3664
|
amount: 0n,
|
|
3653
3665
|
pricePerUnit: 0n,
|
|
3654
3666
|
dataGasConsumed: 0n,
|
|
@@ -3735,7 +3747,7 @@ const Ju = [Oe], Nr = (t, e = ll) => {
|
|
|
3735
3747
|
max: Pt(At(i.simulation.feeEstimation, O.toBigInt))
|
|
3736
3748
|
} : void 0
|
|
3737
3749
|
};
|
|
3738
|
-
},
|
|
3750
|
+
}, rd = (t) => {
|
|
3739
3751
|
const e = Nr(t), n = _e(t);
|
|
3740
3752
|
return {
|
|
3741
3753
|
// for v1 transactions
|
|
@@ -3754,31 +3766,31 @@ const Ju = [Oe], Nr = (t, e = ll) => {
|
|
|
3754
3766
|
}
|
|
3755
3767
|
}
|
|
3756
3768
|
};
|
|
3757
|
-
},
|
|
3769
|
+
}, sd = (t) => {
|
|
3758
3770
|
const e = Math.sqrt(t);
|
|
3759
3771
|
return isNaN(e) ? Math.sqrt(2) : e;
|
|
3760
3772
|
}, ll = (t) => {
|
|
3761
3773
|
const e = Math.cbrt(t);
|
|
3762
3774
|
return isNaN(e) ? Math.cbrt(2) : e;
|
|
3763
|
-
},
|
|
3775
|
+
}, od = (t) => t < 1 || isNaN(t) ? 1.1 : Math.log(t + 1) + 1, ul = [Oe];
|
|
3764
3776
|
function Me({ address: t }) {
|
|
3765
3777
|
return ul.some((e) => nt(t, e));
|
|
3766
3778
|
}
|
|
3767
|
-
function
|
|
3779
|
+
function ad(t) {
|
|
3768
3780
|
return t ? ba().some((e) => nt(e, t)) : !1;
|
|
3769
3781
|
}
|
|
3770
3782
|
function Nn(t) {
|
|
3771
3783
|
return Me({
|
|
3772
3784
|
address: t
|
|
3773
|
-
}) ?
|
|
3785
|
+
}) ? Y.TRANSACTION_VERSION.V3 : Y.TRANSACTION_VERSION.V1;
|
|
3774
3786
|
}
|
|
3775
|
-
function
|
|
3776
|
-
return Me({ address: t }) ?
|
|
3787
|
+
function id(t) {
|
|
3788
|
+
return Me({ address: t }) ? Y.TRANSACTION_VERSION.F3 : Y.TRANSACTION_VERSION.F1;
|
|
3777
3789
|
}
|
|
3778
|
-
function
|
|
3779
|
-
return Ts(e.contract) ? Me({ address: t }) ?
|
|
3790
|
+
function cd(t, e) {
|
|
3791
|
+
return Ts(e.contract) ? Me({ address: t }) ? Y.TRANSACTION_VERSION.V3 : Y.TRANSACTION_VERSION.V2 : Y.TRANSACTION_VERSION.V1;
|
|
3780
3792
|
}
|
|
3781
|
-
class
|
|
3793
|
+
class ld {
|
|
3782
3794
|
constructor(e, n) {
|
|
3783
3795
|
this.apiBase = e, this.httpService = n;
|
|
3784
3796
|
}
|
|
@@ -3949,16 +3961,16 @@ class cd {
|
|
|
3949
3961
|
}
|
|
3950
3962
|
}
|
|
3951
3963
|
}
|
|
3952
|
-
const
|
|
3964
|
+
const ud = [
|
|
3953
3965
|
"account-upgrade",
|
|
3954
3966
|
"approve",
|
|
3955
3967
|
"set-approval-for-all",
|
|
3956
3968
|
"swap",
|
|
3957
3969
|
"transfer"
|
|
3958
|
-
],
|
|
3970
|
+
], dd = (t) => ({ showBalanceChange: xt(() => {
|
|
3959
3971
|
const n = t == null ? void 0 : t.some((s) => !nn(s.transfers)), r = t == null ? void 0 : t.some((s) => !nn(s.approvals));
|
|
3960
3972
|
return t && (n || r);
|
|
3961
|
-
}, [t]) }), ue = (t) => t ? t.filter((e) => e.token.type === "erc20") : [],
|
|
3973
|
+
}, [t]) }), ue = (t) => t ? t.filter((e) => e.token.type === "erc20") : [], fd = (t) => xt(() => ue(t), [t]), hd = (t) => ue(t).length > 0, pd = (t) => ue(t).some((n) => n.amount > 0n), md = (t) => ue(t).some((n) => n.amount < 0n), Cr = (t) => t ? t.filter((e) => e.token.type === "erc721") : [], gd = (t) => xt(() => Cr(t), [t]), dl = (t) => Cr(t).length > 0, wd = (t) => xt(() => dl(t), [t]), yd = (t, e) => xt(() => t && e ? [
|
|
3962
3974
|
{
|
|
3963
3975
|
contractAddress: t.address,
|
|
3964
3976
|
entrypoint: "transfer",
|
|
@@ -3967,7 +3979,7 @@ const ld = [
|
|
|
3967
3979
|
amount: Ut(t.balance)
|
|
3968
3980
|
})
|
|
3969
3981
|
}
|
|
3970
|
-
] : [], [t, e]),
|
|
3982
|
+
] : [], [t, e]), bd = ({ apiData: { apiBaseUrl: t, apiHeaders: e }, address: n, network: r, transactionReviewEnabled: s = !0, transactions: o }) => {
|
|
3971
3983
|
const a = Ln(async () => {
|
|
3972
3984
|
if (!n || !r)
|
|
3973
3985
|
return;
|
|
@@ -3986,9 +3998,9 @@ const ld = [
|
|
|
3986
3998
|
},
|
|
3987
3999
|
body: JSON.stringify(d)
|
|
3988
4000
|
});
|
|
3989
|
-
}, [n, r, o]), i = xt(() =>
|
|
4001
|
+
}, [n, r, o]), i = xt(() => Fs({ transactions: o, address: n, network: r }), [o, n, r]);
|
|
3990
4002
|
return qs(!!s, [i, "transactionReview"], a);
|
|
3991
|
-
},
|
|
4003
|
+
}, Sd = (t) => {
|
|
3992
4004
|
if (!t)
|
|
3993
4005
|
return {};
|
|
3994
4006
|
const e = t.assessment === "warn" && t.reason !== "contract_is_not_verified", n = t.reason ? ` (Reason: ${Hn(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;
|
|
@@ -4003,15 +4015,15 @@ const ld = [
|
|
|
4003
4015
|
if (((e = n.activity) == null ? void 0 : e.type) === "swap")
|
|
4004
4016
|
return n;
|
|
4005
4017
|
}
|
|
4006
|
-
},
|
|
4007
|
-
},
|
|
4018
|
+
}, Ed = (t) => {
|
|
4019
|
+
}, Ad = (t, e) => {
|
|
4008
4020
|
var n;
|
|
4009
4021
|
if (e) {
|
|
4010
4022
|
for (const r of e.reviews)
|
|
4011
4023
|
if (((n = r.activity) == null ? void 0 : n.type) === t)
|
|
4012
4024
|
return r.activity;
|
|
4013
4025
|
}
|
|
4014
|
-
},
|
|
4026
|
+
}, xd = (t) => !!fl(t), vd = (t) => {
|
|
4015
4027
|
var e, n;
|
|
4016
4028
|
if (t) {
|
|
4017
4029
|
for (const r of t.reviews)
|
|
@@ -4045,9 +4057,9 @@ const ld = [
|
|
|
4045
4057
|
const c = "amount" in e.enrichedFeeEstimation.transactions.max ? e.enrichedFeeEstimation.transactions.max.amount * e.enrichedFeeEstimation.transactions.max.pricePerUnit : "maxFee" in e.enrichedFeeEstimation.transactions.max ? e.enrichedFeeEstimation.transactions.max.maxFee : void 0, l = (w = o.simulation.summary.find((E) => E.sent && E.token.address === n)) == null ? void 0 : w.value;
|
|
4046
4058
|
if (!c || !l)
|
|
4047
4059
|
return s;
|
|
4048
|
-
const d = await
|
|
4060
|
+
const d = await Yc(n, t, r) ?? 0n;
|
|
4049
4061
|
return BigInt(d) > c + BigInt(l) || (s = !0), s;
|
|
4050
|
-
},
|
|
4062
|
+
}, Td = () => Ln(async ({ feeTokenAddress: e, calls: n, selectedAccount: r, transactionReviewService: s, appDomain: o, accountDeployPayload: a, provider: i, isDelayedTransaction: c }) => {
|
|
4051
4063
|
if (!r)
|
|
4052
4064
|
return;
|
|
4053
4065
|
const l = await hl({
|
|
@@ -4073,7 +4085,7 @@ const ld = [
|
|
|
4073
4085
|
function Cn() {
|
|
4074
4086
|
return { promise: Promise.resolve() };
|
|
4075
4087
|
}
|
|
4076
|
-
function
|
|
4088
|
+
function Id(t) {
|
|
4077
4089
|
return class extends t {
|
|
4078
4090
|
constructor({ enabled: e, appVersion: n }) {
|
|
4079
4091
|
super(), this.enabled = e, this.appVersion = n;
|
|
@@ -4088,9 +4100,9 @@ function Td(t) {
|
|
|
4088
4100
|
}
|
|
4089
4101
|
};
|
|
4090
4102
|
}
|
|
4091
|
-
const gl = Is({}),
|
|
4103
|
+
const gl = Is({}), _d = ({ enabled: t, initialize: e, children: n }) => {
|
|
4092
4104
|
const [r, s] = jn(!1);
|
|
4093
|
-
return
|
|
4105
|
+
return $t(() => {
|
|
4094
4106
|
!r && t && e().then(() => s(!0));
|
|
4095
4107
|
}, [r, t, e]), /* @__PURE__ */ Us(gl.Provider, { value: {}, children: n });
|
|
4096
4108
|
};
|
|
@@ -4101,22 +4113,22 @@ export {
|
|
|
4101
4113
|
kl as AddSmartAcountRequestSchema,
|
|
4102
4114
|
js as BackendAccountSchema,
|
|
4103
4115
|
bu as BackendNftService,
|
|
4104
|
-
|
|
4116
|
+
kd as BaseError,
|
|
4105
4117
|
Js as C0_PROXY_CONTRACT_CLASS_HASHES,
|
|
4106
4118
|
Dl as CacheService,
|
|
4107
4119
|
Jr as DEFAULT_TOKEN_DECIMALS,
|
|
4108
4120
|
Hl as DateService,
|
|
4109
|
-
|
|
4110
|
-
|
|
4121
|
+
Nh as ESTIMATE_ERROR_MESSAGES,
|
|
4122
|
+
$n as ETH_TOKEN_ADDRESS,
|
|
4111
4123
|
Ss as EstimateError,
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4124
|
+
Pd as EventEmitterProvider,
|
|
4125
|
+
Ch as EventsBySelector,
|
|
4126
|
+
Oh as FEE_OVERHEAD,
|
|
4115
4127
|
Gn as HTTPService,
|
|
4116
4128
|
ze as HTTP_ERROR_MESSAGE,
|
|
4117
4129
|
K as HttpError,
|
|
4118
4130
|
nu as KnownDappsBackendService,
|
|
4119
|
-
|
|
4131
|
+
Ze as MultiSigner,
|
|
4120
4132
|
ku as OnchainRecoveryService,
|
|
4121
4133
|
Jc as PRETTY_UNLIMITED,
|
|
4122
4134
|
Te as RecoveryStatusEnum,
|
|
@@ -4126,91 +4138,91 @@ export {
|
|
|
4126
4138
|
Vl as SWRService,
|
|
4127
4139
|
Kl as StarknetAddressService,
|
|
4128
4140
|
Ie as StartOnchainRecoveryErrorStatusEnum,
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4141
|
+
kh as TOKEN_ERROR_MESSAGES,
|
|
4142
|
+
Ph as TXV1_ACCOUNT_CLASS_HASH,
|
|
4143
|
+
Rh as TXV1_MULTISIG_CLASS_HASH,
|
|
4144
|
+
$h as TXV3_ACCOUNT_CLASS_HASH,
|
|
4133
4145
|
Fh as TXV3_MULTISIG_CLASS_HASH,
|
|
4134
4146
|
bs as TokenError,
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4147
|
+
Ku as TokenServiceWeb,
|
|
4148
|
+
ld as TransactionReviewServiceWeb,
|
|
4149
|
+
_d as WebAmplitudeProvider,
|
|
4150
|
+
Id as WebAnalyticsServiceFactory,
|
|
4151
|
+
Rd as abiEntrySchema,
|
|
4152
|
+
$d as abiSchema,
|
|
4141
4153
|
qc as activeOnchainRecoverySchema,
|
|
4142
4154
|
Fd as addOwnersCalldataSchema,
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4155
|
+
Ud as addPluginCalldataSchema,
|
|
4156
|
+
jd as addressInputCharactersAndLengthSchema,
|
|
4157
|
+
Ld as addressInputSchema,
|
|
4158
|
+
Dd as addressOrDomainInputSchema,
|
|
4159
|
+
Hd as addressOrDomainSchema,
|
|
4160
|
+
Vd as addressOrEmptyUndefinedSchema,
|
|
4149
4161
|
te as addressSchema,
|
|
4150
4162
|
Ne as addressSchemaArgentBackend,
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4163
|
+
Md as addressSchemaBase,
|
|
4164
|
+
Gd as addressSchemaLooseLength,
|
|
4165
|
+
qd as addressSchemaStrictLength,
|
|
4166
|
+
Uh as airdropSchema,
|
|
4155
4167
|
ps as apiAccountTokenBalancesSchema,
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4168
|
+
Wd as apiAirdropSchema,
|
|
4169
|
+
zd as apiCollateralizedDebtPositionSchema,
|
|
4170
|
+
Kd as apiCollateralizedDebtPositionsSchema,
|
|
4171
|
+
Yd as apiConcentratedLiquidityPositionSchema,
|
|
4160
4172
|
Zd as apiConcentratedLiquidityPositionsSchema,
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4173
|
+
Xd as apiDefiDecompositionProduct,
|
|
4174
|
+
Jd as apiDefiDecompositionProducts,
|
|
4175
|
+
Qd as apiDefiDecompositionSchema,
|
|
4176
|
+
tf as apiDefiDecompositionToken,
|
|
4165
4177
|
ms as apiDefiPositionsSchema,
|
|
4166
|
-
|
|
4167
|
-
|
|
4178
|
+
ef as apiPriceDataResponseSchema,
|
|
4179
|
+
nf as apiPriceDetailsSchema,
|
|
4168
4180
|
hs as apiTokenInfoResponseSchema,
|
|
4169
|
-
|
|
4181
|
+
rf as apiTokenInfoSchema,
|
|
4170
4182
|
fs as apiTokensInfoResponseSchema,
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4183
|
+
ud as apiTransactionReviewActivityType,
|
|
4184
|
+
sf as apiUnclaimedRewardsSchema,
|
|
4185
|
+
of as apiWalletResponseSchema,
|
|
4174
4186
|
Hs as argentBackendNetworkIdSchema,
|
|
4175
4187
|
Es as argentMaxFee,
|
|
4176
|
-
|
|
4188
|
+
af as argentNameSchema,
|
|
4177
4189
|
Ds as argentNetworkIdSchema,
|
|
4178
4190
|
Ll as bigDecimal,
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4191
|
+
cf as bigNumberSchema,
|
|
4192
|
+
lf as bigNumberishSchema,
|
|
4193
|
+
Cd as bipsToPercent,
|
|
4194
|
+
uf as booleanToStringSchema,
|
|
4183
4195
|
ml as buildAccountDeployTransaction,
|
|
4184
4196
|
Aa as buildConstructorCalldata,
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4197
|
+
nd as buildDummyTx,
|
|
4198
|
+
df as builtinsSchema,
|
|
4199
|
+
ff as byteCodeSchema,
|
|
4200
|
+
hf as cairo1EventSchema,
|
|
4201
|
+
pf as cairoAssemblySchema,
|
|
4202
|
+
mf as cairoVersionSchema,
|
|
4191
4203
|
ll as calculateCubeRootAdjustment,
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4204
|
+
od as calculateNonLinearAdjustment,
|
|
4205
|
+
sd as calculateSqrtAdjustment,
|
|
4206
|
+
gf as callDetailsSchema,
|
|
4195
4207
|
ts as callSchema,
|
|
4196
|
-
|
|
4208
|
+
wf as calldataSchema,
|
|
4197
4209
|
At as castFeeEstimation,
|
|
4198
|
-
|
|
4199
|
-
|
|
4210
|
+
yf as changeGuardianCalldataSchema,
|
|
4211
|
+
bf as changeThresholdCalldataSchema,
|
|
4200
4212
|
pl as checkGasFeeBalance,
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4213
|
+
ad as classHashSupportsTxV3,
|
|
4214
|
+
jh as collateralizedDebtGroupSchema,
|
|
4215
|
+
Lh as collateralizedDebtPositionSchema,
|
|
4216
|
+
Dh as collateralizedDebtPositionsSchema,
|
|
4217
|
+
Sf as compiledContractClassSchema,
|
|
4218
|
+
Ef as compiledSierraCasmSchema,
|
|
4219
|
+
Af as compiledSierraSchema,
|
|
4220
|
+
xf as compressedProgramSchema,
|
|
4221
|
+
Hh as concentratedLiquidityPositionSchema,
|
|
4222
|
+
Vh as concentratedLiquidityPositionsSchema,
|
|
4211
4223
|
cs as constructorCallDataSchemaC0,
|
|
4212
4224
|
ls as constructorCallDataSchemaC1V1,
|
|
4213
|
-
|
|
4225
|
+
vf as contractEntryPointFieldsSchema,
|
|
4214
4226
|
Vu as convertTokenAmountToCurrencyValue,
|
|
4215
4227
|
Mu as convertTokenUnitAmountWithDecimals,
|
|
4216
4228
|
Ta as dappContractSchema,
|
|
@@ -4218,44 +4230,44 @@ export {
|
|
|
4218
4230
|
lu as daysBetween,
|
|
4219
4231
|
pi as decodeBase58,
|
|
4220
4232
|
cu as decodeBase58Array,
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4233
|
+
Mh as defiDappsProductsSchema,
|
|
4234
|
+
Gh as defiPositionSchema,
|
|
4235
|
+
Tf as defiPositionTypeSchema,
|
|
4236
|
+
qh as defiProductSchema,
|
|
4237
|
+
Wh as defiProductsSchema,
|
|
4238
|
+
zh as denyTxV3,
|
|
4227
4239
|
hi as encodeBase58,
|
|
4228
4240
|
iu as encodeBase58Array,
|
|
4229
4241
|
Ce as ensureArray,
|
|
4230
4242
|
Gu as ensureDecimals,
|
|
4231
4243
|
wu as entryPointToHumanReadable,
|
|
4232
|
-
|
|
4244
|
+
If as entryPointsByTypeSchema,
|
|
4233
4245
|
vu as equalNft,
|
|
4234
|
-
|
|
4235
|
-
|
|
4246
|
+
Yu as erc20TransferTransaction,
|
|
4247
|
+
Xu as erc721SafeTransferFromTransaction,
|
|
4236
4248
|
Zu as erc721TransferFromTransaction,
|
|
4237
|
-
|
|
4249
|
+
_f as escapeGuardianCalldataSchema,
|
|
4238
4250
|
_e as estimatedFeeToMaxFeeTotal,
|
|
4239
|
-
|
|
4251
|
+
rd as estimatedFeeToMaxResourceBounds,
|
|
4240
4252
|
Jt as estimatedFeeToTotal,
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4253
|
+
ed as estimatedFeesToMaxFeeTotal,
|
|
4254
|
+
td as estimatedFeesToTotal,
|
|
4255
|
+
Bf as eventAbiSchema,
|
|
4256
|
+
Nf as eventEntrySchema,
|
|
4257
|
+
Cf as executeOnPluginCalldataSchema,
|
|
4246
4258
|
Me as feeTokenNeedsTxV3Support,
|
|
4247
|
-
|
|
4259
|
+
Of as feltSchema,
|
|
4248
4260
|
qn as fetchData,
|
|
4249
4261
|
zt as fetcherError,
|
|
4250
4262
|
Ql as findImplementationForAccount,
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4263
|
+
Kh as findTransfersAndApprovals,
|
|
4264
|
+
Zn as formatAddress,
|
|
4265
|
+
kf as formatFullAddress,
|
|
4266
|
+
Pf as formatTruncatedAddress,
|
|
4267
|
+
Rf as formatTruncatedSignerKey,
|
|
4268
|
+
$f as formatTruncatedString,
|
|
4257
4269
|
Ff as functionAbiSchema,
|
|
4258
|
-
|
|
4270
|
+
Uf as functionAbiTypeSchema,
|
|
4259
4271
|
ui as generateAvatarImage,
|
|
4260
4272
|
xa as getAccountContractAddress,
|
|
4261
4273
|
Ea as getAccountDeploymentPayload,
|
|
@@ -4267,55 +4279,56 @@ export {
|
|
|
4267
4279
|
ya as getArgentAccountWithMultiSignerClassHashes,
|
|
4268
4280
|
zl as getBackendTimeNowSeconds,
|
|
4269
4281
|
Ws as getBackendTimeSeconds,
|
|
4270
|
-
|
|
4282
|
+
Zs as getCallFromStarkName,
|
|
4271
4283
|
zs as getChainIdFromNetworkId,
|
|
4272
4284
|
di as getColor,
|
|
4285
|
+
zu as getCurrencySymbol,
|
|
4273
4286
|
Na as getDapplandLinkForDapp,
|
|
4274
4287
|
ru as getDapplandUrlForDapp,
|
|
4275
|
-
|
|
4288
|
+
Sd as getDisplayWarnAndReasonForTransactionReview,
|
|
4276
4289
|
ue as getERC20Transactions,
|
|
4277
4290
|
Cr as getERC721Transactions,
|
|
4278
4291
|
al as getEstimatedFeeFromBulkSimulation,
|
|
4279
4292
|
cl as getEstimatedFeeFromSimulationAndRespectWatermarkFee,
|
|
4280
4293
|
ci as getInitials,
|
|
4281
|
-
|
|
4294
|
+
Zl as getLastCairo0ArgentAccountClassHash,
|
|
4282
4295
|
wa as getLatestArgentAccountClassHash,
|
|
4283
|
-
|
|
4296
|
+
Yl as getLatestArgentMultisigClassHash,
|
|
4284
4297
|
Jl as getLatestLedgerAccountClassHash,
|
|
4285
4298
|
Xl as getLedgerAccountClassHashes,
|
|
4286
|
-
|
|
4287
|
-
|
|
4299
|
+
Yh as getMessageFromTrpcError,
|
|
4300
|
+
Ed as getNFTTransferActivity,
|
|
4288
4301
|
au as getNetworkAccountImageUrl,
|
|
4289
4302
|
xu as getNftPicture,
|
|
4290
4303
|
il as getPayloadFromTransaction,
|
|
4291
4304
|
Zh as getPrettyRpcError,
|
|
4292
4305
|
hl as getReviewForTransactions,
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4306
|
+
Ye as getSignerForMultiSigner,
|
|
4307
|
+
id as getSimulationTxVersionFromFeeToken,
|
|
4308
|
+
Ys as getStarknetIdContractAddressFromNetworkId,
|
|
4309
|
+
Yc as getTokenBalance,
|
|
4297
4310
|
Du as getTokens,
|
|
4298
4311
|
Lu as getTokensBalances,
|
|
4299
|
-
|
|
4300
|
-
|
|
4312
|
+
Ad as getTransactionReviewActivityOfType,
|
|
4313
|
+
xd as getTransactionReviewHasSwap,
|
|
4301
4314
|
fl as getTransactionReviewSwap,
|
|
4302
|
-
|
|
4315
|
+
vd as getTransactionReviewWithType,
|
|
4303
4316
|
Nn as getTxVersionFromFeeToken,
|
|
4304
|
-
|
|
4317
|
+
cd as getTxVersionFromFeeTokenForDeclareContract,
|
|
4305
4318
|
Kc as getUAParserResult,
|
|
4306
4319
|
Ut as getUint256CalldataFromBN,
|
|
4307
4320
|
ol as getWatermarkedMaxFeeTotal,
|
|
4308
|
-
|
|
4321
|
+
hd as hasERC20Transactions,
|
|
4309
4322
|
dl as hasERC721Transactions,
|
|
4310
|
-
|
|
4311
|
-
|
|
4323
|
+
pd as hasIncomingERC20Transactions,
|
|
4324
|
+
md as hasOutgoingERC20Transactions,
|
|
4312
4325
|
kt as hexSchema,
|
|
4313
|
-
|
|
4326
|
+
jf as hexSchemaBase,
|
|
4314
4327
|
ai as id,
|
|
4315
4328
|
Ke as implementationSchema,
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4329
|
+
Lf as includesAddress,
|
|
4330
|
+
Xh as inputAmountSchema,
|
|
4331
|
+
$l as isAccountV4,
|
|
4319
4332
|
Rl as isAccountV5,
|
|
4320
4333
|
Pl as isAccountV6,
|
|
4321
4334
|
rs as isAddress,
|
|
@@ -4326,50 +4339,50 @@ export {
|
|
|
4326
4339
|
Ul as isArgentNetworkId,
|
|
4327
4340
|
Pu as isBraveBrowser,
|
|
4328
4341
|
le as isBrowser,
|
|
4329
|
-
|
|
4342
|
+
$u as isChromeBrowser,
|
|
4330
4343
|
du as isContractDeployed,
|
|
4331
4344
|
Uu as isEdgeBrowser,
|
|
4332
4345
|
nt as isEqualAddress,
|
|
4333
|
-
|
|
4346
|
+
Df as isEqualArgentName,
|
|
4334
4347
|
Sa as isEqualImplementation,
|
|
4335
|
-
|
|
4336
|
-
|
|
4348
|
+
Hf as isEqualStarknetDomainName,
|
|
4349
|
+
Vf as isEqualStarknetId,
|
|
4337
4350
|
sl as isFRI,
|
|
4338
4351
|
uu as isFeatureEnabled,
|
|
4339
4352
|
Ru as isFirefoxBrowser,
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4353
|
+
Z as isNumeric,
|
|
4354
|
+
Fu as isSafariBrowser,
|
|
4355
|
+
Mf as isStarknetDomainName,
|
|
4343
4356
|
ss as isStarknetId,
|
|
4344
4357
|
Xc as isUnlimitedAmount,
|
|
4345
4358
|
ns as isValidAddress,
|
|
4346
|
-
|
|
4359
|
+
Jh as isValidInputAmount,
|
|
4347
4360
|
Br as isWEI,
|
|
4348
4361
|
es as isZeroAddress,
|
|
4349
4362
|
_a as knownDappSchema,
|
|
4350
4363
|
Ba as knownDappsSchema,
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4364
|
+
Gf as legacyContractClassSchema,
|
|
4365
|
+
qf as legacyEventSchema,
|
|
4366
|
+
Wf as looseCalldataSchema,
|
|
4367
|
+
Qh as modifySnjsFeeOverhead,
|
|
4368
|
+
zf as multiTypeSchema,
|
|
4369
|
+
Ju as multiplyBigIntByFloat,
|
|
4357
4370
|
Oa as nameProviderResolutionSchema,
|
|
4358
4371
|
ka as nameResolutionAddressSchema,
|
|
4359
4372
|
Ra as nameResolutionAddressesSchema,
|
|
4360
|
-
|
|
4373
|
+
Yn as nameResolutionStarknetIdSchema,
|
|
4361
4374
|
Ca as nameResolutionStarknetIdsSchema,
|
|
4362
4375
|
fu as nonNullable,
|
|
4363
4376
|
Rn as normalizeAddress,
|
|
4364
|
-
|
|
4365
|
-
|
|
4377
|
+
Kf as normalizeAddressOrDomain,
|
|
4378
|
+
Yf as normalizeArgentName,
|
|
4366
4379
|
Zf as normalizeStarknetId,
|
|
4367
4380
|
Wc as onchainRecoverySchema,
|
|
4368
|
-
|
|
4381
|
+
tp as parseAmount,
|
|
4369
4382
|
wi as parseAmountValue,
|
|
4370
4383
|
mu as pluralise,
|
|
4371
4384
|
Ml as postData,
|
|
4372
|
-
|
|
4385
|
+
Fl as preferencesEndpointPayload,
|
|
4373
4386
|
Ls as preferencesSchema,
|
|
4374
4387
|
mi as prettifyCurrencyNumber,
|
|
4375
4388
|
qu as prettifyCurrencyValue,
|
|
@@ -4377,75 +4390,75 @@ export {
|
|
|
4377
4390
|
Re as prettifyNumberConfig,
|
|
4378
4391
|
Wu as prettifyTokenAmount,
|
|
4379
4392
|
gi as prettifyTokenNumber,
|
|
4380
|
-
|
|
4381
|
-
|
|
4393
|
+
ep as productGroupsSchema,
|
|
4394
|
+
Xf as programSchema,
|
|
4382
4395
|
Pa as providersNamesSchema,
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4396
|
+
Jf as pythonicHintsSchema,
|
|
4397
|
+
Qf as rawArgsArraySchema,
|
|
4398
|
+
th as rawArgsObjectSchema,
|
|
4399
|
+
eh as rawArgsSchema,
|
|
4387
4400
|
gu as readFileAsString,
|
|
4388
4401
|
_r as recoveryBaseSchema,
|
|
4389
4402
|
Cu as recoveryBodySchema,
|
|
4390
4403
|
Gc as recoveryStatusSchema,
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4404
|
+
nh as removeOwnersCalldataSchema,
|
|
4405
|
+
rh as removePluginCalldataSchema,
|
|
4406
|
+
sh as replaceSignerCalldataSchema,
|
|
4394
4407
|
ju as seedphraseSchema,
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4408
|
+
oh as sierraContractEntryPointFieldsSchema,
|
|
4409
|
+
ah as sierraEntryPointsByTypeSchema,
|
|
4410
|
+
ih as sierraProgramDebugInfoSchema,
|
|
4398
4411
|
Ks as starkNameToCallDataDomain,
|
|
4399
|
-
|
|
4412
|
+
ch as starknetDomainNameSchema,
|
|
4400
4413
|
us as starknetIdSchema,
|
|
4401
4414
|
Ou as startOnchainRecoveryErrorSchema,
|
|
4402
4415
|
zc as startOnchainRecoveryErrorStatusSchema,
|
|
4403
4416
|
Mc as startOnchainRecoverySchema,
|
|
4404
|
-
|
|
4417
|
+
lh as stringToBooleanSchema,
|
|
4405
4418
|
fi as stripAddressZeroPadding,
|
|
4406
|
-
|
|
4419
|
+
uh as structAbiSchema,
|
|
4407
4420
|
Wl as swrRefetchDisabledConfig,
|
|
4408
4421
|
Pt as toMax,
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4422
|
+
Qu as tokensRequireTxV3Support,
|
|
4423
|
+
np as transactionReviewTransactionsSchema,
|
|
4424
|
+
rp as transactionReviewWarningSchema,
|
|
4412
4425
|
gs as transferCalldataSchema,
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
4426
|
+
sp as trpcErrorSchema,
|
|
4427
|
+
op as txVersionSchema,
|
|
4428
|
+
dh as uint256Schema,
|
|
4429
|
+
ap as unclaimedRewardsSchema,
|
|
4417
4430
|
Ee as unitToFeeTokenAddress,
|
|
4418
4431
|
Qr as urlWithQuery,
|
|
4419
|
-
|
|
4432
|
+
dd as useBalanceChange,
|
|
4420
4433
|
Eu as useCollection,
|
|
4421
4434
|
qs as useConditionallyEnabledSWR,
|
|
4422
4435
|
tu as useDebounce,
|
|
4423
4436
|
eu as useDebouncedValue,
|
|
4424
|
-
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4437
|
+
fd as useERC20Transactions,
|
|
4438
|
+
gd as useERC721Transactions,
|
|
4439
|
+
fh as useEmitEvent,
|
|
4440
|
+
hh as useEventEmitter,
|
|
4441
|
+
ph as useEventEmitterContext,
|
|
4442
|
+
mh as useEventListener,
|
|
4443
|
+
wd as useHasERC721Transaction,
|
|
4444
|
+
gh as useIsEventEmitterEnabled,
|
|
4445
|
+
yd as useMaxAmountTransaction,
|
|
4433
4446
|
Au as useNft,
|
|
4434
4447
|
Su as useNfts,
|
|
4435
4448
|
Hu as useToken,
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4449
|
+
bd as useTransactionReview,
|
|
4450
|
+
Td as useTransactionReviewV2webFetcher,
|
|
4451
|
+
wh as validChecksumAddressSchema,
|
|
4452
|
+
yh as validateAddressRangeSchema,
|
|
4440
4453
|
yu as voidify,
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4454
|
+
bh as webBaseTokenSchema,
|
|
4455
|
+
Sh as webBaseTokenWithBalanceSchema,
|
|
4456
|
+
Eh as webTokenInfoDetailsSchema,
|
|
4457
|
+
Ah as webTokenPriceDetailsSchema,
|
|
4458
|
+
xh as webTokenSchema,
|
|
4459
|
+
vh as webTokenWithBalanceAndPriceSchema,
|
|
4460
|
+
Th as webTokenWithBalanceSchema,
|
|
4461
|
+
Ih as webTokenWithPriceSchema,
|
|
4462
|
+
_h as webTokensWithBalanceAndPriceSchema,
|
|
4450
4463
|
Gl as withPolling
|
|
4451
4464
|
};
|