@argent/x-shared 1.32.8 → 1.33.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/features/simulation/activity/utils/parseFinanceActivities.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -2
- package/dist/index.mjs +1010 -983
- package/dist/providers/WebAmplitude/WebAmplitudeProvider.d.ts +8 -0
- package/dist/providers/WebAmplitude/index.d.ts +2 -0
- package/dist/providers/WebAmplitude/service.d.ts +8 -0
- package/dist/providers/WebAmplitude/types.d.ts +7 -0
- package/dist/providers/WebAmplitude/utils.d.ts +3 -0
- package/dist/providers/index.d.ts +1 -0
- package/dist/simulation.js +1 -1
- package/dist/simulation.mjs +43 -37
- package/package.json +2 -1
package/dist/index.mjs
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import F, { z as h } from "zod";
|
|
2
|
-
import { p as xt, H as K, a as tn, u as k, N as
|
|
3
|
-
import { am as
|
|
4
|
-
import { constants as Z, starknetId as
|
|
5
|
-
import { useEffect as
|
|
6
|
-
import { isFunction as
|
|
7
|
-
import ae, { useSWRConfig as
|
|
8
|
-
import { hex as
|
|
9
|
-
import { UAParser as
|
|
10
|
-
import { validateMnemonic as
|
|
11
|
-
import { wordlist as
|
|
12
|
-
import
|
|
13
|
-
|
|
2
|
+
import { p as xt, H as K, a as tn, u as k, N as jn, c as Dr, C as Ln, A as St, i as Hr, b as Vr, n as Dn, d as Mr, e as Gr, f as zr, g as qr, s as Q, h as nt, j as en, k as Wr, S as Kr, l as nn, M as rn, m as Zr, o as Yr, q as Hn, r as Xr, t as se, B as sn, v as oe, w as Pt, x as Jr, y as Qr, z as ts, D as es, E as ns, F as rs, T as ss, G as Re, I as Vn, J as os, K as ye, L as as, O as is, P as cs, Q as ls, R as _t } from "./transactionVersion-xln1MPWP.mjs";
|
|
3
|
+
import { am as Nd, aV as Cd, bO as Od, aX as kd, aT as Pd, an as Rd, af as $d, ah as Fd, ag as Ud, ai as jd, bt as Ld, bB as Dd, bh as Hd, bl as Vd, a9 as Md, aa as Gd, a5 as zd, a4 as qd, Z as Wd, W as Kd, X as Zd, Y as Yd, aM as Xd, az as Jd, au as Qd, av as tf, as as ef, at as nf, ax as rf, aw as sf, ay as of, ar as af, aq as cf, ap as lf, ao as uf, aA as df, aj as ff, ab as hf, b1 as pf, b5 as mf, b3 as gf, bo as wf, bD as yf, by as bf, bJ as Sf, ae as Ef, bd as Af, b7 as xf, bf as vf, bk as If, aD as Tf, aE as Bf, aF as _f, bL as Nf, bK as Cf, bH as Of, br as kf, aB as Pf, aC as Rf, bp as $f, aK as Ff, aG as Uf, aL as jf, aI as Lf, aJ as Df, b0 as Hf, bq as Vf, bg as Mf, bA as Gf, bw as zf, bn as qf, be as Wf, aY as Kf, $ as Zf, _ as Yf, a1 as Xf, a2 as Jf, bv as Qf, bu as th, aS as eh, aZ as nh, b2 as rh, a0 as sh, aP as oh, ac as ah, a7 as ih, ak as ch, a6 as lh, aQ as uh, bC as dh, bx as fh, bc as hh, aU as ph, b9 as mh, a8 as gh, ad as wh, al as yh, aO as bh, aH as Sh, bs as Eh, bI as Ah, b8 as xh, ba as vh, bb as Ih, bi as Th, bm as Bh, bj as _h, bF as Nh, bG as Ch, bE as Oh, a3 as kh, b4 as Ph, bz as Rh, aW as $h, a_ as Fh, aR as Uh, a$ as jh, b6 as Lh, aN as Dh, bQ as Hh, bP as Vh, bM as Mh, bR as Gh, bN as zh, U as qh, V as Wh } from "./transactionVersion-xln1MPWP.mjs";
|
|
4
|
+
import { constants as Z, starknetId as Mn, CallData as mt, CairoOption as on, CairoOptionVariant as an, hash as Gn, num as O, encode as $t, uint256 as Ht, ec as us, isSierra as ds, TransactionType as cn } from "starknet";
|
|
5
|
+
import { useEffect as Ft, useRef as ln, useState as zn, useMemo as vt, useCallback as qn, createContext as fs } from "react";
|
|
6
|
+
import { isFunction as qt, isString as Wn, upperCase as $e, isNil as hs, upperFirst as ps, lowerCase as Kn, isUndefined as ms, isEmpty as un, isArray as gs } from "lodash-es";
|
|
7
|
+
import ae, { useSWRConfig as ws } from "swr";
|
|
8
|
+
import { hex as Zn, base58 as Yn, stringToBytes as ys } from "@scure/base";
|
|
9
|
+
import { UAParser as bs } from "ua-parser-js";
|
|
10
|
+
import { validateMnemonic as Ss } from "@scure/bip39";
|
|
11
|
+
import { wordlist as Es } from "@scure/bip39/wordlists/english";
|
|
12
|
+
import As from "object-hash";
|
|
13
|
+
import { jsx as xs } from "react/jsx-runtime";
|
|
14
|
+
const vs = h.object({
|
|
14
15
|
name: h.string().optional(),
|
|
15
16
|
address: h.string(),
|
|
16
17
|
ownerAddress: h.string(),
|
|
@@ -35,11 +36,11 @@ const Es = h.object({
|
|
|
35
36
|
guid: h.string().optional(),
|
|
36
37
|
signerType: h.enum(["StarknetKey", "EthereumKey"]).optional()
|
|
37
38
|
}).optional()
|
|
38
|
-
}),
|
|
39
|
+
}), Cl = h.object({
|
|
39
40
|
address: h.string(),
|
|
40
41
|
guardianAddress: h.string().optional(),
|
|
41
|
-
account:
|
|
42
|
-
}),
|
|
42
|
+
account: vs
|
|
43
|
+
}), Ol = h.object({
|
|
43
44
|
ownerAddress: h.string(),
|
|
44
45
|
signature: h.object({
|
|
45
46
|
r: h.string(),
|
|
@@ -49,29 +50,29 @@ const Es = h.object({
|
|
|
49
50
|
name: h.string().optional(),
|
|
50
51
|
icon: h.string().optional()
|
|
51
52
|
});
|
|
52
|
-
function
|
|
53
|
+
function kl(t) {
|
|
53
54
|
return "transactionVersion" in t;
|
|
54
55
|
}
|
|
55
|
-
function
|
|
56
|
+
function Pl(t) {
|
|
56
57
|
return "simulateTransaction" in t;
|
|
57
58
|
}
|
|
58
|
-
function
|
|
59
|
+
function Rl(t) {
|
|
59
60
|
return !("simulateTransaction" in t);
|
|
60
61
|
}
|
|
61
|
-
const
|
|
62
|
+
const Is = h.object({
|
|
62
63
|
value: h.string(),
|
|
63
64
|
platform: h.enum(["ios", "argentx", "android", "webwallet"]).nullable()
|
|
64
|
-
}),
|
|
65
|
-
preferences: h.record(
|
|
66
|
-
}),
|
|
67
|
-
function
|
|
68
|
-
return
|
|
65
|
+
}), $l = h.object({
|
|
66
|
+
preferences: h.record(Is)
|
|
67
|
+
}), Ts = h.enum(["mainnet-alpha", "sepolia-alpha"]), Bs = h.enum(["mainnet", "sepolia"]);
|
|
68
|
+
function Fl(t) {
|
|
69
|
+
return Ts.safeParse(t).success;
|
|
69
70
|
}
|
|
70
|
-
function
|
|
71
|
-
return
|
|
71
|
+
function Ul(t) {
|
|
72
|
+
return Bs.safeParse(t).success;
|
|
72
73
|
}
|
|
73
|
-
const
|
|
74
|
-
function
|
|
74
|
+
const Vt = 18;
|
|
75
|
+
function Mt({ value: t, decimals: e }) {
|
|
75
76
|
if (e === 0)
|
|
76
77
|
return t.toString();
|
|
77
78
|
const n = t < 0n;
|
|
@@ -82,97 +83,97 @@ function Vt({ value: t, decimals: e }) {
|
|
|
82
83
|
const Fe = (t, e) => ({
|
|
83
84
|
decimals: e,
|
|
84
85
|
value: e >= t.decimals ? t.value * BigInt(10) ** BigInt(e - t.decimals) : t.value / BigInt(10) ** BigInt(t.decimals - e)
|
|
85
|
-
}),
|
|
86
|
+
}), Xn = (t) => {
|
|
86
87
|
const e = t.value.toString().split("").reverse();
|
|
87
88
|
let n = 0;
|
|
88
89
|
for (let s = 0; s < e.length && e[s] === "0"; s++)
|
|
89
90
|
n++;
|
|
90
91
|
const r = t.decimals - n;
|
|
91
92
|
return Fe(t, r);
|
|
92
|
-
},
|
|
93
|
+
}, Jn = (t, e) => {
|
|
93
94
|
const n = Math.max(t.decimals, e.decimals), [r, s] = [t, e].map((o) => Fe(o, n));
|
|
94
95
|
return [r.value, s.value, n];
|
|
95
96
|
}, ie = (t) => (e, n) => {
|
|
96
|
-
const [r, s, o] =
|
|
97
|
+
const [r, s, o] = Jn(e, n);
|
|
97
98
|
return {
|
|
98
99
|
decimals: o,
|
|
99
100
|
value: t(r, s, o)
|
|
100
101
|
};
|
|
101
|
-
},
|
|
102
|
-
const [r, s] =
|
|
102
|
+
}, Gt = (t) => (e, n) => {
|
|
103
|
+
const [r, s] = Jn(e, n);
|
|
103
104
|
return t(r, s);
|
|
104
|
-
},
|
|
105
|
+
}, _s = ie((t, e) => t + e), Ns = ie((t, e) => t - e), Cs = ie((t, e, n) => {
|
|
105
106
|
if (e === BigInt(0))
|
|
106
107
|
throw new Error("Division by zero is not allowed");
|
|
107
108
|
return t * BigInt(10) ** BigInt(n) / e;
|
|
108
|
-
}),
|
|
109
|
+
}), Os = (t, e) => Xn({
|
|
109
110
|
decimals: t.decimals + e.decimals,
|
|
110
111
|
value: t.value * e.value
|
|
111
|
-
}),
|
|
112
|
+
}), ks = ie((t, e) => {
|
|
112
113
|
if (e === BigInt(0))
|
|
113
114
|
throw new Error("Modulus by zero is not allowed");
|
|
114
115
|
return t % e;
|
|
115
116
|
}), Ue = (t) => ({
|
|
116
117
|
decimals: t.decimals,
|
|
117
118
|
value: t.value >= BigInt(0) ? t.value : -t.value
|
|
118
|
-
}),
|
|
119
|
-
function
|
|
120
|
-
return
|
|
119
|
+
}), Qn = Gt((t, e) => t === e), Ps = Gt((t, e) => t < e), Rs = Gt((t, e) => t > e), $s = Gt((t, e) => t <= e), Fs = Gt((t, e) => t >= e), Us = (t, e) => !Qn(t, e);
|
|
120
|
+
function js(t) {
|
|
121
|
+
return Mt({ value: t, decimals: Vt });
|
|
121
122
|
}
|
|
122
|
-
function
|
|
123
|
-
return xt(t,
|
|
123
|
+
function Ls(t) {
|
|
124
|
+
return xt(t, Vt);
|
|
124
125
|
}
|
|
125
|
-
function
|
|
126
|
-
return
|
|
126
|
+
function Ds(t) {
|
|
127
|
+
return Mt({ value: t, decimals: Vt });
|
|
127
128
|
}
|
|
128
129
|
function je(t) {
|
|
129
|
-
return xt(t,
|
|
130
|
+
return xt(t, Vt);
|
|
130
131
|
}
|
|
131
|
-
function
|
|
132
|
+
function Hs(t) {
|
|
132
133
|
return Ue({ value: t, decimals: 0 }).value;
|
|
133
134
|
}
|
|
134
|
-
function
|
|
135
|
+
function Vs(t) {
|
|
135
136
|
return Ue(je(t));
|
|
136
137
|
}
|
|
137
|
-
function
|
|
138
|
+
function Ms(t, e) {
|
|
138
139
|
return {
|
|
139
140
|
value: BigInt(t),
|
|
140
141
|
decimals: e
|
|
141
142
|
};
|
|
142
143
|
}
|
|
143
|
-
const
|
|
144
|
-
function
|
|
144
|
+
const Gs = { value: 1n, decimals: 0 };
|
|
145
|
+
function zs(t) {
|
|
145
146
|
return h.string().refine((e) => /^-?\d+(\.\d+)?$/.test(e), { message: "Invalid number format" }).transform((e) => xt(e, t));
|
|
146
147
|
}
|
|
147
|
-
const
|
|
148
|
+
const jl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
148
149
|
__proto__: null,
|
|
149
|
-
ONE:
|
|
150
|
+
ONE: Gs,
|
|
150
151
|
abs: Ue,
|
|
151
|
-
absBigInt:
|
|
152
|
-
add:
|
|
153
|
-
createUnitsSchema:
|
|
154
|
-
div:
|
|
155
|
-
eq:
|
|
156
|
-
formatCurrency:
|
|
157
|
-
formatEther:
|
|
158
|
-
formatUnits:
|
|
159
|
-
gt:
|
|
160
|
-
gte:
|
|
161
|
-
lt:
|
|
162
|
-
lte:
|
|
163
|
-
mod:
|
|
164
|
-
mul:
|
|
165
|
-
not:
|
|
152
|
+
absBigInt: Hs,
|
|
153
|
+
add: _s,
|
|
154
|
+
createUnitsSchema: zs,
|
|
155
|
+
div: Cs,
|
|
156
|
+
eq: Qn,
|
|
157
|
+
formatCurrency: Ds,
|
|
158
|
+
formatEther: js,
|
|
159
|
+
formatUnits: Mt,
|
|
160
|
+
gt: Rs,
|
|
161
|
+
gte: Fs,
|
|
162
|
+
lt: Ps,
|
|
163
|
+
lte: $s,
|
|
164
|
+
mod: ks,
|
|
165
|
+
mul: Os,
|
|
166
|
+
not: Us,
|
|
166
167
|
parseCurrency: je,
|
|
167
|
-
parseCurrencyAbs:
|
|
168
|
-
parseEther:
|
|
168
|
+
parseCurrencyAbs: Vs,
|
|
169
|
+
parseEther: Ls,
|
|
169
170
|
parseUnits: xt,
|
|
170
|
-
sub:
|
|
171
|
-
toBigDecimal:
|
|
171
|
+
sub: Ns,
|
|
172
|
+
toBigDecimal: Ms,
|
|
172
173
|
toFixedDecimals: Fe,
|
|
173
|
-
toTiniestPossibleDecimal:
|
|
174
|
+
toTiniestPossibleDecimal: Xn
|
|
174
175
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
175
|
-
class
|
|
176
|
+
class Ll {
|
|
176
177
|
constructor(e, n) {
|
|
177
178
|
this.cachePromise = n.open(e).catch((r) => (console.error(new Error("Failed to open cache", { cause: r })), null));
|
|
178
179
|
}
|
|
@@ -206,7 +207,7 @@ class Rl {
|
|
|
206
207
|
await Promise.allSettled(n.map((r) => e.delete(r)));
|
|
207
208
|
}
|
|
208
209
|
}
|
|
209
|
-
class
|
|
210
|
+
class Dl {
|
|
210
211
|
constructor(e, n) {
|
|
211
212
|
this.httpService = e, this.baseUrl = n, this.offsetInS = 0, this.syncIntervalInMs = 60 * 1e3, this.initialSync = this.syncWithServer(), setInterval(() => void this.syncWithServer(), this.syncIntervalInMs);
|
|
212
213
|
}
|
|
@@ -225,7 +226,7 @@ class Le {
|
|
|
225
226
|
this.requestInit = e, this.responseType = n;
|
|
226
227
|
}
|
|
227
228
|
async get(e, n) {
|
|
228
|
-
const r =
|
|
229
|
+
const r = qt(this.requestInit) ? await this.requestInit() : this.requestInit, s = {
|
|
229
230
|
...r,
|
|
230
231
|
...n,
|
|
231
232
|
method: "GET",
|
|
@@ -245,7 +246,7 @@ class Le {
|
|
|
245
246
|
return o;
|
|
246
247
|
}
|
|
247
248
|
async post(e, n, r) {
|
|
248
|
-
const s =
|
|
249
|
+
const s = qt(this.requestInit) ? await this.requestInit() : this.requestInit, o = {
|
|
249
250
|
...s,
|
|
250
251
|
...n,
|
|
251
252
|
method: "POST",
|
|
@@ -271,7 +272,7 @@ class Le {
|
|
|
271
272
|
return i;
|
|
272
273
|
}
|
|
273
274
|
async put(e, n) {
|
|
274
|
-
const r =
|
|
275
|
+
const r = qt(this.requestInit) ? await this.requestInit() : this.requestInit, s = {
|
|
275
276
|
...r,
|
|
276
277
|
...n,
|
|
277
278
|
method: "PUT",
|
|
@@ -288,7 +289,7 @@ class Le {
|
|
|
288
289
|
return await o.json();
|
|
289
290
|
}
|
|
290
291
|
async delete(e, n) {
|
|
291
|
-
const r =
|
|
292
|
+
const r = qt(this.requestInit) ? await this.requestInit() : this.requestInit, s = {
|
|
292
293
|
...r,
|
|
293
294
|
...n,
|
|
294
295
|
method: "DELETE",
|
|
@@ -304,10 +305,10 @@ class Le {
|
|
|
304
305
|
throw new K(o.statusText, o.status);
|
|
305
306
|
}
|
|
306
307
|
}
|
|
307
|
-
const
|
|
308
|
+
const Wt = (t) => {
|
|
308
309
|
process.env.NODE_ENV;
|
|
309
310
|
};
|
|
310
|
-
function
|
|
311
|
+
function qs(t, e) {
|
|
311
312
|
const n = t.clone(), r = new Headers(n.headers);
|
|
312
313
|
for (const [s, o] of Object.entries(e))
|
|
313
314
|
r.set(s, o);
|
|
@@ -317,7 +318,7 @@ function Ms(t, e) {
|
|
|
317
318
|
headers: r
|
|
318
319
|
});
|
|
319
320
|
}
|
|
320
|
-
class
|
|
321
|
+
class Hl {
|
|
321
322
|
constructor(e, n, r, s) {
|
|
322
323
|
this.dateService = e, this.cacheService = n, this.httpService = r, this.options = s, this.inFlightRequests = /* @__PURE__ */ new Map();
|
|
323
324
|
}
|
|
@@ -325,14 +326,14 @@ class Fl {
|
|
|
325
326
|
try {
|
|
326
327
|
const r = await this.cacheService.get(e), s = await this.dateService.now(), o = new Date(r.headers.get("date") || ""), a = s.getTime() - o.getTime();
|
|
327
328
|
if (a < this.options.freshFor)
|
|
328
|
-
return
|
|
329
|
+
return Wt("🟢 [SWR] Using fresh cache"), r;
|
|
329
330
|
if (a < this.options.staleFor)
|
|
330
|
-
return this.fetchAndCache(e, n),
|
|
331
|
+
return this.fetchAndCache(e, n), Wt("🟠 [SWR] Revalidating cache"), r;
|
|
331
332
|
throw new Error("Cache too old");
|
|
332
333
|
} catch (r) {
|
|
333
334
|
if (r instanceof K)
|
|
334
335
|
throw r;
|
|
335
|
-
return
|
|
336
|
+
return Wt(), await this.fetchAndCache(e, n);
|
|
336
337
|
}
|
|
337
338
|
}
|
|
338
339
|
async get(e, n) {
|
|
@@ -344,7 +345,7 @@ class Fl {
|
|
|
344
345
|
if (!r) {
|
|
345
346
|
const s = this.httpService.get(e, n).then(async (o) => {
|
|
346
347
|
const a = await this.dateService.now();
|
|
347
|
-
return await this.cacheService.set(e,
|
|
348
|
+
return await this.cacheService.set(e, qs(o, {
|
|
348
349
|
date: a.toUTCString()
|
|
349
350
|
})), o;
|
|
350
351
|
}).finally(() => {
|
|
@@ -352,7 +353,7 @@ class Fl {
|
|
|
352
353
|
});
|
|
353
354
|
return this.inFlightRequests.set(e, s), s;
|
|
354
355
|
}
|
|
355
|
-
return
|
|
356
|
+
return Wt(), r;
|
|
356
357
|
}
|
|
357
358
|
parseResponse(e) {
|
|
358
359
|
if (e.ok)
|
|
@@ -369,7 +370,7 @@ const Xt = (t, e, n) => {
|
|
|
369
370
|
} catch {
|
|
370
371
|
}
|
|
371
372
|
return r;
|
|
372
|
-
},
|
|
373
|
+
}, tr = async (t, e) => {
|
|
373
374
|
const n = await fetch(t, e), r = await n.text();
|
|
374
375
|
if (!n.ok)
|
|
375
376
|
throw Xt("An error occurred while fetching", n, r);
|
|
@@ -378,7 +379,7 @@ const Xt = (t, e, n) => {
|
|
|
378
379
|
} catch {
|
|
379
380
|
throw Xt("An error occurred while parsing", n, r);
|
|
380
381
|
}
|
|
381
|
-
},
|
|
382
|
+
}, Vl = async (t, e) => {
|
|
382
383
|
const n = await fetch(t, {
|
|
383
384
|
method: "POST",
|
|
384
385
|
...e
|
|
@@ -390,38 +391,38 @@ const Xt = (t, e, n) => {
|
|
|
390
391
|
} catch {
|
|
391
392
|
throw Xt("An error occurred while parsing", n, r);
|
|
392
393
|
}
|
|
393
|
-
},
|
|
394
|
+
}, Ml = (t) => ({
|
|
394
395
|
refreshInterval: t,
|
|
395
396
|
dedupingInterval: t
|
|
396
|
-
}),
|
|
397
|
+
}), Gl = (t) => `${t.networkId}::${t.address}`, Ws = () => {
|
|
397
398
|
};
|
|
398
|
-
function
|
|
399
|
-
const { cache: s } =
|
|
400
|
-
return
|
|
399
|
+
function Ks(t, e, n, r) {
|
|
400
|
+
const { cache: s } = ws(), o = ae(t && e, t ? n : Ws, r);
|
|
401
|
+
return Ft(() => {
|
|
401
402
|
t || (o.mutate(), s.delete(e));
|
|
402
403
|
}, [t]), o;
|
|
403
404
|
}
|
|
404
|
-
const
|
|
405
|
+
const zl = {
|
|
405
406
|
revalidateOnFocus: !1,
|
|
406
407
|
revalidateOnMount: !0,
|
|
407
408
|
revalidateOnReconnect: !1,
|
|
408
409
|
refreshWhenOffline: !1,
|
|
409
410
|
refreshWhenHidden: !1,
|
|
410
411
|
refreshInterval: 0
|
|
411
|
-
},
|
|
412
|
+
}, Zs = async (t, e) => {
|
|
412
413
|
try {
|
|
413
|
-
const { time: n } = await
|
|
414
|
+
const { time: n } = await tr(k(t, "time"), {
|
|
414
415
|
headers: e
|
|
415
416
|
});
|
|
416
417
|
return n;
|
|
417
418
|
} catch {
|
|
418
419
|
throw new Error("failed to request time");
|
|
419
420
|
}
|
|
420
|
-
},
|
|
421
|
-
const n = await
|
|
421
|
+
}, ql = async (t, e) => {
|
|
422
|
+
const n = await Zs(t, e);
|
|
422
423
|
return Math.floor(n);
|
|
423
424
|
};
|
|
424
|
-
function
|
|
425
|
+
function Ys(t) {
|
|
425
426
|
switch (t) {
|
|
426
427
|
case "mainnet-alpha":
|
|
427
428
|
case Z.NetworkName.SN_MAIN:
|
|
@@ -430,45 +431,45 @@ function Ws(t) {
|
|
|
430
431
|
case Z.NetworkName.SN_SEPOLIA:
|
|
431
432
|
return Z.StarknetChainId.SN_SEPOLIA;
|
|
432
433
|
default:
|
|
433
|
-
throw new
|
|
434
|
+
throw new jn({
|
|
434
435
|
code: "NOT_FOUND",
|
|
435
436
|
message: `Unknown networkId: ${t}`
|
|
436
437
|
});
|
|
437
438
|
}
|
|
438
439
|
}
|
|
439
|
-
function
|
|
440
|
-
return t.replace(".stark", "").split(".").map((r) =>
|
|
440
|
+
function Xs(t) {
|
|
441
|
+
return t.replace(".stark", "").split(".").map((r) => Mn.useEncoded(r).toString(10));
|
|
441
442
|
}
|
|
442
|
-
function
|
|
443
|
-
const e =
|
|
444
|
-
return
|
|
443
|
+
function Js(t) {
|
|
444
|
+
const e = Ys(t);
|
|
445
|
+
return Mn.getStarknetIdContract(e);
|
|
445
446
|
}
|
|
446
|
-
function
|
|
447
|
-
const n =
|
|
447
|
+
function Qs(t, e) {
|
|
448
|
+
const n = Js(e), r = Xs(t);
|
|
448
449
|
try {
|
|
449
450
|
const o = { domain: r, hint: [] };
|
|
450
|
-
return
|
|
451
|
+
return Dr.parse({
|
|
451
452
|
contractAddress: n,
|
|
452
453
|
entrypoint: "domain_to_address",
|
|
453
454
|
calldata: o
|
|
454
455
|
});
|
|
455
456
|
} catch (s) {
|
|
456
|
-
throw new
|
|
457
|
+
throw new Ln({
|
|
457
458
|
code: "NOT_VALID",
|
|
458
459
|
options: { error: s }
|
|
459
460
|
});
|
|
460
461
|
}
|
|
461
462
|
}
|
|
462
|
-
async function
|
|
463
|
+
async function to(t, e, n) {
|
|
463
464
|
if (!e || !n)
|
|
464
|
-
throw new
|
|
465
|
+
throw new jn({
|
|
465
466
|
code: "NO_NETWORK_OR_MULTICALL"
|
|
466
467
|
});
|
|
467
468
|
let r = null;
|
|
468
469
|
try {
|
|
469
|
-
r =
|
|
470
|
+
r = Qs(t, e);
|
|
470
471
|
} catch (i) {
|
|
471
|
-
throw new
|
|
472
|
+
throw new Ln({
|
|
472
473
|
code: "NOT_VALID",
|
|
473
474
|
options: { error: i }
|
|
474
475
|
});
|
|
@@ -481,25 +482,25 @@ async function Xs(t, e, n) {
|
|
|
481
482
|
code: "STARKNAME_ERROR"
|
|
482
483
|
});
|
|
483
484
|
}
|
|
484
|
-
if (
|
|
485
|
+
if (Hr(o))
|
|
485
486
|
throw new St({
|
|
486
487
|
code: "STARKNAME_NOT_FOUND",
|
|
487
488
|
message: `${t} not found`
|
|
488
489
|
});
|
|
489
|
-
if (!
|
|
490
|
+
if (!Vr(o))
|
|
490
491
|
throw new St({
|
|
491
492
|
code: "STARKNAME_INVALID_ADDRESS",
|
|
492
493
|
message: `${t} resolved to an invalid address (${o})`
|
|
493
494
|
});
|
|
494
|
-
return
|
|
495
|
+
return Dn(o);
|
|
495
496
|
}
|
|
496
|
-
class
|
|
497
|
+
class Wl {
|
|
497
498
|
constructor(e, n, r) {
|
|
498
499
|
this.httpService = e, this.baseUrl = n, this.allowedArgentNameNetworkId = r;
|
|
499
500
|
}
|
|
500
501
|
async parseAddressOrDomain(e, n, r) {
|
|
501
|
-
if (
|
|
502
|
-
return
|
|
502
|
+
if (Mr(e))
|
|
503
|
+
return Dn(e);
|
|
503
504
|
try {
|
|
504
505
|
return await this.getAddressFromDomainName(e, n, r);
|
|
505
506
|
} catch {
|
|
@@ -507,22 +508,22 @@ class Vl {
|
|
|
507
508
|
}
|
|
508
509
|
}
|
|
509
510
|
async getAddressFromDomainName(e, n, r) {
|
|
510
|
-
if (
|
|
511
|
-
return
|
|
512
|
-
if (
|
|
511
|
+
if (Gr(e))
|
|
512
|
+
return to(e, n, r);
|
|
513
|
+
if (zr(e)) {
|
|
513
514
|
if (n !== this.allowedArgentNameNetworkId)
|
|
514
515
|
throw new St({
|
|
515
516
|
code: "ARGENT_NAME_INVALID_NETWORK",
|
|
516
517
|
message: `Argent name is only enabled on "${this.allowedArgentNameNetworkId}"`
|
|
517
518
|
});
|
|
518
|
-
return
|
|
519
|
+
return qr(e, this.httpService, this.baseUrl);
|
|
519
520
|
}
|
|
520
521
|
throw new St({
|
|
521
522
|
code: "NO_ADDRESS_FROM_DOMAIN"
|
|
522
523
|
});
|
|
523
524
|
}
|
|
524
525
|
}
|
|
525
|
-
const
|
|
526
|
+
const eo = [
|
|
526
527
|
"0x25ec026985a3bf9d0cc1fe17326b245dfdc3ff89b8fde106542a3ea56c5a918"
|
|
527
528
|
], tt = {
|
|
528
529
|
// CAIRO_0
|
|
@@ -539,48 +540,48 @@ const Js = [
|
|
|
539
540
|
"0.1.1": "0x6e150953b26271a740bf2b6e9bca17cc52c68d765f761295de51ceb8526ee72",
|
|
540
541
|
"0.1.0": "0x737ee2f87ce571a58c6c8da558ec18a07ceb64a6172d5ec46171fbc80077a48"
|
|
541
542
|
};
|
|
542
|
-
var
|
|
543
|
-
function
|
|
544
|
-
var e =
|
|
543
|
+
var no = typeof global == "object" && global && global.Object === Object && global, ro = typeof self == "object" && self && self.Object === Object && self, ce = no || ro || Function("return this")(), Qt = ce.Symbol, er = Object.prototype, so = er.hasOwnProperty, oo = er.toString, Nt = Qt ? Qt.toStringTag : void 0;
|
|
544
|
+
function ao(t) {
|
|
545
|
+
var e = so.call(t, Nt), n = t[Nt];
|
|
545
546
|
try {
|
|
546
547
|
t[Nt] = void 0;
|
|
547
548
|
var r = !0;
|
|
548
549
|
} catch {
|
|
549
550
|
}
|
|
550
|
-
var s =
|
|
551
|
+
var s = oo.call(t);
|
|
551
552
|
return r && (e ? t[Nt] = n : delete t[Nt]), s;
|
|
552
553
|
}
|
|
553
|
-
var
|
|
554
|
-
function ao(t) {
|
|
555
|
-
return oo.call(t);
|
|
556
|
-
}
|
|
557
|
-
var io = "[object Null]", co = "[object Undefined]", dn = Qt ? Qt.toStringTag : void 0;
|
|
554
|
+
var io = Object.prototype, co = io.toString;
|
|
558
555
|
function lo(t) {
|
|
559
|
-
return
|
|
556
|
+
return co.call(t);
|
|
557
|
+
}
|
|
558
|
+
var uo = "[object Null]", fo = "[object Undefined]", dn = Qt ? Qt.toStringTag : void 0;
|
|
559
|
+
function ho(t) {
|
|
560
|
+
return t == null ? t === void 0 ? fo : uo : dn && dn in Object(t) ? ao(t) : lo(t);
|
|
560
561
|
}
|
|
561
|
-
function
|
|
562
|
+
function nr(t) {
|
|
562
563
|
var e = typeof t;
|
|
563
564
|
return t != null && (e == "object" || e == "function");
|
|
564
565
|
}
|
|
565
|
-
var
|
|
566
|
-
function
|
|
567
|
-
if (!
|
|
566
|
+
var po = "[object AsyncFunction]", mo = "[object Function]", go = "[object GeneratorFunction]", wo = "[object Proxy]";
|
|
567
|
+
function yo(t) {
|
|
568
|
+
if (!nr(t))
|
|
568
569
|
return !1;
|
|
569
|
-
var e =
|
|
570
|
-
return e ==
|
|
570
|
+
var e = ho(t);
|
|
571
|
+
return e == mo || e == go || e == po || e == wo;
|
|
571
572
|
}
|
|
572
573
|
var be = ce["__core-js_shared__"], fn = function() {
|
|
573
574
|
var t = /[^.]+$/.exec(be && be.keys && be.keys.IE_PROTO || "");
|
|
574
575
|
return t ? "Symbol(src)_1." + t : "";
|
|
575
576
|
}();
|
|
576
|
-
function
|
|
577
|
+
function bo(t) {
|
|
577
578
|
return !!fn && fn in t;
|
|
578
579
|
}
|
|
579
|
-
var
|
|
580
|
-
function
|
|
580
|
+
var So = Function.prototype, Eo = So.toString;
|
|
581
|
+
function Ao(t) {
|
|
581
582
|
if (t != null) {
|
|
582
583
|
try {
|
|
583
|
-
return
|
|
584
|
+
return Eo.call(t);
|
|
584
585
|
} catch {
|
|
585
586
|
}
|
|
586
587
|
try {
|
|
@@ -590,48 +591,48 @@ function bo(t) {
|
|
|
590
591
|
}
|
|
591
592
|
return "";
|
|
592
593
|
}
|
|
593
|
-
var
|
|
594
|
-
"^" +
|
|
594
|
+
var xo = /[\\^$.*+?()[\]{}|]/g, vo = /^\[object .+?Constructor\]$/, Io = Function.prototype, To = Object.prototype, Bo = Io.toString, _o = To.hasOwnProperty, No = RegExp(
|
|
595
|
+
"^" + Bo.call(_o).replace(xo, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
595
596
|
);
|
|
596
|
-
function
|
|
597
|
-
if (!
|
|
597
|
+
function Co(t) {
|
|
598
|
+
if (!nr(t) || bo(t))
|
|
598
599
|
return !1;
|
|
599
|
-
var e =
|
|
600
|
-
return e.test(
|
|
600
|
+
var e = yo(t) ? No : vo;
|
|
601
|
+
return e.test(Ao(t));
|
|
601
602
|
}
|
|
602
|
-
function
|
|
603
|
+
function Oo(t, e) {
|
|
603
604
|
return t == null ? void 0 : t[e];
|
|
604
605
|
}
|
|
605
606
|
function De(t, e) {
|
|
606
|
-
var n =
|
|
607
|
-
return
|
|
607
|
+
var n = Oo(t, e);
|
|
608
|
+
return Co(n) ? n : void 0;
|
|
608
609
|
}
|
|
609
|
-
var
|
|
610
|
-
function
|
|
611
|
-
this.__data__ =
|
|
610
|
+
var Ut = De(Object, "create");
|
|
611
|
+
function ko() {
|
|
612
|
+
this.__data__ = Ut ? Ut(null) : {}, this.size = 0;
|
|
612
613
|
}
|
|
613
|
-
function
|
|
614
|
+
function Po(t) {
|
|
614
615
|
var e = this.has(t) && delete this.__data__[t];
|
|
615
616
|
return this.size -= e ? 1 : 0, e;
|
|
616
617
|
}
|
|
617
|
-
var
|
|
618
|
-
function
|
|
618
|
+
var Ro = "__lodash_hash_undefined__", $o = Object.prototype, Fo = $o.hasOwnProperty;
|
|
619
|
+
function Uo(t) {
|
|
619
620
|
var e = this.__data__;
|
|
620
|
-
if (
|
|
621
|
+
if (Ut) {
|
|
621
622
|
var n = e[t];
|
|
622
|
-
return n ===
|
|
623
|
+
return n === Ro ? void 0 : n;
|
|
623
624
|
}
|
|
624
|
-
return
|
|
625
|
+
return Fo.call(e, t) ? e[t] : void 0;
|
|
625
626
|
}
|
|
626
|
-
var
|
|
627
|
-
function
|
|
627
|
+
var jo = Object.prototype, Lo = jo.hasOwnProperty;
|
|
628
|
+
function Do(t) {
|
|
628
629
|
var e = this.__data__;
|
|
629
|
-
return
|
|
630
|
+
return Ut ? e[t] !== void 0 : Lo.call(e, t);
|
|
630
631
|
}
|
|
631
|
-
var
|
|
632
|
-
function
|
|
632
|
+
var Ho = "__lodash_hash_undefined__";
|
|
633
|
+
function Vo(t, e) {
|
|
633
634
|
var n = this.__data__;
|
|
634
|
-
return this.size += this.has(t) ? 0 : 1, n[t] =
|
|
635
|
+
return this.size += this.has(t) ? 0 : 1, n[t] = Ut && e === void 0 ? Ho : e, this;
|
|
635
636
|
}
|
|
636
637
|
function ft(t) {
|
|
637
638
|
var e = -1, n = t == null ? 0 : t.length;
|
|
@@ -640,39 +641,39 @@ function ft(t) {
|
|
|
640
641
|
this.set(r[0], r[1]);
|
|
641
642
|
}
|
|
642
643
|
}
|
|
643
|
-
ft.prototype.clear =
|
|
644
|
-
ft.prototype.delete =
|
|
645
|
-
ft.prototype.get =
|
|
646
|
-
ft.prototype.has =
|
|
647
|
-
ft.prototype.set =
|
|
648
|
-
function
|
|
644
|
+
ft.prototype.clear = ko;
|
|
645
|
+
ft.prototype.delete = Po;
|
|
646
|
+
ft.prototype.get = Uo;
|
|
647
|
+
ft.prototype.has = Do;
|
|
648
|
+
ft.prototype.set = Vo;
|
|
649
|
+
function Mo() {
|
|
649
650
|
this.__data__ = [], this.size = 0;
|
|
650
651
|
}
|
|
651
|
-
function
|
|
652
|
+
function Go(t, e) {
|
|
652
653
|
return t === e || t !== t && e !== e;
|
|
653
654
|
}
|
|
654
655
|
function le(t, e) {
|
|
655
656
|
for (var n = t.length; n--; )
|
|
656
|
-
if (
|
|
657
|
+
if (Go(t[n][0], e))
|
|
657
658
|
return n;
|
|
658
659
|
return -1;
|
|
659
660
|
}
|
|
660
|
-
var
|
|
661
|
-
function
|
|
661
|
+
var zo = Array.prototype, qo = zo.splice;
|
|
662
|
+
function Wo(t) {
|
|
662
663
|
var e = this.__data__, n = le(e, t);
|
|
663
664
|
if (n < 0)
|
|
664
665
|
return !1;
|
|
665
666
|
var r = e.length - 1;
|
|
666
|
-
return n == r ? e.pop() :
|
|
667
|
+
return n == r ? e.pop() : qo.call(e, n, 1), --this.size, !0;
|
|
667
668
|
}
|
|
668
|
-
function
|
|
669
|
+
function Ko(t) {
|
|
669
670
|
var e = this.__data__, n = le(e, t);
|
|
670
671
|
return n < 0 ? void 0 : e[n][1];
|
|
671
672
|
}
|
|
672
|
-
function
|
|
673
|
+
function Zo(t) {
|
|
673
674
|
return le(this.__data__, t) > -1;
|
|
674
675
|
}
|
|
675
|
-
function
|
|
676
|
+
function Yo(t, e) {
|
|
676
677
|
var n = this.__data__, r = le(n, t);
|
|
677
678
|
return r < 0 ? (++this.size, n.push([t, e])) : n[r][1] = e, this;
|
|
678
679
|
}
|
|
@@ -683,38 +684,38 @@ function It(t) {
|
|
|
683
684
|
this.set(r[0], r[1]);
|
|
684
685
|
}
|
|
685
686
|
}
|
|
686
|
-
It.prototype.clear =
|
|
687
|
-
It.prototype.delete =
|
|
688
|
-
It.prototype.get =
|
|
689
|
-
It.prototype.has =
|
|
690
|
-
It.prototype.set =
|
|
691
|
-
var
|
|
692
|
-
function
|
|
687
|
+
It.prototype.clear = Mo;
|
|
688
|
+
It.prototype.delete = Wo;
|
|
689
|
+
It.prototype.get = Ko;
|
|
690
|
+
It.prototype.has = Zo;
|
|
691
|
+
It.prototype.set = Yo;
|
|
692
|
+
var Xo = De(ce, "Map");
|
|
693
|
+
function Jo() {
|
|
693
694
|
this.size = 0, this.__data__ = {
|
|
694
695
|
hash: new ft(),
|
|
695
|
-
map: new (
|
|
696
|
+
map: new (Xo || It)(),
|
|
696
697
|
string: new ft()
|
|
697
698
|
};
|
|
698
699
|
}
|
|
699
|
-
function
|
|
700
|
+
function Qo(t) {
|
|
700
701
|
var e = typeof t;
|
|
701
702
|
return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
|
|
702
703
|
}
|
|
703
704
|
function ue(t, e) {
|
|
704
705
|
var n = t.__data__;
|
|
705
|
-
return
|
|
706
|
+
return Qo(e) ? n[typeof e == "string" ? "string" : "hash"] : n.map;
|
|
706
707
|
}
|
|
707
|
-
function
|
|
708
|
+
function ta(t) {
|
|
708
709
|
var e = ue(this, t).delete(t);
|
|
709
710
|
return this.size -= e ? 1 : 0, e;
|
|
710
711
|
}
|
|
711
|
-
function
|
|
712
|
+
function ea(t) {
|
|
712
713
|
return ue(this, t).get(t);
|
|
713
714
|
}
|
|
714
|
-
function
|
|
715
|
+
function na(t) {
|
|
715
716
|
return ue(this, t).has(t);
|
|
716
717
|
}
|
|
717
|
-
function
|
|
718
|
+
function ra(t, e) {
|
|
718
719
|
var n = ue(this, t), r = n.size;
|
|
719
720
|
return n.set(t, e), this.size += n.size == r ? 0 : 1, this;
|
|
720
721
|
}
|
|
@@ -725,16 +726,16 @@ function Tt(t) {
|
|
|
725
726
|
this.set(r[0], r[1]);
|
|
726
727
|
}
|
|
727
728
|
}
|
|
728
|
-
Tt.prototype.clear =
|
|
729
|
-
Tt.prototype.delete =
|
|
730
|
-
Tt.prototype.get =
|
|
731
|
-
Tt.prototype.has =
|
|
732
|
-
Tt.prototype.set =
|
|
733
|
-
var
|
|
734
|
-
function
|
|
735
|
-
return this.__data__.set(t,
|
|
729
|
+
Tt.prototype.clear = Jo;
|
|
730
|
+
Tt.prototype.delete = ta;
|
|
731
|
+
Tt.prototype.get = ea;
|
|
732
|
+
Tt.prototype.has = na;
|
|
733
|
+
Tt.prototype.set = ra;
|
|
734
|
+
var sa = "__lodash_hash_undefined__";
|
|
735
|
+
function oa(t) {
|
|
736
|
+
return this.__data__.set(t, sa), this;
|
|
736
737
|
}
|
|
737
|
-
function
|
|
738
|
+
function aa(t) {
|
|
738
739
|
return this.__data__.has(t);
|
|
739
740
|
}
|
|
740
741
|
function te(t) {
|
|
@@ -742,60 +743,60 @@ function te(t) {
|
|
|
742
743
|
for (this.__data__ = new Tt(); ++e < n; )
|
|
743
744
|
this.add(t[e]);
|
|
744
745
|
}
|
|
745
|
-
te.prototype.add = te.prototype.push =
|
|
746
|
-
te.prototype.has =
|
|
747
|
-
function
|
|
746
|
+
te.prototype.add = te.prototype.push = oa;
|
|
747
|
+
te.prototype.has = aa;
|
|
748
|
+
function ia(t, e, n, r) {
|
|
748
749
|
for (var s = t.length, o = n + -1; ++o < s; )
|
|
749
750
|
if (e(t[o], o, t))
|
|
750
751
|
return o;
|
|
751
752
|
return -1;
|
|
752
753
|
}
|
|
753
|
-
function
|
|
754
|
+
function ca(t) {
|
|
754
755
|
return t !== t;
|
|
755
756
|
}
|
|
756
|
-
function
|
|
757
|
+
function la(t, e, n) {
|
|
757
758
|
for (var r = n - 1, s = t.length; ++r < s; )
|
|
758
759
|
if (t[r] === e)
|
|
759
760
|
return r;
|
|
760
761
|
return -1;
|
|
761
762
|
}
|
|
762
|
-
function
|
|
763
|
-
return e === e ?
|
|
763
|
+
function ua(t, e, n) {
|
|
764
|
+
return e === e ? la(t, e, n) : ia(t, ca, n);
|
|
764
765
|
}
|
|
765
|
-
function
|
|
766
|
+
function da(t, e) {
|
|
766
767
|
var n = t == null ? 0 : t.length;
|
|
767
|
-
return !!n &&
|
|
768
|
+
return !!n && ua(t, e, 0) > -1;
|
|
768
769
|
}
|
|
769
|
-
function
|
|
770
|
+
function fa(t, e, n) {
|
|
770
771
|
for (var r = -1, s = t == null ? 0 : t.length; ++r < s; )
|
|
771
772
|
if (n(e, t[r]))
|
|
772
773
|
return !0;
|
|
773
774
|
return !1;
|
|
774
775
|
}
|
|
775
|
-
function
|
|
776
|
+
function ha(t, e) {
|
|
776
777
|
return t.has(e);
|
|
777
778
|
}
|
|
778
779
|
var Se = De(ce, "Set");
|
|
779
|
-
function
|
|
780
|
+
function pa() {
|
|
780
781
|
}
|
|
781
|
-
function
|
|
782
|
+
function rr(t) {
|
|
782
783
|
var e = -1, n = Array(t.size);
|
|
783
784
|
return t.forEach(function(r) {
|
|
784
785
|
n[++e] = r;
|
|
785
786
|
}), n;
|
|
786
787
|
}
|
|
787
|
-
var
|
|
788
|
+
var ma = 1 / 0, ga = Se && 1 / rr(new Se([, -0]))[1] == ma ? function(t) {
|
|
788
789
|
return new Se(t);
|
|
789
|
-
} :
|
|
790
|
-
function
|
|
791
|
-
var r = -1, s =
|
|
790
|
+
} : pa, wa = 200;
|
|
791
|
+
function ya(t, e, n) {
|
|
792
|
+
var r = -1, s = da, o = t.length, a = !0, i = [], c = i;
|
|
792
793
|
if (n)
|
|
793
|
-
a = !1, s =
|
|
794
|
-
else if (o >=
|
|
795
|
-
var l =
|
|
794
|
+
a = !1, s = fa;
|
|
795
|
+
else if (o >= wa) {
|
|
796
|
+
var l = ga(t);
|
|
796
797
|
if (l)
|
|
797
|
-
return
|
|
798
|
-
a = !1, s =
|
|
798
|
+
return rr(l);
|
|
799
|
+
a = !1, s = ha, c = new te();
|
|
799
800
|
} else
|
|
800
801
|
c = i;
|
|
801
802
|
t:
|
|
@@ -810,8 +811,8 @@ function ma(t, e, n) {
|
|
|
810
811
|
}
|
|
811
812
|
return i;
|
|
812
813
|
}
|
|
813
|
-
function
|
|
814
|
-
return e = typeof e == "function" ? e : void 0, t && t.length ?
|
|
814
|
+
function ba(t, e) {
|
|
815
|
+
return e = typeof e == "function" ? e : void 0, t && t.length ? ya(t, void 0, e) : [];
|
|
815
816
|
}
|
|
816
817
|
function hn(t) {
|
|
817
818
|
const e = Object.entries(tt), n = Object.entries(Jt);
|
|
@@ -826,103 +827,103 @@ function hn(t) {
|
|
|
826
827
|
return e.map(([, r]) => r);
|
|
827
828
|
}
|
|
828
829
|
}
|
|
829
|
-
function
|
|
830
|
+
function Sa() {
|
|
830
831
|
const t = Q.maxSatisfying(Object.keys(tt), "*");
|
|
831
832
|
if (!t)
|
|
832
833
|
throw new Error(`No argent account contract found: v${t} `);
|
|
833
834
|
return tt[t];
|
|
834
835
|
}
|
|
835
|
-
function
|
|
836
|
+
function Kl() {
|
|
836
837
|
const t = Q.maxSatisfying(Object.keys(Jt), "*");
|
|
837
838
|
if (!t)
|
|
838
839
|
throw new Error(`No argent multisig contract found: v${t} `);
|
|
839
840
|
return Jt[t];
|
|
840
841
|
}
|
|
841
|
-
function
|
|
842
|
+
function Ea() {
|
|
842
843
|
return Object.entries(tt).filter(([t]) => Q.gte(t, "0.4.0")).map(([, t]) => t);
|
|
843
844
|
}
|
|
844
|
-
function
|
|
845
|
+
function Zl() {
|
|
845
846
|
const t = Q.maxSatisfying(Object.keys(tt), "<0.3.0");
|
|
846
847
|
if (!t)
|
|
847
848
|
throw new Error(`No argent account contract found: v${t} `);
|
|
848
849
|
return tt[t];
|
|
849
850
|
}
|
|
850
|
-
function
|
|
851
|
+
function Aa() {
|
|
851
852
|
const t = Object.entries(tt).filter(([n]) => Q.gte(n, "0.3.1")).map(([, n]) => n), e = Object.entries(Jt).filter(([n]) => Q.gte(n, "0.1.1")).map(([, n]) => n);
|
|
852
853
|
return [...t, ...e];
|
|
853
854
|
}
|
|
854
|
-
function
|
|
855
|
+
function Yl() {
|
|
855
856
|
return Object.entries(tt).filter(([t]) => Q.gte(t, "0.4.0")).map(([, t]) => t);
|
|
856
857
|
}
|
|
857
|
-
function
|
|
858
|
+
function Xl() {
|
|
858
859
|
const t = Q.maxSatisfying(Object.keys(tt), ">=0.4.0");
|
|
859
860
|
if (!t)
|
|
860
861
|
throw new Error(`No ledger account contract found: v${t}`);
|
|
861
862
|
return tt[t];
|
|
862
863
|
}
|
|
863
|
-
const
|
|
864
|
-
function
|
|
864
|
+
const xa = (t, e) => t.cairoVersion === e.cairoVersion && nt(t.accountClassHash, e.accountClassHash);
|
|
865
|
+
function Jl(t, e, n = []) {
|
|
865
866
|
const r = en.parse({
|
|
866
867
|
cairoVersion: e.cairoVersion ?? "1",
|
|
867
|
-
accountClassHash: e.classHash ??
|
|
868
|
+
accountClassHash: e.classHash ?? Sa()
|
|
868
869
|
}), s = h.array(en).parse(n), o = [
|
|
869
870
|
...hn("cairo0").map((l) => ({ cairoVersion: "0", accountClassHash: l })),
|
|
870
871
|
...hn("cairo1").map((l) => ({ cairoVersion: "1", accountClassHash: l }))
|
|
871
|
-
], c =
|
|
872
|
+
], c = ba([
|
|
872
873
|
r,
|
|
873
874
|
...s,
|
|
874
875
|
...o
|
|
875
|
-
],
|
|
876
|
+
], xa).map((l) => ({
|
|
876
877
|
implementation: l,
|
|
877
|
-
address:
|
|
878
|
+
address: Ta(l.cairoVersion, l.accountClassHash, t, e.guardian, e.salt)
|
|
878
879
|
})).find((l) => nt(l.address, e.address));
|
|
879
880
|
if (!c)
|
|
880
|
-
throw new
|
|
881
|
+
throw new Wr({ code: "CALCULATED_ADDRESS_NO_MATCH" });
|
|
881
882
|
return c.implementation;
|
|
882
883
|
}
|
|
883
|
-
function
|
|
884
|
-
const a =
|
|
884
|
+
function va(t, e, n, r, s, o = eo[0]) {
|
|
885
|
+
const a = Ia(t, e, n, r);
|
|
885
886
|
return {
|
|
886
887
|
classHash: t === "0" ? o : e,
|
|
887
888
|
constructorCalldata: mt.compile(a),
|
|
888
889
|
addressSalt: s || n
|
|
889
890
|
};
|
|
890
891
|
}
|
|
891
|
-
function
|
|
892
|
-
const s = t !== "0" && nt(
|
|
892
|
+
function Ia(t, e, n, r) {
|
|
893
|
+
const s = t !== "0" && nt(Kr, e), o = {
|
|
893
894
|
pubkey: n,
|
|
894
895
|
...s ? {} : { guardian: r || "0" }
|
|
895
896
|
};
|
|
896
|
-
if (
|
|
897
|
+
if (Ea().some((i) => nt(i, e))) {
|
|
897
898
|
const i = nn(n, rn.Starknet), c = r ? new on(an.Some, nn(r, rn.Starknet)) : new on(an.None, null);
|
|
898
899
|
return { ownerSigner: i, guardianAsOption: c };
|
|
899
900
|
}
|
|
900
|
-
return t === "0" ?
|
|
901
|
+
return t === "0" ? Zr.parse({
|
|
901
902
|
implementation: e,
|
|
902
|
-
selector:
|
|
903
|
+
selector: Gn.getSelectorFromName("initialize"),
|
|
903
904
|
calldata: mt.compile(o)
|
|
904
|
-
}) :
|
|
905
|
+
}) : Yr.parse({
|
|
905
906
|
owner: n,
|
|
906
907
|
guardian: r
|
|
907
908
|
});
|
|
908
909
|
}
|
|
909
|
-
function
|
|
910
|
-
const o =
|
|
911
|
-
return
|
|
910
|
+
function Ta(t, e, n, r, s) {
|
|
911
|
+
const o = va(t, e, n, r, s);
|
|
912
|
+
return Gn.calculateContractAddressFromHash(o.addressSalt, o.classHash, o.constructorCalldata, 0);
|
|
912
913
|
}
|
|
913
|
-
function
|
|
914
|
+
function Ql(t, e) {
|
|
914
915
|
const n = ln(t), r = ln();
|
|
915
|
-
return
|
|
916
|
+
return Ft(() => {
|
|
916
917
|
n.current = t;
|
|
917
|
-
}, [t]),
|
|
918
|
+
}, [t]), Ft(() => () => {
|
|
918
919
|
r.current && clearTimeout(r.current);
|
|
919
920
|
}, []), (...s) => {
|
|
920
921
|
r.current && clearTimeout(r.current), r.current = setTimeout(() => n.current(...s), e);
|
|
921
922
|
};
|
|
922
923
|
}
|
|
923
|
-
function
|
|
924
|
-
const [n, r] =
|
|
925
|
-
return
|
|
924
|
+
function tu(t, e) {
|
|
925
|
+
const [n, r] = zn(t);
|
|
926
|
+
return Ft(() => {
|
|
926
927
|
const s = setTimeout(() => {
|
|
927
928
|
r(t);
|
|
928
929
|
}, e);
|
|
@@ -931,7 +932,7 @@ function Zl(t, e) {
|
|
|
931
932
|
};
|
|
932
933
|
}, [t, e]), n;
|
|
933
934
|
}
|
|
934
|
-
const
|
|
935
|
+
const Ba = h.object({
|
|
935
936
|
name: h.enum([
|
|
936
937
|
"dappland",
|
|
937
938
|
"discord",
|
|
@@ -942,10 +943,10 @@ const va = h.object({
|
|
|
942
943
|
]),
|
|
943
944
|
url: h.string(),
|
|
944
945
|
position: h.number()
|
|
945
|
-
}),
|
|
946
|
-
address:
|
|
946
|
+
}), _a = h.object({
|
|
947
|
+
address: Hn,
|
|
947
948
|
chain: h.enum(["ethereum", "starknet"])
|
|
948
|
-
}),
|
|
949
|
+
}), Na = h.object({
|
|
949
950
|
dappId: h.string(),
|
|
950
951
|
name: h.string(),
|
|
951
952
|
description: h.string().optional(),
|
|
@@ -953,60 +954,60 @@ const va = h.object({
|
|
|
953
954
|
dappUrl: h.string().optional(),
|
|
954
955
|
inAppBrowserCompatible: h.boolean(),
|
|
955
956
|
argentVerified: h.boolean(),
|
|
956
|
-
links: h.array(
|
|
957
|
-
contracts: h.array(
|
|
957
|
+
links: h.array(Ba).optional(),
|
|
958
|
+
contracts: h.array(_a).optional(),
|
|
958
959
|
categories: h.array(h.string()).optional(),
|
|
959
960
|
supportedApps: h.array(h.string()).optional(),
|
|
960
961
|
brandColor: h.string().optional(),
|
|
961
962
|
executeFromOutsideAllowed: h.boolean().default(!1).optional()
|
|
962
|
-
}),
|
|
963
|
-
class
|
|
963
|
+
}), Ca = h.array(Na);
|
|
964
|
+
class eu {
|
|
964
965
|
constructor(e, n) {
|
|
965
966
|
this.apiBase = e, this.httpService = new Le(n, "json");
|
|
966
967
|
}
|
|
967
968
|
async getAll() {
|
|
968
|
-
const e = await this.httpService.get(`${this.apiBase}/tokens/dapps`), n =
|
|
969
|
+
const e = await this.httpService.get(`${this.apiBase}/tokens/dapps`), n = Ca.safeParse(e);
|
|
969
970
|
if (!n.success)
|
|
970
971
|
throw new Error("Failed to parse known dapps");
|
|
971
972
|
return n.data;
|
|
972
973
|
}
|
|
973
974
|
}
|
|
974
|
-
function
|
|
975
|
+
function Oa(t) {
|
|
975
976
|
var e;
|
|
976
977
|
return (e = t == null ? void 0 : t.links) == null ? void 0 : e.find((n) => n.name === "dappland");
|
|
977
978
|
}
|
|
978
|
-
function
|
|
979
|
+
function nu(t) {
|
|
979
980
|
var e;
|
|
980
|
-
return (e =
|
|
981
|
+
return (e = Oa(t)) == null ? void 0 : e.url;
|
|
981
982
|
}
|
|
982
|
-
const
|
|
983
|
-
domain:
|
|
983
|
+
const sr = F.object({
|
|
984
|
+
domain: Xr,
|
|
984
985
|
address: se.optional(),
|
|
985
986
|
avatar: F.string().optional(),
|
|
986
987
|
status: F.union([F.literal("KNOWN"), F.literal("UNKNOWN")])
|
|
987
|
-
}),
|
|
988
|
+
}), ka = F.array(sr), Pa = F.object({
|
|
988
989
|
provider: F.string(),
|
|
989
990
|
name: F.string(),
|
|
990
991
|
avatar: F.string().optional()
|
|
991
|
-
}),
|
|
992
|
+
}), Ra = F.object({
|
|
992
993
|
address: se,
|
|
993
994
|
status: F.union([F.literal("KNOWN"), F.literal("UNKNOWN")]),
|
|
994
|
-
resolutions: F.array(
|
|
995
|
-
}),
|
|
996
|
-
class
|
|
995
|
+
resolutions: F.array(Pa).optional()
|
|
996
|
+
}), $a = F.array(F.string()), Fa = Ra.array();
|
|
997
|
+
class ru {
|
|
997
998
|
constructor(e, n) {
|
|
998
999
|
this.apiBase = e, this.headers = n, this.httpService = new Le(this.headers, "json");
|
|
999
1000
|
}
|
|
1000
1001
|
async getAddressFromMultipleStarknetId(e, n, r) {
|
|
1001
1002
|
const s = new URLSearchParams(n.map((c) => ["domain", c]));
|
|
1002
1003
|
r && s.set("includeAvatar", "true");
|
|
1003
|
-
const o = k(this.apiBase, e, "starknet.id", `?${s}`), a = await this.httpService.get(o), i =
|
|
1004
|
+
const o = k(this.apiBase, e, "starknet.id", `?${s}`), a = await this.httpService.get(o), i = ka.safeParse(a);
|
|
1004
1005
|
if (!i.success)
|
|
1005
1006
|
throw new Error("Failed to parse name resolution");
|
|
1006
1007
|
return i.data;
|
|
1007
1008
|
}
|
|
1008
1009
|
async getAddressFromStarknetId(e, n, r) {
|
|
1009
|
-
const s = k(this.apiBase, e, "starknet.id", n, r ? "?includeAvatar=true" : ""), o = await this.httpService.get(s), a =
|
|
1010
|
+
const s = k(this.apiBase, e, "starknet.id", n, r ? "?includeAvatar=true" : ""), o = await this.httpService.get(s), a = sr.safeParse(o);
|
|
1010
1011
|
if (!a.success)
|
|
1011
1012
|
throw new Error("Failed to parse name resolution");
|
|
1012
1013
|
return a.data;
|
|
@@ -1017,28 +1018,28 @@ class Jl {
|
|
|
1017
1018
|
async getStarknetIdFromAddress(e, n, r) {
|
|
1018
1019
|
const s = new URLSearchParams(n.map((c) => ["address", c]));
|
|
1019
1020
|
r && s.set("includeAvatar", "true");
|
|
1020
|
-
const o = k(this.apiBase, e, "addresses", `?${s}`), a = await this.httpService.get(o), i =
|
|
1021
|
+
const o = k(this.apiBase, e, "addresses", `?${s}`), a = await this.httpService.get(o), i = Fa.safeParse(a);
|
|
1021
1022
|
if (!i.success)
|
|
1022
1023
|
throw new Error("Failed to parse name resolution");
|
|
1023
1024
|
return i.data;
|
|
1024
1025
|
}
|
|
1025
1026
|
async getProvidersNames(e) {
|
|
1026
|
-
const n = k(this.apiBase, e, "providers", "name"), r = await this.httpService.get(n), s =
|
|
1027
|
+
const n = k(this.apiBase, e, "providers", "name"), r = await this.httpService.get(n), s = $a.safeParse(r);
|
|
1027
1028
|
if (!s.success)
|
|
1028
1029
|
throw new Error("Failed to parse name resolution");
|
|
1029
1030
|
return s.data;
|
|
1030
1031
|
}
|
|
1031
1032
|
}
|
|
1032
|
-
const
|
|
1033
|
+
const or = (t) => t.slice(0, 6) + "..." + t.slice(-4);
|
|
1033
1034
|
function pn(t) {
|
|
1034
1035
|
if (!Number.isSafeInteger(t) || t < 0)
|
|
1035
1036
|
throw new Error(`positive integer expected, not ${t}`);
|
|
1036
1037
|
}
|
|
1037
|
-
function
|
|
1038
|
+
function Ua(t) {
|
|
1038
1039
|
return t instanceof Uint8Array || t != null && typeof t == "object" && t.constructor.name === "Uint8Array";
|
|
1039
1040
|
}
|
|
1040
1041
|
function de(t, ...e) {
|
|
1041
|
-
if (!
|
|
1042
|
+
if (!Ua(t))
|
|
1042
1043
|
throw new Error("Uint8Array expected");
|
|
1043
1044
|
if (e.length > 0 && !e.includes(t.length))
|
|
1044
1045
|
throw new Error(`Uint8Array expected of length ${e}, not of length=${t.length}`);
|
|
@@ -1049,67 +1050,67 @@ function mn(t, e = !0) {
|
|
|
1049
1050
|
if (e && t.finished)
|
|
1050
1051
|
throw new Error("Hash#digest() has already been called");
|
|
1051
1052
|
}
|
|
1052
|
-
function
|
|
1053
|
+
function ja(t, e) {
|
|
1053
1054
|
de(t);
|
|
1054
1055
|
const n = e.outputLen;
|
|
1055
1056
|
if (t.length < n)
|
|
1056
1057
|
throw new Error(`digestInto() expects output buffer of length at least ${n}`);
|
|
1057
1058
|
}
|
|
1058
|
-
const
|
|
1059
|
-
function
|
|
1060
|
-
return e ? { h: Number(t &
|
|
1059
|
+
const Kt = /* @__PURE__ */ BigInt(2 ** 32 - 1), gn = /* @__PURE__ */ BigInt(32);
|
|
1060
|
+
function La(t, e = !1) {
|
|
1061
|
+
return e ? { h: Number(t & Kt), l: Number(t >> gn & Kt) } : { h: Number(t >> gn & Kt) | 0, l: Number(t & Kt) | 0 };
|
|
1061
1062
|
}
|
|
1062
|
-
function
|
|
1063
|
+
function Da(t, e = !1) {
|
|
1063
1064
|
let n = new Uint32Array(t.length), r = new Uint32Array(t.length);
|
|
1064
1065
|
for (let s = 0; s < t.length; s++) {
|
|
1065
|
-
const { h: o, l: a } =
|
|
1066
|
+
const { h: o, l: a } = La(t[s], e);
|
|
1066
1067
|
[n[s], r[s]] = [o, a];
|
|
1067
1068
|
}
|
|
1068
1069
|
return [n, r];
|
|
1069
1070
|
}
|
|
1070
|
-
const
|
|
1071
|
+
const Ha = (t, e, n) => t << n | e >>> 32 - n, Va = (t, e, n) => e << n | t >>> 32 - n, Ma = (t, e, n) => e << n - 32 | t >>> 64 - n, Ga = (t, e, n) => t << n - 32 | e >>> 64 - n;
|
|
1071
1072
|
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
1072
|
-
const
|
|
1073
|
+
const za = (t) => new Uint32Array(t.buffer, t.byteOffset, Math.floor(t.byteLength / 4)), wn = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68, qa = (t) => t << 24 & 4278190080 | t << 8 & 16711680 | t >>> 8 & 65280 | t >>> 24 & 255;
|
|
1073
1074
|
function yn(t) {
|
|
1074
1075
|
for (let e = 0; e < t.length; e++)
|
|
1075
|
-
t[e] =
|
|
1076
|
+
t[e] = qa(t[e]);
|
|
1076
1077
|
}
|
|
1077
|
-
const
|
|
1078
|
-
function
|
|
1078
|
+
const Wa = /* @__PURE__ */ Array.from({ length: 256 }, (t, e) => e.toString(16).padStart(2, "0"));
|
|
1079
|
+
function Ka(t) {
|
|
1079
1080
|
de(t);
|
|
1080
1081
|
let e = "";
|
|
1081
1082
|
for (let n = 0; n < t.length; n++)
|
|
1082
|
-
e +=
|
|
1083
|
+
e += Wa[t[n]];
|
|
1083
1084
|
return e;
|
|
1084
1085
|
}
|
|
1085
|
-
function
|
|
1086
|
+
function ar(t) {
|
|
1086
1087
|
if (typeof t != "string")
|
|
1087
1088
|
throw new Error(`utf8ToBytes expected string, got ${typeof t}`);
|
|
1088
1089
|
return new Uint8Array(new TextEncoder().encode(t));
|
|
1089
1090
|
}
|
|
1090
|
-
function
|
|
1091
|
-
return typeof t == "string" && (t =
|
|
1091
|
+
function ir(t) {
|
|
1092
|
+
return typeof t == "string" && (t = ar(t)), de(t), t;
|
|
1092
1093
|
}
|
|
1093
|
-
let
|
|
1094
|
+
let Za = class {
|
|
1094
1095
|
// Safe version that clones internal state
|
|
1095
1096
|
clone() {
|
|
1096
1097
|
return this._cloneInto();
|
|
1097
1098
|
}
|
|
1098
1099
|
};
|
|
1099
|
-
function
|
|
1100
|
-
const e = (r) => t().update(
|
|
1100
|
+
function Ya(t) {
|
|
1101
|
+
const e = (r) => t().update(ir(r)).digest(), n = t();
|
|
1101
1102
|
return e.outputLen = n.outputLen, e.blockLen = n.blockLen, e.create = () => t(), e;
|
|
1102
1103
|
}
|
|
1103
|
-
const
|
|
1104
|
+
const cr = [], lr = [], ur = [], Xa = /* @__PURE__ */ BigInt(0), Ct = /* @__PURE__ */ BigInt(1), Ja = /* @__PURE__ */ BigInt(2), Qa = /* @__PURE__ */ BigInt(7), ti = /* @__PURE__ */ BigInt(256), ei = /* @__PURE__ */ BigInt(113);
|
|
1104
1105
|
for (let t = 0, e = Ct, n = 1, r = 0; t < 24; t++) {
|
|
1105
|
-
[n, r] = [r, (2 * n + 3 * r) % 5],
|
|
1106
|
-
let s =
|
|
1106
|
+
[n, r] = [r, (2 * n + 3 * r) % 5], cr.push(2 * (5 * r + n)), lr.push((t + 1) * (t + 2) / 2 % 64);
|
|
1107
|
+
let s = Xa;
|
|
1107
1108
|
for (let o = 0; o < 7; o++)
|
|
1108
|
-
e = (e << Ct ^ (e >>
|
|
1109
|
-
|
|
1109
|
+
e = (e << Ct ^ (e >> Qa) * ei) % ti, e & Ja && (s ^= Ct << (Ct << /* @__PURE__ */ BigInt(o)) - Ct);
|
|
1110
|
+
ur.push(s);
|
|
1110
1111
|
}
|
|
1111
|
-
const [
|
|
1112
|
-
function
|
|
1112
|
+
const [ni, ri] = /* @__PURE__ */ Da(ur, !0), bn = (t, e, n) => n > 32 ? Ma(t, e, n) : Ha(t, e, n), Sn = (t, e, n) => n > 32 ? Ga(t, e, n) : Va(t, e, n);
|
|
1113
|
+
function si(t, e = 24) {
|
|
1113
1114
|
const n = new Uint32Array(10);
|
|
1114
1115
|
for (let r = 24 - e; r < 24; r++) {
|
|
1115
1116
|
for (let a = 0; a < 10; a++)
|
|
@@ -1121,7 +1122,7 @@ function ei(t, e = 24) {
|
|
|
1121
1122
|
}
|
|
1122
1123
|
let s = t[2], o = t[3];
|
|
1123
1124
|
for (let a = 0; a < 24; a++) {
|
|
1124
|
-
const i =
|
|
1125
|
+
const i = lr[a], c = bn(s, o, i), l = Sn(s, o, i), d = cr[a];
|
|
1125
1126
|
s = t[d], o = t[d + 1], t[d] = c, t[d + 1] = l;
|
|
1126
1127
|
}
|
|
1127
1128
|
for (let a = 0; a < 50; a += 10) {
|
|
@@ -1130,24 +1131,24 @@ function ei(t, e = 24) {
|
|
|
1130
1131
|
for (let i = 0; i < 10; i++)
|
|
1131
1132
|
t[a + i] ^= ~n[(i + 2) % 10] & n[(i + 4) % 10];
|
|
1132
1133
|
}
|
|
1133
|
-
t[0] ^=
|
|
1134
|
+
t[0] ^= ni[r], t[1] ^= ri[r];
|
|
1134
1135
|
}
|
|
1135
1136
|
n.fill(0);
|
|
1136
1137
|
}
|
|
1137
|
-
let
|
|
1138
|
+
let oi = class dr extends Za {
|
|
1138
1139
|
// NOTE: we accept arguments in bytes instead of bits here.
|
|
1139
1140
|
constructor(e, n, r, s = !1, o = 24) {
|
|
1140
1141
|
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)
|
|
1141
1142
|
throw new Error("Sha3 supports only keccak-f1600 function");
|
|
1142
|
-
this.state = new Uint8Array(200), this.state32 =
|
|
1143
|
+
this.state = new Uint8Array(200), this.state32 = za(this.state);
|
|
1143
1144
|
}
|
|
1144
1145
|
keccak() {
|
|
1145
|
-
wn || yn(this.state32),
|
|
1146
|
+
wn || yn(this.state32), si(this.state32, this.rounds), wn || yn(this.state32), this.posOut = 0, this.pos = 0;
|
|
1146
1147
|
}
|
|
1147
1148
|
update(e) {
|
|
1148
1149
|
mn(this);
|
|
1149
1150
|
const { blockLen: n, state: r } = this;
|
|
1150
|
-
e =
|
|
1151
|
+
e = ir(e);
|
|
1151
1152
|
const s = e.length;
|
|
1152
1153
|
for (let o = 0; o < s; ) {
|
|
1153
1154
|
const a = Math.min(n - this.pos, s - o);
|
|
@@ -1183,7 +1184,7 @@ let ni = class lr extends qa {
|
|
|
1183
1184
|
return pn(e), this.xofInto(new Uint8Array(e));
|
|
1184
1185
|
}
|
|
1185
1186
|
digestInto(e) {
|
|
1186
|
-
if (
|
|
1187
|
+
if (ja(e, this), this.finished)
|
|
1187
1188
|
throw new Error("digest() was already called");
|
|
1188
1189
|
return this.writeInto(e), this.destroy(), e;
|
|
1189
1190
|
}
|
|
@@ -1195,31 +1196,31 @@ let ni = class lr extends qa {
|
|
|
1195
1196
|
}
|
|
1196
1197
|
_cloneInto(e) {
|
|
1197
1198
|
const { blockLen: n, suffix: r, outputLen: s, rounds: o, enableXOF: a } = this;
|
|
1198
|
-
return e || (e = new
|
|
1199
|
+
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;
|
|
1199
1200
|
}
|
|
1200
1201
|
};
|
|
1201
|
-
const
|
|
1202
|
-
function
|
|
1203
|
-
return `0x${
|
|
1202
|
+
const ai = (t, e, n) => Ya(() => new oi(e, t, n)), ii = /* @__PURE__ */ ai(1, 136, 256 / 8);
|
|
1203
|
+
function ci(t) {
|
|
1204
|
+
return `0x${Ka(ii(ar(t)))}`;
|
|
1204
1205
|
}
|
|
1205
|
-
const
|
|
1206
|
-
if (!
|
|
1206
|
+
const li = (t) => {
|
|
1207
|
+
if (!Wn(t))
|
|
1207
1208
|
return;
|
|
1208
1209
|
const e = /(\d+)$/, n = t.match(e);
|
|
1209
1210
|
if (n)
|
|
1210
1211
|
return n[1];
|
|
1211
|
-
},
|
|
1212
|
-
if (!
|
|
1212
|
+
}, ui = (t, e = !1) => {
|
|
1213
|
+
if (!Wn(t))
|
|
1213
1214
|
return "";
|
|
1214
|
-
const n = e ? t.replace(/[^0-9a-z ]/gi, "") : t, s = $e(n).split(" "), o =
|
|
1215
|
+
const n = e ? t.replace(/[^0-9a-z ]/gi, "") : t, s = $e(n).split(" "), o = li(n), a = s.map((i) => i[0]);
|
|
1215
1216
|
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:
|
|
1217
|
+
}, { toBigInt: di } = O, En = (t) => {
|
|
1217
1218
|
const e = t.replace("#", "");
|
|
1218
1219
|
if (!/^[0-9A-F]{6}$/i.test(e))
|
|
1219
1220
|
throw new Error(`Invalid color ${t}`);
|
|
1220
1221
|
return `#${e}`;
|
|
1221
1222
|
}, ee = (t, e) => {
|
|
1222
|
-
const n = En(e.background), r = En(e.color ?? "#ffffff"), s =
|
|
1223
|
+
const n = En(e.background), r = En(e.color ?? "#ffffff"), s = ui(t, !0), o = `<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48">
|
|
1223
1224
|
<rect width="48" height="48" fill="${n}" />
|
|
1224
1225
|
<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
1226
|
</svg>`;
|
|
@@ -1233,43 +1234,43 @@ const ai = (t) => {
|
|
|
1233
1234
|
"FF875B",
|
|
1234
1235
|
"FF675C",
|
|
1235
1236
|
"FF5C72"
|
|
1236
|
-
],
|
|
1237
|
-
const e =
|
|
1237
|
+
], fi = (t) => {
|
|
1238
|
+
const e = ci(t).slice(-2), n = parseInt(e, 16) % An.length;
|
|
1238
1239
|
return An[n];
|
|
1239
|
-
},
|
|
1240
|
+
}, hi = (t) => {
|
|
1240
1241
|
try {
|
|
1241
|
-
return O.toHex(
|
|
1242
|
+
return O.toHex(di(O.hexToDecimalString(t)));
|
|
1242
1243
|
} catch {
|
|
1243
1244
|
}
|
|
1244
1245
|
return "";
|
|
1245
|
-
},
|
|
1246
|
-
const s =
|
|
1246
|
+
}, ou = ({ accountName: t, networkId: e, accountAddress: n, backgroundColor: r }) => {
|
|
1247
|
+
const s = hi(n), o = `${e}::${s}`, a = r || fi(o);
|
|
1247
1248
|
return ee(t, { background: a });
|
|
1248
|
-
},
|
|
1249
|
-
const e = $t.removeHexPrefix($t.sanitizeHex(O.toHex(t))), n =
|
|
1250
|
-
return
|
|
1251
|
-
},
|
|
1252
|
-
const e =
|
|
1253
|
-
return $t.sanitizeHex(
|
|
1254
|
-
},
|
|
1255
|
-
function
|
|
1249
|
+
}, pi = (t) => {
|
|
1250
|
+
const e = $t.removeHexPrefix($t.sanitizeHex(O.toHex(t))), n = Zn.decode(e);
|
|
1251
|
+
return Yn.encode(n);
|
|
1252
|
+
}, au = (t) => t.map(pi), mi = (t) => {
|
|
1253
|
+
const e = Yn.decode(t);
|
|
1254
|
+
return $t.sanitizeHex(Zn.encode(e));
|
|
1255
|
+
}, iu = (t) => t.map(mi);
|
|
1256
|
+
function cu(t, e) {
|
|
1256
1257
|
const n = t.getTime(), r = e.getTime(), s = Math.abs(n - r);
|
|
1257
1258
|
return Math.floor(s / (1e3 * 60 * 60 * 24));
|
|
1258
1259
|
}
|
|
1259
|
-
const
|
|
1260
|
+
const lu = (t) => (t || "false") === "true", uu = async (t, e) => {
|
|
1260
1261
|
try {
|
|
1261
1262
|
return await t.getClassHashAt(e), !0;
|
|
1262
1263
|
} catch {
|
|
1263
1264
|
return !1;
|
|
1264
1265
|
}
|
|
1265
1266
|
};
|
|
1266
|
-
function
|
|
1267
|
-
return !
|
|
1267
|
+
function du(t) {
|
|
1268
|
+
return !hs(t);
|
|
1268
1269
|
}
|
|
1269
|
-
const
|
|
1270
|
+
const fu = (t) => {
|
|
1270
1271
|
const e = /^(0|0x([a-f0-9A-F]+)?)$/;
|
|
1271
1272
|
return !!(t === "" || e.test(t));
|
|
1272
|
-
}, Y = (t) => !isNaN(parseFloat(t)) && isFinite(Number(t)),
|
|
1273
|
+
}, Y = (t) => !isNaN(parseFloat(t)) && isFinite(Number(t)), hu = (t, e = 16) => {
|
|
1273
1274
|
const n = new RegExp(`^[0-9]*.?[0-9]{0,${e}}$`);
|
|
1274
1275
|
return t === "" ? !0 : Y(t) ? !!n.test(t) : !1;
|
|
1275
1276
|
}, He = {
|
|
@@ -1287,13 +1288,13 @@ const iu = (t) => {
|
|
|
1287
1288
|
decimalPlacesWhenZero: 1,
|
|
1288
1289
|
allowLeadingZerosInDecimalPart: !0
|
|
1289
1290
|
}
|
|
1290
|
-
},
|
|
1291
|
+
}, gi = (t, e) => fr(t, {
|
|
1291
1292
|
...He.CURRENCY,
|
|
1292
1293
|
...e || {}
|
|
1293
|
-
}),
|
|
1294
|
+
}), wi = (t, e) => fr(t, {
|
|
1294
1295
|
...He.TOKEN,
|
|
1295
1296
|
...e || {}
|
|
1296
|
-
}),
|
|
1297
|
+
}), fr = (t, { minDecimalPlaces: e, maxDecimalPlaces: n, minDecimalSignificantDigits: r, decimalPlacesWhenZero: s, allowLeadingZerosInDecimalPart: o } = He.CURRENCY) => {
|
|
1297
1298
|
if (!Y(t))
|
|
1298
1299
|
return null;
|
|
1299
1300
|
const a = new sn(typeof t == "bigint" ? t.toString() : t);
|
|
@@ -1310,48 +1311,48 @@ const iu = (t) => {
|
|
|
1310
1311
|
let l = i.replace(/0+$/, "");
|
|
1311
1312
|
const d = 1 + i.indexOf(".") + s;
|
|
1312
1313
|
return l.length < d && (l = i.substring(0, d)), l;
|
|
1313
|
-
},
|
|
1314
|
+
}, yi = (t, e = 18) => {
|
|
1314
1315
|
const n = t.replace(",", ".");
|
|
1315
1316
|
return !t || !Y(n) ? 0n : xt(n, Number(e)).value;
|
|
1316
1317
|
};
|
|
1317
|
-
function
|
|
1318
|
-
return
|
|
1318
|
+
function jt(t) {
|
|
1319
|
+
return Ht.bnToUint256(t);
|
|
1319
1320
|
}
|
|
1320
|
-
const
|
|
1321
|
+
const pu = (t, e) => `${t} ${e}${t === 1 ? "" : "s"}`, mu = (t) => new Promise((e, n) => {
|
|
1321
1322
|
const r = new FileReader();
|
|
1322
1323
|
r.onload = () => {
|
|
1323
1324
|
var s;
|
|
1324
1325
|
return r.result ? e((s = r.result) == null ? void 0 : s.toString()) : n(new Error("Could not read file"));
|
|
1325
1326
|
}, r.onerror = n, r.onabort = n.bind(null, new Error("User aborted")), r.readAsText(t);
|
|
1326
1327
|
});
|
|
1327
|
-
function
|
|
1328
|
+
function gu(t) {
|
|
1328
1329
|
try {
|
|
1329
|
-
return
|
|
1330
|
+
return ps(Kn(t));
|
|
1330
1331
|
} catch {
|
|
1331
1332
|
return t;
|
|
1332
1333
|
}
|
|
1333
1334
|
}
|
|
1334
|
-
const
|
|
1335
|
+
const wu = (t, e) => {
|
|
1335
1336
|
const n = new URLSearchParams(e), r = n.size ? `?${n}` : "";
|
|
1336
1337
|
return k(...oe(t), r);
|
|
1337
1338
|
};
|
|
1338
|
-
function
|
|
1339
|
+
function yu(t) {
|
|
1339
1340
|
return (...e) => {
|
|
1340
1341
|
t(...e);
|
|
1341
1342
|
};
|
|
1342
1343
|
}
|
|
1343
|
-
class
|
|
1344
|
+
class bi extends Error {
|
|
1344
1345
|
constructor(e, n) {
|
|
1345
1346
|
super(`${e}::${n}`), this.name = e, this.code = n, this.name = e;
|
|
1346
1347
|
}
|
|
1347
1348
|
}
|
|
1348
|
-
class xn extends
|
|
1349
|
+
class xn extends bi {
|
|
1349
1350
|
constructor(e) {
|
|
1350
1351
|
super("BackendPaginationError", e);
|
|
1351
1352
|
}
|
|
1352
1353
|
}
|
|
1353
1354
|
const vn = 32;
|
|
1354
|
-
class
|
|
1355
|
+
class bu {
|
|
1355
1356
|
constructor(e, n, r) {
|
|
1356
1357
|
this.apiBase = e, this.headers = n, this.imageOptimizationUrl = r, this.httpService = new Le(this.headers, "json");
|
|
1357
1358
|
}
|
|
@@ -1403,7 +1404,7 @@ class pu {
|
|
|
1403
1404
|
return this.httpService.get(a);
|
|
1404
1405
|
}
|
|
1405
1406
|
normalizeAddress(e) {
|
|
1406
|
-
return
|
|
1407
|
+
return Hn.parse(e);
|
|
1407
1408
|
}
|
|
1408
1409
|
pageToPageIndex(e) {
|
|
1409
1410
|
if (!Number.isInteger(e))
|
|
@@ -1430,7 +1431,7 @@ class pu {
|
|
|
1430
1431
|
token_id: e.tokenId,
|
|
1431
1432
|
contract_address: e.contractAddress,
|
|
1432
1433
|
name: r,
|
|
1433
|
-
spec: "spec" in e ?
|
|
1434
|
+
spec: "spec" in e ? Si(e.spec) : void 0,
|
|
1434
1435
|
description: "",
|
|
1435
1436
|
best_bid_order: {
|
|
1436
1437
|
payment_amount: "bestListPrice" in e ? BigInt(e.bestListPrice) : void 0
|
|
@@ -1447,11 +1448,11 @@ class pu {
|
|
|
1447
1448
|
owner: {
|
|
1448
1449
|
account_address: ((s = e.owner) == null ? void 0 : s.address) || n
|
|
1449
1450
|
},
|
|
1450
|
-
contract_name:
|
|
1451
|
+
contract_name: or(e.contractAddress)
|
|
1451
1452
|
};
|
|
1452
1453
|
}
|
|
1453
1454
|
}
|
|
1454
|
-
function
|
|
1455
|
+
function Si(t) {
|
|
1455
1456
|
switch (t) {
|
|
1456
1457
|
case "erc721":
|
|
1457
1458
|
case "starknetErc721":
|
|
@@ -1464,7 +1465,7 @@ function wi(t) {
|
|
|
1464
1465
|
function Ee(t, e) {
|
|
1465
1466
|
return {
|
|
1466
1467
|
contractAddress: se.parse(t.contractAddress),
|
|
1467
|
-
name: t.name ||
|
|
1468
|
+
name: t.name || or(t.contractAddress),
|
|
1468
1469
|
description: t.description ?? "",
|
|
1469
1470
|
imageUri: t.imageUrls.preview ?? ee(t.name || t.contractAddress.replace("0x", ""), {
|
|
1470
1471
|
background: "#15192A",
|
|
@@ -1482,29 +1483,29 @@ function Ee(t, e) {
|
|
|
1482
1483
|
}
|
|
1483
1484
|
};
|
|
1484
1485
|
}
|
|
1485
|
-
const
|
|
1486
|
+
const hr = async (t, e, n, r, s = 1) => {
|
|
1486
1487
|
const o = await t.getNfts(e, n, r, s);
|
|
1487
1488
|
if (s < o.totalPages) {
|
|
1488
|
-
const a = await
|
|
1489
|
+
const a = await hr(t, e, n, r, o.page + 1);
|
|
1489
1490
|
return {
|
|
1490
1491
|
...o,
|
|
1491
1492
|
nfts: o.nfts.concat(a.nfts)
|
|
1492
1493
|
};
|
|
1493
1494
|
}
|
|
1494
1495
|
return o;
|
|
1495
|
-
},
|
|
1496
|
-
const { data: o, ...a } = ae(r && [r, "nfts"], () => r &&
|
|
1496
|
+
}, Su = (t, e, n, r, s) => {
|
|
1497
|
+
const { data: o, ...a } = ae(r && [r, "nfts"], () => r && hr(t, e, n, r), {
|
|
1497
1498
|
refreshInterval: 3e5,
|
|
1498
1499
|
...s
|
|
1499
1500
|
});
|
|
1500
1501
|
return { nfts: o == null ? void 0 : o.nfts, ...a };
|
|
1501
|
-
},
|
|
1502
|
+
}, Eu = (t, e, n, r, s) => {
|
|
1502
1503
|
const { data: o, ...a } = ae(r && [`${r}`, "nfts-collection"], () => r && t.getCollection(e, n, r), {
|
|
1503
1504
|
refreshInterval: 6e4,
|
|
1504
1505
|
...s
|
|
1505
1506
|
});
|
|
1506
1507
|
return { collection: o, ...a };
|
|
1507
|
-
},
|
|
1508
|
+
}, Au = (t, e, n, r, s, o) => {
|
|
1508
1509
|
const { data: a, ...i } = ae(s && r && [`${r}:${s}`, "nft"], () => s && r ? t.getNft(e, n, r, s) : void 0, {
|
|
1509
1510
|
refreshInterval: 6e4,
|
|
1510
1511
|
revalidateOnFocus: !1,
|
|
@@ -1512,7 +1513,7 @@ const dr = async (t, e, n, r, s = 1) => {
|
|
|
1512
1513
|
...o
|
|
1513
1514
|
});
|
|
1514
1515
|
return { nft: a, ...i };
|
|
1515
|
-
},
|
|
1516
|
+
}, xu = ({ image_uri: t, image_url_copy: e }) => {
|
|
1516
1517
|
if (t && e) {
|
|
1517
1518
|
if (!e.startsWith("ipfs://"))
|
|
1518
1519
|
return e;
|
|
@@ -1520,16 +1521,16 @@ const dr = async (t, e, n, r, s = 1) => {
|
|
|
1520
1521
|
return t;
|
|
1521
1522
|
}
|
|
1522
1523
|
return e || t;
|
|
1523
|
-
},
|
|
1524
|
+
}, vu = (t, e) => t.token_id === e.token_id && nt(t.contract_address, e.contract_address);
|
|
1524
1525
|
function In(t) {
|
|
1525
1526
|
if (!Number.isSafeInteger(t) || t < 0)
|
|
1526
1527
|
throw new Error(`Wrong positive integer: ${t}`);
|
|
1527
1528
|
}
|
|
1528
|
-
function
|
|
1529
|
+
function Ei(t) {
|
|
1529
1530
|
return t instanceof Uint8Array || t != null && typeof t == "object" && t.constructor.name === "Uint8Array";
|
|
1530
1531
|
}
|
|
1531
|
-
function
|
|
1532
|
-
if (!
|
|
1532
|
+
function pr(t, ...e) {
|
|
1533
|
+
if (!Ei(t))
|
|
1533
1534
|
throw new Error("Expected Uint8Array");
|
|
1534
1535
|
if (e.length > 0 && !e.includes(t.length))
|
|
1535
1536
|
throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`);
|
|
@@ -1540,63 +1541,63 @@ function ne(t, e = !0) {
|
|
|
1540
1541
|
if (e && t.finished)
|
|
1541
1542
|
throw new Error("Hash#digest() has already been called");
|
|
1542
1543
|
}
|
|
1543
|
-
function
|
|
1544
|
-
|
|
1544
|
+
function mr(t, e) {
|
|
1545
|
+
pr(t);
|
|
1545
1546
|
const n = e.outputLen;
|
|
1546
1547
|
if (t.length < n)
|
|
1547
1548
|
throw new Error(`digestInto() expects output buffer of length at least ${n}`);
|
|
1548
1549
|
}
|
|
1549
|
-
const
|
|
1550
|
-
function
|
|
1551
|
-
return e ? { h: Number(t &
|
|
1550
|
+
const Zt = /* @__PURE__ */ BigInt(2 ** 32 - 1), Tn = /* @__PURE__ */ BigInt(32);
|
|
1551
|
+
function Ai(t, e = !1) {
|
|
1552
|
+
return e ? { h: Number(t & Zt), l: Number(t >> Tn & Zt) } : { h: Number(t >> Tn & Zt) | 0, l: Number(t & Zt) | 0 };
|
|
1552
1553
|
}
|
|
1553
|
-
function
|
|
1554
|
+
function xi(t, e = !1) {
|
|
1554
1555
|
let n = new Uint32Array(t.length), r = new Uint32Array(t.length);
|
|
1555
1556
|
for (let s = 0; s < t.length; s++) {
|
|
1556
|
-
const { h: o, l: a } =
|
|
1557
|
+
const { h: o, l: a } = Ai(t[s], e);
|
|
1557
1558
|
[n[s], r[s]] = [o, a];
|
|
1558
1559
|
}
|
|
1559
1560
|
return [n, r];
|
|
1560
1561
|
}
|
|
1561
|
-
const
|
|
1562
|
+
const vi = (t, e, n) => t << n | e >>> 32 - n, Ii = (t, e, n) => e << n | t >>> 32 - n, Ti = (t, e, n) => e << n - 32 | t >>> 64 - n, Bi = (t, e, n) => t << n - 32 | e >>> 64 - n;
|
|
1562
1563
|
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
1563
|
-
const
|
|
1564
|
-
function
|
|
1564
|
+
const _i = (t) => new Uint32Array(t.buffer, t.byteOffset, Math.floor(t.byteLength / 4));
|
|
1565
|
+
function Ni(t) {
|
|
1565
1566
|
return t instanceof Uint8Array || t != null && typeof t == "object" && t.constructor.name === "Uint8Array";
|
|
1566
1567
|
}
|
|
1567
|
-
const Ae = (t) => new DataView(t.buffer, t.byteOffset, t.byteLength), J = (t, e) => t << 32 - e | t >>> e,
|
|
1568
|
-
if (!
|
|
1568
|
+
const Ae = (t) => new DataView(t.buffer, t.byteOffset, t.byteLength), J = (t, e) => t << 32 - e | t >>> e, Ci = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
|
|
1569
|
+
if (!Ci)
|
|
1569
1570
|
throw new Error("Non little-endian hardware is not supported");
|
|
1570
|
-
function
|
|
1571
|
+
function gr(t) {
|
|
1571
1572
|
if (typeof t != "string")
|
|
1572
1573
|
throw new Error(`utf8ToBytes expected string, got ${typeof t}`);
|
|
1573
1574
|
return new Uint8Array(new TextEncoder().encode(t));
|
|
1574
1575
|
}
|
|
1575
1576
|
function Ve(t) {
|
|
1576
|
-
if (typeof t == "string" && (t =
|
|
1577
|
+
if (typeof t == "string" && (t = gr(t)), !Ni(t))
|
|
1577
1578
|
throw new Error(`expected Uint8Array, got ${typeof t}`);
|
|
1578
1579
|
return t;
|
|
1579
1580
|
}
|
|
1580
|
-
let
|
|
1581
|
+
let wr = class {
|
|
1581
1582
|
// Safe version that clones internal state
|
|
1582
1583
|
clone() {
|
|
1583
1584
|
return this._cloneInto();
|
|
1584
1585
|
}
|
|
1585
1586
|
};
|
|
1586
|
-
function
|
|
1587
|
+
function yr(t) {
|
|
1587
1588
|
const e = (r) => t().update(Ve(r)).digest(), n = t();
|
|
1588
1589
|
return e.outputLen = n.outputLen, e.blockLen = n.blockLen, e.create = () => t(), e;
|
|
1589
1590
|
}
|
|
1590
|
-
const [
|
|
1591
|
+
const [br, Sr, Er] = [[], [], []], Oi = /* @__PURE__ */ BigInt(0), Ot = /* @__PURE__ */ BigInt(1), ki = /* @__PURE__ */ BigInt(2), Pi = /* @__PURE__ */ BigInt(7), Ri = /* @__PURE__ */ BigInt(256), $i = /* @__PURE__ */ BigInt(113);
|
|
1591
1592
|
for (let t = 0, e = Ot, n = 1, r = 0; t < 24; t++) {
|
|
1592
|
-
[n, r] = [r, (2 * n + 3 * r) % 5],
|
|
1593
|
-
let s =
|
|
1593
|
+
[n, r] = [r, (2 * n + 3 * r) % 5], br.push(2 * (5 * r + n)), Sr.push((t + 1) * (t + 2) / 2 % 64);
|
|
1594
|
+
let s = Oi;
|
|
1594
1595
|
for (let o = 0; o < 7; o++)
|
|
1595
|
-
e = (e << Ot ^ (e >>
|
|
1596
|
-
|
|
1596
|
+
e = (e << Ot ^ (e >> Pi) * $i) % Ri, e & ki && (s ^= Ot << (Ot << /* @__PURE__ */ BigInt(o)) - Ot);
|
|
1597
|
+
Er.push(s);
|
|
1597
1598
|
}
|
|
1598
|
-
const [
|
|
1599
|
-
function
|
|
1599
|
+
const [Fi, Ui] = /* @__PURE__ */ xi(Er, !0), Bn = (t, e, n) => n > 32 ? Ti(t, e, n) : vi(t, e, n), _n = (t, e, n) => n > 32 ? Bi(t, e, n) : Ii(t, e, n);
|
|
1600
|
+
function ji(t, e = 24) {
|
|
1600
1601
|
const n = new Uint32Array(10);
|
|
1601
1602
|
for (let r = 24 - e; r < 24; r++) {
|
|
1602
1603
|
for (let a = 0; a < 10; a++)
|
|
@@ -1608,7 +1609,7 @@ function $i(t, e = 24) {
|
|
|
1608
1609
|
}
|
|
1609
1610
|
let s = t[2], o = t[3];
|
|
1610
1611
|
for (let a = 0; a < 24; a++) {
|
|
1611
|
-
const i =
|
|
1612
|
+
const i = Sr[a], c = Bn(s, o, i), l = _n(s, o, i), d = br[a];
|
|
1612
1613
|
s = t[d], o = t[d + 1], t[d] = c, t[d + 1] = l;
|
|
1613
1614
|
}
|
|
1614
1615
|
for (let a = 0; a < 50; a += 10) {
|
|
@@ -1617,19 +1618,19 @@ function $i(t, e = 24) {
|
|
|
1617
1618
|
for (let i = 0; i < 10; i++)
|
|
1618
1619
|
t[a + i] ^= ~n[(i + 2) % 10] & n[(i + 4) % 10];
|
|
1619
1620
|
}
|
|
1620
|
-
t[0] ^=
|
|
1621
|
+
t[0] ^= Fi[r], t[1] ^= Ui[r];
|
|
1621
1622
|
}
|
|
1622
1623
|
n.fill(0);
|
|
1623
1624
|
}
|
|
1624
|
-
class Me extends
|
|
1625
|
+
class Me extends wr {
|
|
1625
1626
|
// NOTE: we accept arguments in bytes instead of bits here.
|
|
1626
1627
|
constructor(e, n, r, s = !1, o = 24) {
|
|
1627
1628
|
if (super(), this.blockLen = e, this.suffix = n, this.outputLen = r, this.enableXOF = s, this.rounds = o, this.pos = 0, this.posOut = 0, this.finished = !1, this.destroyed = !1, In(r), 0 >= this.blockLen || this.blockLen >= 200)
|
|
1628
1629
|
throw new Error("Sha3 supports only keccak-f1600 function");
|
|
1629
|
-
this.state = new Uint8Array(200), this.state32 =
|
|
1630
|
+
this.state = new Uint8Array(200), this.state32 = _i(this.state);
|
|
1630
1631
|
}
|
|
1631
1632
|
keccak() {
|
|
1632
|
-
|
|
1633
|
+
ji(this.state32, this.rounds), this.posOut = 0, this.pos = 0;
|
|
1633
1634
|
}
|
|
1634
1635
|
update(e) {
|
|
1635
1636
|
ne(this);
|
|
@@ -1652,7 +1653,7 @@ class Me extends mr {
|
|
|
1652
1653
|
e[r] ^= n, n & 128 && r === s - 1 && this.keccak(), e[s - 1] ^= 128, this.keccak();
|
|
1653
1654
|
}
|
|
1654
1655
|
writeInto(e) {
|
|
1655
|
-
ne(this, !1),
|
|
1656
|
+
ne(this, !1), pr(e), this.finish();
|
|
1656
1657
|
const n = this.state, { blockLen: r } = this;
|
|
1657
1658
|
for (let s = 0, o = e.length; s < o; ) {
|
|
1658
1659
|
this.posOut >= r && this.keccak();
|
|
@@ -1670,7 +1671,7 @@ class Me extends mr {
|
|
|
1670
1671
|
return In(e), this.xofInto(new Uint8Array(e));
|
|
1671
1672
|
}
|
|
1672
1673
|
digestInto(e) {
|
|
1673
|
-
if (
|
|
1674
|
+
if (mr(e, this), this.finished)
|
|
1674
1675
|
throw new Error("digest() was already called");
|
|
1675
1676
|
return this.writeInto(e), this.destroy(), e;
|
|
1676
1677
|
}
|
|
@@ -1685,14 +1686,14 @@ class Me extends mr {
|
|
|
1685
1686
|
return e || (e = new Me(n, r, s, a, o)), e.state32.set(this.state32), e.pos = this.pos, e.posOut = this.posOut, e.finished = this.finished, e.rounds = o, e.suffix = r, e.outputLen = s, e.enableXOF = a, e.destroyed = this.destroyed, e;
|
|
1686
1687
|
}
|
|
1687
1688
|
}
|
|
1688
|
-
const
|
|
1689
|
-
function
|
|
1689
|
+
const Li = (t, e, n) => yr(() => new Me(e, t, n)), Di = /* @__PURE__ */ Li(1, 136, 256 / 8);
|
|
1690
|
+
function Hi(t, e, n, r) {
|
|
1690
1691
|
if (typeof t.setBigUint64 == "function")
|
|
1691
1692
|
return t.setBigUint64(e, n, r);
|
|
1692
1693
|
const s = BigInt(32), o = BigInt(4294967295), a = Number(n >> s & o), i = Number(n & o), c = r ? 4 : 0, l = r ? 0 : 4;
|
|
1693
1694
|
t.setUint32(e + c, a, r), t.setUint32(e + l, i, r);
|
|
1694
1695
|
}
|
|
1695
|
-
class
|
|
1696
|
+
class Vi extends wr {
|
|
1696
1697
|
constructor(e, n, r, s) {
|
|
1697
1698
|
super(), this.blockLen = e, this.outputLen = n, this.padOffset = r, this.isLE = s, this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.buffer = new Uint8Array(e), this.view = Ae(this.buffer);
|
|
1698
1699
|
}
|
|
@@ -1714,13 +1715,13 @@ class Li extends mr {
|
|
|
1714
1715
|
return this.length += e.length, this.roundClean(), this;
|
|
1715
1716
|
}
|
|
1716
1717
|
digestInto(e) {
|
|
1717
|
-
ne(this),
|
|
1718
|
+
ne(this), mr(e, this), this.finished = !0;
|
|
1718
1719
|
const { buffer: n, view: r, blockLen: s, isLE: o } = this;
|
|
1719
1720
|
let { pos: a } = this;
|
|
1720
1721
|
n[a++] = 128, this.buffer.subarray(a).fill(0), this.padOffset > s - a && (this.process(r, 0), a = 0);
|
|
1721
1722
|
for (let u = a; u < s; u++)
|
|
1722
1723
|
n[u] = 0;
|
|
1723
|
-
|
|
1724
|
+
Hi(r, s - 8, BigInt(this.length * 8), o), this.process(r, 0);
|
|
1724
1725
|
const i = Ae(e), c = this.outputLen;
|
|
1725
1726
|
if (c % 4)
|
|
1726
1727
|
throw new Error("_sha2: outputLen should be aligned to 32bit");
|
|
@@ -1742,7 +1743,7 @@ class Li extends mr {
|
|
|
1742
1743
|
return e.length = s, e.pos = i, e.finished = o, e.destroyed = a, s % n && e.buffer.set(r), e;
|
|
1743
1744
|
}
|
|
1744
1745
|
}
|
|
1745
|
-
const
|
|
1746
|
+
const Mi = (t, e, n) => t & e ^ ~t & n, Gi = (t, e, n) => t & e ^ t & n ^ e & n, zi = /* @__PURE__ */ new Uint32Array([
|
|
1746
1747
|
1116352408,
|
|
1747
1748
|
1899447441,
|
|
1748
1749
|
3049323471,
|
|
@@ -1817,7 +1818,7 @@ const Di = (t, e, n) => t & e ^ ~t & n, Hi = (t, e, n) => t & e ^ t & n ^ e & n,
|
|
|
1817
1818
|
528734635,
|
|
1818
1819
|
1541459225
|
|
1819
1820
|
]), ct = /* @__PURE__ */ new Uint32Array(64);
|
|
1820
|
-
class
|
|
1821
|
+
class qi extends Vi {
|
|
1821
1822
|
constructor() {
|
|
1822
1823
|
super(64, 32, 8, !1), this.A = it[0] | 0, this.B = it[1] | 0, this.C = it[2] | 0, this.D = it[3] | 0, this.E = it[4] | 0, this.F = it[5] | 0, this.G = it[6] | 0, this.H = it[7] | 0;
|
|
1823
1824
|
}
|
|
@@ -1838,7 +1839,7 @@ class Mi extends Li {
|
|
|
1838
1839
|
}
|
|
1839
1840
|
let { A: r, B: s, C: o, D: a, E: i, F: c, G: l, H: d } = this;
|
|
1840
1841
|
for (let u = 0; u < 64; u++) {
|
|
1841
|
-
const w = J(i, 6) ^ J(i, 11) ^ J(i, 25), m = d + w +
|
|
1842
|
+
const w = J(i, 6) ^ J(i, 11) ^ J(i, 25), m = d + w + Mi(i, c, l) + zi[u] + ct[u] | 0, f = (J(r, 2) ^ J(r, 13) ^ J(r, 22)) + Gi(r, s, o) | 0;
|
|
1842
1843
|
d = l, l = c, c = i, i = a + m | 0, a = o, o = s, s = r, r = m + f | 0;
|
|
1843
1844
|
}
|
|
1844
1845
|
r = r + this.A | 0, s = s + this.B | 0, o = o + this.C | 0, a = a + this.D | 0, i = i + this.E | 0, c = c + this.F | 0, l = l + this.G | 0, d = d + this.H | 0, this.set(r, s, o, a, i, c, l, d);
|
|
@@ -1850,18 +1851,18 @@ class Mi extends Li {
|
|
|
1850
1851
|
this.set(0, 0, 0, 0, 0, 0, 0, 0), this.buffer.fill(0);
|
|
1851
1852
|
}
|
|
1852
1853
|
}
|
|
1853
|
-
const
|
|
1854
|
+
const Ar = /* @__PURE__ */ yr(() => new qi());
|
|
1854
1855
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
1855
|
-
const
|
|
1856
|
+
const xr = BigInt(0), fe = BigInt(1), Wi = BigInt(2), he = (t) => t instanceof Uint8Array, Ki = Array.from({ length: 256 }, (t, e) => e.toString(16).padStart(2, "0"));
|
|
1856
1857
|
function ht(t) {
|
|
1857
1858
|
if (!he(t))
|
|
1858
1859
|
throw new Error("Uint8Array expected");
|
|
1859
1860
|
let e = "";
|
|
1860
1861
|
for (let n = 0; n < t.length; n++)
|
|
1861
|
-
e +=
|
|
1862
|
+
e += Ki[t[n]];
|
|
1862
1863
|
return e;
|
|
1863
1864
|
}
|
|
1864
|
-
function
|
|
1865
|
+
function vr(t) {
|
|
1865
1866
|
const e = t.toString(16);
|
|
1866
1867
|
return e.length & 1 ? `0${e}` : e;
|
|
1867
1868
|
}
|
|
@@ -1892,7 +1893,7 @@ function ze(t) {
|
|
|
1892
1893
|
throw new Error("Uint8Array expected");
|
|
1893
1894
|
return Ge(ht(Uint8Array.from(t).reverse()));
|
|
1894
1895
|
}
|
|
1895
|
-
const Et = (t, e) => pt(t.toString(16).padStart(e * 2, "0")),
|
|
1896
|
+
const Et = (t, e) => pt(t.toString(16).padStart(e * 2, "0")), Ir = (t, e) => Et(t, e).reverse(), Zi = (t) => pt(vr(t));
|
|
1896
1897
|
function V(t, e, n) {
|
|
1897
1898
|
let r;
|
|
1898
1899
|
if (typeof e == "string")
|
|
@@ -1910,7 +1911,7 @@ function V(t, e, n) {
|
|
|
1910
1911
|
throw new Error(`${t} expected ${n} bytes, got ${s}`);
|
|
1911
1912
|
return r;
|
|
1912
1913
|
}
|
|
1913
|
-
function
|
|
1914
|
+
function Lt(...t) {
|
|
1914
1915
|
const e = new Uint8Array(t.reduce((r, s) => r + s.length, 0));
|
|
1915
1916
|
let n = 0;
|
|
1916
1917
|
return t.forEach((r) => {
|
|
@@ -1919,7 +1920,7 @@ function jt(...t) {
|
|
|
1919
1920
|
e.set(r, n), n += r.length;
|
|
1920
1921
|
}), e;
|
|
1921
1922
|
}
|
|
1922
|
-
function
|
|
1923
|
+
function Yi(t, e) {
|
|
1923
1924
|
if (t.length !== e.length)
|
|
1924
1925
|
return !1;
|
|
1925
1926
|
for (let n = 0; n < t.length; n++)
|
|
@@ -1927,19 +1928,19 @@ function Wi(t, e) {
|
|
|
1927
1928
|
return !1;
|
|
1928
1929
|
return !0;
|
|
1929
1930
|
}
|
|
1930
|
-
function
|
|
1931
|
+
function Xi(t) {
|
|
1931
1932
|
if (typeof t != "string")
|
|
1932
1933
|
throw new Error(`utf8ToBytes expected string, got ${typeof t}`);
|
|
1933
1934
|
return new TextEncoder().encode(t);
|
|
1934
1935
|
}
|
|
1935
|
-
function
|
|
1936
|
+
function Ji(t) {
|
|
1936
1937
|
let e;
|
|
1937
|
-
for (e = 0; t >
|
|
1938
|
+
for (e = 0; t > xr; t >>= fe, e += 1)
|
|
1938
1939
|
;
|
|
1939
1940
|
return e;
|
|
1940
1941
|
}
|
|
1941
|
-
const
|
|
1942
|
-
function
|
|
1942
|
+
const Qi = (t, e) => t >> BigInt(e) & fe, tc = (t, e, n) => t | (n ? fe : xr) << BigInt(e), pe = (t) => (Wi << BigInt(t - 1)) - fe, xe = (t) => new Uint8Array(t), Nn = (t) => Uint8Array.from(t);
|
|
1943
|
+
function Tr(t, e, n) {
|
|
1943
1944
|
if (typeof t != "number" || t < 2)
|
|
1944
1945
|
throw new Error("hashLen must be a number");
|
|
1945
1946
|
if (typeof e != "number" || e < 2)
|
|
@@ -1961,7 +1962,7 @@ function vr(t, e, n) {
|
|
|
1961
1962
|
const m = r.slice();
|
|
1962
1963
|
w.push(m), u += r.length;
|
|
1963
1964
|
}
|
|
1964
|
-
return
|
|
1965
|
+
return Lt(...w);
|
|
1965
1966
|
};
|
|
1966
1967
|
return (u, w) => {
|
|
1967
1968
|
a(), c(u);
|
|
@@ -1971,7 +1972,7 @@ function vr(t, e, n) {
|
|
|
1971
1972
|
return a(), m;
|
|
1972
1973
|
};
|
|
1973
1974
|
}
|
|
1974
|
-
const
|
|
1975
|
+
const ec = {
|
|
1975
1976
|
bigint: (t) => typeof t == "bigint",
|
|
1976
1977
|
function: (t) => typeof t == "function",
|
|
1977
1978
|
boolean: (t) => typeof t == "boolean",
|
|
@@ -1981,9 +1982,9 @@ const Ji = {
|
|
|
1981
1982
|
field: (t, e) => e.Fp.isValid(t),
|
|
1982
1983
|
hash: (t) => typeof t == "function" && Number.isSafeInteger(t.outputLen)
|
|
1983
1984
|
};
|
|
1984
|
-
function
|
|
1985
|
+
function zt(t, e, n = {}) {
|
|
1985
1986
|
const r = (s, o, a) => {
|
|
1986
|
-
const i =
|
|
1987
|
+
const i = ec[o];
|
|
1987
1988
|
if (typeof i != "function")
|
|
1988
1989
|
throw new Error(`Invalid validator "${o}", expected function`);
|
|
1989
1990
|
const c = t[s];
|
|
@@ -1996,37 +1997,37 @@ function Gt(t, e, n = {}) {
|
|
|
1996
1997
|
r(s, o, !0);
|
|
1997
1998
|
return t;
|
|
1998
1999
|
}
|
|
1999
|
-
const
|
|
2000
|
+
const nc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2000
2001
|
__proto__: null,
|
|
2001
|
-
bitGet:
|
|
2002
|
-
bitLen:
|
|
2002
|
+
bitGet: Qi,
|
|
2003
|
+
bitLen: Ji,
|
|
2003
2004
|
bitMask: pe,
|
|
2004
|
-
bitSet:
|
|
2005
|
+
bitSet: tc,
|
|
2005
2006
|
bytesToHex: ht,
|
|
2006
2007
|
bytesToNumberBE: X,
|
|
2007
2008
|
bytesToNumberLE: ze,
|
|
2008
|
-
concatBytes:
|
|
2009
|
-
createHmacDrbg:
|
|
2009
|
+
concatBytes: Lt,
|
|
2010
|
+
createHmacDrbg: Tr,
|
|
2010
2011
|
ensureBytes: V,
|
|
2011
|
-
equalBytes:
|
|
2012
|
+
equalBytes: Yi,
|
|
2012
2013
|
hexToBytes: pt,
|
|
2013
2014
|
hexToNumber: Ge,
|
|
2014
2015
|
numberToBytesBE: Et,
|
|
2015
|
-
numberToBytesLE:
|
|
2016
|
-
numberToHexUnpadded:
|
|
2017
|
-
numberToVarBytesBE:
|
|
2018
|
-
utf8ToBytes:
|
|
2019
|
-
validateObject:
|
|
2016
|
+
numberToBytesLE: Ir,
|
|
2017
|
+
numberToHexUnpadded: vr,
|
|
2018
|
+
numberToVarBytesBE: Zi,
|
|
2019
|
+
utf8ToBytes: Xi,
|
|
2020
|
+
validateObject: zt
|
|
2020
2021
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2021
2022
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
2022
|
-
const U = BigInt(0), $ = BigInt(1), ut = BigInt(2),
|
|
2023
|
+
const U = BigInt(0), $ = BigInt(1), ut = BigInt(2), rc = BigInt(3), _e = BigInt(4), Cn = BigInt(5), On = BigInt(8);
|
|
2023
2024
|
BigInt(9);
|
|
2024
2025
|
BigInt(16);
|
|
2025
2026
|
function M(t, e) {
|
|
2026
2027
|
const n = t % e;
|
|
2027
2028
|
return n >= U ? n : e + n;
|
|
2028
2029
|
}
|
|
2029
|
-
function
|
|
2030
|
+
function sc(t, e, n) {
|
|
2030
2031
|
if (n <= U || e < U)
|
|
2031
2032
|
throw new Error("Expected power/modulo > 0");
|
|
2032
2033
|
if (n === $)
|
|
@@ -2048,12 +2049,12 @@ function Ne(t, e) {
|
|
|
2048
2049
|
throw new Error("invert: does not exist");
|
|
2049
2050
|
return M(s, e);
|
|
2050
2051
|
}
|
|
2051
|
-
function
|
|
2052
|
+
function oc(t) {
|
|
2052
2053
|
const e = (t - $) / ut;
|
|
2053
2054
|
let n, r, s;
|
|
2054
2055
|
for (n = t - $, r = 0; n % ut === U; n /= ut, r++)
|
|
2055
2056
|
;
|
|
2056
|
-
for (s = ut; s < t &&
|
|
2057
|
+
for (s = ut; s < t && sc(s, e, t) !== t - $; s++)
|
|
2057
2058
|
;
|
|
2058
2059
|
if (r === 1) {
|
|
2059
2060
|
const a = (t + $) / _e;
|
|
@@ -2081,8 +2082,8 @@ function nc(t) {
|
|
|
2081
2082
|
return u;
|
|
2082
2083
|
};
|
|
2083
2084
|
}
|
|
2084
|
-
function
|
|
2085
|
-
if (t % _e ===
|
|
2085
|
+
function ac(t) {
|
|
2086
|
+
if (t % _e === rc) {
|
|
2086
2087
|
const e = (t + $) / _e;
|
|
2087
2088
|
return function(r, s) {
|
|
2088
2089
|
const o = r.pow(s, e);
|
|
@@ -2100,9 +2101,9 @@ function rc(t) {
|
|
|
2100
2101
|
return l;
|
|
2101
2102
|
};
|
|
2102
2103
|
}
|
|
2103
|
-
return
|
|
2104
|
+
return oc(t);
|
|
2104
2105
|
}
|
|
2105
|
-
const
|
|
2106
|
+
const ic = [
|
|
2106
2107
|
"create",
|
|
2107
2108
|
"isValid",
|
|
2108
2109
|
"is0",
|
|
@@ -2127,10 +2128,10 @@ function qe(t) {
|
|
|
2127
2128
|
MASK: "bigint",
|
|
2128
2129
|
BYTES: "isSafeInteger",
|
|
2129
2130
|
BITS: "isSafeInteger"
|
|
2130
|
-
}, n =
|
|
2131
|
-
return
|
|
2131
|
+
}, n = ic.reduce((r, s) => (r[s] = "function", r), e);
|
|
2132
|
+
return zt(t, n);
|
|
2132
2133
|
}
|
|
2133
|
-
function
|
|
2134
|
+
function Br(t, e, n) {
|
|
2134
2135
|
if (n < U)
|
|
2135
2136
|
throw new Error("Expected power > 0");
|
|
2136
2137
|
if (n === U)
|
|
@@ -2142,7 +2143,7 @@ function Ir(t, e, n) {
|
|
|
2142
2143
|
n & $ && (r = t.mul(r, s)), s = t.sqr(s), n >>= $;
|
|
2143
2144
|
return r;
|
|
2144
2145
|
}
|
|
2145
|
-
function
|
|
2146
|
+
function cc(t, e) {
|
|
2146
2147
|
const n = new Array(e.length), r = e.reduce((o, a, i) => t.is0(a) ? o : (n[i] = o, t.mul(o, a)), t.ONE), s = t.inv(r);
|
|
2147
2148
|
return e.reduceRight((o, a, i) => t.is0(a) ? o : (n[i] = t.mul(o, n[i]), t.mul(o, a)), s), n;
|
|
2148
2149
|
}
|
|
@@ -2156,7 +2157,7 @@ function Ke(t, e, n = !1, r = {}) {
|
|
|
2156
2157
|
const { nBitLength: s, nByteLength: o } = We(t, e);
|
|
2157
2158
|
if (o > 2048)
|
|
2158
2159
|
throw new Error("Field lengths over 2048 bytes are not supported");
|
|
2159
|
-
const a =
|
|
2160
|
+
const a = ac(t), i = Object.freeze({
|
|
2160
2161
|
ORDER: t,
|
|
2161
2162
|
BITS: s,
|
|
2162
2163
|
BYTES: o,
|
|
@@ -2177,7 +2178,7 @@ function Ke(t, e, n = !1, r = {}) {
|
|
|
2177
2178
|
add: (c, l) => M(c + l, t),
|
|
2178
2179
|
sub: (c, l) => M(c - l, t),
|
|
2179
2180
|
mul: (c, l) => M(c * l, t),
|
|
2180
|
-
pow: (c, l) =>
|
|
2181
|
+
pow: (c, l) => Br(i, c, l),
|
|
2181
2182
|
div: (c, l) => M(c * Ne(l, t), t),
|
|
2182
2183
|
// Same as above, but doesn't normalize
|
|
2183
2184
|
sqrN: (c) => c * c,
|
|
@@ -2186,11 +2187,11 @@ function Ke(t, e, n = !1, r = {}) {
|
|
|
2186
2187
|
mulN: (c, l) => c * l,
|
|
2187
2188
|
inv: (c) => Ne(c, t),
|
|
2188
2189
|
sqrt: r.sqrt || ((c) => a(i, c)),
|
|
2189
|
-
invertBatch: (c) =>
|
|
2190
|
+
invertBatch: (c) => cc(i, c),
|
|
2190
2191
|
// TODO: do we really need constant cmov?
|
|
2191
2192
|
// We don't have const-time bigints anyway, so probably will be not very useful
|
|
2192
2193
|
cmov: (c, l, d) => d ? l : c,
|
|
2193
|
-
toBytes: (c) => n ?
|
|
2194
|
+
toBytes: (c) => n ? Ir(c, o) : Et(c, o),
|
|
2194
2195
|
fromBytes: (c) => {
|
|
2195
2196
|
if (c.length !== o)
|
|
2196
2197
|
throw new Error(`Fp.fromBytes: expected ${o}, got ${c.length}`);
|
|
@@ -2199,7 +2200,7 @@ function Ke(t, e, n = !1, r = {}) {
|
|
|
2199
2200
|
});
|
|
2200
2201
|
return Object.freeze(i);
|
|
2201
2202
|
}
|
|
2202
|
-
function
|
|
2203
|
+
function lc(t, e, n = !1) {
|
|
2203
2204
|
t = V("privateHash", t);
|
|
2204
2205
|
const r = t.length, s = We(e).nByteLength + 8;
|
|
2205
2206
|
if (s < 24 || r < s || r > 1024)
|
|
@@ -2208,7 +2209,7 @@ function ac(t, e, n = !1) {
|
|
|
2208
2209
|
return M(o, e - $) + $;
|
|
2209
2210
|
}
|
|
2210
2211
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
2211
|
-
function
|
|
2212
|
+
function uc(t) {
|
|
2212
2213
|
const { Fp: e } = t;
|
|
2213
2214
|
qe(e);
|
|
2214
2215
|
for (const c of ["t", "roundsFull", "roundsPartial"])
|
|
@@ -2220,7 +2221,7 @@ function ic(t) {
|
|
|
2220
2221
|
if (n === void 0 && (n = 5), typeof n != "number" || !Number.isSafeInteger(n))
|
|
2221
2222
|
throw new Error(`Poseidon wrong sboxPower=${n}`);
|
|
2222
2223
|
const r = BigInt(n);
|
|
2223
|
-
let s = (c) =>
|
|
2224
|
+
let s = (c) => Br(e, c, r);
|
|
2224
2225
|
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
2226
|
throw new Error(`Poseidon roundsFull is not even: ${t.roundsFull}`);
|
|
2226
2227
|
const o = t.roundsFull + t.roundsPartial;
|
|
@@ -2248,8 +2249,8 @@ function ic(t) {
|
|
|
2248
2249
|
});
|
|
2249
2250
|
return Object.freeze({ ...t, rounds: o, sboxFn: s, roundConstants: a, mds: i });
|
|
2250
2251
|
}
|
|
2251
|
-
function
|
|
2252
|
-
const { t: e, Fp: n, rounds: r, sboxFn: s, reversePartialPowIdx: o } =
|
|
2252
|
+
function dc(t) {
|
|
2253
|
+
const { t: e, Fp: n, rounds: r, sboxFn: s, reversePartialPowIdx: o } = uc(t), a = Math.floor(t.roundsFull / 2), i = o ? e - 1 : 0, c = (d, u, w) => (d = d.map((m, S) => n.add(m, t.roundConstants[w][S])), u ? d = d.map((m) => s(m)) : d[i] = s(d[i]), d = t.mds.map((m) => m.reduce((S, f, g) => n.add(S, n.mulN(f, d[g])), n.ZERO)), d), l = function(u) {
|
|
2253
2254
|
if (!Array.isArray(u) || u.length !== e)
|
|
2254
2255
|
throw new Error(`Poseidon: wrong values (expected array of bigints with length ${e})`);
|
|
2255
2256
|
u = u.map((m) => {
|
|
@@ -2271,8 +2272,8 @@ function cc(t) {
|
|
|
2271
2272
|
return l.roundConstants = t.roundConstants, l;
|
|
2272
2273
|
}
|
|
2273
2274
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
2274
|
-
const
|
|
2275
|
-
function
|
|
2275
|
+
const fc = BigInt(0), ve = BigInt(1);
|
|
2276
|
+
function hc(t, e) {
|
|
2276
2277
|
const n = (s, o) => {
|
|
2277
2278
|
const a = o.negate();
|
|
2278
2279
|
return s ? a : o;
|
|
@@ -2285,7 +2286,7 @@ function uc(t, e) {
|
|
|
2285
2286
|
// non-const time multiplication ladder
|
|
2286
2287
|
unsafeLadder(s, o) {
|
|
2287
2288
|
let a = t.ZERO, i = s;
|
|
2288
|
-
for (; o >
|
|
2289
|
+
for (; o > fc; )
|
|
2289
2290
|
o & ve && (a = a.add(i)), i = i.double(), o >>= ve;
|
|
2290
2291
|
return a;
|
|
2291
2292
|
},
|
|
@@ -2337,8 +2338,8 @@ function uc(t, e) {
|
|
|
2337
2338
|
}
|
|
2338
2339
|
};
|
|
2339
2340
|
}
|
|
2340
|
-
function
|
|
2341
|
-
return qe(t.Fp),
|
|
2341
|
+
function _r(t) {
|
|
2342
|
+
return qe(t.Fp), zt(t, {
|
|
2342
2343
|
n: "bigint",
|
|
2343
2344
|
h: "bigint",
|
|
2344
2345
|
Gx: "field",
|
|
@@ -2353,9 +2354,9 @@ function Tr(t) {
|
|
|
2353
2354
|
});
|
|
2354
2355
|
}
|
|
2355
2356
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
2356
|
-
function
|
|
2357
|
-
const e =
|
|
2358
|
-
|
|
2357
|
+
function pc(t) {
|
|
2358
|
+
const e = _r(t);
|
|
2359
|
+
zt(e, {
|
|
2359
2360
|
a: "field",
|
|
2360
2361
|
b: "field"
|
|
2361
2362
|
}, {
|
|
@@ -2376,7 +2377,7 @@ function dc(t) {
|
|
|
2376
2377
|
}
|
|
2377
2378
|
return Object.freeze({ ...e });
|
|
2378
2379
|
}
|
|
2379
|
-
const { bytesToNumberBE:
|
|
2380
|
+
const { bytesToNumberBE: mc, hexToBytes: gc } = nc, dt = {
|
|
2380
2381
|
// asn.1 DER encoding utils
|
|
2381
2382
|
Err: class extends Error {
|
|
2382
2383
|
constructor(e = "") {
|
|
@@ -2394,10 +2395,10 @@ const { bytesToNumberBE: fc, hexToBytes: hc } = Qi, dt = {
|
|
|
2394
2395
|
throw new e("Invalid signature integer: negative");
|
|
2395
2396
|
if (r[0] === 0 && !(r[1] & 128))
|
|
2396
2397
|
throw new e("Invalid signature integer: unnecessary leading zero");
|
|
2397
|
-
return { d:
|
|
2398
|
+
return { d: mc(r), l: t.subarray(n + 2) };
|
|
2398
2399
|
},
|
|
2399
2400
|
toSig(t) {
|
|
2400
|
-
const { Err: e } = dt, n = typeof t == "string" ?
|
|
2401
|
+
const { Err: e } = dt, n = typeof t == "string" ? gc(t) : t;
|
|
2401
2402
|
if (!(n instanceof Uint8Array))
|
|
2402
2403
|
throw new Error("ui8a expected");
|
|
2403
2404
|
let r = n.length;
|
|
@@ -2421,10 +2422,10 @@ const { bytesToNumberBE: fc, hexToBytes: hc } = Qi, dt = {
|
|
|
2421
2422
|
BigInt(2);
|
|
2422
2423
|
const kn = BigInt(3);
|
|
2423
2424
|
BigInt(4);
|
|
2424
|
-
function
|
|
2425
|
-
const e =
|
|
2425
|
+
function wc(t) {
|
|
2426
|
+
const e = pc(t), { Fp: n } = e, r = e.toBytes || ((S, f, g) => {
|
|
2426
2427
|
const b = f.toAffine();
|
|
2427
|
-
return
|
|
2428
|
+
return Lt(Uint8Array.from([4]), n.toBytes(b.x), n.toBytes(b.y));
|
|
2428
2429
|
}), s = e.fromBytes || ((S) => {
|
|
2429
2430
|
const f = S.subarray(1), g = n.fromBytes(f.subarray(0, n.BYTES)), b = n.fromBytes(f.subarray(n.BYTES, 2 * n.BYTES));
|
|
2430
2431
|
return { x: g, y: b };
|
|
@@ -2670,7 +2671,7 @@ function pc(t) {
|
|
|
2670
2671
|
}
|
|
2671
2672
|
}
|
|
2672
2673
|
u.BASE = new u(e.Gx, e.Gy, n.ONE), u.ZERO = new u(n.ZERO, n.ONE, n.ZERO);
|
|
2673
|
-
const w = e.nBitLength, m =
|
|
2674
|
+
const w = e.nBitLength, m = hc(u, e.endo ? Math.ceil(w / 2) : w);
|
|
2674
2675
|
return {
|
|
2675
2676
|
CURVE: e,
|
|
2676
2677
|
ProjectivePoint: u,
|
|
@@ -2679,9 +2680,9 @@ function pc(t) {
|
|
|
2679
2680
|
isWithinCurveOrder: a
|
|
2680
2681
|
};
|
|
2681
2682
|
}
|
|
2682
|
-
function
|
|
2683
|
-
const e =
|
|
2684
|
-
return
|
|
2683
|
+
function yc(t) {
|
|
2684
|
+
const e = _r(t);
|
|
2685
|
+
return zt(e, {
|
|
2685
2686
|
hash: "hash",
|
|
2686
2687
|
hmac: "function",
|
|
2687
2688
|
randomBytes: "function"
|
|
@@ -2691,8 +2692,8 @@ function mc(t) {
|
|
|
2691
2692
|
lowS: "boolean"
|
|
2692
2693
|
}), Object.freeze({ lowS: !0, ...e });
|
|
2693
2694
|
}
|
|
2694
|
-
function
|
|
2695
|
-
const e =
|
|
2695
|
+
function bc(t) {
|
|
2696
|
+
const e = yc(t), { Fp: n, n: r } = e, s = n.BYTES + 1, o = 2 * n.BYTES + 1;
|
|
2696
2697
|
function a(p) {
|
|
2697
2698
|
return et < p && p < n.ORDER;
|
|
2698
2699
|
}
|
|
@@ -2702,10 +2703,10 @@ function gc(t) {
|
|
|
2702
2703
|
function c(p) {
|
|
2703
2704
|
return Ne(p, r);
|
|
2704
2705
|
}
|
|
2705
|
-
const { ProjectivePoint: l, normPrivateKeyToScalar: d, weierstrassEquation: u, isWithinCurveOrder: w } =
|
|
2706
|
+
const { ProjectivePoint: l, normPrivateKeyToScalar: d, weierstrassEquation: u, isWithinCurveOrder: w } = wc({
|
|
2706
2707
|
...e,
|
|
2707
2708
|
toBytes(p, y, I) {
|
|
2708
|
-
const P = y.toAffine(), C = n.toBytes(P.x), j =
|
|
2709
|
+
const P = y.toAffine(), C = n.toBytes(P.x), j = Lt;
|
|
2709
2710
|
return I ? j(Uint8Array.from([y.hasEvenY() ? 2 : 3]), C) : j(Uint8Array.from([4]), C, n.toBytes(P.y));
|
|
2710
2711
|
},
|
|
2711
2712
|
fromBytes(p) {
|
|
@@ -2805,7 +2806,7 @@ function gc(t) {
|
|
|
2805
2806
|
* as per FIPS 186 B.4.1 with modulo bias being neglible.
|
|
2806
2807
|
*/
|
|
2807
2808
|
randomPrivateKey: () => {
|
|
2808
|
-
const p = e.randomBytes(n.BYTES + 8), y =
|
|
2809
|
+
const p = e.randomBytes(n.BYTES + 8), y = lc(p, r);
|
|
2809
2810
|
return Et(y, e.nByteLength);
|
|
2810
2811
|
},
|
|
2811
2812
|
/**
|
|
@@ -2858,7 +2859,7 @@ function gc(t) {
|
|
|
2858
2859
|
const lt = H === !0 ? C(n.BYTES) : H;
|
|
2859
2860
|
gt.push(V("extraEntropy", lt, n.BYTES));
|
|
2860
2861
|
}
|
|
2861
|
-
const Bt =
|
|
2862
|
+
const Bt = Lt(...gt), at = st;
|
|
2862
2863
|
function we(lt) {
|
|
2863
2864
|
const wt = A(lt);
|
|
2864
2865
|
if (!w(wt))
|
|
@@ -2877,7 +2878,7 @@ function gc(t) {
|
|
|
2877
2878
|
const N = { lowS: e.lowS, prehash: !1 }, L = { lowS: e.lowS, prehash: !1 };
|
|
2878
2879
|
function D(p, y, I = N) {
|
|
2879
2880
|
const { seed: P, k2sig: C } = R(p, y, I);
|
|
2880
|
-
return
|
|
2881
|
+
return Tr(e.hash.outputLen, e.nByteLength, e.hmac)(P, C);
|
|
2881
2882
|
}
|
|
2882
2883
|
l.BASE._setWindowSize(8);
|
|
2883
2884
|
function rt(p, y, I, P = L) {
|
|
@@ -2928,57 +2929,57 @@ function Ce(t) {
|
|
|
2928
2929
|
if (!Number.isSafeInteger(t) || t < 0)
|
|
2929
2930
|
throw new Error(`Wrong positive integer: ${t}`);
|
|
2930
2931
|
}
|
|
2931
|
-
function
|
|
2932
|
+
function Sc(t) {
|
|
2932
2933
|
if (typeof t != "boolean")
|
|
2933
2934
|
throw new Error(`Expected boolean, not ${t}`);
|
|
2934
2935
|
}
|
|
2935
|
-
function
|
|
2936
|
+
function Nr(t, ...e) {
|
|
2936
2937
|
if (!(t instanceof Uint8Array))
|
|
2937
2938
|
throw new TypeError("Expected Uint8Array");
|
|
2938
2939
|
if (e.length > 0 && !e.includes(t.length))
|
|
2939
2940
|
throw new TypeError(`Expected Uint8Array of length ${e}, not of length=${t.length}`);
|
|
2940
2941
|
}
|
|
2941
|
-
function
|
|
2942
|
+
function Ec(t) {
|
|
2942
2943
|
if (typeof t != "function" || typeof t.create != "function")
|
|
2943
2944
|
throw new Error("Hash should be wrapped by utils.wrapConstructor");
|
|
2944
2945
|
Ce(t.outputLen), Ce(t.blockLen);
|
|
2945
2946
|
}
|
|
2946
|
-
function
|
|
2947
|
+
function Ac(t, e = !0) {
|
|
2947
2948
|
if (t.destroyed)
|
|
2948
2949
|
throw new Error("Hash instance has been destroyed");
|
|
2949
2950
|
if (e && t.finished)
|
|
2950
2951
|
throw new Error("Hash#digest() has already been called");
|
|
2951
2952
|
}
|
|
2952
|
-
function
|
|
2953
|
-
|
|
2953
|
+
function xc(t, e) {
|
|
2954
|
+
Nr(t);
|
|
2954
2955
|
const n = e.outputLen;
|
|
2955
2956
|
if (t.length < n)
|
|
2956
2957
|
throw new Error(`digestInto() expects output buffer of length at least ${n}`);
|
|
2957
2958
|
}
|
|
2958
|
-
const
|
|
2959
|
+
const Yt = {
|
|
2959
2960
|
number: Ce,
|
|
2960
|
-
bool:
|
|
2961
|
-
bytes:
|
|
2962
|
-
hash:
|
|
2963
|
-
exists:
|
|
2964
|
-
output:
|
|
2961
|
+
bool: Sc,
|
|
2962
|
+
bytes: Nr,
|
|
2963
|
+
hash: Ec,
|
|
2964
|
+
exists: Ac,
|
|
2965
|
+
output: xc
|
|
2965
2966
|
}, Ie = typeof globalThis == "object" && "crypto" in globalThis ? globalThis.crypto : void 0;
|
|
2966
2967
|
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
2967
|
-
const
|
|
2968
|
-
if (!
|
|
2968
|
+
const vc = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
|
|
2969
|
+
if (!vc)
|
|
2969
2970
|
throw new Error("Non little-endian hardware is not supported");
|
|
2970
2971
|
Array.from({ length: 256 }, (t, e) => e.toString(16).padStart(2, "0"));
|
|
2971
|
-
function
|
|
2972
|
+
function Ic(t) {
|
|
2972
2973
|
if (typeof t != "string")
|
|
2973
2974
|
throw new TypeError(`utf8ToBytes expected string, got ${typeof t}`);
|
|
2974
2975
|
return new TextEncoder().encode(t);
|
|
2975
2976
|
}
|
|
2976
|
-
function
|
|
2977
|
-
if (typeof t == "string" && (t =
|
|
2977
|
+
function Tc(t) {
|
|
2978
|
+
if (typeof t == "string" && (t = Ic(t)), !(t instanceof Uint8Array))
|
|
2978
2979
|
throw new TypeError(`Expected input type is Uint8Array (got ${typeof t})`);
|
|
2979
2980
|
return t;
|
|
2980
2981
|
}
|
|
2981
|
-
function
|
|
2982
|
+
function Bc(...t) {
|
|
2982
2983
|
if (!t.every((r) => r instanceof Uint8Array))
|
|
2983
2984
|
throw new Error("Uint8Array list expected");
|
|
2984
2985
|
if (t.length === 1)
|
|
@@ -2990,21 +2991,21 @@ function vc(...t) {
|
|
|
2990
2991
|
}
|
|
2991
2992
|
return n;
|
|
2992
2993
|
}
|
|
2993
|
-
class
|
|
2994
|
+
class _c {
|
|
2994
2995
|
// Safe version that clones internal state
|
|
2995
2996
|
clone() {
|
|
2996
2997
|
return this._cloneInto();
|
|
2997
2998
|
}
|
|
2998
2999
|
}
|
|
2999
|
-
function
|
|
3000
|
+
function Nc(t = 32) {
|
|
3000
3001
|
if (Ie && typeof Ie.getRandomValues == "function")
|
|
3001
3002
|
return Ie.getRandomValues(new Uint8Array(t));
|
|
3002
3003
|
throw new Error("crypto.getRandomValues must be defined");
|
|
3003
3004
|
}
|
|
3004
|
-
class
|
|
3005
|
+
class Cr extends _c {
|
|
3005
3006
|
constructor(e, n) {
|
|
3006
|
-
super(), this.finished = !1, this.destroyed = !1,
|
|
3007
|
-
const r =
|
|
3007
|
+
super(), this.finished = !1, this.destroyed = !1, Yt.hash(e);
|
|
3008
|
+
const r = Tc(n);
|
|
3008
3009
|
if (this.iHash = e.create(), typeof this.iHash.update != "function")
|
|
3009
3010
|
throw new TypeError("Expected instance of class which extends utils.Hash");
|
|
3010
3011
|
this.blockLen = this.iHash.blockLen, this.outputLen = this.iHash.outputLen;
|
|
@@ -3018,10 +3019,10 @@ class _r extends Ic {
|
|
|
3018
3019
|
this.oHash.update(o), o.fill(0);
|
|
3019
3020
|
}
|
|
3020
3021
|
update(e) {
|
|
3021
|
-
return
|
|
3022
|
+
return Yt.exists(this), this.iHash.update(e), this;
|
|
3022
3023
|
}
|
|
3023
3024
|
digestInto(e) {
|
|
3024
|
-
|
|
3025
|
+
Yt.exists(this), Yt.bytes(e, this.outputLen), this.finished = !0, this.iHash.digestInto(e), this.oHash.update(e), this.oHash.digestInto(e), this.destroy();
|
|
3025
3026
|
}
|
|
3026
3027
|
digest() {
|
|
3027
3028
|
const e = new Uint8Array(this.oHash.outputLen);
|
|
@@ -3036,61 +3037,61 @@ class _r extends Ic {
|
|
|
3036
3037
|
this.destroyed = !0, this.oHash.destroy(), this.iHash.destroy();
|
|
3037
3038
|
}
|
|
3038
3039
|
}
|
|
3039
|
-
const
|
|
3040
|
-
|
|
3040
|
+
const Or = (t, e, n) => new Cr(t, e).update(n).digest();
|
|
3041
|
+
Or.create = (t, e) => new Cr(t, e);
|
|
3041
3042
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
3042
|
-
function
|
|
3043
|
+
function Cc(t) {
|
|
3043
3044
|
return {
|
|
3044
3045
|
hash: t,
|
|
3045
|
-
hmac: (e, ...n) =>
|
|
3046
|
-
randomBytes:
|
|
3046
|
+
hmac: (e, ...n) => Or(t, e, Bc(...n)),
|
|
3047
|
+
randomBytes: Nc
|
|
3047
3048
|
};
|
|
3048
3049
|
}
|
|
3049
|
-
const Pn = BigInt("3618502788666131213697322783095070105526743751716087489154079457884512865583"),
|
|
3050
|
+
const Pn = BigInt("3618502788666131213697322783095070105526743751716087489154079457884512865583"), kr = 252;
|
|
3050
3051
|
function Rn(t) {
|
|
3051
3052
|
for (; t[0] === 0; )
|
|
3052
3053
|
t = t.subarray(1);
|
|
3053
|
-
const e = t.length * 8 -
|
|
3054
|
+
const e = t.length * 8 - kr, n = X(t);
|
|
3054
3055
|
return e > 0 ? n >> BigInt(e) : n;
|
|
3055
3056
|
}
|
|
3056
|
-
function
|
|
3057
|
-
return typeof t == "string" && (t =
|
|
3057
|
+
function Pr(t) {
|
|
3058
|
+
return typeof t == "string" && (t = Pc(t), t.length & 1 && (t = "0" + t)), pt(t);
|
|
3058
3059
|
}
|
|
3059
|
-
const
|
|
3060
|
+
const Rr = bc({
|
|
3060
3061
|
a: BigInt(1),
|
|
3061
3062
|
b: BigInt("3141592653589793238462643383279502884197169399375105820974944592307816406665"),
|
|
3062
3063
|
Fp: Ke(BigInt("0x800000000000011000000000000000000000000000000000000000000000001")),
|
|
3063
3064
|
n: Pn,
|
|
3064
|
-
nBitLength:
|
|
3065
|
+
nBitLength: kr,
|
|
3065
3066
|
Gx: BigInt("874739451078007766457464989774322083649278607533249481151382481072868806602"),
|
|
3066
3067
|
Gy: BigInt("152666792071518830868575557812948353041420400780739481342941381225525861407"),
|
|
3067
3068
|
h: BigInt(1),
|
|
3068
3069
|
lowS: !1,
|
|
3069
|
-
...
|
|
3070
|
+
...Cc(Ar),
|
|
3070
3071
|
bits2int: Rn,
|
|
3071
3072
|
bits2int_modN: (t) => {
|
|
3072
3073
|
const e = X(t).toString(16);
|
|
3073
|
-
return e.length === 63 && (t =
|
|
3074
|
+
return e.length === 63 && (t = Pr(e + "0")), M(Rn(t), Pn);
|
|
3074
3075
|
}
|
|
3075
3076
|
});
|
|
3076
|
-
function
|
|
3077
|
-
return V("", typeof t == "string" ?
|
|
3077
|
+
function Oc(t) {
|
|
3078
|
+
return V("", typeof t == "string" ? Pr(t) : t);
|
|
3078
3079
|
}
|
|
3079
|
-
const { CURVE:
|
|
3080
|
-
function
|
|
3080
|
+
const { CURVE: Bu, ProjectivePoint: kt, Signature: _u, utils: Nu } = Rr;
|
|
3081
|
+
function kc(t) {
|
|
3081
3082
|
return `0x${ht(t.subarray(1)).replace(/^0+/gm, "")}`;
|
|
3082
3083
|
}
|
|
3083
|
-
function
|
|
3084
|
+
function Pc(t) {
|
|
3084
3085
|
return t.replace(/^0x/i, "");
|
|
3085
3086
|
}
|
|
3086
|
-
const
|
|
3087
|
+
const Dt = [
|
|
3087
3088
|
new kt(2089986280348253421170679821480865132823066470938446095505822317253594081284n, 1713931329540660377023406109199410414810705867260802078187082345529207694986n, 1n),
|
|
3088
3089
|
new kt(996781205833008774514500082376783249102396023663454813447423147977397232763n, 1668503676786377725805489344771023921079126552019160156920634619255970485781n, 1n),
|
|
3089
3090
|
new kt(2251563274489750535117886426533222435294046428347329203627021249169616184184n, 1798716007562728905295480679789526322175868328062420237419143593021674992973n, 1n),
|
|
3090
3091
|
new kt(2138414695194151160943305727036575959195309218611738193261179310511854807447n, 113410276730064486255102093846540133784865286929052426931474106396135072156n, 1n),
|
|
3091
3092
|
new kt(2379962749567351885752724891227938183011949129833673362440656643086021394946n, 776496453633298175483985398648758586525933812536653089401905292063708816422n, 1n)
|
|
3092
3093
|
];
|
|
3093
|
-
function
|
|
3094
|
+
function $r(t, e) {
|
|
3094
3095
|
const n = [];
|
|
3095
3096
|
let r = t;
|
|
3096
3097
|
for (let s = 0; s < 248; s++)
|
|
@@ -3100,8 +3101,8 @@ function Pr(t, e) {
|
|
|
3100
3101
|
n.push(r), r = r.double();
|
|
3101
3102
|
return n;
|
|
3102
3103
|
}
|
|
3103
|
-
const
|
|
3104
|
-
function
|
|
3104
|
+
const Rc = $r(Dt[1], Dt[2]), $c = $r(Dt[3], Dt[4]);
|
|
3105
|
+
function Fc(t) {
|
|
3105
3106
|
let e;
|
|
3106
3107
|
if (typeof t == "bigint")
|
|
3107
3108
|
e = t;
|
|
@@ -3110,13 +3111,13 @@ function Pc(t) {
|
|
|
3110
3111
|
throw new Error(`Invalid pedersenArg: ${t}`);
|
|
3111
3112
|
e = BigInt(t);
|
|
3112
3113
|
} else
|
|
3113
|
-
e = X(
|
|
3114
|
-
if (!(0n <= e && e <
|
|
3114
|
+
e = X(Oc(t));
|
|
3115
|
+
if (!(0n <= e && e < Rr.CURVE.Fp.ORDER))
|
|
3115
3116
|
throw new Error(`PedersenArg should be 0 <= value < CURVE.P: ${e}`);
|
|
3116
3117
|
return e;
|
|
3117
3118
|
}
|
|
3118
3119
|
function $n(t, e, n) {
|
|
3119
|
-
let r =
|
|
3120
|
+
let r = Fc(e);
|
|
3120
3121
|
for (let s = 0; s < 252; s++) {
|
|
3121
3122
|
const o = n[s];
|
|
3122
3123
|
if (o.equals(t))
|
|
@@ -3125,33 +3126,33 @@ function $n(t, e, n) {
|
|
|
3125
3126
|
}
|
|
3126
3127
|
return t;
|
|
3127
3128
|
}
|
|
3128
|
-
function
|
|
3129
|
-
let n =
|
|
3130
|
-
return n = $n(n, t,
|
|
3129
|
+
function Uc(t, e) {
|
|
3130
|
+
let n = Dt[0];
|
|
3131
|
+
return n = $n(n, t, Rc), n = $n(n, e, $c), kc(n.toRawBytes(!0));
|
|
3131
3132
|
}
|
|
3132
|
-
const
|
|
3133
|
+
const jc = pe(250), Lc = (t) => X(Di(t)) & jc;
|
|
3133
3134
|
Ke(BigInt("14474011154664525231415395255581126252639794253786371766033694892385558855681"));
|
|
3134
|
-
const
|
|
3135
|
-
function
|
|
3136
|
-
const r = t.fromBytes(
|
|
3135
|
+
const Dc = Ke(BigInt("3618502788666131213697322783095070105623107215331596699973092056135872020481"));
|
|
3136
|
+
function Hc(t, e, n) {
|
|
3137
|
+
const r = t.fromBytes(Ar(gr(`${e}${n}`)));
|
|
3137
3138
|
return t.create(r);
|
|
3138
3139
|
}
|
|
3139
|
-
const
|
|
3140
|
+
const Vc = [
|
|
3140
3141
|
[3, 1, 1],
|
|
3141
3142
|
[1, -1, 1],
|
|
3142
3143
|
[1, 1, -2]
|
|
3143
3144
|
].map((t) => t.map(BigInt));
|
|
3144
|
-
function
|
|
3145
|
+
function Mc(t, e) {
|
|
3145
3146
|
if (qe(t.Fp), !Number.isSafeInteger(t.rate) || !Number.isSafeInteger(t.capacity))
|
|
3146
3147
|
throw new Error(`Wrong poseidon opts: ${t}`);
|
|
3147
3148
|
const n = t.rate + t.capacity, r = t.roundsFull + t.roundsPartial, s = [];
|
|
3148
3149
|
for (let a = 0; a < r; a++) {
|
|
3149
3150
|
const i = [];
|
|
3150
3151
|
for (let c = 0; c < n; c++)
|
|
3151
|
-
i.push(
|
|
3152
|
+
i.push(Hc(t.Fp, "Hades", n * a + c));
|
|
3152
3153
|
s.push(i);
|
|
3153
3154
|
}
|
|
3154
|
-
const o =
|
|
3155
|
+
const o = dc({
|
|
3155
3156
|
...t,
|
|
3156
3157
|
t: n,
|
|
3157
3158
|
sboxPower: 3,
|
|
@@ -3161,14 +3162,14 @@ function Dc(t, e) {
|
|
|
3161
3162
|
});
|
|
3162
3163
|
return o.m = n, o.rate = t.rate, o.capacity = t.capacity, o;
|
|
3163
3164
|
}
|
|
3164
|
-
|
|
3165
|
+
Mc({ Fp: Dc, rate: 2, capacity: 1, roundsFull: 8, roundsPartial: 83 }, Vc);
|
|
3165
3166
|
var Oe;
|
|
3166
3167
|
(function(t) {
|
|
3167
3168
|
t.NOT_STARTED = "NOT_STARTED", t.ONGOING = "ONGOING", t.AWAITING_FUNDS = "AWAITING_FUNDS", t.AWAITING_COMPLETION = "AWAITING_COMPLETION", t.COMPLETED = "COMPLETED", t.CANCELLED = "CANCELLED", t.ERROR = "ERROR";
|
|
3168
3169
|
})(Oe || (Oe = {}));
|
|
3169
|
-
const
|
|
3170
|
+
const Gc = h.object({
|
|
3170
3171
|
recoveryId: h.number()
|
|
3171
|
-
}),
|
|
3172
|
+
}), Cu = h.object({
|
|
3172
3173
|
feeToken: se,
|
|
3173
3174
|
signerSignature: h.object({
|
|
3174
3175
|
type: h.literal("StarknetKey"),
|
|
@@ -3178,25 +3179,25 @@ const Hc = h.object({
|
|
|
3178
3179
|
s: Pt
|
|
3179
3180
|
})
|
|
3180
3181
|
})
|
|
3181
|
-
}),
|
|
3182
|
+
}), zc = h.nativeEnum(Oe), Fr = h.object({
|
|
3182
3183
|
recoveryId: h.number(),
|
|
3183
|
-
status:
|
|
3184
|
+
status: zc,
|
|
3184
3185
|
completionTime: h.array(h.number()).optional()
|
|
3185
|
-
}),
|
|
3186
|
-
activeRecovery:
|
|
3186
|
+
}), qc = h.object({
|
|
3187
|
+
activeRecovery: Fr.optional().or(h.null()).optional(),
|
|
3187
3188
|
minFees: h.record(h.number()).optional()
|
|
3188
|
-
}),
|
|
3189
|
-
recovery:
|
|
3189
|
+
}), Wc = h.object({
|
|
3190
|
+
recovery: Fr.optional().or(h.null()).optional(),
|
|
3190
3191
|
minFees: h.record(h.number()).optional()
|
|
3191
3192
|
});
|
|
3192
3193
|
var ke;
|
|
3193
3194
|
(function(t) {
|
|
3194
3195
|
t.UNDEPLOYED_ACCOUNT = "undeployedAccount", t.NOT_ENOUGH_TO_PAY_FEES = "notEnoughToPayFees", t.RECOVERY_ALREADY_EXISTS = "recoveryAlreadyExists";
|
|
3195
3196
|
})(ke || (ke = {}));
|
|
3196
|
-
const
|
|
3197
|
-
status:
|
|
3197
|
+
const Kc = h.nativeEnum(ke), Ou = h.object({
|
|
3198
|
+
status: Kc
|
|
3198
3199
|
});
|
|
3199
|
-
class
|
|
3200
|
+
class ku {
|
|
3200
3201
|
constructor(e, n) {
|
|
3201
3202
|
this.apiBase = e, this.httpService = n;
|
|
3202
3203
|
}
|
|
@@ -3208,7 +3209,7 @@ class Bu {
|
|
|
3208
3209
|
* @returns A promise that resolves to the on-chain recovery details.
|
|
3209
3210
|
*/
|
|
3210
3211
|
async getRecovery(e, n) {
|
|
3211
|
-
const r = k(this.apiBase, "accounts", "starknet", e, "recovery", `${n}`), s = await this.httpService.get(r), o =
|
|
3212
|
+
const r = k(this.apiBase, "accounts", "starknet", e, "recovery", `${n}`), s = await this.httpService.get(r), o = Wc.safeParse(s);
|
|
3212
3213
|
return o.error ? null : o.data;
|
|
3213
3214
|
}
|
|
3214
3215
|
/**
|
|
@@ -3218,7 +3219,7 @@ class Bu {
|
|
|
3218
3219
|
* @returns A promise that resolves to the on-chain recovery details.
|
|
3219
3220
|
*/
|
|
3220
3221
|
async getActiveRecovery(e) {
|
|
3221
|
-
const n = k(this.apiBase, "accounts", "starknet", e, "recovery"), r = await this.httpService.get(n), s =
|
|
3222
|
+
const n = k(this.apiBase, "accounts", "starknet", e, "recovery"), r = await this.httpService.get(n), s = qc.safeParse(r);
|
|
3222
3223
|
return s.error ? null : s.data;
|
|
3223
3224
|
}
|
|
3224
3225
|
/**
|
|
@@ -3230,7 +3231,7 @@ class Bu {
|
|
|
3230
3231
|
* @returns A promise that resolves to the recovery details.
|
|
3231
3232
|
*/
|
|
3232
3233
|
async startRecovery(e, n, r, s) {
|
|
3233
|
-
const { r: o, s: a } =
|
|
3234
|
+
const { r: o, s: a } = us.starkCurve.sign(Uc(Lc(ys("utf8", "starknet:recovery")), r), s), i = {
|
|
3234
3235
|
feeToken: n,
|
|
3235
3236
|
signerSignature: {
|
|
3236
3237
|
type: "StarknetKey",
|
|
@@ -3243,7 +3244,7 @@ class Bu {
|
|
|
3243
3244
|
};
|
|
3244
3245
|
return await this.httpService.post(`${this.apiBase}/accounts/starknet/${e}/recovery`, {
|
|
3245
3246
|
body: JSON.stringify(i)
|
|
3246
|
-
},
|
|
3247
|
+
}, Gc);
|
|
3247
3248
|
}
|
|
3248
3249
|
/**
|
|
3249
3250
|
* Completes the recovery process for a given address and recovery ID.
|
|
@@ -3257,7 +3258,7 @@ class Bu {
|
|
|
3257
3258
|
return await this.httpService.post(r);
|
|
3258
3259
|
}
|
|
3259
3260
|
}
|
|
3260
|
-
async function
|
|
3261
|
+
async function Pu() {
|
|
3261
3262
|
if ("brave" in navigator)
|
|
3262
3263
|
try {
|
|
3263
3264
|
return await navigator.brave.isBrave();
|
|
@@ -3266,25 +3267,25 @@ async function _u() {
|
|
|
3266
3267
|
return !1;
|
|
3267
3268
|
}
|
|
3268
3269
|
let Te;
|
|
3269
|
-
function
|
|
3270
|
-
return Te || (Te = new
|
|
3270
|
+
function Zc() {
|
|
3271
|
+
return Te || (Te = new bs(navigator.userAgent).getResult()), Te;
|
|
3271
3272
|
}
|
|
3272
3273
|
function me(t) {
|
|
3273
|
-
return
|
|
3274
|
+
return Zc().browser.name === t;
|
|
3274
3275
|
}
|
|
3275
|
-
function
|
|
3276
|
+
function Ru() {
|
|
3276
3277
|
return me("Firefox");
|
|
3277
3278
|
}
|
|
3278
|
-
function
|
|
3279
|
+
function $u() {
|
|
3279
3280
|
return me("Chrome");
|
|
3280
3281
|
}
|
|
3281
|
-
function
|
|
3282
|
+
function Fu() {
|
|
3282
3283
|
return me("Safari");
|
|
3283
3284
|
}
|
|
3284
|
-
function
|
|
3285
|
+
function Uu() {
|
|
3285
3286
|
return me("Edge");
|
|
3286
3287
|
}
|
|
3287
|
-
const
|
|
3288
|
+
const ju = h.string().refine((t) => Ss(t, Es), "Invalid seedphrase"), Ze = [
|
|
3288
3289
|
{
|
|
3289
3290
|
address: "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
|
|
3290
3291
|
name: "Ether",
|
|
@@ -3461,26 +3462,26 @@ const Pu = h.string().refine((t) => ys(t, bs), "Invalid seedphrase"), Ze = [
|
|
|
3461
3462
|
networkId: "mainnet-alpha",
|
|
3462
3463
|
image: "https://dv3jj1unlp2jl.cloudfront.net/128/color/ekubo.png"
|
|
3463
3464
|
}
|
|
3464
|
-
],
|
|
3465
|
+
], Yc = async (t, e, n) => {
|
|
3465
3466
|
const r = await n.callContract({
|
|
3466
3467
|
contractAddress: t,
|
|
3467
3468
|
entrypoint: "balanceOf",
|
|
3468
3469
|
calldata: [e]
|
|
3469
3470
|
});
|
|
3470
|
-
return BigInt(O.toHex(
|
|
3471
|
+
return BigInt(O.toHex(Ht.uint256ToBN({
|
|
3471
3472
|
low: r[0],
|
|
3472
3473
|
high: r[1]
|
|
3473
3474
|
})));
|
|
3474
|
-
},
|
|
3475
|
+
}, Lu = async (t, e, n) => {
|
|
3475
3476
|
const r = Ze.filter((o) => o.networkId === t);
|
|
3476
3477
|
return (await Promise.allSettled(r.map((o) => e.callContract({
|
|
3477
3478
|
contractAddress: o.address,
|
|
3478
3479
|
entrypoint: "balanceOf",
|
|
3479
3480
|
calldata: [n]
|
|
3480
3481
|
})))).reduce((o, a, i) => {
|
|
3481
|
-
if (a.status === "fulfilled" &&
|
|
3482
|
+
if (a.status === "fulfilled" && ms(a.value) || a.status === "rejected" || a.value[0] === "0x0" && a.value[1] === "0x0")
|
|
3482
3483
|
return o;
|
|
3483
|
-
const c = BigInt(O.toHex(
|
|
3484
|
+
const c = BigInt(O.toHex(Ht.uint256ToBN({
|
|
3484
3485
|
low: a.value[0],
|
|
3485
3486
|
high: a.value[1]
|
|
3486
3487
|
}))), l = {
|
|
@@ -3489,44 +3490,44 @@ const Pu = h.string().refine((t) => ys(t, bs), "Invalid seedphrase"), Ze = [
|
|
|
3489
3490
|
};
|
|
3490
3491
|
return o.push(l), o;
|
|
3491
3492
|
}, []);
|
|
3492
|
-
},
|
|
3493
|
+
}, Du = async () => Ze, Hu = ({ address: t, networkId: e }) => Ze.find((r) => r.address === t && r.networkId === e), Vu = ({ amount: t, decimals: e, unitCurrencyValue: n }) => {
|
|
3493
3494
|
if (!Y(t) || !Y(e) || !Y(n))
|
|
3494
3495
|
return;
|
|
3495
3496
|
const r = Number(e), s = BigInt(t) * je(n.toString()).value;
|
|
3496
|
-
return
|
|
3497
|
+
return Mt({
|
|
3497
3498
|
value: s,
|
|
3498
|
-
decimals: r +
|
|
3499
|
+
decimals: r + Vt
|
|
3499
3500
|
});
|
|
3500
|
-
},
|
|
3501
|
+
}, Mu = ({ unitAmount: t, decimals: e }) => {
|
|
3501
3502
|
if (t === void 0 || !Y(t) || e === void 0 || !Y(e))
|
|
3502
3503
|
return;
|
|
3503
3504
|
const n = Number(e);
|
|
3504
3505
|
return xt(t.toString(), n).value.toString();
|
|
3505
|
-
},
|
|
3506
|
+
}, Gu = (t) => Y(t) ? Number(t) : 18, { UINT_256_MAX: Xc } = Ht, Jc = (t) => String(t) === String(Xc), zu = (t, e = "$", n) => {
|
|
3506
3507
|
if (t === void 0 || !Y(t))
|
|
3507
3508
|
return null;
|
|
3508
|
-
const r =
|
|
3509
|
+
const r = gi(t, n);
|
|
3509
3510
|
return [e, r].filter(Boolean).join("");
|
|
3510
|
-
},
|
|
3511
|
+
}, Qc = "Unlimited", qu = ({ amount: t, decimals: e, symbol: n, showPlusSign: r = !1, withSymbol: s = !0, unlimitedText: o = Qc, prettyConfigOverrides: a }) => {
|
|
3511
3512
|
if (!Y(t))
|
|
3512
3513
|
return null;
|
|
3513
3514
|
let i, c = !1;
|
|
3514
|
-
if (
|
|
3515
|
+
if (Jc(t))
|
|
3515
3516
|
i = o;
|
|
3516
3517
|
else {
|
|
3517
3518
|
const d = Number(e), u = BigInt(t);
|
|
3518
3519
|
c = u > 0n;
|
|
3519
|
-
const w = d > 0 ?
|
|
3520
|
-
i = d > 0 ?
|
|
3520
|
+
const w = d > 0 ? Mt({ value: u, decimals: d }) : u.toString();
|
|
3521
|
+
i = d > 0 ? wi(w, a) : w;
|
|
3521
3522
|
}
|
|
3522
3523
|
const l = [i, s && n].filter(Boolean).join(" ");
|
|
3523
3524
|
return r && c ? `+${l}` : l;
|
|
3524
3525
|
};
|
|
3525
|
-
var
|
|
3526
|
-
function
|
|
3526
|
+
var tl = Jr, el = tl;
|
|
3527
|
+
function nl(t, e) {
|
|
3527
3528
|
function n(r, s) {
|
|
3528
3529
|
var o = e || {}, a;
|
|
3529
|
-
"randomize" in o || (o.randomize = !0), a =
|
|
3530
|
+
"randomize" in o || (o.randomize = !0), a = el.operation(o);
|
|
3530
3531
|
function i(d) {
|
|
3531
3532
|
s(d || new Error("Aborted"));
|
|
3532
3533
|
}
|
|
@@ -3553,9 +3554,9 @@ function Qc(t, e) {
|
|
|
3553
3554
|
}
|
|
3554
3555
|
return new Promise(n);
|
|
3555
3556
|
}
|
|
3556
|
-
var
|
|
3557
|
-
const
|
|
3558
|
-
class
|
|
3557
|
+
var rl = nl;
|
|
3558
|
+
const sl = /* @__PURE__ */ Qr(rl);
|
|
3559
|
+
class Wu {
|
|
3559
3560
|
constructor(e, n) {
|
|
3560
3561
|
this.apiBase = e, this.httpService = n, this.TOKENS_INFO_URL = "/tokens/info", this.TOKENS_DEFI_DECOMPOSITION_URL = "/tokens/defi/decomposition";
|
|
3561
3562
|
}
|
|
@@ -3565,10 +3566,10 @@ class Vu {
|
|
|
3565
3566
|
* @returns {Promise<ApiTokenInfo[]>} - The fetched tokens or undefined if there was an error or not default network
|
|
3566
3567
|
*/
|
|
3567
3568
|
async fetchTokensInfoFromBackend(e) {
|
|
3568
|
-
const n = k(this.apiBase, this.TOKENS_INFO_URL, e ?? "", "?chain=starknet"), r = await this.httpService.get(n), s =
|
|
3569
|
+
const n = k(this.apiBase, this.TOKENS_INFO_URL, e ?? "", "?chain=starknet"), r = await this.httpService.get(n), s = ts.safeParse(r);
|
|
3569
3570
|
if (s.success)
|
|
3570
3571
|
return s.data.tokens;
|
|
3571
|
-
const o =
|
|
3572
|
+
const o = es.safeParse(r);
|
|
3572
3573
|
if (o.success)
|
|
3573
3574
|
return [o.data];
|
|
3574
3575
|
}
|
|
@@ -3579,7 +3580,7 @@ class Vu {
|
|
|
3579
3580
|
*/
|
|
3580
3581
|
async fetchAddressTokenBalancesFromBackend(e, n, r) {
|
|
3581
3582
|
const s = k(this.apiBase, "activity", "starknet", n, "account", e, "balance");
|
|
3582
|
-
return (await
|
|
3583
|
+
return (await sl(
|
|
3583
3584
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3584
3585
|
async (i) => {
|
|
3585
3586
|
let c;
|
|
@@ -3588,7 +3589,7 @@ class Vu {
|
|
|
3588
3589
|
} catch {
|
|
3589
3590
|
return i(new Error("Error fetching")), [];
|
|
3590
3591
|
}
|
|
3591
|
-
const l =
|
|
3592
|
+
const l = ns.safeParse(c);
|
|
3592
3593
|
if (!l.success)
|
|
3593
3594
|
return i(new Error("Error parsing response")), [];
|
|
3594
3595
|
if (l.data.status !== "initialised")
|
|
@@ -3609,46 +3610,46 @@ class Vu {
|
|
|
3609
3610
|
}
|
|
3610
3611
|
async fetchDefiDecomposition(e) {
|
|
3611
3612
|
const n = k(this.apiBase, this.TOKENS_DEFI_DECOMPOSITION_URL, e, "?chain=starknet"), r = await this.httpService.get(n);
|
|
3612
|
-
if (!
|
|
3613
|
-
throw new
|
|
3613
|
+
if (!rs.safeParse(r).success)
|
|
3614
|
+
throw new ss({ code: "TOKEN_DEFI_DECOMPOSITION_PARSING_ERROR" });
|
|
3614
3615
|
return r.dapps;
|
|
3615
3616
|
}
|
|
3616
3617
|
}
|
|
3617
|
-
const
|
|
3618
|
+
const Ku = (t, e, n, r) => ({
|
|
3618
3619
|
contractAddress: t,
|
|
3619
3620
|
entrypoint: "transfer",
|
|
3620
3621
|
calldata: mt.compile({
|
|
3621
3622
|
recipient: e,
|
|
3622
|
-
amount:
|
|
3623
|
+
amount: jt(yi(n, r))
|
|
3623
3624
|
})
|
|
3624
|
-
}),
|
|
3625
|
+
}), Zu = (t, e, n, r) => ({
|
|
3625
3626
|
contractAddress: t,
|
|
3626
3627
|
entrypoint: "transferFrom",
|
|
3627
3628
|
calldata: mt.compile({
|
|
3628
3629
|
from_: e,
|
|
3629
3630
|
to: n,
|
|
3630
|
-
tokenId:
|
|
3631
|
+
tokenId: jt(r)
|
|
3631
3632
|
// OZ specs need a uint256 as tokenId
|
|
3632
3633
|
})
|
|
3633
|
-
}),
|
|
3634
|
+
}), Yu = (t, e, n, r) => ({
|
|
3634
3635
|
contractAddress: t,
|
|
3635
3636
|
entrypoint: "safeTransferFrom",
|
|
3636
3637
|
calldata: mt.compile({
|
|
3637
3638
|
from_: e,
|
|
3638
3639
|
to: n,
|
|
3639
|
-
tokenId:
|
|
3640
|
-
amount:
|
|
3640
|
+
tokenId: jt(r),
|
|
3641
|
+
amount: jt(1),
|
|
3641
3642
|
data_len: "0"
|
|
3642
3643
|
})
|
|
3643
3644
|
});
|
|
3644
|
-
function
|
|
3645
|
+
function Ur(t) {
|
|
3645
3646
|
return $e(t.unit) === "WEI";
|
|
3646
3647
|
}
|
|
3647
|
-
function
|
|
3648
|
+
function ol(t) {
|
|
3648
3649
|
return $e(t.unit) === "FRI";
|
|
3649
3650
|
}
|
|
3650
3651
|
function At(t, e) {
|
|
3651
|
-
return
|
|
3652
|
+
return Ur(t) ? {
|
|
3652
3653
|
...t,
|
|
3653
3654
|
maxFee: e(t.maxFee),
|
|
3654
3655
|
overallFee: e(t.overallFee),
|
|
@@ -3664,7 +3665,7 @@ function At(t, e) {
|
|
|
3664
3665
|
};
|
|
3665
3666
|
}
|
|
3666
3667
|
function Rt(t) {
|
|
3667
|
-
return
|
|
3668
|
+
return Ur(t) ? {
|
|
3668
3669
|
maxFee: t.maxFee
|
|
3669
3670
|
} : {
|
|
3670
3671
|
amount: t.maxAmount,
|
|
@@ -3672,13 +3673,13 @@ function Rt(t) {
|
|
|
3672
3673
|
};
|
|
3673
3674
|
}
|
|
3674
3675
|
function Be(t) {
|
|
3675
|
-
return
|
|
3676
|
+
return ol({ unit: t }) ? Re : Vn;
|
|
3676
3677
|
}
|
|
3677
|
-
function
|
|
3678
|
+
function Xu(t, e, n = 2) {
|
|
3678
3679
|
const r = BigInt(10 ** n), s = BigInt(Math.round(e * 10 ** n));
|
|
3679
3680
|
return t * s / r;
|
|
3680
3681
|
}
|
|
3681
|
-
const
|
|
3682
|
+
const Ju = [Re], jr = (t, e = ul) => {
|
|
3682
3683
|
if (t.max && "amount" in t.max)
|
|
3683
3684
|
return {
|
|
3684
3685
|
...t,
|
|
@@ -3687,7 +3688,7 @@ const Wu = [Re], Fr = (t, e = il) => {
|
|
|
3687
3688
|
const n = 10000n, { amount: r, pricePerUnit: s, dataGasConsumed: o = 0n, dataGasPrice: a = 0n } = t, i = r * s + o * a;
|
|
3688
3689
|
if (i < 0)
|
|
3689
3690
|
throw Error("Cannot calculate max fee for negative fee");
|
|
3690
|
-
const c = O.toBigInt(
|
|
3691
|
+
const c = O.toBigInt(is({ estimatedFee: i })), l = Number(c) / Number(i), d = e(l), u = BigInt(Math.trunc(d * Number(n)));
|
|
3691
3692
|
return {
|
|
3692
3693
|
...t,
|
|
3693
3694
|
amount: r * u / n,
|
|
@@ -3698,38 +3699,38 @@ const Wu = [Re], Fr = (t, e = il) => {
|
|
|
3698
3699
|
}, re = (t) => {
|
|
3699
3700
|
const { amount: e, pricePerUnit: n, dataGasConsumed: r = 0n, dataGasPrice: s = 0n } = t;
|
|
3700
3701
|
return e * n + r * s;
|
|
3701
|
-
},
|
|
3702
|
+
}, al = (t) => {
|
|
3702
3703
|
if (t.max)
|
|
3703
3704
|
return "maxFee" in t.max ? t.max.maxFee : re(t.max);
|
|
3704
3705
|
}, Pe = (t) => {
|
|
3705
|
-
const e =
|
|
3706
|
-
return e || re(
|
|
3707
|
-
},
|
|
3706
|
+
const e = al(t);
|
|
3707
|
+
return e || re(jr(t));
|
|
3708
|
+
}, Qu = (t) => {
|
|
3708
3709
|
if (t.deployment && !nt(t.deployment.feeTokenAddress, t.transactions.feeTokenAddress))
|
|
3709
3710
|
throw Error("Cannot calculate estimated fees for different tokens");
|
|
3710
3711
|
const e = re(t.transactions), n = t.deployment ? re(t.deployment) : 0n;
|
|
3711
3712
|
return e + n;
|
|
3712
|
-
},
|
|
3713
|
+
}, td = (t) => {
|
|
3713
3714
|
if (t.deployment && !nt(t.deployment.feeTokenAddress, t.transactions.feeTokenAddress))
|
|
3714
3715
|
throw Error("Cannot calculate estimated fees for different tokens");
|
|
3715
3716
|
const e = t.deployment ? Pe(t.deployment) : 0n, n = Pe(t.transactions);
|
|
3716
3717
|
return e + n;
|
|
3717
|
-
},
|
|
3718
|
+
}, ed = (t, e) => [
|
|
3718
3719
|
{
|
|
3719
3720
|
contractAddress: t,
|
|
3720
3721
|
entrypoint: "transfer",
|
|
3721
|
-
calldata: mt.compile(
|
|
3722
|
+
calldata: mt.compile(os.parse({
|
|
3722
3723
|
// We are using a dummy address (ETH here) as recipient to estimate the fee given we don't have a receipient yet
|
|
3723
3724
|
recipient: e,
|
|
3724
3725
|
// We are using the smallest possible amount to make sure this doesn't throw an error
|
|
3725
|
-
amount:
|
|
3726
|
+
amount: Ht.bnToUint256(BigInt(1))
|
|
3726
3727
|
}))
|
|
3727
3728
|
}
|
|
3728
|
-
],
|
|
3729
|
+
], il = (t, e) => {
|
|
3729
3730
|
if (!t)
|
|
3730
3731
|
return {
|
|
3731
3732
|
transactions: {
|
|
3732
|
-
feeTokenAddress: e ??
|
|
3733
|
+
feeTokenAddress: e ?? Vn,
|
|
3733
3734
|
amount: 0n,
|
|
3734
3735
|
pricePerUnit: 0n,
|
|
3735
3736
|
dataGasConsumed: 0n,
|
|
@@ -3773,7 +3774,7 @@ const Wu = [Re], Fr = (t, e = il) => {
|
|
|
3773
3774
|
};
|
|
3774
3775
|
}
|
|
3775
3776
|
throw Error("Unexpected simulation response length");
|
|
3776
|
-
},
|
|
3777
|
+
}, cl = ({ transaction: t, nonce: e, chainId: n, version: r, isDeploymentTransaction: s, cairoVersion: o, address: a, appDomain: i }) => {
|
|
3777
3778
|
let c = e;
|
|
3778
3779
|
s && t.type !== "DEPLOY_ACCOUNT" && (c = O.toHex(1));
|
|
3779
3780
|
const l = oe(t.calls);
|
|
@@ -3792,15 +3793,15 @@ const Wu = [Re], Fr = (t, e = il) => {
|
|
|
3792
3793
|
appDomain: i
|
|
3793
3794
|
// appDomain: "https://starknetkit-blacked-listed.vercel.app", // to simulate blacklisted domain
|
|
3794
3795
|
};
|
|
3795
|
-
},
|
|
3796
|
+
}, ll = (t, e) => {
|
|
3796
3797
|
const { transactions: n } = t, r = n.map((c) => {
|
|
3797
3798
|
if (!c.simulation)
|
|
3798
|
-
throw new
|
|
3799
|
+
throw new as({ code: "SIMULATE_AND_REVIEW_FAILED" });
|
|
3799
3800
|
return c;
|
|
3800
3801
|
}), s = r.map((c) => ({
|
|
3801
3802
|
...c.simulation,
|
|
3802
3803
|
feeEstimation: At(c.simulation.feeEstimation, Number)
|
|
3803
|
-
})), o =
|
|
3804
|
+
})), o = il(s, e), [a, i] = r.length === 1 ? [r[0], void 0] : [r[1], r[0]];
|
|
3804
3805
|
return {
|
|
3805
3806
|
...o,
|
|
3806
3807
|
transactions: {
|
|
@@ -3816,8 +3817,8 @@ const Wu = [Re], Fr = (t, e = il) => {
|
|
|
3816
3817
|
max: Rt(At(i.simulation.feeEstimation, O.toBigInt))
|
|
3817
3818
|
} : void 0
|
|
3818
3819
|
};
|
|
3819
|
-
},
|
|
3820
|
-
const e =
|
|
3820
|
+
}, nd = (t) => {
|
|
3821
|
+
const e = jr(t), n = Pe(t);
|
|
3821
3822
|
return {
|
|
3822
3823
|
// for v1 transactions
|
|
3823
3824
|
maxFee: n,
|
|
@@ -3835,31 +3836,31 @@ const Wu = [Re], Fr = (t, e = il) => {
|
|
|
3835
3836
|
}
|
|
3836
3837
|
}
|
|
3837
3838
|
};
|
|
3838
|
-
},
|
|
3839
|
+
}, rd = (t) => {
|
|
3839
3840
|
const e = Math.sqrt(t);
|
|
3840
3841
|
return isNaN(e) ? Math.sqrt(2) : e;
|
|
3841
|
-
},
|
|
3842
|
+
}, ul = (t) => {
|
|
3842
3843
|
const e = Math.cbrt(t);
|
|
3843
3844
|
return isNaN(e) ? Math.cbrt(2) : e;
|
|
3844
|
-
},
|
|
3845
|
+
}, sd = (t) => t < 1 || isNaN(t) ? 1.1 : Math.log(t + 1) + 1, dl = [Re];
|
|
3845
3846
|
function Ye({ address: t }) {
|
|
3846
|
-
return
|
|
3847
|
+
return dl.some((e) => nt(t, e));
|
|
3847
3848
|
}
|
|
3848
|
-
function
|
|
3849
|
-
return t ?
|
|
3849
|
+
function od(t) {
|
|
3850
|
+
return t ? Aa().some((e) => nt(e, t)) : !1;
|
|
3850
3851
|
}
|
|
3851
3852
|
function Fn(t) {
|
|
3852
3853
|
return Ye({
|
|
3853
3854
|
address: t
|
|
3854
3855
|
}) ? Z.TRANSACTION_VERSION.V3 : Z.TRANSACTION_VERSION.V1;
|
|
3855
3856
|
}
|
|
3856
|
-
function
|
|
3857
|
+
function ad(t) {
|
|
3857
3858
|
return Ye({ address: t }) ? Z.TRANSACTION_VERSION.F3 : Z.TRANSACTION_VERSION.F1;
|
|
3858
3859
|
}
|
|
3859
|
-
function
|
|
3860
|
-
return
|
|
3860
|
+
function id(t, e) {
|
|
3861
|
+
return ds(e.contract) ? Ye({ address: t }) ? Z.TRANSACTION_VERSION.V3 : Z.TRANSACTION_VERSION.V2 : Z.TRANSACTION_VERSION.V1;
|
|
3861
3862
|
}
|
|
3862
|
-
class
|
|
3863
|
+
class cd {
|
|
3863
3864
|
constructor(e, n) {
|
|
3864
3865
|
this.apiBase = e, this.httpService = n;
|
|
3865
3866
|
}
|
|
@@ -3886,7 +3887,7 @@ class rd {
|
|
|
3886
3887
|
throw new Error("MISSING_METHOD");
|
|
3887
3888
|
const i = Fn(r), c = a ? "0x0" : await e.getNonce(), l = await e.getChainId(), d = {
|
|
3888
3889
|
transactions: n.map((f) => ({
|
|
3889
|
-
...
|
|
3890
|
+
...cl({
|
|
3890
3891
|
transaction: f,
|
|
3891
3892
|
nonce: c,
|
|
3892
3893
|
version: i,
|
|
@@ -3904,10 +3905,10 @@ class rd {
|
|
|
3904
3905
|
"Content-Type": "application/json"
|
|
3905
3906
|
},
|
|
3906
3907
|
body: JSON.stringify(d)
|
|
3907
|
-
},
|
|
3908
|
-
if (w.transactions.some((f) =>
|
|
3908
|
+
}, cs);
|
|
3909
|
+
if (w.transactions.some((f) => ls(f)))
|
|
3909
3910
|
return w;
|
|
3910
|
-
const S =
|
|
3911
|
+
const S = ll(w, r);
|
|
3911
3912
|
return {
|
|
3912
3913
|
...w,
|
|
3913
3914
|
enrichedFeeEstimation: S
|
|
@@ -4030,36 +4031,36 @@ class rd {
|
|
|
4030
4031
|
}
|
|
4031
4032
|
}
|
|
4032
4033
|
}
|
|
4033
|
-
const
|
|
4034
|
+
const ld = [
|
|
4034
4035
|
"account-upgrade",
|
|
4035
4036
|
"approve",
|
|
4036
4037
|
"set-approval-for-all",
|
|
4037
4038
|
"swap",
|
|
4038
4039
|
"transfer"
|
|
4039
|
-
],
|
|
4040
|
+
], ud = (t) => ({ showBalanceChange: vt(() => {
|
|
4040
4041
|
const n = t == null ? void 0 : t.some((s) => !un(s.transfers)), r = t == null ? void 0 : t.some((s) => !un(s.approvals));
|
|
4041
4042
|
return t && (n || r);
|
|
4042
|
-
}, [t]) }), ge = (t) => t ? t.filter((e) => e.token.type === "erc20") : [],
|
|
4043
|
+
}, [t]) }), ge = (t) => t ? t.filter((e) => e.token.type === "erc20") : [], dd = (t) => vt(() => ge(t), [t]), fd = (t) => ge(t).length > 0, hd = (t) => ge(t).some((n) => n.amount > 0n), pd = (t) => ge(t).some((n) => n.amount < 0n), Lr = (t) => t ? t.filter((e) => e.token.type === "erc721") : [], md = (t) => vt(() => Lr(t), [t]), fl = (t) => Lr(t).length > 0, gd = (t) => vt(() => fl(t), [t]), wd = (t, e) => vt(() => t && e ? [
|
|
4043
4044
|
{
|
|
4044
4045
|
contractAddress: t.address,
|
|
4045
4046
|
entrypoint: "transfer",
|
|
4046
4047
|
calldata: mt.compile({
|
|
4047
4048
|
recipient: e,
|
|
4048
|
-
amount:
|
|
4049
|
+
amount: jt(t.balance)
|
|
4049
4050
|
})
|
|
4050
4051
|
}
|
|
4051
|
-
] : [], [t, e]),
|
|
4052
|
-
const a =
|
|
4052
|
+
] : [], [t, e]), yd = ({ apiData: { apiBaseUrl: t, apiHeaders: e }, address: n, network: r, transactionReviewEnabled: s = !0, transactions: o }) => {
|
|
4053
|
+
const a = qn(async () => {
|
|
4053
4054
|
if (!n || !r)
|
|
4054
4055
|
return;
|
|
4055
4056
|
if (!t)
|
|
4056
4057
|
throw "Transaction review endpoint is not defined";
|
|
4057
|
-
const c = k(t, "reviewer/transactions/review/starknet"), l =
|
|
4058
|
+
const c = k(t, "reviewer/transactions/review/starknet"), l = gs(o) ? o : [o], d = {
|
|
4058
4059
|
network: r,
|
|
4059
4060
|
account: n,
|
|
4060
4061
|
calls: l
|
|
4061
4062
|
};
|
|
4062
|
-
return
|
|
4063
|
+
return tr(c, {
|
|
4063
4064
|
method: "POST",
|
|
4064
4065
|
headers: {
|
|
4065
4066
|
"Content-Type": "application/json",
|
|
@@ -4067,32 +4068,32 @@ const sd = [
|
|
|
4067
4068
|
},
|
|
4068
4069
|
body: JSON.stringify(d)
|
|
4069
4070
|
});
|
|
4070
|
-
}, [n, r, o]), i = vt(() =>
|
|
4071
|
-
return
|
|
4072
|
-
},
|
|
4071
|
+
}, [n, r, o]), i = vt(() => As({ transactions: o, address: n, network: r }), [o, n, r]);
|
|
4072
|
+
return Ks(!!s, [i, "transactionReview"], a);
|
|
4073
|
+
}, bd = (t) => {
|
|
4073
4074
|
if (!t)
|
|
4074
4075
|
return {};
|
|
4075
|
-
const e = t.assessment === "warn" && t.reason !== "contract_is_not_verified", n = t.reason ? ` (Reason: ${
|
|
4076
|
+
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;
|
|
4076
4077
|
return {
|
|
4077
4078
|
warn: e,
|
|
4078
4079
|
reason: r
|
|
4079
4080
|
};
|
|
4080
|
-
},
|
|
4081
|
+
}, hl = (t) => {
|
|
4081
4082
|
var e;
|
|
4082
4083
|
if (t) {
|
|
4083
4084
|
for (const n of t.reviews)
|
|
4084
4085
|
if (((e = n.activity) == null ? void 0 : e.type) === "swap")
|
|
4085
4086
|
return n;
|
|
4086
4087
|
}
|
|
4087
|
-
},
|
|
4088
|
-
},
|
|
4088
|
+
}, Sd = (t) => {
|
|
4089
|
+
}, Ed = (t, e) => {
|
|
4089
4090
|
var n;
|
|
4090
4091
|
if (e) {
|
|
4091
4092
|
for (const r of e.reviews)
|
|
4092
4093
|
if (((n = r.activity) == null ? void 0 : n.type) === t)
|
|
4093
4094
|
return r.activity;
|
|
4094
4095
|
}
|
|
4095
|
-
},
|
|
4096
|
+
}, Ad = (t) => !!hl(t), xd = (t) => {
|
|
4096
4097
|
var e, n;
|
|
4097
4098
|
if (t) {
|
|
4098
4099
|
for (const r of t.reviews)
|
|
@@ -4102,7 +4103,7 @@ const sd = [
|
|
|
4102
4103
|
type: (n = r.activity) == null ? void 0 : n.type
|
|
4103
4104
|
};
|
|
4104
4105
|
}
|
|
4105
|
-
},
|
|
4106
|
+
}, pl = async ({ feeTokenAddress: t, calls: e, selectedAccount: n, transactionReviewService: r, appDomain: s, accountDeployTransaction: o }) => {
|
|
4106
4107
|
const a = {
|
|
4107
4108
|
type: "INVOKE",
|
|
4108
4109
|
calls: oe(e)
|
|
@@ -4111,7 +4112,7 @@ const sd = [
|
|
|
4111
4112
|
return;
|
|
4112
4113
|
const i = o ? [o, a] : [a];
|
|
4113
4114
|
return { result: await r.simulateAndReview(n, i, t, s, o) };
|
|
4114
|
-
},
|
|
4115
|
+
}, ml = async (t, e, n, r) => {
|
|
4115
4116
|
var w, m, S, f, g, b;
|
|
4116
4117
|
let s = !1;
|
|
4117
4118
|
const o = e.transactions.find((E) => {
|
|
@@ -4126,370 +4127,396 @@ const sd = [
|
|
|
4126
4127
|
const c = "amount" in e.enrichedFeeEstimation.transactions.max ? e.enrichedFeeEstimation.transactions.max.amount * e.enrichedFeeEstimation.transactions.max.pricePerUnit : "maxFee" in e.enrichedFeeEstimation.transactions.max ? e.enrichedFeeEstimation.transactions.max.maxFee : void 0, l = (b = o.simulation.summary.find((E) => E.sent && E.token.address === n)) == null ? void 0 : b.value;
|
|
4127
4128
|
if (!c || !l)
|
|
4128
4129
|
return s;
|
|
4129
|
-
const d = await
|
|
4130
|
+
const d = await Yc(n, t, r) ?? 0n;
|
|
4130
4131
|
return BigInt(d) > c + BigInt(l) || (s = !0), s;
|
|
4131
|
-
},
|
|
4132
|
+
}, vd = () => qn(async ({ feeTokenAddress: e, calls: n, selectedAccount: r, transactionReviewService: s, appDomain: o, accountDeployPayload: a, provider: i }) => {
|
|
4132
4133
|
if (!r)
|
|
4133
4134
|
return;
|
|
4134
|
-
const c = await
|
|
4135
|
+
const c = await pl({
|
|
4135
4136
|
feeTokenAddress: e,
|
|
4136
4137
|
calls: n,
|
|
4137
4138
|
selectedAccount: r,
|
|
4138
4139
|
transactionReviewService: s,
|
|
4139
4140
|
appDomain: o,
|
|
4140
|
-
accountDeployTransaction:
|
|
4141
|
+
accountDeployTransaction: gl(a)
|
|
4141
4142
|
});
|
|
4142
4143
|
if (!c || !c.result || !e)
|
|
4143
4144
|
return;
|
|
4144
|
-
const l = await
|
|
4145
|
+
const l = await ml(r.address, c.result, e, i);
|
|
4145
4146
|
return { ...c.result, isSendingMoreThanBalanceAndGas: l };
|
|
4146
|
-
}, []),
|
|
4147
|
+
}, []), gl = (t) => t ? {
|
|
4147
4148
|
type: "DEPLOY_ACCOUNT",
|
|
4148
4149
|
calldata: t.calldata,
|
|
4149
4150
|
classHash: Pt.parse(t.class_hash),
|
|
4150
4151
|
salt: Pt.parse(t.salt),
|
|
4151
4152
|
signature: []
|
|
4152
4153
|
} : void 0;
|
|
4154
|
+
function Un() {
|
|
4155
|
+
return { promise: Promise.resolve() };
|
|
4156
|
+
}
|
|
4157
|
+
function Id(t) {
|
|
4158
|
+
return class extends t {
|
|
4159
|
+
constructor({ enabled: e, appVersion: n }) {
|
|
4160
|
+
super(), this.enabled = e, this.appVersion = n;
|
|
4161
|
+
}
|
|
4162
|
+
track(e, n) {
|
|
4163
|
+
return !this.enabled || !super.isLoaded ? Un() : {
|
|
4164
|
+
promise: super.track(e, {
|
|
4165
|
+
app_version: this.appVersion,
|
|
4166
|
+
...n
|
|
4167
|
+
}).promise
|
|
4168
|
+
};
|
|
4169
|
+
}
|
|
4170
|
+
};
|
|
4171
|
+
}
|
|
4172
|
+
const wl = fs({}), Td = ({ enabled: t, initialize: e, children: n }) => {
|
|
4173
|
+
const [r, s] = zn(!1);
|
|
4174
|
+
return Ft(() => {
|
|
4175
|
+
!r && t && e().then(() => s(!0));
|
|
4176
|
+
}, [r, t, e]), /* @__PURE__ */ xs(wl.Provider, { value: {}, children: n });
|
|
4177
|
+
};
|
|
4153
4178
|
export {
|
|
4154
4179
|
tt as ARGENT_ACCOUNT_CONTRACT_CLASS_HASHES,
|
|
4155
4180
|
Jt as ARGENT_MULTISIG_CONTRACT_CLASS_HASHES,
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4181
|
+
Cl as AddSmartAccountResponseSchema,
|
|
4182
|
+
Ol as AddSmartAcountRequestSchema,
|
|
4183
|
+
vs as BackendAccountSchema,
|
|
4184
|
+
bu as BackendNftService,
|
|
4185
|
+
Nd as BaseError,
|
|
4186
|
+
eo as C0_PROXY_CONTRACT_CLASS_HASHES,
|
|
4187
|
+
Ll as CacheService,
|
|
4188
|
+
Vt as DEFAULT_TOKEN_DECIMALS,
|
|
4189
|
+
Dl as DateService,
|
|
4190
|
+
Cd as ESTIMATE_ERROR_MESSAGES,
|
|
4191
|
+
Vn as ETH_TOKEN_ADDRESS,
|
|
4192
|
+
as as EstimateError,
|
|
4193
|
+
Od as EventEmitterProvider,
|
|
4194
|
+
kd as EventsBySelector,
|
|
4195
|
+
Pd as FEE_OVERHEAD,
|
|
4171
4196
|
Le as HTTPService,
|
|
4172
4197
|
tn as HTTP_ERROR_MESSAGE,
|
|
4173
4198
|
K as HttpError,
|
|
4174
|
-
|
|
4199
|
+
eu as KnownDappsBackendService,
|
|
4175
4200
|
rn as MultiSigner,
|
|
4176
|
-
|
|
4177
|
-
|
|
4201
|
+
ku as OnchainRecoveryService,
|
|
4202
|
+
Qc as PRETTY_UNLIMITED,
|
|
4178
4203
|
Oe as RecoveryStatusEnum,
|
|
4179
|
-
|
|
4180
|
-
|
|
4204
|
+
ru as ResolveNameService,
|
|
4205
|
+
Kr as STANDARD_DEVNET_ACCOUNT_CLASS_HASH,
|
|
4181
4206
|
Re as STRK_TOKEN_ADDRESS,
|
|
4182
|
-
|
|
4183
|
-
|
|
4207
|
+
Hl as SWRService,
|
|
4208
|
+
Wl as StarknetAddressService,
|
|
4184
4209
|
ke as StartOnchainRecoveryErrorStatusEnum,
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4210
|
+
Rd as TOKEN_ERROR_MESSAGES,
|
|
4211
|
+
$d as TXV1_ACCOUNT_CLASS_HASH,
|
|
4212
|
+
Fd as TXV1_MULTISIG_CLASS_HASH,
|
|
4213
|
+
Ud as TXV3_ACCOUNT_CLASS_HASH,
|
|
4214
|
+
jd as TXV3_MULTISIG_CLASS_HASH,
|
|
4215
|
+
ss as TokenError,
|
|
4216
|
+
Wu as TokenServiceWeb,
|
|
4217
|
+
cd as TransactionReviewServiceWeb,
|
|
4218
|
+
Td as WebAmplitudeProvider,
|
|
4219
|
+
Id as WebAnalyticsServiceFactory,
|
|
4220
|
+
Ld as abiEntrySchema,
|
|
4221
|
+
Dd as abiSchema,
|
|
4222
|
+
qc as activeOnchainRecoverySchema,
|
|
4223
|
+
Hd as addOwnersCalldataSchema,
|
|
4224
|
+
Vd as addPluginCalldataSchema,
|
|
4225
|
+
Md as addressInputCharactersAndLengthSchema,
|
|
4226
|
+
Gd as addressInputSchema,
|
|
4227
|
+
zd as addressOrDomainInputSchema,
|
|
4228
|
+
qd as addressOrDomainSchema,
|
|
4229
|
+
Wd as addressOrEmptyUndefinedSchema,
|
|
4203
4230
|
se as addressSchema,
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4231
|
+
Hn as addressSchemaArgentBackend,
|
|
4232
|
+
Kd as addressSchemaBase,
|
|
4233
|
+
Zd as addressSchemaLooseLength,
|
|
4234
|
+
Yd as addressSchemaStrictLength,
|
|
4235
|
+
Xd as airdropSchema,
|
|
4236
|
+
ns as apiAccountTokenBalancesSchema,
|
|
4237
|
+
Jd as apiAirdropSchema,
|
|
4238
|
+
Qd as apiCollateralizedDebtPositionSchema,
|
|
4239
|
+
tf as apiCollateralizedDebtPositionsSchema,
|
|
4240
|
+
ef as apiConcentratedLiquidityPositionSchema,
|
|
4241
|
+
nf as apiConcentratedLiquidityPositionsSchema,
|
|
4242
|
+
rf as apiDefiDecompositionProduct,
|
|
4243
|
+
sf as apiDefiDecompositionProducts,
|
|
4244
|
+
of as apiDefiDecompositionSchema,
|
|
4245
|
+
af as apiDefiDecompositionToken,
|
|
4246
|
+
rs as apiDefiPositionsSchema,
|
|
4247
|
+
cf as apiPriceDataResponseSchema,
|
|
4248
|
+
lf as apiPriceDetailsSchema,
|
|
4249
|
+
es as apiTokenInfoResponseSchema,
|
|
4250
|
+
uf as apiTokenInfoSchema,
|
|
4251
|
+
ts as apiTokensInfoResponseSchema,
|
|
4252
|
+
ld as apiTransactionReviewActivityType,
|
|
4253
|
+
df as apiUnclaimedRewardsSchema,
|
|
4254
|
+
ff as apiWalletResponseSchema,
|
|
4255
|
+
Bs as argentBackendNetworkIdSchema,
|
|
4256
|
+
is as argentMaxFee,
|
|
4257
|
+
hf as argentNameSchema,
|
|
4258
|
+
Ts as argentNetworkIdSchema,
|
|
4259
|
+
jl as bigDecimal,
|
|
4260
|
+
pf as bigNumberSchema,
|
|
4261
|
+
mf as bigNumberishSchema,
|
|
4262
|
+
gf as booleanToStringSchema,
|
|
4263
|
+
gl as buildAccountDeployTransaction,
|
|
4264
|
+
Ia as buildConstructorCalldata,
|
|
4265
|
+
ed as buildDummyTx,
|
|
4266
|
+
wf as builtinsSchema,
|
|
4267
|
+
yf as byteCodeSchema,
|
|
4268
|
+
bf as cairo1EventSchema,
|
|
4269
|
+
Sf as cairoAssemblySchema,
|
|
4270
|
+
Ef as cairoVersionSchema,
|
|
4271
|
+
ul as calculateCubeRootAdjustment,
|
|
4272
|
+
sd as calculateNonLinearAdjustment,
|
|
4273
|
+
rd as calculateSqrtAdjustment,
|
|
4274
|
+
Af as callDetailsSchema,
|
|
4275
|
+
Dr as callSchema,
|
|
4276
|
+
xf as calldataSchema,
|
|
4250
4277
|
At as castFeeEstimation,
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4278
|
+
vf as changeGuardianCalldataSchema,
|
|
4279
|
+
If as changeThresholdCalldataSchema,
|
|
4280
|
+
ml as checkGasFeeBalance,
|
|
4281
|
+
od as classHashSupportsTxV3,
|
|
4282
|
+
Tf as collateralizedDebtGroupSchema,
|
|
4283
|
+
Bf as collateralizedDebtPositionSchema,
|
|
4284
|
+
_f as collateralizedDebtPositionsSchema,
|
|
4285
|
+
Nf as compiledContractClassSchema,
|
|
4286
|
+
Cf as compiledSierraCasmSchema,
|
|
4287
|
+
Of as compiledSierraSchema,
|
|
4288
|
+
kf as compressedProgramSchema,
|
|
4289
|
+
Pf as concentratedLiquidityPositionSchema,
|
|
4290
|
+
Rf as concentratedLiquidityPositionsSchema,
|
|
4291
|
+
Zr as constructorCallDataSchemaC0,
|
|
4292
|
+
Yr as constructorCallDataSchemaC1V1,
|
|
4293
|
+
$f as contractEntryPointFieldsSchema,
|
|
4294
|
+
Vu as convertTokenAmountToCurrencyValue,
|
|
4295
|
+
Mu as convertTokenUnitAmountWithDecimals,
|
|
4296
|
+
_a as dappContractSchema,
|
|
4297
|
+
Ba as dappLinkSchema,
|
|
4298
|
+
cu as daysBetween,
|
|
4299
|
+
mi as decodeBase58,
|
|
4300
|
+
iu as decodeBase58Array,
|
|
4301
|
+
Ff as defiDappsProductsSchema,
|
|
4302
|
+
Uf as defiPositionSchema,
|
|
4303
|
+
jf as defiPositionTypeSchema,
|
|
4304
|
+
Lf as defiProductSchema,
|
|
4305
|
+
Df as defiProductsSchema,
|
|
4306
|
+
Hf as denyTxV3,
|
|
4307
|
+
pi as encodeBase58,
|
|
4308
|
+
au as encodeBase58Array,
|
|
4282
4309
|
oe as ensureArray,
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4310
|
+
Gu as ensureDecimals,
|
|
4311
|
+
gu as entryPointToHumanReadable,
|
|
4312
|
+
Vf as entryPointsByTypeSchema,
|
|
4313
|
+
vu as equalNft,
|
|
4314
|
+
Ku as erc20TransferTransaction,
|
|
4315
|
+
Yu as erc721SafeTransferFromTransaction,
|
|
4316
|
+
Zu as erc721TransferFromTransaction,
|
|
4317
|
+
Mf as escapeGuardianCalldataSchema,
|
|
4291
4318
|
Pe as estimatedFeeToMaxFeeTotal,
|
|
4292
|
-
|
|
4319
|
+
nd as estimatedFeeToMaxResourceBounds,
|
|
4293
4320
|
re as estimatedFeeToTotal,
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4321
|
+
td as estimatedFeesToMaxFeeTotal,
|
|
4322
|
+
Qu as estimatedFeesToTotal,
|
|
4323
|
+
Gf as eventAbiSchema,
|
|
4324
|
+
zf as eventEntrySchema,
|
|
4325
|
+
qf as executeOnPluginCalldataSchema,
|
|
4299
4326
|
Ye as feeTokenNeedsTxV3Support,
|
|
4300
|
-
|
|
4301
|
-
|
|
4327
|
+
Wf as feltSchema,
|
|
4328
|
+
tr as fetchData,
|
|
4302
4329
|
Xt as fetcherError,
|
|
4303
|
-
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4330
|
+
Jl as findImplementationForAccount,
|
|
4331
|
+
Kf as findTransfersAndApprovals,
|
|
4332
|
+
or as formatAddress,
|
|
4333
|
+
Zf as formatFullAddress,
|
|
4334
|
+
Yf as formatTruncatedAddress,
|
|
4335
|
+
Xf as formatTruncatedSignerKey,
|
|
4336
|
+
Jf as formatTruncatedString,
|
|
4337
|
+
Qf as functionAbiSchema,
|
|
4338
|
+
th as functionAbiTypeSchema,
|
|
4312
4339
|
ee as generateAvatarImage,
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4340
|
+
Ta as getAccountContractAddress,
|
|
4341
|
+
va as getAccountDeploymentPayload,
|
|
4342
|
+
Gl as getAccountIdentifier,
|
|
4343
|
+
qr as getAddressFromArgentName,
|
|
4344
|
+
to as getAddressFromStarkName,
|
|
4318
4345
|
hn as getArgentAccountClassHashes,
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4346
|
+
Aa as getArgentAccountClassHashesWithTxV3Support,
|
|
4347
|
+
Ea as getArgentAccountWithMultiSignerClassHashes,
|
|
4348
|
+
ql as getBackendTimeNowSeconds,
|
|
4349
|
+
Zs as getBackendTimeSeconds,
|
|
4350
|
+
Qs as getCallFromStarkName,
|
|
4351
|
+
Ys as getChainIdFromNetworkId,
|
|
4352
|
+
fi as getColor,
|
|
4353
|
+
Oa as getDapplandLinkForDapp,
|
|
4354
|
+
nu as getDapplandUrlForDapp,
|
|
4355
|
+
bd as getDisplayWarnAndReasonForTransactionReview,
|
|
4329
4356
|
ge as getERC20Transactions,
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4357
|
+
Lr as getERC721Transactions,
|
|
4358
|
+
il as getEstimatedFeeFromBulkSimulation,
|
|
4359
|
+
ll as getEstimatedFeeFromSimulationAndRespectWatermarkFee,
|
|
4360
|
+
ui as getInitials,
|
|
4361
|
+
Zl as getLastCairo0ArgentAccountClassHash,
|
|
4362
|
+
Sa as getLatestArgentAccountClassHash,
|
|
4363
|
+
Kl as getLatestArgentMultisigClassHash,
|
|
4364
|
+
Xl as getLatestLedgerAccountClassHash,
|
|
4365
|
+
Yl as getLedgerAccountClassHashes,
|
|
4366
|
+
eh as getMessageFromTrpcError,
|
|
4367
|
+
Sd as getNFTTransferActivity,
|
|
4368
|
+
ou as getNetworkAccountImageUrl,
|
|
4369
|
+
xu as getNftPicture,
|
|
4370
|
+
cl as getPayloadFromTransaction,
|
|
4371
|
+
nh as getPrettyRpcError,
|
|
4372
|
+
pl as getReviewForTransactions,
|
|
4346
4373
|
nn as getSignerForMultiSigner,
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
|
|
4374
|
+
ad as getSimulationTxVersionFromFeeToken,
|
|
4375
|
+
Js as getStarknetIdContractAddressFromNetworkId,
|
|
4376
|
+
Yc as getTokenBalance,
|
|
4377
|
+
Du as getTokens,
|
|
4378
|
+
Lu as getTokensBalances,
|
|
4379
|
+
Ed as getTransactionReviewActivityOfType,
|
|
4380
|
+
Ad as getTransactionReviewHasSwap,
|
|
4381
|
+
hl as getTransactionReviewSwap,
|
|
4382
|
+
xd as getTransactionReviewWithType,
|
|
4356
4383
|
Fn as getTxVersionFromFeeToken,
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4384
|
+
id as getTxVersionFromFeeTokenForDeclareContract,
|
|
4385
|
+
Zc as getUAParserResult,
|
|
4386
|
+
jt as getUint256CalldataFromBN,
|
|
4387
|
+
al as getWatermarkedMaxFeeTotal,
|
|
4388
|
+
fd as hasERC20Transactions,
|
|
4389
|
+
fl as hasERC721Transactions,
|
|
4390
|
+
hd as hasIncomingERC20Transactions,
|
|
4391
|
+
pd as hasOutgoingERC20Transactions,
|
|
4365
4392
|
Pt as hexSchema,
|
|
4366
|
-
|
|
4367
|
-
|
|
4393
|
+
rh as hexSchemaBase,
|
|
4394
|
+
ci as id,
|
|
4368
4395
|
en as implementationSchema,
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
|
|
4396
|
+
sh as includesAddress,
|
|
4397
|
+
oh as inputAmountSchema,
|
|
4398
|
+
Rl as isAccountV4,
|
|
4399
|
+
Pl as isAccountV5,
|
|
4400
|
+
kl as isAccountV6,
|
|
4401
|
+
Mr as isAddress,
|
|
4402
|
+
fu as isAllowedAddressHexInputValue,
|
|
4403
|
+
hu as isAllowedNumericInputValue,
|
|
4404
|
+
Ul as isArgentBackendNetworkId,
|
|
4405
|
+
zr as isArgentName,
|
|
4406
|
+
Fl as isArgentNetworkId,
|
|
4407
|
+
Pu as isBraveBrowser,
|
|
4381
4408
|
me as isBrowser,
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4409
|
+
$u as isChromeBrowser,
|
|
4410
|
+
uu as isContractDeployed,
|
|
4411
|
+
Uu as isEdgeBrowser,
|
|
4385
4412
|
nt as isEqualAddress,
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4413
|
+
ah as isEqualArgentName,
|
|
4414
|
+
xa as isEqualImplementation,
|
|
4415
|
+
ih as isEqualStarknetDomainName,
|
|
4416
|
+
ch as isEqualStarknetId,
|
|
4417
|
+
ol as isFRI,
|
|
4418
|
+
lu as isFeatureEnabled,
|
|
4419
|
+
Ru as isFirefoxBrowser,
|
|
4393
4420
|
Y as isNumeric,
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
4421
|
+
Fu as isSafariBrowser,
|
|
4422
|
+
lh as isStarknetDomainName,
|
|
4423
|
+
Gr as isStarknetId,
|
|
4424
|
+
Jc as isUnlimitedAmount,
|
|
4425
|
+
Vr as isValidAddress,
|
|
4426
|
+
uh as isValidInputAmount,
|
|
4427
|
+
Ur as isWEI,
|
|
4428
|
+
Hr as isZeroAddress,
|
|
4429
|
+
Na as knownDappSchema,
|
|
4430
|
+
Ca as knownDappsSchema,
|
|
4431
|
+
dh as legacyContractClassSchema,
|
|
4432
|
+
fh as legacyEventSchema,
|
|
4433
|
+
hh as looseCalldataSchema,
|
|
4434
|
+
ph as modifySnjsFeeOverhead,
|
|
4435
|
+
mh as multiTypeSchema,
|
|
4436
|
+
Xu as multiplyBigIntByFloat,
|
|
4437
|
+
Pa as nameProviderResolutionSchema,
|
|
4438
|
+
Ra as nameResolutionAddressSchema,
|
|
4439
|
+
Fa as nameResolutionAddressesSchema,
|
|
4440
|
+
sr as nameResolutionStarknetIdSchema,
|
|
4441
|
+
ka as nameResolutionStarknetIdsSchema,
|
|
4442
|
+
du as nonNullable,
|
|
4443
|
+
Dn as normalizeAddress,
|
|
4444
|
+
gh as normalizeAddressOrDomain,
|
|
4445
|
+
wh as normalizeArgentName,
|
|
4446
|
+
yh as normalizeStarknetId,
|
|
4447
|
+
Wc as onchainRecoverySchema,
|
|
4448
|
+
bh as parseAmount,
|
|
4449
|
+
yi as parseAmountValue,
|
|
4450
|
+
pu as pluralise,
|
|
4451
|
+
Vl as postData,
|
|
4452
|
+
$l as preferencesEndpointPayload,
|
|
4453
|
+
Is as preferencesSchema,
|
|
4454
|
+
gi as prettifyCurrencyNumber,
|
|
4455
|
+
zu as prettifyCurrencyValue,
|
|
4456
|
+
fr as prettifyNumber,
|
|
4430
4457
|
He as prettifyNumberConfig,
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4458
|
+
qu as prettifyTokenAmount,
|
|
4459
|
+
wi as prettifyTokenNumber,
|
|
4460
|
+
Sh as productGroupsSchema,
|
|
4461
|
+
Eh as programSchema,
|
|
4462
|
+
$a as providersNamesSchema,
|
|
4463
|
+
Ah as pythonicHintsSchema,
|
|
4464
|
+
xh as rawArgsArraySchema,
|
|
4465
|
+
vh as rawArgsObjectSchema,
|
|
4466
|
+
Ih as rawArgsSchema,
|
|
4467
|
+
mu as readFileAsString,
|
|
4468
|
+
Fr as recoveryBaseSchema,
|
|
4469
|
+
Cu as recoveryBodySchema,
|
|
4470
|
+
zc as recoveryStatusSchema,
|
|
4471
|
+
Th as removeOwnersCalldataSchema,
|
|
4472
|
+
Bh as removePluginCalldataSchema,
|
|
4473
|
+
_h as replaceSignerCalldataSchema,
|
|
4474
|
+
ju as seedphraseSchema,
|
|
4475
|
+
Nh as sierraContractEntryPointFieldsSchema,
|
|
4476
|
+
Ch as sierraEntryPointsByTypeSchema,
|
|
4477
|
+
Oh as sierraProgramDebugInfoSchema,
|
|
4478
|
+
Xs as starkNameToCallDataDomain,
|
|
4479
|
+
kh as starknetDomainNameSchema,
|
|
4480
|
+
Xr as starknetIdSchema,
|
|
4481
|
+
Ou as startOnchainRecoveryErrorSchema,
|
|
4482
|
+
Kc as startOnchainRecoveryErrorStatusSchema,
|
|
4483
|
+
Gc as startOnchainRecoverySchema,
|
|
4484
|
+
Ph as stringToBooleanSchema,
|
|
4485
|
+
hi as stripAddressZeroPadding,
|
|
4486
|
+
Rh as structAbiSchema,
|
|
4487
|
+
zl as swrRefetchDisabledConfig,
|
|
4461
4488
|
Rt as toMax,
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4489
|
+
Ju as tokensRequireTxV3Support,
|
|
4490
|
+
$h as transactionReviewTransactionsSchema,
|
|
4491
|
+
Fh as transactionReviewWarningSchema,
|
|
4492
|
+
os as transferCalldataSchema,
|
|
4493
|
+
Uh as trpcErrorSchema,
|
|
4494
|
+
jh as txVersionSchema,
|
|
4495
|
+
Lh as uint256Schema,
|
|
4496
|
+
Dh as unclaimedRewardsSchema,
|
|
4470
4497
|
Be as unitToFeeTokenAddress,
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
|
|
4498
|
+
wu as urlWithQuery,
|
|
4499
|
+
ud as useBalanceChange,
|
|
4500
|
+
Eu as useCollection,
|
|
4501
|
+
Ks as useConditionallyEnabledSWR,
|
|
4502
|
+
Ql as useDebounce,
|
|
4503
|
+
tu as useDebouncedValue,
|
|
4504
|
+
dd as useERC20Transactions,
|
|
4505
|
+
md as useERC721Transactions,
|
|
4506
|
+
Hh as useEmitEvent,
|
|
4507
|
+
Vh as useEventEmitter,
|
|
4508
|
+
Mh as useEventEmitterContext,
|
|
4509
|
+
Gh as useEventListener,
|
|
4510
|
+
gd as useHasERC721Transaction,
|
|
4511
|
+
zh as useIsEventEmitterEnabled,
|
|
4512
|
+
wd as useMaxAmountTransaction,
|
|
4513
|
+
Au as useNft,
|
|
4514
|
+
Su as useNfts,
|
|
4515
|
+
Hu as useToken,
|
|
4516
|
+
yd as useTransactionReview,
|
|
4517
|
+
vd as useTransactionReviewV2webFetcher,
|
|
4518
|
+
qh as validChecksumAddressSchema,
|
|
4519
|
+
Wh as validateAddressRangeSchema,
|
|
4520
|
+
yu as voidify,
|
|
4521
|
+
Ml as withPolling
|
|
4495
4522
|
};
|