@tomo-inc/wallet-connect-kit 0.0.22 → 0.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -0
- package/dist/index.js +925 -895
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -12,33 +12,33 @@
|
|
|
12
12
|
})();
|
|
13
13
|
|
|
14
14
|
import { jsxs as C, jsx as o, Fragment as En } from "react/jsx-runtime";
|
|
15
|
-
import { createContext as
|
|
16
|
-
import { Button as
|
|
17
|
-
import { isMobile as
|
|
18
|
-
import { useQuery as Sn, useMutation as On, QueryClientProvider as
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import { useConfig as rt, useConnect as
|
|
22
|
-
import { EmbeddedWallet as
|
|
23
|
-
import { getAddress as He, SwitchChainError as st, numberToHex as it, UserRejectedRequestError as G, withRetry as
|
|
24
|
-
var
|
|
15
|
+
import { createContext as Mt, useState as Y, useRef as ae, useEffect as F, useMemo as y, useContext as V, useCallback as k } from "react";
|
|
16
|
+
import { Button as L, BackIcon as Vt, CloseIcon as Xt, OkIcon as Nt, CopyIcon as kr, Image as ue, PowerIcon as Yr, DownIcon as Zr, Spinner as ge, Skeleton as Fr, Modal as jt, Link as zn, TomoLogoIcon as Jr, Card as Dr, CardBody as Hr, Tabs as Qr, Tab as Kr, Chip as nt, SearchIcon as qr, Input as Tt, SearchOutlinedIcon as Ur, RightArrowIcon as Et, ModalHeader as Gr, ModalBody as Rr, ModalContent as _r, TomoUIProvider as $r, ToastProvider as es } from "@tomo-inc/tomo-ui";
|
|
17
|
+
import { isMobile as St, loadConnectors as Ot, isWagmiConnector as ns, connect as Lt, switchChain as tt, addChain as ts, signInWithWallet as rs, signMessage as ss, setWalletConnectConfig as is } from "@tomo-inc/wallet-adaptor-base";
|
|
18
|
+
import { useQuery as Sn, useMutation as On, QueryClientProvider as os, QueryClient as cs } from "@tanstack/react-query";
|
|
19
|
+
import as from "copy-to-clipboard";
|
|
20
|
+
import ls from "qr-code-styling";
|
|
21
|
+
import { useConfig as rt, useConnect as ds, useAccount as As, useDisconnect as fs, createConnector as us } from "wagmi";
|
|
22
|
+
import { EmbeddedWallet as gs } from "@tomo-inc/embedded-wallet-providers";
|
|
23
|
+
import { getAddress as He, SwitchChainError as st, numberToHex as it, UserRejectedRequestError as G, withRetry as vs, withTimeout as ms, ResourceUnavailableRpcError as fn } from "viem";
|
|
24
|
+
var ps = Object.defineProperty, Cs = (e, n) => {
|
|
25
25
|
for (var t in n)
|
|
26
|
-
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
clear: () =>
|
|
30
|
-
get: () =>
|
|
31
|
-
isKeyExist: () =>
|
|
32
|
-
remove: () =>
|
|
33
|
-
set: () =>
|
|
34
|
-
setKeyNS: () =>
|
|
26
|
+
ps(e, t, { get: n[t], enumerable: !0 });
|
|
27
|
+
}, xs = {};
|
|
28
|
+
Cs(xs, {
|
|
29
|
+
clear: () => ws,
|
|
30
|
+
get: () => bs,
|
|
31
|
+
isKeyExist: () => kt,
|
|
32
|
+
remove: () => Is,
|
|
33
|
+
set: () => zs,
|
|
34
|
+
setKeyNS: () => Ps
|
|
35
35
|
});
|
|
36
36
|
var Ne = "tomo-";
|
|
37
|
-
function
|
|
37
|
+
function bs(e) {
|
|
38
38
|
if (typeof window > "u")
|
|
39
39
|
return null;
|
|
40
40
|
const n = Ne + e;
|
|
41
|
-
if (!
|
|
41
|
+
if (!kt(n))
|
|
42
42
|
return null;
|
|
43
43
|
let t = null;
|
|
44
44
|
try {
|
|
@@ -49,7 +49,7 @@ function xs(e) {
|
|
|
49
49
|
}
|
|
50
50
|
return t !== null && Object.prototype.hasOwnProperty.call(t, "type") && Object.prototype.hasOwnProperty.call(t, "data") ? t.data : null;
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function zs(e, n, t) {
|
|
53
53
|
if (typeof window > "u")
|
|
54
54
|
return !1;
|
|
55
55
|
let r;
|
|
@@ -67,23 +67,23 @@ function bs(e, n, t) {
|
|
|
67
67
|
}
|
|
68
68
|
return !1;
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function Is(e) {
|
|
71
71
|
if (typeof window > "u")
|
|
72
72
|
return;
|
|
73
73
|
const n = Ne + e;
|
|
74
74
|
window.localStorage.removeItem(n), window.sessionStorage.removeItem(n);
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function ws() {
|
|
77
77
|
typeof window > "u" || (window?.localStorage?.clear(), window?.sessionStorage?.clear());
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function kt(e) {
|
|
80
80
|
return typeof window > "u" ? !1 : Object.prototype.hasOwnProperty.call(window.localStorage, e) || Object.prototype.hasOwnProperty.call(window.sessionStorage, e);
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function Ps(e) {
|
|
83
83
|
typeof e == "string" && e !== "" && (Ne = e);
|
|
84
84
|
}
|
|
85
85
|
var T = /* @__PURE__ */ ((e) => (e.BITCOIN = "bitcoin", e.DOGECOIN = "dogecoin", e.EVM = "evm", e.SOLANA = "solana", e.APTOS = "aptos", e.COSMOS = "cosmos", e.TON = "ton", e.TRON = "tron", e.SUI = "sui", e))(T || {});
|
|
86
|
-
const N =
|
|
86
|
+
const N = Mt(null), Yt = ({ testnet: e, ...n }) => /* @__PURE__ */ C(
|
|
87
87
|
"svg",
|
|
88
88
|
{
|
|
89
89
|
"aria-hidden": "true",
|
|
@@ -150,7 +150,7 @@ const N = Wt(null), kt = ({ testnet: e, ...n }) => /* @__PURE__ */ C(
|
|
|
150
150
|
] })
|
|
151
151
|
]
|
|
152
152
|
}
|
|
153
|
-
), Ln = ({ ...e }) => /* @__PURE__ */ o(
|
|
153
|
+
), Ln = ({ ...e }) => /* @__PURE__ */ o(Yt, { testnet: !0, ...e }), Re = ({ testnet: e, ...n }) => {
|
|
154
154
|
let t = "var(--ck-chain-ethereum-01, #627EEA)", r = "var(--ck-chain-ethereum-02, #ffffff)";
|
|
155
155
|
return e && (t = "linear-gradient(180deg, #8995A9 0%, #627EEA 99.48%)", r = "#fff"), /* @__PURE__ */ C(
|
|
156
156
|
"svg",
|
|
@@ -279,7 +279,7 @@ const N = Wt(null), kt = ({ testnet: e, ...n }) => /* @__PURE__ */ C(
|
|
|
279
279
|
/* @__PURE__ */ o("clipPath", { id: "clip0_101_1146", children: /* @__PURE__ */ o("rect", { width: "20", height: "20", fill: "white" }) }),
|
|
280
280
|
/* @__PURE__ */ o("clipPath", { id: "clip1_101_1146", children: /* @__PURE__ */ o("rect", { width: "13.125", height: "10", fill: "white", transform: "translate(3.75 5)" }) })
|
|
281
281
|
] })
|
|
282
|
-
] }),
|
|
282
|
+
] }), ys = ({ ...e }) => /* @__PURE__ */ C("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e, children: [
|
|
283
283
|
/* @__PURE__ */ o("circle", { cx: "16", cy: "16", r: "16", fill: "black" }),
|
|
284
284
|
/* @__PURE__ */ o(
|
|
285
285
|
"mask",
|
|
@@ -349,7 +349,7 @@ const N = Wt(null), kt = ({ testnet: e, ...n }) => /* @__PURE__ */ C(
|
|
|
349
349
|
] })
|
|
350
350
|
]
|
|
351
351
|
}
|
|
352
|
-
),
|
|
352
|
+
), Zt = ({ ...e }) => /* @__PURE__ */ C("svg", { width: "56", height: "56", viewBox: "0 0 56 56", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e, children: [
|
|
353
353
|
/* @__PURE__ */ o("foreignObject", { x: "-2.16759", y: "-2.16759", width: "60.3349", height: "60.3352", children: /* @__PURE__ */ o(
|
|
354
354
|
"div",
|
|
355
355
|
{
|
|
@@ -467,32 +467,32 @@ const N = Wt(null), kt = ({ testnet: e, ...n }) => /* @__PURE__ */ C(
|
|
|
467
467
|
}
|
|
468
468
|
)
|
|
469
469
|
] })
|
|
470
|
-
] }),
|
|
470
|
+
] }), Bs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
471
471
|
__proto__: null,
|
|
472
472
|
Apots: rn,
|
|
473
473
|
Doge: kn,
|
|
474
474
|
Ethereum: Re,
|
|
475
|
-
KnownChain:
|
|
476
|
-
Movement:
|
|
475
|
+
KnownChain: Yt,
|
|
476
|
+
Movement: ys,
|
|
477
477
|
Solana: sn,
|
|
478
478
|
UnknownChain: Ln,
|
|
479
|
-
UnsupportChain:
|
|
479
|
+
UnsupportChain: Zt
|
|
480
480
|
}, Symbol.toStringTag, { value: "Module" })), Ie = ({ icon: e, iconName: n, className: t, iconProps: r, iconUrl: s }) => {
|
|
481
481
|
if (s)
|
|
482
482
|
return /* @__PURE__ */ o("div", { className: t, children: /* @__PURE__ */ o("img", { src: s, alt: n || "chain", "data-icon": "chain-icon", width: "100%", height: "100%" }) });
|
|
483
483
|
if (typeof e == "string")
|
|
484
484
|
return /* @__PURE__ */ o("div", { className: t, children: /* @__PURE__ */ o("img", { src: e, alt: n || "chain", "data-icon": "chain-icon", width: "100%", height: "100%" }) });
|
|
485
|
-
const i = e ||
|
|
485
|
+
const i = e || Bs?.[n] || Ln;
|
|
486
486
|
return /* @__PURE__ */ o("div", { className: t, children: /* @__PURE__ */ o(i, { "data-icon": "chain-icon", width: "100%", height: "100%", ...r }) });
|
|
487
|
-
},
|
|
487
|
+
}, hs = "https://web3-assets.tomo.inc/api/chains", ot = "https://web3-assets.tomo.inc";
|
|
488
488
|
let Qe = null, ye = null;
|
|
489
|
-
function
|
|
489
|
+
function Ws(e) {
|
|
490
490
|
return !e || e.startsWith("http://") || e.startsWith("https://") ? e : e.startsWith("/") ? `${ot}${e}` : `${ot}/${e}`;
|
|
491
491
|
}
|
|
492
|
-
async function
|
|
492
|
+
async function Ft() {
|
|
493
493
|
return Qe || ye || (ye = (async () => {
|
|
494
494
|
try {
|
|
495
|
-
const e = await fetch(
|
|
495
|
+
const e = await fetch(hs);
|
|
496
496
|
if (!e.ok)
|
|
497
497
|
throw new Error(`Failed to fetch chains: ${e.statusText}`);
|
|
498
498
|
const n = await e.json();
|
|
@@ -500,26 +500,26 @@ async function Zt() {
|
|
|
500
500
|
throw new Error("Invalid chains API response");
|
|
501
501
|
return Qe = n.data.map((t) => ({
|
|
502
502
|
...t,
|
|
503
|
-
icon:
|
|
503
|
+
icon: Ws(t.icon)
|
|
504
504
|
})), Qe;
|
|
505
505
|
} catch (e) {
|
|
506
506
|
throw console.error("Error fetching chains from API:", e), ye = null, e;
|
|
507
507
|
}
|
|
508
508
|
})(), ye);
|
|
509
509
|
}
|
|
510
|
-
const
|
|
510
|
+
const Ms = "1a91e3dace36e2be3bf030a65679fe82";
|
|
511
511
|
function Yn(e) {
|
|
512
512
|
const [n, t] = e.split(":");
|
|
513
513
|
return { type: n.toLowerCase(), id: t };
|
|
514
514
|
}
|
|
515
515
|
function H(e) {
|
|
516
516
|
const { type: n, id: t } = Yn(e);
|
|
517
|
-
return n === "aptos" ? "aptos" : n === "solana" ? "solana" : n === "eip155" ? "evm" : n === "dogecoin" || n === "bip122" && t ===
|
|
517
|
+
return n === "aptos" ? "aptos" : n === "solana" ? "solana" : n === "eip155" ? "evm" : n === "dogecoin" || n === "bip122" && t === Ms ? "dogecoin" : "evm";
|
|
518
518
|
}
|
|
519
|
-
function
|
|
519
|
+
function Jt() {
|
|
520
520
|
const { data: e, isLoading: n, error: t, refetch: r } = Sn({
|
|
521
521
|
queryKey: ["chains"],
|
|
522
|
-
queryFn:
|
|
522
|
+
queryFn: Ft,
|
|
523
523
|
staleTime: 6e5,
|
|
524
524
|
gcTime: 18e5,
|
|
525
525
|
retry: 2,
|
|
@@ -535,7 +535,7 @@ function Ft() {
|
|
|
535
535
|
const Zn = () => {
|
|
536
536
|
const [e, n] = Y(!1), t = ae(null), r = (s) => {
|
|
537
537
|
try {
|
|
538
|
-
return
|
|
538
|
+
return as(s), n(!0), t.current = setTimeout(() => n(!1), 1200), !0;
|
|
539
539
|
} catch (i) {
|
|
540
540
|
return console.warn("Copy failed, but continuing execution:", i), !1;
|
|
541
541
|
}
|
|
@@ -550,7 +550,7 @@ const Zn = () => {
|
|
|
550
550
|
function In(e) {
|
|
551
551
|
return new Promise((n) => setTimeout(n, e));
|
|
552
552
|
}
|
|
553
|
-
function
|
|
553
|
+
function Vs(e) {
|
|
554
554
|
if (!e || typeof e != "string")
|
|
555
555
|
return !1;
|
|
556
556
|
const n = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, t = /^[a-zA-Z0-9._+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
|
|
@@ -559,12 +559,12 @@ function Ms(e) {
|
|
|
559
559
|
const r = e.split("@")[0];
|
|
560
560
|
return !(r.startsWith(".") || r.endsWith(".") || r.includes(".."));
|
|
561
561
|
}
|
|
562
|
-
function
|
|
563
|
-
return !e || e.trim().length === 0 ? "Please enter your email address" :
|
|
562
|
+
function Xs(e) {
|
|
563
|
+
return !e || e.trim().length === 0 ? "Please enter your email address" : Vs(e) ? null : "Please enter a valid email address";
|
|
564
564
|
}
|
|
565
565
|
const Fn = {
|
|
566
566
|
WALLET_STATE: "tomo_wallet_state"
|
|
567
|
-
},
|
|
567
|
+
}, Ns = (e) => {
|
|
568
568
|
try {
|
|
569
569
|
const n = {
|
|
570
570
|
...e,
|
|
@@ -574,16 +574,16 @@ const Fn = {
|
|
|
574
574
|
} catch (n) {
|
|
575
575
|
console.error("Failed to save wallet state:", n);
|
|
576
576
|
}
|
|
577
|
-
},
|
|
577
|
+
}, js = () => {
|
|
578
578
|
try {
|
|
579
579
|
const e = localStorage.getItem(Fn.WALLET_STATE);
|
|
580
580
|
if (!e) return null;
|
|
581
581
|
const n = JSON.parse(e);
|
|
582
|
-
return Date.now() - n.timestamp > 24 * 7 * 60 * 60 * 1e3 ? (
|
|
582
|
+
return Date.now() - n.timestamp > 24 * 7 * 60 * 60 * 1e3 ? (Dt(), null) : n;
|
|
583
583
|
} catch (e) {
|
|
584
584
|
return console.error("Failed to get wallet state:", e), null;
|
|
585
585
|
}
|
|
586
|
-
},
|
|
586
|
+
}, Dt = () => {
|
|
587
587
|
try {
|
|
588
588
|
localStorage.removeItem(Fn.WALLET_STATE);
|
|
589
589
|
} catch (e) {
|
|
@@ -594,14 +594,14 @@ function ct(e, n) {
|
|
|
594
594
|
const t = e.info?.uuid, r = t ? n.has(t) : !1, s = e.isInstalled === !0;
|
|
595
595
|
return r && s ? 0 : !r && s ? 1 : r && !s ? 2 : 3;
|
|
596
596
|
}
|
|
597
|
-
function
|
|
597
|
+
function Ts(e, n) {
|
|
598
598
|
const t = new Set(e.map((c) => c.info?.uuid).filter(Boolean)), r = (c, l) => ct(c, t) - ct(l, t), s = /* @__PURE__ */ new Set();
|
|
599
599
|
return [[...e, ...n].filter((c) => {
|
|
600
600
|
const l = c.info?.uuid;
|
|
601
601
|
return !l || s.has(l) ? !1 : (s.add(l), !0);
|
|
602
602
|
}).sort(r), n];
|
|
603
603
|
}
|
|
604
|
-
function
|
|
604
|
+
function Es(e, n = 6, t = 4) {
|
|
605
605
|
if (!e) return "";
|
|
606
606
|
if (e.length <= n + t)
|
|
607
607
|
return e;
|
|
@@ -635,19 +635,19 @@ const q = {
|
|
|
635
635
|
evm: Re,
|
|
636
636
|
// Evm chains - fallback icons (will be replaced by API data)
|
|
637
637
|
evm_1: Re,
|
|
638
|
-
unsupported:
|
|
638
|
+
unsupported: Zt
|
|
639
639
|
};
|
|
640
|
-
function
|
|
640
|
+
function Ss(e, n) {
|
|
641
641
|
if (n?.icon)
|
|
642
642
|
return () => n.icon;
|
|
643
643
|
const t = H(e), { id: r } = Yn(e), s = t === "evm" ? `evm_${r}` : t;
|
|
644
644
|
return le[s] || Ln;
|
|
645
645
|
}
|
|
646
|
-
function
|
|
646
|
+
function Ht(e) {
|
|
647
647
|
const n = { ...le };
|
|
648
648
|
return e.forEach((t) => {
|
|
649
649
|
const r = H(t.chainId), { id: s } = Yn(t.chainId), i = r === "evm" ? `evm_${s}` : t.chainId;
|
|
650
|
-
t.icon ? n[i] = () => t.icon : n[i] =
|
|
650
|
+
t.icon ? n[i] = () => t.icon : n[i] = Ss(t.chainId, t);
|
|
651
651
|
}), n;
|
|
652
652
|
}
|
|
653
653
|
const un = {
|
|
@@ -668,10 +668,10 @@ function oe(e) {
|
|
|
668
668
|
...e
|
|
669
669
|
};
|
|
670
670
|
}
|
|
671
|
-
const
|
|
671
|
+
const Qt = "2.38.2";
|
|
672
672
|
let gn = {
|
|
673
673
|
getDocsUrl: ({ docsBaseUrl: e, docsPath: n = "", docsSlug: t }) => n ? `${e ?? "https://viem.sh"}${n}${t ? `#${t}` : ""}` : void 0,
|
|
674
|
-
version: `viem@${
|
|
674
|
+
version: `viem@${Qt}`
|
|
675
675
|
}, h = class wn extends Error {
|
|
676
676
|
constructor(n, t = {}) {
|
|
677
677
|
const r = t.cause instanceof wn ? t.cause.details : t.cause?.message ? t.cause.message : t.details, s = t.cause instanceof wn && t.cause.docsPath || t.docsPath, i = gn.getDocsUrl?.({ ...t, docsPath: s }), a = [
|
|
@@ -713,21 +713,21 @@ let gn = {
|
|
|
713
713
|
configurable: !0,
|
|
714
714
|
writable: !0,
|
|
715
715
|
value: "BaseError"
|
|
716
|
-
}), this.details = r, this.docsPath = s, this.metaMessages = t.metaMessages, this.name = t.name ?? this.name, this.shortMessage = n, this.version =
|
|
716
|
+
}), this.details = r, this.docsPath = s, this.metaMessages = t.metaMessages, this.name = t.name ?? this.name, this.shortMessage = n, this.version = Qt;
|
|
717
717
|
}
|
|
718
718
|
walk(n) {
|
|
719
|
-
return
|
|
719
|
+
return Kt(this, n);
|
|
720
720
|
}
|
|
721
721
|
};
|
|
722
|
-
function
|
|
723
|
-
return n?.(e) ? e : e && typeof e == "object" && "cause" in e && e.cause !== void 0 ?
|
|
722
|
+
function Kt(e, n) {
|
|
723
|
+
return n?.(e) ? e : e && typeof e == "object" && "cause" in e && e.cause !== void 0 ? Kt(e.cause, n) : n ? null : e;
|
|
724
724
|
}
|
|
725
|
-
class
|
|
725
|
+
class Os extends h {
|
|
726
726
|
constructor({ max: n, min: t, signed: r, size: s, value: i }) {
|
|
727
727
|
super(`Number "${i}" is not in safe ${s ? `${s * 8}-bit ${r ? "signed" : "unsigned"} ` : ""}integer range ${n ? `(${t} to ${n})` : `(above ${t})`}`, { name: "IntegerOutOfRangeError" });
|
|
728
728
|
}
|
|
729
729
|
}
|
|
730
|
-
class
|
|
730
|
+
class Ls extends h {
|
|
731
731
|
constructor({ givenSize: n, maxSize: t }) {
|
|
732
732
|
super(`Size cannot exceed ${t} bytes. Given size: ${n} bytes.`, { name: "SizeOverflowError" });
|
|
733
733
|
}
|
|
@@ -744,36 +744,36 @@ function _e(e, { dir: n = "left" } = {}) {
|
|
|
744
744
|
r++;
|
|
745
745
|
return t = n === "left" ? t.slice(r) : t.slice(0, t.length - r), typeof e == "string" ? (t.length === 1 && n === "right" && (t = `${t}0`), `0x${t.length % 2 === 1 ? `0${t}` : t}`) : t;
|
|
746
746
|
}
|
|
747
|
-
class
|
|
747
|
+
class ks extends h {
|
|
748
748
|
constructor({ offset: n, position: t, size: r }) {
|
|
749
749
|
super(`Slice ${t === "start" ? "starting" : "ending"} at offset "${n}" is out-of-bounds (size: ${r}).`, { name: "SliceOffsetOutOfBoundsError" });
|
|
750
750
|
}
|
|
751
751
|
}
|
|
752
|
-
class
|
|
752
|
+
class qt extends h {
|
|
753
753
|
constructor({ size: n, targetSize: t, type: r }) {
|
|
754
754
|
super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${n}) exceeds padding size (${t}).`, { name: "SizeExceedsPaddingSizeError" });
|
|
755
755
|
}
|
|
756
756
|
}
|
|
757
757
|
function we(e, { dir: n, size: t = 32 } = {}) {
|
|
758
|
-
return typeof e == "string" ?
|
|
758
|
+
return typeof e == "string" ? Ys(e, { dir: n, size: t }) : Zs(e, { dir: n, size: t });
|
|
759
759
|
}
|
|
760
|
-
function
|
|
760
|
+
function Ys(e, { dir: n, size: t = 32 } = {}) {
|
|
761
761
|
if (t === null)
|
|
762
762
|
return e;
|
|
763
763
|
const r = e.replace("0x", "");
|
|
764
764
|
if (r.length > t * 2)
|
|
765
|
-
throw new
|
|
765
|
+
throw new qt({
|
|
766
766
|
size: Math.ceil(r.length / 2),
|
|
767
767
|
targetSize: t,
|
|
768
768
|
type: "hex"
|
|
769
769
|
});
|
|
770
770
|
return `0x${r[n === "right" ? "padEnd" : "padStart"](t * 2, "0")}`;
|
|
771
771
|
}
|
|
772
|
-
function
|
|
772
|
+
function Zs(e, { dir: n, size: t = 32 } = {}) {
|
|
773
773
|
if (t === null)
|
|
774
774
|
return e;
|
|
775
775
|
if (e.length > t)
|
|
776
|
-
throw new
|
|
776
|
+
throw new qt({
|
|
777
777
|
size: e.length,
|
|
778
778
|
targetSize: t,
|
|
779
779
|
type: "bytes"
|
|
@@ -785,18 +785,18 @@ function Ys(e, { dir: n, size: t = 32 } = {}) {
|
|
|
785
785
|
}
|
|
786
786
|
return r;
|
|
787
787
|
}
|
|
788
|
-
const
|
|
788
|
+
const Fs = /* @__PURE__ */ Array.from({ length: 256 }, (e, n) => n.toString(16).padStart(2, "0"));
|
|
789
789
|
function Ve(e, n = {}) {
|
|
790
|
-
return typeof e == "number" || typeof e == "bigint" ? P(e, n) : typeof e == "string" ?
|
|
790
|
+
return typeof e == "number" || typeof e == "bigint" ? P(e, n) : typeof e == "string" ? Hs(e, n) : typeof e == "boolean" ? Js(e, n) : ne(e, n);
|
|
791
791
|
}
|
|
792
|
-
function
|
|
792
|
+
function Js(e, n = {}) {
|
|
793
793
|
const t = `0x${Number(e)}`;
|
|
794
794
|
return typeof n.size == "number" ? (Pe(t, { size: n.size }), we(t, { size: n.size })) : t;
|
|
795
795
|
}
|
|
796
796
|
function ne(e, n = {}) {
|
|
797
797
|
let t = "";
|
|
798
798
|
for (let s = 0; s < e.length; s++)
|
|
799
|
-
t +=
|
|
799
|
+
t += Fs[e[s]];
|
|
800
800
|
const r = `0x${t}`;
|
|
801
801
|
return typeof n.size == "number" ? (Pe(r, { size: n.size }), we(r, { dir: "right", size: n.size })) : r;
|
|
802
802
|
}
|
|
@@ -807,7 +807,7 @@ function P(e, n = {}) {
|
|
|
807
807
|
const a = typeof i == "bigint" && t ? -i - 1n : 0;
|
|
808
808
|
if (i && s > i || s < a) {
|
|
809
809
|
const l = typeof e == "bigint" ? "n" : "";
|
|
810
|
-
throw new
|
|
810
|
+
throw new Os({
|
|
811
811
|
max: i ? `${i}${l}` : void 0,
|
|
812
812
|
min: `${a}${l}`,
|
|
813
813
|
signed: t,
|
|
@@ -818,16 +818,16 @@ function P(e, n = {}) {
|
|
|
818
818
|
const c = `0x${(t && s < 0 ? (1n << BigInt(r * 8)) + BigInt(s) : s).toString(16)}`;
|
|
819
819
|
return r ? we(c, { size: r }) : c;
|
|
820
820
|
}
|
|
821
|
-
const
|
|
822
|
-
function
|
|
823
|
-
const t =
|
|
821
|
+
const Ds = /* @__PURE__ */ new TextEncoder();
|
|
822
|
+
function Hs(e, n = {}) {
|
|
823
|
+
const t = Ds.encode(e);
|
|
824
824
|
return ne(t, n);
|
|
825
825
|
}
|
|
826
|
-
const
|
|
827
|
-
function
|
|
828
|
-
return typeof e == "number" || typeof e == "bigint" ?
|
|
826
|
+
const Qs = /* @__PURE__ */ new TextEncoder();
|
|
827
|
+
function Ut(e, n = {}) {
|
|
828
|
+
return typeof e == "number" || typeof e == "bigint" ? qs(e, n) : typeof e == "boolean" ? Ks(e, n) : Oe(e) ? de(e, n) : Gt(e, n);
|
|
829
829
|
}
|
|
830
|
-
function
|
|
830
|
+
function Ks(e, n = {}) {
|
|
831
831
|
const t = new Uint8Array(1);
|
|
832
832
|
return t[0] = Number(e), typeof n.size == "number" ? (Pe(t, { size: n.size }), we(t, { size: n.size })) : t;
|
|
833
833
|
}
|
|
@@ -861,17 +861,17 @@ function de(e, n = {}) {
|
|
|
861
861
|
}
|
|
862
862
|
return i;
|
|
863
863
|
}
|
|
864
|
-
function
|
|
864
|
+
function qs(e, n) {
|
|
865
865
|
const t = P(e, n);
|
|
866
866
|
return de(t);
|
|
867
867
|
}
|
|
868
|
-
function
|
|
869
|
-
const t =
|
|
868
|
+
function Gt(e, n = {}) {
|
|
869
|
+
const t = Qs.encode(e);
|
|
870
870
|
return typeof n.size == "number" ? (Pe(t, { size: n.size }), we(t, { dir: "right", size: n.size })) : t;
|
|
871
871
|
}
|
|
872
872
|
function Pe(e, { size: n }) {
|
|
873
873
|
if (ze(e) > n)
|
|
874
|
-
throw new
|
|
874
|
+
throw new Ls({
|
|
875
875
|
givenSize: ze(e),
|
|
876
876
|
maxSize: n
|
|
877
877
|
});
|
|
@@ -904,7 +904,7 @@ function Jn(e, n) {
|
|
|
904
904
|
type: e
|
|
905
905
|
});
|
|
906
906
|
}
|
|
907
|
-
const
|
|
907
|
+
const Rt = {
|
|
908
908
|
"0x0": "legacy",
|
|
909
909
|
"0x1": "eip2930",
|
|
910
910
|
"0x2": "eip1559",
|
|
@@ -925,12 +925,12 @@ function Dn(e, n) {
|
|
|
925
925
|
nonce: e.nonce ? $e(e.nonce) : void 0,
|
|
926
926
|
to: e.to ? e.to : null,
|
|
927
927
|
transactionIndex: e.transactionIndex ? Number(e.transactionIndex) : null,
|
|
928
|
-
type: e.type ?
|
|
928
|
+
type: e.type ? Rt[e.type] : void 0,
|
|
929
929
|
typeHex: e.type ? e.type : void 0,
|
|
930
930
|
value: e.value ? BigInt(e.value) : void 0,
|
|
931
931
|
v: e.v ? BigInt(e.v) : void 0
|
|
932
932
|
};
|
|
933
|
-
return e.authorizationList && (t.authorizationList =
|
|
933
|
+
return e.authorizationList && (t.authorizationList = Gs(e.authorizationList)), t.yParity = (() => {
|
|
934
934
|
if (e.yParity)
|
|
935
935
|
return Number(e.yParity);
|
|
936
936
|
if (typeof t.v == "bigint") {
|
|
@@ -943,8 +943,8 @@ function Dn(e, n) {
|
|
|
943
943
|
}
|
|
944
944
|
})(), t.type === "legacy" && (delete t.accessList, delete t.maxFeePerBlobGas, delete t.maxFeePerGas, delete t.maxPriorityFeePerGas, delete t.yParity), t.type === "eip2930" && (delete t.maxFeePerBlobGas, delete t.maxFeePerGas, delete t.maxPriorityFeePerGas), t.type === "eip1559" && delete t.maxFeePerBlobGas, t;
|
|
945
945
|
}
|
|
946
|
-
const
|
|
947
|
-
function
|
|
946
|
+
const Us = /* @__PURE__ */ Jn("transaction", Dn);
|
|
947
|
+
function Gs(e) {
|
|
948
948
|
return e.map((n) => ({
|
|
949
949
|
address: n.address,
|
|
950
950
|
chainId: Number(n.chainId),
|
|
@@ -954,7 +954,7 @@ function Us(e) {
|
|
|
954
954
|
yParity: Number(n.yParity)
|
|
955
955
|
}));
|
|
956
956
|
}
|
|
957
|
-
function
|
|
957
|
+
function Rs(e, n) {
|
|
958
958
|
const t = (e.transactions ?? []).map((r) => typeof r == "string" ? r : Dn(r));
|
|
959
959
|
return {
|
|
960
960
|
...e,
|
|
@@ -974,8 +974,8 @@ function Gs(e, n) {
|
|
|
974
974
|
totalDifficulty: e.totalDifficulty ? BigInt(e.totalDifficulty) : null
|
|
975
975
|
};
|
|
976
976
|
}
|
|
977
|
-
const
|
|
978
|
-
function
|
|
977
|
+
const _s = /* @__PURE__ */ Jn("block", Rs);
|
|
978
|
+
function $s(e, { args: n, eventName: t } = {}) {
|
|
979
979
|
return {
|
|
980
980
|
...e,
|
|
981
981
|
blockHash: e.blockHash ? e.blockHash : null,
|
|
@@ -986,11 +986,11 @@ function _s(e, { args: n, eventName: t } = {}) {
|
|
|
986
986
|
...t ? { args: n, eventName: t } : {}
|
|
987
987
|
};
|
|
988
988
|
}
|
|
989
|
-
const
|
|
989
|
+
const ei = {
|
|
990
990
|
"0x0": "reverted",
|
|
991
991
|
"0x1": "success"
|
|
992
992
|
};
|
|
993
|
-
function
|
|
993
|
+
function ni(e, n) {
|
|
994
994
|
const t = {
|
|
995
995
|
...e,
|
|
996
996
|
blockNumber: e.blockNumber ? BigInt(e.blockNumber) : null,
|
|
@@ -998,26 +998,26 @@ function ei(e, n) {
|
|
|
998
998
|
cumulativeGasUsed: e.cumulativeGasUsed ? BigInt(e.cumulativeGasUsed) : null,
|
|
999
999
|
effectiveGasPrice: e.effectiveGasPrice ? BigInt(e.effectiveGasPrice) : null,
|
|
1000
1000
|
gasUsed: e.gasUsed ? BigInt(e.gasUsed) : null,
|
|
1001
|
-
logs: e.logs ? e.logs.map((r) =>
|
|
1001
|
+
logs: e.logs ? e.logs.map((r) => $s(r)) : null,
|
|
1002
1002
|
to: e.to ? e.to : null,
|
|
1003
1003
|
transactionIndex: e.transactionIndex ? $e(e.transactionIndex) : null,
|
|
1004
|
-
status: e.status ?
|
|
1005
|
-
type: e.type ?
|
|
1004
|
+
status: e.status ? ei[e.status] : null,
|
|
1005
|
+
type: e.type ? Rt[e.type] || e.type : null
|
|
1006
1006
|
};
|
|
1007
1007
|
return e.blobGasPrice && (t.blobGasPrice = BigInt(e.blobGasPrice)), e.blobGasUsed && (t.blobGasUsed = BigInt(e.blobGasUsed)), t;
|
|
1008
1008
|
}
|
|
1009
|
-
const
|
|
1009
|
+
const ti = /* @__PURE__ */ Jn("transactionReceipt", ni), ri = {
|
|
1010
1010
|
legacy: "0x0",
|
|
1011
1011
|
eip2930: "0x1",
|
|
1012
1012
|
eip1559: "0x2",
|
|
1013
1013
|
eip4844: "0x3",
|
|
1014
1014
|
eip7702: "0x4"
|
|
1015
1015
|
};
|
|
1016
|
-
function
|
|
1016
|
+
function si(e, n) {
|
|
1017
1017
|
const t = {};
|
|
1018
|
-
return typeof e.authorizationList < "u" && (t.authorizationList =
|
|
1018
|
+
return typeof e.authorizationList < "u" && (t.authorizationList = ii(e.authorizationList)), typeof e.accessList < "u" && (t.accessList = e.accessList), typeof e.blobVersionedHashes < "u" && (t.blobVersionedHashes = e.blobVersionedHashes), typeof e.blobs < "u" && (typeof e.blobs[0] != "string" ? t.blobs = e.blobs.map((r) => ne(r)) : t.blobs = e.blobs), typeof e.data < "u" && (t.data = e.data), typeof e.from < "u" && (t.from = e.from), typeof e.gas < "u" && (t.gas = P(e.gas)), typeof e.gasPrice < "u" && (t.gasPrice = P(e.gasPrice)), typeof e.maxFeePerBlobGas < "u" && (t.maxFeePerBlobGas = P(e.maxFeePerBlobGas)), typeof e.maxFeePerGas < "u" && (t.maxFeePerGas = P(e.maxFeePerGas)), typeof e.maxPriorityFeePerGas < "u" && (t.maxPriorityFeePerGas = P(e.maxPriorityFeePerGas)), typeof e.nonce < "u" && (t.nonce = P(e.nonce)), typeof e.to < "u" && (t.to = e.to), typeof e.type < "u" && (t.type = ri[e.type]), typeof e.value < "u" && (t.value = P(e.value)), t;
|
|
1019
1019
|
}
|
|
1020
|
-
function
|
|
1020
|
+
function ii(e) {
|
|
1021
1021
|
return e.map((n) => ({
|
|
1022
1022
|
address: n.address,
|
|
1023
1023
|
r: n.r ? P(BigInt(n.r)) : n.r,
|
|
@@ -1039,17 +1039,17 @@ class lt extends h {
|
|
|
1039
1039
|
});
|
|
1040
1040
|
}
|
|
1041
1041
|
}
|
|
1042
|
-
class
|
|
1042
|
+
class oi extends h {
|
|
1043
1043
|
constructor({ length: n, position: t }) {
|
|
1044
1044
|
super(`Position \`${t}\` is out of bounds (\`0 < position < ${n}\`).`, { name: "PositionOutOfBoundsError" });
|
|
1045
1045
|
}
|
|
1046
1046
|
}
|
|
1047
|
-
class
|
|
1047
|
+
class ci extends h {
|
|
1048
1048
|
constructor({ count: n, limit: t }) {
|
|
1049
1049
|
super(`Recursive read limit of \`${t}\` exceeded (recursive read count: \`${n}\`).`, { name: "RecursiveReadLimitExceededError" });
|
|
1050
1050
|
}
|
|
1051
1051
|
}
|
|
1052
|
-
const
|
|
1052
|
+
const ai = {
|
|
1053
1053
|
bytes: new Uint8Array(),
|
|
1054
1054
|
dataView: new DataView(new ArrayBuffer(0)),
|
|
1055
1055
|
position: 0,
|
|
@@ -1058,14 +1058,14 @@ const ci = {
|
|
|
1058
1058
|
recursiveReadLimit: Number.POSITIVE_INFINITY,
|
|
1059
1059
|
assertReadLimit() {
|
|
1060
1060
|
if (this.recursiveReadCount >= this.recursiveReadLimit)
|
|
1061
|
-
throw new
|
|
1061
|
+
throw new ci({
|
|
1062
1062
|
count: this.recursiveReadCount + 1,
|
|
1063
1063
|
limit: this.recursiveReadLimit
|
|
1064
1064
|
});
|
|
1065
1065
|
},
|
|
1066
1066
|
assertPosition(e) {
|
|
1067
1067
|
if (e < 0 || e > this.bytes.length - 1)
|
|
1068
|
-
throw new
|
|
1068
|
+
throw new oi({
|
|
1069
1069
|
length: this.bytes.length,
|
|
1070
1070
|
position: e
|
|
1071
1071
|
});
|
|
@@ -1171,19 +1171,19 @@ const ci = {
|
|
|
1171
1171
|
this.positionReadCount.set(this.position, e + 1), e > 0 && this.recursiveReadCount++;
|
|
1172
1172
|
}
|
|
1173
1173
|
};
|
|
1174
|
-
function
|
|
1175
|
-
const t = Object.create(
|
|
1174
|
+
function _t(e, { recursiveReadLimit: n = 8192 } = {}) {
|
|
1175
|
+
const t = Object.create(ai);
|
|
1176
1176
|
return t.bytes = e, t.dataView = new DataView(e.buffer, e.byteOffset, e.byteLength), t.positionReadCount = /* @__PURE__ */ new Map(), t.recursiveReadLimit = n, t;
|
|
1177
1177
|
}
|
|
1178
1178
|
function Ae(e, n = "hex") {
|
|
1179
|
-
const t =
|
|
1179
|
+
const t = $t(e), r = _t(new Uint8Array(t.length));
|
|
1180
1180
|
return t.encode(r), n === "hex" ? ne(r.bytes) : r.bytes;
|
|
1181
1181
|
}
|
|
1182
|
-
function
|
|
1183
|
-
return Array.isArray(e) ?
|
|
1182
|
+
function $t(e) {
|
|
1183
|
+
return Array.isArray(e) ? li(e.map((n) => $t(n))) : di(e);
|
|
1184
1184
|
}
|
|
1185
|
-
function
|
|
1186
|
-
const n = e.reduce((s, i) => s + i.length, 0), t =
|
|
1185
|
+
function li(e) {
|
|
1186
|
+
const n = e.reduce((s, i) => s + i.length, 0), t = er(n);
|
|
1187
1187
|
return {
|
|
1188
1188
|
length: n <= 55 ? 1 + n : 1 + t + n,
|
|
1189
1189
|
encode(s) {
|
|
@@ -1193,8 +1193,8 @@ function ai(e) {
|
|
|
1193
1193
|
}
|
|
1194
1194
|
};
|
|
1195
1195
|
}
|
|
1196
|
-
function
|
|
1197
|
-
const n = typeof e == "string" ? de(e) : e, t =
|
|
1196
|
+
function di(e) {
|
|
1197
|
+
const n = typeof e == "string" ? de(e) : e, t = er(n.length);
|
|
1198
1198
|
return {
|
|
1199
1199
|
length: n.length === 1 && n[0] < 128 ? 1 : n.length <= 55 ? 1 + n.length : 1 + t + n.length,
|
|
1200
1200
|
encode(s) {
|
|
@@ -1202,7 +1202,7 @@ function li(e) {
|
|
|
1202
1202
|
}
|
|
1203
1203
|
};
|
|
1204
1204
|
}
|
|
1205
|
-
function
|
|
1205
|
+
function er(e) {
|
|
1206
1206
|
if (e < 2 ** 8)
|
|
1207
1207
|
return 1;
|
|
1208
1208
|
if (e < 2 ** 16)
|
|
@@ -1213,14 +1213,14 @@ function $t(e) {
|
|
|
1213
1213
|
return 4;
|
|
1214
1214
|
throw new h("Length is too large.");
|
|
1215
1215
|
}
|
|
1216
|
-
const
|
|
1216
|
+
const Ai = {
|
|
1217
1217
|
gwei: 9,
|
|
1218
1218
|
wei: 18
|
|
1219
|
-
},
|
|
1219
|
+
}, fi = {
|
|
1220
1220
|
ether: -9,
|
|
1221
1221
|
wei: 9
|
|
1222
1222
|
};
|
|
1223
|
-
function
|
|
1223
|
+
function nr(e, n) {
|
|
1224
1224
|
let t = e.toString();
|
|
1225
1225
|
const r = t.startsWith("-");
|
|
1226
1226
|
r && (t = t.slice(1)), t = t.padStart(n, "0");
|
|
@@ -1230,18 +1230,18 @@ function er(e, n) {
|
|
|
1230
1230
|
];
|
|
1231
1231
|
return i = i.replace(/(0+)$/, ""), `${r ? "-" : ""}${s || "0"}${i ? `.${i}` : ""}`;
|
|
1232
1232
|
}
|
|
1233
|
-
function
|
|
1234
|
-
return
|
|
1233
|
+
function ui(e, n = "wei") {
|
|
1234
|
+
return nr(e, Ai[n]);
|
|
1235
1235
|
}
|
|
1236
1236
|
function ce(e, n = "wei") {
|
|
1237
|
-
return
|
|
1237
|
+
return nr(e, fi[n]);
|
|
1238
1238
|
}
|
|
1239
|
-
function
|
|
1239
|
+
function tr(e) {
|
|
1240
1240
|
const n = Object.entries(e).map(([r, s]) => s === void 0 || s === !1 ? null : [r, s]).filter(Boolean), t = n.reduce((r, [s]) => Math.max(r, s.length), 0);
|
|
1241
1241
|
return n.map(([r, s]) => ` ${`${r}:`.padEnd(t + 1)} ${s}`).join(`
|
|
1242
1242
|
`);
|
|
1243
1243
|
}
|
|
1244
|
-
class
|
|
1244
|
+
class gi extends h {
|
|
1245
1245
|
constructor() {
|
|
1246
1246
|
super([
|
|
1247
1247
|
"Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.",
|
|
@@ -1250,20 +1250,20 @@ class ui extends h {
|
|
|
1250
1250
|
`), { name: "FeeConflictError" });
|
|
1251
1251
|
}
|
|
1252
1252
|
}
|
|
1253
|
-
class
|
|
1253
|
+
class vi extends h {
|
|
1254
1254
|
constructor({ v: n }) {
|
|
1255
1255
|
super(`Invalid \`v\` value "${n}". Expected 27 or 28.`, {
|
|
1256
1256
|
name: "InvalidLegacyVError"
|
|
1257
1257
|
});
|
|
1258
1258
|
}
|
|
1259
1259
|
}
|
|
1260
|
-
class
|
|
1260
|
+
class mi extends h {
|
|
1261
1261
|
constructor({ transaction: n }) {
|
|
1262
1262
|
super("Cannot infer a transaction type from provided transaction.", {
|
|
1263
1263
|
metaMessages: [
|
|
1264
1264
|
"Provided Transaction:",
|
|
1265
1265
|
"{",
|
|
1266
|
-
|
|
1266
|
+
tr(n),
|
|
1267
1267
|
"}",
|
|
1268
1268
|
"",
|
|
1269
1269
|
"To infer the type, either provide:",
|
|
@@ -1278,12 +1278,12 @@ class vi extends h {
|
|
|
1278
1278
|
});
|
|
1279
1279
|
}
|
|
1280
1280
|
}
|
|
1281
|
-
class
|
|
1281
|
+
class pi extends h {
|
|
1282
1282
|
constructor({ storageKey: n }) {
|
|
1283
1283
|
super(`Size for storage key "${n}" is invalid. Expected 32 bytes. Got ${Math.floor((n.length - 2) / 2)} bytes.`, { name: "InvalidStorageKeySizeError" });
|
|
1284
1284
|
}
|
|
1285
1285
|
}
|
|
1286
|
-
function
|
|
1286
|
+
function Ci(e) {
|
|
1287
1287
|
if (!e || e.length === 0)
|
|
1288
1288
|
return [];
|
|
1289
1289
|
const n = [];
|
|
@@ -1298,13 +1298,13 @@ function pi(e) {
|
|
|
1298
1298
|
}
|
|
1299
1299
|
return n;
|
|
1300
1300
|
}
|
|
1301
|
-
function
|
|
1301
|
+
function rr(e) {
|
|
1302
1302
|
const { kzg: n } = e, t = e.to ?? (typeof e.blobs[0] == "string" ? "hex" : "bytes"), r = typeof e.blobs[0] == "string" ? e.blobs.map((i) => de(i)) : e.blobs, s = [];
|
|
1303
1303
|
for (const i of r)
|
|
1304
1304
|
s.push(Uint8Array.from(n.blobToKzgCommitment(i)));
|
|
1305
1305
|
return t === "bytes" ? s : s.map((i) => ne(i));
|
|
1306
1306
|
}
|
|
1307
|
-
function
|
|
1307
|
+
function sr(e) {
|
|
1308
1308
|
const { kzg: n } = e, t = e.to ?? (typeof e.blobs[0] == "string" ? "hex" : "bytes"), r = typeof e.blobs[0] == "string" ? e.blobs.map((a) => de(a)) : e.blobs, s = typeof e.commitments[0] == "string" ? e.commitments.map((a) => de(a)) : e.commitments, i = [];
|
|
1309
1309
|
for (let a = 0; a < r.length; a++) {
|
|
1310
1310
|
const c = r[a], l = s[a];
|
|
@@ -1312,7 +1312,7 @@ function rr(e) {
|
|
|
1312
1312
|
}
|
|
1313
1313
|
return t === "bytes" ? i : i.map((a) => ne(a));
|
|
1314
1314
|
}
|
|
1315
|
-
function
|
|
1315
|
+
function xi(e) {
|
|
1316
1316
|
return e instanceof Uint8Array || ArrayBuffer.isView(e) && e.constructor.name === "Uint8Array";
|
|
1317
1317
|
}
|
|
1318
1318
|
function dt(e) {
|
|
@@ -1320,7 +1320,7 @@ function dt(e) {
|
|
|
1320
1320
|
throw new Error("positive integer expected, got " + e);
|
|
1321
1321
|
}
|
|
1322
1322
|
function je(e, ...n) {
|
|
1323
|
-
if (!
|
|
1323
|
+
if (!xi(e))
|
|
1324
1324
|
throw new Error("Uint8Array expected");
|
|
1325
1325
|
if (n.length > 0 && !n.includes(e.length))
|
|
1326
1326
|
throw new Error("Uint8Array expected of length " + n + ", got length=" + e.length);
|
|
@@ -1331,13 +1331,13 @@ function en(e, n = !0) {
|
|
|
1331
1331
|
if (n && e.finished)
|
|
1332
1332
|
throw new Error("Hash#digest() has already been called");
|
|
1333
1333
|
}
|
|
1334
|
-
function
|
|
1334
|
+
function ir(e, n) {
|
|
1335
1335
|
je(e);
|
|
1336
1336
|
const t = n.outputLen;
|
|
1337
1337
|
if (e.length < t)
|
|
1338
1338
|
throw new Error("digestInto() expects output buffer of length at least " + t);
|
|
1339
1339
|
}
|
|
1340
|
-
function
|
|
1340
|
+
function bi(e) {
|
|
1341
1341
|
return new Uint32Array(e.buffer, e.byteOffset, Math.floor(e.byteLength / 4));
|
|
1342
1342
|
}
|
|
1343
1343
|
function Te(...e) {
|
|
@@ -1350,43 +1350,43 @@ function vn(e) {
|
|
|
1350
1350
|
function K(e, n) {
|
|
1351
1351
|
return e << 32 - n | e >>> n;
|
|
1352
1352
|
}
|
|
1353
|
-
const
|
|
1354
|
-
function
|
|
1353
|
+
const zi = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
|
|
1354
|
+
function Ii(e) {
|
|
1355
1355
|
return e << 24 & 4278190080 | e << 8 & 16711680 | e >>> 8 & 65280 | e >>> 24 & 255;
|
|
1356
1356
|
}
|
|
1357
|
-
function
|
|
1357
|
+
function wi(e) {
|
|
1358
1358
|
for (let n = 0; n < e.length; n++)
|
|
1359
|
-
e[n] =
|
|
1359
|
+
e[n] = Ii(e[n]);
|
|
1360
1360
|
return e;
|
|
1361
1361
|
}
|
|
1362
|
-
const At =
|
|
1363
|
-
function
|
|
1362
|
+
const At = zi ? (e) => e : wi;
|
|
1363
|
+
function Pi(e) {
|
|
1364
1364
|
if (typeof e != "string")
|
|
1365
1365
|
throw new Error("string expected");
|
|
1366
1366
|
return new Uint8Array(new TextEncoder().encode(e));
|
|
1367
1367
|
}
|
|
1368
1368
|
function Hn(e) {
|
|
1369
|
-
return typeof e == "string" && (e =
|
|
1369
|
+
return typeof e == "string" && (e = Pi(e)), je(e), e;
|
|
1370
1370
|
}
|
|
1371
|
-
class
|
|
1371
|
+
class or {
|
|
1372
1372
|
}
|
|
1373
|
-
function
|
|
1373
|
+
function cr(e) {
|
|
1374
1374
|
const n = (r) => e().update(Hn(r)).digest(), t = e();
|
|
1375
1375
|
return n.outputLen = t.outputLen, n.blockLen = t.blockLen, n.create = () => e(), n;
|
|
1376
1376
|
}
|
|
1377
|
-
function
|
|
1377
|
+
function yi(e, n, t, r) {
|
|
1378
1378
|
if (typeof e.setBigUint64 == "function")
|
|
1379
1379
|
return e.setBigUint64(n, t, r);
|
|
1380
1380
|
const s = BigInt(32), i = BigInt(4294967295), a = Number(t >> s & i), c = Number(t & i), l = r ? 4 : 0, A = r ? 0 : 4;
|
|
1381
1381
|
e.setUint32(n + l, a, r), e.setUint32(n + A, c, r);
|
|
1382
1382
|
}
|
|
1383
|
-
function
|
|
1383
|
+
function Bi(e, n, t) {
|
|
1384
1384
|
return e & n ^ ~e & t;
|
|
1385
1385
|
}
|
|
1386
|
-
function
|
|
1386
|
+
function hi(e, n, t) {
|
|
1387
1387
|
return e & n ^ e & t ^ n & t;
|
|
1388
1388
|
}
|
|
1389
|
-
class
|
|
1389
|
+
class Wi extends or {
|
|
1390
1390
|
constructor(n, t, r, s) {
|
|
1391
1391
|
super(), this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.blockLen = n, this.outputLen = t, this.padOffset = r, this.isLE = s, this.buffer = new Uint8Array(n), this.view = vn(this.buffer);
|
|
1392
1392
|
}
|
|
@@ -1406,13 +1406,13 @@ class hi extends ir {
|
|
|
1406
1406
|
return this.length += n.length, this.roundClean(), this;
|
|
1407
1407
|
}
|
|
1408
1408
|
digestInto(n) {
|
|
1409
|
-
en(this),
|
|
1409
|
+
en(this), ir(n, this), this.finished = !0;
|
|
1410
1410
|
const { buffer: t, view: r, blockLen: s, isLE: i } = this;
|
|
1411
1411
|
let { pos: a } = this;
|
|
1412
1412
|
t[a++] = 128, Te(this.buffer.subarray(a)), this.padOffset > s - a && (this.process(r, 0), a = 0);
|
|
1413
1413
|
for (let f = a; f < s; f++)
|
|
1414
1414
|
t[f] = 0;
|
|
1415
|
-
|
|
1415
|
+
yi(r, s - 8, BigInt(this.length * 8), i), this.process(r, 0);
|
|
1416
1416
|
const c = vn(n), l = this.outputLen;
|
|
1417
1417
|
if (l % 4)
|
|
1418
1418
|
throw new Error("_sha2: outputLen should be aligned to 32bit");
|
|
@@ -1447,19 +1447,19 @@ const te = /* @__PURE__ */ Uint32Array.from([
|
|
|
1447
1447
|
528734635,
|
|
1448
1448
|
1541459225
|
|
1449
1449
|
]), Ke = /* @__PURE__ */ BigInt(2 ** 32 - 1), ft = /* @__PURE__ */ BigInt(32);
|
|
1450
|
-
function
|
|
1450
|
+
function Mi(e, n = !1) {
|
|
1451
1451
|
return n ? { h: Number(e & Ke), l: Number(e >> ft & Ke) } : { h: Number(e >> ft & Ke) | 0, l: Number(e & Ke) | 0 };
|
|
1452
1452
|
}
|
|
1453
|
-
function
|
|
1453
|
+
function Vi(e, n = !1) {
|
|
1454
1454
|
const t = e.length;
|
|
1455
1455
|
let r = new Uint32Array(t), s = new Uint32Array(t);
|
|
1456
1456
|
for (let i = 0; i < t; i++) {
|
|
1457
|
-
const { h: a, l: c } =
|
|
1457
|
+
const { h: a, l: c } = Mi(e[i], n);
|
|
1458
1458
|
[r[i], s[i]] = [a, c];
|
|
1459
1459
|
}
|
|
1460
1460
|
return [r, s];
|
|
1461
1461
|
}
|
|
1462
|
-
const
|
|
1462
|
+
const Xi = (e, n, t) => e << t | n >>> 32 - t, Ni = (e, n, t) => n << t | e >>> 32 - t, ji = (e, n, t) => n << t - 32 | e >>> 64 - t, Ti = (e, n, t) => e << t - 32 | n >>> 64 - t, Ei = /* @__PURE__ */ Uint32Array.from([
|
|
1463
1463
|
1116352408,
|
|
1464
1464
|
1899447441,
|
|
1465
1465
|
3049323471,
|
|
@@ -1525,7 +1525,7 @@ const Vi = (e, n, t) => e << t | n >>> 32 - t, Xi = (e, n, t) => n << t | e >>>
|
|
|
1525
1525
|
3204031479,
|
|
1526
1526
|
3329325298
|
|
1527
1527
|
]), re = /* @__PURE__ */ new Uint32Array(64);
|
|
1528
|
-
class
|
|
1528
|
+
class Si extends Wi {
|
|
1529
1529
|
constructor(n = 32) {
|
|
1530
1530
|
super(64, n, 8, !1), this.A = te[0] | 0, this.B = te[1] | 0, this.C = te[2] | 0, this.D = te[3] | 0, this.E = te[4] | 0, this.F = te[5] | 0, this.G = te[6] | 0, this.H = te[7] | 0;
|
|
1531
1531
|
}
|
|
@@ -1541,13 +1541,13 @@ class Ei extends hi {
|
|
|
1541
1541
|
for (let f = 0; f < 16; f++, t += 4)
|
|
1542
1542
|
re[f] = n.getUint32(t, !1);
|
|
1543
1543
|
for (let f = 16; f < 64; f++) {
|
|
1544
|
-
const
|
|
1545
|
-
re[f] =
|
|
1544
|
+
const g = re[f - 15], m = re[f - 2], v = K(g, 7) ^ K(g, 18) ^ g >>> 3, u = K(m, 17) ^ K(m, 19) ^ m >>> 10;
|
|
1545
|
+
re[f] = u + re[f - 7] + v + re[f - 16] | 0;
|
|
1546
1546
|
}
|
|
1547
1547
|
let { A: r, B: s, C: i, D: a, E: c, F: l, G: A, H: d } = this;
|
|
1548
1548
|
for (let f = 0; f < 64; f++) {
|
|
1549
|
-
const
|
|
1550
|
-
d = A, A = l, l = c, c = a + m | 0, a = i, i = s, s = r, r = m +
|
|
1549
|
+
const g = K(c, 6) ^ K(c, 11) ^ K(c, 25), m = d + g + Bi(c, l, A) + Ei[f] + re[f] | 0, u = (K(r, 2) ^ K(r, 13) ^ K(r, 22)) + hi(r, s, i) | 0;
|
|
1550
|
+
d = A, A = l, l = c, c = a + m | 0, a = i, i = s, s = r, r = m + u | 0;
|
|
1551
1551
|
}
|
|
1552
1552
|
r = r + this.A | 0, s = s + this.B | 0, i = i + this.C | 0, a = a + this.D | 0, c = c + this.E | 0, l = l + this.F | 0, A = A + this.G | 0, d = d + this.H | 0, this.set(r, s, i, a, c, l, A, d);
|
|
1553
1553
|
}
|
|
@@ -1558,28 +1558,28 @@ class Ei extends hi {
|
|
|
1558
1558
|
this.set(0, 0, 0, 0, 0, 0, 0, 0), Te(this.buffer);
|
|
1559
1559
|
}
|
|
1560
1560
|
}
|
|
1561
|
-
const
|
|
1562
|
-
function
|
|
1563
|
-
return
|
|
1561
|
+
const Oi = /* @__PURE__ */ cr(() => new Si()), Li = Oi;
|
|
1562
|
+
function ki(e, n) {
|
|
1563
|
+
return Li(Oe(e, { strict: !1 }) ? Ut(e) : e);
|
|
1564
1564
|
}
|
|
1565
|
-
function
|
|
1566
|
-
const { commitment: n, version: t = 1 } = e, r = e.to ?? (typeof n == "string" ? "hex" : "bytes"), s =
|
|
1565
|
+
function Yi(e) {
|
|
1566
|
+
const { commitment: n, version: t = 1 } = e, r = e.to ?? (typeof n == "string" ? "hex" : "bytes"), s = ki(n);
|
|
1567
1567
|
return s.set([t], 0), r === "bytes" ? s : ne(s);
|
|
1568
1568
|
}
|
|
1569
|
-
function
|
|
1569
|
+
function Zi(e) {
|
|
1570
1570
|
const { commitments: n, version: t } = e, r = e.to ?? (typeof n[0] == "string" ? "hex" : "bytes"), s = [];
|
|
1571
1571
|
for (const i of n)
|
|
1572
|
-
s.push(
|
|
1572
|
+
s.push(Yi({
|
|
1573
1573
|
commitment: i,
|
|
1574
1574
|
to: r,
|
|
1575
1575
|
version: t
|
|
1576
1576
|
}));
|
|
1577
1577
|
return s;
|
|
1578
1578
|
}
|
|
1579
|
-
const ut = 6,
|
|
1579
|
+
const ut = 6, ar = 32, Qn = 4096, lr = ar * Qn, gt = lr * ut - // terminator byte (0x80).
|
|
1580
1580
|
1 - // zero byte (0x00) appended to each field element.
|
|
1581
|
-
1 * Qn * ut,
|
|
1582
|
-
class
|
|
1581
|
+
1 * Qn * ut, dr = 1;
|
|
1582
|
+
class Fi extends h {
|
|
1583
1583
|
constructor({ maxSize: n, size: t }) {
|
|
1584
1584
|
super("Blob size is too large.", {
|
|
1585
1585
|
metaMessages: [`Max: ${n} bytes`, `Given: ${t} bytes`],
|
|
@@ -1587,12 +1587,12 @@ class Zi extends h {
|
|
|
1587
1587
|
});
|
|
1588
1588
|
}
|
|
1589
1589
|
}
|
|
1590
|
-
class
|
|
1590
|
+
class Ar extends h {
|
|
1591
1591
|
constructor() {
|
|
1592
1592
|
super("Blob data must not be empty.", { name: "EmptyBlobError" });
|
|
1593
1593
|
}
|
|
1594
1594
|
}
|
|
1595
|
-
class
|
|
1595
|
+
class Ji extends h {
|
|
1596
1596
|
constructor({ hash: n, size: t }) {
|
|
1597
1597
|
super(`Versioned hash "${n}" size is invalid.`, {
|
|
1598
1598
|
metaMessages: ["Expected: 32", `Received: ${t}`],
|
|
@@ -1600,33 +1600,33 @@ class Fi extends h {
|
|
|
1600
1600
|
});
|
|
1601
1601
|
}
|
|
1602
1602
|
}
|
|
1603
|
-
class
|
|
1603
|
+
class Di extends h {
|
|
1604
1604
|
constructor({ hash: n, version: t }) {
|
|
1605
1605
|
super(`Versioned hash "${n}" version is invalid.`, {
|
|
1606
1606
|
metaMessages: [
|
|
1607
|
-
`Expected: ${
|
|
1607
|
+
`Expected: ${dr}`,
|
|
1608
1608
|
`Received: ${t}`
|
|
1609
1609
|
],
|
|
1610
1610
|
name: "InvalidVersionedHashVersionError"
|
|
1611
1611
|
});
|
|
1612
1612
|
}
|
|
1613
1613
|
}
|
|
1614
|
-
function
|
|
1614
|
+
function Hi(e) {
|
|
1615
1615
|
const n = e.to ?? (typeof e.data == "string" ? "hex" : "bytes"), t = typeof e.data == "string" ? de(e.data) : e.data, r = ze(t);
|
|
1616
1616
|
if (!r)
|
|
1617
|
-
throw new
|
|
1617
|
+
throw new Ar();
|
|
1618
1618
|
if (r > gt)
|
|
1619
|
-
throw new
|
|
1619
|
+
throw new Fi({
|
|
1620
1620
|
maxSize: gt,
|
|
1621
1621
|
size: r
|
|
1622
1622
|
});
|
|
1623
1623
|
const s = [];
|
|
1624
1624
|
let i = !0, a = 0;
|
|
1625
1625
|
for (; i; ) {
|
|
1626
|
-
const c =
|
|
1626
|
+
const c = _t(new Uint8Array(lr));
|
|
1627
1627
|
let l = 0;
|
|
1628
1628
|
for (; l < Qn; ) {
|
|
1629
|
-
const A = t.slice(a, a + (
|
|
1629
|
+
const A = t.slice(a, a + (ar - 1));
|
|
1630
1630
|
if (c.pushByte(0), c.pushBytes(A), A.length < 31) {
|
|
1631
1631
|
c.pushByte(128), i = !1;
|
|
1632
1632
|
break;
|
|
@@ -1637,8 +1637,8 @@ function Di(e) {
|
|
|
1637
1637
|
}
|
|
1638
1638
|
return n === "bytes" ? s.map((c) => c.bytes) : s.map((c) => ne(c.bytes));
|
|
1639
1639
|
}
|
|
1640
|
-
function
|
|
1641
|
-
const { data: n, kzg: t, to: r } = e, s = e.blobs ??
|
|
1640
|
+
function Qi(e) {
|
|
1641
|
+
const { data: n, kzg: t, to: r } = e, s = e.blobs ?? Hi({ data: n, to: r }), i = e.commitments ?? rr({ blobs: s, kzg: t, to: r }), a = e.proofs ?? sr({ blobs: s, commitments: i, kzg: t, to: r }), c = [];
|
|
1642
1642
|
for (let l = 0; l < s.length; l++)
|
|
1643
1643
|
c.push({
|
|
1644
1644
|
blob: s[l],
|
|
@@ -1835,7 +1835,7 @@ Object.defineProperty(Ee, "nodeMessage", {
|
|
|
1835
1835
|
writable: !0,
|
|
1836
1836
|
value: /max priority fee per gas higher than max fee per gas|tip higher than fee cap/
|
|
1837
1837
|
});
|
|
1838
|
-
class
|
|
1838
|
+
class fr extends h {
|
|
1839
1839
|
constructor({ cause: n }) {
|
|
1840
1840
|
super(`An error occurred while executing: ${n?.shortMessage}`, {
|
|
1841
1841
|
cause: n,
|
|
@@ -1843,7 +1843,7 @@ class Ar extends h {
|
|
|
1843
1843
|
});
|
|
1844
1844
|
}
|
|
1845
1845
|
}
|
|
1846
|
-
class
|
|
1846
|
+
class ur extends Map {
|
|
1847
1847
|
constructor(n) {
|
|
1848
1848
|
super(), Object.defineProperty(this, "maxSize", {
|
|
1849
1849
|
enumerable: !0,
|
|
@@ -1864,28 +1864,28 @@ class fr extends Map {
|
|
|
1864
1864
|
return this;
|
|
1865
1865
|
}
|
|
1866
1866
|
}
|
|
1867
|
-
const
|
|
1867
|
+
const Ki = BigInt(0), Be = BigInt(1), qi = BigInt(2), Ui = BigInt(7), Gi = BigInt(256), Ri = BigInt(113), gr = [], vr = [], mr = [];
|
|
1868
1868
|
for (let e = 0, n = Be, t = 1, r = 0; e < 24; e++) {
|
|
1869
|
-
[t, r] = [r, (2 * t + 3 * r) % 5],
|
|
1870
|
-
let s =
|
|
1869
|
+
[t, r] = [r, (2 * t + 3 * r) % 5], gr.push(2 * (5 * r + t)), vr.push((e + 1) * (e + 2) / 2 % 64);
|
|
1870
|
+
let s = Ki;
|
|
1871
1871
|
for (let i = 0; i < 7; i++)
|
|
1872
|
-
n = (n << Be ^ (n >>
|
|
1873
|
-
|
|
1872
|
+
n = (n << Be ^ (n >> Ui) * Ri) % Gi, n & qi && (s ^= Be << (Be << /* @__PURE__ */ BigInt(i)) - Be);
|
|
1873
|
+
mr.push(s);
|
|
1874
1874
|
}
|
|
1875
|
-
const
|
|
1876
|
-
function
|
|
1875
|
+
const pr = Vi(mr, !0), _i = pr[0], $i = pr[1], vt = (e, n, t) => t > 32 ? ji(e, n, t) : Xi(e, n, t), mt = (e, n, t) => t > 32 ? Ti(e, n, t) : Ni(e, n, t);
|
|
1876
|
+
function eo(e, n = 24) {
|
|
1877
1877
|
const t = new Uint32Array(10);
|
|
1878
1878
|
for (let r = 24 - n; r < 24; r++) {
|
|
1879
1879
|
for (let a = 0; a < 10; a++)
|
|
1880
1880
|
t[a] = e[a] ^ e[a + 10] ^ e[a + 20] ^ e[a + 30] ^ e[a + 40];
|
|
1881
1881
|
for (let a = 0; a < 10; a += 2) {
|
|
1882
|
-
const c = (a + 8) % 10, l = (a + 2) % 10, A = t[l], d = t[l + 1], f = vt(A, d, 1) ^ t[c],
|
|
1882
|
+
const c = (a + 8) % 10, l = (a + 2) % 10, A = t[l], d = t[l + 1], f = vt(A, d, 1) ^ t[c], g = mt(A, d, 1) ^ t[c + 1];
|
|
1883
1883
|
for (let m = 0; m < 50; m += 10)
|
|
1884
|
-
e[a + m] ^= f, e[a + m + 1] ^=
|
|
1884
|
+
e[a + m] ^= f, e[a + m + 1] ^= g;
|
|
1885
1885
|
}
|
|
1886
1886
|
let s = e[2], i = e[3];
|
|
1887
1887
|
for (let a = 0; a < 24; a++) {
|
|
1888
|
-
const c =
|
|
1888
|
+
const c = vr[a], l = vt(s, i, c), A = mt(s, i, c), d = gr[a];
|
|
1889
1889
|
s = e[d], i = e[d + 1], e[d] = l, e[d + 1] = A;
|
|
1890
1890
|
}
|
|
1891
1891
|
for (let a = 0; a < 50; a += 10) {
|
|
@@ -1894,22 +1894,22 @@ function $i(e, n = 24) {
|
|
|
1894
1894
|
for (let c = 0; c < 10; c++)
|
|
1895
1895
|
e[a + c] ^= ~t[(c + 2) % 10] & t[(c + 4) % 10];
|
|
1896
1896
|
}
|
|
1897
|
-
e[0] ^=
|
|
1897
|
+
e[0] ^= _i[r], e[1] ^= $i[r];
|
|
1898
1898
|
}
|
|
1899
1899
|
Te(t);
|
|
1900
1900
|
}
|
|
1901
|
-
class Kn extends
|
|
1901
|
+
class Kn extends or {
|
|
1902
1902
|
// NOTE: we accept arguments in bytes instead of bits here.
|
|
1903
1903
|
constructor(n, t, r, s = !1, i = 24) {
|
|
1904
1904
|
if (super(), this.pos = 0, this.posOut = 0, this.finished = !1, this.destroyed = !1, this.enableXOF = !1, this.blockLen = n, this.suffix = t, this.outputLen = r, this.enableXOF = s, this.rounds = i, dt(r), !(0 < n && n < 200))
|
|
1905
1905
|
throw new Error("only keccak-f1600 function is supported");
|
|
1906
|
-
this.state = new Uint8Array(200), this.state32 =
|
|
1906
|
+
this.state = new Uint8Array(200), this.state32 = bi(this.state);
|
|
1907
1907
|
}
|
|
1908
1908
|
clone() {
|
|
1909
1909
|
return this._cloneInto();
|
|
1910
1910
|
}
|
|
1911
1911
|
keccak() {
|
|
1912
|
-
At(this.state32),
|
|
1912
|
+
At(this.state32), eo(this.state32, this.rounds), At(this.state32), this.posOut = 0, this.pos = 0;
|
|
1913
1913
|
}
|
|
1914
1914
|
update(n) {
|
|
1915
1915
|
en(this), n = Hn(n), je(n);
|
|
@@ -1948,7 +1948,7 @@ class Kn extends ir {
|
|
|
1948
1948
|
return dt(n), this.xofInto(new Uint8Array(n));
|
|
1949
1949
|
}
|
|
1950
1950
|
digestInto(n) {
|
|
1951
|
-
if (
|
|
1951
|
+
if (ir(n, this), this.finished)
|
|
1952
1952
|
throw new Error("digest() was already called");
|
|
1953
1953
|
return this.writeInto(n), this.destroy(), n;
|
|
1954
1954
|
}
|
|
@@ -1963,52 +1963,52 @@ class Kn extends ir {
|
|
|
1963
1963
|
return n || (n = new Kn(t, r, s, a, i)), n.state32.set(this.state32), n.pos = this.pos, n.posOut = this.posOut, n.finished = this.finished, n.rounds = i, n.suffix = r, n.outputLen = s, n.enableXOF = a, n.destroyed = this.destroyed, n;
|
|
1964
1964
|
}
|
|
1965
1965
|
}
|
|
1966
|
-
const
|
|
1967
|
-
function to(e, n) {
|
|
1968
|
-
return no(Oe(e, { strict: !1 }) ? qt(e) : e);
|
|
1969
|
-
}
|
|
1970
|
-
const mn = /* @__PURE__ */ new fr(8192);
|
|
1966
|
+
const no = (e, n, t) => cr(() => new Kn(n, e, t)), to = no(1, 136, 256 / 8);
|
|
1971
1967
|
function ro(e, n) {
|
|
1968
|
+
return to(Oe(e, { strict: !1 }) ? Ut(e) : e);
|
|
1969
|
+
}
|
|
1970
|
+
const mn = /* @__PURE__ */ new ur(8192);
|
|
1971
|
+
function so(e, n) {
|
|
1972
1972
|
if (mn.has(`${e}.${n}`))
|
|
1973
1973
|
return mn.get(`${e}.${n}`);
|
|
1974
|
-
const t = e.substring(2).toLowerCase(), r =
|
|
1974
|
+
const t = e.substring(2).toLowerCase(), r = ro(Gt(t)), s = t.split("");
|
|
1975
1975
|
for (let a = 0; a < 40; a += 2)
|
|
1976
1976
|
r[a >> 1] >> 4 >= 8 && s[a] && (s[a] = s[a].toUpperCase()), (r[a >> 1] & 15) >= 8 && s[a + 1] && (s[a + 1] = s[a + 1].toUpperCase());
|
|
1977
1977
|
const i = `0x${s.join("")}`;
|
|
1978
1978
|
return mn.set(`${e}.${n}`, i), i;
|
|
1979
1979
|
}
|
|
1980
|
-
const
|
|
1980
|
+
const io = /^0x[a-fA-F0-9]{40}$/, pn = /* @__PURE__ */ new ur(8192);
|
|
1981
1981
|
function ee(e, n) {
|
|
1982
1982
|
const { strict: t = !0 } = n ?? {}, r = `${e}.${t}`;
|
|
1983
1983
|
if (pn.has(r))
|
|
1984
1984
|
return pn.get(r);
|
|
1985
|
-
const s =
|
|
1985
|
+
const s = io.test(e) ? e.toLowerCase() === e ? !0 : t ? so(e) === e : !0 : !1;
|
|
1986
1986
|
return pn.set(r, s), s;
|
|
1987
1987
|
}
|
|
1988
|
-
function
|
|
1989
|
-
return Oe(e, { strict: !1 }) ?
|
|
1988
|
+
function oo(e, n, t, { strict: r } = {}) {
|
|
1989
|
+
return Oe(e, { strict: !1 }) ? ao(e, n, t, {
|
|
1990
1990
|
strict: r
|
|
1991
|
-
}) :
|
|
1991
|
+
}) : co(e, n, t, {
|
|
1992
1992
|
strict: r
|
|
1993
1993
|
});
|
|
1994
1994
|
}
|
|
1995
|
-
function
|
|
1995
|
+
function Cr(e, n, t) {
|
|
1996
1996
|
if (ze(e) !== t - n)
|
|
1997
|
-
throw new
|
|
1997
|
+
throw new ks({
|
|
1998
1998
|
offset: t,
|
|
1999
1999
|
position: "end",
|
|
2000
2000
|
size: ze(e)
|
|
2001
2001
|
});
|
|
2002
2002
|
}
|
|
2003
|
-
function
|
|
2003
|
+
function co(e, n, t, { strict: r } = {}) {
|
|
2004
2004
|
const s = e.slice(n, t);
|
|
2005
|
-
return r &&
|
|
2005
|
+
return r && Cr(s, n, t), s;
|
|
2006
2006
|
}
|
|
2007
|
-
function
|
|
2007
|
+
function ao(e, n, t, { strict: r } = {}) {
|
|
2008
2008
|
const s = `0x${e.replace("0x", "").slice(n * 2, t * 2)}`;
|
|
2009
|
-
return r &&
|
|
2009
|
+
return r && Cr(s, n, t), s;
|
|
2010
2010
|
}
|
|
2011
|
-
function
|
|
2011
|
+
function lo(e) {
|
|
2012
2012
|
const { authorizationList: n } = e;
|
|
2013
2013
|
if (n)
|
|
2014
2014
|
for (const t of n) {
|
|
@@ -2020,17 +2020,17 @@ function ao(e) {
|
|
|
2020
2020
|
}
|
|
2021
2021
|
qn(e);
|
|
2022
2022
|
}
|
|
2023
|
-
function
|
|
2023
|
+
function Ao(e) {
|
|
2024
2024
|
const { blobVersionedHashes: n } = e;
|
|
2025
2025
|
if (n) {
|
|
2026
2026
|
if (n.length === 0)
|
|
2027
|
-
throw new
|
|
2027
|
+
throw new Ar();
|
|
2028
2028
|
for (const t of n) {
|
|
2029
|
-
const r = ze(t), s = $e(
|
|
2029
|
+
const r = ze(t), s = $e(oo(t, 0, 1));
|
|
2030
2030
|
if (r !== 32)
|
|
2031
|
-
throw new
|
|
2032
|
-
if (s !==
|
|
2033
|
-
throw new
|
|
2031
|
+
throw new Ji({ hash: t, size: r });
|
|
2032
|
+
if (s !== dr)
|
|
2033
|
+
throw new Di({
|
|
2034
2034
|
hash: t,
|
|
2035
2035
|
version: s
|
|
2036
2036
|
});
|
|
@@ -2049,7 +2049,7 @@ function qn(e) {
|
|
|
2049
2049
|
if (t && r && t > r)
|
|
2050
2050
|
throw new Ee({ maxFeePerGas: r, maxPriorityFeePerGas: t });
|
|
2051
2051
|
}
|
|
2052
|
-
function
|
|
2052
|
+
function fo(e) {
|
|
2053
2053
|
const { chainId: n, maxPriorityFeePerGas: t, gasPrice: r, maxFeePerGas: s, to: i } = e;
|
|
2054
2054
|
if (n <= 0)
|
|
2055
2055
|
throw new cn({ chainId: n });
|
|
@@ -2060,7 +2060,7 @@ function Ao(e) {
|
|
|
2060
2060
|
if (r && r > on)
|
|
2061
2061
|
throw new fe({ maxFeePerGas: r });
|
|
2062
2062
|
}
|
|
2063
|
-
function
|
|
2063
|
+
function uo(e) {
|
|
2064
2064
|
const { chainId: n, maxPriorityFeePerGas: t, gasPrice: r, maxFeePerGas: s, to: i } = e;
|
|
2065
2065
|
if (i && !ee(i))
|
|
2066
2066
|
throw new $({ address: i });
|
|
@@ -2071,7 +2071,7 @@ function fo(e) {
|
|
|
2071
2071
|
if (r && r > on)
|
|
2072
2072
|
throw new fe({ maxFeePerGas: r });
|
|
2073
2073
|
}
|
|
2074
|
-
function
|
|
2074
|
+
function go(e) {
|
|
2075
2075
|
if (e.type)
|
|
2076
2076
|
return e.type;
|
|
2077
2077
|
if (typeof e.authorizationList < "u")
|
|
@@ -2082,7 +2082,7 @@ function uo(e) {
|
|
|
2082
2082
|
return "eip1559";
|
|
2083
2083
|
if (typeof e.gasPrice < "u")
|
|
2084
2084
|
return typeof e.accessList < "u" ? "eip2930" : "legacy";
|
|
2085
|
-
throw new
|
|
2085
|
+
throw new mi({ transaction: e });
|
|
2086
2086
|
}
|
|
2087
2087
|
function an(e) {
|
|
2088
2088
|
if (!e || e.length === 0)
|
|
@@ -2092,21 +2092,21 @@ function an(e) {
|
|
|
2092
2092
|
const { address: r, storageKeys: s } = e[t];
|
|
2093
2093
|
for (let i = 0; i < s.length; i++)
|
|
2094
2094
|
if (s[i].length - 2 !== 64)
|
|
2095
|
-
throw new
|
|
2095
|
+
throw new pi({ storageKey: s[i] });
|
|
2096
2096
|
if (!ee(r, { strict: !1 }))
|
|
2097
2097
|
throw new $({ address: r });
|
|
2098
2098
|
n.push([r, s]);
|
|
2099
2099
|
}
|
|
2100
2100
|
return n;
|
|
2101
2101
|
}
|
|
2102
|
-
function go(e, n) {
|
|
2103
|
-
const t = uo(e);
|
|
2104
|
-
return t === "eip1559" ? po(e, n) : t === "eip2930" ? Co(e, n) : t === "eip4844" ? mo(e, n) : t === "eip7702" ? vo(e, n) : xo(e, n);
|
|
2105
|
-
}
|
|
2106
2102
|
function vo(e, n) {
|
|
2103
|
+
const t = go(e);
|
|
2104
|
+
return t === "eip1559" ? Co(e, n) : t === "eip2930" ? xo(e, n) : t === "eip4844" ? po(e, n) : t === "eip7702" ? mo(e, n) : bo(e, n);
|
|
2105
|
+
}
|
|
2106
|
+
function mo(e, n) {
|
|
2107
2107
|
const { authorizationList: t, chainId: r, gas: s, nonce: i, to: a, value: c, maxFeePerGas: l, maxPriorityFeePerGas: A, accessList: d, data: f } = e;
|
|
2108
|
-
|
|
2109
|
-
const
|
|
2108
|
+
lo(e);
|
|
2109
|
+
const g = an(d), m = Ci(t);
|
|
2110
2110
|
return Le([
|
|
2111
2111
|
"0x04",
|
|
2112
2112
|
Ae([
|
|
@@ -2118,29 +2118,29 @@ function vo(e, n) {
|
|
|
2118
2118
|
a ?? "0x",
|
|
2119
2119
|
c ? P(c) : "0x",
|
|
2120
2120
|
f ?? "0x",
|
|
2121
|
-
|
|
2121
|
+
g,
|
|
2122
2122
|
m,
|
|
2123
2123
|
...ke(e, n)
|
|
2124
2124
|
])
|
|
2125
2125
|
]);
|
|
2126
2126
|
}
|
|
2127
|
-
function
|
|
2127
|
+
function po(e, n) {
|
|
2128
2128
|
const { chainId: t, gas: r, nonce: s, to: i, value: a, maxFeePerBlobGas: c, maxFeePerGas: l, maxPriorityFeePerGas: A, accessList: d, data: f } = e;
|
|
2129
|
-
|
|
2130
|
-
let
|
|
2131
|
-
if (e.blobs && (typeof
|
|
2132
|
-
const w = typeof e.blobs[0] == "string" ? e.blobs : e.blobs.map((I) => ne(I)),
|
|
2129
|
+
Ao(e);
|
|
2130
|
+
let g = e.blobVersionedHashes, m = e.sidecars;
|
|
2131
|
+
if (e.blobs && (typeof g > "u" || typeof m > "u")) {
|
|
2132
|
+
const w = typeof e.blobs[0] == "string" ? e.blobs : e.blobs.map((I) => ne(I)), O = e.kzg, z = rr({
|
|
2133
2133
|
blobs: w,
|
|
2134
|
-
kzg:
|
|
2134
|
+
kzg: O
|
|
2135
2135
|
});
|
|
2136
|
-
if (typeof
|
|
2136
|
+
if (typeof g > "u" && (g = Zi({
|
|
2137
2137
|
commitments: z
|
|
2138
2138
|
})), typeof m > "u") {
|
|
2139
|
-
const I =
|
|
2140
|
-
m =
|
|
2139
|
+
const I = sr({ blobs: w, commitments: z, kzg: O });
|
|
2140
|
+
m = Qi({ blobs: w, commitments: z, proofs: I });
|
|
2141
2141
|
}
|
|
2142
2142
|
}
|
|
2143
|
-
const v = an(d),
|
|
2143
|
+
const v = an(d), u = [
|
|
2144
2144
|
P(t),
|
|
2145
2145
|
s ? P(s) : "0x",
|
|
2146
2146
|
A ? P(A) : "0x",
|
|
@@ -2151,24 +2151,24 @@ function mo(e, n) {
|
|
|
2151
2151
|
f ?? "0x",
|
|
2152
2152
|
v,
|
|
2153
2153
|
c ? P(c) : "0x",
|
|
2154
|
-
|
|
2154
|
+
g ?? [],
|
|
2155
2155
|
...ke(e, n)
|
|
2156
|
-
], p = [],
|
|
2156
|
+
], p = [], b = [], x = [];
|
|
2157
2157
|
if (m)
|
|
2158
2158
|
for (let w = 0; w < m.length; w++) {
|
|
2159
|
-
const { blob:
|
|
2160
|
-
p.push(
|
|
2159
|
+
const { blob: O, commitment: z, proof: I } = m[w];
|
|
2160
|
+
p.push(O), b.push(z), x.push(I);
|
|
2161
2161
|
}
|
|
2162
2162
|
return Le([
|
|
2163
2163
|
"0x03",
|
|
2164
2164
|
// If sidecars are enabled, envelope turns into a "wrapper":
|
|
2165
|
-
Ae(m ? [
|
|
2165
|
+
Ae(m ? [u, p, b, x] : u)
|
|
2166
2166
|
]);
|
|
2167
2167
|
}
|
|
2168
|
-
function
|
|
2168
|
+
function Co(e, n) {
|
|
2169
2169
|
const { chainId: t, gas: r, nonce: s, to: i, value: a, maxFeePerGas: c, maxPriorityFeePerGas: l, accessList: A, data: d } = e;
|
|
2170
2170
|
qn(e);
|
|
2171
|
-
const f = an(A),
|
|
2171
|
+
const f = an(A), g = [
|
|
2172
2172
|
P(t),
|
|
2173
2173
|
s ? P(s) : "0x",
|
|
2174
2174
|
l ? P(l) : "0x",
|
|
@@ -2182,12 +2182,12 @@ function po(e, n) {
|
|
|
2182
2182
|
];
|
|
2183
2183
|
return Le([
|
|
2184
2184
|
"0x02",
|
|
2185
|
-
Ae(
|
|
2185
|
+
Ae(g)
|
|
2186
2186
|
]);
|
|
2187
2187
|
}
|
|
2188
|
-
function
|
|
2188
|
+
function xo(e, n) {
|
|
2189
2189
|
const { chainId: t, gas: r, data: s, nonce: i, to: a, value: c, accessList: l, gasPrice: A } = e;
|
|
2190
|
-
|
|
2190
|
+
fo(e);
|
|
2191
2191
|
const d = an(l), f = [
|
|
2192
2192
|
P(t),
|
|
2193
2193
|
i ? P(i) : "0x",
|
|
@@ -2204,9 +2204,9 @@ function Co(e, n) {
|
|
|
2204
2204
|
Ae(f)
|
|
2205
2205
|
]);
|
|
2206
2206
|
}
|
|
2207
|
-
function
|
|
2207
|
+
function bo(e, n) {
|
|
2208
2208
|
const { chainId: t = 0, gas: r, data: s, nonce: i, to: a, value: c, gasPrice: l } = e;
|
|
2209
|
-
|
|
2209
|
+
uo(e);
|
|
2210
2210
|
let A = [
|
|
2211
2211
|
i ? P(i) : "0x",
|
|
2212
2212
|
l ? P(l) : "0x",
|
|
@@ -2223,14 +2223,14 @@ function xo(e, n) {
|
|
|
2223
2223
|
return BigInt(t * 2) + BigInt(35n + n.v - 27n);
|
|
2224
2224
|
const m = 27n + (n.v === 27n ? 0n : 1n);
|
|
2225
2225
|
if (n.v !== m)
|
|
2226
|
-
throw new
|
|
2226
|
+
throw new vi({ v: n.v });
|
|
2227
2227
|
return m;
|
|
2228
|
-
})(), f = _e(n.r),
|
|
2228
|
+
})(), f = _e(n.r), g = _e(n.s);
|
|
2229
2229
|
A = [
|
|
2230
2230
|
...A,
|
|
2231
2231
|
P(d),
|
|
2232
2232
|
f === "0x00" ? "0x" : f,
|
|
2233
|
-
|
|
2233
|
+
g === "0x00" ? "0x" : g
|
|
2234
2234
|
];
|
|
2235
2235
|
} else t > 0 && (A = [
|
|
2236
2236
|
...A,
|
|
@@ -2251,7 +2251,7 @@ function ke(e, n) {
|
|
|
2251
2251
|
const i = _e(t.r), a = _e(t.s);
|
|
2252
2252
|
return [typeof s == "number" ? s ? P(1) : "0x" : r === 0n ? "0x" : r === 1n ? P(1) : r === 27n ? "0x" : P(1), i === "0x00" ? "0x" : i, a === "0x00" ? "0x" : a];
|
|
2253
2253
|
}
|
|
2254
|
-
const
|
|
2254
|
+
const zo = {
|
|
2255
2255
|
gasPriceOracle: { address: "0x420000000000000000000000000000000000000F" },
|
|
2256
2256
|
l1Block: { address: "0x4200000000000000000000000000000000000015" },
|
|
2257
2257
|
l2CrossDomainMessenger: {
|
|
@@ -2262,8 +2262,8 @@ const bo = {
|
|
|
2262
2262
|
l2ToL1MessagePasser: {
|
|
2263
2263
|
address: "0x4200000000000000000000000000000000000016"
|
|
2264
2264
|
}
|
|
2265
|
-
},
|
|
2266
|
-
block: /* @__PURE__ */
|
|
2265
|
+
}, Io = {
|
|
2266
|
+
block: /* @__PURE__ */ _s({
|
|
2267
2267
|
format(e) {
|
|
2268
2268
|
return {
|
|
2269
2269
|
transactions: e.transactions?.map((t) => {
|
|
@@ -2276,13 +2276,13 @@ const bo = {
|
|
|
2276
2276
|
};
|
|
2277
2277
|
}
|
|
2278
2278
|
}),
|
|
2279
|
-
transaction: /* @__PURE__ */
|
|
2279
|
+
transaction: /* @__PURE__ */ Us({
|
|
2280
2280
|
format(e) {
|
|
2281
2281
|
const n = {};
|
|
2282
2282
|
return e.type === "0x7e" && (n.isSystemTx = e.isSystemTx, n.mint = e.mint ? pe(e.mint) : void 0, n.sourceHash = e.sourceHash, n.type = "deposit"), n;
|
|
2283
2283
|
}
|
|
2284
2284
|
}),
|
|
2285
|
-
transactionReceipt: /* @__PURE__ */
|
|
2285
|
+
transactionReceipt: /* @__PURE__ */ ti({
|
|
2286
2286
|
format(e) {
|
|
2287
2287
|
return {
|
|
2288
2288
|
l1GasPrice: e.l1GasPrice ? pe(e.l1GasPrice) : null,
|
|
@@ -2293,14 +2293,14 @@ const bo = {
|
|
|
2293
2293
|
}
|
|
2294
2294
|
})
|
|
2295
2295
|
};
|
|
2296
|
-
function
|
|
2297
|
-
return
|
|
2296
|
+
function wo(e, n) {
|
|
2297
|
+
return Bo(e) ? yo(e) : vo(e, n);
|
|
2298
2298
|
}
|
|
2299
|
-
const
|
|
2300
|
-
transaction:
|
|
2299
|
+
const Po = {
|
|
2300
|
+
transaction: wo
|
|
2301
2301
|
};
|
|
2302
|
-
function
|
|
2303
|
-
|
|
2302
|
+
function yo(e) {
|
|
2303
|
+
ho(e);
|
|
2304
2304
|
const { sourceHash: n, data: t, from: r, gas: s, isSystemTx: i, mint: a, to: c, value: l } = e, A = [
|
|
2305
2305
|
n,
|
|
2306
2306
|
r,
|
|
@@ -2316,10 +2316,10 @@ function Po(e) {
|
|
|
2316
2316
|
Ae(A)
|
|
2317
2317
|
]);
|
|
2318
2318
|
}
|
|
2319
|
-
function
|
|
2319
|
+
function Bo(e) {
|
|
2320
2320
|
return e.type === "deposit" || typeof e.sourceHash < "u";
|
|
2321
2321
|
}
|
|
2322
|
-
function
|
|
2322
|
+
function ho(e) {
|
|
2323
2323
|
const { from: n, to: t } = e;
|
|
2324
2324
|
if (n && !ee(n))
|
|
2325
2325
|
throw new $({ address: n });
|
|
@@ -2328,10 +2328,10 @@ function Bo(e) {
|
|
|
2328
2328
|
}
|
|
2329
2329
|
const nn = {
|
|
2330
2330
|
blockTime: 2e3,
|
|
2331
|
-
contracts:
|
|
2332
|
-
formatters:
|
|
2333
|
-
serializers:
|
|
2334
|
-
},
|
|
2331
|
+
contracts: zo,
|
|
2332
|
+
formatters: Io,
|
|
2333
|
+
serializers: Po
|
|
2334
|
+
}, xr = /* @__PURE__ */ oe({
|
|
2335
2335
|
id: 42161,
|
|
2336
2336
|
name: "Arbitrum One",
|
|
2337
2337
|
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
@@ -2405,7 +2405,7 @@ const nn = {
|
|
|
2405
2405
|
({
|
|
2406
2406
|
...Un
|
|
2407
2407
|
});
|
|
2408
|
-
const
|
|
2408
|
+
const br = /* @__PURE__ */ oe({
|
|
2409
2409
|
id: 56,
|
|
2410
2410
|
name: "BNB Smart Chain",
|
|
2411
2411
|
blockTime: 750,
|
|
@@ -2434,7 +2434,7 @@ const xr = /* @__PURE__ */ oe({
|
|
|
2434
2434
|
function Gn(e) {
|
|
2435
2435
|
return typeof e == "string" ? { address: e, type: "json-rpc" } : e;
|
|
2436
2436
|
}
|
|
2437
|
-
class
|
|
2437
|
+
class Wo extends h {
|
|
2438
2438
|
constructor({ docsPath: n } = {}) {
|
|
2439
2439
|
super([
|
|
2440
2440
|
"Could not find an Account to execute with this Action.",
|
|
@@ -2451,7 +2451,7 @@ function pt(e) {
|
|
|
2451
2451
|
return e.reduce((n, { slot: t, value: r }) => `${n} ${t}: ${r}
|
|
2452
2452
|
`, "");
|
|
2453
2453
|
}
|
|
2454
|
-
function
|
|
2454
|
+
function Mo(e) {
|
|
2455
2455
|
return e.reduce((n, { address: t, ...r }) => {
|
|
2456
2456
|
let s = `${n} ${t}:
|
|
2457
2457
|
`;
|
|
@@ -2464,13 +2464,13 @@ function Wo(e) {
|
|
|
2464
2464
|
}, ` State Override:
|
|
2465
2465
|
`).slice(0, -1);
|
|
2466
2466
|
}
|
|
2467
|
-
class
|
|
2468
|
-
constructor(n, { account: t, docsPath: r, chain: s, data: i, gas: a, gasPrice: c, maxFeePerGas: l, maxPriorityFeePerGas: A, nonce: d, to: f, value:
|
|
2467
|
+
class Vo extends h {
|
|
2468
|
+
constructor(n, { account: t, docsPath: r, chain: s, data: i, gas: a, gasPrice: c, maxFeePerGas: l, maxPriorityFeePerGas: A, nonce: d, to: f, value: g, stateOverride: m }) {
|
|
2469
2469
|
const v = t ? Gn(t) : void 0;
|
|
2470
|
-
let
|
|
2470
|
+
let u = tr({
|
|
2471
2471
|
from: v?.address,
|
|
2472
2472
|
to: f,
|
|
2473
|
-
value: typeof
|
|
2473
|
+
value: typeof g < "u" && `${ui(g)} ${s?.nativeCurrency?.symbol || "ETH"}`,
|
|
2474
2474
|
data: i,
|
|
2475
2475
|
gas: a,
|
|
2476
2476
|
gasPrice: typeof c < "u" && `${ce(c)} gwei`,
|
|
@@ -2478,14 +2478,14 @@ class Mo extends h {
|
|
|
2478
2478
|
maxPriorityFeePerGas: typeof A < "u" && `${ce(A)} gwei`,
|
|
2479
2479
|
nonce: d
|
|
2480
2480
|
});
|
|
2481
|
-
m && (
|
|
2482
|
-
${
|
|
2481
|
+
m && (u += `
|
|
2482
|
+
${Mo(m)}`), super(n.shortMessage, {
|
|
2483
2483
|
cause: n,
|
|
2484
2484
|
docsPath: r,
|
|
2485
2485
|
metaMessages: [
|
|
2486
2486
|
...n.metaMessages ? [...n.metaMessages, " "] : [],
|
|
2487
2487
|
"Raw Call Arguments:",
|
|
2488
|
-
|
|
2488
|
+
u
|
|
2489
2489
|
].filter(Boolean),
|
|
2490
2490
|
name: "CallExecutionError"
|
|
2491
2491
|
}), Object.defineProperty(this, "cause", {
|
|
@@ -2496,7 +2496,7 @@ ${Wo(m)}`), super(n.shortMessage, {
|
|
|
2496
2496
|
}), this.cause = n;
|
|
2497
2497
|
}
|
|
2498
2498
|
}
|
|
2499
|
-
function
|
|
2499
|
+
function Xo(e, n) {
|
|
2500
2500
|
const t = (e.details || "").toLowerCase(), r = e instanceof h ? e.walk((s) => s?.code === Ce.code) : e;
|
|
2501
2501
|
return r instanceof h ? new Ce({
|
|
2502
2502
|
cause: e,
|
|
@@ -2514,21 +2514,21 @@ function Vo(e, n) {
|
|
|
2514
2514
|
cause: e,
|
|
2515
2515
|
maxFeePerGas: n?.maxFeePerGas,
|
|
2516
2516
|
maxPriorityFeePerGas: n?.maxPriorityFeePerGas
|
|
2517
|
-
}) : new
|
|
2517
|
+
}) : new fr({
|
|
2518
2518
|
cause: e
|
|
2519
2519
|
});
|
|
2520
2520
|
}
|
|
2521
|
-
function
|
|
2521
|
+
function No(e, { docsPath: n, ...t }) {
|
|
2522
2522
|
const r = (() => {
|
|
2523
|
-
const s =
|
|
2524
|
-
return s instanceof
|
|
2523
|
+
const s = Xo(e, t);
|
|
2524
|
+
return s instanceof fr ? e : s;
|
|
2525
2525
|
})();
|
|
2526
|
-
return new
|
|
2526
|
+
return new Vo(r, {
|
|
2527
2527
|
docsPath: n,
|
|
2528
2528
|
...t
|
|
2529
2529
|
});
|
|
2530
2530
|
}
|
|
2531
|
-
function
|
|
2531
|
+
function jo(e, { format: n }) {
|
|
2532
2532
|
if (!n)
|
|
2533
2533
|
return {};
|
|
2534
2534
|
const t = {};
|
|
@@ -2540,30 +2540,30 @@ function No(e, { format: n }) {
|
|
|
2540
2540
|
const s = n(e || {});
|
|
2541
2541
|
return r(s), t;
|
|
2542
2542
|
}
|
|
2543
|
-
function
|
|
2543
|
+
function To(e) {
|
|
2544
2544
|
const { account: n, gasPrice: t, maxFeePerGas: r, maxPriorityFeePerGas: s, to: i } = e, a = n ? Gn(n) : void 0;
|
|
2545
2545
|
if (a && !ee(a.address))
|
|
2546
2546
|
throw new $({ address: a.address });
|
|
2547
2547
|
if (i && !ee(i))
|
|
2548
2548
|
throw new $({ address: i });
|
|
2549
2549
|
if (typeof t < "u" && (typeof r < "u" || typeof s < "u"))
|
|
2550
|
-
throw new
|
|
2550
|
+
throw new gi();
|
|
2551
2551
|
if (r && r > on)
|
|
2552
2552
|
throw new fe({ maxFeePerGas: r });
|
|
2553
2553
|
if (s && r && s > r)
|
|
2554
2554
|
throw new Ee({ maxFeePerGas: r, maxPriorityFeePerGas: s });
|
|
2555
2555
|
}
|
|
2556
|
-
async function
|
|
2556
|
+
async function Eo(e, n) {
|
|
2557
2557
|
const { account: t = e.account } = n;
|
|
2558
2558
|
if (!t)
|
|
2559
|
-
throw new
|
|
2559
|
+
throw new Wo();
|
|
2560
2560
|
const r = Gn(t);
|
|
2561
2561
|
try {
|
|
2562
|
-
const { accessList: s, blockNumber: i, blockTag: a, data: c, gas: l, gasPrice: A, maxFeePerGas: d, maxPriorityFeePerGas: f, nonce:
|
|
2563
|
-
|
|
2564
|
-
const
|
|
2562
|
+
const { accessList: s, blockNumber: i, blockTag: a, data: c, gas: l, gasPrice: A, maxFeePerGas: d, maxPriorityFeePerGas: f, nonce: g, to: m, value: v, ...u } = n, b = (typeof i == "bigint" ? P(i) : void 0) || a;
|
|
2563
|
+
To(n);
|
|
2564
|
+
const x = e.chain?.formatters?.transactionRequest?.format, O = (x || si)({
|
|
2565
2565
|
// Pick out extra data that might exist on the chain's transaction request type.
|
|
2566
|
-
...
|
|
2566
|
+
...jo(u, { format: x }),
|
|
2567
2567
|
from: r?.address,
|
|
2568
2568
|
accessList: s,
|
|
2569
2569
|
data: c,
|
|
@@ -2571,12 +2571,12 @@ async function To(e, n) {
|
|
|
2571
2571
|
gasPrice: A,
|
|
2572
2572
|
maxFeePerGas: d,
|
|
2573
2573
|
maxPriorityFeePerGas: f,
|
|
2574
|
-
nonce:
|
|
2574
|
+
nonce: g,
|
|
2575
2575
|
to: m,
|
|
2576
2576
|
value: v
|
|
2577
2577
|
}, "estimateGas"), { baseFeePerGas: z, gasLimit: I, priorityFeePerGas: W } = await e.request({
|
|
2578
2578
|
method: "linea_estimateGas",
|
|
2579
|
-
params:
|
|
2579
|
+
params: b ? [O, b] : [O]
|
|
2580
2580
|
});
|
|
2581
2581
|
return {
|
|
2582
2582
|
baseFeePerGas: BigInt(z),
|
|
@@ -2584,14 +2584,14 @@ async function To(e, n) {
|
|
|
2584
2584
|
priorityFeePerGas: BigInt(W)
|
|
2585
2585
|
};
|
|
2586
2586
|
} catch (s) {
|
|
2587
|
-
throw
|
|
2587
|
+
throw No(s, {
|
|
2588
2588
|
...n,
|
|
2589
2589
|
account: r,
|
|
2590
2590
|
chain: e.chain
|
|
2591
2591
|
});
|
|
2592
2592
|
}
|
|
2593
2593
|
}
|
|
2594
|
-
const
|
|
2594
|
+
const So = {
|
|
2595
2595
|
fees: {
|
|
2596
2596
|
estimateFeesPerGas: Ct,
|
|
2597
2597
|
async maxPriorityFeePerGas({ block: e, client: n, request: t }) {
|
|
@@ -2608,7 +2608,7 @@ const Eo = {
|
|
|
2608
2608
|
};
|
|
2609
2609
|
async function Ct({ client: e, multiply: n, request: t, type: r }) {
|
|
2610
2610
|
try {
|
|
2611
|
-
const s = await
|
|
2611
|
+
const s = await Eo(e, {
|
|
2612
2612
|
...t,
|
|
2613
2613
|
account: t?.account
|
|
2614
2614
|
}), { priorityFeePerGas: i } = s, c = n(BigInt(s.baseFeePerGas)) + i;
|
|
@@ -2620,8 +2620,8 @@ async function Ct({ client: e, multiply: n, request: t, type: r }) {
|
|
|
2620
2620
|
return null;
|
|
2621
2621
|
}
|
|
2622
2622
|
}
|
|
2623
|
-
const
|
|
2624
|
-
...
|
|
2623
|
+
const zr = /* @__PURE__ */ oe({
|
|
2624
|
+
...So,
|
|
2625
2625
|
id: 59144,
|
|
2626
2626
|
name: "Linea Mainnet",
|
|
2627
2627
|
nativeCurrency: { name: "Linea Ether", symbol: "ETH", decimals: 18 },
|
|
@@ -2654,7 +2654,7 @@ const br = /* @__PURE__ */ oe({
|
|
|
2654
2654
|
},
|
|
2655
2655
|
ensTlds: [".linea.eth"],
|
|
2656
2656
|
testnet: !1
|
|
2657
|
-
}),
|
|
2657
|
+
}), Ir = /* @__PURE__ */ oe({
|
|
2658
2658
|
id: 1,
|
|
2659
2659
|
name: "Ethereum",
|
|
2660
2660
|
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
@@ -2681,7 +2681,7 @@ const br = /* @__PURE__ */ oe({
|
|
|
2681
2681
|
blockCreated: 14353601
|
|
2682
2682
|
}
|
|
2683
2683
|
}
|
|
2684
|
-
}), We = 1,
|
|
2684
|
+
}), We = 1, wr = /* @__PURE__ */ oe({
|
|
2685
2685
|
...nn,
|
|
2686
2686
|
id: 10,
|
|
2687
2687
|
name: "OP Mainnet",
|
|
@@ -2726,7 +2726,7 @@ const br = /* @__PURE__ */ oe({
|
|
|
2726
2726
|
}
|
|
2727
2727
|
},
|
|
2728
2728
|
sourceId: We
|
|
2729
|
-
}),
|
|
2729
|
+
}), Pr = /* @__PURE__ */ oe({
|
|
2730
2730
|
id: 137,
|
|
2731
2731
|
name: "Polygon",
|
|
2732
2732
|
nativeCurrency: { name: "POL", symbol: "POL", decimals: 18 },
|
|
@@ -2748,7 +2748,7 @@ const br = /* @__PURE__ */ oe({
|
|
|
2748
2748
|
blockCreated: 25770160
|
|
2749
2749
|
}
|
|
2750
2750
|
}
|
|
2751
|
-
}),
|
|
2751
|
+
}), Oo = {
|
|
2752
2752
|
id: 1,
|
|
2753
2753
|
name: "Solana",
|
|
2754
2754
|
nativeCurrency: {
|
|
@@ -2765,7 +2765,7 @@ const br = /* @__PURE__ */ oe({
|
|
|
2765
2765
|
icon: sn,
|
|
2766
2766
|
name: "Solana"
|
|
2767
2767
|
}
|
|
2768
|
-
},
|
|
2768
|
+
}, Lo = {
|
|
2769
2769
|
id: 1,
|
|
2770
2770
|
name: "Aptos",
|
|
2771
2771
|
nativeCurrency: {
|
|
@@ -2782,7 +2782,7 @@ const br = /* @__PURE__ */ oe({
|
|
|
2782
2782
|
icon: rn,
|
|
2783
2783
|
name: "Aptos"
|
|
2784
2784
|
}
|
|
2785
|
-
},
|
|
2785
|
+
}, ko = {
|
|
2786
2786
|
id: 1,
|
|
2787
2787
|
name: "Dogecoin",
|
|
2788
2788
|
nativeCurrency: {
|
|
@@ -2800,14 +2800,14 @@ const br = /* @__PURE__ */ oe({
|
|
|
2800
2800
|
name: "Dogecoin"
|
|
2801
2801
|
}
|
|
2802
2802
|
}, ie = {
|
|
2803
|
-
evm: [
|
|
2804
|
-
solana: [
|
|
2805
|
-
aptos: [
|
|
2806
|
-
dogecoin: [
|
|
2807
|
-
},
|
|
2808
|
-
const { apiChains: r = [] } = t || {}, s = r.length > 0 ?
|
|
2803
|
+
evm: [Ir, br, wr, xr, zr, Un, Pr],
|
|
2804
|
+
solana: [Oo],
|
|
2805
|
+
aptos: [Lo],
|
|
2806
|
+
dogecoin: [ko]
|
|
2807
|
+
}, yr = (e, n, t) => {
|
|
2808
|
+
const { apiChains: r = [] } = t || {}, s = r.length > 0 ? Ht(r) : le, i = [], a = e?.aptos || [];
|
|
2809
2809
|
a.length > 0 ? a.forEach((d) => {
|
|
2810
|
-
const f = r.find((
|
|
2810
|
+
const f = r.find((g) => H(g.chainId) === "aptos");
|
|
2811
2811
|
i.push({
|
|
2812
2812
|
...d,
|
|
2813
2813
|
chainId: f?.chainId || "aptos:1",
|
|
@@ -2837,29 +2837,29 @@ const br = /* @__PURE__ */ oe({
|
|
|
2837
2837
|
});
|
|
2838
2838
|
const c = e?.evm || ie?.evm || [];
|
|
2839
2839
|
c.length > 0 ? c.forEach((d) => {
|
|
2840
|
-
const f = `eip155:${d.id}`,
|
|
2840
|
+
const f = `eip155:${d.id}`, g = r.find((b) => b.chainId === f), m = `evm_${d.id}`, v = s[m] || le[m], u = g?.icon || (typeof v == "string" ? v : null), p = g?.rpcUrls || {
|
|
2841
2841
|
default: {
|
|
2842
2842
|
http: Array.isArray(d.rpcUrls?.default?.http) ? [...d.rpcUrls.default.http] : [],
|
|
2843
2843
|
webSocket: d.rpcUrls?.default?.webSocket ? [...d.rpcUrls.default.webSocket] : void 0
|
|
2844
2844
|
}
|
|
2845
2845
|
};
|
|
2846
2846
|
i.push({
|
|
2847
|
-
...
|
|
2847
|
+
...g,
|
|
2848
2848
|
...d,
|
|
2849
2849
|
chainId: f,
|
|
2850
|
-
icon:
|
|
2850
|
+
icon: u || "",
|
|
2851
2851
|
chainInfo: {
|
|
2852
|
-
icon:
|
|
2853
|
-
name:
|
|
2852
|
+
icon: u || null,
|
|
2853
|
+
name: g?.name || d.name || q?.evm?.name,
|
|
2854
2854
|
chainType: "evm"
|
|
2855
2855
|
},
|
|
2856
2856
|
chainType: "evm",
|
|
2857
2857
|
provider: n?.evm || null,
|
|
2858
|
-
nativeCurrency:
|
|
2858
|
+
nativeCurrency: g?.nativeCurrency || d.nativeCurrency,
|
|
2859
2859
|
rpcUrls: p,
|
|
2860
|
-
blockExplorers:
|
|
2861
|
-
contracts:
|
|
2862
|
-
blockTime:
|
|
2860
|
+
blockExplorers: g?.blockExplorers || d.blockExplorers,
|
|
2861
|
+
contracts: g?.contracts || d.contracts,
|
|
2862
|
+
blockTime: g?.blockTime || d.blockTime
|
|
2863
2863
|
});
|
|
2864
2864
|
}) : r.length > 0 && r.filter((d) => H(d.chainId) === "evm").forEach((d) => {
|
|
2865
2865
|
i.push({
|
|
@@ -2875,7 +2875,7 @@ const br = /* @__PURE__ */ oe({
|
|
|
2875
2875
|
});
|
|
2876
2876
|
const l = e?.solana || [];
|
|
2877
2877
|
l.length > 0 ? l.forEach((d) => {
|
|
2878
|
-
const f = r.find((
|
|
2878
|
+
const f = r.find((g) => H(g.chainId) === "solana");
|
|
2879
2879
|
i.push({
|
|
2880
2880
|
...d,
|
|
2881
2881
|
chainId: f?.chainId || "solana:mainnet-beta",
|
|
@@ -2905,7 +2905,7 @@ const br = /* @__PURE__ */ oe({
|
|
|
2905
2905
|
});
|
|
2906
2906
|
const A = e?.dogecoin || [];
|
|
2907
2907
|
return A.length > 0 ? A.forEach((d) => {
|
|
2908
|
-
const f = r.find((
|
|
2908
|
+
const f = r.find((g) => H(g.chainId) === "dogecoin");
|
|
2909
2909
|
i.push({
|
|
2910
2910
|
...d,
|
|
2911
2911
|
chainId: f?.chainId || "dogecoin:mainnet",
|
|
@@ -2935,14 +2935,14 @@ const br = /* @__PURE__ */ oe({
|
|
|
2935
2935
|
}), i;
|
|
2936
2936
|
};
|
|
2937
2937
|
var M = /* @__PURE__ */ ((e) => (e.Loading = "LOADING", e.WalletList = "WALLET_LIST", e.WalletSearch = "WALLET_SEARCH", e.WalletSelectProviders = "WALLET_SELECT_PROVIDERS", e.WalletInstallGuide = "WALLET_INSTALL_GUIDE", e.Connecting = "CONNECTING", e.Error = "ERROR", e.Account = "ACCOUNT", e.SelectChains = "SELECT_CHAINS", e.ChangeNetwork = "CHANGE_NETWORK", e.SignInWallet = "SIGN_IN_WALLET", e.WalletConnect = "WALLET_CONNECT", e.UnsupportChain = "UNSUPPORT_CHAIN", e.WalletHome = "WALLET_HOME", e))(M || {});
|
|
2938
|
-
const
|
|
2939
|
-
const i = y(() => n ? /* @__PURE__ */ o(
|
|
2938
|
+
const Yo = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton: s }) => {
|
|
2939
|
+
const i = y(() => n ? /* @__PURE__ */ o(L, { isIconOnly: !0, color: "default", size: "sm", variant: "light", onPress: n, radius: "full", className: "p-0", children: /* @__PURE__ */ o(Vt, {}) }) : null, [n]);
|
|
2940
2940
|
return /* @__PURE__ */ C("div", { className: "flex items-center justify-between px-0 py-3", children: [
|
|
2941
2941
|
i,
|
|
2942
2942
|
/* @__PURE__ */ o("div", { className: "font-medium text-lg", children: e }),
|
|
2943
2943
|
/* @__PURE__ */ C("div", { className: "flex items-center gap-3", children: [
|
|
2944
2944
|
r,
|
|
2945
|
-
s ? null : /* @__PURE__ */ o(
|
|
2945
|
+
s ? null : /* @__PURE__ */ o(L, { isIconOnly: !0, color: "default", size: "sm", variant: "light", onPress: t, radius: "full", className: "p-0", children: /* @__PURE__ */ o(Xt, { className: "text-xl" }) })
|
|
2946
2946
|
] })
|
|
2947
2947
|
] });
|
|
2948
2948
|
}, D = ({
|
|
@@ -2958,7 +2958,7 @@ const ko = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
2958
2958
|
throw new Error("WalletConnectContext not found");
|
|
2959
2959
|
return /* @__PURE__ */ C("div", { className: "flex flex-col gap-3 min-h-0 flex-1", children: [
|
|
2960
2960
|
/* @__PURE__ */ o(
|
|
2961
|
-
|
|
2961
|
+
Yo,
|
|
2962
2962
|
{
|
|
2963
2963
|
title: n,
|
|
2964
2964
|
onBack: t,
|
|
@@ -2971,50 +2971,50 @@ const ko = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
2971
2971
|
),
|
|
2972
2972
|
/* @__PURE__ */ o("div", { className: "flex-1 flex flex-col min-h-0", children: e })
|
|
2973
2973
|
] });
|
|
2974
|
-
},
|
|
2974
|
+
}, Zo = () => {
|
|
2975
2975
|
const e = V(N);
|
|
2976
2976
|
if (!e)
|
|
2977
2977
|
throw new Error("WalletConnectContext not found");
|
|
2978
|
-
const { copied: n, copy: t } = Zn(), { chains: r } =
|
|
2978
|
+
const { copied: n, copy: t } = Zn(), { chains: r } = Jt(), { account: s, disconnect: i } = e, a = s.currentWallet?.info?.name || "Wallet", c = s.currentWallet?.info?.icon, l = s.address, A = s.chainType, d = s.chainId, f = d && /^\d+$/.test(d) ? Number(d) : void 0, g = s.currentWallet, m = k(async () => {
|
|
2979
2979
|
try {
|
|
2980
2980
|
if (!l) return;
|
|
2981
2981
|
t(l);
|
|
2982
|
-
} catch (
|
|
2983
|
-
console.error("Failed to copy address:",
|
|
2982
|
+
} catch (b) {
|
|
2983
|
+
console.error("Failed to copy address:", b);
|
|
2984
2984
|
}
|
|
2985
|
-
}, [l, t]), v = y(() => /* @__PURE__ */ o(
|
|
2986
|
-
if (!
|
|
2985
|
+
}, [l, t]), v = y(() => /* @__PURE__ */ o(L, { isIconOnly: !0, variant: "light", color: "default", className: "size-10", onPress: m, children: n ? /* @__PURE__ */ o(Nt, { className: "text-success size-6" }) : /* @__PURE__ */ o(kr, { className: "text-foreground size-4" }) }), [m, n]);
|
|
2986
|
+
if (!g)
|
|
2987
2987
|
return null;
|
|
2988
|
-
const
|
|
2988
|
+
const u = yr(e.config?.chains, g?.connectors, {
|
|
2989
2989
|
apiChains: r
|
|
2990
|
-
}), p =
|
|
2991
|
-
if (
|
|
2990
|
+
}), p = u.find((b) => {
|
|
2991
|
+
if (b.chainType !== A) return !1;
|
|
2992
2992
|
if (A === "evm" && f !== void 0)
|
|
2993
|
-
return
|
|
2993
|
+
return b.id === f || b.chainId === `eip155:${f}`;
|
|
2994
2994
|
{
|
|
2995
|
-
const
|
|
2996
|
-
if (
|
|
2995
|
+
const x = b.chainType === s.chainType;
|
|
2996
|
+
if (x) return x;
|
|
2997
2997
|
}
|
|
2998
|
-
return
|
|
2998
|
+
return b.chainId === d;
|
|
2999
2999
|
});
|
|
3000
3000
|
return console.log("--- AccountView ---", {
|
|
3001
3001
|
account: s,
|
|
3002
3002
|
config: e.config,
|
|
3003
|
-
chains:
|
|
3003
|
+
chains: u,
|
|
3004
3004
|
currentChainType: A,
|
|
3005
3005
|
chainNumber: f,
|
|
3006
|
-
currentWallet:
|
|
3006
|
+
currentWallet: g,
|
|
3007
3007
|
currentChain: p
|
|
3008
3008
|
}), /* @__PURE__ */ o(
|
|
3009
3009
|
D,
|
|
3010
3010
|
{
|
|
3011
3011
|
title: /* @__PURE__ */ o(
|
|
3012
|
-
|
|
3012
|
+
L,
|
|
3013
3013
|
{
|
|
3014
3014
|
variant: "light",
|
|
3015
3015
|
color: "default",
|
|
3016
3016
|
onPress: () => e.modal.setView(M.SelectChains),
|
|
3017
|
-
endContent: /* @__PURE__ */ o(
|
|
3017
|
+
endContent: /* @__PURE__ */ o(Zr, { className: "size-4" }),
|
|
3018
3018
|
children: /* @__PURE__ */ C("div", { className: "flex items-center gap-2", children: [
|
|
3019
3019
|
/* @__PURE__ */ o(
|
|
3020
3020
|
Ie,
|
|
@@ -3034,19 +3034,19 @@ const ko = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3034
3034
|
/* @__PURE__ */ C("div", { className: "flex items-center gap-3", children: [
|
|
3035
3035
|
/* @__PURE__ */ o("div", { className: "w-10 h-10 rounded-full overflow-hidden bg-content2 flex items-center justify-center", children: c ? /* @__PURE__ */ o(ue, { src: c, alt: a, width: 40, height: 40 }) : /* @__PURE__ */ o("div", { className: "w-6 h-6 rounded bg-content3" }) }),
|
|
3036
3036
|
/* @__PURE__ */ C("div", { className: "flex flex-col", children: [
|
|
3037
|
-
/* @__PURE__ */ o("span", { className: "break-all text-foreground", children:
|
|
3037
|
+
/* @__PURE__ */ o("span", { className: "break-all text-foreground", children: Es(l, 8, 6) || "-" }),
|
|
3038
3038
|
/* @__PURE__ */ o("span", { className: "text-xs text-foreground/70", children: a })
|
|
3039
3039
|
] })
|
|
3040
3040
|
] }),
|
|
3041
3041
|
v
|
|
3042
3042
|
] }),
|
|
3043
3043
|
/* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(
|
|
3044
|
-
|
|
3044
|
+
L,
|
|
3045
3045
|
{
|
|
3046
3046
|
color: "default",
|
|
3047
3047
|
variant: "light",
|
|
3048
3048
|
className: "w-full",
|
|
3049
|
-
startContent: /* @__PURE__ */ o(
|
|
3049
|
+
startContent: /* @__PURE__ */ o(Yr, { className: "size-4" }),
|
|
3050
3050
|
onPress: i,
|
|
3051
3051
|
children: "Disconnect wallet"
|
|
3052
3052
|
}
|
|
@@ -3062,7 +3062,7 @@ const ko = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3062
3062
|
currentProvider: null,
|
|
3063
3063
|
actionsLoading: !1,
|
|
3064
3064
|
providers: {}
|
|
3065
|
-
},
|
|
3065
|
+
}, Br = () => {
|
|
3066
3066
|
const [e, n] = Y(xt), [t, r] = Y("");
|
|
3067
3067
|
return {
|
|
3068
3068
|
walletState: e,
|
|
@@ -3070,14 +3070,14 @@ const ko = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3070
3070
|
error: t,
|
|
3071
3071
|
setError: r,
|
|
3072
3072
|
resetWalletState: () => {
|
|
3073
|
-
n(xt),
|
|
3073
|
+
n(xt), Dt();
|
|
3074
3074
|
}
|
|
3075
3075
|
};
|
|
3076
|
-
},
|
|
3076
|
+
}, Fo = () => {
|
|
3077
3077
|
const e = V(N), n = e?.modal.state;
|
|
3078
3078
|
if (!e)
|
|
3079
3079
|
throw new Error("WalletConnectContext not found");
|
|
3080
|
-
const t = n?.chainType || "evm", r = n?.chainId || "", s = n?.name || "-", i = n?.chainInfo?.icon || "", { resetWalletState: a } =
|
|
3080
|
+
const t = n?.chainType || "evm", r = n?.chainId || "", s = n?.name || "-", i = n?.chainInfo?.icon || "", { resetWalletState: a } = Br(), { mutate: c, isPending: l } = On({
|
|
3081
3081
|
mutationKey: ["switchWallet"],
|
|
3082
3082
|
mutationFn: async () => {
|
|
3083
3083
|
a(), e.modal.setView(M.WalletSearch, {
|
|
@@ -3099,7 +3099,7 @@ const ko = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3099
3099
|
" network. You need to connect with a new wallet."
|
|
3100
3100
|
] })
|
|
3101
3101
|
] }),
|
|
3102
|
-
/* @__PURE__ */ C(
|
|
3102
|
+
/* @__PURE__ */ C(L, { className: "w-full my-4", disabled: l, onPress: () => c(), children: [
|
|
3103
3103
|
"Connect ",
|
|
3104
3104
|
s,
|
|
3105
3105
|
" wallet"
|
|
@@ -3108,7 +3108,7 @@ const ko = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3108
3108
|
}, Ye = () => {
|
|
3109
3109
|
const e = V(N);
|
|
3110
3110
|
return {
|
|
3111
|
-
connectWallet:
|
|
3111
|
+
connectWallet: k(
|
|
3112
3112
|
async (t, r, s = "") => {
|
|
3113
3113
|
if (!e) {
|
|
3114
3114
|
console.error("WalletConnectContext not found");
|
|
@@ -3137,7 +3137,7 @@ const ko = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3137
3137
|
[e?.modal.setView, e?.connect]
|
|
3138
3138
|
)
|
|
3139
3139
|
};
|
|
3140
|
-
},
|
|
3140
|
+
}, Jo = ({
|
|
3141
3141
|
iconSrc: e,
|
|
3142
3142
|
iconAlt: n,
|
|
3143
3143
|
variant: t
|
|
@@ -3154,7 +3154,7 @@ const ko = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3154
3154
|
] }) : /* @__PURE__ */ o("div", { className: "absolute inset-0 border-4 border-success rounded-full" }),
|
|
3155
3155
|
e ? /* @__PURE__ */ o(ue, { src: e, alt: n || "Wallet", width: 64, height: 64, radius: "full", className: "relative z-10" }) : null,
|
|
3156
3156
|
t === "success" ? /* @__PURE__ */ o("div", { className: "absolute -bottom-1 -right-1 w-6 h-6 rounded-full bg-success flex items-center justify-center border-2 border-white", children: /* @__PURE__ */ o("svg", { className: "w-4 h-4 text-white", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ o("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 3, d: "M5 13l4 4L19 7" }) }) }) : null
|
|
3157
|
-
] }),
|
|
3157
|
+
] }), Do = () => {
|
|
3158
3158
|
const e = V(N);
|
|
3159
3159
|
if (!e)
|
|
3160
3160
|
throw new Error("WalletConnectContext not found");
|
|
@@ -3164,19 +3164,19 @@ const ko = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3164
3164
|
const m = e?.modal?.state || {
|
|
3165
3165
|
chainType: e.account.chainType || "evm",
|
|
3166
3166
|
chainId: ""
|
|
3167
|
-
}, v = m.chainType,
|
|
3167
|
+
}, v = m.chainType, u = m.chainId || "";
|
|
3168
3168
|
if (!n || !v) {
|
|
3169
3169
|
e.modal.setView(e.modal.mainView);
|
|
3170
3170
|
return;
|
|
3171
3171
|
}
|
|
3172
3172
|
try {
|
|
3173
|
-
a(!0), await s(n, v,
|
|
3173
|
+
a(!0), await s(n, v, u), a(!1);
|
|
3174
3174
|
} catch (p) {
|
|
3175
3175
|
console.error("handleRetry::", p), await In(1e3), a(!1);
|
|
3176
3176
|
}
|
|
3177
3177
|
}, l = () => {
|
|
3178
3178
|
e.connection.setError(""), e.modal.backView();
|
|
3179
|
-
}, A = t === "connected", d = !!r && t === "disconnected", f = A ? "success" : d ? "error" : "connecting",
|
|
3179
|
+
}, A = t === "connected", d = !!r && t === "disconnected", f = A ? "success" : d ? "error" : "connecting", g = () => A ? /* @__PURE__ */ C("div", { className: "flex flex-col items-center gap-2", children: [
|
|
3180
3180
|
/* @__PURE__ */ o("p", { className: "text-lg font-semibold text-foreground", children: "Successfully Connected!" }),
|
|
3181
3181
|
/* @__PURE__ */ C("p", { className: "text-sm text-foreground/60", children: [
|
|
3182
3182
|
"Connected to ",
|
|
@@ -3190,10 +3190,10 @@ const ko = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3190
3190
|
}
|
|
3191
3191
|
) }) });
|
|
3192
3192
|
return /* @__PURE__ */ o(D, { title: n?.info?.name || "Wallet", onBack: l, children: /* @__PURE__ */ C("div", { className: "flex flex-col items-center justify-center py-12 gap-6 flex-1", children: [
|
|
3193
|
-
/* @__PURE__ */ o(
|
|
3194
|
-
|
|
3193
|
+
/* @__PURE__ */ o(Jo, { iconSrc: n?.info?.icon, iconAlt: n?.info?.name, variant: f }),
|
|
3194
|
+
g(),
|
|
3195
3195
|
d ? /* @__PURE__ */ o("div", { className: "w-full px-4", children: /* @__PURE__ */ o(
|
|
3196
|
-
|
|
3196
|
+
L,
|
|
3197
3197
|
{
|
|
3198
3198
|
isDisabled: i,
|
|
3199
3199
|
startContent: i ? /* @__PURE__ */ o(
|
|
@@ -3218,7 +3218,7 @@ const ko = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3218
3218
|
}, bt = ({ error: e, title: n }) => /* @__PURE__ */ C("div", { className: "flex flex-col items-center gap-2 text-sm text-foreground/60 text-center px-4", children: [
|
|
3219
3219
|
/* @__PURE__ */ o("p", { className: "text-lg font-semibold text-foreground", children: n }),
|
|
3220
3220
|
/* @__PURE__ */ o("p", { children: e })
|
|
3221
|
-
] }),
|
|
3221
|
+
] }), Ho = () => {
|
|
3222
3222
|
const e = V(N);
|
|
3223
3223
|
if (!e)
|
|
3224
3224
|
throw new Error("WalletConnectContext not found");
|
|
@@ -3227,17 +3227,17 @@ const ko = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3227
3227
|
/* @__PURE__ */ o("div", { className: "text-danger text-5xl mb-4", children: "⚠️" }),
|
|
3228
3228
|
/* @__PURE__ */ o("p", { className: "text-lg font-semibold mb-2 text-danger", children: "Connection Failed" }),
|
|
3229
3229
|
/* @__PURE__ */ o("p", { className: "text-sm text-gray-600 dark:text-gray-400 mb-6 text-center", children: n }),
|
|
3230
|
-
/* @__PURE__ */ o(
|
|
3230
|
+
/* @__PURE__ */ o(L, { variant: "solid", color: "primary", onPress: () => {
|
|
3231
3231
|
e.connection.setError(""), e.modal.setView(M.Connecting);
|
|
3232
3232
|
}, children: "Try Again" })
|
|
3233
3233
|
] });
|
|
3234
|
-
},
|
|
3234
|
+
}, Qo = (e, n, t) => {
|
|
3235
3235
|
e = e / 360, n = n / 100, t = t / 100;
|
|
3236
3236
|
let r, s, i;
|
|
3237
3237
|
if (n === 0)
|
|
3238
3238
|
r = s = i = t;
|
|
3239
3239
|
else {
|
|
3240
|
-
const c = (d, f,
|
|
3240
|
+
const c = (d, f, g) => (g < 0 && (g += 1), g > 1 && (g -= 1), g < 0.16666666666666666 ? d + (f - d) * 6 * g : g < 0.5 ? f : g < 0.6666666666666666 ? d + (f - d) * (0.6666666666666666 - g) * 6 : d), l = t < 0.5 ? t * (1 + n) : t + n - t * n, A = 2 * t - l;
|
|
3241
3241
|
r = c(A, l, e + 1 / 3), s = c(A, l, e), i = c(A, l, e - 1 / 3);
|
|
3242
3242
|
}
|
|
3243
3243
|
const a = (c) => {
|
|
@@ -3245,14 +3245,14 @@ const ko = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3245
3245
|
return l.length === 1 ? `0${l}` : l;
|
|
3246
3246
|
};
|
|
3247
3247
|
return `#${a(r)}${a(s)}${a(i)}`.toUpperCase();
|
|
3248
|
-
},
|
|
3248
|
+
}, Ko = (e, n = "#FE3C9C") => {
|
|
3249
3249
|
const t = e.trim();
|
|
3250
3250
|
if (t.startsWith("#"))
|
|
3251
3251
|
return t.toUpperCase();
|
|
3252
3252
|
const r = t.match(/(?:hsl\()?([0-9.]+)(?:deg)?,?\s+([0-9.]+)%,?\s+([0-9.]+)%\)?/);
|
|
3253
3253
|
if (r) {
|
|
3254
3254
|
const [, i, a, c] = r;
|
|
3255
|
-
return
|
|
3255
|
+
return Qo(parseFloat(i), parseFloat(a), parseFloat(c));
|
|
3256
3256
|
}
|
|
3257
3257
|
const s = t.match(/(?:rgb\()?([0-9]+),?\s+([0-9]+),?\s+([0-9]+)\)?/);
|
|
3258
3258
|
if (s) {
|
|
@@ -3276,7 +3276,7 @@ const ko = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3276
3276
|
700: "#D6006B",
|
|
3277
3277
|
800: "#A30052",
|
|
3278
3278
|
900: "#700038"
|
|
3279
|
-
},
|
|
3279
|
+
}, qo = () => ({
|
|
3280
3280
|
prefix: "heroui",
|
|
3281
3281
|
themes: {
|
|
3282
3282
|
light: {
|
|
@@ -3296,12 +3296,12 @@ const ko = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3296
3296
|
}
|
|
3297
3297
|
}
|
|
3298
3298
|
}
|
|
3299
|
-
}),
|
|
3299
|
+
}), hr = ({ content: e, size: n = 280, logo: t, logoBackground: r }) => {
|
|
3300
3300
|
const s = ae(null), i = ae(null), [a, c] = Y("#FE3C9C");
|
|
3301
3301
|
return F(() => {
|
|
3302
3302
|
if (s.current) {
|
|
3303
3303
|
const l = getComputedStyle(s.current), A = l.getPropertyValue("--heroui-primary").trim() || l.getPropertyValue("--primary").trim() || "#FE3C9C";
|
|
3304
|
-
c(
|
|
3304
|
+
c(Ko(A));
|
|
3305
3305
|
}
|
|
3306
3306
|
}, []), F(() => {
|
|
3307
3307
|
if (!e || !s.current)
|
|
@@ -3338,52 +3338,55 @@ const ko = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3338
3338
|
if (i.current)
|
|
3339
3339
|
i.current.update(A);
|
|
3340
3340
|
else {
|
|
3341
|
-
const f = new
|
|
3341
|
+
const f = new ls(A);
|
|
3342
3342
|
i.current = f, l.innerHTML = "", f.append(l);
|
|
3343
3343
|
}
|
|
3344
3344
|
const d = l;
|
|
3345
3345
|
return () => {
|
|
3346
3346
|
d && i.current && (d.innerHTML = "", i.current = null);
|
|
3347
3347
|
};
|
|
3348
|
-
}, [e, n, t, r, a]), /* @__PURE__ */ o(
|
|
3349
|
-
},
|
|
3348
|
+
}, [e, n, t, r, a]), /* @__PURE__ */ o(Fr, { isLoaded: !!e, style: { width: n, height: n }, className: "rounded-lg", children: /* @__PURE__ */ o("div", { className: "flex items-center justify-center p-2 bg-background rounded-lg", children: /* @__PURE__ */ o("div", { ref: s }) }) });
|
|
3349
|
+
}, Uo = ({ isOpen: e, onClose: n, onBack: t, url: r, logo: s, logoBackground: i, title: a }) => {
|
|
3350
3350
|
const { copy: c, copied: l } = Zn();
|
|
3351
|
-
return /* @__PURE__ */ o(
|
|
3351
|
+
return /* @__PURE__ */ o(jt, { isOpen: e, onClose: n, title: a, children: /* @__PURE__ */ C("div", { className: "flex flex-col items-center justify-center px-5 pb-6 gap-4", children: [
|
|
3352
3352
|
/* @__PURE__ */ o("p", { className: "text-sm text-foreground/80 text-center", children: "Scan the QR code with your camera phone to get the app on iOS or Android." }),
|
|
3353
|
-
/* @__PURE__ */ o(
|
|
3354
|
-
/* @__PURE__ */ o(
|
|
3353
|
+
/* @__PURE__ */ o(hr, { content: r, logo: s, logoBackground: i }),
|
|
3354
|
+
/* @__PURE__ */ o(L, { variant: "bordered", size: "lg", fullWidth: !0, onPress: () => {
|
|
3355
3355
|
c(r);
|
|
3356
3356
|
}, children: l ? "Copied!" : "Copy Link" })
|
|
3357
3357
|
] }) });
|
|
3358
|
-
},
|
|
3358
|
+
}, Go = () => {
|
|
3359
3359
|
if (typeof window > "u") return "other";
|
|
3360
3360
|
const e = window.navigator.userAgent.toLowerCase();
|
|
3361
3361
|
return e.includes("chrome") && !e.includes("edge") && !e.includes("opera") ? "chrome" : e.includes("edge") ? "edge" : e.includes("firefox") ? "firefox" : e.includes("opera") || e.includes("opr") ? "opera" : e.includes("safari") && !e.includes("chrome") ? "safari" : "other";
|
|
3362
|
-
},
|
|
3362
|
+
}, Ro = () => {
|
|
3363
3363
|
if (typeof window > "u") return "desktop";
|
|
3364
3364
|
const e = window.navigator.userAgent.toLowerCase();
|
|
3365
3365
|
return /iphone|ipad|ipod/.test(e) ? "ios" : /android/.test(e) ? "android" : "desktop";
|
|
3366
|
-
},
|
|
3366
|
+
}, _o = (e) => {
|
|
3367
3367
|
if (!e) return null;
|
|
3368
|
-
const n =
|
|
3368
|
+
const n = Ro(), t = Go();
|
|
3369
3369
|
return n === "ios" ? e.ios_install || e.mobile || e.homepage || null : n === "android" ? e.android_install || e.mobile || e.homepage || null : t === "chrome" ? e.chrome_install || e.homepage || null : t === "edge" ? e.edge || e.homepage || null : t === "firefox" ? e.firefox || e.homepage || null : t === "opera" ? e.opera || e.homepage || null : t === "safari" ? e.safari || e.homepage || null : e.homepage || e.mobile || null;
|
|
3370
|
-
},
|
|
3370
|
+
}, $o = (e) => {
|
|
3371
3371
|
if (!e) return [];
|
|
3372
3372
|
const n = [];
|
|
3373
3373
|
return e.chrome_install && n.push({ label: "Chrome", url: e.chrome_install }), e.edge && n.push({ label: "Edge", url: e.edge }), e.firefox && n.push({ label: "Firefox", url: e.firefox }), e.opera && n.push({ label: "Opera", url: e.opera }), e.safari && n.push({ label: "Safari", url: e.safari }), e.ios_install && n.push({ label: "iOS", url: e.ios_install }), e.android_install && n.push({ label: "Android", url: e.android_install }), e.mobile && !n.find((t) => t.url === e.mobile) && n.push({ label: "Mobile App", url: e.mobile }), e.homepage && !n.find((t) => t.url === e.homepage) && n.push({ label: "Homepage", url: e.homepage }), n;
|
|
3374
|
-
},
|
|
3374
|
+
}, ec = () => {
|
|
3375
3375
|
const e = V(N);
|
|
3376
3376
|
if (!e)
|
|
3377
3377
|
throw new Error("WalletConnectContext not found");
|
|
3378
3378
|
const { currentWallet: n } = e.account, t = ae(!1);
|
|
3379
|
-
|
|
3379
|
+
F(() => {
|
|
3380
3380
|
!n && !t.current && (t.current = !0, e.modal.backView());
|
|
3381
|
-
}, [e.modal, n])
|
|
3382
|
-
|
|
3383
|
-
const r = y(() => `Install ${n?.info?.name} Wallet`, [n?.info?.name]), s = y(() => n?.info, [n?.info]), i = y(() => Ro(s?.links), [s?.links]), a = y(() => _o(s?.links), [s?.links]), [c, l] = Y({
|
|
3381
|
+
}, [e.modal, n]);
|
|
3382
|
+
const r = y(() => `Install ${n?.info?.name} Wallet`, [n?.info?.name]), s = y(() => n?.info, [n?.info]), i = y(() => _o(s?.links), [s?.links]), a = y(() => $o(s?.links), [s?.links]), [c, l] = Y({
|
|
3384
3383
|
isOpen: !1,
|
|
3385
3384
|
url: ""
|
|
3386
|
-
})
|
|
3385
|
+
});
|
|
3386
|
+
if (!n)
|
|
3387
|
+
return /* @__PURE__ */ o(D, { title: "Install Wallet", onBack: () => e.modal.backView(), children: /* @__PURE__ */ o("div", { className: "flex flex-col items-center justify-center py-12 gap-4", children: /* @__PURE__ */ o("p", { className: "text-sm text-foreground/60 text-center px-4", children: "Wallet not found. Going back..." }) }) });
|
|
3388
|
+
if (!s) return null;
|
|
3389
|
+
const A = () => {
|
|
3387
3390
|
i && window.open(i, "_blank", "noopener,noreferrer");
|
|
3388
3391
|
}, d = (m) => {
|
|
3389
3392
|
m.label === "iOS" || m.label === "Android" ? l({
|
|
@@ -3395,7 +3398,7 @@ const ko = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3395
3398
|
isOpen: !1,
|
|
3396
3399
|
url: ""
|
|
3397
3400
|
});
|
|
3398
|
-
},
|
|
3401
|
+
}, g = () => {
|
|
3399
3402
|
l({
|
|
3400
3403
|
isOpen: !1,
|
|
3401
3404
|
url: ""
|
|
@@ -3410,30 +3413,30 @@ const ko = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3410
3413
|
s.name,
|
|
3411
3414
|
", please install the wallet extension or app."
|
|
3412
3415
|
] }),
|
|
3413
|
-
i && /* @__PURE__ */ C(
|
|
3416
|
+
i && /* @__PURE__ */ C(L, { variant: "solid", color: "primary", size: "lg", fullWidth: !0, onPress: A, className: "mb-4", children: [
|
|
3414
3417
|
"Install ",
|
|
3415
3418
|
s.name
|
|
3416
3419
|
] }),
|
|
3417
3420
|
a.length > 1 && /* @__PURE__ */ C("div", { className: "w-full", children: [
|
|
3418
3421
|
/* @__PURE__ */ o("p", { className: "text-xs text-foreground/60 mb-2 text-center", children: "Or download from:" }),
|
|
3419
|
-
/* @__PURE__ */ o("div", { className: "flex flex-wrap gap-2 justify-center", children: a.map((m, v) => /* @__PURE__ */ o(
|
|
3422
|
+
/* @__PURE__ */ o("div", { className: "flex flex-wrap gap-2 justify-center", children: a.map((m, v) => /* @__PURE__ */ o(L, { variant: "bordered", size: "sm", onPress: () => d(m), children: m.label }, v)) })
|
|
3420
3423
|
] }),
|
|
3421
3424
|
/* @__PURE__ */ o("p", { className: "text-xs text-foreground/40 mt-6 text-center px-4", children: "After installing, refresh the page and try connecting again." })
|
|
3422
3425
|
] }),
|
|
3423
3426
|
/* @__PURE__ */ o(
|
|
3424
|
-
|
|
3427
|
+
Uo,
|
|
3425
3428
|
{
|
|
3426
3429
|
title: r,
|
|
3427
3430
|
isOpen: c.isOpen,
|
|
3428
3431
|
onClose: f,
|
|
3429
|
-
onBack:
|
|
3432
|
+
onBack: g,
|
|
3430
3433
|
url: c.url,
|
|
3431
3434
|
logo: s?.icon,
|
|
3432
3435
|
logoBackground: s?.iconBackground
|
|
3433
3436
|
}
|
|
3434
3437
|
)
|
|
3435
3438
|
] });
|
|
3436
|
-
},
|
|
3439
|
+
}, nc = () => {
|
|
3437
3440
|
if (!V(N))
|
|
3438
3441
|
throw new Error("WalletConnectContext not found");
|
|
3439
3442
|
return /* @__PURE__ */ o(D, { title: "Loading", children: /* @__PURE__ */ C("div", { className: "flex flex-col items-center justify-center py-12 gap-6 flex-1", children: [
|
|
@@ -3452,10 +3455,10 @@ const ko = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3452
3455
|
/* @__PURE__ */ o("p", { children: "Please wait while we set up your wallet connection..." })
|
|
3453
3456
|
] })
|
|
3454
3457
|
] }) });
|
|
3455
|
-
},
|
|
3458
|
+
}, Wr = () => {
|
|
3456
3459
|
const e = V(N), { connectWallet: n } = Ye();
|
|
3457
3460
|
return {
|
|
3458
|
-
handleSelectWallet:
|
|
3461
|
+
handleSelectWallet: k(
|
|
3459
3462
|
(r, s) => {
|
|
3460
3463
|
if (!e) {
|
|
3461
3464
|
console.error("WalletConnectContext not found");
|
|
@@ -3463,7 +3466,7 @@ const ko = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3463
3466
|
}
|
|
3464
3467
|
const i = e.config?.defaultConnectChain;
|
|
3465
3468
|
if (!r?.isInstalled) {
|
|
3466
|
-
if (
|
|
3469
|
+
if (St()) {
|
|
3467
3470
|
n(r, i || T.EVM);
|
|
3468
3471
|
return;
|
|
3469
3472
|
}
|
|
@@ -3534,7 +3537,6 @@ const ko = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3534
3537
|
xClientId: Xe[xe].x,
|
|
3535
3538
|
googleClientId: Xe[xe].google,
|
|
3536
3539
|
walletBaseUrl: "https://embedded-wallet.tomo.inc/embed"
|
|
3537
|
-
// walletBaseUrl: "http://localhost:5173/embed",
|
|
3538
3540
|
}, It = {
|
|
3539
3541
|
basicLogins: ["email", "externalWallets"],
|
|
3540
3542
|
socialLogins: [
|
|
@@ -3544,7 +3546,7 @@ const ko = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3544
3546
|
}, _ = {
|
|
3545
3547
|
connectors: se.recommendedWallets,
|
|
3546
3548
|
chains: {
|
|
3547
|
-
evm: [
|
|
3549
|
+
evm: [Ir, br, wr, xr, zr, Un, Pr],
|
|
3548
3550
|
solana: ie.solana,
|
|
3549
3551
|
aptos: ie.aptos,
|
|
3550
3552
|
dogecoin: ie.dogecoin
|
|
@@ -3613,17 +3615,17 @@ const ko = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3613
3615
|
privacyPolicy: se.links.privacyPolicy,
|
|
3614
3616
|
logo: "https://tomo.inc/favicon.svg"
|
|
3615
3617
|
}
|
|
3616
|
-
}, ln =
|
|
3618
|
+
}, ln = Mt(null), tc = ["wallets", "all"], rc = (e) => () => {
|
|
3617
3619
|
const n = e.length > 0 ? e : se.recommendedWallets || [], t = se.walletBaseUrl;
|
|
3618
|
-
return
|
|
3620
|
+
return Ot({
|
|
3619
3621
|
chainType: "all",
|
|
3620
3622
|
recommendedConnectors: n,
|
|
3621
|
-
connectorTypes: n.map((r) =>
|
|
3623
|
+
connectorTypes: n.map((r) => ns(r) ? "wagmi" : "tomo"),
|
|
3622
3624
|
options: {
|
|
3623
3625
|
baseUrl: t
|
|
3624
3626
|
}
|
|
3625
3627
|
});
|
|
3626
|
-
}, wt = (e, n) => n === "all" ? e : e.filter((t) => !!t.connectors[n]),
|
|
3628
|
+
}, wt = (e, n) => n === "all" ? e : e.filter((t) => !!t.connectors[n]), Mr = (e) => {
|
|
3627
3629
|
if (!e || !e.info)
|
|
3628
3630
|
return null;
|
|
3629
3631
|
const n = e.connectors;
|
|
@@ -3636,15 +3638,15 @@ const ko = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3636
3638
|
};
|
|
3637
3639
|
}, Ze = (e, n = [], t) => {
|
|
3638
3640
|
const r = V(ln)?.wallet ?? null, s = t?.embeddedWallet !== void 0 ? t.embeddedWallet : r, i = y(() => n.length > 0 ? n : se.recommendedWallets || [], [n]), a = y(
|
|
3639
|
-
() =>
|
|
3641
|
+
() => rc(i),
|
|
3640
3642
|
[i]
|
|
3641
3643
|
// Only recreate when connectors ID changes
|
|
3642
3644
|
), c = Sn({
|
|
3643
|
-
queryKey:
|
|
3645
|
+
queryKey: tc,
|
|
3644
3646
|
queryFn: a,
|
|
3645
3647
|
// Refetch on window focus to update wallet installation status
|
|
3646
3648
|
refetchOnWindowFocus: !0
|
|
3647
|
-
}), l = y(() => s ?
|
|
3649
|
+
}), l = y(() => s ? Mr(s) : null, [s]), A = y(() => {
|
|
3648
3650
|
if (!c.data)
|
|
3649
3651
|
return;
|
|
3650
3652
|
const d = Array.isArray(c.data.all) ? [...c.data.all] : [], f = Array.isArray(c.data.recommoned) ? [...c.data.recommoned] : [];
|
|
@@ -3663,7 +3665,7 @@ const ko = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3663
3665
|
if (!n) return null;
|
|
3664
3666
|
const { config: t } = n, { links: r } = t;
|
|
3665
3667
|
return r ? /* @__PURE__ */ C("div", { className: "flex flex-col gap-2", children: [
|
|
3666
|
-
e || /* @__PURE__ */ o(
|
|
3668
|
+
e || /* @__PURE__ */ o(sc, {}),
|
|
3667
3669
|
/* @__PURE__ */ C(
|
|
3668
3670
|
zn,
|
|
3669
3671
|
{
|
|
@@ -3674,12 +3676,12 @@ const ko = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3674
3676
|
children: [
|
|
3675
3677
|
/* @__PURE__ */ o("span", { children: "Powered by" }),
|
|
3676
3678
|
r.logo && /* @__PURE__ */ o("img", { src: r.logo, alt: "logo", className: "w-4 h-4" }),
|
|
3677
|
-
!r.logo && /* @__PURE__ */ o(
|
|
3679
|
+
!r.logo && /* @__PURE__ */ o(Jr, {})
|
|
3678
3680
|
]
|
|
3679
3681
|
}
|
|
3680
3682
|
)
|
|
3681
3683
|
] }) : null;
|
|
3682
|
-
},
|
|
3684
|
+
}, sc = () => {
|
|
3683
3685
|
const e = V(N);
|
|
3684
3686
|
if (!e) return null;
|
|
3685
3687
|
const { config: n } = e, { links: t } = n;
|
|
@@ -3696,13 +3698,13 @@ const ko = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3696
3698
|
"."
|
|
3697
3699
|
] })
|
|
3698
3700
|
] }) : null;
|
|
3699
|
-
},
|
|
3701
|
+
}, ic = ({ wallet: e, onSelectWallet: n }) => {
|
|
3700
3702
|
const { info: t, isInstalled: r } = e, s = y(() => {
|
|
3701
3703
|
if (!r) return null;
|
|
3702
3704
|
const i = t?.uuid === "walletConnect";
|
|
3703
3705
|
return /* @__PURE__ */ o("span", { className: "text-xs line-height-[140px] font-normal text-[#A9A29D]", children: i ? "QR Code" : "Installed" });
|
|
3704
3706
|
}, [t?.uuid, r]);
|
|
3705
|
-
return /* @__PURE__ */ o(
|
|
3707
|
+
return /* @__PURE__ */ o(Dr, { isPressable: !0, isHoverable: !0, shadow: "none", radius: "sm", onPress: () => n?.(e), children: /* @__PURE__ */ C(Hr, { className: "flex flex-col items-center gap-1 px-0 py-2", children: [
|
|
3706
3708
|
/* @__PURE__ */ o("div", { className: "p-1 h-[56px]", children: /* @__PURE__ */ o(ue, { src: t.icon, alt: t.name, width: 48, height: 48, removeWrapper: !0, radius: "md" }) }),
|
|
3707
3709
|
/* @__PURE__ */ C("div", { className: "flex flex-col justify-center items-center scale-80 text-center", children: [
|
|
3708
3710
|
/* @__PURE__ */ o("span", { className: "text-sm font-medium", children: t.name }),
|
|
@@ -3710,7 +3712,7 @@ const ko = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3710
3712
|
] })
|
|
3711
3713
|
] }) }, t.uuid);
|
|
3712
3714
|
};
|
|
3713
|
-
function
|
|
3715
|
+
function oc({ wallets: e, loading: n, onSelectWallet: t }) {
|
|
3714
3716
|
return n ? /* @__PURE__ */ o(
|
|
3715
3717
|
ge,
|
|
3716
3718
|
{
|
|
@@ -3721,14 +3723,14 @@ function ic({ wallets: e, loading: n, onSelectWallet: t }) {
|
|
|
3721
3723
|
},
|
|
3722
3724
|
className: "m-auto"
|
|
3723
3725
|
}
|
|
3724
|
-
) : e.length === 0 ? /* @__PURE__ */ o("div", { className: "flex flex-col items-center justify-center py-12", children: /* @__PURE__ */ o("p", { className: "text-gray-600", children: "No wallets found" }) }) : /* @__PURE__ */ o("div", { className: "grid grid-cols-4", children: e.map((r) => /* @__PURE__ */ o(
|
|
3726
|
+
) : e.length === 0 ? /* @__PURE__ */ o("div", { className: "flex flex-col items-center justify-center py-12", children: /* @__PURE__ */ o("p", { className: "text-gray-600", children: "No wallets found" }) }) : /* @__PURE__ */ o("div", { className: "grid grid-cols-4", children: e.map((r) => /* @__PURE__ */ o(ic, { wallet: r, onSelectWallet: t }, r.info?.uuid)) });
|
|
3725
3727
|
}
|
|
3726
|
-
const
|
|
3728
|
+
const cc = {
|
|
3727
3729
|
evm: { tabKey: "evm", chainKey: "evm" },
|
|
3728
3730
|
solana: { tabKey: "solana", chainKey: "solana" },
|
|
3729
3731
|
aptos: { tabKey: "aptos", chainKey: "aptos" },
|
|
3730
3732
|
dogecoin: { tabKey: "doge", chainKey: "dogecoin" }
|
|
3731
|
-
},
|
|
3733
|
+
}, ac = ({ selectedKey: e, onSelectionChange: n }) => {
|
|
3732
3734
|
const t = V(N), r = y(() => {
|
|
3733
3735
|
const i = t?.config?.chains || {}, a = [
|
|
3734
3736
|
{
|
|
@@ -3738,7 +3740,7 @@ const oc = {
|
|
|
3738
3740
|
}
|
|
3739
3741
|
];
|
|
3740
3742
|
return Object.keys(i).forEach((c) => {
|
|
3741
|
-
const l =
|
|
3743
|
+
const l = cc[c];
|
|
3742
3744
|
if (l) {
|
|
3743
3745
|
const A = q[l.chainKey];
|
|
3744
3746
|
a.push({
|
|
@@ -3749,35 +3751,38 @@ const oc = {
|
|
|
3749
3751
|
}
|
|
3750
3752
|
}), a;
|
|
3751
3753
|
}, [t?.config?.chains]), s = (i) => i.icon ? /* @__PURE__ */ o(Ie, { icon: i.icon, className: "size-6 overflow-hidden rounded-full" }) : i.title;
|
|
3752
|
-
return
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3754
|
+
return (
|
|
3755
|
+
// @ts-expect-error heroui Tabs type incompatibility
|
|
3756
|
+
/* @__PURE__ */ o(
|
|
3757
|
+
Qr,
|
|
3758
|
+
{
|
|
3759
|
+
variant: "bordered",
|
|
3760
|
+
fullWidth: !0,
|
|
3761
|
+
selectedKey: e,
|
|
3762
|
+
onSelectionChange: (i) => n(i),
|
|
3763
|
+
children: r.map((i) => /* @__PURE__ */ o(Kr, { title: s(i) }, i.key))
|
|
3764
|
+
}
|
|
3765
|
+
)
|
|
3761
3766
|
);
|
|
3762
|
-
},
|
|
3767
|
+
}, lc = ({ wallet: e, onSelectWallet: n }) => {
|
|
3763
3768
|
const { info: t, isInstalled: r } = e, s = y(() => r ? t?.uuid === "walletConnect" ? /* @__PURE__ */ o(nt, { className: "text-xs text-[#D7D3D0] border h-5", variant: "dot", children: "QR Code" }) : /* @__PURE__ */ o(nt, { className: "text-xs text-[#D7D3D0] border h-5", variant: "dot", children: "Installed" }) : null, [t?.uuid, r]);
|
|
3764
3769
|
return /* @__PURE__ */ o(
|
|
3765
|
-
|
|
3770
|
+
Xr,
|
|
3766
3771
|
{
|
|
3767
3772
|
onPress: () => n?.(e),
|
|
3768
|
-
startContent: /* @__PURE__ */ o(
|
|
3773
|
+
startContent: /* @__PURE__ */ o(Vr, { icon: t?.icon, title: t?.name }),
|
|
3769
3774
|
endContent: s
|
|
3770
3775
|
},
|
|
3771
3776
|
e.info.uuid
|
|
3772
3777
|
);
|
|
3773
|
-
},
|
|
3778
|
+
}, Vr = ({ icon: e, title: n }) => /* @__PURE__ */ C("div", { className: "flex items-center gap-2", children: [
|
|
3774
3779
|
typeof e == "string" ? /* @__PURE__ */ o(ue, { src: e, alt: n, width: 32, height: 32, radius: "md" }) : e,
|
|
3775
3780
|
/* @__PURE__ */ o("span", { className: "text-sm font-medium text-foreground", children: n })
|
|
3776
|
-
] }),
|
|
3777
|
-
|
|
3781
|
+
] }), Xr = (e) => /* @__PURE__ */ o(
|
|
3782
|
+
L,
|
|
3778
3783
|
{
|
|
3779
3784
|
fullWidth: !0,
|
|
3780
|
-
size: "
|
|
3785
|
+
size: "lg",
|
|
3781
3786
|
color: "default",
|
|
3782
3787
|
variant: "bordered",
|
|
3783
3788
|
radius: "sm",
|
|
@@ -3786,7 +3791,7 @@ const oc = {
|
|
|
3786
3791
|
children: /* @__PURE__ */ o("span", {})
|
|
3787
3792
|
}
|
|
3788
3793
|
);
|
|
3789
|
-
function
|
|
3794
|
+
function dc({ wallets: e, loading: n, onSelectWallet: t }) {
|
|
3790
3795
|
return n ? /* @__PURE__ */ o(
|
|
3791
3796
|
ge,
|
|
3792
3797
|
{
|
|
@@ -3797,29 +3802,29 @@ function lc({ wallets: e, loading: n, onSelectWallet: t }) {
|
|
|
3797
3802
|
circle2: "border-b-primary"
|
|
3798
3803
|
}
|
|
3799
3804
|
}
|
|
3800
|
-
) : e.length === 0 ? /* @__PURE__ */ o("div", { className: "flex flex-col items-center justify-center py-12", children: /* @__PURE__ */ o("p", { className: "text-gray-600", children: "No wallets found" }) }) : /* @__PURE__ */ o("div", { className: "flex flex-col gap-2", children: e.map((r) => /* @__PURE__ */ o(
|
|
3805
|
+
) : e.length === 0 ? /* @__PURE__ */ o("div", { className: "flex flex-col items-center justify-center py-12", children: /* @__PURE__ */ o("p", { className: "text-gray-600", children: "No wallets found" }) }) : /* @__PURE__ */ o("div", { className: "flex flex-col gap-2", children: e.map((r) => /* @__PURE__ */ o(lc, { wallet: r, onSelectWallet: t }, r.info?.uuid)) });
|
|
3801
3806
|
}
|
|
3802
|
-
const
|
|
3803
|
-
const e = V(N), { handleSelectWallet: n } =
|
|
3807
|
+
const Ac = () => {
|
|
3808
|
+
const e = V(N), { handleSelectWallet: n } = Wr(), { data: t, isLoading: r } = Ze("all", e?.config?.connectors), [s, i] = y(() => {
|
|
3804
3809
|
const l = t?.recommended || [], A = t?.all || [];
|
|
3805
|
-
return
|
|
3810
|
+
return Ts(l, A);
|
|
3806
3811
|
}, [t]), a = y(
|
|
3807
3812
|
() => s?.filter((l) => !l.isEmbeddedWallet) || [],
|
|
3808
3813
|
[s]
|
|
3809
3814
|
);
|
|
3810
3815
|
return /* @__PURE__ */ o(D, { title: "Connect your wallet", children: /* @__PURE__ */ C("div", { className: "flex flex-col gap-4", children: [
|
|
3811
|
-
/* @__PURE__ */ o("div", { className: "space-y-2 h-[312px] max-h-[312px] overflow-y-auto [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]", children: /* @__PURE__ */ o("div", { className: `flex flex-col gap-2 h-full ${r ? "justify-center" : ""}`, children: /* @__PURE__ */ o(
|
|
3816
|
+
/* @__PURE__ */ o("div", { className: "space-y-2 h-[312px] max-h-[312px] overflow-y-auto [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]", children: /* @__PURE__ */ o("div", { className: `flex flex-col gap-2 h-full ${r ? "justify-center" : ""}`, children: /* @__PURE__ */ o(dc, { loading: r, wallets: a, onSelectWallet: n }) }) }),
|
|
3812
3817
|
r ? null : /* @__PURE__ */ o(
|
|
3813
|
-
|
|
3818
|
+
Xr,
|
|
3814
3819
|
{
|
|
3815
3820
|
onPress: () => e?.modal.setView(M.WalletSearch),
|
|
3816
|
-
startContent: /* @__PURE__ */ o(
|
|
3821
|
+
startContent: /* @__PURE__ */ o(Vr, { icon: /* @__PURE__ */ o(qr, {}), title: "Search more wallets" }),
|
|
3817
3822
|
endContent: /* @__PURE__ */ o("span", { className: "text-[#A9A29D] text-sm", children: i.length })
|
|
3818
3823
|
}
|
|
3819
3824
|
),
|
|
3820
3825
|
/* @__PURE__ */ o(Rn, {})
|
|
3821
3826
|
] }) });
|
|
3822
|
-
},
|
|
3827
|
+
}, fc = () => {
|
|
3823
3828
|
const [e, n] = Y(0), [t, r] = Y(!1);
|
|
3824
3829
|
return F(() => {
|
|
3825
3830
|
if (typeof window < "u" && window.visualViewport) {
|
|
@@ -3841,33 +3846,33 @@ const dc = () => {
|
|
|
3841
3846
|
};
|
|
3842
3847
|
}
|
|
3843
3848
|
}, []), { keyboardHeight: e, isKeyboardVisible: t };
|
|
3844
|
-
},
|
|
3849
|
+
}, uc = (e) => {
|
|
3845
3850
|
const n = ae(null);
|
|
3846
3851
|
return F(() => {
|
|
3847
3852
|
n.current && (n.current.scrollTop = 0);
|
|
3848
3853
|
}, e), n;
|
|
3849
|
-
},
|
|
3850
|
-
const e = V(N), { handleSelectWallet: n } =
|
|
3851
|
-
(
|
|
3852
|
-
e?.modal.setCurrentViewState({ chainType:
|
|
3854
|
+
}, gc = Tt, vc = () => {
|
|
3855
|
+
const e = V(N), { handleSelectWallet: n } = Wr(), t = e?.modal.state, r = y(() => t?.chainType || "all", [t?.chainType]), { data: s, isLoading: i } = Ze(r, e?.config?.connectors), a = y(() => s?.all || [], [s]), [c, l] = Y(""), { isKeyboardVisible: A, keyboardHeight: d } = fc(), f = y(() => a.filter((u) => u.info?.name?.toLowerCase().includes(c.toLowerCase())).filter((u) => !u.isEmbeddedWallet), [a, c]), g = uc([r]), m = y(() => A && d > 0 ? `${Math.max(180, 340 - d * 0.6)}px` : "340px", [A, d]), v = k(
|
|
3856
|
+
(u) => {
|
|
3857
|
+
e?.modal.setCurrentViewState({ chainType: u });
|
|
3853
3858
|
},
|
|
3854
3859
|
[e]
|
|
3855
3860
|
);
|
|
3856
3861
|
return /* @__PURE__ */ o(D, { title: "All wallets", onBack: () => e?.modal.backView(), children: /* @__PURE__ */ C("div", { className: "flex flex-col gap-4 min-h-0", children: [
|
|
3857
3862
|
/* @__PURE__ */ o(
|
|
3858
|
-
|
|
3863
|
+
ac,
|
|
3859
3864
|
{
|
|
3860
3865
|
selectedKey: t?.chainType || "all",
|
|
3861
|
-
onSelectionChange: (
|
|
3866
|
+
onSelectionChange: (u) => v(u)
|
|
3862
3867
|
}
|
|
3863
3868
|
),
|
|
3864
3869
|
/* @__PURE__ */ o(
|
|
3865
|
-
|
|
3870
|
+
gc,
|
|
3866
3871
|
{
|
|
3867
3872
|
placeholder: "Search wallet",
|
|
3868
3873
|
value: c,
|
|
3869
|
-
onChange: (
|
|
3870
|
-
startContent: /* @__PURE__ */ o(
|
|
3874
|
+
onChange: (u) => l(u.target.value),
|
|
3875
|
+
startContent: /* @__PURE__ */ o(Ur, {}),
|
|
3871
3876
|
classNames: {
|
|
3872
3877
|
inputWrapper: "rounded-full h-11"
|
|
3873
3878
|
}
|
|
@@ -3876,25 +3881,25 @@ const dc = () => {
|
|
|
3876
3881
|
/* @__PURE__ */ o(
|
|
3877
3882
|
"div",
|
|
3878
3883
|
{
|
|
3879
|
-
ref:
|
|
3884
|
+
ref: g,
|
|
3880
3885
|
className: "space-y-2 shrink-0 overflow-y-auto transition-all duration-200 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",
|
|
3881
3886
|
style: {
|
|
3882
3887
|
height: m,
|
|
3883
3888
|
maxHeight: m
|
|
3884
3889
|
},
|
|
3885
3890
|
children: /* @__PURE__ */ o("div", { className: `flex flex-col gap-2 h-full ${i ? "justify-center" : ""}`, children: /* @__PURE__ */ o(
|
|
3886
|
-
|
|
3891
|
+
oc,
|
|
3887
3892
|
{
|
|
3888
3893
|
loading: i,
|
|
3889
3894
|
wallets: f,
|
|
3890
|
-
onSelectWallet: (
|
|
3895
|
+
onSelectWallet: (u) => n(u, r)
|
|
3891
3896
|
}
|
|
3892
3897
|
) })
|
|
3893
3898
|
}
|
|
3894
3899
|
),
|
|
3895
3900
|
/* @__PURE__ */ o(Rn, {})
|
|
3896
3901
|
] }) });
|
|
3897
|
-
},
|
|
3902
|
+
}, mc = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAAAgCAYAAADtwH1UAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAA4eSURBVHgBvVoJcBRVGv5eT8+Vc0KQSwKDIJccEWFFFIMu4oUQd9li0VUDuqulW0ZLYMtdkUR0Wa8iVlmUFosGXK+SLRFUVlcrBtcVF3DjxQqKDiEcUTEzuTNH9/7/6+7JZDJkjoB/5eV1v+7X781/fP///vcEUqS7KnRPs7Ot1AZRousoBnQvIDzGU91P1z4hUAdNr80OZW+tqhD+2P56TbGnJYRSBXqJDuov4IUOo7+An659AqjTIGpz7dgqLqnr2V/XPXV1X5YGQq4SNdtTrKgebzAET4QmQ339kWCLL9TeWFfkUWonTx69VYi48T1eD1pQCgUlkPOn8WGOD/C7PvD8gVpk0/h+X4/+TU1N/G4plRLgJP1h9ge2FhQU+JECiWQv3La2w6vperkGrayb4Sl8WKDaBqVy3cwLEAlq5boiyqIMT21i1Ta7qPSPr0F7SCsfOHRAWX2j7mlvF2CmaxGBMNURDdA0vqY6ArjcGgYMVeA/fKJ65tnZla6CCUAE5TR2GZD6+DSBathQ6T/2X74rJ4GW2Ww2j91uh6qqUBSFfqPBPp3nEYnIEg6HEQqFuLmaSiUJwtf3MCch1vhWR8dq+vxdyIDcagsuH/oMSga/jExI2HPRWngDssf9Dl8fi0DXbJLZuqYjTM91FgDdhzVLGCwIyDaulUATzn/1SQze8AwyIT0vF50rb0Xwtt/A6XTKYjE8GWk0gWAwKAsJ5S+BQKBy1KhRnYneTfhF1voItBoSrBcZ0ADnMdwx9veyzoicQ2GfthHftAwiRjPjhWRqiOEmwrWgdnQLIEwCAGshWwdZQUMDLrpzCbKONSAT0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tccoTEckFwdbp2F83kdwq61J+8rEXE7MFMKtuH7sbvzDPxstLS55MsISgk01BMEb84ZQRDRasqKnTncuvjhrJqbRBksmUZFoboH6773omD1Dhqynyimz5nd0dPjo8lpi/pc9xkzUIRNLiKX+HsxS3MNw/X824MDhIaSWNiMktVnhqW5GRMYeAbfbFCtMNU5NDGs+jDUbr+u3JahjvPJgVqY7ZezUGfNJAD6c5GBWwuUfW8KU2cs3CUW4Uw1PY4ktYfeJq4khQXhzvkC6xNucvzxzO4YXKvio41xSIc04oGXmhpTodbcFKEaySNZt7ny8f94vkOsO4qyD6YenbAkO2nCJkH52njdJMjL2LGjS+dP7rPUEOXxWlIObJcT84wnHSvYx48REpIJevQmpk1/o+iYbhbdriy9gDSUHr6fen09LR8Qm2v6tcs35EHc/21bxSUvhTVorZUGD3dqvCCMfpFgpC1Ind7aO7ALhP8d1ZFP5wsIq83BuBXnqtOZPc9hE6lllHs6toHKTdTCX0xZcYg/ncnhpHcylKIf3ezfRo6qMD+fGEx/WbXO28f7xHOrG+Vcv4o5n8/F0gq7avK7ex9ObXi322LJRSoyYQ+9Npc1fb8/j6cJnHE9HbaQNWwuu7X08fVedr/SdvR1zPv3ujKltoWxve9jtYUjKc7T7C5xtvglDA3U/n2yvnTbZm/h4eps8Xj6Hxk04f3k8XUMtcvs8nj6HSuL+GRxP/z/hFFWXpmDkiwAAAABJRU5ErkJggg==", _n = () => {
|
|
3898
3903
|
const e = V(N);
|
|
3899
3904
|
if (!e)
|
|
3900
3905
|
throw new Error("useAccount must be used within WalletConnectProvider");
|
|
@@ -3915,15 +3920,15 @@ const dc = () => {
|
|
|
3915
3920
|
// signAndSendTransaction: context.signAndSendTransaction,
|
|
3916
3921
|
// sendTransaction: context.sendTransaction,
|
|
3917
3922
|
};
|
|
3918
|
-
},
|
|
3923
|
+
}, ya = () => {
|
|
3919
3924
|
const e = V(N);
|
|
3920
3925
|
if (!e)
|
|
3921
3926
|
throw new Error("useConnectors must be used within WalletConnectProvider");
|
|
3922
3927
|
const n = y(() => e.account?.currentWallet?.connectors || null, [e.account?.currentWallet]), t = y(() => e.account?.currentProvider || null, [e.account?.currentProvider]);
|
|
3923
3928
|
return { connectors: n, currentProvider: t };
|
|
3924
3929
|
};
|
|
3925
|
-
function
|
|
3926
|
-
const [n, t] = Y(e), r =
|
|
3930
|
+
function pc(e = !1) {
|
|
3931
|
+
const [n, t] = Y(e), r = k(() => t(!0), []), s = k(() => t(!1), []), i = k(() => t((c) => !c), []), a = k((c) => t(c), []);
|
|
3927
3932
|
return {
|
|
3928
3933
|
isOpen: n,
|
|
3929
3934
|
onOpen: r,
|
|
@@ -3932,36 +3937,36 @@ function mc(e = !1) {
|
|
|
3932
3937
|
onOpenChange: a
|
|
3933
3938
|
};
|
|
3934
3939
|
}
|
|
3935
|
-
const
|
|
3936
|
-
const { isOpen: n, onOpen: t, onClose: r } =
|
|
3940
|
+
const Cc = (e) => {
|
|
3941
|
+
const { isOpen: n, onOpen: t, onClose: r } = pc(), [s, i] = Y(e), [a, c] = Y(null), [l, A] = Y([]);
|
|
3937
3942
|
F(() => {
|
|
3938
3943
|
s !== e && i(e);
|
|
3939
3944
|
}, [e]);
|
|
3940
|
-
const d =
|
|
3941
|
-
(
|
|
3942
|
-
s ===
|
|
3945
|
+
const d = k(
|
|
3946
|
+
(b, x, w) => {
|
|
3947
|
+
s === b && !w || (w || A((O) => [...O, { view: s, state: a }]), i(b), c(x || null));
|
|
3943
3948
|
},
|
|
3944
3949
|
[s, a]
|
|
3945
|
-
), f =
|
|
3950
|
+
), f = k(() => {
|
|
3946
3951
|
i(e), setTimeout(() => {
|
|
3947
3952
|
c(null), A([]);
|
|
3948
3953
|
}, 400);
|
|
3949
|
-
}, [e]),
|
|
3954
|
+
}, [e]), g = k(() => {
|
|
3950
3955
|
r?.(), f();
|
|
3951
|
-
}, [r, f]), m =
|
|
3952
|
-
(
|
|
3953
|
-
A((w) => [...w, { view: s, state: a }]), i(
|
|
3956
|
+
}, [r, f]), m = k(
|
|
3957
|
+
(b, x) => {
|
|
3958
|
+
A((w) => [...w, { view: s, state: a }]), i(b), c(x || null), t();
|
|
3954
3959
|
},
|
|
3955
3960
|
[s, a, t]
|
|
3956
|
-
), v =
|
|
3957
|
-
A((
|
|
3958
|
-
if (
|
|
3959
|
-
return i(e), c(null),
|
|
3960
|
-
const
|
|
3961
|
-
return i(
|
|
3961
|
+
), v = k(() => {
|
|
3962
|
+
A((b) => {
|
|
3963
|
+
if (b.length === 0)
|
|
3964
|
+
return i(e), c(null), b;
|
|
3965
|
+
const x = b[b.length - 1], w = b.slice(0, -1);
|
|
3966
|
+
return i(x.view), c(x.state), w;
|
|
3962
3967
|
});
|
|
3963
|
-
}, [e]),
|
|
3964
|
-
c(
|
|
3968
|
+
}, [e]), u = k((b) => {
|
|
3969
|
+
c(b || null);
|
|
3965
3970
|
}, []), p = l.length > 0 ? l[l.length - 1].view : null;
|
|
3966
3971
|
return {
|
|
3967
3972
|
isOpen: n,
|
|
@@ -3969,61 +3974,73 @@ const pc = (e) => {
|
|
|
3969
3974
|
prevView: p,
|
|
3970
3975
|
openModal: t,
|
|
3971
3976
|
openModalWithState: m,
|
|
3972
|
-
closeModal:
|
|
3977
|
+
closeModal: g,
|
|
3973
3978
|
setView: d,
|
|
3974
3979
|
backView: v,
|
|
3975
3980
|
state: a,
|
|
3976
|
-
setCurrentViewState:
|
|
3981
|
+
setCurrentViewState: u
|
|
3977
3982
|
};
|
|
3978
|
-
},
|
|
3983
|
+
}, xc = () => V(ln) || {
|
|
3979
3984
|
wallet: null,
|
|
3980
3985
|
isAvailable: !1,
|
|
3981
3986
|
message: null,
|
|
3982
3987
|
connectedInfo: null,
|
|
3983
3988
|
isLoading: !0,
|
|
3984
3989
|
error: null
|
|
3985
|
-
},
|
|
3986
|
-
const { closeModalBeforeIframe: n = !0 } = e, [t, r] = Y(!1), s = V(N), i =
|
|
3987
|
-
() => a ?? (i.wallet ?
|
|
3990
|
+
}, bc = (e = {}) => {
|
|
3991
|
+
const { closeModalBeforeIframe: n = !0 } = e, [t, r] = Y(!1), s = V(N), i = xc(), { embeddedWalletConnector: a } = Ze("all"), { connectWallet: c } = Ye(), l = y(
|
|
3992
|
+
() => a ?? (i.wallet ? Mr(i.wallet) : null),
|
|
3988
3993
|
[a, i.wallet]
|
|
3989
3994
|
);
|
|
3990
3995
|
if (!s)
|
|
3991
3996
|
throw new Error("WalletConnectContext not found");
|
|
3992
|
-
const { isWalletReady: A } = s.walletReady, d = (
|
|
3997
|
+
const { isWalletReady: A } = s.walletReady, d = (u) => {
|
|
3993
3998
|
s.modal.setView(
|
|
3994
3999
|
s.modal.mainView,
|
|
3995
4000
|
{
|
|
3996
4001
|
isLoading: !1,
|
|
3997
4002
|
email: s.modal.state?.email || "",
|
|
3998
|
-
error:
|
|
4003
|
+
error: u
|
|
3999
4004
|
},
|
|
4000
4005
|
!0
|
|
4001
4006
|
), r(!1);
|
|
4002
4007
|
}, f = () => {
|
|
4003
|
-
const
|
|
4004
|
-
if (!
|
|
4008
|
+
const u = l;
|
|
4009
|
+
if (!u) {
|
|
4005
4010
|
d("Embedded wallet connector not available");
|
|
4006
4011
|
return;
|
|
4007
4012
|
}
|
|
4008
|
-
i.wallet?.onLoginStatusChanged(({ type:
|
|
4009
|
-
|
|
4013
|
+
i.wallet?.onLoginStatusChanged(({ type: w }) => {
|
|
4014
|
+
w === "logout" && s.disconnect?.();
|
|
4010
4015
|
}), s.modal.openModal();
|
|
4011
|
-
const p = s.config?.defaultConnectChain
|
|
4012
|
-
|
|
4016
|
+
const p = s.config?.defaultConnectChain;
|
|
4017
|
+
if (p) {
|
|
4018
|
+
c(u, p);
|
|
4019
|
+
return;
|
|
4020
|
+
}
|
|
4021
|
+
const b = s.config?.chains || {}, x = Object.entries(u.connectors || {}).filter(
|
|
4022
|
+
([w, O]) => O && b[w]
|
|
4023
|
+
);
|
|
4024
|
+
if (x.length > 1)
|
|
4025
|
+
s._setCurrentWallet(u), s.modal.setView(M.WalletSelectProviders);
|
|
4026
|
+
else {
|
|
4027
|
+
const w = x[0]?.[0] ?? T.EVM;
|
|
4028
|
+
c(u, w);
|
|
4029
|
+
}
|
|
4013
4030
|
};
|
|
4014
4031
|
return {
|
|
4015
4032
|
isLoading: t,
|
|
4016
|
-
handleEmailLogin: async (
|
|
4033
|
+
handleEmailLogin: async (u) => {
|
|
4017
4034
|
try {
|
|
4018
|
-
const p =
|
|
4035
|
+
const p = Xs(u);
|
|
4019
4036
|
if (p && d(p), r(!0), !A || !i.wallet)
|
|
4020
4037
|
return d("Embedded wallet initialization failed");
|
|
4021
|
-
const
|
|
4038
|
+
const b = i.wallet;
|
|
4022
4039
|
n && s.modal.closeModal();
|
|
4023
|
-
const
|
|
4024
|
-
if (!
|
|
4040
|
+
const x = await b?.loginByEmail?.({ email: u });
|
|
4041
|
+
if (!x)
|
|
4025
4042
|
return d("Failed to login into email");
|
|
4026
|
-
if (!(await
|
|
4043
|
+
if (!(await b.login(x)).isAvailable)
|
|
4027
4044
|
return d("Failed to login with email");
|
|
4028
4045
|
f();
|
|
4029
4046
|
} catch (p) {
|
|
@@ -4034,14 +4051,14 @@ const pc = (e) => {
|
|
|
4034
4051
|
try {
|
|
4035
4052
|
if (r(!0), !A || !i.wallet)
|
|
4036
4053
|
return d("Embedded wallet initialization failed");
|
|
4037
|
-
const
|
|
4054
|
+
const u = i.wallet, p = await u?.loginByGoogle?.();
|
|
4038
4055
|
if (!p)
|
|
4039
4056
|
return d("Failed to login into Google");
|
|
4040
|
-
if (!(await
|
|
4057
|
+
if (!(await u.login(p)).isAvailable)
|
|
4041
4058
|
return d("Failed to login with Google");
|
|
4042
4059
|
f();
|
|
4043
|
-
} catch (
|
|
4044
|
-
console.error("Google login error:",
|
|
4060
|
+
} catch (u) {
|
|
4061
|
+
console.error("Google login error:", u), d("Failed to login with Google");
|
|
4045
4062
|
} finally {
|
|
4046
4063
|
r(!1);
|
|
4047
4064
|
}
|
|
@@ -4050,34 +4067,38 @@ const pc = (e) => {
|
|
|
4050
4067
|
try {
|
|
4051
4068
|
if (r(!0), !A || !i.wallet)
|
|
4052
4069
|
return d("Embedded wallet initialization failed");
|
|
4053
|
-
const
|
|
4070
|
+
const u = i.wallet, p = await u?.loginByX?.();
|
|
4054
4071
|
if (!p)
|
|
4055
4072
|
return d("Failed to login into X");
|
|
4056
|
-
if (!(await
|
|
4073
|
+
if (!(await u.login(p)).isAvailable)
|
|
4057
4074
|
return d("Failed to login with X");
|
|
4058
4075
|
f();
|
|
4059
|
-
} catch (
|
|
4060
|
-
console.error("X login error:",
|
|
4076
|
+
} catch (u) {
|
|
4077
|
+
console.error("X login error:", u), d(u instanceof Error ? u.message : u);
|
|
4061
4078
|
} finally {
|
|
4062
4079
|
r(!1);
|
|
4063
4080
|
}
|
|
4064
4081
|
}
|
|
4065
4082
|
};
|
|
4066
4083
|
};
|
|
4067
|
-
|
|
4068
|
-
|
|
4084
|
+
function Pt() {
|
|
4085
|
+
const e = new Uint8Array(16);
|
|
4086
|
+
return crypto.getRandomValues(e), Array.from(e, (n) => n.toString(16).padStart(2, "0")).join("");
|
|
4087
|
+
}
|
|
4088
|
+
let be = null, Nr = null;
|
|
4089
|
+
function yt(e) {
|
|
4069
4090
|
be = e;
|
|
4070
4091
|
}
|
|
4071
|
-
function
|
|
4092
|
+
function zc() {
|
|
4072
4093
|
return be;
|
|
4073
4094
|
}
|
|
4074
4095
|
function Cn(e) {
|
|
4075
|
-
|
|
4076
|
-
}
|
|
4077
|
-
function Nr() {
|
|
4078
|
-
return Xr;
|
|
4096
|
+
Nr = e;
|
|
4079
4097
|
}
|
|
4080
4098
|
function jr() {
|
|
4099
|
+
return Nr;
|
|
4100
|
+
}
|
|
4101
|
+
function Tr() {
|
|
4081
4102
|
if (typeof window > "u")
|
|
4082
4103
|
return be;
|
|
4083
4104
|
if (be)
|
|
@@ -4096,32 +4117,32 @@ function dn() {
|
|
|
4096
4117
|
return be !== null;
|
|
4097
4118
|
}
|
|
4098
4119
|
function $n() {
|
|
4099
|
-
const e =
|
|
4120
|
+
const e = Tr();
|
|
4100
4121
|
return dn() ? e !== null : !1;
|
|
4101
4122
|
}
|
|
4102
|
-
function
|
|
4123
|
+
function Er() {
|
|
4103
4124
|
if (!dn())
|
|
4104
4125
|
return null;
|
|
4105
|
-
const e = $n(), n =
|
|
4126
|
+
const e = $n(), n = ds();
|
|
4106
4127
|
return e ? n : null;
|
|
4107
4128
|
}
|
|
4108
|
-
function
|
|
4129
|
+
function Ic() {
|
|
4109
4130
|
if (!dn())
|
|
4110
4131
|
return null;
|
|
4111
|
-
const e = $n(), n =
|
|
4132
|
+
const e = $n(), n = fs();
|
|
4112
4133
|
return e ? n : null;
|
|
4113
4134
|
}
|
|
4114
|
-
function
|
|
4135
|
+
function wc() {
|
|
4115
4136
|
if (!dn())
|
|
4116
4137
|
return null;
|
|
4117
|
-
const e = $n(), n =
|
|
4138
|
+
const e = $n(), n = As();
|
|
4118
4139
|
return e ? n : null;
|
|
4119
4140
|
}
|
|
4120
4141
|
function jn(e, n, t) {
|
|
4121
|
-
const r =
|
|
4142
|
+
const r = zc();
|
|
4122
4143
|
if (!r)
|
|
4123
4144
|
return null;
|
|
4124
|
-
const s =
|
|
4145
|
+
const s = jr(), i = t || s || r.connectors;
|
|
4125
4146
|
return !i || i.length === 0 ? null : i.find((a) => {
|
|
4126
4147
|
const c = (a.id || "").toLowerCase(), l = (a.name || "").toLowerCase(), A = e.toLowerCase(), d = n?.toLowerCase();
|
|
4127
4148
|
return c === A || c === d || l === A || l === d || c.includes(A) || l.includes(A);
|
|
@@ -4130,7 +4151,7 @@ function jn(e, n, t) {
|
|
|
4130
4151
|
const xn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
4131
4152
|
if (e)
|
|
4132
4153
|
throw n(t), new Error(t);
|
|
4133
|
-
},
|
|
4154
|
+
}, Pc = ({
|
|
4134
4155
|
walletState: e,
|
|
4135
4156
|
modalState: n,
|
|
4136
4157
|
setWalletState: t,
|
|
@@ -4138,12 +4159,12 @@ const xn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4138
4159
|
resetWalletState: s,
|
|
4139
4160
|
setMainView: i
|
|
4140
4161
|
}) => {
|
|
4141
|
-
const { currentProvider: a, currentWallet: c, isConnected: l, actionsLoading: A } = e, f = V(ln)?.connectedInfo ?? null,
|
|
4162
|
+
const { currentProvider: a, currentWallet: c, isConnected: l, actionsLoading: A } = e, f = V(ln)?.connectedInfo ?? null, g = Er(), m = Ic(), v = jr(), u = k(
|
|
4142
4163
|
async (z) => {
|
|
4143
4164
|
const { wallet: I, chainType: W } = z, S = (I.connectors[W] || null)?.provider || null;
|
|
4144
4165
|
if (l && c?.info?.uuid === I.info.uuid && W === e.chainType)
|
|
4145
4166
|
throw r("Wallet is already connected"), new Error("Wallet is already connected");
|
|
4146
|
-
if (!S && !
|
|
4167
|
+
if (!S && !St())
|
|
4147
4168
|
throw r("Provider not available for this chain type"), new Error("Provider not available for this chain type");
|
|
4148
4169
|
r(""), t((B) => ({
|
|
4149
4170
|
...B,
|
|
@@ -4153,7 +4174,7 @@ const xn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4153
4174
|
actionsLoading: !0
|
|
4154
4175
|
}));
|
|
4155
4176
|
try {
|
|
4156
|
-
const B = await
|
|
4177
|
+
const B = await Lt(
|
|
4157
4178
|
{
|
|
4158
4179
|
dappLink: typeof window < "u" ? window.location.href : ""
|
|
4159
4180
|
},
|
|
@@ -4167,12 +4188,12 @@ const xn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4167
4188
|
chainId: B.chainId || "",
|
|
4168
4189
|
chainType: W
|
|
4169
4190
|
};
|
|
4170
|
-
if (await In(800),
|
|
4191
|
+
if (await In(800), g && W === T.EVM && v)
|
|
4171
4192
|
try {
|
|
4172
4193
|
const X = jn(I.info.uuid, I.info.rdns, v);
|
|
4173
4194
|
if (X) {
|
|
4174
4195
|
const Z = B.chainId ? parseInt(B.chainId, 16) : void 0;
|
|
4175
|
-
await
|
|
4196
|
+
await g.connectAsync({
|
|
4176
4197
|
connector: X,
|
|
4177
4198
|
chainId: Z
|
|
4178
4199
|
});
|
|
@@ -4242,7 +4263,7 @@ const xn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4242
4263
|
connectedAt: Z.connectedAt,
|
|
4243
4264
|
walletId: Z.walletId
|
|
4244
4265
|
}));
|
|
4245
|
-
return
|
|
4266
|
+
return Ns({
|
|
4246
4267
|
address: B.address,
|
|
4247
4268
|
chainId: B.chainId,
|
|
4248
4269
|
chainType: W,
|
|
@@ -4283,10 +4304,10 @@ const xn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4283
4304
|
r,
|
|
4284
4305
|
t,
|
|
4285
4306
|
n,
|
|
4286
|
-
|
|
4307
|
+
g,
|
|
4287
4308
|
v
|
|
4288
4309
|
]
|
|
4289
|
-
), p =
|
|
4310
|
+
), p = k(async () => {
|
|
4290
4311
|
t((z) => ({ ...z, actionsLoading: !0 }));
|
|
4291
4312
|
try {
|
|
4292
4313
|
if (n.closeModal(), a?.disconnect?.(), m)
|
|
@@ -4312,7 +4333,7 @@ const xn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4312
4333
|
c,
|
|
4313
4334
|
s,
|
|
4314
4335
|
i
|
|
4315
|
-
]),
|
|
4336
|
+
]), b = k(
|
|
4316
4337
|
async ({ chainInfo: z, chainType: I }) => {
|
|
4317
4338
|
xn(A, r);
|
|
4318
4339
|
const W = z.id.toString(), E = {
|
|
@@ -4333,7 +4354,7 @@ const xn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4333
4354
|
} catch (B) {
|
|
4334
4355
|
if ((B && typeof B == "object" && "code" in B ? B.code : void 0) === 4902)
|
|
4335
4356
|
try {
|
|
4336
|
-
return await
|
|
4357
|
+
return await ts(S, E), !0;
|
|
4337
4358
|
} catch (j) {
|
|
4338
4359
|
throw r(j instanceof Error ? j.message : "Add chain failed"), console.error("Add chain failed:", j), j;
|
|
4339
4360
|
}
|
|
@@ -4343,7 +4364,7 @@ const xn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4343
4364
|
}
|
|
4344
4365
|
},
|
|
4345
4366
|
[t, e, A, r]
|
|
4346
|
-
),
|
|
4367
|
+
), x = k(
|
|
4347
4368
|
async (z) => {
|
|
4348
4369
|
if (xn(A, r), !e.isConnected || !e.currentProvider || !e.chainType)
|
|
4349
4370
|
throw new Error("Wallet not connected");
|
|
@@ -4353,11 +4374,10 @@ const xn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4353
4374
|
domain: typeof window < "u" ? window.location.host : "",
|
|
4354
4375
|
statement: "Clicking Sign or Approve only means you have proved this wallet is owned by you. This request will not trigger any blockchain transaction or cost any gas fee.",
|
|
4355
4376
|
version: "1",
|
|
4356
|
-
nonce:
|
|
4357
|
-
issuedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
4377
|
+
nonce: Pt()
|
|
4358
4378
|
}, ...z || {} };
|
|
4359
4379
|
try {
|
|
4360
|
-
const E = await
|
|
4380
|
+
const E = await rs(W, {
|
|
4361
4381
|
chainType: e.chainType,
|
|
4362
4382
|
account: {
|
|
4363
4383
|
address: e.address,
|
|
@@ -4388,15 +4408,15 @@ const xn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4388
4408
|
t,
|
|
4389
4409
|
r
|
|
4390
4410
|
]
|
|
4391
|
-
), w =
|
|
4411
|
+
), w = k(
|
|
4392
4412
|
async (z) => {
|
|
4393
4413
|
if (xn(A, r), !e.isConnected || !e.currentProvider || !e.chainType)
|
|
4394
4414
|
throw new Error("Wallet not connected");
|
|
4395
4415
|
const { message: I, nonce: W } = z;
|
|
4396
4416
|
if (!I || I.length === 0)
|
|
4397
4417
|
throw new Error("Message is required");
|
|
4398
|
-
return t((S) => ({ ...S, actionsLoading: !0 })), await
|
|
4399
|
-
{ message: I, nonce: W ||
|
|
4418
|
+
return t((S) => ({ ...S, actionsLoading: !0 })), await ss(
|
|
4419
|
+
{ message: I, nonce: W || Pt() },
|
|
4400
4420
|
{
|
|
4401
4421
|
chainType: e.chainType,
|
|
4402
4422
|
account: {
|
|
@@ -4425,22 +4445,22 @@ const xn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4425
4445
|
t,
|
|
4426
4446
|
r
|
|
4427
4447
|
]
|
|
4428
|
-
),
|
|
4448
|
+
), O = k(
|
|
4429
4449
|
(z) => t((I) => ({ ...I, currentWallet: z })),
|
|
4430
4450
|
[t]
|
|
4431
4451
|
);
|
|
4432
4452
|
return {
|
|
4433
|
-
connect:
|
|
4453
|
+
connect: u,
|
|
4434
4454
|
disconnect: p,
|
|
4435
|
-
switchChain:
|
|
4436
|
-
signInWithWallet:
|
|
4455
|
+
switchChain: b,
|
|
4456
|
+
signInWithWallet: x,
|
|
4437
4457
|
signMessage: w,
|
|
4438
4458
|
// signTransaction,
|
|
4439
4459
|
// signAndSendTransaction,
|
|
4440
4460
|
// sendTransaction,
|
|
4441
|
-
_setCurrentWallet:
|
|
4461
|
+
_setCurrentWallet: O
|
|
4442
4462
|
};
|
|
4443
|
-
},
|
|
4463
|
+
}, Ba = () => {
|
|
4444
4464
|
const e = V(N);
|
|
4445
4465
|
if (!e)
|
|
4446
4466
|
throw new Error("useWalletConnect must be used within WalletConnectProvider");
|
|
@@ -4459,30 +4479,35 @@ const xn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4459
4479
|
connect: (n) => e.connect(n),
|
|
4460
4480
|
disconnect: e.disconnect
|
|
4461
4481
|
};
|
|
4462
|
-
},
|
|
4482
|
+
}, yc = () => {
|
|
4463
4483
|
const { switchChain: e } = _n();
|
|
4464
4484
|
return On({
|
|
4465
4485
|
mutationKey: ["switch-chain"],
|
|
4466
4486
|
mutationFn: async (n) => e(n)
|
|
4467
4487
|
});
|
|
4468
|
-
},
|
|
4469
|
-
const { mutateAsync: t, isPending: r } =
|
|
4488
|
+
}, Bt = ({ chainType: e, chain: n }) => {
|
|
4489
|
+
const { mutateAsync: t, isPending: r } = yc(), s = V(N), { connectWallet: i } = Ye();
|
|
4470
4490
|
if (!n || !s)
|
|
4471
4491
|
throw new Error(`Chain ${e} not found`);
|
|
4472
4492
|
const { currentWallet: a } = s.account;
|
|
4473
4493
|
if (!a)
|
|
4474
4494
|
throw new Error("Current wallet not found");
|
|
4475
|
-
const { chainType: c, chainId: l } = _n(), A =
|
|
4495
|
+
const { chainType: c, chainId: l } = _n(), A = y(() => {
|
|
4496
|
+
if (l) {
|
|
4497
|
+
if (/^\d+$/.test(l)) return Number(l);
|
|
4498
|
+
if (l.startsWith("0x")) return parseInt(l, 16);
|
|
4499
|
+
}
|
|
4500
|
+
}, [l]), d = y(() => {
|
|
4476
4501
|
const v = c?.toLowerCase() === e?.toLowerCase();
|
|
4477
4502
|
if (c === "evm") {
|
|
4478
|
-
const
|
|
4479
|
-
return v && A ===
|
|
4503
|
+
const u = Number(n?.chainId?.split(":")[1] || "0");
|
|
4504
|
+
return A !== void 0 ? v && A === u : !1;
|
|
4480
4505
|
}
|
|
4481
4506
|
return v;
|
|
4482
4507
|
}, [n?.chainId, A, e, c]), f = y(
|
|
4483
4508
|
() => a?.connectors?.[e]?.provider,
|
|
4484
4509
|
[a, e]
|
|
4485
|
-
),
|
|
4510
|
+
), g = y(() => d ? /* @__PURE__ */ o("div", { className: "size-5 bg-[#079555] rounded-full flex items-center justify-center", children: /* @__PURE__ */ o(Nt, { className: "size-3", color: "white" }) }) : r ? /* @__PURE__ */ o(
|
|
4486
4511
|
ge,
|
|
4487
4512
|
{
|
|
4488
4513
|
size: "sm",
|
|
@@ -4491,7 +4516,7 @@ const xn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4491
4516
|
circle2: "border-b-primary"
|
|
4492
4517
|
}
|
|
4493
4518
|
}
|
|
4494
|
-
) : /* @__PURE__ */ o(
|
|
4519
|
+
) : /* @__PURE__ */ o(Et, { className: "size-4" }), [r, d]), m = () => {
|
|
4495
4520
|
if (!(r || d)) {
|
|
4496
4521
|
if (c !== e) {
|
|
4497
4522
|
f ? i(a, e) : s.modal.setView(M.ChangeNetwork, n);
|
|
@@ -4508,7 +4533,7 @@ const xn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4508
4533
|
}
|
|
4509
4534
|
};
|
|
4510
4535
|
return /* @__PURE__ */ o(
|
|
4511
|
-
|
|
4536
|
+
L,
|
|
4512
4537
|
{
|
|
4513
4538
|
fullWidth: !0,
|
|
4514
4539
|
size: "lg",
|
|
@@ -4525,12 +4550,12 @@ const xn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4525
4550
|
className: "size-8 overflow-hidden rounded-full"
|
|
4526
4551
|
}
|
|
4527
4552
|
),
|
|
4528
|
-
endContent:
|
|
4553
|
+
endContent: g,
|
|
4529
4554
|
onPress: m,
|
|
4530
4555
|
children: /* @__PURE__ */ o("span", { className: "flex-1 text-left text-sm font-medium", children: n?.chainInfo?.name })
|
|
4531
4556
|
}
|
|
4532
4557
|
);
|
|
4533
|
-
},
|
|
4558
|
+
}, Bc = ({ chains: e }) => {
|
|
4534
4559
|
const { chainType: n } = _n(), { currentChains: t, otherChains: r } = y(() => {
|
|
4535
4560
|
const s = [], i = [];
|
|
4536
4561
|
return e.map((a) => {
|
|
@@ -4547,29 +4572,29 @@ const xn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4547
4572
|
}), /* @__PURE__ */ C("div", { className: "flex flex-col w-full text-foreground", children: [
|
|
4548
4573
|
t[0]?.chainType === "evm" && /* @__PURE__ */ C("div", { className: "text-sm flex gap-2 mt-2 mb-4 items-center", children: [
|
|
4549
4574
|
/* @__PURE__ */ o("span", { children: "EVM network" }),
|
|
4550
|
-
/* @__PURE__ */ o("img", { src:
|
|
4575
|
+
/* @__PURE__ */ o("img", { src: mc, alt: "Evm chains", className: "h-4 w-auto" })
|
|
4551
4576
|
] }),
|
|
4552
|
-
/* @__PURE__ */ o("div", { className: "flex flex-col gap-1 w-full mb-4", children: t?.map((s, i) => /* @__PURE__ */ o(
|
|
4577
|
+
/* @__PURE__ */ o("div", { className: "flex flex-col gap-1 w-full mb-4", children: t?.map((s, i) => /* @__PURE__ */ o(Bt, { chainType: s.chainType, chain: s }, `${s.name}-${i}`)) }),
|
|
4553
4578
|
/* @__PURE__ */ o("div", { className: "text-sm flex gap-2 mt-2 mb-4", children: /* @__PURE__ */ o("span", { children: "Other network" }) }),
|
|
4554
|
-
/* @__PURE__ */ o("div", { className: "flex flex-col gap-1 w-full mb-4", children: r?.map((s, i) => /* @__PURE__ */ o(
|
|
4579
|
+
/* @__PURE__ */ o("div", { className: "flex flex-col gap-1 w-full mb-4", children: r?.map((s, i) => /* @__PURE__ */ o(Bt, { chainType: s.chainType, chain: s }, `${s.name}-${i}`)) })
|
|
4555
4580
|
] });
|
|
4556
|
-
},
|
|
4581
|
+
}, hc = () => {
|
|
4557
4582
|
const e = V(N);
|
|
4558
4583
|
if (!e)
|
|
4559
4584
|
throw new Error("WalletConnectContext not found");
|
|
4560
4585
|
const { currentWallet: n } = e.account;
|
|
4561
4586
|
if (!n)
|
|
4562
4587
|
throw new Error("Current wallet not found");
|
|
4563
|
-
const { chains: t, isLoading: r } =
|
|
4588
|
+
const { chains: t, isLoading: r } = Jt(), s = yr(e.config?.chains, n?.connectors, {
|
|
4564
4589
|
apiChains: r ? void 0 : t
|
|
4565
4590
|
});
|
|
4566
|
-
return /* @__PURE__ */ o(D, { title: "Select network", onBack: () => e?.modal.backView(), children: /* @__PURE__ */ o("div", { className: "flex flex-col items-center justify-center min-h-0 h-full", children: r ? /* @__PURE__ */ o("div", { className: "flex items-center justify-center py-8", children: /* @__PURE__ */ o("span", { className: "text-foreground-500", children: "Loading chains..." }) }) : /* @__PURE__ */ o("div", { className: "w-full overflow-y-auto max-h-[60vh] pr-2", children: /* @__PURE__ */ o(
|
|
4567
|
-
},
|
|
4591
|
+
return /* @__PURE__ */ o(D, { title: "Select network", onBack: () => e?.modal.backView(), children: /* @__PURE__ */ o("div", { className: "flex flex-col items-center justify-center min-h-0 h-full", children: r ? /* @__PURE__ */ o("div", { className: "flex items-center justify-center py-8", children: /* @__PURE__ */ o("span", { className: "text-foreground-500", children: "Loading chains..." }) }) : /* @__PURE__ */ o("div", { className: "w-full overflow-y-auto max-h-[60vh] pr-2", children: /* @__PURE__ */ o(Bc, { chains: s }) }) }) });
|
|
4592
|
+
}, Wc = ({ chainType: e, onSelect: n }) => {
|
|
4568
4593
|
const t = q[e];
|
|
4569
4594
|
if (!t)
|
|
4570
4595
|
throw new Error(`Chain ${e} not found`);
|
|
4571
4596
|
return /* @__PURE__ */ o(
|
|
4572
|
-
|
|
4597
|
+
L,
|
|
4573
4598
|
{
|
|
4574
4599
|
fullWidth: !0,
|
|
4575
4600
|
color: "default",
|
|
@@ -4577,20 +4602,20 @@ const xn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4577
4602
|
radius: "sm",
|
|
4578
4603
|
className: "justify-between border-content2 hover:bg-content2",
|
|
4579
4604
|
startContent: /* @__PURE__ */ o(Ie, { icon: t.icon, className: "size-6 overflow-hidden rounded-full" }),
|
|
4580
|
-
endContent: /* @__PURE__ */ o(
|
|
4605
|
+
endContent: /* @__PURE__ */ o(Et, { className: "size-4" }),
|
|
4581
4606
|
onPress: n,
|
|
4582
4607
|
children: /* @__PURE__ */ o("span", { className: "flex-1 text-left text-sm font-medium", children: q[e].name })
|
|
4583
4608
|
}
|
|
4584
4609
|
);
|
|
4585
|
-
},
|
|
4586
|
-
|
|
4610
|
+
}, Mc = ({ providers: e, onSelect: n }) => /* @__PURE__ */ o("div", { className: "flex flex-col gap-2 w-full pb-6", children: e.map((t, r) => /* @__PURE__ */ o(
|
|
4611
|
+
Wc,
|
|
4587
4612
|
{
|
|
4588
4613
|
chainType: t.chainType,
|
|
4589
4614
|
provider: t.provider,
|
|
4590
4615
|
onSelect: () => n(t.chainType)
|
|
4591
4616
|
},
|
|
4592
4617
|
`${t.chainType}-${t.protocol}-${r}`
|
|
4593
|
-
)) }),
|
|
4618
|
+
)) }), Vc = () => {
|
|
4594
4619
|
const e = V(N);
|
|
4595
4620
|
if (!e)
|
|
4596
4621
|
throw new Error("WalletConnectContext not found");
|
|
@@ -4603,7 +4628,7 @@ const xn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4603
4628
|
...A,
|
|
4604
4629
|
chainType: l
|
|
4605
4630
|
}));
|
|
4606
|
-
}, [t?.connectors, e.config?.chains]), i =
|
|
4631
|
+
}, [t?.connectors, e.config?.chains]), i = k(
|
|
4607
4632
|
async (a) => {
|
|
4608
4633
|
if (!t) {
|
|
4609
4634
|
console.error("Current wallet not found");
|
|
@@ -4621,9 +4646,9 @@ const xn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4621
4646
|
/* @__PURE__ */ o("br", {}),
|
|
4622
4647
|
"Please select the network you'd like to connect to."
|
|
4623
4648
|
] }),
|
|
4624
|
-
/* @__PURE__ */ o(
|
|
4649
|
+
/* @__PURE__ */ o(Mc, { providers: s, onSelect: i })
|
|
4625
4650
|
] }) });
|
|
4626
|
-
}, Vc = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUwIiBoZWlnaHQ9IjE1MCIgdmlld0JveD0iMCAwIDE1MCAxNTAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPGZvcmVpZ25PYmplY3QgeD0iMjEuMDg4MiIgeT0iMjEuNTg0MyIgd2lkdGg9IjEwNi45MjgiIGhlaWdodD0iMTA2LjkzNSI+PGRpdiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94aHRtbCIgc3R5bGU9ImJhY2tkcm9wLWZpbHRlcjpibHVyKDAuNjlweCk7Y2xpcC1wYXRoOnVybCgjYmdibHVyXzBfMTQxXzExMDJfY2xpcF9wYXRoKTtoZWlnaHQ6MTAwJTt3aWR0aDoxMDAlIj48L2Rpdj48L2ZvcmVpZ25PYmpl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NS41ODY0IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CjxzdG9wIHN0b3AtY29sb3I9IiNCQkZGQTEiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjQUNGRThCIi8+CjwvbGluZWFyR3JhZGllbnQ+CjwvZGVmcz4KPC9zdmc+Cg==", jc = () => {
|
|
4627
4652
|
const [e, n] = Y(!1), [t, r] = Y(null), s = V(N);
|
|
4628
4653
|
if (!s)
|
|
4629
4654
|
throw new Error("WalletConnectContext not found");
|
|
@@ -4644,13 +4669,13 @@ const xn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4644
4669
|
}, 1e3)), () => {
|
|
4645
4670
|
l.current && (clearTimeout(l.current), l.current = null);
|
|
4646
4671
|
}), [e, s.modal]), /* @__PURE__ */ o(D, { onClose: c, title: "Verify wallet ownership", onBack: c, children: /* @__PURE__ */ C("div", { className: "flex flex-col items-center justify-center py-6 gap-6 flex-1", children: [
|
|
4647
|
-
/* @__PURE__ */ o(ue, { src: e ?
|
|
4672
|
+
/* @__PURE__ */ o(ue, { src: e ? Nc : Xc, alt: "Sign In Icon", className: "rounded-full" }),
|
|
4648
4673
|
/* @__PURE__ */ C("div", { className: "text-sm text-center", children: [
|
|
4649
4674
|
/* @__PURE__ */ o("p", { className: "text-foreground", children: e ? "Ownership verified" : "Verify yourself as the owner of this wallet" }),
|
|
4650
4675
|
t ? /* @__PURE__ */ o("p", { className: "text-foreground/60", children: t }) : e ? null : /* @__PURE__ */ o("p", { className: "text-foreground/60", children: "Please sign the message request in your wallet to continue." })
|
|
4651
4676
|
] }),
|
|
4652
4677
|
/* @__PURE__ */ o("div", { className: "w-full px-4", children: /* @__PURE__ */ o(
|
|
4653
|
-
|
|
4678
|
+
L,
|
|
4654
4679
|
{
|
|
4655
4680
|
fullWidth: !0,
|
|
4656
4681
|
size: "lg",
|
|
@@ -4672,7 +4697,7 @@ const xn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4672
4697
|
}
|
|
4673
4698
|
) })
|
|
4674
4699
|
] }) });
|
|
4675
|
-
},
|
|
4700
|
+
}, ht = ({
|
|
4676
4701
|
text: e = "or",
|
|
4677
4702
|
className: n = "",
|
|
4678
4703
|
lineClassName: t = "bg-content2",
|
|
@@ -4681,7 +4706,7 @@ const xn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4681
4706
|
/* @__PURE__ */ o("div", { className: `flex-1 h-px ${t}` }),
|
|
4682
4707
|
/* @__PURE__ */ o("span", { className: r, children: e }),
|
|
4683
4708
|
/* @__PURE__ */ o("div", { className: `flex-1 h-px ${t}` })
|
|
4684
|
-
] }),
|
|
4709
|
+
] }), Tc = ({ isLoading: e = !1, text: n = "Loading..." }) => e ? /* @__PURE__ */ o("div", { className: "absolute inset-0 backdrop-blur-sm z-50 flex items-center justify-center", children: /* @__PURE__ */ C("div", { className: "flex flex-col items-center gap-3", children: [
|
|
4685
4710
|
/* @__PURE__ */ o(
|
|
4686
4711
|
ge,
|
|
4687
4712
|
{
|
|
@@ -4693,7 +4718,7 @@ const xn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4693
4718
|
}
|
|
4694
4719
|
),
|
|
4695
4720
|
/* @__PURE__ */ o("span", { className: "text-foreground text-sm font-medium", children: n })
|
|
4696
|
-
] }) }) : null,
|
|
4721
|
+
] }) }) : null, Ec = ({ className: e, width: n = 24, height: t = 24 }) => /* @__PURE__ */ C(
|
|
4697
4722
|
"svg",
|
|
4698
4723
|
{
|
|
4699
4724
|
width: n,
|
|
@@ -4733,7 +4758,7 @@ const xn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4733
4758
|
)
|
|
4734
4759
|
]
|
|
4735
4760
|
}
|
|
4736
|
-
),
|
|
4761
|
+
), Sc = ({ className: e, width: n = 24, height: t = 24, fill: r = "white" }) => /* @__PURE__ */ o(
|
|
4737
4762
|
"svg",
|
|
4738
4763
|
{
|
|
4739
4764
|
width: n,
|
|
@@ -4744,27 +4769,27 @@ const xn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4744
4769
|
className: e,
|
|
4745
4770
|
children: /* @__PURE__ */ o("path", { d: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" })
|
|
4746
4771
|
}
|
|
4747
|
-
),
|
|
4748
|
-
const [e, n] = Y(""), t = V(N), { isLoading: r, handleEmailLogin: s, handleGoogleLogin: i, handleXLogin: a } =
|
|
4772
|
+
), Oc = Tt, Lc = () => {
|
|
4773
|
+
const [e, n] = Y(""), t = V(N), { isLoading: r, handleEmailLogin: s, handleGoogleLogin: i, handleXLogin: a } = bc({
|
|
4749
4774
|
closeModalBeforeIframe: !0
|
|
4750
4775
|
});
|
|
4751
4776
|
if (!t)
|
|
4752
4777
|
throw new Error("WalletConnectContext not found");
|
|
4753
|
-
const { isWalletReady: c } = t.walletReady, l = t.modal.state?.error, { login: A } = t.config, d = A.basicLogins?.includes("email") ?? !1, f = A.basicLogins?.includes("externalWallets") ?? !1,
|
|
4778
|
+
const { isWalletReady: c } = t.walletReady, l = t.modal.state?.error, { login: A } = t.config, d = A.basicLogins?.includes("email") ?? !1, f = A.basicLogins?.includes("externalWallets") ?? !1, g = A.socialLogins?.some((b) => b.type === "google") ?? !1, m = A.socialLogins?.some((b) => b.type === "x") ?? !1, v = g || m;
|
|
4754
4779
|
return /* @__PURE__ */ C(D, { title: "Log in or sign up", children: [
|
|
4755
|
-
/* @__PURE__ */ o(
|
|
4780
|
+
/* @__PURE__ */ o(Tc, { isLoading: r }),
|
|
4756
4781
|
/* @__PURE__ */ C("div", { className: "flex flex-col justify-between min-h-0 flex-1 pb-4", children: [
|
|
4757
4782
|
/* @__PURE__ */ C("div", { className: "flex flex-col gap-6 px-4", children: [
|
|
4758
4783
|
l && /* @__PURE__ */ o("p", { className: "text-sm text-danger", role: "alert", children: l }),
|
|
4759
4784
|
d && /* @__PURE__ */ C(En, { children: [
|
|
4760
4785
|
/* @__PURE__ */ C("div", { className: "flex items-center gap-2", children: [
|
|
4761
4786
|
/* @__PURE__ */ o(
|
|
4762
|
-
|
|
4787
|
+
Oc,
|
|
4763
4788
|
{
|
|
4764
4789
|
type: "email",
|
|
4765
4790
|
placeholder: "Enter your email",
|
|
4766
4791
|
value: e,
|
|
4767
|
-
onChange: (
|
|
4792
|
+
onChange: (b) => n(b.target.value),
|
|
4768
4793
|
classNames: {
|
|
4769
4794
|
inputWrapper: "rounded-full h-11"
|
|
4770
4795
|
},
|
|
@@ -4772,7 +4797,7 @@ const xn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4772
4797
|
}
|
|
4773
4798
|
),
|
|
4774
4799
|
/* @__PURE__ */ o(
|
|
4775
|
-
|
|
4800
|
+
L,
|
|
4776
4801
|
{
|
|
4777
4802
|
isIconOnly: !0,
|
|
4778
4803
|
variant: "solid",
|
|
@@ -4796,37 +4821,37 @@ const xn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4796
4821
|
}
|
|
4797
4822
|
)
|
|
4798
4823
|
] }),
|
|
4799
|
-
v && /* @__PURE__ */ o(
|
|
4824
|
+
v && /* @__PURE__ */ o(ht, {})
|
|
4800
4825
|
] }),
|
|
4801
4826
|
v && /* @__PURE__ */ C("div", { className: "flex flex-col gap-3", children: [
|
|
4802
|
-
|
|
4803
|
-
|
|
4827
|
+
g && /* @__PURE__ */ o(
|
|
4828
|
+
L,
|
|
4804
4829
|
{
|
|
4805
4830
|
fullWidth: !0,
|
|
4806
4831
|
size: "lg",
|
|
4807
4832
|
className: "h-11 rounded-full bg-primary hover:bg-primary-hover",
|
|
4808
4833
|
onPress: i,
|
|
4809
|
-
startContent: /* @__PURE__ */ o(
|
|
4834
|
+
startContent: /* @__PURE__ */ o(Ec, {}),
|
|
4810
4835
|
isDisabled: !c,
|
|
4811
4836
|
children: /* @__PURE__ */ o("span", { className: "text-primary-foreground", children: "Continue with Google" })
|
|
4812
4837
|
}
|
|
4813
4838
|
),
|
|
4814
4839
|
m && /* @__PURE__ */ o(
|
|
4815
|
-
|
|
4840
|
+
L,
|
|
4816
4841
|
{
|
|
4817
4842
|
fullWidth: !0,
|
|
4818
4843
|
size: "lg",
|
|
4819
4844
|
className: "h-11 rounded-full bg-primary hover:bg-primary-hover",
|
|
4820
4845
|
onPress: a,
|
|
4821
|
-
startContent: /* @__PURE__ */ o(
|
|
4846
|
+
startContent: /* @__PURE__ */ o(Sc, {}),
|
|
4822
4847
|
isDisabled: !c,
|
|
4823
4848
|
children: /* @__PURE__ */ o("span", { className: "text-primary-foreground", children: "Continue with X" })
|
|
4824
4849
|
}
|
|
4825
4850
|
)
|
|
4826
4851
|
] }),
|
|
4827
|
-
(d || v) && f && /* @__PURE__ */ o(
|
|
4852
|
+
(d || v) && f && /* @__PURE__ */ o(ht, {}),
|
|
4828
4853
|
f && /* @__PURE__ */ o(
|
|
4829
|
-
|
|
4854
|
+
L,
|
|
4830
4855
|
{
|
|
4831
4856
|
fullWidth: !0,
|
|
4832
4857
|
size: "lg",
|
|
@@ -4841,7 +4866,7 @@ const xn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4841
4866
|
/* @__PURE__ */ o("div", { className: "mt-6 px-4", children: /* @__PURE__ */ o(Rn, {}) })
|
|
4842
4867
|
] })
|
|
4843
4868
|
] });
|
|
4844
|
-
},
|
|
4869
|
+
}, kc = "Please reselect the network you want to switch to", Yc = le.unsupported, Zc = () => {
|
|
4845
4870
|
const e = V(N);
|
|
4846
4871
|
if (!e)
|
|
4847
4872
|
throw new Error("WalletConnectContext not found");
|
|
@@ -4849,7 +4874,7 @@ const xn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4849
4874
|
e?.modal.backView();
|
|
4850
4875
|
};
|
|
4851
4876
|
return /* @__PURE__ */ o(D, { title: "Select network", onBack: t, children: /* @__PURE__ */ C("div", { className: "flex flex-col items-center justify-center", children: [
|
|
4852
|
-
/* @__PURE__ */ o("div", { className: "flex justify-center", children: /* @__PURE__ */ o(Ie, { icon:
|
|
4877
|
+
/* @__PURE__ */ o("div", { className: "flex justify-center", children: /* @__PURE__ */ o(Ie, { icon: Yc, className: "size-14 overflow-hidden rounded-full" }) }),
|
|
4853
4878
|
/* @__PURE__ */ C("div", { className: "mt-6 flex flex-col justify-center items-center", children: [
|
|
4854
4879
|
/* @__PURE__ */ C("div", { className: "text-t1 text-sm text-center", children: [
|
|
4855
4880
|
"Current Wallet Does Not Support ",
|
|
@@ -4858,11 +4883,11 @@ const xn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4858
4883
|
n,
|
|
4859
4884
|
" Chain"
|
|
4860
4885
|
] }),
|
|
4861
|
-
/* @__PURE__ */ o("div", { className: "text-[#A9A29D] mt-2 text-sm text-center", children:
|
|
4886
|
+
/* @__PURE__ */ o("div", { className: "text-[#A9A29D] mt-2 text-sm text-center", children: kc })
|
|
4862
4887
|
] }),
|
|
4863
|
-
/* @__PURE__ */ o(
|
|
4888
|
+
/* @__PURE__ */ o(L, { className: "w-full my-4", onPress: t, children: "Got it" })
|
|
4864
4889
|
] }) });
|
|
4865
|
-
},
|
|
4890
|
+
}, Fc = () => {
|
|
4866
4891
|
const e = V(N);
|
|
4867
4892
|
if (!e)
|
|
4868
4893
|
throw new Error("WalletConnectContext not found");
|
|
@@ -4895,58 +4920,58 @@ const xn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4895
4920
|
}, title: "Wallet Connect", children: /* @__PURE__ */ C("div", { className: "flex flex-col items-center justify-center px-5 pb-6 gap-4", children: [
|
|
4896
4921
|
/* @__PURE__ */ o("p", { className: "text-sm text-foreground/80 text-center", children: "Scan the QR code with your wallet camera" }),
|
|
4897
4922
|
/* @__PURE__ */ o(
|
|
4898
|
-
|
|
4923
|
+
hr,
|
|
4899
4924
|
{
|
|
4900
4925
|
content: t,
|
|
4901
4926
|
logo: n.info.icon,
|
|
4902
4927
|
logoBackground: n.info.iconBackground
|
|
4903
4928
|
}
|
|
4904
4929
|
),
|
|
4905
|
-
/* @__PURE__ */ o(
|
|
4930
|
+
/* @__PURE__ */ o(L, { variant: "light", size: "lg", fullWidth: !0, onPress: a, children: i ? "Copied!" : "Copy Link" })
|
|
4906
4931
|
] }) });
|
|
4907
|
-
},
|
|
4908
|
-
[M.Loading]: () => /* @__PURE__ */ o(
|
|
4909
|
-
[M.Error]: () => /* @__PURE__ */ o(
|
|
4910
|
-
[M.Connecting]: () => /* @__PURE__ */ o(
|
|
4911
|
-
[M.WalletList]: () => /* @__PURE__ */ o(
|
|
4912
|
-
[M.WalletSearch]: () => /* @__PURE__ */ o(
|
|
4913
|
-
[M.WalletSelectProviders]: () => /* @__PURE__ */ o(
|
|
4914
|
-
[M.WalletInstallGuide]: () => /* @__PURE__ */ o(
|
|
4915
|
-
[M.Account]: () => /* @__PURE__ */ o(
|
|
4916
|
-
[M.SelectChains]: () => /* @__PURE__ */ o(
|
|
4917
|
-
[M.ChangeNetwork]: () => /* @__PURE__ */ o(
|
|
4918
|
-
[M.SignInWallet]: () => /* @__PURE__ */ o(
|
|
4919
|
-
[M.WalletConnect]: () => /* @__PURE__ */ o(
|
|
4920
|
-
[M.UnsupportChain]: () => /* @__PURE__ */ o(
|
|
4921
|
-
[M.WalletHome]: () => /* @__PURE__ */ o(
|
|
4922
|
-
},
|
|
4923
|
-
const { hideHeader: n, hideBody: t, onBack: r, ...s } = e, i = y(() => r ? /* @__PURE__ */ o(
|
|
4932
|
+
}, Sr = {
|
|
4933
|
+
[M.Loading]: () => /* @__PURE__ */ o(nc, {}),
|
|
4934
|
+
[M.Error]: () => /* @__PURE__ */ o(Ho, {}),
|
|
4935
|
+
[M.Connecting]: () => /* @__PURE__ */ o(Do, {}),
|
|
4936
|
+
[M.WalletList]: () => /* @__PURE__ */ o(Ac, {}),
|
|
4937
|
+
[M.WalletSearch]: () => /* @__PURE__ */ o(vc, {}),
|
|
4938
|
+
[M.WalletSelectProviders]: () => /* @__PURE__ */ o(Vc, {}),
|
|
4939
|
+
[M.WalletInstallGuide]: () => /* @__PURE__ */ o(ec, {}),
|
|
4940
|
+
[M.Account]: () => /* @__PURE__ */ o(Zo, {}),
|
|
4941
|
+
[M.SelectChains]: () => /* @__PURE__ */ o(hc, {}),
|
|
4942
|
+
[M.ChangeNetwork]: () => /* @__PURE__ */ o(Fo, {}),
|
|
4943
|
+
[M.SignInWallet]: () => /* @__PURE__ */ o(jc, {}),
|
|
4944
|
+
[M.WalletConnect]: () => /* @__PURE__ */ o(Fc, {}),
|
|
4945
|
+
[M.UnsupportChain]: () => /* @__PURE__ */ o(Zc, {}),
|
|
4946
|
+
[M.WalletHome]: () => /* @__PURE__ */ o(Lc, {})
|
|
4947
|
+
}, Jc = (e) => {
|
|
4948
|
+
const { hideHeader: n, hideBody: t, onBack: r, ...s } = e, i = y(() => r ? /* @__PURE__ */ o(L, { isIconOnly: !0, size: "sm", variant: "light", onPress: r, radius: "full", children: /* @__PURE__ */ o(Vt, {}) }) : null, [r]), a = y(() => n ? null : /* @__PURE__ */ C(Gr, { className: "flex items-center justify-between", children: [
|
|
4924
4949
|
i,
|
|
4925
4950
|
/* @__PURE__ */ o("span", { children: e.title }),
|
|
4926
|
-
/* @__PURE__ */ o(
|
|
4927
|
-
] }), [n, e.title, e.onClose, i]), c = y(() => t ? null : /* @__PURE__ */ o(
|
|
4951
|
+
/* @__PURE__ */ o(L, { isIconOnly: !0, size: "sm", variant: "light", onPress: e.onClose, radius: "full", children: /* @__PURE__ */ o(Xt, {}) })
|
|
4952
|
+
] }), [n, e.title, e.onClose, i]), c = y(() => t ? null : /* @__PURE__ */ o(Rr, { className: "px-5", children: e.children }), [t, e.children]);
|
|
4928
4953
|
return /* @__PURE__ */ o(
|
|
4929
|
-
|
|
4954
|
+
jt,
|
|
4930
4955
|
{
|
|
4931
4956
|
...s,
|
|
4932
4957
|
hideCloseButton: !0,
|
|
4933
4958
|
portalContainer: document.getElementById("modal-container") || void 0,
|
|
4934
|
-
children: /* @__PURE__ */ C(
|
|
4959
|
+
children: /* @__PURE__ */ C(_r, { className: "bg-content1", children: [
|
|
4935
4960
|
a,
|
|
4936
4961
|
c
|
|
4937
4962
|
] })
|
|
4938
4963
|
}
|
|
4939
4964
|
);
|
|
4940
|
-
},
|
|
4965
|
+
}, Dc = () => {
|
|
4941
4966
|
const e = V(N);
|
|
4942
4967
|
if (!e)
|
|
4943
4968
|
return null;
|
|
4944
4969
|
const { modal: n, connection: t } = e, r = () => {
|
|
4945
|
-
const s =
|
|
4970
|
+
const s = Sr[n.view];
|
|
4946
4971
|
return s ? s(e) : null;
|
|
4947
4972
|
};
|
|
4948
4973
|
return /* @__PURE__ */ o(
|
|
4949
|
-
|
|
4974
|
+
Jc,
|
|
4950
4975
|
{
|
|
4951
4976
|
hideHeader: !0,
|
|
4952
4977
|
isOpen: n.isOpen,
|
|
@@ -4957,20 +4982,20 @@ const xn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4957
4982
|
}
|
|
4958
4983
|
);
|
|
4959
4984
|
};
|
|
4960
|
-
function
|
|
4985
|
+
function Hc(e) {
|
|
4961
4986
|
if (!e) return !0;
|
|
4962
4987
|
const n = e.basicLogins?.includes("email") ?? !1, t = (e.socialLogins?.length ?? 0) > 0;
|
|
4963
4988
|
return n || t;
|
|
4964
4989
|
}
|
|
4965
|
-
function
|
|
4990
|
+
function Qc(e, n) {
|
|
4966
4991
|
return n ? e?.error ? "error" : !e || e.isLoading ? "initializing" : e.wallet ? "ready" : "unavailable" : "disabled";
|
|
4967
4992
|
}
|
|
4968
|
-
function
|
|
4993
|
+
function Kc(e, n) {
|
|
4969
4994
|
return n ? "connecting" : e ? "connected" : "disconnected";
|
|
4970
4995
|
}
|
|
4971
|
-
const
|
|
4972
|
-
async function
|
|
4973
|
-
const t =
|
|
4996
|
+
const qc = ["embeddedWallet"];
|
|
4997
|
+
async function Uc(e, n) {
|
|
4998
|
+
const t = gs.getInstance(), r = await t.init({
|
|
4974
4999
|
...e,
|
|
4975
5000
|
clientId: e.clientId,
|
|
4976
5001
|
stage: e.stage || "prod"
|
|
@@ -4986,7 +5011,7 @@ async function qc(e, n) {
|
|
|
4986
5011
|
connectedInfo: r.connectedInfo ?? null
|
|
4987
5012
|
};
|
|
4988
5013
|
}
|
|
4989
|
-
const
|
|
5014
|
+
const Gc = ({
|
|
4990
5015
|
config: e,
|
|
4991
5016
|
setMainView: n,
|
|
4992
5017
|
defaultMainView: t,
|
|
@@ -4995,8 +5020,8 @@ const Uc = ({
|
|
|
4995
5020
|
themeMode: i
|
|
4996
5021
|
}) => {
|
|
4997
5022
|
const a = Sn({
|
|
4998
|
-
queryKey: [...
|
|
4999
|
-
queryFn: ({ signal: f }) =>
|
|
5023
|
+
queryKey: [...qc, e.clientId, e.stage ?? "prod"],
|
|
5024
|
+
queryFn: ({ signal: f }) => Uc(e, f),
|
|
5000
5025
|
enabled: r
|
|
5001
5026
|
}), { data: c, isLoading: l, isError: A, error: d } = a;
|
|
5002
5027
|
return F(() => {
|
|
@@ -5018,7 +5043,7 @@ const Uc = ({
|
|
|
5018
5043
|
isLoading: r && l,
|
|
5019
5044
|
error: A ? d instanceof Error ? d : new Error("Failed to initialize embedded wallet") : null
|
|
5020
5045
|
};
|
|
5021
|
-
},
|
|
5046
|
+
}, Rc = ({
|
|
5022
5047
|
setWalletState: e,
|
|
5023
5048
|
currentWallet: n,
|
|
5024
5049
|
isConnected: t,
|
|
@@ -5026,32 +5051,32 @@ const Uc = ({
|
|
|
5026
5051
|
embeddedWalletState: s,
|
|
5027
5052
|
wagmiConfig: i
|
|
5028
5053
|
}) => {
|
|
5029
|
-
const a = ae(!1), { data: c } = Ze("all", [], { embeddedWallet: s?.wallet ?? null }), l = y(() => c?.all || [], [c?.all]), A =
|
|
5054
|
+
const a = ae(!1), { data: c } = Ze("all", [], { embeddedWallet: s?.wallet ?? null }), l = y(() => c?.all || [], [c?.all]), A = Er(), d = wc();
|
|
5030
5055
|
F(() => {
|
|
5031
5056
|
if (a.current || t || n)
|
|
5032
5057
|
return;
|
|
5033
5058
|
const f = () => {
|
|
5034
5059
|
try {
|
|
5035
|
-
const m = s?.wallet, v =
|
|
5060
|
+
const m = s?.wallet, v = js();
|
|
5036
5061
|
if (!v) {
|
|
5037
5062
|
a.current = !0;
|
|
5038
5063
|
return;
|
|
5039
5064
|
}
|
|
5040
|
-
let
|
|
5041
|
-
if (console.log("Attempting to restore wallet connection...", v), !
|
|
5065
|
+
let u = l.find((z) => z.info.uuid === v.walletInfo?.uuid) || null;
|
|
5066
|
+
if (console.log("Attempting to restore wallet connection...", v), !u && m?.isAvailable && (u = m), !u) {
|
|
5042
5067
|
console.log("Stored wallet not found in available wallets"), m && (a.current = !0);
|
|
5043
5068
|
return;
|
|
5044
5069
|
}
|
|
5045
5070
|
e((z) => ({
|
|
5046
5071
|
...z,
|
|
5047
|
-
currentWallet:
|
|
5072
|
+
currentWallet: u
|
|
5048
5073
|
}));
|
|
5049
|
-
const p = v.chainType || T.EVM,
|
|
5050
|
-
if (!
|
|
5074
|
+
const p = v.chainType || T.EVM, b = u?.connectors[p] || null;
|
|
5075
|
+
if (!b) {
|
|
5051
5076
|
console.log("Provider not available for stored chain type"), a.current = !0;
|
|
5052
5077
|
return;
|
|
5053
5078
|
}
|
|
5054
|
-
if (
|
|
5079
|
+
if (u?.isEmbeddedWallet) {
|
|
5055
5080
|
const z = s?.connectedInfo;
|
|
5056
5081
|
if (!z) {
|
|
5057
5082
|
console.log("No connectedInfo available for embedded wallet"), a.current = !0;
|
|
@@ -5062,7 +5087,7 @@ const Uc = ({
|
|
|
5062
5087
|
console.log("No connected provider found in connectedInfo"), a.current = !0;
|
|
5063
5088
|
return;
|
|
5064
5089
|
}
|
|
5065
|
-
const W =
|
|
5090
|
+
const W = u?.connectors[I]?.provider;
|
|
5066
5091
|
if (!W) {
|
|
5067
5092
|
console.log("Provider not available for connected chain type:", I), a.current = !0;
|
|
5068
5093
|
return;
|
|
@@ -5091,7 +5116,7 @@ const Uc = ({
|
|
|
5091
5116
|
provider: W,
|
|
5092
5117
|
address: B,
|
|
5093
5118
|
connectedAt: Date.now(),
|
|
5094
|
-
walletId:
|
|
5119
|
+
walletId: u.info.uuid
|
|
5095
5120
|
}), e((j) => ({
|
|
5096
5121
|
...j,
|
|
5097
5122
|
isConnected: !0,
|
|
@@ -5099,11 +5124,11 @@ const Uc = ({
|
|
|
5099
5124
|
chainId: v.chainId,
|
|
5100
5125
|
chainType: I,
|
|
5101
5126
|
balance: v.balance || "0.0",
|
|
5102
|
-
currentWallet:
|
|
5127
|
+
currentWallet: u,
|
|
5103
5128
|
currentProvider: W,
|
|
5104
5129
|
providers: J
|
|
5105
5130
|
})), A && I === T.EVM && i && d && !d.isConnected) {
|
|
5106
|
-
const j = jn(
|
|
5131
|
+
const j = jn(u.info.uuid, u.info.rdns, void 0);
|
|
5107
5132
|
if (j?.ready) {
|
|
5108
5133
|
const U = v.chainId ? parseInt(v.chainId, 16) : void 0;
|
|
5109
5134
|
A.connectAsync({ connector: j, chainId: U }).catch((X) => console.warn("Failed to restore wagmi connection:", X));
|
|
@@ -5112,7 +5137,7 @@ const Uc = ({
|
|
|
5112
5137
|
a.current = !0;
|
|
5113
5138
|
return;
|
|
5114
5139
|
}
|
|
5115
|
-
const
|
|
5140
|
+
const x = v.chainType, w = {};
|
|
5116
5141
|
if (v.providers && Array.isArray(v.providers))
|
|
5117
5142
|
for (const z of v.providers) {
|
|
5118
5143
|
const I = z.chainType, W = l.find((E) => E.info.uuid === z.walletId);
|
|
@@ -5126,23 +5151,23 @@ const Uc = ({
|
|
|
5126
5151
|
});
|
|
5127
5152
|
}
|
|
5128
5153
|
}
|
|
5129
|
-
|
|
5130
|
-
provider:
|
|
5154
|
+
b.provider && x && (w[x] = {
|
|
5155
|
+
provider: b.provider,
|
|
5131
5156
|
address: v.address,
|
|
5132
5157
|
connectedAt: Date.now(),
|
|
5133
|
-
walletId:
|
|
5158
|
+
walletId: u.info.uuid
|
|
5134
5159
|
}), e((z) => ({
|
|
5135
5160
|
...z,
|
|
5136
5161
|
isConnected: !0,
|
|
5137
5162
|
address: v.address,
|
|
5138
5163
|
chainId: v.chainId,
|
|
5139
|
-
chainType:
|
|
5164
|
+
chainType: x,
|
|
5140
5165
|
balance: v.balance || "0.0",
|
|
5141
|
-
currentWallet:
|
|
5142
|
-
currentProvider:
|
|
5166
|
+
currentWallet: u,
|
|
5167
|
+
currentProvider: b.provider,
|
|
5143
5168
|
providers: w
|
|
5144
5169
|
}));
|
|
5145
|
-
const
|
|
5170
|
+
const O = () => {
|
|
5146
5171
|
e((z) => ({
|
|
5147
5172
|
...z,
|
|
5148
5173
|
isConnected: !1,
|
|
@@ -5154,19 +5179,19 @@ const Uc = ({
|
|
|
5154
5179
|
providers: {}
|
|
5155
5180
|
}));
|
|
5156
5181
|
};
|
|
5157
|
-
if (
|
|
5182
|
+
if (Lt(
|
|
5158
5183
|
{ dappLink: typeof window < "u" ? window.location.href : "" },
|
|
5159
5184
|
{
|
|
5160
|
-
provider:
|
|
5161
|
-
chainType:
|
|
5162
|
-
walletInfo:
|
|
5185
|
+
provider: b.provider,
|
|
5186
|
+
chainType: x,
|
|
5187
|
+
walletInfo: u.info
|
|
5163
5188
|
}
|
|
5164
5189
|
).then((z) => {
|
|
5165
|
-
z?.address && z.address.toLowerCase() === v.address.toLowerCase() ? console.log("Restoring plugin wallet connection for:",
|
|
5190
|
+
z?.address && z.address.toLowerCase() === v.address.toLowerCase() ? console.log("Restoring plugin wallet connection for:", u.info.name) : O();
|
|
5166
5191
|
}).catch(() => {
|
|
5167
|
-
|
|
5192
|
+
O(), console.log("Failed to verify wallet connection");
|
|
5168
5193
|
}), A && v.chainType === T.EVM && i && d && !d.isConnected) {
|
|
5169
|
-
const z = jn(
|
|
5194
|
+
const z = jn(u.info.uuid, u.info.rdns, void 0);
|
|
5170
5195
|
if (z?.ready) {
|
|
5171
5196
|
const I = v.chainId ? parseInt(v.chainId, 16) : void 0;
|
|
5172
5197
|
A.connectAsync({ connector: z, chainId: I }).catch((W) => console.warn("Failed to restore wagmi connection:", W));
|
|
@@ -5190,12 +5215,12 @@ const Uc = ({
|
|
|
5190
5215
|
d
|
|
5191
5216
|
]);
|
|
5192
5217
|
};
|
|
5193
|
-
function
|
|
5218
|
+
function _c(e) {
|
|
5194
5219
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
5195
5220
|
}
|
|
5196
|
-
var bn = { exports: {} },
|
|
5197
|
-
function
|
|
5198
|
-
return
|
|
5221
|
+
var bn = { exports: {} }, Wt;
|
|
5222
|
+
function $c() {
|
|
5223
|
+
return Wt || (Wt = 1, function(e) {
|
|
5199
5224
|
var n = Object.prototype.hasOwnProperty, t = "~";
|
|
5200
5225
|
function r() {
|
|
5201
5226
|
}
|
|
@@ -5203,10 +5228,10 @@ function _c() {
|
|
|
5203
5228
|
function s(l, A, d) {
|
|
5204
5229
|
this.fn = l, this.context = A, this.once = d || !1;
|
|
5205
5230
|
}
|
|
5206
|
-
function i(l, A, d, f,
|
|
5231
|
+
function i(l, A, d, f, g) {
|
|
5207
5232
|
if (typeof d != "function")
|
|
5208
5233
|
throw new TypeError("The listener must be a function");
|
|
5209
|
-
var m = new s(d, f || l,
|
|
5234
|
+
var m = new s(d, f || l, g), v = t ? t + A : A;
|
|
5210
5235
|
return l._events[v] ? l._events[v].fn ? l._events[v] = [l._events[v], m] : l._events[v].push(m) : (l._events[v] = m, l._eventsCount++), l;
|
|
5211
5236
|
}
|
|
5212
5237
|
function a(l, A) {
|
|
@@ -5225,18 +5250,18 @@ function _c() {
|
|
|
5225
5250
|
var d = t ? t + A : A, f = this._events[d];
|
|
5226
5251
|
if (!f) return [];
|
|
5227
5252
|
if (f.fn) return [f.fn];
|
|
5228
|
-
for (var
|
|
5229
|
-
v[
|
|
5253
|
+
for (var g = 0, m = f.length, v = new Array(m); g < m; g++)
|
|
5254
|
+
v[g] = f[g].fn;
|
|
5230
5255
|
return v;
|
|
5231
5256
|
}, c.prototype.listenerCount = function(A) {
|
|
5232
5257
|
var d = t ? t + A : A, f = this._events[d];
|
|
5233
5258
|
return f ? f.fn ? 1 : f.length : 0;
|
|
5234
|
-
}, c.prototype.emit = function(A, d, f,
|
|
5235
|
-
var
|
|
5236
|
-
if (!this._events[
|
|
5237
|
-
var p = this._events[
|
|
5259
|
+
}, c.prototype.emit = function(A, d, f, g, m, v) {
|
|
5260
|
+
var u = t ? t + A : A;
|
|
5261
|
+
if (!this._events[u]) return !1;
|
|
5262
|
+
var p = this._events[u], b = arguments.length, x, w;
|
|
5238
5263
|
if (p.fn) {
|
|
5239
|
-
switch (p.once && this.removeListener(A, p.fn, void 0, !0),
|
|
5264
|
+
switch (p.once && this.removeListener(A, p.fn, void 0, !0), b) {
|
|
5240
5265
|
case 1:
|
|
5241
5266
|
return p.fn.call(p.context), !0;
|
|
5242
5267
|
case 2:
|
|
@@ -5244,19 +5269,19 @@ function _c() {
|
|
|
5244
5269
|
case 3:
|
|
5245
5270
|
return p.fn.call(p.context, d, f), !0;
|
|
5246
5271
|
case 4:
|
|
5247
|
-
return p.fn.call(p.context, d, f,
|
|
5272
|
+
return p.fn.call(p.context, d, f, g), !0;
|
|
5248
5273
|
case 5:
|
|
5249
|
-
return p.fn.call(p.context, d, f,
|
|
5274
|
+
return p.fn.call(p.context, d, f, g, m), !0;
|
|
5250
5275
|
case 6:
|
|
5251
|
-
return p.fn.call(p.context, d, f,
|
|
5276
|
+
return p.fn.call(p.context, d, f, g, m, v), !0;
|
|
5252
5277
|
}
|
|
5253
|
-
for (w = 1,
|
|
5254
|
-
|
|
5255
|
-
p.fn.apply(p.context,
|
|
5278
|
+
for (w = 1, x = new Array(b - 1); w < b; w++)
|
|
5279
|
+
x[w - 1] = arguments[w];
|
|
5280
|
+
p.fn.apply(p.context, x);
|
|
5256
5281
|
} else {
|
|
5257
|
-
var
|
|
5258
|
-
for (w = 0; w <
|
|
5259
|
-
switch (p[w].once && this.removeListener(A, p[w].fn, void 0, !0),
|
|
5282
|
+
var O = p.length, z;
|
|
5283
|
+
for (w = 0; w < O; w++)
|
|
5284
|
+
switch (p[w].once && this.removeListener(A, p[w].fn, void 0, !0), b) {
|
|
5260
5285
|
case 1:
|
|
5261
5286
|
p[w].fn.call(p[w].context);
|
|
5262
5287
|
break;
|
|
@@ -5267,12 +5292,12 @@ function _c() {
|
|
|
5267
5292
|
p[w].fn.call(p[w].context, d, f);
|
|
5268
5293
|
break;
|
|
5269
5294
|
case 4:
|
|
5270
|
-
p[w].fn.call(p[w].context, d, f,
|
|
5295
|
+
p[w].fn.call(p[w].context, d, f, g);
|
|
5271
5296
|
break;
|
|
5272
5297
|
default:
|
|
5273
|
-
if (!
|
|
5274
|
-
|
|
5275
|
-
p[w].fn.apply(p[w].context,
|
|
5298
|
+
if (!x) for (z = 1, x = new Array(b - 1); z < b; z++)
|
|
5299
|
+
x[z - 1] = arguments[z];
|
|
5300
|
+
p[w].fn.apply(p[w].context, x);
|
|
5276
5301
|
}
|
|
5277
5302
|
}
|
|
5278
5303
|
return !0;
|
|
@@ -5280,17 +5305,17 @@ function _c() {
|
|
|
5280
5305
|
return i(this, A, d, f, !1);
|
|
5281
5306
|
}, c.prototype.once = function(A, d, f) {
|
|
5282
5307
|
return i(this, A, d, f, !0);
|
|
5283
|
-
}, c.prototype.removeListener = function(A, d, f,
|
|
5308
|
+
}, c.prototype.removeListener = function(A, d, f, g) {
|
|
5284
5309
|
var m = t ? t + A : A;
|
|
5285
5310
|
if (!this._events[m]) return this;
|
|
5286
5311
|
if (!d)
|
|
5287
5312
|
return a(this, m), this;
|
|
5288
5313
|
var v = this._events[m];
|
|
5289
5314
|
if (v.fn)
|
|
5290
|
-
v.fn === d && (!
|
|
5315
|
+
v.fn === d && (!g || v.once) && (!f || v.context === f) && a(this, m);
|
|
5291
5316
|
else {
|
|
5292
|
-
for (var
|
|
5293
|
-
(v[
|
|
5317
|
+
for (var u = 0, p = [], b = v.length; u < b; u++)
|
|
5318
|
+
(v[u].fn !== d || g && !v[u].once || f && v[u].context !== f) && p.push(v[u]);
|
|
5294
5319
|
p.length ? this._events[m] = p.length === 1 ? p[0] : p : a(this, m);
|
|
5295
5320
|
}
|
|
5296
5321
|
return this;
|
|
@@ -5300,9 +5325,9 @@ function _c() {
|
|
|
5300
5325
|
}, c.prototype.off = c.prototype.removeListener, c.prototype.addListener = c.prototype.on, c.prefixed = t, c.EventEmitter = c, e.exports = c;
|
|
5301
5326
|
}(bn)), bn.exports;
|
|
5302
5327
|
}
|
|
5303
|
-
var
|
|
5304
|
-
const
|
|
5305
|
-
class
|
|
5328
|
+
var ea = $c();
|
|
5329
|
+
const na = /* @__PURE__ */ _c(ea);
|
|
5330
|
+
class ta {
|
|
5306
5331
|
constructor(n) {
|
|
5307
5332
|
Object.defineProperty(this, "uid", {
|
|
5308
5333
|
enumerable: !0,
|
|
@@ -5313,7 +5338,7 @@ class na {
|
|
|
5313
5338
|
enumerable: !0,
|
|
5314
5339
|
configurable: !0,
|
|
5315
5340
|
writable: !0,
|
|
5316
|
-
value: new
|
|
5341
|
+
value: new na()
|
|
5317
5342
|
});
|
|
5318
5343
|
}
|
|
5319
5344
|
on(n, t) {
|
|
@@ -5333,12 +5358,12 @@ class na {
|
|
|
5333
5358
|
return this._emitter.listenerCount(n);
|
|
5334
5359
|
}
|
|
5335
5360
|
}
|
|
5336
|
-
function
|
|
5337
|
-
return new
|
|
5361
|
+
function ra(e) {
|
|
5362
|
+
return new ta(e);
|
|
5338
5363
|
}
|
|
5339
5364
|
const Tn = 256;
|
|
5340
5365
|
let qe = Tn, Ue;
|
|
5341
|
-
function
|
|
5366
|
+
function sa(e = 11) {
|
|
5342
5367
|
if (!Ue || qe + e > Tn * 2) {
|
|
5343
5368
|
Ue = "", qe = 0;
|
|
5344
5369
|
for (let n = 0; n < Tn; n++)
|
|
@@ -5346,18 +5371,18 @@ function ra(e = 11) {
|
|
|
5346
5371
|
}
|
|
5347
5372
|
return Ue.substring(qe, qe++ + e);
|
|
5348
5373
|
}
|
|
5349
|
-
const
|
|
5350
|
-
var
|
|
5374
|
+
const ia = "2.22.1", oa = () => `@wagmi/core@${ia}`;
|
|
5375
|
+
var Or = function(e, n, t, r) {
|
|
5351
5376
|
if (t === "a" && !r) throw new TypeError("Private accessor was defined without a getter");
|
|
5352
5377
|
if (typeof n == "function" ? e !== n || !r : !n.has(e)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
5353
5378
|
return t === "m" ? r : t === "a" ? r.call(e) : r ? r.value : n.get(e);
|
|
5354
|
-
}, tn,
|
|
5379
|
+
}, tn, Lr;
|
|
5355
5380
|
class Se extends Error {
|
|
5356
5381
|
get docsBaseUrl() {
|
|
5357
5382
|
return "https://wagmi.sh/core";
|
|
5358
5383
|
}
|
|
5359
5384
|
get version() {
|
|
5360
|
-
return
|
|
5385
|
+
return oa();
|
|
5361
5386
|
}
|
|
5362
5387
|
constructor(n, t = {}) {
|
|
5363
5388
|
super(), tn.add(this), Object.defineProperty(this, "details", {
|
|
@@ -5400,13 +5425,13 @@ class Se extends Error {
|
|
|
5400
5425
|
`), t.cause && (this.cause = t.cause), this.details = r, this.docsPath = s, this.metaMessages = t.metaMessages, this.shortMessage = n;
|
|
5401
5426
|
}
|
|
5402
5427
|
walk(n) {
|
|
5403
|
-
return
|
|
5428
|
+
return Or(this, tn, "m", Lr).call(this, this, n);
|
|
5404
5429
|
}
|
|
5405
5430
|
}
|
|
5406
|
-
tn = /* @__PURE__ */ new WeakSet(),
|
|
5407
|
-
return t?.(n) ? n : n.cause ?
|
|
5431
|
+
tn = /* @__PURE__ */ new WeakSet(), Lr = function e(n, t) {
|
|
5432
|
+
return t?.(n) ? n : n.cause ? Or(this, tn, "m", e).call(this, n.cause, t) : n;
|
|
5408
5433
|
};
|
|
5409
|
-
class
|
|
5434
|
+
class ca extends Se {
|
|
5410
5435
|
constructor() {
|
|
5411
5436
|
super("Chain not configured."), Object.defineProperty(this, "name", {
|
|
5412
5437
|
enumerable: !0,
|
|
@@ -5437,7 +5462,7 @@ function et(e = {}) {
|
|
|
5437
5462
|
return A;
|
|
5438
5463
|
}
|
|
5439
5464
|
return typeof l == "object" ? l : typeof l == "string" ? {
|
|
5440
|
-
...
|
|
5465
|
+
...aa[l] ?? {
|
|
5441
5466
|
id: l,
|
|
5442
5467
|
name: `${l[0].toUpperCase()}${l.slice(1)}`,
|
|
5443
5468
|
provider: `is${l[0].toUpperCase()}${l.slice(1)}`
|
|
@@ -5471,41 +5496,41 @@ function et(e = {}) {
|
|
|
5471
5496
|
A?.on && e.target && (a || (a = this.onConnect.bind(this), A.on("connect", a)), s || (s = this.onAccountsChanged.bind(this), A.on("accountsChanged", s)));
|
|
5472
5497
|
},
|
|
5473
5498
|
async connect({ chainId: A, isReconnecting: d, withCapabilities: f } = {}) {
|
|
5474
|
-
const
|
|
5475
|
-
if (!
|
|
5499
|
+
const g = await this.getProvider();
|
|
5500
|
+
if (!g)
|
|
5476
5501
|
throw new me();
|
|
5477
5502
|
let m = [];
|
|
5478
5503
|
if (d)
|
|
5479
5504
|
m = await this.getAccounts().catch(() => []);
|
|
5480
5505
|
else if (n)
|
|
5481
5506
|
try {
|
|
5482
|
-
m = (await
|
|
5507
|
+
m = (await g.request({
|
|
5483
5508
|
method: "wallet_requestPermissions",
|
|
5484
5509
|
params: [{ eth_accounts: {} }]
|
|
5485
|
-
}))[0]?.caveats?.[0]?.value?.map((
|
|
5510
|
+
}))[0]?.caveats?.[0]?.value?.map((u) => He(u)), m.length > 0 && (m = await this.getAccounts());
|
|
5486
5511
|
} catch (v) {
|
|
5487
|
-
const
|
|
5488
|
-
if (
|
|
5489
|
-
throw new G(
|
|
5490
|
-
if (
|
|
5491
|
-
throw
|
|
5512
|
+
const u = v;
|
|
5513
|
+
if (u.code === G.code)
|
|
5514
|
+
throw new G(u);
|
|
5515
|
+
if (u.code === fn.code)
|
|
5516
|
+
throw u;
|
|
5492
5517
|
}
|
|
5493
5518
|
try {
|
|
5494
|
-
!m?.length && !d && (m = (await
|
|
5519
|
+
!m?.length && !d && (m = (await g.request({
|
|
5495
5520
|
method: "eth_requestAccounts"
|
|
5496
|
-
})).map((p) => He(p))), a && (
|
|
5521
|
+
})).map((p) => He(p))), a && (g.removeListener("connect", a), a = void 0), s || (s = this.onAccountsChanged.bind(this), g.on("accountsChanged", s)), i || (i = this.onChainChanged.bind(this), g.on("chainChanged", i)), c || (c = this.onDisconnect.bind(this), g.on("disconnect", c));
|
|
5497
5522
|
let v = await this.getChainId();
|
|
5498
5523
|
return A && v !== A && (v = (await this.switchChain({ chainId: A }).catch((p) => {
|
|
5499
5524
|
if (p.code === G.code)
|
|
5500
5525
|
throw p;
|
|
5501
5526
|
return { id: v };
|
|
5502
5527
|
}))?.id ?? v), n && await l.storage?.removeItem(`${this.id}.disconnected`), e.target || await l.storage?.setItem("injected.connected", !0), {
|
|
5503
|
-
accounts: f ? m.map((
|
|
5528
|
+
accounts: f ? m.map((u) => ({ address: u, capabilities: {} })) : m,
|
|
5504
5529
|
chainId: v
|
|
5505
5530
|
};
|
|
5506
5531
|
} catch (v) {
|
|
5507
|
-
const
|
|
5508
|
-
throw
|
|
5532
|
+
const u = v;
|
|
5533
|
+
throw u.code === G.code ? new G(u) : u.code === fn.code ? new fn(u) : u;
|
|
5509
5534
|
}
|
|
5510
5535
|
},
|
|
5511
5536
|
async disconnect() {
|
|
@@ -5514,7 +5539,7 @@ function et(e = {}) {
|
|
|
5514
5539
|
throw new me();
|
|
5515
5540
|
i && (A.removeListener("chainChanged", i), i = void 0), c && (A.removeListener("disconnect", c), c = void 0), a || (a = this.onConnect.bind(this), A.on("connect", a));
|
|
5516
5541
|
try {
|
|
5517
|
-
await
|
|
5542
|
+
await ms(() => (
|
|
5518
5543
|
// TODO: Remove explicit type for viem@3
|
|
5519
5544
|
A.request({
|
|
5520
5545
|
// `'wallet_revokePermissions'` added in `viem@2.10.3`
|
|
@@ -5554,18 +5579,18 @@ function et(e = {}) {
|
|
|
5554
5579
|
return !1;
|
|
5555
5580
|
if (!await this.getProvider()) {
|
|
5556
5581
|
if (t !== void 0 && t !== !1) {
|
|
5557
|
-
const
|
|
5582
|
+
const g = async () => (typeof window < "u" && window.removeEventListener("ethereum#initialized", g), !!await this.getProvider()), m = typeof t == "number" ? t : 1e3;
|
|
5558
5583
|
if (await Promise.race([
|
|
5559
5584
|
...typeof window < "u" ? [
|
|
5560
|
-
new Promise((
|
|
5585
|
+
new Promise((u) => window.addEventListener("ethereum#initialized", () => u(g()), { once: !0 }))
|
|
5561
5586
|
] : [],
|
|
5562
|
-
new Promise((
|
|
5587
|
+
new Promise((u) => setTimeout(() => u(g()), m))
|
|
5563
5588
|
]))
|
|
5564
5589
|
return !0;
|
|
5565
5590
|
}
|
|
5566
5591
|
throw new me();
|
|
5567
5592
|
}
|
|
5568
|
-
return !!(await
|
|
5593
|
+
return !!(await vs(() => this.getAccounts())).length;
|
|
5569
5594
|
} catch {
|
|
5570
5595
|
return !1;
|
|
5571
5596
|
}
|
|
@@ -5574,14 +5599,14 @@ function et(e = {}) {
|
|
|
5574
5599
|
const f = await this.getProvider();
|
|
5575
5600
|
if (!f)
|
|
5576
5601
|
throw new me();
|
|
5577
|
-
const
|
|
5578
|
-
if (!
|
|
5579
|
-
throw new st(new
|
|
5602
|
+
const g = l.chains.find((v) => v.id === d);
|
|
5603
|
+
if (!g)
|
|
5604
|
+
throw new st(new ca());
|
|
5580
5605
|
const m = new Promise((v) => {
|
|
5581
|
-
const
|
|
5582
|
-
"chainId" in p && p.chainId === d && (l.emitter.off("change",
|
|
5606
|
+
const u = (p) => {
|
|
5607
|
+
"chainId" in p && p.chainId === d && (l.emitter.off("change", u), v());
|
|
5583
5608
|
};
|
|
5584
|
-
l.emitter.on("change",
|
|
5609
|
+
l.emitter.on("change", u);
|
|
5585
5610
|
});
|
|
5586
5611
|
try {
|
|
5587
5612
|
return await Promise.all([
|
|
@@ -5592,33 +5617,33 @@ function et(e = {}) {
|
|
|
5592
5617
|
await this.getChainId() === d && l.emitter.emit("change", { chainId: d });
|
|
5593
5618
|
}),
|
|
5594
5619
|
m
|
|
5595
|
-
]),
|
|
5620
|
+
]), g;
|
|
5596
5621
|
} catch (v) {
|
|
5597
|
-
const
|
|
5598
|
-
if (
|
|
5622
|
+
const u = v;
|
|
5623
|
+
if (u.code === 4902 || // Unwrapping for MetaMask Mobile
|
|
5599
5624
|
// https://github.com/MetaMask/metamask-mobile/issues/2944#issuecomment-976988719
|
|
5600
|
-
|
|
5625
|
+
u?.data?.originalError?.code === 4902)
|
|
5601
5626
|
try {
|
|
5602
|
-
const { default: p, ...
|
|
5603
|
-
let
|
|
5604
|
-
A?.blockExplorerUrls ?
|
|
5627
|
+
const { default: p, ...b } = g.blockExplorers ?? {};
|
|
5628
|
+
let x;
|
|
5629
|
+
A?.blockExplorerUrls ? x = A.blockExplorerUrls : p && (x = [
|
|
5605
5630
|
p.url,
|
|
5606
|
-
...Object.values(
|
|
5631
|
+
...Object.values(b).map((z) => z.url)
|
|
5607
5632
|
]);
|
|
5608
5633
|
let w;
|
|
5609
|
-
A?.rpcUrls?.length ? w = A.rpcUrls : w = [
|
|
5610
|
-
const
|
|
5611
|
-
blockExplorerUrls:
|
|
5634
|
+
A?.rpcUrls?.length ? w = A.rpcUrls : w = [g.rpcUrls.default?.http[0] ?? ""];
|
|
5635
|
+
const O = {
|
|
5636
|
+
blockExplorerUrls: x,
|
|
5612
5637
|
chainId: it(d),
|
|
5613
|
-
chainName: A?.chainName ??
|
|
5638
|
+
chainName: A?.chainName ?? g.name,
|
|
5614
5639
|
iconUrls: A?.iconUrls,
|
|
5615
|
-
nativeCurrency: A?.nativeCurrency ??
|
|
5640
|
+
nativeCurrency: A?.nativeCurrency ?? g.nativeCurrency,
|
|
5616
5641
|
rpcUrls: w
|
|
5617
5642
|
};
|
|
5618
5643
|
return await Promise.all([
|
|
5619
5644
|
f.request({
|
|
5620
5645
|
method: "wallet_addEthereumChain",
|
|
5621
|
-
params: [
|
|
5646
|
+
params: [O]
|
|
5622
5647
|
}).then(async () => {
|
|
5623
5648
|
if (await this.getChainId() === d)
|
|
5624
5649
|
l.emitter.emit("change", { chainId: d });
|
|
@@ -5626,11 +5651,11 @@ function et(e = {}) {
|
|
|
5626
5651
|
throw new G(new Error("User rejected switch after adding network."));
|
|
5627
5652
|
}),
|
|
5628
5653
|
m
|
|
5629
|
-
]),
|
|
5654
|
+
]), g;
|
|
5630
5655
|
} catch (p) {
|
|
5631
5656
|
throw new G(p);
|
|
5632
5657
|
}
|
|
5633
|
-
throw
|
|
5658
|
+
throw u.code === G.code ? new G(u) : new st(u);
|
|
5634
5659
|
}
|
|
5635
5660
|
},
|
|
5636
5661
|
async onAccountsChanged(A) {
|
|
@@ -5654,8 +5679,8 @@ function et(e = {}) {
|
|
|
5654
5679
|
return;
|
|
5655
5680
|
const f = Number(A.chainId);
|
|
5656
5681
|
l.emitter.emit("connect", { accounts: d, chainId: f });
|
|
5657
|
-
const
|
|
5658
|
-
|
|
5682
|
+
const g = await this.getProvider();
|
|
5683
|
+
g && (a && (g.removeListener("connect", a), a = void 0), s || (s = this.onAccountsChanged.bind(this), g.on("accountsChanged", s)), i || (i = this.onChainChanged.bind(this), g.on("chainChanged", i)), c || (c = this.onDisconnect.bind(this), g.on("disconnect", c)));
|
|
5659
5684
|
},
|
|
5660
5685
|
async onDisconnect(A) {
|
|
5661
5686
|
const d = await this.getProvider();
|
|
@@ -5663,7 +5688,7 @@ function et(e = {}) {
|
|
|
5663
5688
|
}
|
|
5664
5689
|
});
|
|
5665
5690
|
}
|
|
5666
|
-
const
|
|
5691
|
+
const aa = {
|
|
5667
5692
|
coinbaseWallet: {
|
|
5668
5693
|
id: "coinbaseWallet",
|
|
5669
5694
|
name: "Coinbase Wallet",
|
|
@@ -5723,14 +5748,14 @@ function Ge(e, n) {
|
|
|
5723
5748
|
if (r && t(r))
|
|
5724
5749
|
return r;
|
|
5725
5750
|
}
|
|
5726
|
-
function
|
|
5751
|
+
function la(e, n = T.EVM) {
|
|
5727
5752
|
if (!e.providers[n])
|
|
5728
5753
|
return null;
|
|
5729
5754
|
const t = e.providers[n]?.provider;
|
|
5730
5755
|
if (!t)
|
|
5731
5756
|
return null;
|
|
5732
5757
|
const r = e.info, s = r.rdns || r.uuid || `wallet-${r.name.toLowerCase().replace(/\s+/g, "-")}`;
|
|
5733
|
-
return
|
|
5758
|
+
return us((i) => ({
|
|
5734
5759
|
...et({
|
|
5735
5760
|
target: () => ({
|
|
5736
5761
|
id: s,
|
|
@@ -5746,14 +5771,14 @@ function aa(e, n = T.EVM) {
|
|
|
5746
5771
|
emitter: i.emitter
|
|
5747
5772
|
}));
|
|
5748
5773
|
}
|
|
5749
|
-
function
|
|
5774
|
+
function da(e, n = T.EVM, t) {
|
|
5750
5775
|
const r = [];
|
|
5751
5776
|
if (t.length === 0)
|
|
5752
5777
|
return r;
|
|
5753
5778
|
for (const s of e) {
|
|
5754
|
-
const i =
|
|
5779
|
+
const i = la(s, n);
|
|
5755
5780
|
if (i) {
|
|
5756
|
-
const a =
|
|
5781
|
+
const a = ra(sa());
|
|
5757
5782
|
r.push(
|
|
5758
5783
|
i({
|
|
5759
5784
|
chains: t,
|
|
@@ -5764,64 +5789,64 @@ function la(e, n = T.EVM, t) {
|
|
|
5764
5789
|
}
|
|
5765
5790
|
return r;
|
|
5766
5791
|
}
|
|
5767
|
-
function
|
|
5792
|
+
function Aa(e, n = []) {
|
|
5768
5793
|
const t = [...n], r = (i) => "id" in i && i.id ? i.id : "options" in i && i.options ? i.options?.id ?? i.options?.name : void 0, s = new Set(n.map((i) => r(i)));
|
|
5769
5794
|
for (const i of e)
|
|
5770
5795
|
s.has(r(i)) || t.push(i);
|
|
5771
5796
|
return t;
|
|
5772
5797
|
}
|
|
5773
|
-
const
|
|
5798
|
+
const fa = ({
|
|
5774
5799
|
children: e,
|
|
5775
5800
|
contextConfig: n,
|
|
5776
5801
|
defaultThemeConfig: t,
|
|
5777
5802
|
defaultMainView: r,
|
|
5778
5803
|
socialLoginEnabled: s
|
|
5779
5804
|
}) => {
|
|
5780
|
-
const [i, a] = Y(M.Loading), { walletState: c, setWalletState: l, error: A, setError: d, resetWalletState: f } =
|
|
5781
|
-
wallet:
|
|
5805
|
+
const [i, a] = Y(M.Loading), { walletState: c, setWalletState: l, error: A, setError: d, resetWalletState: f } = Br(), {
|
|
5806
|
+
wallet: g,
|
|
5782
5807
|
isAvailable: m,
|
|
5783
5808
|
isLoading: v,
|
|
5784
|
-
connectedInfo:
|
|
5809
|
+
connectedInfo: u,
|
|
5785
5810
|
message: p,
|
|
5786
|
-
error:
|
|
5787
|
-
} =
|
|
5811
|
+
error: b
|
|
5812
|
+
} = Gc({
|
|
5788
5813
|
config: n.embeddedWalletConfig,
|
|
5789
5814
|
setMainView: a,
|
|
5790
5815
|
defaultMainView: r,
|
|
5791
5816
|
enabled: s,
|
|
5792
5817
|
defaultTheme: t,
|
|
5793
5818
|
themeMode: n.themeMode
|
|
5794
|
-
}),
|
|
5795
|
-
|
|
5796
|
-
}, [
|
|
5819
|
+
}), x = Cc(i), w = k(() => {
|
|
5820
|
+
x.setView(c.isConnected ? M.Account : i), x.openModal();
|
|
5821
|
+
}, [x, c.isConnected, i]), O = y(
|
|
5797
5822
|
() => ({
|
|
5798
|
-
isOpen:
|
|
5799
|
-
view:
|
|
5800
|
-
prevView:
|
|
5823
|
+
isOpen: x.isOpen,
|
|
5824
|
+
view: x.view,
|
|
5825
|
+
prevView: x.prevView,
|
|
5801
5826
|
openModal: w,
|
|
5802
|
-
closeModal:
|
|
5803
|
-
setView:
|
|
5804
|
-
openModalWithState:
|
|
5805
|
-
backView:
|
|
5806
|
-
state:
|
|
5807
|
-
setCurrentViewState:
|
|
5827
|
+
closeModal: x.closeModal,
|
|
5828
|
+
setView: x.setView,
|
|
5829
|
+
openModalWithState: x.openModalWithState,
|
|
5830
|
+
backView: x.backView,
|
|
5831
|
+
state: x.state,
|
|
5832
|
+
setCurrentViewState: x.setCurrentViewState,
|
|
5808
5833
|
mainView: i,
|
|
5809
5834
|
setMainView: a
|
|
5810
5835
|
}),
|
|
5811
5836
|
[
|
|
5812
|
-
|
|
5813
|
-
|
|
5814
|
-
|
|
5815
|
-
|
|
5816
|
-
|
|
5817
|
-
|
|
5818
|
-
|
|
5819
|
-
|
|
5820
|
-
|
|
5837
|
+
x.isOpen,
|
|
5838
|
+
x.view,
|
|
5839
|
+
x.prevView,
|
|
5840
|
+
x.closeModal,
|
|
5841
|
+
x.setView,
|
|
5842
|
+
x.backView,
|
|
5843
|
+
x.state,
|
|
5844
|
+
x.setCurrentViewState,
|
|
5845
|
+
x.openModalWithState,
|
|
5821
5846
|
w,
|
|
5822
5847
|
i
|
|
5823
5848
|
]
|
|
5824
|
-
), z =
|
|
5849
|
+
), z = Kc(c.isConnected, c.isConnecting), I = y(
|
|
5825
5850
|
() => ({
|
|
5826
5851
|
connectionStatus: z,
|
|
5827
5852
|
isConnected: c.isConnected,
|
|
@@ -5850,16 +5875,16 @@ const Aa = ({
|
|
|
5850
5875
|
]
|
|
5851
5876
|
), E = y(
|
|
5852
5877
|
() => ({
|
|
5853
|
-
wallet:
|
|
5878
|
+
wallet: g,
|
|
5854
5879
|
isAvailable: m,
|
|
5855
5880
|
isLoading: v,
|
|
5856
|
-
connectedInfo:
|
|
5881
|
+
connectedInfo: u,
|
|
5857
5882
|
message: p,
|
|
5858
|
-
error:
|
|
5883
|
+
error: b
|
|
5859
5884
|
}),
|
|
5860
|
-
[
|
|
5885
|
+
[g, m, v, u, p, b]
|
|
5861
5886
|
), S = y(
|
|
5862
|
-
() =>
|
|
5887
|
+
() => Qc(E, s),
|
|
5863
5888
|
[E, s]
|
|
5864
5889
|
), B = y(
|
|
5865
5890
|
() => ({
|
|
@@ -5871,23 +5896,23 @@ const Aa = ({
|
|
|
5871
5896
|
), J = y(
|
|
5872
5897
|
() => ({
|
|
5873
5898
|
config: n,
|
|
5874
|
-
modal:
|
|
5899
|
+
modal: O,
|
|
5875
5900
|
connection: I,
|
|
5876
5901
|
account: W,
|
|
5877
5902
|
walletReady: B
|
|
5878
5903
|
}),
|
|
5879
|
-
[n,
|
|
5880
|
-
), j = Ze("all", n?.connectors || [], { embeddedWallet:
|
|
5904
|
+
[n, O, I, W, B]
|
|
5905
|
+
), j = Ze("all", n?.connectors || [], { embeddedWallet: g }), U = n?.wagmi, X = U?.config;
|
|
5881
5906
|
return F(() => {
|
|
5882
5907
|
if (!X || !j.data) {
|
|
5883
5908
|
Cn(null);
|
|
5884
5909
|
return;
|
|
5885
5910
|
}
|
|
5886
|
-
const Z = X.connectors ? [...X.connectors] : [], Q = X.chains ? [...X.chains] : [], Fe = j?.data?.all?.filter((De) => De.connectors[T.EVM]), Je =
|
|
5911
|
+
const Z = X.connectors ? [...X.connectors] : [], Q = X.chains ? [...X.chains] : [], Fe = j?.data?.all?.filter((De) => De.connectors[T.EVM]), Je = da(Fe || [], T.EVM, Q), ve = Aa(Je, Z);
|
|
5887
5912
|
ve.length > 0 ? Cn(ve) : Cn(null);
|
|
5888
5913
|
}, [j.data, X]), F(() => {
|
|
5889
|
-
|
|
5890
|
-
}, [n?.walletConnectConfig]),
|
|
5914
|
+
is(n?.walletConnectConfig || Nn);
|
|
5915
|
+
}, [n?.walletConnectConfig]), Rc({
|
|
5891
5916
|
setWalletState: l,
|
|
5892
5917
|
currentWallet: W.currentWallet,
|
|
5893
5918
|
isConnected: I.isConnected,
|
|
@@ -5900,15 +5925,24 @@ const Aa = ({
|
|
|
5900
5925
|
const Je = (De) => {
|
|
5901
5926
|
l((An) => An.chainId === De ? An : { ...An, chainId: De });
|
|
5902
5927
|
}, ve = Fe;
|
|
5903
|
-
if (typeof ve.on == "function")
|
|
5904
|
-
|
|
5905
|
-
ve.
|
|
5928
|
+
if (typeof ve.on == "function") {
|
|
5929
|
+
try {
|
|
5930
|
+
ve.on("chainChanged", Je);
|
|
5931
|
+
} catch {
|
|
5932
|
+
return;
|
|
5933
|
+
}
|
|
5934
|
+
return () => {
|
|
5935
|
+
try {
|
|
5936
|
+
ve.removeListener?.("chainChanged", Je);
|
|
5937
|
+
} catch {
|
|
5938
|
+
}
|
|
5906
5939
|
};
|
|
5907
|
-
|
|
5908
|
-
|
|
5940
|
+
}
|
|
5941
|
+
}, [c.isConnected, c.chainType, c.currentProvider, l]), /* @__PURE__ */ o(ln.Provider, { value: E, children: /* @__PURE__ */ o(N.Provider, { value: J, children: /* @__PURE__ */ o(
|
|
5942
|
+
ua,
|
|
5909
5943
|
{
|
|
5910
5944
|
walletState: c,
|
|
5911
|
-
modalState:
|
|
5945
|
+
modalState: x,
|
|
5912
5946
|
setWalletState: l,
|
|
5913
5947
|
resetWalletState: f,
|
|
5914
5948
|
setError: d,
|
|
@@ -5919,7 +5953,7 @@ const Aa = ({
|
|
|
5919
5953
|
}
|
|
5920
5954
|
) }) });
|
|
5921
5955
|
};
|
|
5922
|
-
function
|
|
5956
|
+
function ua({
|
|
5923
5957
|
children: e,
|
|
5924
5958
|
walletState: n,
|
|
5925
5959
|
modalState: t,
|
|
@@ -5930,7 +5964,7 @@ function fa({
|
|
|
5930
5964
|
defaultThemeConfig: c,
|
|
5931
5965
|
themeMode: l
|
|
5932
5966
|
}) {
|
|
5933
|
-
const A = V(N), d =
|
|
5967
|
+
const A = V(N), d = Pc({
|
|
5934
5968
|
walletState: n,
|
|
5935
5969
|
modalState: t,
|
|
5936
5970
|
setWalletState: r,
|
|
@@ -5945,13 +5979,13 @@ function fa({
|
|
|
5945
5979
|
[A, d]
|
|
5946
5980
|
);
|
|
5947
5981
|
return /* @__PURE__ */ o(N.Provider, { value: f, children: /* @__PURE__ */ C(
|
|
5948
|
-
|
|
5982
|
+
$r,
|
|
5949
5983
|
{
|
|
5950
5984
|
themeConfig: c,
|
|
5951
5985
|
defaultTheme: l || "light",
|
|
5952
5986
|
children: [
|
|
5953
5987
|
/* @__PURE__ */ o(
|
|
5954
|
-
|
|
5988
|
+
es,
|
|
5955
5989
|
{
|
|
5956
5990
|
maxVisibleToasts: 3,
|
|
5957
5991
|
placement: "top-center",
|
|
@@ -5963,19 +5997,19 @@ function fa({
|
|
|
5963
5997
|
}
|
|
5964
5998
|
),
|
|
5965
5999
|
e,
|
|
5966
|
-
/* @__PURE__ */ o("div", { id: "modal-container", children: /* @__PURE__ */ o(
|
|
6000
|
+
/* @__PURE__ */ o("div", { id: "modal-container", children: /* @__PURE__ */ o(Dc, {}) })
|
|
5967
6001
|
]
|
|
5968
6002
|
}
|
|
5969
6003
|
) });
|
|
5970
6004
|
}
|
|
5971
|
-
const
|
|
6005
|
+
const ga = new cs({
|
|
5972
6006
|
defaultOptions: {
|
|
5973
6007
|
queries: {
|
|
5974
6008
|
refetchOnWindowFocus: !1
|
|
5975
6009
|
}
|
|
5976
6010
|
}
|
|
5977
|
-
}),
|
|
5978
|
-
const t =
|
|
6011
|
+
}), ha = ({ children: e, config: n }) => {
|
|
6012
|
+
const t = Tr(), r = y(() => {
|
|
5979
6013
|
const c = n || _, l = c.login ? {
|
|
5980
6014
|
basicLogins: c.login.basicLogins ?? [],
|
|
5981
6015
|
socialLogins: c.login.socialLogins ?? []
|
|
@@ -5988,12 +6022,12 @@ const ua = new os({
|
|
|
5988
6022
|
...Nn.metadata,
|
|
5989
6023
|
...c.metadata
|
|
5990
6024
|
}
|
|
5991
|
-
},
|
|
6025
|
+
}, g = c.theme && c.theme.themes ? { ...c.theme, prefix: "heroui" } : { ..._.theme, prefix: "heroui" }, m = {
|
|
5992
6026
|
...n,
|
|
5993
6027
|
connectors: c.connectors || _.connectors,
|
|
5994
6028
|
chains: c.chains || _.chains,
|
|
5995
6029
|
login: l,
|
|
5996
|
-
theme:
|
|
6030
|
+
theme: g,
|
|
5997
6031
|
clientId: _.clientId,
|
|
5998
6032
|
walletConnectConfig: f,
|
|
5999
6033
|
embeddedWalletConfig: {
|
|
@@ -6010,19 +6044,19 @@ const ua = new os({
|
|
|
6010
6044
|
config: t
|
|
6011
6045
|
}
|
|
6012
6046
|
};
|
|
6013
|
-
return
|
|
6014
|
-
}, [n, t]), s = M.WalletHome, i = y(() =>
|
|
6015
|
-
const c =
|
|
6047
|
+
return yt(t || null), m;
|
|
6048
|
+
}, [n, t]), s = M.WalletHome, i = y(() => Hc(n?.login), [n?.login]), a = y(() => {
|
|
6049
|
+
const c = qo(), l = n?.theme;
|
|
6016
6050
|
if (!l) return c;
|
|
6017
|
-
const A = c.themes ?? {}, d = l.themes ?? {}, f = (
|
|
6018
|
-
if (!m) return
|
|
6019
|
-
if (!
|
|
6020
|
-
const v =
|
|
6021
|
-
for (const [
|
|
6022
|
-
const w = v[
|
|
6023
|
-
|
|
6051
|
+
const A = c.themes ?? {}, d = l.themes ?? {}, f = (g, m) => {
|
|
6052
|
+
if (!m) return g ?? {};
|
|
6053
|
+
if (!g) return m;
|
|
6054
|
+
const v = g.colors ?? {}, u = m.colors ?? {}, p = { ...v };
|
|
6055
|
+
for (const [b, x] of Object.entries(u)) {
|
|
6056
|
+
const w = v[b];
|
|
6057
|
+
x && typeof x == "object" && !Array.isArray(x) && w && typeof w == "object" && !Array.isArray(w) ? p[b] = { ...w, ...x } : p[b] = x;
|
|
6024
6058
|
}
|
|
6025
|
-
return { ...
|
|
6059
|
+
return { ...g, ...m, colors: p };
|
|
6026
6060
|
};
|
|
6027
6061
|
return {
|
|
6028
6062
|
...c,
|
|
@@ -6034,8 +6068,8 @@ const ua = new os({
|
|
|
6034
6068
|
}
|
|
6035
6069
|
};
|
|
6036
6070
|
}, [n?.theme]);
|
|
6037
|
-
return typeof window > "u" ? null : /* @__PURE__ */ o(
|
|
6038
|
-
|
|
6071
|
+
return typeof window > "u" ? null : /* @__PURE__ */ o(os, { client: ga, children: /* @__PURE__ */ o(
|
|
6072
|
+
fa,
|
|
6039
6073
|
{
|
|
6040
6074
|
contextConfig: r,
|
|
6041
6075
|
defaultThemeConfig: a,
|
|
@@ -6044,12 +6078,12 @@ const ua = new os({
|
|
|
6044
6078
|
children: e
|
|
6045
6079
|
}
|
|
6046
6080
|
) });
|
|
6047
|
-
},
|
|
6081
|
+
}, Wa = ({ className: e, style: n }) => {
|
|
6048
6082
|
const t = V(N);
|
|
6049
6083
|
if (!t)
|
|
6050
6084
|
return console.error("WalletConnectEmbed must be used within WalletConnectProvider"), null;
|
|
6051
6085
|
const s = t.connection.isConnected ? M.Account : t.modal.view, a = (() => {
|
|
6052
|
-
const c =
|
|
6086
|
+
const c = Sr[s];
|
|
6053
6087
|
return c ? c(t) : null;
|
|
6054
6088
|
})();
|
|
6055
6089
|
return /* @__PURE__ */ o(
|
|
@@ -6061,81 +6095,77 @@ const ua = new os({
|
|
|
6061
6095
|
}
|
|
6062
6096
|
);
|
|
6063
6097
|
};
|
|
6064
|
-
async function
|
|
6098
|
+
async function Ma() {
|
|
6065
6099
|
let e = [];
|
|
6066
6100
|
try {
|
|
6067
|
-
e = await
|
|
6068
|
-
} catch (
|
|
6069
|
-
console.warn("Failed to fetch chains from API, using default chains:",
|
|
6101
|
+
e = await Ft();
|
|
6102
|
+
} catch (s) {
|
|
6103
|
+
console.warn("Failed to fetch chains from API, using default chains:", s);
|
|
6070
6104
|
}
|
|
6071
|
-
const n = e.length > 0 ?
|
|
6105
|
+
const n = e.length > 0 ? Ht(e) : le, t = {};
|
|
6072
6106
|
if (e.length > 0) {
|
|
6073
|
-
const
|
|
6074
|
-
|
|
6075
|
-
id:
|
|
6076
|
-
name:
|
|
6077
|
-
nativeCurrency:
|
|
6078
|
-
rpcUrls:
|
|
6079
|
-
blockExplorers:
|
|
6107
|
+
const s = e.filter((i) => H(i.chainId) === "aptos");
|
|
6108
|
+
s.length > 0 && (t.aptos = s.map((i) => ({
|
|
6109
|
+
id: i.chainId,
|
|
6110
|
+
name: i.name,
|
|
6111
|
+
nativeCurrency: i.nativeCurrency,
|
|
6112
|
+
rpcUrls: i.rpcUrls,
|
|
6113
|
+
blockExplorers: i.blockExplorers,
|
|
6080
6114
|
chainInfo: {
|
|
6081
|
-
icon:
|
|
6082
|
-
name:
|
|
6115
|
+
icon: i.icon,
|
|
6116
|
+
name: i.name
|
|
6083
6117
|
}
|
|
6084
6118
|
})));
|
|
6085
6119
|
} else
|
|
6086
6120
|
t.aptos = ie.aptos || [];
|
|
6087
6121
|
if (e.length > 0) {
|
|
6088
|
-
const
|
|
6089
|
-
|
|
6090
|
-
const
|
|
6122
|
+
const s = e.filter((i) => H(i.chainId) === "evm");
|
|
6123
|
+
s.length > 0 && (t.evm = s.map((i) => {
|
|
6124
|
+
const a = i.chainId.match(/^eip155:(\d+)$/), c = a ? parseInt(a[1], 10) : 1, l = `evm_${c}`, A = n[l] || le[l], d = i.icon || (typeof A == "string" ? A : null);
|
|
6091
6125
|
return {
|
|
6092
|
-
id:
|
|
6093
|
-
name:
|
|
6094
|
-
nativeCurrency:
|
|
6095
|
-
rpcUrls:
|
|
6096
|
-
blockExplorers:
|
|
6097
|
-
contracts:
|
|
6098
|
-
blockTime:
|
|
6099
|
-
...
|
|
6126
|
+
id: c,
|
|
6127
|
+
name: i.name,
|
|
6128
|
+
nativeCurrency: i.nativeCurrency,
|
|
6129
|
+
rpcUrls: i.rpcUrls,
|
|
6130
|
+
blockExplorers: i.blockExplorers,
|
|
6131
|
+
contracts: i.contracts,
|
|
6132
|
+
blockTime: i.blockTime,
|
|
6133
|
+
...d && { icon: d }
|
|
6100
6134
|
};
|
|
6101
6135
|
}));
|
|
6102
6136
|
} else
|
|
6103
6137
|
t.evm = ie.evm || [];
|
|
6104
|
-
|
|
6105
|
-
|
|
6106
|
-
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
|
|
6115
|
-
|
|
6116
|
-
|
|
6117
|
-
|
|
6118
|
-
|
|
6119
|
-
|
|
6120
|
-
|
|
6121
|
-
|
|
6122
|
-
|
|
6123
|
-
name: s.name,
|
|
6124
|
-
nativeCurrency: s.nativeCurrency,
|
|
6125
|
-
rpcUrls: s.rpcUrls,
|
|
6126
|
-
blockExplorers: s.blockExplorers,
|
|
6138
|
+
const r = e.filter((s) => H(s.chainId) === "solana");
|
|
6139
|
+
if (r.length > 0 ? t.solana = r.map((s) => ({
|
|
6140
|
+
id: s.chainId,
|
|
6141
|
+
name: s.name,
|
|
6142
|
+
nativeCurrency: s.nativeCurrency,
|
|
6143
|
+
rpcUrls: s.rpcUrls,
|
|
6144
|
+
blockExplorers: s.blockExplorers,
|
|
6145
|
+
chainInfo: {
|
|
6146
|
+
icon: s.icon,
|
|
6147
|
+
name: s.name
|
|
6148
|
+
}
|
|
6149
|
+
})) : t.solana = ie.solana || [], e.length > 0) {
|
|
6150
|
+
const s = e.filter((i) => H(i.chainId) === "dogecoin");
|
|
6151
|
+
s.length > 0 && (t.dogecoin = s.map((i) => ({
|
|
6152
|
+
id: i.chainId,
|
|
6153
|
+
name: i.name,
|
|
6154
|
+
nativeCurrency: i.nativeCurrency,
|
|
6155
|
+
rpcUrls: i.rpcUrls,
|
|
6156
|
+
blockExplorers: i.blockExplorers,
|
|
6127
6157
|
chainInfo: {
|
|
6128
|
-
icon:
|
|
6129
|
-
name:
|
|
6158
|
+
icon: i.icon,
|
|
6159
|
+
name: i.name
|
|
6130
6160
|
}
|
|
6131
6161
|
})));
|
|
6132
6162
|
} else
|
|
6133
6163
|
t.dogecoin = ie.dogecoin || [];
|
|
6134
6164
|
return t;
|
|
6135
6165
|
}
|
|
6136
|
-
async function
|
|
6166
|
+
async function Va() {
|
|
6137
6167
|
try {
|
|
6138
|
-
return (await
|
|
6168
|
+
return (await Ot({
|
|
6139
6169
|
chainType: "all",
|
|
6140
6170
|
recommendedConnectors: [],
|
|
6141
6171
|
connectorTypes: []
|
|
@@ -6157,11 +6187,11 @@ async function Ma() {
|
|
|
6157
6187
|
}
|
|
6158
6188
|
export {
|
|
6159
6189
|
T as ChainTypeEnum,
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
|
|
6163
|
-
|
|
6190
|
+
Wa as WalletConnectEmbed,
|
|
6191
|
+
ha as WalletConnectProvider,
|
|
6192
|
+
Ma as getChains,
|
|
6193
|
+
Va as getConnectors,
|
|
6164
6194
|
_n as useAccount,
|
|
6165
|
-
|
|
6166
|
-
|
|
6195
|
+
ya as useConnectors,
|
|
6196
|
+
Ba as useWalletConnect
|
|
6167
6197
|
};
|