@dogeos/dogeos-sdk 3.2.0-beta.3 → 3.2.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -25
- package/dist/index.d.ts +2 -10
- package/dist/index.js +825 -806
- package/package.json +6 -8
package/dist/index.js
CHANGED
|
@@ -12,33 +12,33 @@
|
|
|
12
12
|
})();
|
|
13
13
|
|
|
14
14
|
import { jsxs as C, jsx as o, Fragment as Bt } from "react/jsx-runtime";
|
|
15
|
-
import { createContext as ht, useState as Y, useRef as ce, useEffect as J, useMemo as y, useContext as
|
|
16
|
-
import { Button as L, BackIcon as Wt, CloseIcon as Mt, OkIcon as Vt, CopyIcon as
|
|
17
|
-
import { isMobile as jt, loadConnectors as Tt, isWagmiConnector as
|
|
18
|
-
import { useQuery as Tn, useMutation as En, QueryClientProvider as
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import { useConfig as nt, useConnect as
|
|
22
|
-
import { EmbeddedWallet as
|
|
23
|
-
import { getAddress as Je, SwitchChainError as tt, numberToHex as rt, UserRejectedRequestError as G, withRetry as
|
|
24
|
-
const
|
|
25
|
-
name:
|
|
26
|
-
version:
|
|
15
|
+
import { createContext as ht, useState as Y, useRef as ce, useEffect as J, useMemo as y, useContext as V, useCallback as k } from "react";
|
|
16
|
+
import { Button as L, BackIcon as Wt, CloseIcon as Mt, OkIcon as Vt, CopyIcon as Yr, Image as fe, PowerIcon as Zr, DownIcon as Jr, Spinner as ue, Skeleton as Dr, Modal as Xt, Link as Ue, TomoLogoIcon as Fr, Card as Hr, CardBody as Qr, Tabs as Kr, Tab as qr, Chip as $n, SearchIcon as Ur, Input as Nt, SearchOutlinedIcon as Gr, addToast as Rr, RightArrowIcon as jn, ModalHeader as _r, ModalBody as $r, ModalContent as es, TomoUIProvider as ns, ToastProvider as ts } from "@tomo-inc/tomo-ui";
|
|
17
|
+
import { isMobile as jt, loadConnectors as Tt, isWagmiConnector as rs, connect as Et, switchChain as et, addChain as ss, signInWithWallet as is, signMessage as os, setWalletConnectConfig as cs } from "@tomo-inc/wallet-adaptor-base";
|
|
18
|
+
import { useQuery as Tn, useMutation as En, QueryClientProvider as as, QueryClient as ls } from "@tanstack/react-query";
|
|
19
|
+
import ds from "copy-to-clipboard";
|
|
20
|
+
import As from "qr-code-styling";
|
|
21
|
+
import { useConfig as nt, useConnect as fs, useAccount as us, useDisconnect as gs, createConnector as vs } from "wagmi";
|
|
22
|
+
import { EmbeddedWallet as ms } from "@tomo-inc/embedded-wallet-providers";
|
|
23
|
+
import { getAddress as Je, SwitchChainError as tt, numberToHex as rt, UserRejectedRequestError as G, withRetry as ps, withTimeout as Cs, ResourceUnavailableRpcError as An } from "viem";
|
|
24
|
+
const xs = "@dogeos/dogeos-sdk", bs = "3.2.0-beta.5", st = {
|
|
25
|
+
name: xs,
|
|
26
|
+
version: bs
|
|
27
27
|
};
|
|
28
|
-
var
|
|
28
|
+
var zs = Object.defineProperty, Is = (e, n) => {
|
|
29
29
|
for (var t in n)
|
|
30
|
-
|
|
31
|
-
},
|
|
32
|
-
ws
|
|
33
|
-
clear: () =>
|
|
34
|
-
get: () =>
|
|
30
|
+
zs(e, t, { get: n[t], enumerable: !0 });
|
|
31
|
+
}, ws = {};
|
|
32
|
+
Is(ws, {
|
|
33
|
+
clear: () => hs,
|
|
34
|
+
get: () => Ps,
|
|
35
35
|
isKeyExist: () => St,
|
|
36
|
-
remove: () =>
|
|
37
|
-
set: () =>
|
|
38
|
-
setKeyNS: () =>
|
|
36
|
+
remove: () => Bs,
|
|
37
|
+
set: () => ys,
|
|
38
|
+
setKeyNS: () => Ws
|
|
39
39
|
});
|
|
40
40
|
var Me = "tomo-";
|
|
41
|
-
function
|
|
41
|
+
function Ps(e) {
|
|
42
42
|
if (typeof window > "u")
|
|
43
43
|
return null;
|
|
44
44
|
const n = Me + e;
|
|
@@ -53,7 +53,7 @@ function ys(e) {
|
|
|
53
53
|
}
|
|
54
54
|
return t !== null && Object.prototype.hasOwnProperty.call(t, "type") && Object.prototype.hasOwnProperty.call(t, "data") ? t.data : null;
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function ys(e, n, t) {
|
|
57
57
|
if (typeof window > "u")
|
|
58
58
|
return !1;
|
|
59
59
|
let r;
|
|
@@ -71,19 +71,19 @@ function Bs(e, n, t) {
|
|
|
71
71
|
}
|
|
72
72
|
return !1;
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function Bs(e) {
|
|
75
75
|
if (typeof window > "u")
|
|
76
76
|
return;
|
|
77
77
|
const n = Me + e;
|
|
78
78
|
window.localStorage.removeItem(n), window.sessionStorage.removeItem(n);
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function hs() {
|
|
81
81
|
typeof window > "u" || (window?.localStorage?.clear(), window?.sessionStorage?.clear());
|
|
82
82
|
}
|
|
83
83
|
function St(e) {
|
|
84
84
|
return typeof window > "u" ? !1 : Object.prototype.hasOwnProperty.call(window.localStorage, e) || Object.prototype.hasOwnProperty.call(window.sessionStorage, e);
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function Ws(e) {
|
|
87
87
|
typeof e == "string" && e !== "" && (Me = e);
|
|
88
88
|
}
|
|
89
89
|
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 || {});
|
|
@@ -283,7 +283,7 @@ const X = ht(null), Ot = ({ testnet: e, ...n }) => /* @__PURE__ */ C(
|
|
|
283
283
|
/* @__PURE__ */ o("clipPath", { id: "clip0_101_1146", children: /* @__PURE__ */ o("rect", { width: "20", height: "20", fill: "white" }) }),
|
|
284
284
|
/* @__PURE__ */ o("clipPath", { id: "clip1_101_1146", children: /* @__PURE__ */ o("rect", { width: "13.125", height: "10", fill: "white", transform: "translate(3.75 5)" }) })
|
|
285
285
|
] })
|
|
286
|
-
] }),
|
|
286
|
+
] }), Ms = ({ ...e }) => /* @__PURE__ */ C("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e, children: [
|
|
287
287
|
/* @__PURE__ */ o("circle", { cx: "16", cy: "16", r: "16", fill: "black" }),
|
|
288
288
|
/* @__PURE__ */ o(
|
|
289
289
|
"mask",
|
|
@@ -353,7 +353,7 @@ const X = ht(null), Ot = ({ testnet: e, ...n }) => /* @__PURE__ */ C(
|
|
|
353
353
|
] })
|
|
354
354
|
]
|
|
355
355
|
}
|
|
356
|
-
),
|
|
356
|
+
), kt = ({ ...e }) => /* @__PURE__ */ C("svg", { width: "56", height: "56", viewBox: "0 0 56 56", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e, children: [
|
|
357
357
|
/* @__PURE__ */ o("foreignObject", { x: "-2.16759", y: "-2.16759", width: "60.3349", height: "60.3352", children: /* @__PURE__ */ o(
|
|
358
358
|
"div",
|
|
359
359
|
{
|
|
@@ -471,32 +471,32 @@ const X = ht(null), Ot = ({ testnet: e, ...n }) => /* @__PURE__ */ C(
|
|
|
471
471
|
}
|
|
472
472
|
)
|
|
473
473
|
] })
|
|
474
|
-
] }),
|
|
474
|
+
] }), Vs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
475
475
|
__proto__: null,
|
|
476
476
|
Apots: tn,
|
|
477
477
|
Doge: On,
|
|
478
478
|
Ethereum: Ge,
|
|
479
479
|
KnownChain: Ot,
|
|
480
|
-
Movement:
|
|
480
|
+
Movement: Ms,
|
|
481
481
|
Solana: rn,
|
|
482
482
|
UnknownChain: Sn,
|
|
483
|
-
UnsupportChain:
|
|
483
|
+
UnsupportChain: kt
|
|
484
484
|
}, Symbol.toStringTag, { value: "Module" })), ze = ({ icon: e, iconName: n, className: t, iconProps: r, iconUrl: s }) => {
|
|
485
485
|
if (s)
|
|
486
486
|
return /* @__PURE__ */ o("div", { className: t, children: /* @__PURE__ */ o("img", { src: s, alt: n || "chain", "data-icon": "chain-icon", width: "100%", height: "100%" }) });
|
|
487
487
|
if (typeof e == "string")
|
|
488
488
|
return /* @__PURE__ */ o("div", { className: t, children: /* @__PURE__ */ o("img", { src: e, alt: n || "chain", "data-icon": "chain-icon", width: "100%", height: "100%" }) });
|
|
489
|
-
const i = e ||
|
|
489
|
+
const i = e || Vs?.[n] || Sn;
|
|
490
490
|
return /* @__PURE__ */ o("div", { className: t, children: /* @__PURE__ */ o(i, { "data-icon": "chain-icon", width: "100%", height: "100%", ...r }) });
|
|
491
|
-
},
|
|
491
|
+
}, Xs = "https://web3-assets.tomo.inc/api/chains", it = "https://web3-assets.tomo.inc";
|
|
492
492
|
let De = null, Pe = null;
|
|
493
|
-
function
|
|
493
|
+
function Ns(e) {
|
|
494
494
|
return !e || e.startsWith("http://") || e.startsWith("https://") ? e : e.startsWith("/") ? `${it}${e}` : `${it}/${e}`;
|
|
495
495
|
}
|
|
496
|
-
async function
|
|
496
|
+
async function Lt() {
|
|
497
497
|
return De || Pe || (Pe = (async () => {
|
|
498
498
|
try {
|
|
499
|
-
const e = await fetch(
|
|
499
|
+
const e = await fetch(Xs);
|
|
500
500
|
if (!e.ok)
|
|
501
501
|
throw new Error(`Failed to fetch chains: ${e.statusText}`);
|
|
502
502
|
const n = await e.json();
|
|
@@ -504,26 +504,26 @@ async function kt() {
|
|
|
504
504
|
throw new Error("Invalid chains API response");
|
|
505
505
|
return De = n.data.map((t) => ({
|
|
506
506
|
...t,
|
|
507
|
-
icon:
|
|
507
|
+
icon: Ns(t.icon)
|
|
508
508
|
})), De;
|
|
509
509
|
} catch (e) {
|
|
510
510
|
throw console.error("Error fetching chains from API:", e), Pe = null, e;
|
|
511
511
|
}
|
|
512
512
|
})(), Pe);
|
|
513
513
|
}
|
|
514
|
-
const
|
|
515
|
-
function
|
|
514
|
+
const js = "1a91e3dace36e2be3bf030a65679fe82";
|
|
515
|
+
function kn(e) {
|
|
516
516
|
const [n, t] = e.split(":");
|
|
517
517
|
return { type: n.toLowerCase(), id: t };
|
|
518
518
|
}
|
|
519
519
|
function H(e) {
|
|
520
|
-
const { type: n, id: t } =
|
|
521
|
-
return n === "aptos" ? "aptos" : n === "solana" ? "solana" : n === "eip155" ? "evm" : n === "dogecoin" || n === "bip122" && t ===
|
|
520
|
+
const { type: n, id: t } = kn(e);
|
|
521
|
+
return n === "aptos" ? "aptos" : n === "solana" ? "solana" : n === "eip155" ? "evm" : n === "dogecoin" || n === "bip122" && t === js ? "dogecoin" : "evm";
|
|
522
522
|
}
|
|
523
523
|
function Yt() {
|
|
524
524
|
const { data: e, isLoading: n, error: t, refetch: r } = Tn({
|
|
525
525
|
queryKey: ["chains"],
|
|
526
|
-
queryFn:
|
|
526
|
+
queryFn: Lt,
|
|
527
527
|
staleTime: 6e5,
|
|
528
528
|
gcTime: 18e5,
|
|
529
529
|
retry: 2,
|
|
@@ -536,10 +536,10 @@ function Yt() {
|
|
|
536
536
|
refetch: r
|
|
537
537
|
};
|
|
538
538
|
}
|
|
539
|
-
const
|
|
539
|
+
const Ln = () => {
|
|
540
540
|
const [e, n] = Y(!1), t = ce(null), r = (s) => {
|
|
541
541
|
try {
|
|
542
|
-
return
|
|
542
|
+
return ds(s), n(!0), t.current = setTimeout(() => n(!1), 1200), !0;
|
|
543
543
|
} catch (i) {
|
|
544
544
|
return console.warn("Copy failed, but continuing execution:", i), !1;
|
|
545
545
|
}
|
|
@@ -563,12 +563,12 @@ function Zt(e) {
|
|
|
563
563
|
const r = e.split("@")[0];
|
|
564
564
|
return !(r.startsWith(".") || r.endsWith(".") || r.includes(".."));
|
|
565
565
|
}
|
|
566
|
-
function
|
|
566
|
+
function Ts(e) {
|
|
567
567
|
return !e || e.trim().length === 0 ? "Please enter your email address" : Zt(e) ? null : "Please enter a valid email address";
|
|
568
568
|
}
|
|
569
569
|
const Yn = {
|
|
570
570
|
WALLET_STATE: "tomo_wallet_state"
|
|
571
|
-
},
|
|
571
|
+
}, Es = (e) => {
|
|
572
572
|
try {
|
|
573
573
|
const n = {
|
|
574
574
|
...e,
|
|
@@ -578,7 +578,7 @@ const Yn = {
|
|
|
578
578
|
} catch (n) {
|
|
579
579
|
console.error("Failed to save wallet state:", n);
|
|
580
580
|
}
|
|
581
|
-
},
|
|
581
|
+
}, Ss = () => {
|
|
582
582
|
try {
|
|
583
583
|
const e = localStorage.getItem(Yn.WALLET_STATE);
|
|
584
584
|
if (!e) return null;
|
|
@@ -598,7 +598,7 @@ function ot(e, n) {
|
|
|
598
598
|
const t = e.info?.uuid, r = t ? n.has(t) : !1, s = e.isInstalled === !0;
|
|
599
599
|
return r && s ? 0 : !r && s ? 1 : r && !s ? 2 : 3;
|
|
600
600
|
}
|
|
601
|
-
function
|
|
601
|
+
function Os(e, n) {
|
|
602
602
|
const t = new Set(e.map((c) => c.info?.uuid).filter(Boolean)), r = (c, l) => ot(c, t) - ot(l, t), s = /* @__PURE__ */ new Set();
|
|
603
603
|
return [[...e, ...n].filter((c) => {
|
|
604
604
|
const l = c.info?.uuid;
|
|
@@ -639,19 +639,19 @@ const q = {
|
|
|
639
639
|
evm: Ge,
|
|
640
640
|
// Evm chains - fallback icons (will be replaced by API data)
|
|
641
641
|
evm_1: Ge,
|
|
642
|
-
unsupported:
|
|
642
|
+
unsupported: kt
|
|
643
643
|
};
|
|
644
|
-
function
|
|
644
|
+
function Ls(e, n) {
|
|
645
645
|
if (n?.icon)
|
|
646
646
|
return () => n.icon;
|
|
647
|
-
const t = H(e), { id: r } =
|
|
647
|
+
const t = H(e), { id: r } = kn(e), s = t === "evm" ? `evm_${r}` : t;
|
|
648
648
|
return ae[s] || Sn;
|
|
649
649
|
}
|
|
650
650
|
function Dt(e) {
|
|
651
651
|
const n = { ...ae };
|
|
652
652
|
return e.forEach((t) => {
|
|
653
|
-
const r = H(t.chainId), { id: s } =
|
|
654
|
-
t.icon ? n[i] = () => t.icon : n[i] =
|
|
653
|
+
const r = H(t.chainId), { id: s } = kn(t.chainId), i = r === "evm" ? `evm_${s}` : t.chainId;
|
|
654
|
+
t.icon ? n[i] = () => t.icon : n[i] = Ls(t.chainId, t);
|
|
655
655
|
}), n;
|
|
656
656
|
}
|
|
657
657
|
const fn = {
|
|
@@ -726,12 +726,12 @@ let un = {
|
|
|
726
726
|
function Ht(e, n) {
|
|
727
727
|
return n?.(e) ? e : e && typeof e == "object" && "cause" in e && e.cause !== void 0 ? Ht(e.cause, n) : n ? null : e;
|
|
728
728
|
}
|
|
729
|
-
class
|
|
729
|
+
class Ys extends h {
|
|
730
730
|
constructor({ max: n, min: t, signed: r, size: s, value: i }) {
|
|
731
731
|
super(`Number "${i}" is not in safe ${s ? `${s * 8}-bit ${r ? "signed" : "unsigned"} ` : ""}integer range ${n ? `(${t} to ${n})` : `(above ${t})`}`, { name: "IntegerOutOfRangeError" });
|
|
732
732
|
}
|
|
733
733
|
}
|
|
734
|
-
class
|
|
734
|
+
class Zs extends h {
|
|
735
735
|
constructor({ givenSize: n, maxSize: t }) {
|
|
736
736
|
super(`Size cannot exceed ${t} bytes. Given size: ${n} bytes.`, { name: "SizeOverflowError" });
|
|
737
737
|
}
|
|
@@ -748,7 +748,7 @@ function Re(e, { dir: n = "left" } = {}) {
|
|
|
748
748
|
r++;
|
|
749
749
|
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;
|
|
750
750
|
}
|
|
751
|
-
class
|
|
751
|
+
class Js extends h {
|
|
752
752
|
constructor({ offset: n, position: t, size: r }) {
|
|
753
753
|
super(`Slice ${t === "start" ? "starting" : "ending"} at offset "${n}" is out-of-bounds (size: ${r}).`, { name: "SliceOffsetOutOfBoundsError" });
|
|
754
754
|
}
|
|
@@ -759,9 +759,9 @@ class Qt extends h {
|
|
|
759
759
|
}
|
|
760
760
|
}
|
|
761
761
|
function Ie(e, { dir: n, size: t = 32 } = {}) {
|
|
762
|
-
return typeof e == "string" ?
|
|
762
|
+
return typeof e == "string" ? Ds(e, { dir: n, size: t }) : Fs(e, { dir: n, size: t });
|
|
763
763
|
}
|
|
764
|
-
function
|
|
764
|
+
function Ds(e, { dir: n, size: t = 32 } = {}) {
|
|
765
765
|
if (t === null)
|
|
766
766
|
return e;
|
|
767
767
|
const r = e.replace("0x", "");
|
|
@@ -773,7 +773,7 @@ function Fs(e, { dir: n, size: t = 32 } = {}) {
|
|
|
773
773
|
});
|
|
774
774
|
return `0x${r[n === "right" ? "padEnd" : "padStart"](t * 2, "0")}`;
|
|
775
775
|
}
|
|
776
|
-
function
|
|
776
|
+
function Fs(e, { dir: n, size: t = 32 } = {}) {
|
|
777
777
|
if (t === null)
|
|
778
778
|
return e;
|
|
779
779
|
if (e.length > t)
|
|
@@ -789,18 +789,18 @@ function Hs(e, { dir: n, size: t = 32 } = {}) {
|
|
|
789
789
|
}
|
|
790
790
|
return r;
|
|
791
791
|
}
|
|
792
|
-
const
|
|
792
|
+
const Hs = /* @__PURE__ */ Array.from({ length: 256 }, (e, n) => n.toString(16).padStart(2, "0"));
|
|
793
793
|
function We(e, n = {}) {
|
|
794
|
-
return typeof e == "number" || typeof e == "bigint" ? P(e, n) : typeof e == "string" ?
|
|
794
|
+
return typeof e == "number" || typeof e == "bigint" ? P(e, n) : typeof e == "string" ? qs(e, n) : typeof e == "boolean" ? Qs(e, n) : ee(e, n);
|
|
795
795
|
}
|
|
796
|
-
function
|
|
796
|
+
function Qs(e, n = {}) {
|
|
797
797
|
const t = `0x${Number(e)}`;
|
|
798
798
|
return typeof n.size == "number" ? (we(t, { size: n.size }), Ie(t, { size: n.size })) : t;
|
|
799
799
|
}
|
|
800
800
|
function ee(e, n = {}) {
|
|
801
801
|
let t = "";
|
|
802
802
|
for (let s = 0; s < e.length; s++)
|
|
803
|
-
t +=
|
|
803
|
+
t += Hs[e[s]];
|
|
804
804
|
const r = `0x${t}`;
|
|
805
805
|
return typeof n.size == "number" ? (we(r, { size: n.size }), Ie(r, { dir: "right", size: n.size })) : r;
|
|
806
806
|
}
|
|
@@ -811,7 +811,7 @@ function P(e, n = {}) {
|
|
|
811
811
|
const a = typeof i == "bigint" && t ? -i - 1n : 0;
|
|
812
812
|
if (i && s > i || s < a) {
|
|
813
813
|
const l = typeof e == "bigint" ? "n" : "";
|
|
814
|
-
throw new
|
|
814
|
+
throw new Ys({
|
|
815
815
|
max: i ? `${i}${l}` : void 0,
|
|
816
816
|
min: `${a}${l}`,
|
|
817
817
|
signed: t,
|
|
@@ -822,16 +822,16 @@ function P(e, n = {}) {
|
|
|
822
822
|
const c = `0x${(t && s < 0 ? (1n << BigInt(r * 8)) + BigInt(s) : s).toString(16)}`;
|
|
823
823
|
return r ? Ie(c, { size: r }) : c;
|
|
824
824
|
}
|
|
825
|
-
const
|
|
826
|
-
function
|
|
827
|
-
const t =
|
|
825
|
+
const Ks = /* @__PURE__ */ new TextEncoder();
|
|
826
|
+
function qs(e, n = {}) {
|
|
827
|
+
const t = Ks.encode(e);
|
|
828
828
|
return ee(t, n);
|
|
829
829
|
}
|
|
830
|
-
const
|
|
830
|
+
const Us = /* @__PURE__ */ new TextEncoder();
|
|
831
831
|
function Kt(e, n = {}) {
|
|
832
|
-
return typeof e == "number" || typeof e == "bigint" ?
|
|
832
|
+
return typeof e == "number" || typeof e == "bigint" ? Rs(e, n) : typeof e == "boolean" ? Gs(e, n) : Te(e) ? le(e, n) : qt(e, n);
|
|
833
833
|
}
|
|
834
|
-
function
|
|
834
|
+
function Gs(e, n = {}) {
|
|
835
835
|
const t = new Uint8Array(1);
|
|
836
836
|
return t[0] = Number(e), typeof n.size == "number" ? (we(t, { size: n.size }), Ie(t, { size: n.size })) : t;
|
|
837
837
|
}
|
|
@@ -865,17 +865,17 @@ function le(e, n = {}) {
|
|
|
865
865
|
}
|
|
866
866
|
return i;
|
|
867
867
|
}
|
|
868
|
-
function
|
|
868
|
+
function Rs(e, n) {
|
|
869
869
|
const t = P(e, n);
|
|
870
870
|
return le(t);
|
|
871
871
|
}
|
|
872
872
|
function qt(e, n = {}) {
|
|
873
|
-
const t =
|
|
873
|
+
const t = Us.encode(e);
|
|
874
874
|
return typeof n.size == "number" ? (we(t, { size: n.size }), Ie(t, { dir: "right", size: n.size })) : t;
|
|
875
875
|
}
|
|
876
876
|
function we(e, { size: n }) {
|
|
877
877
|
if (be(e) > n)
|
|
878
|
-
throw new
|
|
878
|
+
throw new Zs({
|
|
879
879
|
givenSize: be(e),
|
|
880
880
|
maxSize: n
|
|
881
881
|
});
|
|
@@ -934,7 +934,7 @@ function Jn(e, n) {
|
|
|
934
934
|
value: e.value ? BigInt(e.value) : void 0,
|
|
935
935
|
v: e.v ? BigInt(e.v) : void 0
|
|
936
936
|
};
|
|
937
|
-
return e.authorizationList && (t.authorizationList =
|
|
937
|
+
return e.authorizationList && (t.authorizationList = $s(e.authorizationList)), t.yParity = (() => {
|
|
938
938
|
if (e.yParity)
|
|
939
939
|
return Number(e.yParity);
|
|
940
940
|
if (typeof t.v == "bigint") {
|
|
@@ -947,8 +947,8 @@ function Jn(e, n) {
|
|
|
947
947
|
}
|
|
948
948
|
})(), 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;
|
|
949
949
|
}
|
|
950
|
-
const
|
|
951
|
-
function
|
|
950
|
+
const _s = /* @__PURE__ */ Zn("transaction", Jn);
|
|
951
|
+
function $s(e) {
|
|
952
952
|
return e.map((n) => ({
|
|
953
953
|
address: n.address,
|
|
954
954
|
chainId: Number(n.chainId),
|
|
@@ -958,7 +958,7 @@ function ei(e) {
|
|
|
958
958
|
yParity: Number(n.yParity)
|
|
959
959
|
}));
|
|
960
960
|
}
|
|
961
|
-
function
|
|
961
|
+
function ei(e, n) {
|
|
962
962
|
const t = (e.transactions ?? []).map((r) => typeof r == "string" ? r : Jn(r));
|
|
963
963
|
return {
|
|
964
964
|
...e,
|
|
@@ -978,8 +978,8 @@ function ni(e, n) {
|
|
|
978
978
|
totalDifficulty: e.totalDifficulty ? BigInt(e.totalDifficulty) : null
|
|
979
979
|
};
|
|
980
980
|
}
|
|
981
|
-
const
|
|
982
|
-
function
|
|
981
|
+
const ni = /* @__PURE__ */ Zn("block", ei);
|
|
982
|
+
function ti(e, { args: n, eventName: t } = {}) {
|
|
983
983
|
return {
|
|
984
984
|
...e,
|
|
985
985
|
blockHash: e.blockHash ? e.blockHash : null,
|
|
@@ -990,11 +990,11 @@ function ri(e, { args: n, eventName: t } = {}) {
|
|
|
990
990
|
...t ? { args: n, eventName: t } : {}
|
|
991
991
|
};
|
|
992
992
|
}
|
|
993
|
-
const
|
|
993
|
+
const ri = {
|
|
994
994
|
"0x0": "reverted",
|
|
995
995
|
"0x1": "success"
|
|
996
996
|
};
|
|
997
|
-
function
|
|
997
|
+
function si(e, n) {
|
|
998
998
|
const t = {
|
|
999
999
|
...e,
|
|
1000
1000
|
blockNumber: e.blockNumber ? BigInt(e.blockNumber) : null,
|
|
@@ -1002,26 +1002,26 @@ function ii(e, n) {
|
|
|
1002
1002
|
cumulativeGasUsed: e.cumulativeGasUsed ? BigInt(e.cumulativeGasUsed) : null,
|
|
1003
1003
|
effectiveGasPrice: e.effectiveGasPrice ? BigInt(e.effectiveGasPrice) : null,
|
|
1004
1004
|
gasUsed: e.gasUsed ? BigInt(e.gasUsed) : null,
|
|
1005
|
-
logs: e.logs ? e.logs.map((r) =>
|
|
1005
|
+
logs: e.logs ? e.logs.map((r) => ti(r)) : null,
|
|
1006
1006
|
to: e.to ? e.to : null,
|
|
1007
1007
|
transactionIndex: e.transactionIndex ? _e(e.transactionIndex) : null,
|
|
1008
|
-
status: e.status ?
|
|
1008
|
+
status: e.status ? ri[e.status] : null,
|
|
1009
1009
|
type: e.type ? Ut[e.type] || e.type : null
|
|
1010
1010
|
};
|
|
1011
1011
|
return e.blobGasPrice && (t.blobGasPrice = BigInt(e.blobGasPrice)), e.blobGasUsed && (t.blobGasUsed = BigInt(e.blobGasUsed)), t;
|
|
1012
1012
|
}
|
|
1013
|
-
const
|
|
1013
|
+
const ii = /* @__PURE__ */ Zn("transactionReceipt", si), oi = {
|
|
1014
1014
|
legacy: "0x0",
|
|
1015
1015
|
eip2930: "0x1",
|
|
1016
1016
|
eip1559: "0x2",
|
|
1017
1017
|
eip4844: "0x3",
|
|
1018
1018
|
eip7702: "0x4"
|
|
1019
1019
|
};
|
|
1020
|
-
function
|
|
1020
|
+
function ci(e, n) {
|
|
1021
1021
|
const t = {};
|
|
1022
|
-
return typeof e.authorizationList < "u" && (t.authorizationList =
|
|
1022
|
+
return typeof e.authorizationList < "u" && (t.authorizationList = ai(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) => ee(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 = oi[e.type]), typeof e.value < "u" && (t.value = P(e.value)), t;
|
|
1023
1023
|
}
|
|
1024
|
-
function
|
|
1024
|
+
function ai(e) {
|
|
1025
1025
|
return e.map((n) => ({
|
|
1026
1026
|
address: n.address,
|
|
1027
1027
|
r: n.r ? P(BigInt(n.r)) : n.r,
|
|
@@ -1043,17 +1043,17 @@ class at extends h {
|
|
|
1043
1043
|
});
|
|
1044
1044
|
}
|
|
1045
1045
|
}
|
|
1046
|
-
class
|
|
1046
|
+
class li extends h {
|
|
1047
1047
|
constructor({ length: n, position: t }) {
|
|
1048
1048
|
super(`Position \`${t}\` is out of bounds (\`0 < position < ${n}\`).`, { name: "PositionOutOfBoundsError" });
|
|
1049
1049
|
}
|
|
1050
1050
|
}
|
|
1051
|
-
class
|
|
1051
|
+
class di extends h {
|
|
1052
1052
|
constructor({ count: n, limit: t }) {
|
|
1053
1053
|
super(`Recursive read limit of \`${t}\` exceeded (recursive read count: \`${n}\`).`, { name: "RecursiveReadLimitExceededError" });
|
|
1054
1054
|
}
|
|
1055
1055
|
}
|
|
1056
|
-
const
|
|
1056
|
+
const Ai = {
|
|
1057
1057
|
bytes: new Uint8Array(),
|
|
1058
1058
|
dataView: new DataView(new ArrayBuffer(0)),
|
|
1059
1059
|
position: 0,
|
|
@@ -1062,14 +1062,14 @@ const fi = {
|
|
|
1062
1062
|
recursiveReadLimit: Number.POSITIVE_INFINITY,
|
|
1063
1063
|
assertReadLimit() {
|
|
1064
1064
|
if (this.recursiveReadCount >= this.recursiveReadLimit)
|
|
1065
|
-
throw new
|
|
1065
|
+
throw new di({
|
|
1066
1066
|
count: this.recursiveReadCount + 1,
|
|
1067
1067
|
limit: this.recursiveReadLimit
|
|
1068
1068
|
});
|
|
1069
1069
|
},
|
|
1070
1070
|
assertPosition(e) {
|
|
1071
1071
|
if (e < 0 || e > this.bytes.length - 1)
|
|
1072
|
-
throw new
|
|
1072
|
+
throw new li({
|
|
1073
1073
|
length: this.bytes.length,
|
|
1074
1074
|
position: e
|
|
1075
1075
|
});
|
|
@@ -1176,7 +1176,7 @@ const fi = {
|
|
|
1176
1176
|
}
|
|
1177
1177
|
};
|
|
1178
1178
|
function Gt(e, { recursiveReadLimit: n = 8192 } = {}) {
|
|
1179
|
-
const t = Object.create(
|
|
1179
|
+
const t = Object.create(Ai);
|
|
1180
1180
|
return t.bytes = e, t.dataView = new DataView(e.buffer, e.byteOffset, e.byteLength), t.positionReadCount = /* @__PURE__ */ new Map(), t.recursiveReadLimit = n, t;
|
|
1181
1181
|
}
|
|
1182
1182
|
function de(e, n = "hex") {
|
|
@@ -1184,9 +1184,9 @@ function de(e, n = "hex") {
|
|
|
1184
1184
|
return t.encode(r), n === "hex" ? ee(r.bytes) : r.bytes;
|
|
1185
1185
|
}
|
|
1186
1186
|
function Rt(e) {
|
|
1187
|
-
return Array.isArray(e) ?
|
|
1187
|
+
return Array.isArray(e) ? fi(e.map((n) => Rt(n))) : ui(e);
|
|
1188
1188
|
}
|
|
1189
|
-
function
|
|
1189
|
+
function fi(e) {
|
|
1190
1190
|
const n = e.reduce((s, i) => s + i.length, 0), t = _t(n);
|
|
1191
1191
|
return {
|
|
1192
1192
|
length: n <= 55 ? 1 + n : 1 + t + n,
|
|
@@ -1197,7 +1197,7 @@ function ui(e) {
|
|
|
1197
1197
|
}
|
|
1198
1198
|
};
|
|
1199
1199
|
}
|
|
1200
|
-
function
|
|
1200
|
+
function ui(e) {
|
|
1201
1201
|
const n = typeof e == "string" ? le(e) : e, t = _t(n.length);
|
|
1202
1202
|
return {
|
|
1203
1203
|
length: n.length === 1 && n[0] < 128 ? 1 : n.length <= 55 ? 1 + n.length : 1 + t + n.length,
|
|
@@ -1217,10 +1217,10 @@ function _t(e) {
|
|
|
1217
1217
|
return 4;
|
|
1218
1218
|
throw new h("Length is too large.");
|
|
1219
1219
|
}
|
|
1220
|
-
const
|
|
1220
|
+
const gi = {
|
|
1221
1221
|
gwei: 9,
|
|
1222
1222
|
wei: 18
|
|
1223
|
-
},
|
|
1223
|
+
}, vi = {
|
|
1224
1224
|
ether: -9,
|
|
1225
1225
|
wei: 9
|
|
1226
1226
|
};
|
|
@@ -1234,18 +1234,18 @@ function $t(e, n) {
|
|
|
1234
1234
|
];
|
|
1235
1235
|
return i = i.replace(/(0+)$/, ""), `${r ? "-" : ""}${s || "0"}${i ? `.${i}` : ""}`;
|
|
1236
1236
|
}
|
|
1237
|
-
function
|
|
1238
|
-
return $t(e,
|
|
1237
|
+
function mi(e, n = "wei") {
|
|
1238
|
+
return $t(e, gi[n]);
|
|
1239
1239
|
}
|
|
1240
1240
|
function oe(e, n = "wei") {
|
|
1241
|
-
return $t(e,
|
|
1241
|
+
return $t(e, vi[n]);
|
|
1242
1242
|
}
|
|
1243
1243
|
function er(e) {
|
|
1244
1244
|
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);
|
|
1245
1245
|
return n.map(([r, s]) => ` ${`${r}:`.padEnd(t + 1)} ${s}`).join(`
|
|
1246
1246
|
`);
|
|
1247
1247
|
}
|
|
1248
|
-
class
|
|
1248
|
+
class pi extends h {
|
|
1249
1249
|
constructor() {
|
|
1250
1250
|
super([
|
|
1251
1251
|
"Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.",
|
|
@@ -1254,14 +1254,14 @@ class Ci extends h {
|
|
|
1254
1254
|
`), { name: "FeeConflictError" });
|
|
1255
1255
|
}
|
|
1256
1256
|
}
|
|
1257
|
-
class
|
|
1257
|
+
class Ci extends h {
|
|
1258
1258
|
constructor({ v: n }) {
|
|
1259
1259
|
super(`Invalid \`v\` value "${n}". Expected 27 or 28.`, {
|
|
1260
1260
|
name: "InvalidLegacyVError"
|
|
1261
1261
|
});
|
|
1262
1262
|
}
|
|
1263
1263
|
}
|
|
1264
|
-
class
|
|
1264
|
+
class xi extends h {
|
|
1265
1265
|
constructor({ transaction: n }) {
|
|
1266
1266
|
super("Cannot infer a transaction type from provided transaction.", {
|
|
1267
1267
|
metaMessages: [
|
|
@@ -1282,12 +1282,12 @@ class bi extends h {
|
|
|
1282
1282
|
});
|
|
1283
1283
|
}
|
|
1284
1284
|
}
|
|
1285
|
-
class
|
|
1285
|
+
class bi extends h {
|
|
1286
1286
|
constructor({ storageKey: n }) {
|
|
1287
1287
|
super(`Size for storage key "${n}" is invalid. Expected 32 bytes. Got ${Math.floor((n.length - 2) / 2)} bytes.`, { name: "InvalidStorageKeySizeError" });
|
|
1288
1288
|
}
|
|
1289
1289
|
}
|
|
1290
|
-
function
|
|
1290
|
+
function zi(e) {
|
|
1291
1291
|
if (!e || e.length === 0)
|
|
1292
1292
|
return [];
|
|
1293
1293
|
const n = [];
|
|
@@ -1316,7 +1316,7 @@ function tr(e) {
|
|
|
1316
1316
|
}
|
|
1317
1317
|
return t === "bytes" ? i : i.map((a) => ee(a));
|
|
1318
1318
|
}
|
|
1319
|
-
function
|
|
1319
|
+
function Ii(e) {
|
|
1320
1320
|
return e instanceof Uint8Array || ArrayBuffer.isView(e) && e.constructor.name === "Uint8Array";
|
|
1321
1321
|
}
|
|
1322
1322
|
function lt(e) {
|
|
@@ -1324,7 +1324,7 @@ function lt(e) {
|
|
|
1324
1324
|
throw new Error("positive integer expected, got " + e);
|
|
1325
1325
|
}
|
|
1326
1326
|
function Ve(e, ...n) {
|
|
1327
|
-
if (!
|
|
1327
|
+
if (!Ii(e))
|
|
1328
1328
|
throw new Error("Uint8Array expected");
|
|
1329
1329
|
if (n.length > 0 && !n.includes(e.length))
|
|
1330
1330
|
throw new Error("Uint8Array expected of length " + n + ", got length=" + e.length);
|
|
@@ -1341,7 +1341,7 @@ function rr(e, n) {
|
|
|
1341
1341
|
if (e.length < t)
|
|
1342
1342
|
throw new Error("digestInto() expects output buffer of length at least " + t);
|
|
1343
1343
|
}
|
|
1344
|
-
function
|
|
1344
|
+
function wi(e) {
|
|
1345
1345
|
return new Uint32Array(e.buffer, e.byteOffset, Math.floor(e.byteLength / 4));
|
|
1346
1346
|
}
|
|
1347
1347
|
function Xe(...e) {
|
|
@@ -1354,23 +1354,23 @@ function gn(e) {
|
|
|
1354
1354
|
function K(e, n) {
|
|
1355
1355
|
return e << 32 - n | e >>> n;
|
|
1356
1356
|
}
|
|
1357
|
-
const
|
|
1358
|
-
function
|
|
1357
|
+
const Pi = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
|
|
1358
|
+
function yi(e) {
|
|
1359
1359
|
return e << 24 & 4278190080 | e << 8 & 16711680 | e >>> 8 & 65280 | e >>> 24 & 255;
|
|
1360
1360
|
}
|
|
1361
|
-
function
|
|
1361
|
+
function Bi(e) {
|
|
1362
1362
|
for (let n = 0; n < e.length; n++)
|
|
1363
|
-
e[n] =
|
|
1363
|
+
e[n] = yi(e[n]);
|
|
1364
1364
|
return e;
|
|
1365
1365
|
}
|
|
1366
|
-
const dt =
|
|
1367
|
-
function
|
|
1366
|
+
const dt = Pi ? (e) => e : Bi;
|
|
1367
|
+
function hi(e) {
|
|
1368
1368
|
if (typeof e != "string")
|
|
1369
1369
|
throw new Error("string expected");
|
|
1370
1370
|
return new Uint8Array(new TextEncoder().encode(e));
|
|
1371
1371
|
}
|
|
1372
1372
|
function Dn(e) {
|
|
1373
|
-
return typeof e == "string" && (e =
|
|
1373
|
+
return typeof e == "string" && (e = hi(e)), Ve(e), e;
|
|
1374
1374
|
}
|
|
1375
1375
|
class sr {
|
|
1376
1376
|
}
|
|
@@ -1378,19 +1378,19 @@ function ir(e) {
|
|
|
1378
1378
|
const n = (r) => e().update(Dn(r)).digest(), t = e();
|
|
1379
1379
|
return n.outputLen = t.outputLen, n.blockLen = t.blockLen, n.create = () => e(), n;
|
|
1380
1380
|
}
|
|
1381
|
-
function
|
|
1381
|
+
function Wi(e, n, t, r) {
|
|
1382
1382
|
if (typeof e.setBigUint64 == "function")
|
|
1383
1383
|
return e.setBigUint64(n, t, r);
|
|
1384
1384
|
const s = BigInt(32), i = BigInt(4294967295), a = Number(t >> s & i), c = Number(t & i), l = r ? 4 : 0, d = r ? 0 : 4;
|
|
1385
1385
|
e.setUint32(n + l, a, r), e.setUint32(n + d, c, r);
|
|
1386
1386
|
}
|
|
1387
|
-
function
|
|
1387
|
+
function Mi(e, n, t) {
|
|
1388
1388
|
return e & n ^ ~e & t;
|
|
1389
1389
|
}
|
|
1390
|
-
function
|
|
1390
|
+
function Vi(e, n, t) {
|
|
1391
1391
|
return e & n ^ e & t ^ n & t;
|
|
1392
1392
|
}
|
|
1393
|
-
class
|
|
1393
|
+
class Xi extends sr {
|
|
1394
1394
|
constructor(n, t, r, s) {
|
|
1395
1395
|
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 = gn(this.buffer);
|
|
1396
1396
|
}
|
|
@@ -1414,17 +1414,17 @@ class Ni extends sr {
|
|
|
1414
1414
|
const { buffer: t, view: r, blockLen: s, isLE: i } = this;
|
|
1415
1415
|
let { pos: a } = this;
|
|
1416
1416
|
t[a++] = 128, Xe(this.buffer.subarray(a)), this.padOffset > s - a && (this.process(r, 0), a = 0);
|
|
1417
|
-
for (let
|
|
1418
|
-
t[
|
|
1419
|
-
|
|
1417
|
+
for (let f = a; f < s; f++)
|
|
1418
|
+
t[f] = 0;
|
|
1419
|
+
Wi(r, s - 8, BigInt(this.length * 8), i), this.process(r, 0);
|
|
1420
1420
|
const c = gn(n), l = this.outputLen;
|
|
1421
1421
|
if (l % 4)
|
|
1422
1422
|
throw new Error("_sha2: outputLen should be aligned to 32bit");
|
|
1423
|
-
const d = l / 4,
|
|
1424
|
-
if (d >
|
|
1423
|
+
const d = l / 4, A = this.get();
|
|
1424
|
+
if (d > A.length)
|
|
1425
1425
|
throw new Error("_sha2: outputLen bigger than state");
|
|
1426
|
-
for (let
|
|
1427
|
-
c.setUint32(4 *
|
|
1426
|
+
for (let f = 0; f < d; f++)
|
|
1427
|
+
c.setUint32(4 * f, A[f], i);
|
|
1428
1428
|
}
|
|
1429
1429
|
digest() {
|
|
1430
1430
|
const { buffer: n, outputLen: t } = this;
|
|
@@ -1451,19 +1451,19 @@ const ne = /* @__PURE__ */ Uint32Array.from([
|
|
|
1451
1451
|
528734635,
|
|
1452
1452
|
1541459225
|
|
1453
1453
|
]), Fe = /* @__PURE__ */ BigInt(2 ** 32 - 1), At = /* @__PURE__ */ BigInt(32);
|
|
1454
|
-
function
|
|
1454
|
+
function Ni(e, n = !1) {
|
|
1455
1455
|
return n ? { h: Number(e & Fe), l: Number(e >> At & Fe) } : { h: Number(e >> At & Fe) | 0, l: Number(e & Fe) | 0 };
|
|
1456
1456
|
}
|
|
1457
|
-
function
|
|
1457
|
+
function ji(e, n = !1) {
|
|
1458
1458
|
const t = e.length;
|
|
1459
1459
|
let r = new Uint32Array(t), s = new Uint32Array(t);
|
|
1460
1460
|
for (let i = 0; i < t; i++) {
|
|
1461
|
-
const { h: a, l: c } =
|
|
1461
|
+
const { h: a, l: c } = Ni(e[i], n);
|
|
1462
1462
|
[r[i], s[i]] = [a, c];
|
|
1463
1463
|
}
|
|
1464
1464
|
return [r, s];
|
|
1465
1465
|
}
|
|
1466
|
-
const
|
|
1466
|
+
const Ti = (e, n, t) => e << t | n >>> 32 - t, Ei = (e, n, t) => n << t | e >>> 32 - t, Si = (e, n, t) => n << t - 32 | e >>> 64 - t, Oi = (e, n, t) => e << t - 32 | n >>> 64 - t, ki = /* @__PURE__ */ Uint32Array.from([
|
|
1467
1467
|
1116352408,
|
|
1468
1468
|
1899447441,
|
|
1469
1469
|
3049323471,
|
|
@@ -1529,7 +1529,7 @@ const Ei = (e, n, t) => e << t | n >>> 32 - t, Si = (e, n, t) => n << t | e >>>
|
|
|
1529
1529
|
3204031479,
|
|
1530
1530
|
3329325298
|
|
1531
1531
|
]), te = /* @__PURE__ */ new Uint32Array(64);
|
|
1532
|
-
class
|
|
1532
|
+
class Li extends Xi {
|
|
1533
1533
|
constructor(n = 32) {
|
|
1534
1534
|
super(64, n, 8, !1), this.A = ne[0] | 0, this.B = ne[1] | 0, this.C = ne[2] | 0, this.D = ne[3] | 0, this.E = ne[4] | 0, this.F = ne[5] | 0, this.G = ne[6] | 0, this.H = ne[7] | 0;
|
|
1535
1535
|
}
|
|
@@ -1542,18 +1542,18 @@ class Yi extends Ni {
|
|
|
1542
1542
|
this.A = n | 0, this.B = t | 0, this.C = r | 0, this.D = s | 0, this.E = i | 0, this.F = a | 0, this.G = c | 0, this.H = l | 0;
|
|
1543
1543
|
}
|
|
1544
1544
|
process(n, t) {
|
|
1545
|
-
for (let
|
|
1546
|
-
te[
|
|
1547
|
-
for (let
|
|
1548
|
-
const u = te[
|
|
1549
|
-
te[
|
|
1545
|
+
for (let f = 0; f < 16; f++, t += 4)
|
|
1546
|
+
te[f] = n.getUint32(t, !1);
|
|
1547
|
+
for (let f = 16; f < 64; f++) {
|
|
1548
|
+
const u = te[f - 15], v = te[f - 2], m = K(u, 7) ^ K(u, 18) ^ u >>> 3, g = K(v, 17) ^ K(v, 19) ^ v >>> 10;
|
|
1549
|
+
te[f] = g + te[f - 7] + m + te[f - 16] | 0;
|
|
1550
1550
|
}
|
|
1551
|
-
let { A: r, B: s, C: i, D: a, E: c, F: l, G: d, H:
|
|
1552
|
-
for (let
|
|
1553
|
-
const u = K(c, 6) ^ K(c, 11) ^ K(c, 25), v =
|
|
1554
|
-
|
|
1551
|
+
let { A: r, B: s, C: i, D: a, E: c, F: l, G: d, H: A } = this;
|
|
1552
|
+
for (let f = 0; f < 64; f++) {
|
|
1553
|
+
const u = K(c, 6) ^ K(c, 11) ^ K(c, 25), v = A + u + Mi(c, l, d) + ki[f] + te[f] | 0, g = (K(r, 2) ^ K(r, 13) ^ K(r, 22)) + Vi(r, s, i) | 0;
|
|
1554
|
+
A = d, d = l, l = c, c = a + v | 0, a = i, i = s, s = r, r = v + g | 0;
|
|
1555
1555
|
}
|
|
1556
|
-
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, d = d + this.G | 0,
|
|
1556
|
+
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, d = d + this.G | 0, A = A + this.H | 0, this.set(r, s, i, a, c, l, d, A);
|
|
1557
1557
|
}
|
|
1558
1558
|
roundClean() {
|
|
1559
1559
|
Xe(te);
|
|
@@ -1562,18 +1562,18 @@ class Yi extends Ni {
|
|
|
1562
1562
|
this.set(0, 0, 0, 0, 0, 0, 0, 0), Xe(this.buffer);
|
|
1563
1563
|
}
|
|
1564
1564
|
}
|
|
1565
|
-
const
|
|
1566
|
-
function
|
|
1567
|
-
return
|
|
1565
|
+
const Yi = /* @__PURE__ */ ir(() => new Li()), Zi = Yi;
|
|
1566
|
+
function Ji(e, n) {
|
|
1567
|
+
return Zi(Te(e, { strict: !1 }) ? Kt(e) : e);
|
|
1568
1568
|
}
|
|
1569
|
-
function
|
|
1570
|
-
const { commitment: n, version: t = 1 } = e, r = e.to ?? (typeof n == "string" ? "hex" : "bytes"), s =
|
|
1569
|
+
function Di(e) {
|
|
1570
|
+
const { commitment: n, version: t = 1 } = e, r = e.to ?? (typeof n == "string" ? "hex" : "bytes"), s = Ji(n);
|
|
1571
1571
|
return s.set([t], 0), r === "bytes" ? s : ee(s);
|
|
1572
1572
|
}
|
|
1573
|
-
function
|
|
1573
|
+
function Fi(e) {
|
|
1574
1574
|
const { commitments: n, version: t } = e, r = e.to ?? (typeof n[0] == "string" ? "hex" : "bytes"), s = [];
|
|
1575
1575
|
for (const i of n)
|
|
1576
|
-
s.push(
|
|
1576
|
+
s.push(Di({
|
|
1577
1577
|
commitment: i,
|
|
1578
1578
|
to: r,
|
|
1579
1579
|
version: t
|
|
@@ -1583,7 +1583,7 @@ function Hi(e) {
|
|
|
1583
1583
|
const ft = 6, or = 32, Fn = 4096, cr = or * Fn, ut = cr * ft - // terminator byte (0x80).
|
|
1584
1584
|
1 - // zero byte (0x00) appended to each field element.
|
|
1585
1585
|
1 * Fn * ft, ar = 1;
|
|
1586
|
-
class
|
|
1586
|
+
class Hi extends h {
|
|
1587
1587
|
constructor({ maxSize: n, size: t }) {
|
|
1588
1588
|
super("Blob size is too large.", {
|
|
1589
1589
|
metaMessages: [`Max: ${n} bytes`, `Given: ${t} bytes`],
|
|
@@ -1596,7 +1596,7 @@ class lr extends h {
|
|
|
1596
1596
|
super("Blob data must not be empty.", { name: "EmptyBlobError" });
|
|
1597
1597
|
}
|
|
1598
1598
|
}
|
|
1599
|
-
class
|
|
1599
|
+
class Qi extends h {
|
|
1600
1600
|
constructor({ hash: n, size: t }) {
|
|
1601
1601
|
super(`Versioned hash "${n}" size is invalid.`, {
|
|
1602
1602
|
metaMessages: ["Expected: 32", `Received: ${t}`],
|
|
@@ -1604,7 +1604,7 @@ class Ki extends h {
|
|
|
1604
1604
|
});
|
|
1605
1605
|
}
|
|
1606
1606
|
}
|
|
1607
|
-
class
|
|
1607
|
+
class Ki extends h {
|
|
1608
1608
|
constructor({ hash: n, version: t }) {
|
|
1609
1609
|
super(`Versioned hash "${n}" version is invalid.`, {
|
|
1610
1610
|
metaMessages: [
|
|
@@ -1615,12 +1615,12 @@ class qi extends h {
|
|
|
1615
1615
|
});
|
|
1616
1616
|
}
|
|
1617
1617
|
}
|
|
1618
|
-
function
|
|
1618
|
+
function qi(e) {
|
|
1619
1619
|
const n = e.to ?? (typeof e.data == "string" ? "hex" : "bytes"), t = typeof e.data == "string" ? le(e.data) : e.data, r = be(t);
|
|
1620
1620
|
if (!r)
|
|
1621
1621
|
throw new lr();
|
|
1622
1622
|
if (r > ut)
|
|
1623
|
-
throw new
|
|
1623
|
+
throw new Hi({
|
|
1624
1624
|
maxSize: ut,
|
|
1625
1625
|
size: r
|
|
1626
1626
|
});
|
|
@@ -1641,8 +1641,8 @@ function Ui(e) {
|
|
|
1641
1641
|
}
|
|
1642
1642
|
return n === "bytes" ? s.map((c) => c.bytes) : s.map((c) => ee(c.bytes));
|
|
1643
1643
|
}
|
|
1644
|
-
function
|
|
1645
|
-
const { data: n, kzg: t, to: r } = e, s = e.blobs ??
|
|
1644
|
+
function Ui(e) {
|
|
1645
|
+
const { data: n, kzg: t, to: r } = e, s = e.blobs ?? qi({ data: n, to: r }), i = e.commitments ?? nr({ blobs: s, kzg: t, to: r }), a = e.proofs ?? tr({ blobs: s, commitments: i, kzg: t, to: r }), c = [];
|
|
1646
1646
|
for (let l = 0; l < s.length; l++)
|
|
1647
1647
|
c.push({
|
|
1648
1648
|
blob: s[l],
|
|
@@ -1868,29 +1868,29 @@ class Ar extends Map {
|
|
|
1868
1868
|
return this;
|
|
1869
1869
|
}
|
|
1870
1870
|
}
|
|
1871
|
-
const
|
|
1871
|
+
const Gi = BigInt(0), ye = BigInt(1), Ri = BigInt(2), _i = BigInt(7), $i = BigInt(256), eo = BigInt(113), fr = [], ur = [], gr = [];
|
|
1872
1872
|
for (let e = 0, n = ye, t = 1, r = 0; e < 24; e++) {
|
|
1873
1873
|
[t, r] = [r, (2 * t + 3 * r) % 5], fr.push(2 * (5 * r + t)), ur.push((e + 1) * (e + 2) / 2 % 64);
|
|
1874
|
-
let s =
|
|
1874
|
+
let s = Gi;
|
|
1875
1875
|
for (let i = 0; i < 7; i++)
|
|
1876
|
-
n = (n << ye ^ (n >>
|
|
1876
|
+
n = (n << ye ^ (n >> _i) * eo) % $i, n & Ri && (s ^= ye << (ye << /* @__PURE__ */ BigInt(i)) - ye);
|
|
1877
1877
|
gr.push(s);
|
|
1878
1878
|
}
|
|
1879
|
-
const vr =
|
|
1880
|
-
function
|
|
1879
|
+
const vr = ji(gr, !0), no = vr[0], to = vr[1], gt = (e, n, t) => t > 32 ? Si(e, n, t) : Ti(e, n, t), vt = (e, n, t) => t > 32 ? Oi(e, n, t) : Ei(e, n, t);
|
|
1880
|
+
function ro(e, n = 24) {
|
|
1881
1881
|
const t = new Uint32Array(10);
|
|
1882
1882
|
for (let r = 24 - n; r < 24; r++) {
|
|
1883
1883
|
for (let a = 0; a < 10; a++)
|
|
1884
1884
|
t[a] = e[a] ^ e[a + 10] ^ e[a + 20] ^ e[a + 30] ^ e[a + 40];
|
|
1885
1885
|
for (let a = 0; a < 10; a += 2) {
|
|
1886
|
-
const c = (a + 8) % 10, l = (a + 2) % 10, d = t[l],
|
|
1886
|
+
const c = (a + 8) % 10, l = (a + 2) % 10, d = t[l], A = t[l + 1], f = gt(d, A, 1) ^ t[c], u = vt(d, A, 1) ^ t[c + 1];
|
|
1887
1887
|
for (let v = 0; v < 50; v += 10)
|
|
1888
|
-
e[a + v] ^=
|
|
1888
|
+
e[a + v] ^= f, e[a + v + 1] ^= u;
|
|
1889
1889
|
}
|
|
1890
1890
|
let s = e[2], i = e[3];
|
|
1891
1891
|
for (let a = 0; a < 24; a++) {
|
|
1892
|
-
const c = ur[a], l = gt(s, i, c), d = vt(s, i, c),
|
|
1893
|
-
s = e[
|
|
1892
|
+
const c = ur[a], l = gt(s, i, c), d = vt(s, i, c), A = fr[a];
|
|
1893
|
+
s = e[A], i = e[A + 1], e[A] = l, e[A + 1] = d;
|
|
1894
1894
|
}
|
|
1895
1895
|
for (let a = 0; a < 50; a += 10) {
|
|
1896
1896
|
for (let c = 0; c < 10; c++)
|
|
@@ -1898,7 +1898,7 @@ function so(e, n = 24) {
|
|
|
1898
1898
|
for (let c = 0; c < 10; c++)
|
|
1899
1899
|
e[a + c] ^= ~t[(c + 2) % 10] & t[(c + 4) % 10];
|
|
1900
1900
|
}
|
|
1901
|
-
e[0] ^=
|
|
1901
|
+
e[0] ^= no[r], e[1] ^= to[r];
|
|
1902
1902
|
}
|
|
1903
1903
|
Xe(t);
|
|
1904
1904
|
}
|
|
@@ -1907,13 +1907,13 @@ class Hn extends sr {
|
|
|
1907
1907
|
constructor(n, t, r, s = !1, i = 24) {
|
|
1908
1908
|
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, lt(r), !(0 < n && n < 200))
|
|
1909
1909
|
throw new Error("only keccak-f1600 function is supported");
|
|
1910
|
-
this.state = new Uint8Array(200), this.state32 =
|
|
1910
|
+
this.state = new Uint8Array(200), this.state32 = wi(this.state);
|
|
1911
1911
|
}
|
|
1912
1912
|
clone() {
|
|
1913
1913
|
return this._cloneInto();
|
|
1914
1914
|
}
|
|
1915
1915
|
keccak() {
|
|
1916
|
-
dt(this.state32),
|
|
1916
|
+
dt(this.state32), ro(this.state32, this.rounds), dt(this.state32), this.posOut = 0, this.pos = 0;
|
|
1917
1917
|
}
|
|
1918
1918
|
update(n) {
|
|
1919
1919
|
$e(this), n = Dn(n), Ve(n);
|
|
@@ -1967,52 +1967,52 @@ class Hn extends sr {
|
|
|
1967
1967
|
return n || (n = new Hn(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;
|
|
1968
1968
|
}
|
|
1969
1969
|
}
|
|
1970
|
-
const
|
|
1971
|
-
function
|
|
1972
|
-
return
|
|
1970
|
+
const so = (e, n, t) => ir(() => new Hn(n, e, t)), io = so(1, 136, 256 / 8);
|
|
1971
|
+
function oo(e, n) {
|
|
1972
|
+
return io(Te(e, { strict: !1 }) ? Kt(e) : e);
|
|
1973
1973
|
}
|
|
1974
1974
|
const vn = /* @__PURE__ */ new Ar(8192);
|
|
1975
|
-
function
|
|
1975
|
+
function co(e, n) {
|
|
1976
1976
|
if (vn.has(`${e}.${n}`))
|
|
1977
1977
|
return vn.get(`${e}.${n}`);
|
|
1978
|
-
const t = e.substring(2).toLowerCase(), r =
|
|
1978
|
+
const t = e.substring(2).toLowerCase(), r = oo(qt(t)), s = t.split("");
|
|
1979
1979
|
for (let a = 0; a < 40; a += 2)
|
|
1980
1980
|
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());
|
|
1981
1981
|
const i = `0x${s.join("")}`;
|
|
1982
1982
|
return vn.set(`${e}.${n}`, i), i;
|
|
1983
1983
|
}
|
|
1984
|
-
const
|
|
1984
|
+
const ao = /^0x[a-fA-F0-9]{40}$/, mn = /* @__PURE__ */ new Ar(8192);
|
|
1985
1985
|
function $(e, n) {
|
|
1986
1986
|
const { strict: t = !0 } = n ?? {}, r = `${e}.${t}`;
|
|
1987
1987
|
if (mn.has(r))
|
|
1988
1988
|
return mn.get(r);
|
|
1989
|
-
const s =
|
|
1989
|
+
const s = ao.test(e) ? e.toLowerCase() === e ? !0 : t ? co(e) === e : !0 : !1;
|
|
1990
1990
|
return mn.set(r, s), s;
|
|
1991
1991
|
}
|
|
1992
|
-
function
|
|
1993
|
-
return Te(e, { strict: !1 }) ?
|
|
1992
|
+
function lo(e, n, t, { strict: r } = {}) {
|
|
1993
|
+
return Te(e, { strict: !1 }) ? fo(e, n, t, {
|
|
1994
1994
|
strict: r
|
|
1995
|
-
}) :
|
|
1995
|
+
}) : Ao(e, n, t, {
|
|
1996
1996
|
strict: r
|
|
1997
1997
|
});
|
|
1998
1998
|
}
|
|
1999
1999
|
function mr(e, n, t) {
|
|
2000
2000
|
if (be(e) !== t - n)
|
|
2001
|
-
throw new
|
|
2001
|
+
throw new Js({
|
|
2002
2002
|
offset: t,
|
|
2003
2003
|
position: "end",
|
|
2004
2004
|
size: be(e)
|
|
2005
2005
|
});
|
|
2006
2006
|
}
|
|
2007
|
-
function
|
|
2007
|
+
function Ao(e, n, t, { strict: r } = {}) {
|
|
2008
2008
|
const s = e.slice(n, t);
|
|
2009
2009
|
return r && mr(s, n, t), s;
|
|
2010
2010
|
}
|
|
2011
|
-
function
|
|
2011
|
+
function fo(e, n, t, { strict: r } = {}) {
|
|
2012
2012
|
const s = `0x${e.replace("0x", "").slice(n * 2, t * 2)}`;
|
|
2013
2013
|
return r && mr(s, n, t), s;
|
|
2014
2014
|
}
|
|
2015
|
-
function
|
|
2015
|
+
function uo(e) {
|
|
2016
2016
|
const { authorizationList: n } = e;
|
|
2017
2017
|
if (n)
|
|
2018
2018
|
for (const t of n) {
|
|
@@ -2024,17 +2024,17 @@ function go(e) {
|
|
|
2024
2024
|
}
|
|
2025
2025
|
Qn(e);
|
|
2026
2026
|
}
|
|
2027
|
-
function
|
|
2027
|
+
function go(e) {
|
|
2028
2028
|
const { blobVersionedHashes: n } = e;
|
|
2029
2029
|
if (n) {
|
|
2030
2030
|
if (n.length === 0)
|
|
2031
2031
|
throw new lr();
|
|
2032
2032
|
for (const t of n) {
|
|
2033
|
-
const r = be(t), s = _e(
|
|
2033
|
+
const r = be(t), s = _e(lo(t, 0, 1));
|
|
2034
2034
|
if (r !== 32)
|
|
2035
|
-
throw new
|
|
2035
|
+
throw new Qi({ hash: t, size: r });
|
|
2036
2036
|
if (s !== ar)
|
|
2037
|
-
throw new
|
|
2037
|
+
throw new Ki({
|
|
2038
2038
|
hash: t,
|
|
2039
2039
|
version: s
|
|
2040
2040
|
});
|
|
@@ -2053,7 +2053,7 @@ function Qn(e) {
|
|
|
2053
2053
|
if (t && r && t > r)
|
|
2054
2054
|
throw new Ne({ maxFeePerGas: r, maxPriorityFeePerGas: t });
|
|
2055
2055
|
}
|
|
2056
|
-
function
|
|
2056
|
+
function vo(e) {
|
|
2057
2057
|
const { chainId: n, maxPriorityFeePerGas: t, gasPrice: r, maxFeePerGas: s, to: i } = e;
|
|
2058
2058
|
if (n <= 0)
|
|
2059
2059
|
throw new on({ chainId: n });
|
|
@@ -2064,7 +2064,7 @@ function mo(e) {
|
|
|
2064
2064
|
if (r && r > sn)
|
|
2065
2065
|
throw new Ae({ maxFeePerGas: r });
|
|
2066
2066
|
}
|
|
2067
|
-
function
|
|
2067
|
+
function mo(e) {
|
|
2068
2068
|
const { chainId: n, maxPriorityFeePerGas: t, gasPrice: r, maxFeePerGas: s, to: i } = e;
|
|
2069
2069
|
if (i && !$(i))
|
|
2070
2070
|
throw new _({ address: i });
|
|
@@ -2075,7 +2075,7 @@ function po(e) {
|
|
|
2075
2075
|
if (r && r > sn)
|
|
2076
2076
|
throw new Ae({ maxFeePerGas: r });
|
|
2077
2077
|
}
|
|
2078
|
-
function
|
|
2078
|
+
function po(e) {
|
|
2079
2079
|
if (e.type)
|
|
2080
2080
|
return e.type;
|
|
2081
2081
|
if (typeof e.authorizationList < "u")
|
|
@@ -2086,7 +2086,7 @@ function Co(e) {
|
|
|
2086
2086
|
return "eip1559";
|
|
2087
2087
|
if (typeof e.gasPrice < "u")
|
|
2088
2088
|
return typeof e.accessList < "u" ? "eip2930" : "legacy";
|
|
2089
|
-
throw new
|
|
2089
|
+
throw new xi({ transaction: e });
|
|
2090
2090
|
}
|
|
2091
2091
|
function cn(e) {
|
|
2092
2092
|
if (!e || e.length === 0)
|
|
@@ -2096,21 +2096,21 @@ function cn(e) {
|
|
|
2096
2096
|
const { address: r, storageKeys: s } = e[t];
|
|
2097
2097
|
for (let i = 0; i < s.length; i++)
|
|
2098
2098
|
if (s[i].length - 2 !== 64)
|
|
2099
|
-
throw new
|
|
2099
|
+
throw new bi({ storageKey: s[i] });
|
|
2100
2100
|
if (!$(r, { strict: !1 }))
|
|
2101
2101
|
throw new _({ address: r });
|
|
2102
2102
|
n.push([r, s]);
|
|
2103
2103
|
}
|
|
2104
2104
|
return n;
|
|
2105
2105
|
}
|
|
2106
|
-
function
|
|
2107
|
-
const t =
|
|
2108
|
-
return t === "eip1559" ?
|
|
2106
|
+
function Co(e, n) {
|
|
2107
|
+
const t = po(e);
|
|
2108
|
+
return t === "eip1559" ? zo(e, n) : t === "eip2930" ? Io(e, n) : t === "eip4844" ? bo(e, n) : t === "eip7702" ? xo(e, n) : wo(e, n);
|
|
2109
2109
|
}
|
|
2110
|
-
function
|
|
2111
|
-
const { authorizationList: t, chainId: r, gas: s, nonce: i, to: a, value: c, maxFeePerGas: l, maxPriorityFeePerGas: d, accessList:
|
|
2112
|
-
|
|
2113
|
-
const u = cn(
|
|
2110
|
+
function xo(e, n) {
|
|
2111
|
+
const { authorizationList: t, chainId: r, gas: s, nonce: i, to: a, value: c, maxFeePerGas: l, maxPriorityFeePerGas: d, accessList: A, data: f } = e;
|
|
2112
|
+
uo(e);
|
|
2113
|
+
const u = cn(A), v = zi(t);
|
|
2114
2114
|
return Ee([
|
|
2115
2115
|
"0x04",
|
|
2116
2116
|
de([
|
|
@@ -2121,30 +2121,30 @@ function bo(e, n) {
|
|
|
2121
2121
|
s ? P(s) : "0x",
|
|
2122
2122
|
a ?? "0x",
|
|
2123
2123
|
c ? P(c) : "0x",
|
|
2124
|
-
|
|
2124
|
+
f ?? "0x",
|
|
2125
2125
|
u,
|
|
2126
2126
|
v,
|
|
2127
2127
|
...Se(e, n)
|
|
2128
2128
|
])
|
|
2129
2129
|
]);
|
|
2130
2130
|
}
|
|
2131
|
-
function
|
|
2132
|
-
const { chainId: t, gas: r, nonce: s, to: i, value: a, maxFeePerBlobGas: c, maxFeePerGas: l, maxPriorityFeePerGas: d, accessList:
|
|
2133
|
-
|
|
2131
|
+
function bo(e, n) {
|
|
2132
|
+
const { chainId: t, gas: r, nonce: s, to: i, value: a, maxFeePerBlobGas: c, maxFeePerGas: l, maxPriorityFeePerGas: d, accessList: A, data: f } = e;
|
|
2133
|
+
go(e);
|
|
2134
2134
|
let u = e.blobVersionedHashes, v = e.sidecars;
|
|
2135
2135
|
if (e.blobs && (typeof u > "u" || typeof v > "u")) {
|
|
2136
|
-
const w = typeof e.blobs[0] == "string" ? e.blobs : e.blobs.map((z) => ee(z)),
|
|
2136
|
+
const w = typeof e.blobs[0] == "string" ? e.blobs : e.blobs.map((z) => ee(z)), O = e.kzg, b = nr({
|
|
2137
2137
|
blobs: w,
|
|
2138
|
-
kzg:
|
|
2138
|
+
kzg: O
|
|
2139
2139
|
});
|
|
2140
|
-
if (typeof u > "u" && (u =
|
|
2140
|
+
if (typeof u > "u" && (u = Fi({
|
|
2141
2141
|
commitments: b
|
|
2142
2142
|
})), typeof v > "u") {
|
|
2143
|
-
const z = tr({ blobs: w, commitments: b, kzg:
|
|
2144
|
-
v =
|
|
2143
|
+
const z = tr({ blobs: w, commitments: b, kzg: O });
|
|
2144
|
+
v = Ui({ blobs: w, commitments: b, proofs: z });
|
|
2145
2145
|
}
|
|
2146
2146
|
}
|
|
2147
|
-
const m = cn(
|
|
2147
|
+
const m = cn(A), g = [
|
|
2148
2148
|
P(t),
|
|
2149
2149
|
s ? P(s) : "0x",
|
|
2150
2150
|
d ? P(d) : "0x",
|
|
@@ -2152,7 +2152,7 @@ function zo(e, n) {
|
|
|
2152
2152
|
r ? P(r) : "0x",
|
|
2153
2153
|
i ?? "0x",
|
|
2154
2154
|
a ? P(a) : "0x",
|
|
2155
|
-
|
|
2155
|
+
f ?? "0x",
|
|
2156
2156
|
m,
|
|
2157
2157
|
c ? P(c) : "0x",
|
|
2158
2158
|
u ?? [],
|
|
@@ -2160,8 +2160,8 @@ function zo(e, n) {
|
|
|
2160
2160
|
], p = [], I = [], x = [];
|
|
2161
2161
|
if (v)
|
|
2162
2162
|
for (let w = 0; w < v.length; w++) {
|
|
2163
|
-
const { blob:
|
|
2164
|
-
p.push(
|
|
2163
|
+
const { blob: O, commitment: b, proof: z } = v[w];
|
|
2164
|
+
p.push(O), I.push(b), x.push(z);
|
|
2165
2165
|
}
|
|
2166
2166
|
return Ee([
|
|
2167
2167
|
"0x03",
|
|
@@ -2169,10 +2169,10 @@ function zo(e, n) {
|
|
|
2169
2169
|
de(v ? [g, p, I, x] : g)
|
|
2170
2170
|
]);
|
|
2171
2171
|
}
|
|
2172
|
-
function
|
|
2173
|
-
const { chainId: t, gas: r, nonce: s, to: i, value: a, maxFeePerGas: c, maxPriorityFeePerGas: l, accessList: d, data:
|
|
2172
|
+
function zo(e, n) {
|
|
2173
|
+
const { chainId: t, gas: r, nonce: s, to: i, value: a, maxFeePerGas: c, maxPriorityFeePerGas: l, accessList: d, data: A } = e;
|
|
2174
2174
|
Qn(e);
|
|
2175
|
-
const
|
|
2175
|
+
const f = cn(d), u = [
|
|
2176
2176
|
P(t),
|
|
2177
2177
|
s ? P(s) : "0x",
|
|
2178
2178
|
l ? P(l) : "0x",
|
|
@@ -2180,8 +2180,8 @@ function Io(e, n) {
|
|
|
2180
2180
|
r ? P(r) : "0x",
|
|
2181
2181
|
i ?? "0x",
|
|
2182
2182
|
a ? P(a) : "0x",
|
|
2183
|
-
|
|
2184
|
-
|
|
2183
|
+
A ?? "0x",
|
|
2184
|
+
f,
|
|
2185
2185
|
...Se(e, n)
|
|
2186
2186
|
];
|
|
2187
2187
|
return Ee([
|
|
@@ -2189,10 +2189,10 @@ function Io(e, n) {
|
|
|
2189
2189
|
de(u)
|
|
2190
2190
|
]);
|
|
2191
2191
|
}
|
|
2192
|
-
function
|
|
2192
|
+
function Io(e, n) {
|
|
2193
2193
|
const { chainId: t, gas: r, data: s, nonce: i, to: a, value: c, accessList: l, gasPrice: d } = e;
|
|
2194
|
-
|
|
2195
|
-
const
|
|
2194
|
+
vo(e);
|
|
2195
|
+
const A = cn(l), f = [
|
|
2196
2196
|
P(t),
|
|
2197
2197
|
i ? P(i) : "0x",
|
|
2198
2198
|
d ? P(d) : "0x",
|
|
@@ -2200,17 +2200,17 @@ function wo(e, n) {
|
|
|
2200
2200
|
a ?? "0x",
|
|
2201
2201
|
c ? P(c) : "0x",
|
|
2202
2202
|
s ?? "0x",
|
|
2203
|
-
|
|
2203
|
+
A,
|
|
2204
2204
|
...Se(e, n)
|
|
2205
2205
|
];
|
|
2206
2206
|
return Ee([
|
|
2207
2207
|
"0x01",
|
|
2208
|
-
de(
|
|
2208
|
+
de(f)
|
|
2209
2209
|
]);
|
|
2210
2210
|
}
|
|
2211
|
-
function
|
|
2211
|
+
function wo(e, n) {
|
|
2212
2212
|
const { chainId: t = 0, gas: r, data: s, nonce: i, to: a, value: c, gasPrice: l } = e;
|
|
2213
|
-
|
|
2213
|
+
mo(e);
|
|
2214
2214
|
let d = [
|
|
2215
2215
|
i ? P(i) : "0x",
|
|
2216
2216
|
l ? P(l) : "0x",
|
|
@@ -2220,20 +2220,20 @@ function Po(e, n) {
|
|
|
2220
2220
|
s ?? "0x"
|
|
2221
2221
|
];
|
|
2222
2222
|
if (n) {
|
|
2223
|
-
const
|
|
2223
|
+
const A = (() => {
|
|
2224
2224
|
if (n.v >= 35n)
|
|
2225
2225
|
return (n.v - 35n) / 2n > 0 ? n.v : 27n + (n.v === 35n ? 0n : 1n);
|
|
2226
2226
|
if (t > 0)
|
|
2227
2227
|
return BigInt(t * 2) + BigInt(35n + n.v - 27n);
|
|
2228
2228
|
const v = 27n + (n.v === 27n ? 0n : 1n);
|
|
2229
2229
|
if (n.v !== v)
|
|
2230
|
-
throw new
|
|
2230
|
+
throw new Ci({ v: n.v });
|
|
2231
2231
|
return v;
|
|
2232
|
-
})(),
|
|
2232
|
+
})(), f = Re(n.r), u = Re(n.s);
|
|
2233
2233
|
d = [
|
|
2234
2234
|
...d,
|
|
2235
|
-
P(
|
|
2236
|
-
|
|
2235
|
+
P(A),
|
|
2236
|
+
f === "0x00" ? "0x" : f,
|
|
2237
2237
|
u === "0x00" ? "0x" : u
|
|
2238
2238
|
];
|
|
2239
2239
|
} else t > 0 && (d = [
|
|
@@ -2255,7 +2255,7 @@ function Se(e, n) {
|
|
|
2255
2255
|
const i = Re(t.r), a = Re(t.s);
|
|
2256
2256
|
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];
|
|
2257
2257
|
}
|
|
2258
|
-
const
|
|
2258
|
+
const Po = {
|
|
2259
2259
|
gasPriceOracle: { address: "0x420000000000000000000000000000000000000F" },
|
|
2260
2260
|
l1Block: { address: "0x4200000000000000000000000000000000000015" },
|
|
2261
2261
|
l2CrossDomainMessenger: {
|
|
@@ -2266,8 +2266,8 @@ const yo = {
|
|
|
2266
2266
|
l2ToL1MessagePasser: {
|
|
2267
2267
|
address: "0x4200000000000000000000000000000000000016"
|
|
2268
2268
|
}
|
|
2269
|
-
},
|
|
2270
|
-
block: /* @__PURE__ */
|
|
2269
|
+
}, yo = {
|
|
2270
|
+
block: /* @__PURE__ */ ni({
|
|
2271
2271
|
format(e) {
|
|
2272
2272
|
return {
|
|
2273
2273
|
transactions: e.transactions?.map((t) => {
|
|
@@ -2280,13 +2280,13 @@ const yo = {
|
|
|
2280
2280
|
};
|
|
2281
2281
|
}
|
|
2282
2282
|
}),
|
|
2283
|
-
transaction: /* @__PURE__ */
|
|
2283
|
+
transaction: /* @__PURE__ */ _s({
|
|
2284
2284
|
format(e) {
|
|
2285
2285
|
const n = {};
|
|
2286
2286
|
return e.type === "0x7e" && (n.isSystemTx = e.isSystemTx, n.mint = e.mint ? me(e.mint) : void 0, n.sourceHash = e.sourceHash, n.type = "deposit"), n;
|
|
2287
2287
|
}
|
|
2288
2288
|
}),
|
|
2289
|
-
transactionReceipt: /* @__PURE__ */
|
|
2289
|
+
transactionReceipt: /* @__PURE__ */ ii({
|
|
2290
2290
|
format(e) {
|
|
2291
2291
|
return {
|
|
2292
2292
|
l1GasPrice: e.l1GasPrice ? me(e.l1GasPrice) : null,
|
|
@@ -2297,14 +2297,14 @@ const yo = {
|
|
|
2297
2297
|
}
|
|
2298
2298
|
})
|
|
2299
2299
|
};
|
|
2300
|
-
function
|
|
2301
|
-
return
|
|
2300
|
+
function Bo(e, n) {
|
|
2301
|
+
return Mo(e) ? Wo(e) : Co(e, n);
|
|
2302
2302
|
}
|
|
2303
|
-
const
|
|
2304
|
-
transaction:
|
|
2303
|
+
const ho = {
|
|
2304
|
+
transaction: Bo
|
|
2305
2305
|
};
|
|
2306
|
-
function
|
|
2307
|
-
|
|
2306
|
+
function Wo(e) {
|
|
2307
|
+
Vo(e);
|
|
2308
2308
|
const { sourceHash: n, data: t, from: r, gas: s, isSystemTx: i, mint: a, to: c, value: l } = e, d = [
|
|
2309
2309
|
n,
|
|
2310
2310
|
r,
|
|
@@ -2320,10 +2320,10 @@ function Mo(e) {
|
|
|
2320
2320
|
de(d)
|
|
2321
2321
|
]);
|
|
2322
2322
|
}
|
|
2323
|
-
function
|
|
2323
|
+
function Mo(e) {
|
|
2324
2324
|
return e.type === "deposit" || typeof e.sourceHash < "u";
|
|
2325
2325
|
}
|
|
2326
|
-
function
|
|
2326
|
+
function Vo(e) {
|
|
2327
2327
|
const { from: n, to: t } = e;
|
|
2328
2328
|
if (n && !$(n))
|
|
2329
2329
|
throw new _({ address: n });
|
|
@@ -2332,9 +2332,9 @@ function Xo(e) {
|
|
|
2332
2332
|
}
|
|
2333
2333
|
const en = {
|
|
2334
2334
|
blockTime: 2e3,
|
|
2335
|
-
contracts:
|
|
2336
|
-
formatters:
|
|
2337
|
-
serializers:
|
|
2335
|
+
contracts: Po,
|
|
2336
|
+
formatters: yo,
|
|
2337
|
+
serializers: ho
|
|
2338
2338
|
}, pr = /* @__PURE__ */ se({
|
|
2339
2339
|
id: 42161,
|
|
2340
2340
|
name: "Arbitrum One",
|
|
@@ -2438,7 +2438,7 @@ const Cr = /* @__PURE__ */ se({
|
|
|
2438
2438
|
function qn(e) {
|
|
2439
2439
|
return typeof e == "string" ? { address: e, type: "json-rpc" } : e;
|
|
2440
2440
|
}
|
|
2441
|
-
class
|
|
2441
|
+
class Xo extends h {
|
|
2442
2442
|
constructor({ docsPath: n } = {}) {
|
|
2443
2443
|
super([
|
|
2444
2444
|
"Could not find an Account to execute with this Action.",
|
|
@@ -2455,7 +2455,7 @@ function mt(e) {
|
|
|
2455
2455
|
return e.reduce((n, { slot: t, value: r }) => `${n} ${t}: ${r}
|
|
2456
2456
|
`, "");
|
|
2457
2457
|
}
|
|
2458
|
-
function
|
|
2458
|
+
function No(e) {
|
|
2459
2459
|
return e.reduce((n, { address: t, ...r }) => {
|
|
2460
2460
|
let s = `${n} ${t}:
|
|
2461
2461
|
`;
|
|
@@ -2468,22 +2468,22 @@ function jo(e) {
|
|
|
2468
2468
|
}, ` State Override:
|
|
2469
2469
|
`).slice(0, -1);
|
|
2470
2470
|
}
|
|
2471
|
-
class
|
|
2472
|
-
constructor(n, { account: t, docsPath: r, chain: s, data: i, gas: a, gasPrice: c, maxFeePerGas: l, maxPriorityFeePerGas: d, nonce:
|
|
2471
|
+
class jo extends h {
|
|
2472
|
+
constructor(n, { account: t, docsPath: r, chain: s, data: i, gas: a, gasPrice: c, maxFeePerGas: l, maxPriorityFeePerGas: d, nonce: A, to: f, value: u, stateOverride: v }) {
|
|
2473
2473
|
const m = t ? qn(t) : void 0;
|
|
2474
2474
|
let g = er({
|
|
2475
2475
|
from: m?.address,
|
|
2476
|
-
to:
|
|
2477
|
-
value: typeof u < "u" && `${
|
|
2476
|
+
to: f,
|
|
2477
|
+
value: typeof u < "u" && `${mi(u)} ${s?.nativeCurrency?.symbol || "ETH"}`,
|
|
2478
2478
|
data: i,
|
|
2479
2479
|
gas: a,
|
|
2480
2480
|
gasPrice: typeof c < "u" && `${oe(c)} gwei`,
|
|
2481
2481
|
maxFeePerGas: typeof l < "u" && `${oe(l)} gwei`,
|
|
2482
2482
|
maxPriorityFeePerGas: typeof d < "u" && `${oe(d)} gwei`,
|
|
2483
|
-
nonce:
|
|
2483
|
+
nonce: A
|
|
2484
2484
|
});
|
|
2485
2485
|
v && (g += `
|
|
2486
|
-
${
|
|
2486
|
+
${No(v)}`), super(n.shortMessage, {
|
|
2487
2487
|
cause: n,
|
|
2488
2488
|
docsPath: r,
|
|
2489
2489
|
metaMessages: [
|
|
@@ -2500,7 +2500,7 @@ ${jo(v)}`), super(n.shortMessage, {
|
|
|
2500
2500
|
}), this.cause = n;
|
|
2501
2501
|
}
|
|
2502
2502
|
}
|
|
2503
|
-
function
|
|
2503
|
+
function To(e, n) {
|
|
2504
2504
|
const t = (e.details || "").toLowerCase(), r = e instanceof h ? e.walk((s) => s?.code === pe.code) : e;
|
|
2505
2505
|
return r instanceof h ? new pe({
|
|
2506
2506
|
cause: e,
|
|
@@ -2522,17 +2522,17 @@ function Eo(e, n) {
|
|
|
2522
2522
|
cause: e
|
|
2523
2523
|
});
|
|
2524
2524
|
}
|
|
2525
|
-
function
|
|
2525
|
+
function Eo(e, { docsPath: n, ...t }) {
|
|
2526
2526
|
const r = (() => {
|
|
2527
|
-
const s =
|
|
2527
|
+
const s = To(e, t);
|
|
2528
2528
|
return s instanceof dr ? e : s;
|
|
2529
2529
|
})();
|
|
2530
|
-
return new
|
|
2530
|
+
return new jo(r, {
|
|
2531
2531
|
docsPath: n,
|
|
2532
2532
|
...t
|
|
2533
2533
|
});
|
|
2534
2534
|
}
|
|
2535
|
-
function
|
|
2535
|
+
function So(e, { format: n }) {
|
|
2536
2536
|
if (!n)
|
|
2537
2537
|
return {};
|
|
2538
2538
|
const t = {};
|
|
@@ -2544,14 +2544,14 @@ function Oo(e, { format: n }) {
|
|
|
2544
2544
|
const s = n(e || {});
|
|
2545
2545
|
return r(s), t;
|
|
2546
2546
|
}
|
|
2547
|
-
function
|
|
2547
|
+
function Oo(e) {
|
|
2548
2548
|
const { account: n, gasPrice: t, maxFeePerGas: r, maxPriorityFeePerGas: s, to: i } = e, a = n ? qn(n) : void 0;
|
|
2549
2549
|
if (a && !$(a.address))
|
|
2550
2550
|
throw new _({ address: a.address });
|
|
2551
2551
|
if (i && !$(i))
|
|
2552
2552
|
throw new _({ address: i });
|
|
2553
2553
|
if (typeof t < "u" && (typeof r < "u" || typeof s < "u"))
|
|
2554
|
-
throw new
|
|
2554
|
+
throw new pi();
|
|
2555
2555
|
if (r && r > sn)
|
|
2556
2556
|
throw new Ae({ maxFeePerGas: r });
|
|
2557
2557
|
if (s && r && s > r)
|
|
@@ -2560,27 +2560,27 @@ function Lo(e) {
|
|
|
2560
2560
|
async function ko(e, n) {
|
|
2561
2561
|
const { account: t = e.account } = n;
|
|
2562
2562
|
if (!t)
|
|
2563
|
-
throw new
|
|
2563
|
+
throw new Xo();
|
|
2564
2564
|
const r = qn(t);
|
|
2565
2565
|
try {
|
|
2566
|
-
const { accessList: s, blockNumber: i, blockTag: a, data: c, gas: l, gasPrice: d, maxFeePerGas:
|
|
2567
|
-
|
|
2568
|
-
const x = e.chain?.formatters?.transactionRequest?.format,
|
|
2566
|
+
const { accessList: s, blockNumber: i, blockTag: a, data: c, gas: l, gasPrice: d, maxFeePerGas: A, maxPriorityFeePerGas: f, nonce: u, to: v, value: m, ...g } = n, I = (typeof i == "bigint" ? P(i) : void 0) || a;
|
|
2567
|
+
Oo(n);
|
|
2568
|
+
const x = e.chain?.formatters?.transactionRequest?.format, O = (x || ci)({
|
|
2569
2569
|
// Pick out extra data that might exist on the chain's transaction request type.
|
|
2570
|
-
...
|
|
2570
|
+
...So(g, { format: x }),
|
|
2571
2571
|
from: r?.address,
|
|
2572
2572
|
accessList: s,
|
|
2573
2573
|
data: c,
|
|
2574
2574
|
gas: l,
|
|
2575
2575
|
gasPrice: d,
|
|
2576
|
-
maxFeePerGas:
|
|
2577
|
-
maxPriorityFeePerGas:
|
|
2576
|
+
maxFeePerGas: A,
|
|
2577
|
+
maxPriorityFeePerGas: f,
|
|
2578
2578
|
nonce: u,
|
|
2579
2579
|
to: v,
|
|
2580
2580
|
value: m
|
|
2581
2581
|
}, "estimateGas"), { baseFeePerGas: b, gasLimit: z, priorityFeePerGas: W } = await e.request({
|
|
2582
2582
|
method: "linea_estimateGas",
|
|
2583
|
-
params: I ? [
|
|
2583
|
+
params: I ? [O, I] : [O]
|
|
2584
2584
|
});
|
|
2585
2585
|
return {
|
|
2586
2586
|
baseFeePerGas: BigInt(b),
|
|
@@ -2588,14 +2588,14 @@ async function ko(e, n) {
|
|
|
2588
2588
|
priorityFeePerGas: BigInt(W)
|
|
2589
2589
|
};
|
|
2590
2590
|
} catch (s) {
|
|
2591
|
-
throw
|
|
2591
|
+
throw Eo(s, {
|
|
2592
2592
|
...n,
|
|
2593
2593
|
account: r,
|
|
2594
2594
|
chain: e.chain
|
|
2595
2595
|
});
|
|
2596
2596
|
}
|
|
2597
2597
|
}
|
|
2598
|
-
const
|
|
2598
|
+
const Lo = {
|
|
2599
2599
|
fees: {
|
|
2600
2600
|
estimateFeesPerGas: pt,
|
|
2601
2601
|
async maxPriorityFeePerGas({ block: e, client: n, request: t }) {
|
|
@@ -2625,7 +2625,7 @@ async function pt({ client: e, multiply: n, request: t, type: r }) {
|
|
|
2625
2625
|
}
|
|
2626
2626
|
}
|
|
2627
2627
|
const xr = /* @__PURE__ */ se({
|
|
2628
|
-
...
|
|
2628
|
+
...Lo,
|
|
2629
2629
|
id: 59144,
|
|
2630
2630
|
name: "Linea Mainnet",
|
|
2631
2631
|
nativeCurrency: { name: "Linea Ether", symbol: "ETH", decimals: 18 },
|
|
@@ -2752,7 +2752,7 @@ const xr = /* @__PURE__ */ se({
|
|
|
2752
2752
|
blockCreated: 25770160
|
|
2753
2753
|
}
|
|
2754
2754
|
}
|
|
2755
|
-
}),
|
|
2755
|
+
}), Yo = {
|
|
2756
2756
|
id: 1,
|
|
2757
2757
|
name: "Solana",
|
|
2758
2758
|
nativeCurrency: {
|
|
@@ -2769,7 +2769,7 @@ const xr = /* @__PURE__ */ se({
|
|
|
2769
2769
|
icon: rn,
|
|
2770
2770
|
name: "Solana"
|
|
2771
2771
|
}
|
|
2772
|
-
},
|
|
2772
|
+
}, Zo = {
|
|
2773
2773
|
id: 1,
|
|
2774
2774
|
name: "Aptos",
|
|
2775
2775
|
nativeCurrency: {
|
|
@@ -2786,7 +2786,7 @@ const xr = /* @__PURE__ */ se({
|
|
|
2786
2786
|
icon: tn,
|
|
2787
2787
|
name: "Aptos"
|
|
2788
2788
|
}
|
|
2789
|
-
},
|
|
2789
|
+
}, Jo = {
|
|
2790
2790
|
id: 1,
|
|
2791
2791
|
name: "Dogecoin",
|
|
2792
2792
|
nativeCurrency: {
|
|
@@ -2805,15 +2805,15 @@ const xr = /* @__PURE__ */ se({
|
|
|
2805
2805
|
}
|
|
2806
2806
|
}, Ce = {
|
|
2807
2807
|
evm: [br, Cr, zr, pr, xr, Kn, Ir],
|
|
2808
|
-
solana: [
|
|
2809
|
-
aptos: [
|
|
2810
|
-
dogecoin: [
|
|
2808
|
+
solana: [Yo],
|
|
2809
|
+
aptos: [Zo],
|
|
2810
|
+
dogecoin: [Jo]
|
|
2811
2811
|
}, wr = (e, n, t) => {
|
|
2812
2812
|
const { apiChains: r = [] } = t || {}, s = r.length > 0 ? Dt(r) : ae, i = [], a = e?.aptos || [];
|
|
2813
|
-
a.length > 0 ? a.forEach((
|
|
2813
|
+
a.length > 0 ? a.forEach((f) => {
|
|
2814
2814
|
const u = r.find((v) => H(v.chainId) === "aptos");
|
|
2815
2815
|
i.push({
|
|
2816
|
-
...
|
|
2816
|
+
...f,
|
|
2817
2817
|
chainId: u?.chainId || "aptos:1",
|
|
2818
2818
|
chainInfo: {
|
|
2819
2819
|
icon: q?.aptos?.icon || null,
|
|
@@ -2827,61 +2827,61 @@ const xr = /* @__PURE__ */ se({
|
|
|
2827
2827
|
blockExplorers: u?.blockExplorers,
|
|
2828
2828
|
contracts: u?.contracts
|
|
2829
2829
|
});
|
|
2830
|
-
}) : r.length > 0 && r.filter((
|
|
2830
|
+
}) : r.length > 0 && r.filter((f) => H(f.chainId) === "aptos").forEach((f) => {
|
|
2831
2831
|
i.push({
|
|
2832
|
-
...
|
|
2832
|
+
...f,
|
|
2833
2833
|
chainType: "aptos",
|
|
2834
2834
|
chainInfo: {
|
|
2835
|
-
icon:
|
|
2836
|
-
name:
|
|
2835
|
+
icon: f.icon,
|
|
2836
|
+
name: f.name,
|
|
2837
2837
|
chainType: "aptos"
|
|
2838
2838
|
},
|
|
2839
2839
|
provider: n?.aptos || null
|
|
2840
2840
|
});
|
|
2841
2841
|
});
|
|
2842
2842
|
const c = e?.evm || Ce?.evm || [];
|
|
2843
|
-
c.length > 0 ? c.forEach((
|
|
2844
|
-
const u = `eip155:${
|
|
2843
|
+
c.length > 0 ? c.forEach((f) => {
|
|
2844
|
+
const u = `eip155:${f.id}`, v = r.find((x) => x.chainId === u), m = `evm_${f.id}`, g = s[m] || ae[m], p = v?.icon || (typeof g == "string" ? g : null), I = v?.rpcUrls || {
|
|
2845
2845
|
default: {
|
|
2846
|
-
http: Array.isArray(
|
|
2847
|
-
webSocket:
|
|
2846
|
+
http: Array.isArray(f.rpcUrls?.default?.http) ? [...f.rpcUrls.default.http] : [],
|
|
2847
|
+
webSocket: f.rpcUrls?.default?.webSocket ? [...f.rpcUrls.default.webSocket] : void 0
|
|
2848
2848
|
}
|
|
2849
2849
|
};
|
|
2850
2850
|
i.push({
|
|
2851
2851
|
...v,
|
|
2852
|
-
...
|
|
2852
|
+
...f,
|
|
2853
2853
|
chainId: u,
|
|
2854
2854
|
icon: p || "",
|
|
2855
2855
|
chainInfo: {
|
|
2856
2856
|
icon: p || null,
|
|
2857
|
-
name: v?.name ||
|
|
2857
|
+
name: v?.name || f.name || q?.evm?.name,
|
|
2858
2858
|
chainType: "evm"
|
|
2859
2859
|
},
|
|
2860
2860
|
chainType: "evm",
|
|
2861
2861
|
provider: n?.evm || null,
|
|
2862
|
-
nativeCurrency: v?.nativeCurrency ||
|
|
2862
|
+
nativeCurrency: v?.nativeCurrency || f.nativeCurrency,
|
|
2863
2863
|
rpcUrls: I,
|
|
2864
|
-
blockExplorers: v?.blockExplorers ||
|
|
2865
|
-
contracts: v?.contracts ||
|
|
2866
|
-
blockTime: v?.blockTime ||
|
|
2864
|
+
blockExplorers: v?.blockExplorers || f.blockExplorers,
|
|
2865
|
+
contracts: v?.contracts || f.contracts,
|
|
2866
|
+
blockTime: v?.blockTime || f.blockTime
|
|
2867
2867
|
});
|
|
2868
|
-
}) : r.length > 0 && r.filter((
|
|
2868
|
+
}) : r.length > 0 && r.filter((f) => H(f.chainId) === "evm").forEach((f) => {
|
|
2869
2869
|
i.push({
|
|
2870
|
-
...
|
|
2870
|
+
...f,
|
|
2871
2871
|
chainType: "evm",
|
|
2872
2872
|
chainInfo: {
|
|
2873
|
-
icon:
|
|
2874
|
-
name:
|
|
2873
|
+
icon: f.icon,
|
|
2874
|
+
name: f.name,
|
|
2875
2875
|
chainType: "evm"
|
|
2876
2876
|
},
|
|
2877
2877
|
provider: n?.evm || null
|
|
2878
2878
|
});
|
|
2879
2879
|
});
|
|
2880
2880
|
const l = e?.solana || [];
|
|
2881
|
-
l.length > 0 ? l.forEach((
|
|
2881
|
+
l.length > 0 ? l.forEach((f) => {
|
|
2882
2882
|
const u = r.find((v) => H(v.chainId) === "solana");
|
|
2883
2883
|
i.push({
|
|
2884
|
-
...
|
|
2884
|
+
...f,
|
|
2885
2885
|
chainId: u?.chainId || "solana:mainnet-beta",
|
|
2886
2886
|
chainInfo: {
|
|
2887
2887
|
icon: u?.icon || q?.solana?.icon || null,
|
|
@@ -2895,23 +2895,23 @@ const xr = /* @__PURE__ */ se({
|
|
|
2895
2895
|
blockExplorers: u?.blockExplorers,
|
|
2896
2896
|
contracts: u?.contracts
|
|
2897
2897
|
});
|
|
2898
|
-
}) : r.length > 0 && r.filter((
|
|
2898
|
+
}) : r.length > 0 && r.filter((f) => H(f.chainId) === "solana").forEach((f) => {
|
|
2899
2899
|
i.push({
|
|
2900
|
-
...
|
|
2900
|
+
...f,
|
|
2901
2901
|
chainType: "solana",
|
|
2902
2902
|
chainInfo: {
|
|
2903
|
-
icon:
|
|
2904
|
-
name:
|
|
2903
|
+
icon: f.icon,
|
|
2904
|
+
name: f.name,
|
|
2905
2905
|
chainType: "solana"
|
|
2906
2906
|
},
|
|
2907
2907
|
provider: n?.solana || null
|
|
2908
2908
|
});
|
|
2909
2909
|
});
|
|
2910
2910
|
const d = e?.dogecoin || [];
|
|
2911
|
-
return d.length > 0 ? d.forEach((
|
|
2911
|
+
return d.length > 0 ? d.forEach((f) => {
|
|
2912
2912
|
const u = r.find((v) => H(v.chainId) === "dogecoin");
|
|
2913
2913
|
i.push({
|
|
2914
|
-
...
|
|
2914
|
+
...f,
|
|
2915
2915
|
chainId: u?.chainId || "dogecoin:mainnet",
|
|
2916
2916
|
chainInfo: {
|
|
2917
2917
|
icon: u?.icon || q?.dogecoin?.icon || null,
|
|
@@ -2925,21 +2925,21 @@ const xr = /* @__PURE__ */ se({
|
|
|
2925
2925
|
blockExplorers: u?.blockExplorers,
|
|
2926
2926
|
contracts: u?.contracts
|
|
2927
2927
|
});
|
|
2928
|
-
}) : r.length > 0 && r.filter((
|
|
2928
|
+
}) : r.length > 0 && r.filter((f) => H(f.chainId) === "dogecoin").forEach((f) => {
|
|
2929
2929
|
i.push({
|
|
2930
|
-
...
|
|
2930
|
+
...f,
|
|
2931
2931
|
chainType: "dogecoin",
|
|
2932
2932
|
chainInfo: {
|
|
2933
|
-
icon:
|
|
2934
|
-
name:
|
|
2933
|
+
icon: f.icon,
|
|
2934
|
+
name: f.name,
|
|
2935
2935
|
chainType: "dogecoin"
|
|
2936
2936
|
},
|
|
2937
2937
|
provider: n?.dogecoin || null
|
|
2938
2938
|
});
|
|
2939
|
-
}), i.filter((
|
|
2939
|
+
}), i.filter((f) => f.chainId !== "solana:mainnet-beta" && f.chainId !== "aptos:1");
|
|
2940
2940
|
};
|
|
2941
|
-
var
|
|
2942
|
-
const
|
|
2941
|
+
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 || {});
|
|
2942
|
+
const Do = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton: s }) => {
|
|
2943
2943
|
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(Wt, {}) }) : null, [n]);
|
|
2944
2944
|
return /* @__PURE__ */ C("div", { className: "flex items-center justify-between px-0 py-3", children: [
|
|
2945
2945
|
i,
|
|
@@ -2957,12 +2957,12 @@ const Fo = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
2957
2957
|
headerRightContent: s,
|
|
2958
2958
|
hideCloseButton: i
|
|
2959
2959
|
}) => {
|
|
2960
|
-
const a =
|
|
2960
|
+
const a = V(X);
|
|
2961
2961
|
if (!a)
|
|
2962
2962
|
throw new Error("WalletConnectContext not found");
|
|
2963
2963
|
return /* @__PURE__ */ C("div", { className: "flex flex-col gap-3 min-h-0 flex-1", children: [
|
|
2964
2964
|
/* @__PURE__ */ o(
|
|
2965
|
-
|
|
2965
|
+
Do,
|
|
2966
2966
|
{
|
|
2967
2967
|
title: n,
|
|
2968
2968
|
onBack: t,
|
|
@@ -2975,38 +2975,38 @@ const Fo = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
2975
2975
|
),
|
|
2976
2976
|
/* @__PURE__ */ o("div", { className: "flex-1 flex flex-col min-h-0", children: e })
|
|
2977
2977
|
] });
|
|
2978
|
-
},
|
|
2979
|
-
const e =
|
|
2978
|
+
}, Fo = () => {
|
|
2979
|
+
const e = V(X);
|
|
2980
2980
|
if (!e)
|
|
2981
2981
|
throw new Error("WalletConnectContext not found");
|
|
2982
|
-
const { copied: n, copy: t } =
|
|
2982
|
+
const { copied: n, copy: t } = Ln(), { chains: r } = Yt(), { account: s, disconnect: i } = e, a = s.currentWallet?.info?.name || "Wallet", c = s.currentWallet?.info?.icon, l = s.address, d = s.chainType, A = s.chainId, f = A && /^\d+$/.test(A) ? Number(A) : void 0, u = s.currentWallet, v = k(async () => {
|
|
2983
2983
|
try {
|
|
2984
2984
|
if (!l) return;
|
|
2985
2985
|
t(l);
|
|
2986
2986
|
} catch (I) {
|
|
2987
2987
|
console.error("Failed to copy address:", I);
|
|
2988
2988
|
}
|
|
2989
|
-
}, [l, t]), m = y(() => /* @__PURE__ */ o(L, { isIconOnly: !0, variant: "light", color: "default", className: "size-10", onPress: v, children: n ? /* @__PURE__ */ o(Vt, { className: "text-success size-6" }) : /* @__PURE__ */ o(
|
|
2989
|
+
}, [l, t]), m = y(() => /* @__PURE__ */ o(L, { isIconOnly: !0, variant: "light", color: "default", className: "size-10", onPress: v, children: n ? /* @__PURE__ */ o(Vt, { className: "text-success size-6" }) : /* @__PURE__ */ o(Yr, { className: "text-foreground size-4" }) }), [v, n]);
|
|
2990
2990
|
if (!u)
|
|
2991
2991
|
return null;
|
|
2992
2992
|
const g = wr(e.config?.chains, u?.connectors, {
|
|
2993
2993
|
apiChains: r
|
|
2994
2994
|
}), p = g.find((I) => {
|
|
2995
2995
|
if (I.chainType !== d) return !1;
|
|
2996
|
-
if (d === "evm" &&
|
|
2997
|
-
return I.id ===
|
|
2996
|
+
if (d === "evm" && f !== void 0)
|
|
2997
|
+
return I.id === f || I.chainId === `eip155:${f}`;
|
|
2998
2998
|
{
|
|
2999
2999
|
const x = I.chainType === s.chainType;
|
|
3000
3000
|
if (x) return x;
|
|
3001
3001
|
}
|
|
3002
|
-
return I.chainId ===
|
|
3002
|
+
return I.chainId === A;
|
|
3003
3003
|
});
|
|
3004
3004
|
return console.log("--- AccountView ---", {
|
|
3005
3005
|
account: s,
|
|
3006
3006
|
config: e.config,
|
|
3007
3007
|
chains: g,
|
|
3008
3008
|
currentChainType: d,
|
|
3009
|
-
chainNumber:
|
|
3009
|
+
chainNumber: f,
|
|
3010
3010
|
currentWallet: u,
|
|
3011
3011
|
currentChain: p
|
|
3012
3012
|
}), /* @__PURE__ */ o(
|
|
@@ -3017,8 +3017,8 @@ const Fo = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3017
3017
|
{
|
|
3018
3018
|
variant: "light",
|
|
3019
3019
|
color: "default",
|
|
3020
|
-
onPress: () => e.modal.setView(
|
|
3021
|
-
endContent: /* @__PURE__ */ o(
|
|
3020
|
+
onPress: () => e.modal.setView(M.SelectChains),
|
|
3021
|
+
endContent: /* @__PURE__ */ o(Jr, { className: "size-4" }),
|
|
3022
3022
|
children: /* @__PURE__ */ C("div", { className: "flex items-center gap-2", children: [
|
|
3023
3023
|
/* @__PURE__ */ o(
|
|
3024
3024
|
ze,
|
|
@@ -3050,7 +3050,7 @@ const Fo = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3050
3050
|
color: "default",
|
|
3051
3051
|
variant: "light",
|
|
3052
3052
|
className: "w-full",
|
|
3053
|
-
startContent: /* @__PURE__ */ o(
|
|
3053
|
+
startContent: /* @__PURE__ */ o(Zr, { className: "size-4" }),
|
|
3054
3054
|
onPress: i,
|
|
3055
3055
|
children: "Disconnect wallet"
|
|
3056
3056
|
}
|
|
@@ -3077,14 +3077,14 @@ const Fo = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3077
3077
|
n(Ct), Jt();
|
|
3078
3078
|
}
|
|
3079
3079
|
};
|
|
3080
|
-
},
|
|
3081
|
-
const e =
|
|
3080
|
+
}, Ho = () => {
|
|
3081
|
+
const e = V(X), n = e?.modal.state;
|
|
3082
3082
|
if (!e)
|
|
3083
3083
|
throw new Error("WalletConnectContext not found");
|
|
3084
3084
|
const t = n?.chainType || "evm", r = n?.chainId || "", s = n?.name || "-", i = n?.chainInfo?.icon || "", { resetWalletState: a } = Pr(), { mutate: c, isPending: l } = En({
|
|
3085
3085
|
mutationKey: ["switchWallet"],
|
|
3086
3086
|
mutationFn: async () => {
|
|
3087
|
-
a(), e.modal.setView(
|
|
3087
|
+
a(), e.modal.setView(M.WalletSearch, {
|
|
3088
3088
|
chainType: t,
|
|
3089
3089
|
chainId: r
|
|
3090
3090
|
});
|
|
@@ -3110,9 +3110,9 @@ const Fo = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3110
3110
|
] })
|
|
3111
3111
|
] }) });
|
|
3112
3112
|
}, Oe = () => {
|
|
3113
|
-
const e =
|
|
3113
|
+
const e = V(X);
|
|
3114
3114
|
return {
|
|
3115
|
-
connectWallet:
|
|
3115
|
+
connectWallet: k(
|
|
3116
3116
|
async (t, r, s = "") => {
|
|
3117
3117
|
if (!e) {
|
|
3118
3118
|
console.error("WalletConnectContext not found");
|
|
@@ -3123,7 +3123,7 @@ const Fo = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3123
3123
|
return;
|
|
3124
3124
|
}
|
|
3125
3125
|
try {
|
|
3126
|
-
e.modal.setView(t.info.name === "WalletConnect" ?
|
|
3126
|
+
e.modal.setView(t.info.name === "WalletConnect" ? M.WalletConnect : M.Connecting, {
|
|
3127
3127
|
wallet: t,
|
|
3128
3128
|
chainType: r,
|
|
3129
3129
|
chainId: s
|
|
@@ -3141,7 +3141,7 @@ const Fo = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3141
3141
|
[e?.modal.setView, e?.connect]
|
|
3142
3142
|
)
|
|
3143
3143
|
};
|
|
3144
|
-
},
|
|
3144
|
+
}, Qo = ({
|
|
3145
3145
|
iconSrc: e,
|
|
3146
3146
|
iconAlt: n,
|
|
3147
3147
|
variant: t
|
|
@@ -3158,8 +3158,8 @@ const Fo = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3158
3158
|
] }) : /* @__PURE__ */ o("div", { className: "absolute inset-0 border-4 border-success rounded-full" }),
|
|
3159
3159
|
e ? /* @__PURE__ */ o(fe, { src: e, alt: n || "Wallet", width: 64, height: 64, radius: "full", className: "relative z-10" }) : null,
|
|
3160
3160
|
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
|
|
3161
|
-
] }),
|
|
3162
|
-
const e =
|
|
3161
|
+
] }), Ko = () => {
|
|
3162
|
+
const e = V(X);
|
|
3163
3163
|
if (!e)
|
|
3164
3164
|
throw new Error("WalletConnectContext not found");
|
|
3165
3165
|
const { currentWallet: n } = e.account, { connectionStatus: t, error: r } = e.connection, { connectWallet: s } = Oe(), [i, a] = Y(!1), c = async () => {
|
|
@@ -3180,13 +3180,13 @@ const Fo = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3180
3180
|
}
|
|
3181
3181
|
}, l = () => {
|
|
3182
3182
|
e.connection.setError(""), e.modal.backView();
|
|
3183
|
-
}, d = t === "connected",
|
|
3183
|
+
}, d = t === "connected", A = !!r && t === "disconnected", f = d ? "success" : A ? "error" : "connecting", u = () => d ? /* @__PURE__ */ C("div", { className: "flex flex-col items-center gap-2", children: [
|
|
3184
3184
|
/* @__PURE__ */ o("p", { className: "text-lg font-semibold text-foreground", children: "Successfully Connected!" }),
|
|
3185
3185
|
/* @__PURE__ */ C("p", { className: "text-sm text-foreground/60", children: [
|
|
3186
3186
|
"Connected to ",
|
|
3187
3187
|
n?.info?.name || "Wallet"
|
|
3188
3188
|
] })
|
|
3189
|
-
] }) : /* @__PURE__ */ o(Bt, { children: /* @__PURE__ */ o("div", { className: "flex flex-col items-center gap-2 text-sm text-foreground/60 text-center px-4", children:
|
|
3189
|
+
] }) : /* @__PURE__ */ o(Bt, { children: /* @__PURE__ */ o("div", { className: "flex flex-col items-center gap-2 text-sm text-foreground/60 text-center px-4", children: A ? /* @__PURE__ */ o(xt, { error: r, title: "Connection Failed" }) : /* @__PURE__ */ o(
|
|
3190
3190
|
xt,
|
|
3191
3191
|
{
|
|
3192
3192
|
error: `Open the ${n?.info?.name || "Wallet"} browser extension to connect your wallet.`,
|
|
@@ -3194,9 +3194,9 @@ const Fo = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3194
3194
|
}
|
|
3195
3195
|
) }) });
|
|
3196
3196
|
return /* @__PURE__ */ o(F, { 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: [
|
|
3197
|
-
/* @__PURE__ */ o(
|
|
3197
|
+
/* @__PURE__ */ o(Qo, { iconSrc: n?.info?.icon, iconAlt: n?.info?.name, variant: f }),
|
|
3198
3198
|
u(),
|
|
3199
|
-
|
|
3199
|
+
A ? /* @__PURE__ */ o("div", { className: "w-full px-4", children: /* @__PURE__ */ o(
|
|
3200
3200
|
L,
|
|
3201
3201
|
{
|
|
3202
3202
|
isDisabled: i,
|
|
@@ -3222,8 +3222,8 @@ const Fo = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3222
3222
|
}, xt = ({ 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: [
|
|
3223
3223
|
/* @__PURE__ */ o("p", { className: "text-lg font-semibold text-foreground", children: n }),
|
|
3224
3224
|
/* @__PURE__ */ o("p", { children: e })
|
|
3225
|
-
] }),
|
|
3226
|
-
const e =
|
|
3225
|
+
] }), qo = () => {
|
|
3226
|
+
const e = V(X);
|
|
3227
3227
|
if (!e)
|
|
3228
3228
|
throw new Error("WalletConnectContext not found");
|
|
3229
3229
|
const { error: n } = e.connection;
|
|
@@ -3232,16 +3232,16 @@ const Fo = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3232
3232
|
/* @__PURE__ */ o("p", { className: "text-lg font-semibold mb-2 text-danger", children: "Connection Failed" }),
|
|
3233
3233
|
/* @__PURE__ */ o("p", { className: "text-sm text-gray-600 dark:text-gray-400 mb-6 text-center", children: n }),
|
|
3234
3234
|
/* @__PURE__ */ o(L, { variant: "solid", color: "primary", onPress: () => {
|
|
3235
|
-
e.connection.setError(""), e.modal.setView(
|
|
3235
|
+
e.connection.setError(""), e.modal.setView(M.Connecting);
|
|
3236
3236
|
}, children: "Try Again" })
|
|
3237
3237
|
] });
|
|
3238
|
-
},
|
|
3238
|
+
}, Uo = (e, n, t) => {
|
|
3239
3239
|
e = e / 360, n = n / 100, t = t / 100;
|
|
3240
3240
|
let r, s, i;
|
|
3241
3241
|
if (n === 0)
|
|
3242
3242
|
r = s = i = t;
|
|
3243
3243
|
else {
|
|
3244
|
-
const c = (
|
|
3244
|
+
const c = (A, f, u) => (u < 0 && (u += 1), u > 1 && (u -= 1), u < 0.16666666666666666 ? A + (f - A) * 6 * u : u < 0.5 ? f : u < 0.6666666666666666 ? A + (f - A) * (0.6666666666666666 - u) * 6 : A), l = t < 0.5 ? t * (1 + n) : t + n - t * n, d = 2 * t - l;
|
|
3245
3245
|
r = c(d, l, e + 1 / 3), s = c(d, l, e), i = c(d, l, e - 1 / 3);
|
|
3246
3246
|
}
|
|
3247
3247
|
const a = (c) => {
|
|
@@ -3249,20 +3249,20 @@ const Fo = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3249
3249
|
return l.length === 1 ? `0${l}` : l;
|
|
3250
3250
|
};
|
|
3251
3251
|
return `#${a(r)}${a(s)}${a(i)}`.toUpperCase();
|
|
3252
|
-
},
|
|
3252
|
+
}, Go = (e, n = "#FCD436") => {
|
|
3253
3253
|
const t = e.trim();
|
|
3254
3254
|
if (t.startsWith("#"))
|
|
3255
3255
|
return t.toUpperCase();
|
|
3256
3256
|
const r = t.match(/(?:hsl\()?([0-9.]+)(?:deg)?,?\s+([0-9.]+)%,?\s+([0-9.]+)%\)?/);
|
|
3257
3257
|
if (r) {
|
|
3258
3258
|
const [, i, a, c] = r;
|
|
3259
|
-
return
|
|
3259
|
+
return Uo(parseFloat(i), parseFloat(a), parseFloat(c));
|
|
3260
3260
|
}
|
|
3261
3261
|
const s = t.match(/(?:rgb\()?([0-9]+),?\s+([0-9]+),?\s+([0-9]+)\)?/);
|
|
3262
3262
|
if (s) {
|
|
3263
3263
|
const [, i, a, c] = s, l = (d) => {
|
|
3264
|
-
const
|
|
3265
|
-
return
|
|
3264
|
+
const A = parseInt(d, 10).toString(16);
|
|
3265
|
+
return A.length === 1 ? `0${A}` : A;
|
|
3266
3266
|
};
|
|
3267
3267
|
return `#${l(i)}${l(a)}${l(c)}`.toUpperCase();
|
|
3268
3268
|
}
|
|
@@ -3295,7 +3295,7 @@ const Fo = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3295
3295
|
return J(() => {
|
|
3296
3296
|
if (s.current) {
|
|
3297
3297
|
const l = getComputedStyle(s.current), d = l.getPropertyValue("--heroui-primary").trim() || l.getPropertyValue("--primary").trim() || "#FCD436";
|
|
3298
|
-
c(
|
|
3298
|
+
c(Go(d));
|
|
3299
3299
|
}
|
|
3300
3300
|
}, []), J(() => {
|
|
3301
3301
|
if (!e || !s.current)
|
|
@@ -3332,16 +3332,16 @@ const Fo = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3332
3332
|
if (i.current)
|
|
3333
3333
|
i.current.update(d);
|
|
3334
3334
|
else {
|
|
3335
|
-
const
|
|
3336
|
-
i.current =
|
|
3335
|
+
const f = new As(d);
|
|
3336
|
+
i.current = f, l.innerHTML = "", f.append(l);
|
|
3337
3337
|
}
|
|
3338
|
-
const
|
|
3338
|
+
const A = l;
|
|
3339
3339
|
return () => {
|
|
3340
|
-
|
|
3340
|
+
A && i.current && (A.innerHTML = "", i.current = null);
|
|
3341
3341
|
};
|
|
3342
|
-
}, [e, n, t, r, a]), /* @__PURE__ */ o(
|
|
3343
|
-
},
|
|
3344
|
-
const { copy: c, copied: l } =
|
|
3342
|
+
}, [e, n, t, r, a]), /* @__PURE__ */ o(Dr, { 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 }) }) });
|
|
3343
|
+
}, Ro = ({ isOpen: e, onClose: n, onBack: t, url: r, logo: s, logoBackground: i, title: a }) => {
|
|
3344
|
+
const { copy: c, copied: l } = Ln();
|
|
3345
3345
|
return /* @__PURE__ */ o(Xt, { isOpen: e, onClose: n, onBack: t, title: a, children: /* @__PURE__ */ C("div", { className: "flex flex-col items-center justify-center px-5 pb-6 gap-4", children: [
|
|
3346
3346
|
/* @__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." }),
|
|
3347
3347
|
/* @__PURE__ */ o(Br, { content: r, logo: s, logoBackground: i }),
|
|
@@ -3349,24 +3349,24 @@ const Fo = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3349
3349
|
c(r);
|
|
3350
3350
|
}, children: l ? "Copied!" : "Copy Link" })
|
|
3351
3351
|
] }) });
|
|
3352
|
-
},
|
|
3352
|
+
}, _o = () => {
|
|
3353
3353
|
if (typeof window > "u") return "other";
|
|
3354
3354
|
const e = window.navigator.userAgent.toLowerCase();
|
|
3355
3355
|
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";
|
|
3356
|
-
},
|
|
3356
|
+
}, $o = () => {
|
|
3357
3357
|
if (typeof window > "u") return "desktop";
|
|
3358
3358
|
const e = window.navigator.userAgent.toLowerCase();
|
|
3359
3359
|
return /iphone|ipad|ipod/.test(e) ? "ios" : /android/.test(e) ? "android" : "desktop";
|
|
3360
|
-
},
|
|
3360
|
+
}, ec = (e) => {
|
|
3361
3361
|
if (!e) return null;
|
|
3362
|
-
const n =
|
|
3362
|
+
const n = $o(), t = _o();
|
|
3363
3363
|
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;
|
|
3364
|
-
},
|
|
3364
|
+
}, nc = (e) => {
|
|
3365
3365
|
if (!e) return [];
|
|
3366
3366
|
const n = [];
|
|
3367
3367
|
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;
|
|
3368
|
-
},
|
|
3369
|
-
const e =
|
|
3368
|
+
}, tc = () => {
|
|
3369
|
+
const e = V(X);
|
|
3370
3370
|
if (!e)
|
|
3371
3371
|
throw new Error("WalletConnectContext not found");
|
|
3372
3372
|
const { currentWallet: n } = e.account, t = ce(!1);
|
|
@@ -3374,17 +3374,17 @@ const Fo = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3374
3374
|
!n && !t.current && (t.current = !0, e.modal.backView());
|
|
3375
3375
|
}, [e.modal, n]), !n)
|
|
3376
3376
|
return /* @__PURE__ */ o(F, { 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..." }) }) });
|
|
3377
|
-
const r = y(() => `Install ${n?.info?.name} Wallet`, [n?.info?.name]), s = y(() => n?.info, [n?.info]), i = y(() =>
|
|
3377
|
+
const r = y(() => `Install ${n?.info?.name} Wallet`, [n?.info?.name]), s = y(() => n?.info, [n?.info]), i = y(() => ec(s?.links), [s?.links]), a = y(() => nc(s?.links), [s?.links]), [c, l] = Y({
|
|
3378
3378
|
isOpen: !1,
|
|
3379
3379
|
url: ""
|
|
3380
3380
|
}), d = () => {
|
|
3381
3381
|
i && window.open(i, "_blank", "noopener,noreferrer");
|
|
3382
|
-
},
|
|
3382
|
+
}, A = (v) => {
|
|
3383
3383
|
v.label === "iOS" || v.label === "Android" ? l({
|
|
3384
3384
|
isOpen: !0,
|
|
3385
3385
|
url: v.url
|
|
3386
3386
|
}) : window.open(v.url, "_blank", "noopener,noreferrer");
|
|
3387
|
-
},
|
|
3387
|
+
}, f = () => {
|
|
3388
3388
|
l({
|
|
3389
3389
|
isOpen: !1,
|
|
3390
3390
|
url: ""
|
|
@@ -3410,16 +3410,16 @@ const Fo = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3410
3410
|
] }),
|
|
3411
3411
|
a.length > 1 && /* @__PURE__ */ C("div", { className: "w-full", children: [
|
|
3412
3412
|
/* @__PURE__ */ o("p", { className: "text-xs text-foreground/60 mb-2 text-center", children: "Or download from:" }),
|
|
3413
|
-
/* @__PURE__ */ o("div", { className: "flex flex-wrap gap-2 justify-center", children: a.map((v, m) => /* @__PURE__ */ o(L, { variant: "bordered", size: "sm", onPress: () =>
|
|
3413
|
+
/* @__PURE__ */ o("div", { className: "flex flex-wrap gap-2 justify-center", children: a.map((v, m) => /* @__PURE__ */ o(L, { variant: "bordered", size: "sm", onPress: () => A(v), children: v.label }, m)) })
|
|
3414
3414
|
] }),
|
|
3415
3415
|
/* @__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." })
|
|
3416
3416
|
] }),
|
|
3417
3417
|
/* @__PURE__ */ o(
|
|
3418
|
-
|
|
3418
|
+
Ro,
|
|
3419
3419
|
{
|
|
3420
3420
|
title: r,
|
|
3421
3421
|
isOpen: c.isOpen,
|
|
3422
|
-
onClose:
|
|
3422
|
+
onClose: f,
|
|
3423
3423
|
onBack: u,
|
|
3424
3424
|
url: c.url,
|
|
3425
3425
|
logo: s?.icon,
|
|
@@ -3427,8 +3427,8 @@ const Fo = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3427
3427
|
}
|
|
3428
3428
|
)
|
|
3429
3429
|
] });
|
|
3430
|
-
},
|
|
3431
|
-
if (!
|
|
3430
|
+
}, rc = () => {
|
|
3431
|
+
if (!V(X))
|
|
3432
3432
|
throw new Error("WalletConnectContext not found");
|
|
3433
3433
|
return /* @__PURE__ */ o(F, { title: "Loading", children: /* @__PURE__ */ C("div", { className: "flex flex-col items-center justify-center py-12 gap-6 flex-1", children: [
|
|
3434
3434
|
/* @__PURE__ */ o(
|
|
@@ -3447,9 +3447,9 @@ const Fo = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3447
3447
|
] })
|
|
3448
3448
|
] }) });
|
|
3449
3449
|
}, hr = () => {
|
|
3450
|
-
const e =
|
|
3450
|
+
const e = V(X), { connectWallet: n } = Oe();
|
|
3451
3451
|
return {
|
|
3452
|
-
handleSelectWallet:
|
|
3452
|
+
handleSelectWallet: k(
|
|
3453
3453
|
(r, s) => {
|
|
3454
3454
|
if (!e) {
|
|
3455
3455
|
console.error("WalletConnectContext not found");
|
|
@@ -3461,11 +3461,11 @@ const Fo = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3461
3461
|
n(r, i || T.EVM);
|
|
3462
3462
|
return;
|
|
3463
3463
|
}
|
|
3464
|
-
e._setCurrentWallet(r), e.modal.setView(
|
|
3464
|
+
e._setCurrentWallet(r), e.modal.setView(M.WalletInstallGuide);
|
|
3465
3465
|
return;
|
|
3466
3466
|
}
|
|
3467
3467
|
const a = e.config?.chains || {}, c = Object.entries(r.connectors || {}).filter(
|
|
3468
|
-
([d,
|
|
3468
|
+
([d, A]) => A && a[d]
|
|
3469
3469
|
), l = c.length;
|
|
3470
3470
|
if (l === 0) {
|
|
3471
3471
|
console.warn("Wallet has no available providers:", r.info.name);
|
|
@@ -3480,7 +3480,7 @@ const Fo = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3480
3480
|
n(r, s);
|
|
3481
3481
|
return;
|
|
3482
3482
|
}
|
|
3483
|
-
e._setCurrentWallet(r), e.modal.setView(
|
|
3483
|
+
e._setCurrentWallet(r), e.modal.setView(M.WalletSelectProviders);
|
|
3484
3484
|
} else {
|
|
3485
3485
|
const d = c[0][0];
|
|
3486
3486
|
if (!d) {
|
|
@@ -3574,12 +3574,12 @@ const Fo = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3574
3574
|
privacyPolicy: re.links.privacyPolicy,
|
|
3575
3575
|
logo: "https://tomo.inc/favicon.svg"
|
|
3576
3576
|
}
|
|
3577
|
-
}, an = ht(null),
|
|
3577
|
+
}, an = ht(null), sc = ["wallets", "all"], ic = (e) => () => {
|
|
3578
3578
|
const n = e.length > 0 ? e : re.recommendedWallets || [], t = re.walletBaseUrl;
|
|
3579
3579
|
return Tt({
|
|
3580
3580
|
chainType: "all",
|
|
3581
3581
|
recommendedConnectors: n,
|
|
3582
|
-
connectorTypes: n.map((r) =>
|
|
3582
|
+
connectorTypes: n.map((r) => rs(r) ? "wagmi" : "tomo"),
|
|
3583
3583
|
options: {
|
|
3584
3584
|
baseUrl: t
|
|
3585
3585
|
}
|
|
@@ -3595,23 +3595,23 @@ const Fo = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3595
3595
|
isEmbeddedWallet: !0,
|
|
3596
3596
|
logout: async () => e.logout()
|
|
3597
3597
|
};
|
|
3598
|
-
},
|
|
3599
|
-
const r =
|
|
3600
|
-
() =>
|
|
3598
|
+
}, ke = (e, n = [], t) => {
|
|
3599
|
+
const r = V(an)?.wallet ?? null, s = t?.embeddedWallet !== void 0 ? t.embeddedWallet : r, i = y(() => n.length > 0 ? n : re.recommendedWallets || [], [n]), a = y(
|
|
3600
|
+
() => ic(i),
|
|
3601
3601
|
[i]
|
|
3602
3602
|
// Only recreate when connectors ID changes
|
|
3603
3603
|
), c = Tn({
|
|
3604
|
-
queryKey:
|
|
3604
|
+
queryKey: sc,
|
|
3605
3605
|
queryFn: a,
|
|
3606
3606
|
// Refetch on window focus to update wallet installation status
|
|
3607
3607
|
refetchOnWindowFocus: !0
|
|
3608
3608
|
}), l = y(() => s ? Vr(s) : null, [s]), d = y(() => {
|
|
3609
3609
|
if (!c.data)
|
|
3610
3610
|
return;
|
|
3611
|
-
const
|
|
3612
|
-
return l && (
|
|
3613
|
-
all: It(
|
|
3614
|
-
recommended: It(
|
|
3611
|
+
const A = Array.isArray(c.data.all) ? [...c.data.all] : [], f = Array.isArray(c.data.recommoned) ? [...c.data.recommoned] : [];
|
|
3612
|
+
return l && (A.some((v) => v.info.uuid === l.info.uuid) || (A.push(l), f.push(l))), {
|
|
3613
|
+
all: It(A, e),
|
|
3614
|
+
recommended: It(f, e)
|
|
3615
3615
|
};
|
|
3616
3616
|
}, [c.data, l, e]);
|
|
3617
3617
|
return {
|
|
@@ -3620,11 +3620,11 @@ const Fo = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3620
3620
|
embeddedWalletConnector: l
|
|
3621
3621
|
};
|
|
3622
3622
|
}, Un = ({ extendContent: e }) => {
|
|
3623
|
-
const n =
|
|
3623
|
+
const n = V(X);
|
|
3624
3624
|
if (!n) return null;
|
|
3625
3625
|
const { config: t } = n, { links: r } = t;
|
|
3626
3626
|
return r ? /* @__PURE__ */ C("div", { className: "flex flex-col gap-2", children: [
|
|
3627
|
-
e || /* @__PURE__ */ o(
|
|
3627
|
+
e || /* @__PURE__ */ o(oc, {}),
|
|
3628
3628
|
/* @__PURE__ */ C(
|
|
3629
3629
|
Ue,
|
|
3630
3630
|
{
|
|
@@ -3635,13 +3635,13 @@ const Fo = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3635
3635
|
children: [
|
|
3636
3636
|
/* @__PURE__ */ o("span", { children: "Powered by" }),
|
|
3637
3637
|
r.logo && /* @__PURE__ */ o("img", { src: r.logo, alt: "logo", className: "w-4 h-4" }),
|
|
3638
|
-
!r.logo && /* @__PURE__ */ o(
|
|
3638
|
+
!r.logo && /* @__PURE__ */ o(Fr, {})
|
|
3639
3639
|
]
|
|
3640
3640
|
}
|
|
3641
3641
|
)
|
|
3642
3642
|
] }) : null;
|
|
3643
|
-
},
|
|
3644
|
-
const e =
|
|
3643
|
+
}, oc = () => {
|
|
3644
|
+
const e = V(X);
|
|
3645
3645
|
if (!e) return null;
|
|
3646
3646
|
const { config: n } = e, { links: t } = n;
|
|
3647
3647
|
return t ? /* @__PURE__ */ C("div", { className: "text-xs text-[#A9A29D] text-center", children: [
|
|
@@ -3657,13 +3657,13 @@ const Fo = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3657
3657
|
"."
|
|
3658
3658
|
] })
|
|
3659
3659
|
] }) : null;
|
|
3660
|
-
},
|
|
3660
|
+
}, cc = ({ wallet: e, onSelectWallet: n }) => {
|
|
3661
3661
|
const { info: t, isInstalled: r } = e, s = y(() => {
|
|
3662
3662
|
if (!r) return null;
|
|
3663
3663
|
const i = t?.uuid === "walletConnect";
|
|
3664
3664
|
return /* @__PURE__ */ o("span", { className: "text-xs line-height-[140px] font-normal text-[#A9A29D]", children: i ? "QR Code" : "Installed" });
|
|
3665
3665
|
}, [t?.uuid, r]);
|
|
3666
|
-
return /* @__PURE__ */ o(
|
|
3666
|
+
return /* @__PURE__ */ o(Hr, { isPressable: !0, isHoverable: !0, shadow: "none", radius: "sm", onPress: () => n?.(e), children: /* @__PURE__ */ C(Qr, { className: "flex flex-col items-center gap-1 px-0 py-2", children: [
|
|
3667
3667
|
/* @__PURE__ */ o("div", { className: "p-1 h-[56px]", children: /* @__PURE__ */ o(fe, { src: t.icon, alt: t.name, width: 48, height: 48, removeWrapper: !0, radius: "md" }) }),
|
|
3668
3668
|
/* @__PURE__ */ C("div", { className: "flex flex-col justify-center items-center scale-80 text-center", children: [
|
|
3669
3669
|
/* @__PURE__ */ o("span", { className: "text-sm font-medium", children: t.name }),
|
|
@@ -3671,7 +3671,7 @@ const Fo = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3671
3671
|
] })
|
|
3672
3672
|
] }) }, t.uuid);
|
|
3673
3673
|
};
|
|
3674
|
-
function
|
|
3674
|
+
function ac({ wallets: e, loading: n, onSelectWallet: t }) {
|
|
3675
3675
|
return n ? /* @__PURE__ */ o(
|
|
3676
3676
|
ue,
|
|
3677
3677
|
{
|
|
@@ -3682,15 +3682,15 @@ function lc({ wallets: e, loading: n, onSelectWallet: t }) {
|
|
|
3682
3682
|
},
|
|
3683
3683
|
className: "m-auto"
|
|
3684
3684
|
}
|
|
3685
|
-
) : 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(
|
|
3685
|
+
) : 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(cc, { wallet: r, onSelectWallet: t }, r.info?.uuid)) });
|
|
3686
3686
|
}
|
|
3687
|
-
const
|
|
3687
|
+
const lc = {
|
|
3688
3688
|
evm: { tabKey: "evm", chainKey: "evm" },
|
|
3689
3689
|
solana: { tabKey: "solana", chainKey: "solana" },
|
|
3690
3690
|
aptos: { tabKey: "aptos", chainKey: "aptos" },
|
|
3691
3691
|
dogecoin: { tabKey: "doge", chainKey: "dogecoin" }
|
|
3692
|
-
},
|
|
3693
|
-
const t =
|
|
3692
|
+
}, dc = ({ selectedKey: e, onSelectionChange: n }) => {
|
|
3693
|
+
const t = V(X), r = y(() => {
|
|
3694
3694
|
const i = t?.config?.chains || {}, a = [
|
|
3695
3695
|
{
|
|
3696
3696
|
key: "all",
|
|
@@ -3699,7 +3699,7 @@ const dc = {
|
|
|
3699
3699
|
}
|
|
3700
3700
|
];
|
|
3701
3701
|
return Object.keys(i).forEach((c) => {
|
|
3702
|
-
const l =
|
|
3702
|
+
const l = lc[c];
|
|
3703
3703
|
if (l) {
|
|
3704
3704
|
const d = q[l.chainKey];
|
|
3705
3705
|
a.push({
|
|
@@ -3711,16 +3711,16 @@ const dc = {
|
|
|
3711
3711
|
}), a;
|
|
3712
3712
|
}, [t?.config?.chains]), s = (i) => i.icon ? /* @__PURE__ */ o(ze, { icon: i.icon, className: "size-6 overflow-hidden rounded-full" }) : i.title;
|
|
3713
3713
|
return /* @__PURE__ */ o(
|
|
3714
|
-
|
|
3714
|
+
Kr,
|
|
3715
3715
|
{
|
|
3716
3716
|
variant: "bordered",
|
|
3717
3717
|
fullWidth: !0,
|
|
3718
3718
|
selectedKey: e,
|
|
3719
3719
|
onSelectionChange: (i) => n(i),
|
|
3720
|
-
children: r.map((i) => /* @__PURE__ */ o(
|
|
3720
|
+
children: r.map((i) => /* @__PURE__ */ o(qr, { title: s(i) }, i.key))
|
|
3721
3721
|
}
|
|
3722
3722
|
);
|
|
3723
|
-
},
|
|
3723
|
+
}, Ac = ({ wallet: e, onSelectWallet: n }) => {
|
|
3724
3724
|
const { info: t, isInstalled: r } = e, s = y(() => r ? t?.uuid === "walletConnect" ? /* @__PURE__ */ o($n, { className: "text-xs text-[#D7D3D0] border h-5", variant: "dot", children: "QR Code" }) : /* @__PURE__ */ o($n, { className: "text-xs text-[#D7D3D0] border h-5", variant: "dot", children: "Installed" }) : null, [t?.uuid, r]);
|
|
3725
3725
|
return /* @__PURE__ */ o(
|
|
3726
3726
|
Nr,
|
|
@@ -3747,7 +3747,7 @@ const dc = {
|
|
|
3747
3747
|
children: /* @__PURE__ */ o("span", {})
|
|
3748
3748
|
}
|
|
3749
3749
|
);
|
|
3750
|
-
function
|
|
3750
|
+
function fc({ wallets: e, loading: n, onSelectWallet: t }) {
|
|
3751
3751
|
return n ? /* @__PURE__ */ o(
|
|
3752
3752
|
ue,
|
|
3753
3753
|
{
|
|
@@ -3758,29 +3758,29 @@ function uc({ wallets: e, loading: n, onSelectWallet: t }) {
|
|
|
3758
3758
|
circle2: "border-b-primary"
|
|
3759
3759
|
}
|
|
3760
3760
|
}
|
|
3761
|
-
) : 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(
|
|
3761
|
+
) : 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(Ac, { wallet: r, onSelectWallet: t }, r.info?.uuid)) });
|
|
3762
3762
|
}
|
|
3763
|
-
const
|
|
3764
|
-
const e =
|
|
3763
|
+
const uc = () => {
|
|
3764
|
+
const e = V(X), { handleSelectWallet: n } = hr(), { data: t, isLoading: r } = ke("all", e?.config?.connectors), [s, i] = y(() => {
|
|
3765
3765
|
const l = t?.recommended || [], d = t?.all || [];
|
|
3766
|
-
return
|
|
3766
|
+
return Os(l, d);
|
|
3767
3767
|
}, [t]), a = y(
|
|
3768
3768
|
() => s?.filter((l) => !l.isEmbeddedWallet) || [],
|
|
3769
3769
|
[s]
|
|
3770
3770
|
);
|
|
3771
3771
|
return /* @__PURE__ */ o(F, { title: "Connect your wallet", children: /* @__PURE__ */ C("div", { className: "flex flex-col gap-4", children: [
|
|
3772
|
-
/* @__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(
|
|
3772
|
+
/* @__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(fc, { loading: r, wallets: a, onSelectWallet: n }) }) }),
|
|
3773
3773
|
r ? null : /* @__PURE__ */ o(
|
|
3774
3774
|
Nr,
|
|
3775
3775
|
{
|
|
3776
|
-
onPress: () => e?.modal.setView(
|
|
3777
|
-
startContent: /* @__PURE__ */ o(Xr, { icon: /* @__PURE__ */ o(
|
|
3776
|
+
onPress: () => e?.modal.setView(M.WalletSearch),
|
|
3777
|
+
startContent: /* @__PURE__ */ o(Xr, { icon: /* @__PURE__ */ o(Ur, {}), title: "Search more wallets" }),
|
|
3778
3778
|
endContent: /* @__PURE__ */ o("span", { className: "text-[#A9A29D] text-sm", children: i.length })
|
|
3779
3779
|
}
|
|
3780
3780
|
),
|
|
3781
3781
|
/* @__PURE__ */ o(Un, {})
|
|
3782
3782
|
] }) });
|
|
3783
|
-
},
|
|
3783
|
+
}, gc = () => {
|
|
3784
3784
|
const [e, n] = Y(0), [t, r] = Y(!1);
|
|
3785
3785
|
return J(() => {
|
|
3786
3786
|
if (typeof window < "u" && window.visualViewport) {
|
|
@@ -3802,13 +3802,13 @@ const gc = () => {
|
|
|
3802
3802
|
};
|
|
3803
3803
|
}
|
|
3804
3804
|
}, []), { keyboardHeight: e, isKeyboardVisible: t };
|
|
3805
|
-
},
|
|
3805
|
+
}, vc = (e) => {
|
|
3806
3806
|
const n = ce(null);
|
|
3807
3807
|
return J(() => {
|
|
3808
3808
|
n.current && (n.current.scrollTop = 0);
|
|
3809
3809
|
}, e), n;
|
|
3810
|
-
},
|
|
3811
|
-
const e =
|
|
3810
|
+
}, mc = Nt, pc = () => {
|
|
3811
|
+
const e = V(X), { handleSelectWallet: n } = hr(), t = e?.modal.state, r = y(() => t?.chainType || "all", [t?.chainType]), { data: s, isLoading: i } = ke(r, e?.config?.connectors), a = y(() => s?.all || [], [s]), [c, l] = Y(""), { isKeyboardVisible: d, keyboardHeight: A } = gc(), f = y(() => a.filter((g) => g.info?.name?.toLowerCase().includes(c.toLowerCase())).filter((g) => !g.isEmbeddedWallet), [a, c]), u = vc([r]), v = y(() => d && A > 0 ? `${Math.max(180, 340 - A * 0.6)}px` : "340px", [d, A]), m = k(
|
|
3812
3812
|
(g) => {
|
|
3813
3813
|
e?.modal.setCurrentViewState({ chainType: g });
|
|
3814
3814
|
},
|
|
@@ -3816,19 +3816,19 @@ const gc = () => {
|
|
|
3816
3816
|
);
|
|
3817
3817
|
return /* @__PURE__ */ o(F, { title: "All wallets", onBack: () => e?.modal.backView(), children: /* @__PURE__ */ C("div", { className: "flex flex-col gap-4 min-h-0", children: [
|
|
3818
3818
|
/* @__PURE__ */ o(
|
|
3819
|
-
|
|
3819
|
+
dc,
|
|
3820
3820
|
{
|
|
3821
3821
|
selectedKey: t?.chainType || "all",
|
|
3822
3822
|
onSelectionChange: (g) => m(g)
|
|
3823
3823
|
}
|
|
3824
3824
|
),
|
|
3825
3825
|
/* @__PURE__ */ o(
|
|
3826
|
-
|
|
3826
|
+
mc,
|
|
3827
3827
|
{
|
|
3828
3828
|
placeholder: "Search wallet",
|
|
3829
3829
|
value: c,
|
|
3830
3830
|
onChange: (g) => l(g.target.value),
|
|
3831
|
-
startContent: /* @__PURE__ */ o(
|
|
3831
|
+
startContent: /* @__PURE__ */ o(Gr, {}),
|
|
3832
3832
|
classNames: {
|
|
3833
3833
|
inputWrapper: "rounded-full h-11"
|
|
3834
3834
|
}
|
|
@@ -3844,10 +3844,10 @@ const gc = () => {
|
|
|
3844
3844
|
maxHeight: v
|
|
3845
3845
|
},
|
|
3846
3846
|
children: /* @__PURE__ */ o("div", { className: `flex flex-col gap-2 h-full ${i ? "justify-center" : ""}`, children: /* @__PURE__ */ o(
|
|
3847
|
-
|
|
3847
|
+
ac,
|
|
3848
3848
|
{
|
|
3849
3849
|
loading: i,
|
|
3850
|
-
wallets:
|
|
3850
|
+
wallets: f,
|
|
3851
3851
|
onSelectWallet: (g) => n(g, r)
|
|
3852
3852
|
}
|
|
3853
3853
|
) })
|
|
@@ -3855,21 +3855,21 @@ const gc = () => {
|
|
|
3855
3855
|
),
|
|
3856
3856
|
/* @__PURE__ */ o(Un, {})
|
|
3857
3857
|
] }) });
|
|
3858
|
-
},
|
|
3858
|
+
}, Cc = () => V(an) || {
|
|
3859
3859
|
wallet: null,
|
|
3860
3860
|
isAvailable: !1,
|
|
3861
3861
|
message: null,
|
|
3862
3862
|
connectedInfo: null,
|
|
3863
3863
|
isLoading: !0,
|
|
3864
3864
|
error: null
|
|
3865
|
-
},
|
|
3866
|
-
const { closeModalBeforeIframe: n = !0 } = e, [t, r] = Y(!1), s =
|
|
3865
|
+
}, xc = (e = {}) => {
|
|
3866
|
+
const { closeModalBeforeIframe: n = !0 } = e, [t, r] = Y(!1), s = V(X), i = Cc(), { embeddedWalletConnector: a } = ke("all"), { connectWallet: c } = Oe(), l = y(
|
|
3867
3867
|
() => a ?? (i.wallet ? Vr(i.wallet) : null),
|
|
3868
3868
|
[a, i.wallet]
|
|
3869
3869
|
);
|
|
3870
3870
|
if (!s)
|
|
3871
3871
|
throw new Error("WalletConnectContext not found");
|
|
3872
|
-
const { isWalletReady: d } = s.walletReady,
|
|
3872
|
+
const { isWalletReady: d } = s.walletReady, A = (g) => {
|
|
3873
3873
|
s.modal.setView(
|
|
3874
3874
|
s.modal.mainView,
|
|
3875
3875
|
{
|
|
@@ -3879,49 +3879,61 @@ const gc = () => {
|
|
|
3879
3879
|
},
|
|
3880
3880
|
!0
|
|
3881
3881
|
), r(!1);
|
|
3882
|
-
},
|
|
3882
|
+
}, f = () => {
|
|
3883
3883
|
const g = l;
|
|
3884
3884
|
if (!g) {
|
|
3885
|
-
|
|
3885
|
+
A("Embedded wallet connector not available");
|
|
3886
3886
|
return;
|
|
3887
3887
|
}
|
|
3888
|
-
i.wallet?.onLoginStatusChanged(({ type:
|
|
3889
|
-
|
|
3888
|
+
i.wallet?.onLoginStatusChanged(({ type: w }) => {
|
|
3889
|
+
w === "logout" && s.disconnect?.();
|
|
3890
3890
|
}), s.modal.openModal();
|
|
3891
|
-
const p = s.config?.defaultConnectChain
|
|
3892
|
-
|
|
3891
|
+
const p = s.config?.defaultConnectChain;
|
|
3892
|
+
if (p) {
|
|
3893
|
+
c(g, p);
|
|
3894
|
+
return;
|
|
3895
|
+
}
|
|
3896
|
+
const I = s.config?.chains || {}, x = Object.entries(g.connectors || {}).filter(
|
|
3897
|
+
([w, O]) => O && I[w]
|
|
3898
|
+
);
|
|
3899
|
+
if (x.length > 1)
|
|
3900
|
+
s._setCurrentWallet(g), s.modal.setView(M.WalletSelectProviders);
|
|
3901
|
+
else {
|
|
3902
|
+
const w = x[0]?.[0] ?? T.EVM;
|
|
3903
|
+
c(g, w);
|
|
3904
|
+
}
|
|
3893
3905
|
};
|
|
3894
3906
|
return {
|
|
3895
3907
|
isLoading: t,
|
|
3896
3908
|
handleEmailLogin: async (g) => {
|
|
3897
3909
|
try {
|
|
3898
|
-
const p =
|
|
3899
|
-
if (p &&
|
|
3900
|
-
return
|
|
3910
|
+
const p = Ts(g);
|
|
3911
|
+
if (p && A(p), r(!0), !d || !i.wallet)
|
|
3912
|
+
return A("Embedded wallet initialization failed");
|
|
3901
3913
|
const I = i.wallet;
|
|
3902
3914
|
n && s.modal.closeModal();
|
|
3903
3915
|
const x = await I?.loginByEmail?.({ email: g });
|
|
3904
3916
|
if (!x)
|
|
3905
|
-
return
|
|
3917
|
+
return A("Failed to login into email");
|
|
3906
3918
|
if (!(await I.login(x)).isAvailable)
|
|
3907
|
-
return
|
|
3908
|
-
|
|
3919
|
+
return A("Failed to login with email");
|
|
3920
|
+
f();
|
|
3909
3921
|
} catch (p) {
|
|
3910
|
-
console.error("Email login error:", p), r(!1),
|
|
3922
|
+
console.error("Email login error:", p), r(!1), A("Failed to login with email");
|
|
3911
3923
|
}
|
|
3912
3924
|
},
|
|
3913
3925
|
handleGoogleLogin: async () => {
|
|
3914
3926
|
try {
|
|
3915
3927
|
if (r(!0), !d || !i.wallet)
|
|
3916
|
-
return
|
|
3928
|
+
return A("Embedded wallet initialization failed");
|
|
3917
3929
|
const g = i.wallet, p = await g?.loginByGoogle?.();
|
|
3918
3930
|
if (!p)
|
|
3919
|
-
return
|
|
3931
|
+
return A("Failed to login into Google");
|
|
3920
3932
|
if (!(await g.login(p)).isAvailable)
|
|
3921
|
-
return
|
|
3922
|
-
|
|
3933
|
+
return A("Failed to login with Google");
|
|
3934
|
+
f();
|
|
3923
3935
|
} catch (g) {
|
|
3924
|
-
console.error("Google login error:", g),
|
|
3936
|
+
console.error("Google login error:", g), A("Failed to login with Google");
|
|
3925
3937
|
} finally {
|
|
3926
3938
|
r(!1);
|
|
3927
3939
|
}
|
|
@@ -3929,27 +3941,27 @@ const gc = () => {
|
|
|
3929
3941
|
handleXLogin: async () => {
|
|
3930
3942
|
try {
|
|
3931
3943
|
if (r(!0), !d || !i.wallet)
|
|
3932
|
-
return
|
|
3944
|
+
return A("Embedded wallet initialization failed");
|
|
3933
3945
|
const g = i.wallet, p = await g?.loginByX?.();
|
|
3934
3946
|
if (!p)
|
|
3935
|
-
return
|
|
3947
|
+
return A("Failed to login into X");
|
|
3936
3948
|
if (!(await g.login(p)).isAvailable)
|
|
3937
|
-
return
|
|
3938
|
-
|
|
3949
|
+
return A("Failed to login with X");
|
|
3950
|
+
f();
|
|
3939
3951
|
} catch (g) {
|
|
3940
|
-
console.error("X login error:", g),
|
|
3952
|
+
console.error("X login error:", g), A(g instanceof Error ? g.message : g);
|
|
3941
3953
|
} finally {
|
|
3942
3954
|
r(!1);
|
|
3943
3955
|
}
|
|
3944
3956
|
}
|
|
3945
3957
|
};
|
|
3946
|
-
},
|
|
3947
|
-
const e =
|
|
3958
|
+
}, bc = () => {
|
|
3959
|
+
const e = V(X);
|
|
3948
3960
|
if (!e)
|
|
3949
3961
|
return { themeMode: "dark", themeType: "doge_dark" };
|
|
3950
3962
|
const { themeMode: n } = e.config || { themeMode: "dark" }, t = yr();
|
|
3951
3963
|
return { themeMode: n, themeType: t, isDark: n === "dark" };
|
|
3952
|
-
},
|
|
3964
|
+
}, zc = ({
|
|
3953
3965
|
text: e = "or",
|
|
3954
3966
|
className: n = "",
|
|
3955
3967
|
lineClassName: t = "bg-content2",
|
|
@@ -3958,7 +3970,7 @@ const gc = () => {
|
|
|
3958
3970
|
/* @__PURE__ */ o("div", { className: `flex-1 h-px ${t}` }),
|
|
3959
3971
|
/* @__PURE__ */ o("span", { className: r, children: e }),
|
|
3960
3972
|
/* @__PURE__ */ o("div", { className: `flex-1 h-px ${t}` })
|
|
3961
|
-
] }),
|
|
3973
|
+
] }), Ic = ({ 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: [
|
|
3962
3974
|
/* @__PURE__ */ o(
|
|
3963
3975
|
ue,
|
|
3964
3976
|
{
|
|
@@ -3970,7 +3982,7 @@ const gc = () => {
|
|
|
3970
3982
|
}
|
|
3971
3983
|
),
|
|
3972
3984
|
/* @__PURE__ */ o("span", { className: "text-foreground text-sm font-medium", children: n })
|
|
3973
|
-
] }) }) : null,
|
|
3985
|
+
] }) }) : null, wc = ({ className: e, width: n = 24, height: t = 24 }) => /* @__PURE__ */ C(
|
|
3974
3986
|
"svg",
|
|
3975
3987
|
{
|
|
3976
3988
|
width: n,
|
|
@@ -4010,7 +4022,7 @@ const gc = () => {
|
|
|
4010
4022
|
)
|
|
4011
4023
|
]
|
|
4012
4024
|
}
|
|
4013
|
-
),
|
|
4025
|
+
), Pc = ({ className: e, width: n = 24, height: t = 24, fill: r = "white" }) => /* @__PURE__ */ o(
|
|
4014
4026
|
"svg",
|
|
4015
4027
|
{
|
|
4016
4028
|
width: n,
|
|
@@ -4021,15 +4033,15 @@ const gc = () => {
|
|
|
4021
4033
|
className: e,
|
|
4022
4034
|
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" })
|
|
4023
4035
|
}
|
|
4024
|
-
),
|
|
4025
|
-
const e =
|
|
4036
|
+
), yc = Nt, Bc = () => {
|
|
4037
|
+
const e = V(X), { isLoading: n, handleEmailLogin: t, handleGoogleLogin: r, handleXLogin: s } = xc({
|
|
4026
4038
|
closeModalBeforeIframe: !0
|
|
4027
4039
|
});
|
|
4028
4040
|
if (!e)
|
|
4029
4041
|
throw new Error("WalletConnectContext not found");
|
|
4030
4042
|
const [i, a] = Y(e.modal.state?.email || "");
|
|
4031
4043
|
J(() => {
|
|
4032
|
-
e.modal.state?.error && (
|
|
4044
|
+
e.modal.state?.error && (Rr({
|
|
4033
4045
|
title: e.modal.state.error,
|
|
4034
4046
|
color: "danger",
|
|
4035
4047
|
timeout: 3e3,
|
|
@@ -4039,8 +4051,8 @@ const gc = () => {
|
|
|
4039
4051
|
const c = async () => {
|
|
4040
4052
|
await t(i);
|
|
4041
4053
|
}, l = () => {
|
|
4042
|
-
e.modal.setView(
|
|
4043
|
-
}, { isDark: d } =
|
|
4054
|
+
e.modal.setView(M.WalletSearch);
|
|
4055
|
+
}, { isDark: d } = bc();
|
|
4044
4056
|
return /* @__PURE__ */ C(
|
|
4045
4057
|
F,
|
|
4046
4058
|
{
|
|
@@ -4057,7 +4069,7 @@ const gc = () => {
|
|
|
4057
4069
|
}
|
|
4058
4070
|
),
|
|
4059
4071
|
children: [
|
|
4060
|
-
/* @__PURE__ */ o(
|
|
4072
|
+
/* @__PURE__ */ o(Ic, { isLoading: n || e.modal.state?.isLoading }),
|
|
4061
4073
|
/* @__PURE__ */ C("div", { className: "flex flex-col justify-between min-h-0 flex-1 pt-8", children: [
|
|
4062
4074
|
/* @__PURE__ */ C("div", { className: "flex flex-col gap-6", children: [
|
|
4063
4075
|
/* @__PURE__ */ C("div", { className: "flex gap-3 pb-6", children: [
|
|
@@ -4069,7 +4081,7 @@ const gc = () => {
|
|
|
4069
4081
|
variant: "bordered",
|
|
4070
4082
|
className: "h-12 rounded-2xl border-primary bg-primary/10",
|
|
4071
4083
|
onPress: s,
|
|
4072
|
-
startContent: /* @__PURE__ */ o(
|
|
4084
|
+
startContent: /* @__PURE__ */ o(Pc, { width: 20, height: 20, fill: d ? "white" : "black" }),
|
|
4073
4085
|
children: /* @__PURE__ */ o("span", { className: "text-base font-medium", children: "Twitter" })
|
|
4074
4086
|
}
|
|
4075
4087
|
),
|
|
@@ -4081,13 +4093,13 @@ const gc = () => {
|
|
|
4081
4093
|
variant: "solid",
|
|
4082
4094
|
className: "h-12 rounded-2xl bg-background",
|
|
4083
4095
|
onPress: r,
|
|
4084
|
-
startContent: /* @__PURE__ */ o(
|
|
4096
|
+
startContent: /* @__PURE__ */ o(wc, { width: 20, height: 20 }),
|
|
4085
4097
|
children: /* @__PURE__ */ o("span", { className: "text-base font-medium", children: "Google" })
|
|
4086
4098
|
}
|
|
4087
4099
|
)
|
|
4088
4100
|
] }),
|
|
4089
4101
|
/* @__PURE__ */ o(
|
|
4090
|
-
|
|
4102
|
+
zc,
|
|
4091
4103
|
{
|
|
4092
4104
|
lineClassName: "h-[0.5px] bg-[#ebebf4]",
|
|
4093
4105
|
textClassName: "text-[#8989ab] text-xs",
|
|
@@ -4096,19 +4108,19 @@ const gc = () => {
|
|
|
4096
4108
|
),
|
|
4097
4109
|
/* @__PURE__ */ C("div", { className: "flex flex-col gap-5 items-center pb-8", children: [
|
|
4098
4110
|
/* @__PURE__ */ o(
|
|
4099
|
-
|
|
4111
|
+
yc,
|
|
4100
4112
|
{
|
|
4101
4113
|
type: "email",
|
|
4102
4114
|
placeholder: "Enter your email",
|
|
4103
4115
|
value: i,
|
|
4104
|
-
onChange: (
|
|
4116
|
+
onChange: (A) => a(A.target.value),
|
|
4105
4117
|
classNames: {
|
|
4106
4118
|
inputWrapper: "rounded-2xl h-12",
|
|
4107
4119
|
input: "text-base"
|
|
4108
4120
|
},
|
|
4109
4121
|
autoComplete: "new-password",
|
|
4110
|
-
onKeyDown: (
|
|
4111
|
-
if (
|
|
4122
|
+
onKeyDown: (A) => {
|
|
4123
|
+
if (A.key === "Enter") {
|
|
4112
4124
|
if (!Zt(i))
|
|
4113
4125
|
return;
|
|
4114
4126
|
c();
|
|
@@ -4135,8 +4147,8 @@ const gc = () => {
|
|
|
4135
4147
|
]
|
|
4136
4148
|
}
|
|
4137
4149
|
);
|
|
4138
|
-
},
|
|
4139
|
-
const e =
|
|
4150
|
+
}, hc = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAAAgCAYAAADtwH1UAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAA4eSURBVHgBvVoJcBRVGv5eT8+Vc0KQSwKDIJccEWFFFIMu4oUQd9li0VUDuqulW0ZLYMtdkUR0Wa8iVlmUFosGXK+SLRFUVlcrBtcVF3DjxQqKDiEcUTEzuTNH9/7/6+7JZDJkjoB/5eV1v+7X781/fP///vcEUqS7KnRPs7Ot1AZRousoBnQvIDzGU91P1z4hUAdNr80OZW+tqhD+2P56TbGnJYRSBXqJDuov4IUOo7+An659AqjTIGpz7dgqLqnr2V/XPXV1X5YGQq4SNdtTrKgebzAET4QmQ339kWCLL9TeWFfkUWonTx69VYi48T1eD1pQCgUlkPOn8WGOD/C7PvD8gVpk0/h+X4/+TU1N/G4plRLgJP1h9ge2FhQU+JECiWQv3La2w6vperkGrayb4Sl8W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ve9jtYUjKc7T7C5xtvglDA3U/n2yvnTbZm/h4eps8Xj6Hxk04f3k8XUMtcvs8nj6HSuL+GRxP/z/hFFWXpmDkiwAAAABJRU5ErkJggg==", Gn = () => {
|
|
4151
|
+
const e = V(X);
|
|
4140
4152
|
if (!e)
|
|
4141
4153
|
throw new Error("useAccount must be used within WalletConnectProvider");
|
|
4142
4154
|
return {
|
|
@@ -4156,15 +4168,15 @@ const gc = () => {
|
|
|
4156
4168
|
// signAndSendTransaction: context.signAndSendTransaction,
|
|
4157
4169
|
// sendTransaction: context.sendTransaction,
|
|
4158
4170
|
};
|
|
4159
|
-
},
|
|
4160
|
-
const e =
|
|
4171
|
+
}, Ma = () => {
|
|
4172
|
+
const e = V(X);
|
|
4161
4173
|
if (!e)
|
|
4162
4174
|
throw new Error("useConnectors must be used within WalletConnectProvider");
|
|
4163
4175
|
const n = y(() => e.account?.currentWallet?.connectors || null, [e.account?.currentWallet]), t = y(() => e.account?.currentProvider || null, [e.account?.currentProvider]);
|
|
4164
4176
|
return { connectors: n, currentProvider: t };
|
|
4165
4177
|
};
|
|
4166
|
-
function
|
|
4167
|
-
const [n, t] = Y(e), r =
|
|
4178
|
+
function Wc(e = !1) {
|
|
4179
|
+
const [n, t] = Y(e), r = k(() => t(!0), []), s = k(() => t(!1), []), i = k(() => t((c) => !c), []), a = k((c) => t(c), []);
|
|
4168
4180
|
return {
|
|
4169
4181
|
isOpen: n,
|
|
4170
4182
|
onOpen: r,
|
|
@@ -4173,35 +4185,35 @@ function Mc(e = !1) {
|
|
|
4173
4185
|
onOpenChange: a
|
|
4174
4186
|
};
|
|
4175
4187
|
}
|
|
4176
|
-
const
|
|
4177
|
-
const { isOpen: n, onOpen: t, onClose: r } =
|
|
4188
|
+
const Mc = (e) => {
|
|
4189
|
+
const { isOpen: n, onOpen: t, onClose: r } = Wc(), [s, i] = Y(e), [a, c] = Y(null), [l, d] = Y([]);
|
|
4178
4190
|
J(() => {
|
|
4179
4191
|
s !== e && i(e);
|
|
4180
4192
|
}, [e]);
|
|
4181
|
-
const
|
|
4193
|
+
const A = k(
|
|
4182
4194
|
(I, x, w) => {
|
|
4183
|
-
s === I && !w || (w || d((
|
|
4195
|
+
s === I && !w || (w || d((O) => [...O, { view: s, state: a }]), i(I), c(x || null));
|
|
4184
4196
|
},
|
|
4185
4197
|
[s, a]
|
|
4186
|
-
),
|
|
4198
|
+
), f = k(() => {
|
|
4187
4199
|
i(e), setTimeout(() => {
|
|
4188
4200
|
c(null), d([]);
|
|
4189
4201
|
}, 0);
|
|
4190
|
-
}, [e]), u =
|
|
4191
|
-
r?.(),
|
|
4192
|
-
}, [r,
|
|
4202
|
+
}, [e]), u = k(() => {
|
|
4203
|
+
r?.(), f();
|
|
4204
|
+
}, [r, f]), v = k(
|
|
4193
4205
|
(I, x) => {
|
|
4194
4206
|
d((w) => [...w, { view: s, state: a }]), i(I), c(x || null), t();
|
|
4195
4207
|
},
|
|
4196
4208
|
[s, a, t]
|
|
4197
|
-
), m =
|
|
4209
|
+
), m = k(() => {
|
|
4198
4210
|
d((I) => {
|
|
4199
4211
|
if (I.length === 0)
|
|
4200
4212
|
return i(e), c(null), I;
|
|
4201
4213
|
const x = I[I.length - 1], w = I.slice(0, -1);
|
|
4202
4214
|
return i(x.view), c(x.state), w;
|
|
4203
4215
|
});
|
|
4204
|
-
}, [e]), g =
|
|
4216
|
+
}, [e]), g = k((I) => {
|
|
4205
4217
|
c(I || null);
|
|
4206
4218
|
}, []), p = l.length > 0 ? l[l.length - 1].view : null;
|
|
4207
4219
|
return {
|
|
@@ -4211,7 +4223,7 @@ const Vc = (e) => {
|
|
|
4211
4223
|
openModal: t,
|
|
4212
4224
|
openModalWithState: v,
|
|
4213
4225
|
closeModal: u,
|
|
4214
|
-
setView:
|
|
4226
|
+
setView: A,
|
|
4215
4227
|
backView: m,
|
|
4216
4228
|
state: a,
|
|
4217
4229
|
setCurrentViewState: g
|
|
@@ -4221,7 +4233,7 @@ let xe = null, jr = null;
|
|
|
4221
4233
|
function wt(e) {
|
|
4222
4234
|
xe = e;
|
|
4223
4235
|
}
|
|
4224
|
-
function
|
|
4236
|
+
function Vc() {
|
|
4225
4237
|
return xe;
|
|
4226
4238
|
}
|
|
4227
4239
|
function pn(e) {
|
|
@@ -4255,35 +4267,35 @@ function Rn() {
|
|
|
4255
4267
|
function Sr() {
|
|
4256
4268
|
if (!ln())
|
|
4257
4269
|
return null;
|
|
4258
|
-
const e = Rn(), n =
|
|
4270
|
+
const e = Rn(), n = fs();
|
|
4259
4271
|
return e ? n : null;
|
|
4260
4272
|
}
|
|
4261
|
-
function
|
|
4273
|
+
function Xc() {
|
|
4262
4274
|
if (!ln())
|
|
4263
4275
|
return null;
|
|
4264
|
-
const e = Rn(), n =
|
|
4276
|
+
const e = Rn(), n = gs();
|
|
4265
4277
|
return e ? n : null;
|
|
4266
4278
|
}
|
|
4267
|
-
function
|
|
4279
|
+
function Nc() {
|
|
4268
4280
|
if (!ln())
|
|
4269
4281
|
return null;
|
|
4270
|
-
const e = Rn(), n =
|
|
4282
|
+
const e = Rn(), n = us();
|
|
4271
4283
|
return e ? n : null;
|
|
4272
4284
|
}
|
|
4273
4285
|
function Xn(e, n, t) {
|
|
4274
|
-
const r =
|
|
4286
|
+
const r = Vc();
|
|
4275
4287
|
if (!r)
|
|
4276
4288
|
return null;
|
|
4277
4289
|
const s = Tr(), i = t || s || r.connectors;
|
|
4278
4290
|
return !i || i.length === 0 ? null : i.find((a) => {
|
|
4279
|
-
const c = (a.id || "").toLowerCase(), l = (a.name || "").toLowerCase(), d = e.toLowerCase(),
|
|
4280
|
-
return c === d || c ===
|
|
4291
|
+
const c = (a.id || "").toLowerCase(), l = (a.name || "").toLowerCase(), d = e.toLowerCase(), A = n?.toLowerCase();
|
|
4292
|
+
return c === d || c === A || l === d || l === A || c.includes(d) || l.includes(d);
|
|
4281
4293
|
}) || null;
|
|
4282
4294
|
}
|
|
4283
4295
|
const Cn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
4284
4296
|
if (e)
|
|
4285
4297
|
throw n(t), new Error(t);
|
|
4286
|
-
},
|
|
4298
|
+
}, jc = ({
|
|
4287
4299
|
walletState: e,
|
|
4288
4300
|
modalState: n,
|
|
4289
4301
|
setWalletState: t,
|
|
@@ -4291,7 +4303,7 @@ const Cn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4291
4303
|
resetWalletState: s,
|
|
4292
4304
|
setMainView: i
|
|
4293
4305
|
}) => {
|
|
4294
|
-
const { currentProvider: a, currentWallet: c, isConnected: l, actionsLoading: d } = e,
|
|
4306
|
+
const { currentProvider: a, currentWallet: c, isConnected: l, actionsLoading: d } = e, f = V(an)?.connectedInfo ?? null, u = Sr(), v = Xc(), m = Tr(), g = k(
|
|
4295
4307
|
async (b) => {
|
|
4296
4308
|
const { wallet: z, chainType: W } = b, S = (z.connectors[W] || null)?.provider || null;
|
|
4297
4309
|
if (l && c?.info?.uuid === z.info.uuid && W === e.chainType)
|
|
@@ -4339,9 +4351,9 @@ const Cn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4339
4351
|
address: B.address,
|
|
4340
4352
|
connectedAt: Date.now(),
|
|
4341
4353
|
walletId: z.info.uuid
|
|
4342
|
-
}, z.isEmbeddedWallet &&
|
|
4343
|
-
if (
|
|
4344
|
-
const N =
|
|
4354
|
+
}, z.isEmbeddedWallet && f) {
|
|
4355
|
+
if (f.evmProvider?.connected && f.evmProvider.address?.[0]) {
|
|
4356
|
+
const N = f.evmProvider.address[0];
|
|
4345
4357
|
if (W !== T.EVM || !j[T.EVM]) {
|
|
4346
4358
|
const Q = (z.connectors[T.EVM] || null)?.provider || null;
|
|
4347
4359
|
Q && (j[T.EVM] = {
|
|
@@ -4352,8 +4364,8 @@ const Cn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4352
4364
|
});
|
|
4353
4365
|
}
|
|
4354
4366
|
}
|
|
4355
|
-
if (
|
|
4356
|
-
const N =
|
|
4367
|
+
if (f.solanaProvider?.connected && f.solanaProvider.address?.[0]) {
|
|
4368
|
+
const N = f.solanaProvider.address[0];
|
|
4357
4369
|
if (W !== T.SOLANA || !j[T.SOLANA]) {
|
|
4358
4370
|
const Q = (z.connectors[T.SOLANA] || null)?.provider || null;
|
|
4359
4371
|
Q && (j[T.SOLANA] = {
|
|
@@ -4364,8 +4376,8 @@ const Cn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4364
4376
|
});
|
|
4365
4377
|
}
|
|
4366
4378
|
}
|
|
4367
|
-
if (
|
|
4368
|
-
const N =
|
|
4379
|
+
if (f.dogeProvider?.connected && f.dogeProvider.address?.[0]) {
|
|
4380
|
+
const N = f.dogeProvider.address[0];
|
|
4369
4381
|
if (W !== T.DOGECOIN || !j[T.DOGECOIN]) {
|
|
4370
4382
|
const Q = (z.connectors[T.DOGECOIN] || null)?.provider || null;
|
|
4371
4383
|
Q && (j[T.DOGECOIN] = {
|
|
@@ -4395,7 +4407,7 @@ const Cn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4395
4407
|
connectedAt: Z.connectedAt,
|
|
4396
4408
|
walletId: Z.walletId
|
|
4397
4409
|
}));
|
|
4398
|
-
return
|
|
4410
|
+
return Es({
|
|
4399
4411
|
address: B.address,
|
|
4400
4412
|
chainId: B.chainId,
|
|
4401
4413
|
chainType: W,
|
|
@@ -4432,14 +4444,14 @@ const Cn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4432
4444
|
c?.info?.uuid,
|
|
4433
4445
|
e.chainType,
|
|
4434
4446
|
e.providers,
|
|
4435
|
-
|
|
4447
|
+
f,
|
|
4436
4448
|
r,
|
|
4437
4449
|
t,
|
|
4438
4450
|
n,
|
|
4439
4451
|
u,
|
|
4440
4452
|
m
|
|
4441
4453
|
]
|
|
4442
|
-
), p =
|
|
4454
|
+
), p = k(async () => {
|
|
4443
4455
|
t((b) => ({ ...b, actionsLoading: !0 }));
|
|
4444
4456
|
try {
|
|
4445
4457
|
if (n.closeModal(), a?.disconnect?.(), v)
|
|
@@ -4449,7 +4461,7 @@ const Cn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4449
4461
|
console.warn("Failed to disconnect wagmi connector:", z);
|
|
4450
4462
|
}
|
|
4451
4463
|
const b = e.providers;
|
|
4452
|
-
c?.isEmbeddedWallet && (await c?.logout?.(), i(
|
|
4464
|
+
c?.isEmbeddedWallet && (await c?.logout?.(), i(M.WalletHome)), s(), t((z) => ({
|
|
4453
4465
|
...z,
|
|
4454
4466
|
providers: b
|
|
4455
4467
|
}));
|
|
@@ -4465,7 +4477,7 @@ const Cn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4465
4477
|
c,
|
|
4466
4478
|
s,
|
|
4467
4479
|
i
|
|
4468
|
-
]), I =
|
|
4480
|
+
]), I = k(
|
|
4469
4481
|
async ({ chainInfo: b, chainType: z }) => {
|
|
4470
4482
|
Cn(d, r);
|
|
4471
4483
|
const W = b.id.toString(), E = {
|
|
@@ -4476,7 +4488,7 @@ const Cn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4476
4488
|
}, S = {
|
|
4477
4489
|
chainId: W,
|
|
4478
4490
|
chainName: b.name,
|
|
4479
|
-
rpcUrls:
|
|
4491
|
+
rpcUrls: b.rpcUrls.default.http,
|
|
4480
4492
|
iconUrls: [],
|
|
4481
4493
|
nativeCurrency: b.nativeCurrency,
|
|
4482
4494
|
blockExplorerUrls: [b.blockExplorers?.default.url || ""]
|
|
@@ -4486,7 +4498,7 @@ const Cn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4486
4498
|
} catch (B) {
|
|
4487
4499
|
if ((B && typeof B == "object" && "code" in B ? B.code : void 0) === 4902)
|
|
4488
4500
|
try {
|
|
4489
|
-
return await
|
|
4501
|
+
return await ss(S, E), !0;
|
|
4490
4502
|
} catch (j) {
|
|
4491
4503
|
throw r(j instanceof Error ? j.message : "Add chain failed"), console.error("Add chain failed:", j), j;
|
|
4492
4504
|
}
|
|
@@ -4496,7 +4508,7 @@ const Cn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4496
4508
|
}
|
|
4497
4509
|
},
|
|
4498
4510
|
[t, e, d, r]
|
|
4499
|
-
), x =
|
|
4511
|
+
), x = k(
|
|
4500
4512
|
async (b) => {
|
|
4501
4513
|
if (Cn(d, r), !e.isConnected || !e.currentProvider || !e.chainType)
|
|
4502
4514
|
throw new Error("Wallet not connected");
|
|
@@ -4510,7 +4522,7 @@ const Cn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4510
4522
|
issuedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
4511
4523
|
}, ...b || {} };
|
|
4512
4524
|
try {
|
|
4513
|
-
const E = await
|
|
4525
|
+
const E = await is(W, {
|
|
4514
4526
|
chainType: e.chainType,
|
|
4515
4527
|
account: {
|
|
4516
4528
|
address: e.address,
|
|
@@ -4541,14 +4553,14 @@ const Cn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4541
4553
|
t,
|
|
4542
4554
|
r
|
|
4543
4555
|
]
|
|
4544
|
-
), w =
|
|
4556
|
+
), w = k(
|
|
4545
4557
|
async (b) => {
|
|
4546
4558
|
if (Cn(d, r), !e.isConnected || !e.currentProvider || !e.chainType)
|
|
4547
4559
|
throw new Error("Wallet not connected");
|
|
4548
4560
|
const { message: z, nonce: W } = b;
|
|
4549
4561
|
if (!z || z.length === 0)
|
|
4550
4562
|
throw new Error("Message is required");
|
|
4551
|
-
return t((S) => ({ ...S, actionsLoading: !0 })), await
|
|
4563
|
+
return t((S) => ({ ...S, actionsLoading: !0 })), await os(
|
|
4552
4564
|
{ message: z, nonce: W || Math.random().toString(36).substring(7) },
|
|
4553
4565
|
{
|
|
4554
4566
|
chainType: e.chainType,
|
|
@@ -4578,7 +4590,7 @@ const Cn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4578
4590
|
t,
|
|
4579
4591
|
r
|
|
4580
4592
|
]
|
|
4581
|
-
),
|
|
4593
|
+
), O = k(
|
|
4582
4594
|
(b) => t((z) => ({ ...z, currentWallet: b })),
|
|
4583
4595
|
[t]
|
|
4584
4596
|
);
|
|
@@ -4591,10 +4603,10 @@ const Cn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4591
4603
|
// signTransaction,
|
|
4592
4604
|
// signAndSendTransaction,
|
|
4593
4605
|
// sendTransaction,
|
|
4594
|
-
_setCurrentWallet:
|
|
4606
|
+
_setCurrentWallet: O
|
|
4595
4607
|
};
|
|
4596
|
-
},
|
|
4597
|
-
const e =
|
|
4608
|
+
}, Va = () => {
|
|
4609
|
+
const e = V(X);
|
|
4598
4610
|
if (!e)
|
|
4599
4611
|
throw new Error("useWalletConnect must be used within WalletConnectProvider");
|
|
4600
4612
|
return {
|
|
@@ -4612,30 +4624,35 @@ const Cn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4612
4624
|
connect: (n) => e.connect(n),
|
|
4613
4625
|
disconnect: e.disconnect
|
|
4614
4626
|
};
|
|
4615
|
-
},
|
|
4627
|
+
}, Tc = () => {
|
|
4616
4628
|
const { switchChain: e } = Gn();
|
|
4617
4629
|
return En({
|
|
4618
4630
|
mutationKey: ["switch-chain"],
|
|
4619
4631
|
mutationFn: async (n) => e(n)
|
|
4620
4632
|
});
|
|
4621
4633
|
}, Pt = ({ chainType: e, chain: n }) => {
|
|
4622
|
-
const { mutateAsync: t, isPending: r } =
|
|
4634
|
+
const { mutateAsync: t, isPending: r } = Tc(), s = V(X), { connectWallet: i } = Oe();
|
|
4623
4635
|
if (!n || !s)
|
|
4624
4636
|
throw new Error(`Chain ${e} not found`);
|
|
4625
4637
|
const { currentWallet: a } = s.account;
|
|
4626
4638
|
if (!a)
|
|
4627
4639
|
throw new Error("Current wallet not found");
|
|
4628
|
-
const { chainType: c, chainId: l } = Gn(), d =
|
|
4640
|
+
const { chainType: c, chainId: l } = Gn(), d = y(() => {
|
|
4641
|
+
if (l) {
|
|
4642
|
+
if (/^\d+$/.test(l)) return Number(l);
|
|
4643
|
+
if (l.startsWith("0x")) return parseInt(l, 16);
|
|
4644
|
+
}
|
|
4645
|
+
}, [l]), A = y(() => {
|
|
4629
4646
|
const m = c?.toLowerCase() === e?.toLowerCase();
|
|
4630
4647
|
if (c === "evm") {
|
|
4631
4648
|
const g = Number(n?.chainId?.split(":")[1] || "0");
|
|
4632
|
-
return m && d === g;
|
|
4649
|
+
return d !== void 0 ? m && d === g : !1;
|
|
4633
4650
|
}
|
|
4634
4651
|
return m;
|
|
4635
|
-
}, [n?.chainId, d, e, c]),
|
|
4652
|
+
}, [n?.chainId, d, e, c]), f = y(
|
|
4636
4653
|
() => a?.connectors?.[e]?.provider,
|
|
4637
4654
|
[a, e]
|
|
4638
|
-
), u = y(() =>
|
|
4655
|
+
), u = y(() => A ? /* @__PURE__ */ o("div", { className: "size-5 bg-[#079555] rounded-full flex items-center justify-center", children: /* @__PURE__ */ o(Vt, { className: "size-3", color: "white" }) }) : r ? /* @__PURE__ */ o(
|
|
4639
4656
|
ue,
|
|
4640
4657
|
{
|
|
4641
4658
|
size: "sm",
|
|
@@ -4644,10 +4661,10 @@ const Cn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4644
4661
|
circle2: "border-b-primary"
|
|
4645
4662
|
}
|
|
4646
4663
|
}
|
|
4647
|
-
) : /* @__PURE__ */ o(jn, { className: "size-4" }), [r,
|
|
4648
|
-
if (!(r ||
|
|
4664
|
+
) : /* @__PURE__ */ o(jn, { className: "size-4" }), [r, A]), v = () => {
|
|
4665
|
+
if (!(r || A)) {
|
|
4649
4666
|
if (c !== e) {
|
|
4650
|
-
|
|
4667
|
+
f ? i(a, e) : s.modal.setView(M.ChangeNetwork, n);
|
|
4651
4668
|
return;
|
|
4652
4669
|
}
|
|
4653
4670
|
t({
|
|
@@ -4656,7 +4673,7 @@ const Cn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4656
4673
|
}).then(() => {
|
|
4657
4674
|
s?.modal.backView();
|
|
4658
4675
|
}).catch((m) => {
|
|
4659
|
-
throw console.error("handleSwitchChain::", m), s.modal.setView(
|
|
4676
|
+
throw console.error("handleSwitchChain::", m), s.modal.setView(M.UnsupportChain, n), m;
|
|
4660
4677
|
});
|
|
4661
4678
|
}
|
|
4662
4679
|
};
|
|
@@ -4683,7 +4700,7 @@ const Cn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4683
4700
|
children: /* @__PURE__ */ o("span", { className: "flex-1 text-left text-sm font-medium", children: n?.chainInfo?.name })
|
|
4684
4701
|
}
|
|
4685
4702
|
);
|
|
4686
|
-
},
|
|
4703
|
+
}, Ec = ({ chains: e }) => {
|
|
4687
4704
|
const { chainType: n } = Gn(), { currentChains: t, otherChains: r } = y(() => {
|
|
4688
4705
|
const s = [], i = [];
|
|
4689
4706
|
return e.map((a) => {
|
|
@@ -4700,14 +4717,14 @@ const Cn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4700
4717
|
}), /* @__PURE__ */ C("div", { className: "flex flex-col w-full text-foreground", children: [
|
|
4701
4718
|
t[0]?.chainType === "evm" && /* @__PURE__ */ C("div", { className: "text-sm flex gap-2 mt-2 mb-4 items-center", children: [
|
|
4702
4719
|
/* @__PURE__ */ o("span", { children: "EVM network" }),
|
|
4703
|
-
/* @__PURE__ */ o("img", { src:
|
|
4720
|
+
/* @__PURE__ */ o("img", { src: hc, alt: "Evm chains", className: "h-4 w-auto" })
|
|
4704
4721
|
] }),
|
|
4705
4722
|
/* @__PURE__ */ o("div", { className: "flex flex-col gap-1 w-full mb-4", children: t?.map((s, i) => /* @__PURE__ */ o(Pt, { chainType: s.chainType, chain: s }, `${s.name}-${i}`)) }),
|
|
4706
4723
|
/* @__PURE__ */ o("div", { className: "text-sm flex gap-2 mt-2 mb-4", children: /* @__PURE__ */ o("span", { children: "Other network" }) }),
|
|
4707
4724
|
/* @__PURE__ */ o("div", { className: "flex flex-col gap-1 w-full mb-4", children: r?.map((s, i) => /* @__PURE__ */ o(Pt, { chainType: s.chainType, chain: s }, `${s.name}-${i}`)) })
|
|
4708
4725
|
] });
|
|
4709
|
-
},
|
|
4710
|
-
const e =
|
|
4726
|
+
}, Sc = () => {
|
|
4727
|
+
const e = V(X);
|
|
4711
4728
|
if (!e)
|
|
4712
4729
|
throw new Error("WalletConnectContext not found");
|
|
4713
4730
|
const { currentWallet: n } = e.account;
|
|
@@ -4716,8 +4733,8 @@ const Cn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4716
4733
|
const { chains: t, isLoading: r } = Yt(), s = wr(e.config?.chains, n?.connectors, {
|
|
4717
4734
|
apiChains: r ? void 0 : t
|
|
4718
4735
|
});
|
|
4719
|
-
return /* @__PURE__ */ o(F, { 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(
|
|
4720
|
-
},
|
|
4736
|
+
return /* @__PURE__ */ o(F, { 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(Ec, { chains: s }) }) }) });
|
|
4737
|
+
}, Oc = ({ chainType: e, onSelect: n }) => {
|
|
4721
4738
|
const t = q[e];
|
|
4722
4739
|
if (!t)
|
|
4723
4740
|
throw new Error(`Chain ${e} not found`);
|
|
@@ -4736,15 +4753,15 @@ const Cn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4736
4753
|
}
|
|
4737
4754
|
);
|
|
4738
4755
|
}, kc = ({ providers: e, onSelect: n }) => /* @__PURE__ */ o("div", { className: "flex flex-col gap-2 w-full pb-6", children: e.map((t, r) => /* @__PURE__ */ o(
|
|
4739
|
-
|
|
4756
|
+
Oc,
|
|
4740
4757
|
{
|
|
4741
4758
|
chainType: t.chainType,
|
|
4742
4759
|
provider: t.provider,
|
|
4743
4760
|
onSelect: () => n(t.chainType)
|
|
4744
4761
|
},
|
|
4745
4762
|
`${t.chainType}-${t.protocol}-${r}`
|
|
4746
|
-
)) }),
|
|
4747
|
-
const e =
|
|
4763
|
+
)) }), Lc = () => {
|
|
4764
|
+
const e = V(X);
|
|
4748
4765
|
if (!e)
|
|
4749
4766
|
throw new Error("WalletConnectContext not found");
|
|
4750
4767
|
const { connectWallet: n } = Oe(), { currentWallet: t } = e.account;
|
|
@@ -4756,7 +4773,7 @@ const Cn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4756
4773
|
...d,
|
|
4757
4774
|
chainType: l
|
|
4758
4775
|
}));
|
|
4759
|
-
}, [t?.connectors, e.config?.chains]), i =
|
|
4776
|
+
}, [t?.connectors, e.config?.chains]), i = k(
|
|
4760
4777
|
async (a) => {
|
|
4761
4778
|
if (!t) {
|
|
4762
4779
|
console.error("Current wallet not found");
|
|
@@ -4776,13 +4793,13 @@ const Cn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4776
4793
|
] }),
|
|
4777
4794
|
/* @__PURE__ */ o(kc, { providers: s, onSelect: i })
|
|
4778
4795
|
] }) });
|
|
4779
|
-
}, Zc = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUwIiBoZWlnaHQ9IjE1MCIgdmlld0JveD0iMCAwIDE1MCAxNTAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPGZvcmVpZ25PYmplY3QgeD0iMjEuMDg4MiIgeT0iMjEuNTg0My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RzPSJ1c2VyU3BhY2VPblVzZSI+CjxzdG9wIHN0b3AtY29sb3I9IndoaXRlIiBzdG9wLW9wYWNpdHk9IjAuMiIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IndoaXRlIiBzdG9wLW9wYWNpdHk9IjAiLz4KPC9saW5lYXJHcmFkaWVudD4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDZfbGluZWFyXzE0MV8xMDk0IiB4MT0iNjUuMjkxIiB5MT0iNTAuOTEyOSIgeDI9Ijk4LjU4NDMiIHkyPSI2NS41ODY0IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CjxzdG9wIHN0b3AtY29sb3I9IiNCQkZGQTEiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjQUNGRThCIi8+CjwvbGluZWFyR3JhZGllbnQ+CjwvZGVmcz4KPC9zdmc+Cg==", Jc = () => {
|
|
4797
|
+
const [e, n] = Y(!1), [t, r] = Y(null), s = V(X);
|
|
4781
4798
|
if (!s)
|
|
4782
4799
|
throw new Error("WalletConnectContext not found");
|
|
4783
4800
|
const { onCancel: i, onConfirm: a } = s.modal.state, c = () => {
|
|
4784
4801
|
i?.(), s.modal.closeModal();
|
|
4785
|
-
}, l = ce(null), { mutate: d, isPending:
|
|
4802
|
+
}, l = ce(null), { mutate: d, isPending: A } = En({
|
|
4786
4803
|
mutationKey: ["sign-in-wallet"],
|
|
4787
4804
|
mutationFn: async () => a?.(),
|
|
4788
4805
|
onSuccess: () => {
|
|
@@ -4797,7 +4814,7 @@ const Cn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4797
4814
|
}, 1e3)), () => {
|
|
4798
4815
|
l.current && (clearTimeout(l.current), l.current = null);
|
|
4799
4816
|
}), [e, s.modal]), /* @__PURE__ */ o(F, { 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: [
|
|
4800
|
-
/* @__PURE__ */ o(fe, { src: e ?
|
|
4817
|
+
/* @__PURE__ */ o(fe, { src: e ? Zc : Yc, alt: "Sign In Icon", className: "rounded-full" }),
|
|
4801
4818
|
/* @__PURE__ */ C("div", { className: "text-sm text-center", children: [
|
|
4802
4819
|
/* @__PURE__ */ o("p", { className: "text-foreground", children: e ? "Ownership verified" : "Verify yourself as the owner of this wallet" }),
|
|
4803
4820
|
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." })
|
|
@@ -4809,9 +4826,9 @@ const Cn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4809
4826
|
size: "lg",
|
|
4810
4827
|
color: "primary",
|
|
4811
4828
|
onPress: () => d(),
|
|
4812
|
-
disabled:
|
|
4829
|
+
disabled: A || e,
|
|
4813
4830
|
className: "rounded-full bg-primary disabled:bg-primary-50",
|
|
4814
|
-
startContent:
|
|
4831
|
+
startContent: A ? /* @__PURE__ */ o(
|
|
4815
4832
|
ue,
|
|
4816
4833
|
{
|
|
4817
4834
|
size: "sm",
|
|
@@ -4821,19 +4838,19 @@ const Cn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4821
4838
|
}
|
|
4822
4839
|
}
|
|
4823
4840
|
) : null,
|
|
4824
|
-
children:
|
|
4841
|
+
children: A ? "Waiting confirmation" : e ? "Signed" : "Sign In"
|
|
4825
4842
|
}
|
|
4826
4843
|
) })
|
|
4827
4844
|
] }) });
|
|
4828
|
-
},
|
|
4829
|
-
const e =
|
|
4845
|
+
}, Dc = "Please reselect the network you want to switch to", Fc = ae.unsupported, Hc = () => {
|
|
4846
|
+
const e = V(X);
|
|
4830
4847
|
if (!e)
|
|
4831
4848
|
throw new Error("WalletConnectContext not found");
|
|
4832
4849
|
const n = e.modal.state?.name || "-", t = () => {
|
|
4833
4850
|
e?.modal.backView();
|
|
4834
4851
|
};
|
|
4835
4852
|
return /* @__PURE__ */ o(F, { title: "Select network", onBack: t, children: /* @__PURE__ */ C("div", { className: "flex flex-col items-center justify-center", children: [
|
|
4836
|
-
/* @__PURE__ */ o("div", { className: "flex justify-center", children: /* @__PURE__ */ o(ze, { icon:
|
|
4853
|
+
/* @__PURE__ */ o("div", { className: "flex justify-center", children: /* @__PURE__ */ o(ze, { icon: Fc, className: "size-14 overflow-hidden rounded-full" }) }),
|
|
4837
4854
|
/* @__PURE__ */ C("div", { className: "mt-6 flex flex-col justify-center items-center", children: [
|
|
4838
4855
|
/* @__PURE__ */ C("div", { className: "text-t1 text-sm text-center", children: [
|
|
4839
4856
|
"Current Wallet Does Not Support ",
|
|
@@ -4842,35 +4859,35 @@ const Cn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4842
4859
|
n,
|
|
4843
4860
|
" Chain"
|
|
4844
4861
|
] }),
|
|
4845
|
-
/* @__PURE__ */ o("div", { className: "text-[#A9A29D] mt-2 text-sm text-center", children:
|
|
4862
|
+
/* @__PURE__ */ o("div", { className: "text-[#A9A29D] mt-2 text-sm text-center", children: Dc })
|
|
4846
4863
|
] }),
|
|
4847
4864
|
/* @__PURE__ */ o(L, { className: "w-full my-4", onPress: t, children: "Got it" })
|
|
4848
4865
|
] }) });
|
|
4849
|
-
},
|
|
4850
|
-
const e =
|
|
4866
|
+
}, Qc = () => {
|
|
4867
|
+
const e = V(X);
|
|
4851
4868
|
if (!e)
|
|
4852
4869
|
throw new Error("WalletConnectContext not found");
|
|
4853
4870
|
const { currentWallet: n } = e.account;
|
|
4854
4871
|
if (!n)
|
|
4855
4872
|
throw new Error("Current wallet not found");
|
|
4856
|
-
const [t, r] = Y(""), { copy: s, copied: i } =
|
|
4873
|
+
const [t, r] = Y(""), { copy: s, copied: i } = Ln(), a = () => {
|
|
4857
4874
|
s(t);
|
|
4858
4875
|
}, c = e.modal.state?.chainType || "evm", l = y(() => n.providers?.[c]?.provider, [n, c]);
|
|
4859
4876
|
return J(() => {
|
|
4860
4877
|
if (l && l && typeof l.on == "function" && typeof l.off == "function") {
|
|
4861
|
-
const
|
|
4862
|
-
r(
|
|
4878
|
+
const A = (f) => {
|
|
4879
|
+
r(f.uri);
|
|
4863
4880
|
};
|
|
4864
4881
|
try {
|
|
4865
|
-
l.on("uri_changed",
|
|
4866
|
-
} catch (
|
|
4867
|
-
throw console.warn("Failed to register event listener:",
|
|
4882
|
+
l.on("uri_changed", A);
|
|
4883
|
+
} catch (f) {
|
|
4884
|
+
throw console.warn("Failed to register event listener:", f), f;
|
|
4868
4885
|
}
|
|
4869
4886
|
return () => {
|
|
4870
4887
|
try {
|
|
4871
|
-
l.off("uri_changed",
|
|
4872
|
-
} catch (
|
|
4873
|
-
throw console.warn("Failed to remove event listener:",
|
|
4888
|
+
l.off("uri_changed", A);
|
|
4889
|
+
} catch (f) {
|
|
4890
|
+
throw console.warn("Failed to remove event listener:", f), f;
|
|
4874
4891
|
}
|
|
4875
4892
|
};
|
|
4876
4893
|
}
|
|
@@ -4889,40 +4906,40 @@ const Cn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4889
4906
|
/* @__PURE__ */ o(L, { variant: "light", size: "lg", fullWidth: !0, onPress: a, children: i ? "Copied!" : "Copy Link" })
|
|
4890
4907
|
] }) });
|
|
4891
4908
|
}, Or = {
|
|
4892
|
-
[
|
|
4893
|
-
[
|
|
4894
|
-
[
|
|
4895
|
-
[
|
|
4896
|
-
[
|
|
4897
|
-
[
|
|
4898
|
-
[
|
|
4899
|
-
[
|
|
4900
|
-
[
|
|
4901
|
-
[
|
|
4902
|
-
[
|
|
4903
|
-
[
|
|
4904
|
-
[
|
|
4905
|
-
[
|
|
4906
|
-
},
|
|
4907
|
-
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(Wt, {}) }) : null, [r]), a = y(() => n ? null : /* @__PURE__ */ C(
|
|
4909
|
+
[M.Loading]: () => /* @__PURE__ */ o(rc, {}),
|
|
4910
|
+
[M.Error]: () => /* @__PURE__ */ o(qo, {}),
|
|
4911
|
+
[M.Connecting]: () => /* @__PURE__ */ o(Ko, {}),
|
|
4912
|
+
[M.WalletList]: () => /* @__PURE__ */ o(uc, {}),
|
|
4913
|
+
[M.WalletSearch]: () => /* @__PURE__ */ o(pc, {}),
|
|
4914
|
+
[M.WalletSelectProviders]: () => /* @__PURE__ */ o(Lc, {}),
|
|
4915
|
+
[M.WalletInstallGuide]: () => /* @__PURE__ */ o(tc, {}),
|
|
4916
|
+
[M.Account]: () => /* @__PURE__ */ o(Fo, {}),
|
|
4917
|
+
[M.SelectChains]: () => /* @__PURE__ */ o(Sc, {}),
|
|
4918
|
+
[M.ChangeNetwork]: () => /* @__PURE__ */ o(Ho, {}),
|
|
4919
|
+
[M.SignInWallet]: () => /* @__PURE__ */ o(Jc, {}),
|
|
4920
|
+
[M.WalletConnect]: () => /* @__PURE__ */ o(Qc, {}),
|
|
4921
|
+
[M.UnsupportChain]: () => /* @__PURE__ */ o(Hc, {}),
|
|
4922
|
+
[M.WalletHome]: () => /* @__PURE__ */ o(Bc, {})
|
|
4923
|
+
}, Kc = (e) => {
|
|
4924
|
+
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(Wt, {}) }) : null, [r]), a = y(() => n ? null : /* @__PURE__ */ C(_r, { className: "flex items-center justify-between", children: [
|
|
4908
4925
|
i,
|
|
4909
4926
|
/* @__PURE__ */ o("span", { children: e.title }),
|
|
4910
4927
|
/* @__PURE__ */ o(L, { isIconOnly: !0, size: "sm", variant: "light", onPress: e.onClose, radius: "full", children: /* @__PURE__ */ o(Mt, {}) })
|
|
4911
|
-
] }), [n, e.title, e.onClose, i]), c = y(() => t ? null : /* @__PURE__ */ o(
|
|
4928
|
+
] }), [n, e.title, e.onClose, i]), c = y(() => t ? null : /* @__PURE__ */ o($r, { className: "px-5", children: e.children }), [t, e.children]);
|
|
4912
4929
|
return /* @__PURE__ */ o(
|
|
4913
4930
|
Xt,
|
|
4914
4931
|
{
|
|
4915
4932
|
...s,
|
|
4916
4933
|
hideCloseButton: !0,
|
|
4917
4934
|
portalContainer: document.getElementById("modal-container") || void 0,
|
|
4918
|
-
children: /* @__PURE__ */ C(
|
|
4935
|
+
children: /* @__PURE__ */ C(es, { className: "bg-content1", children: [
|
|
4919
4936
|
a,
|
|
4920
4937
|
c
|
|
4921
4938
|
] })
|
|
4922
4939
|
}
|
|
4923
4940
|
);
|
|
4924
|
-
},
|
|
4925
|
-
const e =
|
|
4941
|
+
}, qc = () => {
|
|
4942
|
+
const e = V(X);
|
|
4926
4943
|
if (!e)
|
|
4927
4944
|
return null;
|
|
4928
4945
|
const { modal: n, connection: t } = e, r = () => {
|
|
@@ -4930,7 +4947,7 @@ const Cn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4930
4947
|
return s ? s(e) : null;
|
|
4931
4948
|
};
|
|
4932
4949
|
return /* @__PURE__ */ o(
|
|
4933
|
-
|
|
4950
|
+
Kc,
|
|
4934
4951
|
{
|
|
4935
4952
|
hideHeader: !0,
|
|
4936
4953
|
isOpen: n.isOpen,
|
|
@@ -4941,23 +4958,23 @@ const Cn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4941
4958
|
}
|
|
4942
4959
|
);
|
|
4943
4960
|
};
|
|
4944
|
-
function
|
|
4961
|
+
function Uc(e) {
|
|
4945
4962
|
if (!e) return !0;
|
|
4946
4963
|
const n = e.basicLogins?.includes("email") ?? !1, t = (e.socialLogins?.length ?? 0) > 0;
|
|
4947
4964
|
return n || t;
|
|
4948
4965
|
}
|
|
4949
|
-
function
|
|
4966
|
+
function Gc(e, n) {
|
|
4950
4967
|
return n ? e?.error ? "error" : !e || e.isLoading ? "initializing" : e.wallet ? "ready" : "unavailable" : "disabled";
|
|
4951
4968
|
}
|
|
4952
|
-
function
|
|
4969
|
+
function Rc(e, n) {
|
|
4953
4970
|
return n ? "connecting" : e ? "connected" : "disconnected";
|
|
4954
4971
|
}
|
|
4955
|
-
const
|
|
4956
|
-
async function
|
|
4957
|
-
const t =
|
|
4972
|
+
const _c = ["embeddedWallet"];
|
|
4973
|
+
async function $c(e, n) {
|
|
4974
|
+
const t = ms.getInstance(), r = await t.init({
|
|
4958
4975
|
...e,
|
|
4959
4976
|
clientId: e.clientId,
|
|
4960
|
-
stage: e.stage ||
|
|
4977
|
+
stage: e.stage || "prod"
|
|
4961
4978
|
});
|
|
4962
4979
|
if (n?.aborted)
|
|
4963
4980
|
throw new Error("Aborted");
|
|
@@ -4970,7 +4987,7 @@ async function ea(e, n) {
|
|
|
4970
4987
|
connectedInfo: r.connectedInfo ?? null
|
|
4971
4988
|
};
|
|
4972
4989
|
}
|
|
4973
|
-
const
|
|
4990
|
+
const ea = ({
|
|
4974
4991
|
config: e,
|
|
4975
4992
|
setMainView: n,
|
|
4976
4993
|
defaultMainView: t,
|
|
@@ -4979,13 +4996,10 @@ const na = ({
|
|
|
4979
4996
|
themeMode: i
|
|
4980
4997
|
}) => {
|
|
4981
4998
|
const a = Tn({
|
|
4982
|
-
queryKey: [
|
|
4983
|
-
queryFn: ({ signal:
|
|
4984
|
-
enabled: r
|
|
4985
|
-
|
|
4986
|
-
refetchOnReconnect: !1,
|
|
4987
|
-
staleTime: 1 / 0
|
|
4988
|
-
}), { data: c, isLoading: l, isError: d, error: f } = a;
|
|
4999
|
+
queryKey: [..._c, e.clientId, e.stage ?? "prod"],
|
|
5000
|
+
queryFn: ({ signal: f }) => $c(e, f),
|
|
5001
|
+
enabled: r
|
|
5002
|
+
}), { data: c, isLoading: l, isError: d, error: A } = a;
|
|
4989
5003
|
return J(() => {
|
|
4990
5004
|
if (!r) {
|
|
4991
5005
|
n(t);
|
|
@@ -4997,15 +5011,15 @@ const na = ({
|
|
|
4997
5011
|
...s,
|
|
4998
5012
|
defaultTheme: i || s.defaultTheme || "light"
|
|
4999
5013
|
});
|
|
5000
|
-
}, [s, i, c?.wallet]), d &&
|
|
5014
|
+
}, [s, i, c?.wallet]), d && A && console.error("Failed to initialize embedded wallet:", A), {
|
|
5001
5015
|
wallet: c?.wallet ?? null,
|
|
5002
5016
|
isAvailable: c?.isAvailable ?? !1,
|
|
5003
5017
|
message: c?.message ?? null,
|
|
5004
5018
|
connectedInfo: c?.connectedInfo ?? null,
|
|
5005
5019
|
isLoading: r && l,
|
|
5006
|
-
error: d ?
|
|
5020
|
+
error: d ? A instanceof Error ? A : new Error("Failed to initialize embedded wallet") : null
|
|
5007
5021
|
};
|
|
5008
|
-
},
|
|
5022
|
+
}, na = ({
|
|
5009
5023
|
setWalletState: e,
|
|
5010
5024
|
currentWallet: n,
|
|
5011
5025
|
isConnected: t,
|
|
@@ -5013,13 +5027,13 @@ const na = ({
|
|
|
5013
5027
|
embeddedWalletState: s,
|
|
5014
5028
|
wagmiConfig: i
|
|
5015
5029
|
}) => {
|
|
5016
|
-
const a = ce(!1), { data: c } =
|
|
5030
|
+
const a = ce(!1), { data: c } = ke("all", [], { embeddedWallet: s?.wallet ?? null }), l = y(() => c?.all || [], [c?.all]), d = Sr(), A = Nc();
|
|
5017
5031
|
J(() => {
|
|
5018
5032
|
if (a.current || t || n)
|
|
5019
5033
|
return;
|
|
5020
|
-
const
|
|
5034
|
+
const f = () => {
|
|
5021
5035
|
try {
|
|
5022
|
-
const v = s?.wallet, m =
|
|
5036
|
+
const v = s?.wallet, m = Ss();
|
|
5023
5037
|
if (!m) {
|
|
5024
5038
|
a.current = !0;
|
|
5025
5039
|
return;
|
|
@@ -5089,7 +5103,7 @@ const na = ({
|
|
|
5089
5103
|
currentWallet: g,
|
|
5090
5104
|
currentProvider: W,
|
|
5091
5105
|
providers: D
|
|
5092
|
-
})), d && z === T.EVM && i &&
|
|
5106
|
+
})), d && z === T.EVM && i && A && !A.isConnected) {
|
|
5093
5107
|
const j = Xn(g.info.uuid, g.info.rdns, void 0);
|
|
5094
5108
|
if (j?.ready) {
|
|
5095
5109
|
const U = m.chainId ? parseInt(m.chainId, 16) : void 0;
|
|
@@ -5129,7 +5143,7 @@ const na = ({
|
|
|
5129
5143
|
currentProvider: I.provider,
|
|
5130
5144
|
providers: w
|
|
5131
5145
|
}));
|
|
5132
|
-
const
|
|
5146
|
+
const O = () => {
|
|
5133
5147
|
e((b) => ({
|
|
5134
5148
|
...b,
|
|
5135
5149
|
isConnected: !1,
|
|
@@ -5149,10 +5163,10 @@ const na = ({
|
|
|
5149
5163
|
walletInfo: g.info
|
|
5150
5164
|
}
|
|
5151
5165
|
).then((b) => {
|
|
5152
|
-
b?.address && b.address.toLowerCase() === m.address.toLowerCase() ? console.log("Restoring plugin wallet connection for:", g.info.name) :
|
|
5166
|
+
b?.address && b.address.toLowerCase() === m.address.toLowerCase() ? console.log("Restoring plugin wallet connection for:", g.info.name) : O();
|
|
5153
5167
|
}).catch(() => {
|
|
5154
|
-
|
|
5155
|
-
}), d && m.chainType === T.EVM && i &&
|
|
5168
|
+
O(), console.log("Failed to verify wallet connection");
|
|
5169
|
+
}), d && m.chainType === T.EVM && i && A && !A.isConnected) {
|
|
5156
5170
|
const b = Xn(g.info.uuid, g.info.rdns, void 0);
|
|
5157
5171
|
if (b?.ready) {
|
|
5158
5172
|
const z = m.chainId ? parseInt(m.chainId, 16) : void 0;
|
|
@@ -5164,7 +5178,7 @@ const na = ({
|
|
|
5164
5178
|
a.current = !0, console.error("Failed to restore wallet connection:", v);
|
|
5165
5179
|
}
|
|
5166
5180
|
};
|
|
5167
|
-
l.length > 0 && r !== "initializing" &&
|
|
5181
|
+
l.length > 0 && r !== "initializing" && f();
|
|
5168
5182
|
}, [
|
|
5169
5183
|
l,
|
|
5170
5184
|
e,
|
|
@@ -5174,26 +5188,26 @@ const na = ({
|
|
|
5174
5188
|
r,
|
|
5175
5189
|
d,
|
|
5176
5190
|
i,
|
|
5177
|
-
|
|
5191
|
+
A
|
|
5178
5192
|
]);
|
|
5179
5193
|
};
|
|
5180
|
-
function
|
|
5194
|
+
function ta(e) {
|
|
5181
5195
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
5182
5196
|
}
|
|
5183
5197
|
var xn = { exports: {} }, yt;
|
|
5184
|
-
function
|
|
5198
|
+
function ra() {
|
|
5185
5199
|
return yt || (yt = 1, (function(e) {
|
|
5186
5200
|
var n = Object.prototype.hasOwnProperty, t = "~";
|
|
5187
5201
|
function r() {
|
|
5188
5202
|
}
|
|
5189
5203
|
Object.create && (r.prototype = /* @__PURE__ */ Object.create(null), new r().__proto__ || (t = !1));
|
|
5190
|
-
function s(l, d,
|
|
5191
|
-
this.fn = l, this.context = d, this.once =
|
|
5204
|
+
function s(l, d, A) {
|
|
5205
|
+
this.fn = l, this.context = d, this.once = A || !1;
|
|
5192
5206
|
}
|
|
5193
|
-
function i(l, d,
|
|
5194
|
-
if (typeof
|
|
5207
|
+
function i(l, d, A, f, u) {
|
|
5208
|
+
if (typeof A != "function")
|
|
5195
5209
|
throw new TypeError("The listener must be a function");
|
|
5196
|
-
var v = new s(
|
|
5210
|
+
var v = new s(A, f || l, u), m = t ? t + d : d;
|
|
5197
5211
|
return l._events[m] ? l._events[m].fn ? l._events[m] = [l._events[m], v] : l._events[m].push(v) : (l._events[m] = v, l._eventsCount++), l;
|
|
5198
5212
|
}
|
|
5199
5213
|
function a(l, d) {
|
|
@@ -5203,22 +5217,22 @@ function sa() {
|
|
|
5203
5217
|
this._events = new r(), this._eventsCount = 0;
|
|
5204
5218
|
}
|
|
5205
5219
|
c.prototype.eventNames = function() {
|
|
5206
|
-
var d = [],
|
|
5220
|
+
var d = [], A, f;
|
|
5207
5221
|
if (this._eventsCount === 0) return d;
|
|
5208
|
-
for (
|
|
5209
|
-
n.call(
|
|
5210
|
-
return Object.getOwnPropertySymbols ? d.concat(Object.getOwnPropertySymbols(
|
|
5222
|
+
for (f in A = this._events)
|
|
5223
|
+
n.call(A, f) && d.push(t ? f.slice(1) : f);
|
|
5224
|
+
return Object.getOwnPropertySymbols ? d.concat(Object.getOwnPropertySymbols(A)) : d;
|
|
5211
5225
|
}, c.prototype.listeners = function(d) {
|
|
5212
|
-
var
|
|
5213
|
-
if (!
|
|
5214
|
-
if (
|
|
5215
|
-
for (var u = 0, v =
|
|
5216
|
-
m[u] =
|
|
5226
|
+
var A = t ? t + d : d, f = this._events[A];
|
|
5227
|
+
if (!f) return [];
|
|
5228
|
+
if (f.fn) return [f.fn];
|
|
5229
|
+
for (var u = 0, v = f.length, m = new Array(v); u < v; u++)
|
|
5230
|
+
m[u] = f[u].fn;
|
|
5217
5231
|
return m;
|
|
5218
5232
|
}, c.prototype.listenerCount = function(d) {
|
|
5219
|
-
var
|
|
5220
|
-
return
|
|
5221
|
-
}, c.prototype.emit = function(d,
|
|
5233
|
+
var A = t ? t + d : d, f = this._events[A];
|
|
5234
|
+
return f ? f.fn ? 1 : f.length : 0;
|
|
5235
|
+
}, c.prototype.emit = function(d, A, f, u, v, m) {
|
|
5222
5236
|
var g = t ? t + d : d;
|
|
5223
5237
|
if (!this._events[g]) return !1;
|
|
5224
5238
|
var p = this._events[g], I = arguments.length, x, w;
|
|
@@ -5227,34 +5241,34 @@ function sa() {
|
|
|
5227
5241
|
case 1:
|
|
5228
5242
|
return p.fn.call(p.context), !0;
|
|
5229
5243
|
case 2:
|
|
5230
|
-
return p.fn.call(p.context,
|
|
5244
|
+
return p.fn.call(p.context, A), !0;
|
|
5231
5245
|
case 3:
|
|
5232
|
-
return p.fn.call(p.context,
|
|
5246
|
+
return p.fn.call(p.context, A, f), !0;
|
|
5233
5247
|
case 4:
|
|
5234
|
-
return p.fn.call(p.context,
|
|
5248
|
+
return p.fn.call(p.context, A, f, u), !0;
|
|
5235
5249
|
case 5:
|
|
5236
|
-
return p.fn.call(p.context,
|
|
5250
|
+
return p.fn.call(p.context, A, f, u, v), !0;
|
|
5237
5251
|
case 6:
|
|
5238
|
-
return p.fn.call(p.context,
|
|
5252
|
+
return p.fn.call(p.context, A, f, u, v, m), !0;
|
|
5239
5253
|
}
|
|
5240
5254
|
for (w = 1, x = new Array(I - 1); w < I; w++)
|
|
5241
5255
|
x[w - 1] = arguments[w];
|
|
5242
5256
|
p.fn.apply(p.context, x);
|
|
5243
5257
|
} else {
|
|
5244
|
-
var
|
|
5245
|
-
for (w = 0; w <
|
|
5258
|
+
var O = p.length, b;
|
|
5259
|
+
for (w = 0; w < O; w++)
|
|
5246
5260
|
switch (p[w].once && this.removeListener(d, p[w].fn, void 0, !0), I) {
|
|
5247
5261
|
case 1:
|
|
5248
5262
|
p[w].fn.call(p[w].context);
|
|
5249
5263
|
break;
|
|
5250
5264
|
case 2:
|
|
5251
|
-
p[w].fn.call(p[w].context,
|
|
5265
|
+
p[w].fn.call(p[w].context, A);
|
|
5252
5266
|
break;
|
|
5253
5267
|
case 3:
|
|
5254
|
-
p[w].fn.call(p[w].context,
|
|
5268
|
+
p[w].fn.call(p[w].context, A, f);
|
|
5255
5269
|
break;
|
|
5256
5270
|
case 4:
|
|
5257
|
-
p[w].fn.call(p[w].context,
|
|
5271
|
+
p[w].fn.call(p[w].context, A, f, u);
|
|
5258
5272
|
break;
|
|
5259
5273
|
default:
|
|
5260
5274
|
if (!x) for (b = 1, x = new Array(I - 1); b < I; b++)
|
|
@@ -5263,33 +5277,33 @@ function sa() {
|
|
|
5263
5277
|
}
|
|
5264
5278
|
}
|
|
5265
5279
|
return !0;
|
|
5266
|
-
}, c.prototype.on = function(d,
|
|
5267
|
-
return i(this, d,
|
|
5268
|
-
}, c.prototype.once = function(d,
|
|
5269
|
-
return i(this, d,
|
|
5270
|
-
}, c.prototype.removeListener = function(d,
|
|
5280
|
+
}, c.prototype.on = function(d, A, f) {
|
|
5281
|
+
return i(this, d, A, f, !1);
|
|
5282
|
+
}, c.prototype.once = function(d, A, f) {
|
|
5283
|
+
return i(this, d, A, f, !0);
|
|
5284
|
+
}, c.prototype.removeListener = function(d, A, f, u) {
|
|
5271
5285
|
var v = t ? t + d : d;
|
|
5272
5286
|
if (!this._events[v]) return this;
|
|
5273
|
-
if (!
|
|
5287
|
+
if (!A)
|
|
5274
5288
|
return a(this, v), this;
|
|
5275
5289
|
var m = this._events[v];
|
|
5276
5290
|
if (m.fn)
|
|
5277
|
-
m.fn ===
|
|
5291
|
+
m.fn === A && (!u || m.once) && (!f || m.context === f) && a(this, v);
|
|
5278
5292
|
else {
|
|
5279
5293
|
for (var g = 0, p = [], I = m.length; g < I; g++)
|
|
5280
|
-
(m[g].fn !==
|
|
5294
|
+
(m[g].fn !== A || u && !m[g].once || f && m[g].context !== f) && p.push(m[g]);
|
|
5281
5295
|
p.length ? this._events[v] = p.length === 1 ? p[0] : p : a(this, v);
|
|
5282
5296
|
}
|
|
5283
5297
|
return this;
|
|
5284
5298
|
}, c.prototype.removeAllListeners = function(d) {
|
|
5285
|
-
var
|
|
5286
|
-
return d ? (
|
|
5299
|
+
var A;
|
|
5300
|
+
return d ? (A = t ? t + d : d, this._events[A] && a(this, A)) : (this._events = new r(), this._eventsCount = 0), this;
|
|
5287
5301
|
}, c.prototype.off = c.prototype.removeListener, c.prototype.addListener = c.prototype.on, c.prefixed = t, c.EventEmitter = c, e.exports = c;
|
|
5288
5302
|
})(xn)), xn.exports;
|
|
5289
5303
|
}
|
|
5290
|
-
var
|
|
5291
|
-
const
|
|
5292
|
-
class
|
|
5304
|
+
var sa = ra();
|
|
5305
|
+
const ia = /* @__PURE__ */ ta(sa);
|
|
5306
|
+
class oa {
|
|
5293
5307
|
constructor(n) {
|
|
5294
5308
|
Object.defineProperty(this, "uid", {
|
|
5295
5309
|
enumerable: !0,
|
|
@@ -5300,7 +5314,7 @@ class ca {
|
|
|
5300
5314
|
enumerable: !0,
|
|
5301
5315
|
configurable: !0,
|
|
5302
5316
|
writable: !0,
|
|
5303
|
-
value: new
|
|
5317
|
+
value: new ia()
|
|
5304
5318
|
});
|
|
5305
5319
|
}
|
|
5306
5320
|
on(n, t) {
|
|
@@ -5320,12 +5334,12 @@ class ca {
|
|
|
5320
5334
|
return this._emitter.listenerCount(n);
|
|
5321
5335
|
}
|
|
5322
5336
|
}
|
|
5323
|
-
function
|
|
5324
|
-
return new
|
|
5337
|
+
function ca(e) {
|
|
5338
|
+
return new oa(e);
|
|
5325
5339
|
}
|
|
5326
5340
|
const Nn = 256;
|
|
5327
5341
|
let Qe = Nn, Ke;
|
|
5328
|
-
function
|
|
5342
|
+
function aa(e = 11) {
|
|
5329
5343
|
if (!Ke || Qe + e > Nn * 2) {
|
|
5330
5344
|
Ke = "", Qe = 0;
|
|
5331
5345
|
for (let n = 0; n < Nn; n++)
|
|
@@ -5333,18 +5347,18 @@ function la(e = 11) {
|
|
|
5333
5347
|
}
|
|
5334
5348
|
return Ke.substring(Qe, Qe++ + e);
|
|
5335
5349
|
}
|
|
5336
|
-
const
|
|
5350
|
+
const la = "2.22.1", da = () => `@wagmi/core@${la}`;
|
|
5337
5351
|
var kr = function(e, n, t, r) {
|
|
5338
5352
|
if (t === "a" && !r) throw new TypeError("Private accessor was defined without a getter");
|
|
5339
5353
|
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");
|
|
5340
5354
|
return t === "m" ? r : t === "a" ? r.call(e) : r ? r.value : n.get(e);
|
|
5341
|
-
}, nn,
|
|
5355
|
+
}, nn, Lr;
|
|
5342
5356
|
class je extends Error {
|
|
5343
5357
|
get docsBaseUrl() {
|
|
5344
5358
|
return "https://wagmi.sh/core";
|
|
5345
5359
|
}
|
|
5346
5360
|
get version() {
|
|
5347
|
-
return
|
|
5361
|
+
return da();
|
|
5348
5362
|
}
|
|
5349
5363
|
constructor(n, t = {}) {
|
|
5350
5364
|
super(), nn.add(this), Object.defineProperty(this, "details", {
|
|
@@ -5387,13 +5401,13 @@ class je extends Error {
|
|
|
5387
5401
|
`), t.cause && (this.cause = t.cause), this.details = r, this.docsPath = s, this.metaMessages = t.metaMessages, this.shortMessage = n;
|
|
5388
5402
|
}
|
|
5389
5403
|
walk(n) {
|
|
5390
|
-
return kr(this, nn, "m",
|
|
5404
|
+
return kr(this, nn, "m", Lr).call(this, this, n);
|
|
5391
5405
|
}
|
|
5392
5406
|
}
|
|
5393
|
-
nn = /* @__PURE__ */ new WeakSet(),
|
|
5407
|
+
nn = /* @__PURE__ */ new WeakSet(), Lr = function e(n, t) {
|
|
5394
5408
|
return t?.(n) ? n : n.cause ? kr(this, nn, "m", e).call(this, n.cause, t) : n;
|
|
5395
5409
|
};
|
|
5396
|
-
class
|
|
5410
|
+
class Aa extends je {
|
|
5397
5411
|
constructor() {
|
|
5398
5412
|
super("Chain not configured."), Object.defineProperty(this, "name", {
|
|
5399
5413
|
enumerable: !0,
|
|
@@ -5424,7 +5438,7 @@ function _n(e = {}) {
|
|
|
5424
5438
|
return d;
|
|
5425
5439
|
}
|
|
5426
5440
|
return typeof l == "object" ? l : typeof l == "string" ? {
|
|
5427
|
-
...
|
|
5441
|
+
...fa[l] ?? {
|
|
5428
5442
|
id: l,
|
|
5429
5443
|
name: `${l[0].toUpperCase()}${l.slice(1)}`,
|
|
5430
5444
|
provider: `is${l[0].toUpperCase()}${l.slice(1)}`
|
|
@@ -5457,12 +5471,12 @@ function _n(e = {}) {
|
|
|
5457
5471
|
const d = await this.getProvider();
|
|
5458
5472
|
d?.on && e.target && (a || (a = this.onConnect.bind(this), d.on("connect", a)), s || (s = this.onAccountsChanged.bind(this), d.on("accountsChanged", s)));
|
|
5459
5473
|
},
|
|
5460
|
-
async connect({ chainId: d, isReconnecting:
|
|
5474
|
+
async connect({ chainId: d, isReconnecting: A, withCapabilities: f } = {}) {
|
|
5461
5475
|
const u = await this.getProvider();
|
|
5462
5476
|
if (!u)
|
|
5463
5477
|
throw new ve();
|
|
5464
5478
|
let v = [];
|
|
5465
|
-
if (
|
|
5479
|
+
if (A)
|
|
5466
5480
|
v = await this.getAccounts().catch(() => []);
|
|
5467
5481
|
else if (n)
|
|
5468
5482
|
try {
|
|
@@ -5478,7 +5492,7 @@ function _n(e = {}) {
|
|
|
5478
5492
|
throw g;
|
|
5479
5493
|
}
|
|
5480
5494
|
try {
|
|
5481
|
-
!v?.length && !
|
|
5495
|
+
!v?.length && !A && (v = (await u.request({
|
|
5482
5496
|
method: "eth_requestAccounts"
|
|
5483
5497
|
})).map((p) => Je(p))), a && (u.removeListener("connect", a), a = void 0), s || (s = this.onAccountsChanged.bind(this), u.on("accountsChanged", s)), i || (i = this.onChainChanged.bind(this), u.on("chainChanged", i)), c || (c = this.onDisconnect.bind(this), u.on("disconnect", c));
|
|
5484
5498
|
let m = await this.getChainId();
|
|
@@ -5487,7 +5501,7 @@ function _n(e = {}) {
|
|
|
5487
5501
|
throw p;
|
|
5488
5502
|
return { id: m };
|
|
5489
5503
|
}))?.id ?? m), n && await l.storage?.removeItem(`${this.id}.disconnected`), e.target || await l.storage?.setItem("injected.connected", !0), {
|
|
5490
|
-
accounts:
|
|
5504
|
+
accounts: f ? v.map((g) => ({ address: g, capabilities: {} })) : v,
|
|
5491
5505
|
chainId: m
|
|
5492
5506
|
};
|
|
5493
5507
|
} catch (m) {
|
|
@@ -5501,7 +5515,7 @@ function _n(e = {}) {
|
|
|
5501
5515
|
throw new ve();
|
|
5502
5516
|
i && (d.removeListener("chainChanged", i), i = void 0), c && (d.removeListener("disconnect", c), c = void 0), a || (a = this.onConnect.bind(this), d.on("connect", a));
|
|
5503
5517
|
try {
|
|
5504
|
-
await
|
|
5518
|
+
await Cs(() => (
|
|
5505
5519
|
// TODO: Remove explicit type for viem@3
|
|
5506
5520
|
d.request({
|
|
5507
5521
|
// `'wallet_revokePermissions'` added in `viem@2.10.3`
|
|
@@ -5517,21 +5531,21 @@ function _n(e = {}) {
|
|
|
5517
5531
|
const d = await this.getProvider();
|
|
5518
5532
|
if (!d)
|
|
5519
5533
|
throw new ve();
|
|
5520
|
-
return (await d.request({ method: "eth_accounts" })).map((
|
|
5534
|
+
return (await d.request({ method: "eth_accounts" })).map((f) => Je(f));
|
|
5521
5535
|
},
|
|
5522
5536
|
async getChainId() {
|
|
5523
5537
|
const d = await this.getProvider();
|
|
5524
5538
|
if (!d)
|
|
5525
5539
|
throw new ve();
|
|
5526
|
-
const
|
|
5527
|
-
return Number(
|
|
5540
|
+
const A = await d.request({ method: "eth_chainId" });
|
|
5541
|
+
return Number(A);
|
|
5528
5542
|
},
|
|
5529
5543
|
async getProvider() {
|
|
5530
5544
|
if (typeof window > "u")
|
|
5531
5545
|
return;
|
|
5532
5546
|
let d;
|
|
5533
|
-
const
|
|
5534
|
-
return typeof
|
|
5547
|
+
const A = r();
|
|
5548
|
+
return typeof A.provider == "function" ? d = A.provider(window) : typeof A.provider == "string" ? d = qe(window, A.provider) : d = A.provider, d && !d.removeListener && ("off" in d && typeof d.off == "function" ? d.removeListener = d.off : d.removeListener = () => {
|
|
5535
5549
|
}), d;
|
|
5536
5550
|
},
|
|
5537
5551
|
async isAuthorized() {
|
|
@@ -5552,31 +5566,31 @@ function _n(e = {}) {
|
|
|
5552
5566
|
}
|
|
5553
5567
|
throw new ve();
|
|
5554
5568
|
}
|
|
5555
|
-
return !!(await
|
|
5569
|
+
return !!(await ps(() => this.getAccounts())).length;
|
|
5556
5570
|
} catch {
|
|
5557
5571
|
return !1;
|
|
5558
5572
|
}
|
|
5559
5573
|
},
|
|
5560
|
-
async switchChain({ addEthereumChainParameter: d, chainId:
|
|
5561
|
-
const
|
|
5562
|
-
if (!
|
|
5574
|
+
async switchChain({ addEthereumChainParameter: d, chainId: A }) {
|
|
5575
|
+
const f = await this.getProvider();
|
|
5576
|
+
if (!f)
|
|
5563
5577
|
throw new ve();
|
|
5564
|
-
const u = l.chains.find((m) => m.id ===
|
|
5578
|
+
const u = l.chains.find((m) => m.id === A);
|
|
5565
5579
|
if (!u)
|
|
5566
|
-
throw new tt(new
|
|
5580
|
+
throw new tt(new Aa());
|
|
5567
5581
|
const v = new Promise((m) => {
|
|
5568
5582
|
const g = ((p) => {
|
|
5569
|
-
"chainId" in p && p.chainId ===
|
|
5583
|
+
"chainId" in p && p.chainId === A && (l.emitter.off("change", g), m());
|
|
5570
5584
|
});
|
|
5571
5585
|
l.emitter.on("change", g);
|
|
5572
5586
|
});
|
|
5573
5587
|
try {
|
|
5574
5588
|
return await Promise.all([
|
|
5575
|
-
|
|
5589
|
+
f.request({
|
|
5576
5590
|
method: "wallet_switchEthereumChain",
|
|
5577
|
-
params: [{ chainId: rt(
|
|
5591
|
+
params: [{ chainId: rt(A) }]
|
|
5578
5592
|
}).then(async () => {
|
|
5579
|
-
await this.getChainId() ===
|
|
5593
|
+
await this.getChainId() === A && l.emitter.emit("change", { chainId: A });
|
|
5580
5594
|
}),
|
|
5581
5595
|
v
|
|
5582
5596
|
]), u;
|
|
@@ -5594,21 +5608,21 @@ function _n(e = {}) {
|
|
|
5594
5608
|
]);
|
|
5595
5609
|
let w;
|
|
5596
5610
|
d?.rpcUrls?.length ? w = d.rpcUrls : w = [u.rpcUrls.default?.http[0] ?? ""];
|
|
5597
|
-
const
|
|
5611
|
+
const O = {
|
|
5598
5612
|
blockExplorerUrls: x,
|
|
5599
|
-
chainId: rt(
|
|
5613
|
+
chainId: rt(A),
|
|
5600
5614
|
chainName: d?.chainName ?? u.name,
|
|
5601
5615
|
iconUrls: d?.iconUrls,
|
|
5602
5616
|
nativeCurrency: d?.nativeCurrency ?? u.nativeCurrency,
|
|
5603
5617
|
rpcUrls: w
|
|
5604
5618
|
};
|
|
5605
5619
|
return await Promise.all([
|
|
5606
|
-
|
|
5620
|
+
f.request({
|
|
5607
5621
|
method: "wallet_addEthereumChain",
|
|
5608
|
-
params: [
|
|
5622
|
+
params: [O]
|
|
5609
5623
|
}).then(async () => {
|
|
5610
|
-
if (await this.getChainId() ===
|
|
5611
|
-
l.emitter.emit("change", { chainId:
|
|
5624
|
+
if (await this.getChainId() === A)
|
|
5625
|
+
l.emitter.emit("change", { chainId: A });
|
|
5612
5626
|
else
|
|
5613
5627
|
throw new G(new Error("User rejected switch after adding network."));
|
|
5614
5628
|
}),
|
|
@@ -5624,33 +5638,33 @@ function _n(e = {}) {
|
|
|
5624
5638
|
if (d.length === 0)
|
|
5625
5639
|
this.onDisconnect();
|
|
5626
5640
|
else if (l.emitter.listenerCount("connect")) {
|
|
5627
|
-
const
|
|
5628
|
-
this.onConnect({ chainId:
|
|
5641
|
+
const A = (await this.getChainId()).toString();
|
|
5642
|
+
this.onConnect({ chainId: A }), n && await l.storage?.removeItem(`${this.id}.disconnected`);
|
|
5629
5643
|
} else
|
|
5630
5644
|
l.emitter.emit("change", {
|
|
5631
|
-
accounts: d.map((
|
|
5645
|
+
accounts: d.map((A) => Je(A))
|
|
5632
5646
|
});
|
|
5633
5647
|
},
|
|
5634
5648
|
onChainChanged(d) {
|
|
5635
|
-
const
|
|
5636
|
-
l.emitter.emit("change", { chainId:
|
|
5649
|
+
const A = Number(d);
|
|
5650
|
+
l.emitter.emit("change", { chainId: A });
|
|
5637
5651
|
},
|
|
5638
5652
|
async onConnect(d) {
|
|
5639
|
-
const
|
|
5640
|
-
if (
|
|
5653
|
+
const A = await this.getAccounts();
|
|
5654
|
+
if (A.length === 0)
|
|
5641
5655
|
return;
|
|
5642
|
-
const
|
|
5643
|
-
l.emitter.emit("connect", { accounts:
|
|
5656
|
+
const f = Number(d.chainId);
|
|
5657
|
+
l.emitter.emit("connect", { accounts: A, chainId: f });
|
|
5644
5658
|
const u = await this.getProvider();
|
|
5645
5659
|
u && (a && (u.removeListener("connect", a), a = void 0), s || (s = this.onAccountsChanged.bind(this), u.on("accountsChanged", s)), i || (i = this.onChainChanged.bind(this), u.on("chainChanged", i)), c || (c = this.onDisconnect.bind(this), u.on("disconnect", c)));
|
|
5646
5660
|
},
|
|
5647
5661
|
async onDisconnect(d) {
|
|
5648
|
-
const
|
|
5649
|
-
d && d.code === 1013 &&
|
|
5662
|
+
const A = await this.getProvider();
|
|
5663
|
+
d && d.code === 1013 && A && (await this.getAccounts()).length || (l.emitter.emit("disconnect"), A && (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))));
|
|
5650
5664
|
}
|
|
5651
5665
|
});
|
|
5652
5666
|
}
|
|
5653
|
-
const
|
|
5667
|
+
const fa = {
|
|
5654
5668
|
coinbaseWallet: {
|
|
5655
5669
|
id: "coinbaseWallet",
|
|
5656
5670
|
name: "Coinbase Wallet",
|
|
@@ -5710,14 +5724,14 @@ function qe(e, n) {
|
|
|
5710
5724
|
if (r && t(r))
|
|
5711
5725
|
return r;
|
|
5712
5726
|
}
|
|
5713
|
-
function
|
|
5727
|
+
function ua(e, n = T.EVM) {
|
|
5714
5728
|
if (!e.providers[n])
|
|
5715
5729
|
return null;
|
|
5716
5730
|
const t = e.providers[n]?.provider;
|
|
5717
5731
|
if (!t)
|
|
5718
5732
|
return null;
|
|
5719
5733
|
const r = e.info, s = r.rdns || r.uuid || `wallet-${r.name.toLowerCase().replace(/\s+/g, "-")}`;
|
|
5720
|
-
return
|
|
5734
|
+
return vs((i) => ({
|
|
5721
5735
|
..._n({
|
|
5722
5736
|
target: () => ({
|
|
5723
5737
|
id: s,
|
|
@@ -5733,14 +5747,14 @@ function ga(e, n = T.EVM) {
|
|
|
5733
5747
|
emitter: i.emitter
|
|
5734
5748
|
}));
|
|
5735
5749
|
}
|
|
5736
|
-
function
|
|
5750
|
+
function ga(e, n = T.EVM, t) {
|
|
5737
5751
|
const r = [];
|
|
5738
5752
|
if (t.length === 0)
|
|
5739
5753
|
return r;
|
|
5740
5754
|
for (const s of e) {
|
|
5741
|
-
const i =
|
|
5755
|
+
const i = ua(s, n);
|
|
5742
5756
|
if (i) {
|
|
5743
|
-
const a = aa(
|
|
5757
|
+
const a = ca(aa());
|
|
5744
5758
|
r.push(
|
|
5745
5759
|
i({
|
|
5746
5760
|
chains: t,
|
|
@@ -5751,36 +5765,36 @@ function va(e, n = T.EVM, t) {
|
|
|
5751
5765
|
}
|
|
5752
5766
|
return r;
|
|
5753
5767
|
}
|
|
5754
|
-
function
|
|
5768
|
+
function va(e, n = []) {
|
|
5755
5769
|
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)));
|
|
5756
5770
|
for (const i of e)
|
|
5757
5771
|
s.has(r(i)) || t.push(i);
|
|
5758
5772
|
return t;
|
|
5759
5773
|
}
|
|
5760
|
-
const
|
|
5774
|
+
const ma = ({
|
|
5761
5775
|
children: e,
|
|
5762
5776
|
contextConfig: n,
|
|
5763
5777
|
defaultThemeConfig: t,
|
|
5764
5778
|
defaultMainView: r,
|
|
5765
5779
|
socialLoginEnabled: s
|
|
5766
5780
|
}) => {
|
|
5767
|
-
const [i, a] = Y(
|
|
5781
|
+
const [i, a] = Y(M.Loading), { walletState: c, setWalletState: l, error: d, setError: A, resetWalletState: f } = Pr(), {
|
|
5768
5782
|
wallet: u,
|
|
5769
5783
|
isAvailable: v,
|
|
5770
5784
|
isLoading: m,
|
|
5771
5785
|
connectedInfo: g,
|
|
5772
5786
|
message: p,
|
|
5773
5787
|
error: I
|
|
5774
|
-
} =
|
|
5788
|
+
} = ea({
|
|
5775
5789
|
config: n.embeddedWalletConfig,
|
|
5776
5790
|
setMainView: a,
|
|
5777
5791
|
defaultMainView: r,
|
|
5778
5792
|
enabled: s,
|
|
5779
5793
|
defaultTheme: t,
|
|
5780
5794
|
themeMode: n.themeMode
|
|
5781
|
-
}), x =
|
|
5782
|
-
x.setView(c.isConnected ?
|
|
5783
|
-
}, [x, c.isConnected, i]),
|
|
5795
|
+
}), x = Mc(i), w = k(() => {
|
|
5796
|
+
x.setView(c.isConnected ? M.Account : i), x.openModal();
|
|
5797
|
+
}, [x, c.isConnected, i]), O = y(
|
|
5784
5798
|
() => ({
|
|
5785
5799
|
isOpen: x.isOpen,
|
|
5786
5800
|
view: x.view,
|
|
@@ -5808,16 +5822,16 @@ const pa = ({
|
|
|
5808
5822
|
w,
|
|
5809
5823
|
i
|
|
5810
5824
|
]
|
|
5811
|
-
), b =
|
|
5825
|
+
), b = Rc(c.isConnected, c.isConnecting), z = y(
|
|
5812
5826
|
() => ({
|
|
5813
5827
|
connectionStatus: b,
|
|
5814
5828
|
isConnected: c.isConnected,
|
|
5815
5829
|
isConnecting: c.isConnecting,
|
|
5816
5830
|
isDisconnected: b === "disconnected",
|
|
5817
5831
|
error: d,
|
|
5818
|
-
setError:
|
|
5832
|
+
setError: A
|
|
5819
5833
|
}),
|
|
5820
|
-
[b, c.isConnected, c.isConnecting, d,
|
|
5834
|
+
[b, c.isConnected, c.isConnecting, d, A]
|
|
5821
5835
|
), W = y(
|
|
5822
5836
|
() => ({
|
|
5823
5837
|
address: c.address,
|
|
@@ -5846,7 +5860,7 @@ const pa = ({
|
|
|
5846
5860
|
}),
|
|
5847
5861
|
[u, v, m, g, p, I]
|
|
5848
5862
|
), S = y(
|
|
5849
|
-
() =>
|
|
5863
|
+
() => Gc(E, s),
|
|
5850
5864
|
[E, s]
|
|
5851
5865
|
), B = y(
|
|
5852
5866
|
() => ({
|
|
@@ -5858,23 +5872,23 @@ const pa = ({
|
|
|
5858
5872
|
), D = y(
|
|
5859
5873
|
() => ({
|
|
5860
5874
|
config: n,
|
|
5861
|
-
modal:
|
|
5875
|
+
modal: O,
|
|
5862
5876
|
connection: z,
|
|
5863
5877
|
account: W,
|
|
5864
5878
|
walletReady: B
|
|
5865
5879
|
}),
|
|
5866
|
-
[n,
|
|
5867
|
-
), j =
|
|
5880
|
+
[n, O, z, W, B]
|
|
5881
|
+
), j = ke("all", n?.connectors || [], { embeddedWallet: u }), U = n?.wagmi, N = U?.config;
|
|
5868
5882
|
return J(() => {
|
|
5869
5883
|
if (!N || !j.data) {
|
|
5870
5884
|
pn(null);
|
|
5871
5885
|
return;
|
|
5872
5886
|
}
|
|
5873
|
-
const Z = N.connectors ? [...N.connectors] : [], Q = N.chains ? [...N.chains] : [],
|
|
5887
|
+
const Z = N.connectors ? [...N.connectors] : [], Q = N.chains ? [...N.chains] : [], Le = j?.data?.all?.filter((Ze) => Ze.connectors[T.EVM]), Ye = ga(Le || [], T.EVM, Q), ge = va(Ye, Z);
|
|
5874
5888
|
ge.length > 0 ? pn(ge) : pn(null);
|
|
5875
5889
|
}, [j.data, N]), J(() => {
|
|
5876
|
-
|
|
5877
|
-
}, [n?.walletConnectConfig]),
|
|
5890
|
+
cs(n?.walletConnectConfig || Vn);
|
|
5891
|
+
}, [n?.walletConnectConfig]), na({
|
|
5878
5892
|
setWalletState: l,
|
|
5879
5893
|
currentWallet: W.currentWallet,
|
|
5880
5894
|
isConnected: z.isConnected,
|
|
@@ -5882,23 +5896,32 @@ const pa = ({
|
|
|
5882
5896
|
embeddedWalletState: E,
|
|
5883
5897
|
wagmiConfig: U
|
|
5884
5898
|
}), J(() => {
|
|
5885
|
-
const { isConnected: Z, chainType: Q, currentProvider:
|
|
5886
|
-
if (!Z || Q !== T.EVM || !
|
|
5899
|
+
const { isConnected: Z, chainType: Q, currentProvider: Le } = c;
|
|
5900
|
+
if (!Z || Q !== T.EVM || !Le) return;
|
|
5887
5901
|
const Ye = (Ze) => {
|
|
5888
5902
|
l((dn) => dn.chainId === Ze ? dn : { ...dn, chainId: Ze });
|
|
5889
|
-
}, ge =
|
|
5890
|
-
if (typeof ge.on == "function")
|
|
5891
|
-
|
|
5892
|
-
ge.
|
|
5903
|
+
}, ge = Le;
|
|
5904
|
+
if (typeof ge.on == "function") {
|
|
5905
|
+
try {
|
|
5906
|
+
ge.on("chainChanged", Ye);
|
|
5907
|
+
} catch {
|
|
5908
|
+
return;
|
|
5909
|
+
}
|
|
5910
|
+
return () => {
|
|
5911
|
+
try {
|
|
5912
|
+
ge.removeListener?.("chainChanged", Ye);
|
|
5913
|
+
} catch {
|
|
5914
|
+
}
|
|
5893
5915
|
};
|
|
5916
|
+
}
|
|
5894
5917
|
}, [c.isConnected, c.chainType, c.currentProvider, l, c]), /* @__PURE__ */ o(an.Provider, { value: E, children: /* @__PURE__ */ o(X.Provider, { value: D, children: /* @__PURE__ */ o(
|
|
5895
|
-
|
|
5918
|
+
pa,
|
|
5896
5919
|
{
|
|
5897
5920
|
walletState: c,
|
|
5898
5921
|
modalState: x,
|
|
5899
5922
|
setWalletState: l,
|
|
5900
|
-
resetWalletState:
|
|
5901
|
-
setError:
|
|
5923
|
+
resetWalletState: f,
|
|
5924
|
+
setError: A,
|
|
5902
5925
|
setMainView: a,
|
|
5903
5926
|
defaultThemeConfig: t,
|
|
5904
5927
|
themeMode: n.themeMode,
|
|
@@ -5906,7 +5929,7 @@ const pa = ({
|
|
|
5906
5929
|
}
|
|
5907
5930
|
) }) });
|
|
5908
5931
|
};
|
|
5909
|
-
function
|
|
5932
|
+
function pa({
|
|
5910
5933
|
children: e,
|
|
5911
5934
|
walletState: n,
|
|
5912
5935
|
modalState: t,
|
|
@@ -5917,28 +5940,28 @@ function Ca({
|
|
|
5917
5940
|
defaultThemeConfig: c,
|
|
5918
5941
|
themeMode: l
|
|
5919
5942
|
}) {
|
|
5920
|
-
const d =
|
|
5943
|
+
const d = V(X), A = jc({
|
|
5921
5944
|
walletState: n,
|
|
5922
5945
|
modalState: t,
|
|
5923
5946
|
setWalletState: r,
|
|
5924
5947
|
resetWalletState: s,
|
|
5925
5948
|
setError: i,
|
|
5926
5949
|
setMainView: a
|
|
5927
|
-
}),
|
|
5950
|
+
}), f = y(
|
|
5928
5951
|
() => ({
|
|
5929
5952
|
...d,
|
|
5930
|
-
...
|
|
5953
|
+
...A
|
|
5931
5954
|
}),
|
|
5932
|
-
[d,
|
|
5955
|
+
[d, A]
|
|
5933
5956
|
);
|
|
5934
|
-
return /* @__PURE__ */ o(X.Provider, { value:
|
|
5935
|
-
|
|
5957
|
+
return /* @__PURE__ */ o(X.Provider, { value: f, children: /* @__PURE__ */ C(
|
|
5958
|
+
ns,
|
|
5936
5959
|
{
|
|
5937
5960
|
themeConfig: c,
|
|
5938
5961
|
defaultTheme: l || "light",
|
|
5939
5962
|
children: [
|
|
5940
5963
|
/* @__PURE__ */ o(
|
|
5941
|
-
|
|
5964
|
+
ts,
|
|
5942
5965
|
{
|
|
5943
5966
|
maxVisibleToasts: 3,
|
|
5944
5967
|
placement: "top-center",
|
|
@@ -5950,18 +5973,18 @@ function Ca({
|
|
|
5950
5973
|
}
|
|
5951
5974
|
),
|
|
5952
5975
|
e,
|
|
5953
|
-
/* @__PURE__ */ o("div", { id: "modal-container", children: /* @__PURE__ */ o(
|
|
5976
|
+
/* @__PURE__ */ o("div", { id: "modal-container", children: /* @__PURE__ */ o(qc, {}) })
|
|
5954
5977
|
]
|
|
5955
5978
|
}
|
|
5956
5979
|
) });
|
|
5957
5980
|
}
|
|
5958
|
-
const
|
|
5981
|
+
const Ca = new ls({
|
|
5959
5982
|
defaultOptions: {
|
|
5960
5983
|
queries: {
|
|
5961
5984
|
refetchOnWindowFocus: !1
|
|
5962
5985
|
}
|
|
5963
5986
|
}
|
|
5964
|
-
}),
|
|
5987
|
+
}), Xa = ({ children: e, config: n }) => {
|
|
5965
5988
|
const t = Er(), r = y(() => {
|
|
5966
5989
|
const c = n || ie, l = c.login ? {
|
|
5967
5990
|
basicLogins: c.login.basicLogins ?? [],
|
|
@@ -5969,7 +5992,7 @@ const xa = new ds({
|
|
|
5969
5992
|
} : {
|
|
5970
5993
|
basicLogins: ie.login?.basicLogins || ["email", "externalWallets"],
|
|
5971
5994
|
socialLogins: ie.login?.socialLogins || [{ type: "google" }, { type: "x" }]
|
|
5972
|
-
}, d = l.socialLogins?.find((m) => m.type === "google"),
|
|
5995
|
+
}, d = l.socialLogins?.find((m) => m.type === "google"), A = l.socialLogins?.find((m) => m.type === "x"), f = {
|
|
5973
5996
|
projectId: c.walletConnectProjectId || Vn.projectId,
|
|
5974
5997
|
metadata: {
|
|
5975
5998
|
...Vn.metadata,
|
|
@@ -5981,13 +6004,13 @@ const xa = new ds({
|
|
|
5981
6004
|
chains: c.chains || ie.chains,
|
|
5982
6005
|
login: l,
|
|
5983
6006
|
theme: u,
|
|
5984
|
-
walletConnectConfig:
|
|
6007
|
+
walletConnectConfig: f,
|
|
5985
6008
|
embeddedWalletConfig: {
|
|
5986
6009
|
...He,
|
|
5987
6010
|
clientId: n.clientId,
|
|
5988
6011
|
stage: c.embeddedWalletConfig?.stage || He.stage,
|
|
5989
6012
|
googleClientId: d?.clientId || He.googleClientId,
|
|
5990
|
-
xClientId:
|
|
6013
|
+
xClientId: A?.clientId || He.xClientId
|
|
5991
6014
|
},
|
|
5992
6015
|
metadata: c.metadata,
|
|
5993
6016
|
links: ie.links,
|
|
@@ -5997,10 +6020,10 @@ const xa = new ds({
|
|
|
5997
6020
|
}
|
|
5998
6021
|
};
|
|
5999
6022
|
return wt(t || null), v;
|
|
6000
|
-
}, [n, t]), s =
|
|
6023
|
+
}, [n, t]), s = M.WalletHome, i = y(() => Uc(n?.login), [n?.login]), a = y(() => {
|
|
6001
6024
|
const c = yr(), l = n?.theme;
|
|
6002
6025
|
if (!l) return c;
|
|
6003
|
-
const d = c.themes ?? {},
|
|
6026
|
+
const d = c.themes ?? {}, A = l.themes ?? {}, f = (u, v) => {
|
|
6004
6027
|
if (!v) return u ?? {};
|
|
6005
6028
|
if (!u) return v;
|
|
6006
6029
|
const m = u.colors ?? {}, g = v.colors ?? {}, p = { ...m };
|
|
@@ -6015,13 +6038,13 @@ const xa = new ds({
|
|
|
6015
6038
|
...l,
|
|
6016
6039
|
prefix: "heroui",
|
|
6017
6040
|
themes: {
|
|
6018
|
-
light:
|
|
6019
|
-
dark:
|
|
6041
|
+
light: f(d.light, A.light),
|
|
6042
|
+
dark: f(d.dark, A.dark)
|
|
6020
6043
|
}
|
|
6021
6044
|
};
|
|
6022
6045
|
}, [n?.theme]);
|
|
6023
|
-
return typeof window > "u" ? null : /* @__PURE__ */ o(
|
|
6024
|
-
|
|
6046
|
+
return typeof window > "u" ? null : /* @__PURE__ */ o(as, { client: Ca, children: /* @__PURE__ */ o(
|
|
6047
|
+
ma,
|
|
6025
6048
|
{
|
|
6026
6049
|
contextConfig: r,
|
|
6027
6050
|
defaultThemeConfig: a,
|
|
@@ -6030,11 +6053,11 @@ const xa = new ds({
|
|
|
6030
6053
|
children: e
|
|
6031
6054
|
}
|
|
6032
6055
|
) });
|
|
6033
|
-
},
|
|
6034
|
-
const t =
|
|
6056
|
+
}, Na = ({ className: e, style: n }) => {
|
|
6057
|
+
const t = V(X);
|
|
6035
6058
|
if (!t)
|
|
6036
6059
|
return console.error("WalletConnectEmbed must be used within WalletConnectProvider"), null;
|
|
6037
|
-
const s = t.connection.isConnected ?
|
|
6060
|
+
const s = t.connection.isConnected ? M.Account : t.modal.view, a = (() => {
|
|
6038
6061
|
const c = Or[s];
|
|
6039
6062
|
return c ? c(t) : null;
|
|
6040
6063
|
})();
|
|
@@ -6047,79 +6070,75 @@ const xa = new ds({
|
|
|
6047
6070
|
}
|
|
6048
6071
|
);
|
|
6049
6072
|
};
|
|
6050
|
-
async function
|
|
6073
|
+
async function ja() {
|
|
6051
6074
|
let e = [];
|
|
6052
6075
|
try {
|
|
6053
|
-
e = await
|
|
6054
|
-
} catch (
|
|
6055
|
-
console.warn("Failed to fetch chains from API, using default chains:",
|
|
6076
|
+
e = await Lt();
|
|
6077
|
+
} catch (s) {
|
|
6078
|
+
console.warn("Failed to fetch chains from API, using default chains:", s);
|
|
6056
6079
|
}
|
|
6057
6080
|
const n = e.length > 0 ? Dt(e) : ae, t = {};
|
|
6058
6081
|
if (e.length > 0) {
|
|
6059
|
-
const
|
|
6060
|
-
|
|
6061
|
-
id:
|
|
6062
|
-
name:
|
|
6063
|
-
nativeCurrency:
|
|
6064
|
-
rpcUrls:
|
|
6065
|
-
blockExplorers:
|
|
6082
|
+
const s = e.filter((i) => H(i.chainId) === "aptos");
|
|
6083
|
+
s.length > 0 && (t.aptos = s.map((i) => ({
|
|
6084
|
+
id: i.chainId,
|
|
6085
|
+
name: i.name,
|
|
6086
|
+
nativeCurrency: i.nativeCurrency,
|
|
6087
|
+
rpcUrls: i.rpcUrls,
|
|
6088
|
+
blockExplorers: i.blockExplorers,
|
|
6066
6089
|
chainInfo: {
|
|
6067
|
-
icon:
|
|
6068
|
-
name:
|
|
6090
|
+
icon: i.icon,
|
|
6091
|
+
name: i.name
|
|
6069
6092
|
}
|
|
6070
6093
|
})));
|
|
6071
6094
|
} else
|
|
6072
6095
|
t.aptos = Ce.aptos || [];
|
|
6073
6096
|
if (e.length > 0) {
|
|
6074
|
-
const
|
|
6075
|
-
|
|
6076
|
-
const
|
|
6097
|
+
const s = e.filter((i) => H(i.chainId) === "evm");
|
|
6098
|
+
s.length > 0 && (t.evm = s.map((i) => {
|
|
6099
|
+
const a = i.chainId.match(/^eip155:(\d+)$/), c = a ? parseInt(a[1], 10) : 1, l = `evm_${c}`, d = n[l] || ae[l], A = i.icon || (typeof d == "string" ? d : null);
|
|
6077
6100
|
return {
|
|
6078
|
-
id:
|
|
6079
|
-
name:
|
|
6080
|
-
nativeCurrency:
|
|
6081
|
-
rpcUrls:
|
|
6082
|
-
blockExplorers:
|
|
6083
|
-
contracts:
|
|
6084
|
-
blockTime:
|
|
6085
|
-
...
|
|
6101
|
+
id: c,
|
|
6102
|
+
name: i.name,
|
|
6103
|
+
nativeCurrency: i.nativeCurrency,
|
|
6104
|
+
rpcUrls: i.rpcUrls,
|
|
6105
|
+
blockExplorers: i.blockExplorers,
|
|
6106
|
+
contracts: i.contracts,
|
|
6107
|
+
blockTime: i.blockTime,
|
|
6108
|
+
...A && { icon: A }
|
|
6086
6109
|
};
|
|
6087
6110
|
}));
|
|
6088
6111
|
} else
|
|
6089
6112
|
t.evm = Ce.evm || [];
|
|
6090
|
-
|
|
6091
|
-
|
|
6092
|
-
|
|
6093
|
-
|
|
6094
|
-
|
|
6095
|
-
|
|
6096
|
-
|
|
6097
|
-
|
|
6098
|
-
|
|
6099
|
-
|
|
6100
|
-
|
|
6101
|
-
|
|
6102
|
-
|
|
6103
|
-
|
|
6104
|
-
|
|
6105
|
-
|
|
6106
|
-
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
name: s.name,
|
|
6110
|
-
nativeCurrency: s.nativeCurrency,
|
|
6111
|
-
rpcUrls: s.rpcUrls,
|
|
6112
|
-
blockExplorers: s.blockExplorers,
|
|
6113
|
+
const r = e.filter((s) => H(s.chainId) === "solana");
|
|
6114
|
+
if (r.length > 0 ? t.solana = r.map((s) => ({
|
|
6115
|
+
id: s.chainId,
|
|
6116
|
+
name: s.name,
|
|
6117
|
+
nativeCurrency: s.nativeCurrency,
|
|
6118
|
+
rpcUrls: s.rpcUrls,
|
|
6119
|
+
blockExplorers: s.blockExplorers,
|
|
6120
|
+
chainInfo: {
|
|
6121
|
+
icon: s.icon,
|
|
6122
|
+
name: s.name
|
|
6123
|
+
}
|
|
6124
|
+
})) : t.solana = Ce.solana || [], e.length > 0) {
|
|
6125
|
+
const s = e.filter((i) => H(i.chainId) === "dogecoin");
|
|
6126
|
+
s.length > 0 && (t.dogecoin = s.map((i) => ({
|
|
6127
|
+
id: i.chainId,
|
|
6128
|
+
name: i.name,
|
|
6129
|
+
nativeCurrency: i.nativeCurrency,
|
|
6130
|
+
rpcUrls: i.rpcUrls,
|
|
6131
|
+
blockExplorers: i.blockExplorers,
|
|
6113
6132
|
chainInfo: {
|
|
6114
|
-
icon:
|
|
6115
|
-
name:
|
|
6133
|
+
icon: i.icon,
|
|
6134
|
+
name: i.name
|
|
6116
6135
|
}
|
|
6117
6136
|
})));
|
|
6118
6137
|
} else
|
|
6119
6138
|
t.dogecoin = Ce.dogecoin || [];
|
|
6120
6139
|
return t;
|
|
6121
6140
|
}
|
|
6122
|
-
async function
|
|
6141
|
+
async function Ta() {
|
|
6123
6142
|
try {
|
|
6124
6143
|
return (await Tt({
|
|
6125
6144
|
chainType: "all",
|
|
@@ -6144,12 +6163,12 @@ async function Ea() {
|
|
|
6144
6163
|
typeof window < "u" && console.info(`[${st.name}] version: ${st.version}`);
|
|
6145
6164
|
export {
|
|
6146
6165
|
T as ChainTypeEnum,
|
|
6147
|
-
|
|
6148
|
-
|
|
6149
|
-
|
|
6150
|
-
|
|
6166
|
+
Na as WalletConnectEmbed,
|
|
6167
|
+
Xa as WalletConnectProvider,
|
|
6168
|
+
ja as getChains,
|
|
6169
|
+
Ta as getConnectors,
|
|
6151
6170
|
Gn as useAccount,
|
|
6152
|
-
|
|
6153
|
-
|
|
6154
|
-
|
|
6171
|
+
Ma as useConnectors,
|
|
6172
|
+
Cc as useEmbeddedWallet,
|
|
6173
|
+
Va as useWalletConnect
|
|
6155
6174
|
};
|