@dogeos/dogeos-sdk 3.1.0-beta.2 → 3.2.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +202 -201
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -13,35 +13,36 @@
|
|
|
13
13
|
|
|
14
14
|
import { jsxs as C, jsx as o, Fragment as Bt } from "react/jsx-runtime";
|
|
15
15
|
import { createContext as ht, useState as Y, useRef as ce, useEffect as J, useMemo as y, useContext as W, useCallback as O } from "react";
|
|
16
|
-
import { Button as k, BackIcon as Mt, CloseIcon as Wt, 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:
|
|
16
|
+
import { Button as k, BackIcon as Mt, CloseIcon as Wt, 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.1", 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
|
-
|
|
33
|
-
clear: () =>
|
|
34
|
-
get: () =>
|
|
35
|
-
|
|
36
|
-
|
|
30
|
+
zs(e, t, { get: n[t], enumerable: !0 });
|
|
31
|
+
}, ws = {};
|
|
32
|
+
Is(ws, {
|
|
33
|
+
clear: () => hs,
|
|
34
|
+
get: () => Ps,
|
|
35
|
+
isKeyExist: () => St,
|
|
36
|
+
remove: () => Bs,
|
|
37
|
+
set: () => ys,
|
|
37
38
|
setKeyNS: () => Ms
|
|
38
39
|
});
|
|
39
40
|
var We = "tomo-";
|
|
40
|
-
function
|
|
41
|
+
function Ps(e) {
|
|
41
42
|
if (typeof window > "u")
|
|
42
43
|
return null;
|
|
43
44
|
const n = We + e;
|
|
44
|
-
if (!
|
|
45
|
+
if (!St(n))
|
|
45
46
|
return null;
|
|
46
47
|
let t = null;
|
|
47
48
|
try {
|
|
@@ -52,7 +53,7 @@ function ws(e) {
|
|
|
52
53
|
}
|
|
53
54
|
return t !== null && Object.prototype.hasOwnProperty.call(t, "type") && Object.prototype.hasOwnProperty.call(t, "data") ? t.data : null;
|
|
54
55
|
}
|
|
55
|
-
function
|
|
56
|
+
function ys(e, n, t) {
|
|
56
57
|
if (typeof window > "u")
|
|
57
58
|
return !1;
|
|
58
59
|
let r;
|
|
@@ -70,23 +71,23 @@ function Ps(e, n, t) {
|
|
|
70
71
|
}
|
|
71
72
|
return !1;
|
|
72
73
|
}
|
|
73
|
-
function
|
|
74
|
+
function Bs(e) {
|
|
74
75
|
if (typeof window > "u")
|
|
75
76
|
return;
|
|
76
77
|
const n = We + e;
|
|
77
78
|
window.localStorage.removeItem(n), window.sessionStorage.removeItem(n);
|
|
78
79
|
}
|
|
79
|
-
function
|
|
80
|
+
function hs() {
|
|
80
81
|
typeof window > "u" || (window?.localStorage?.clear(), window?.sessionStorage?.clear());
|
|
81
82
|
}
|
|
82
|
-
function
|
|
83
|
+
function St(e) {
|
|
83
84
|
return typeof window > "u" ? !1 : Object.prototype.hasOwnProperty.call(window.localStorage, e) || Object.prototype.hasOwnProperty.call(window.sessionStorage, e);
|
|
84
85
|
}
|
|
85
86
|
function Ms(e) {
|
|
86
87
|
typeof e == "string" && e !== "" && (We = e);
|
|
87
88
|
}
|
|
88
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 || {});
|
|
89
|
-
const X = ht(null),
|
|
90
|
+
const X = ht(null), Ot = ({ testnet: e, ...n }) => /* @__PURE__ */ C(
|
|
90
91
|
"svg",
|
|
91
92
|
{
|
|
92
93
|
"aria-hidden": "true",
|
|
@@ -153,7 +154,7 @@ const X = ht(null), St = ({ testnet: e, ...n }) => /* @__PURE__ */ C(
|
|
|
153
154
|
] })
|
|
154
155
|
]
|
|
155
156
|
}
|
|
156
|
-
), Sn = ({ ...e }) => /* @__PURE__ */ o(
|
|
157
|
+
), Sn = ({ ...e }) => /* @__PURE__ */ o(Ot, { testnet: !0, ...e }), Ge = ({ testnet: e, ...n }) => {
|
|
157
158
|
let t = "var(--ck-chain-ethereum-01, #627EEA)", r = "var(--ck-chain-ethereum-02, #ffffff)";
|
|
158
159
|
return e && (t = "linear-gradient(180deg, #8995A9 0%, #627EEA 99.48%)", r = "#fff"), /* @__PURE__ */ C(
|
|
159
160
|
"svg",
|
|
@@ -352,7 +353,7 @@ const X = ht(null), St = ({ testnet: e, ...n }) => /* @__PURE__ */ C(
|
|
|
352
353
|
] })
|
|
353
354
|
]
|
|
354
355
|
}
|
|
355
|
-
),
|
|
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: [
|
|
356
357
|
/* @__PURE__ */ o("foreignObject", { x: "-2.16759", y: "-2.16759", width: "60.3349", height: "60.3352", children: /* @__PURE__ */ o(
|
|
357
358
|
"div",
|
|
358
359
|
{
|
|
@@ -475,11 +476,11 @@ const X = ht(null), St = ({ testnet: e, ...n }) => /* @__PURE__ */ C(
|
|
|
475
476
|
Apots: tn,
|
|
476
477
|
Doge: On,
|
|
477
478
|
Ethereum: Ge,
|
|
478
|
-
KnownChain:
|
|
479
|
+
KnownChain: Ot,
|
|
479
480
|
Movement: Ws,
|
|
480
481
|
Solana: rn,
|
|
481
482
|
UnknownChain: Sn,
|
|
482
|
-
UnsupportChain:
|
|
483
|
+
UnsupportChain: kt
|
|
483
484
|
}, Symbol.toStringTag, { value: "Module" })), ze = ({ icon: e, iconName: n, className: t, iconProps: r, iconUrl: s }) => {
|
|
484
485
|
if (s)
|
|
485
486
|
return /* @__PURE__ */ o("div", { className: t, children: /* @__PURE__ */ o("img", { src: s, alt: n || "chain", "data-icon": "chain-icon", width: "100%", height: "100%" }) });
|
|
@@ -492,7 +493,7 @@ let De = null, Pe = null;
|
|
|
492
493
|
function Ns(e) {
|
|
493
494
|
return !e || e.startsWith("http://") || e.startsWith("https://") ? e : e.startsWith("/") ? `${it}${e}` : `${it}/${e}`;
|
|
494
495
|
}
|
|
495
|
-
async function
|
|
496
|
+
async function Lt() {
|
|
496
497
|
return De || Pe || (Pe = (async () => {
|
|
497
498
|
try {
|
|
498
499
|
const e = await fetch(Xs);
|
|
@@ -519,10 +520,10 @@ function H(e) {
|
|
|
519
520
|
const { type: n, id: t } = kn(e);
|
|
520
521
|
return n === "aptos" ? "aptos" : n === "solana" ? "solana" : n === "eip155" ? "evm" : n === "dogecoin" || n === "bip122" && t === js ? "dogecoin" : "evm";
|
|
521
522
|
}
|
|
522
|
-
function
|
|
523
|
+
function Yt() {
|
|
523
524
|
const { data: e, isLoading: n, error: t, refetch: r } = Tn({
|
|
524
525
|
queryKey: ["chains"],
|
|
525
|
-
queryFn:
|
|
526
|
+
queryFn: Lt,
|
|
526
527
|
staleTime: 6e5,
|
|
527
528
|
gcTime: 18e5,
|
|
528
529
|
retry: 2,
|
|
@@ -538,7 +539,7 @@ function Lt() {
|
|
|
538
539
|
const Ln = () => {
|
|
539
540
|
const [e, n] = Y(!1), t = ce(null), r = (s) => {
|
|
540
541
|
try {
|
|
541
|
-
return
|
|
542
|
+
return ds(s), n(!0), t.current = setTimeout(() => n(!1), 1200), !0;
|
|
542
543
|
} catch (i) {
|
|
543
544
|
return console.warn("Copy failed, but continuing execution:", i), !1;
|
|
544
545
|
}
|
|
@@ -553,7 +554,7 @@ const Ln = () => {
|
|
|
553
554
|
function bn(e) {
|
|
554
555
|
return new Promise((n) => setTimeout(n, e));
|
|
555
556
|
}
|
|
556
|
-
function
|
|
557
|
+
function Zt(e) {
|
|
557
558
|
if (!e || typeof e != "string")
|
|
558
559
|
return !1;
|
|
559
560
|
const n = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, t = /^[a-zA-Z0-9._+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
|
|
@@ -563,7 +564,7 @@ function Yt(e) {
|
|
|
563
564
|
return !(r.startsWith(".") || r.endsWith(".") || r.includes(".."));
|
|
564
565
|
}
|
|
565
566
|
function Ts(e) {
|
|
566
|
-
return !e || e.trim().length === 0 ? "Please enter your email address" :
|
|
567
|
+
return !e || e.trim().length === 0 ? "Please enter your email address" : Zt(e) ? null : "Please enter a valid email address";
|
|
567
568
|
}
|
|
568
569
|
const Yn = {
|
|
569
570
|
WALLET_STATE: "tomo_wallet_state"
|
|
@@ -582,11 +583,11 @@ const Yn = {
|
|
|
582
583
|
const e = localStorage.getItem(Yn.WALLET_STATE);
|
|
583
584
|
if (!e) return null;
|
|
584
585
|
const n = JSON.parse(e);
|
|
585
|
-
return Date.now() - n.timestamp > 10080 * 60 * 1e3 ? (
|
|
586
|
+
return Date.now() - n.timestamp > 10080 * 60 * 1e3 ? (Jt(), null) : n;
|
|
586
587
|
} catch (e) {
|
|
587
588
|
return console.error("Failed to get wallet state:", e), null;
|
|
588
589
|
}
|
|
589
|
-
},
|
|
590
|
+
}, Jt = () => {
|
|
590
591
|
try {
|
|
591
592
|
localStorage.removeItem(Yn.WALLET_STATE);
|
|
592
593
|
} catch (e) {
|
|
@@ -638,7 +639,7 @@ const q = {
|
|
|
638
639
|
evm: Ge,
|
|
639
640
|
// Evm chains - fallback icons (will be replaced by API data)
|
|
640
641
|
evm_1: Ge,
|
|
641
|
-
unsupported:
|
|
642
|
+
unsupported: kt
|
|
642
643
|
};
|
|
643
644
|
function Ls(e, n) {
|
|
644
645
|
if (n?.icon)
|
|
@@ -646,7 +647,7 @@ function Ls(e, n) {
|
|
|
646
647
|
const t = H(e), { id: r } = kn(e), s = t === "evm" ? `evm_${r}` : t;
|
|
647
648
|
return ae[s] || Sn;
|
|
648
649
|
}
|
|
649
|
-
function
|
|
650
|
+
function Dt(e) {
|
|
650
651
|
const n = { ...ae };
|
|
651
652
|
return e.forEach((t) => {
|
|
652
653
|
const r = H(t.chainId), { id: s } = kn(t.chainId), i = r === "evm" ? `evm_${s}` : t.chainId;
|
|
@@ -671,10 +672,10 @@ function se(e) {
|
|
|
671
672
|
...e
|
|
672
673
|
};
|
|
673
674
|
}
|
|
674
|
-
const
|
|
675
|
+
const Ft = "2.38.2";
|
|
675
676
|
let un = {
|
|
676
677
|
getDocsUrl: ({ docsBaseUrl: e, docsPath: n = "", docsSlug: t }) => n ? `${e ?? "https://viem.sh"}${n}${t ? `#${t}` : ""}` : void 0,
|
|
677
|
-
version: `viem@${
|
|
678
|
+
version: `viem@${Ft}`
|
|
678
679
|
}, h = class zn extends Error {
|
|
679
680
|
constructor(n, t = {}) {
|
|
680
681
|
const r = t.cause instanceof zn ? t.cause.details : t.cause?.message ? t.cause.message : t.details, s = t.cause instanceof zn && t.cause.docsPath || t.docsPath, i = un.getDocsUrl?.({ ...t, docsPath: s }), a = [
|
|
@@ -716,14 +717,14 @@ let un = {
|
|
|
716
717
|
configurable: !0,
|
|
717
718
|
writable: !0,
|
|
718
719
|
value: "BaseError"
|
|
719
|
-
}), this.details = r, this.docsPath = s, this.metaMessages = t.metaMessages, this.name = t.name ?? this.name, this.shortMessage = n, this.version =
|
|
720
|
+
}), this.details = r, this.docsPath = s, this.metaMessages = t.metaMessages, this.name = t.name ?? this.name, this.shortMessage = n, this.version = Ft;
|
|
720
721
|
}
|
|
721
722
|
walk(n) {
|
|
722
|
-
return
|
|
723
|
+
return Ht(this, n);
|
|
723
724
|
}
|
|
724
725
|
};
|
|
725
|
-
function
|
|
726
|
-
return n?.(e) ? e : e && typeof e == "object" && "cause" in e && e.cause !== void 0 ?
|
|
726
|
+
function Ht(e, n) {
|
|
727
|
+
return n?.(e) ? e : e && typeof e == "object" && "cause" in e && e.cause !== void 0 ? Ht(e.cause, n) : n ? null : e;
|
|
727
728
|
}
|
|
728
729
|
class Ys extends h {
|
|
729
730
|
constructor({ max: n, min: t, signed: r, size: s, value: i }) {
|
|
@@ -752,7 +753,7 @@ class Js extends h {
|
|
|
752
753
|
super(`Slice ${t === "start" ? "starting" : "ending"} at offset "${n}" is out-of-bounds (size: ${r}).`, { name: "SliceOffsetOutOfBoundsError" });
|
|
753
754
|
}
|
|
754
755
|
}
|
|
755
|
-
class
|
|
756
|
+
class Qt extends h {
|
|
756
757
|
constructor({ size: n, targetSize: t, type: r }) {
|
|
757
758
|
super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${n}) exceeds padding size (${t}).`, { name: "SizeExceedsPaddingSizeError" });
|
|
758
759
|
}
|
|
@@ -765,7 +766,7 @@ function Ds(e, { dir: n, size: t = 32 } = {}) {
|
|
|
765
766
|
return e;
|
|
766
767
|
const r = e.replace("0x", "");
|
|
767
768
|
if (r.length > t * 2)
|
|
768
|
-
throw new
|
|
769
|
+
throw new Qt({
|
|
769
770
|
size: Math.ceil(r.length / 2),
|
|
770
771
|
targetSize: t,
|
|
771
772
|
type: "hex"
|
|
@@ -776,7 +777,7 @@ function Fs(e, { dir: n, size: t = 32 } = {}) {
|
|
|
776
777
|
if (t === null)
|
|
777
778
|
return e;
|
|
778
779
|
if (e.length > t)
|
|
779
|
-
throw new
|
|
780
|
+
throw new Qt({
|
|
780
781
|
size: e.length,
|
|
781
782
|
targetSize: t,
|
|
782
783
|
type: "bytes"
|
|
@@ -827,8 +828,8 @@ function qs(e, n = {}) {
|
|
|
827
828
|
return ee(t, n);
|
|
828
829
|
}
|
|
829
830
|
const Us = /* @__PURE__ */ new TextEncoder();
|
|
830
|
-
function
|
|
831
|
-
return typeof e == "number" || typeof e == "bigint" ? Rs(e, n) : typeof e == "boolean" ? Gs(e, n) : Te(e) ? le(e, n) :
|
|
831
|
+
function Kt(e, n = {}) {
|
|
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);
|
|
832
833
|
}
|
|
833
834
|
function Gs(e, n = {}) {
|
|
834
835
|
const t = new Uint8Array(1);
|
|
@@ -868,7 +869,7 @@ function Rs(e, n) {
|
|
|
868
869
|
const t = P(e, n);
|
|
869
870
|
return le(t);
|
|
870
871
|
}
|
|
871
|
-
function
|
|
872
|
+
function qt(e, n = {}) {
|
|
872
873
|
const t = Us.encode(e);
|
|
873
874
|
return typeof n.size == "number" ? (we(t, { size: n.size }), Ie(t, { dir: "right", size: n.size })) : t;
|
|
874
875
|
}
|
|
@@ -907,7 +908,7 @@ function Zn(e, n) {
|
|
|
907
908
|
type: e
|
|
908
909
|
});
|
|
909
910
|
}
|
|
910
|
-
const
|
|
911
|
+
const Ut = {
|
|
911
912
|
"0x0": "legacy",
|
|
912
913
|
"0x1": "eip2930",
|
|
913
914
|
"0x2": "eip1559",
|
|
@@ -928,7 +929,7 @@ function Jn(e, n) {
|
|
|
928
929
|
nonce: e.nonce ? _e(e.nonce) : void 0,
|
|
929
930
|
to: e.to ? e.to : null,
|
|
930
931
|
transactionIndex: e.transactionIndex ? Number(e.transactionIndex) : null,
|
|
931
|
-
type: e.type ?
|
|
932
|
+
type: e.type ? Ut[e.type] : void 0,
|
|
932
933
|
typeHex: e.type ? e.type : void 0,
|
|
933
934
|
value: e.value ? BigInt(e.value) : void 0,
|
|
934
935
|
v: e.v ? BigInt(e.v) : void 0
|
|
@@ -1005,7 +1006,7 @@ function si(e, n) {
|
|
|
1005
1006
|
to: e.to ? e.to : null,
|
|
1006
1007
|
transactionIndex: e.transactionIndex ? _e(e.transactionIndex) : null,
|
|
1007
1008
|
status: e.status ? ri[e.status] : null,
|
|
1008
|
-
type: e.type ?
|
|
1009
|
+
type: e.type ? Ut[e.type] || e.type : null
|
|
1009
1010
|
};
|
|
1010
1011
|
return e.blobGasPrice && (t.blobGasPrice = BigInt(e.blobGasPrice)), e.blobGasUsed && (t.blobGasUsed = BigInt(e.blobGasUsed)), t;
|
|
1011
1012
|
}
|
|
@@ -1174,19 +1175,19 @@ const Ai = {
|
|
|
1174
1175
|
this.positionReadCount.set(this.position, e + 1), e > 0 && this.recursiveReadCount++;
|
|
1175
1176
|
}
|
|
1176
1177
|
};
|
|
1177
|
-
function
|
|
1178
|
+
function Gt(e, { recursiveReadLimit: n = 8192 } = {}) {
|
|
1178
1179
|
const t = Object.create(Ai);
|
|
1179
1180
|
return t.bytes = e, t.dataView = new DataView(e.buffer, e.byteOffset, e.byteLength), t.positionReadCount = /* @__PURE__ */ new Map(), t.recursiveReadLimit = n, t;
|
|
1180
1181
|
}
|
|
1181
1182
|
function de(e, n = "hex") {
|
|
1182
|
-
const t =
|
|
1183
|
+
const t = Rt(e), r = Gt(new Uint8Array(t.length));
|
|
1183
1184
|
return t.encode(r), n === "hex" ? ee(r.bytes) : r.bytes;
|
|
1184
1185
|
}
|
|
1185
|
-
function
|
|
1186
|
-
return Array.isArray(e) ? fi(e.map((n) =>
|
|
1186
|
+
function Rt(e) {
|
|
1187
|
+
return Array.isArray(e) ? fi(e.map((n) => Rt(n))) : ui(e);
|
|
1187
1188
|
}
|
|
1188
1189
|
function fi(e) {
|
|
1189
|
-
const n = e.reduce((s, i) => s + i.length, 0), t =
|
|
1190
|
+
const n = e.reduce((s, i) => s + i.length, 0), t = _t(n);
|
|
1190
1191
|
return {
|
|
1191
1192
|
length: n <= 55 ? 1 + n : 1 + t + n,
|
|
1192
1193
|
encode(s) {
|
|
@@ -1197,7 +1198,7 @@ function fi(e) {
|
|
|
1197
1198
|
};
|
|
1198
1199
|
}
|
|
1199
1200
|
function ui(e) {
|
|
1200
|
-
const n = typeof e == "string" ? le(e) : e, t =
|
|
1201
|
+
const n = typeof e == "string" ? le(e) : e, t = _t(n.length);
|
|
1201
1202
|
return {
|
|
1202
1203
|
length: n.length === 1 && n[0] < 128 ? 1 : n.length <= 55 ? 1 + n.length : 1 + t + n.length,
|
|
1203
1204
|
encode(s) {
|
|
@@ -1205,7 +1206,7 @@ function ui(e) {
|
|
|
1205
1206
|
}
|
|
1206
1207
|
};
|
|
1207
1208
|
}
|
|
1208
|
-
function
|
|
1209
|
+
function _t(e) {
|
|
1209
1210
|
if (e < 2 ** 8)
|
|
1210
1211
|
return 1;
|
|
1211
1212
|
if (e < 2 ** 16)
|
|
@@ -1223,7 +1224,7 @@ const gi = {
|
|
|
1223
1224
|
ether: -9,
|
|
1224
1225
|
wei: 9
|
|
1225
1226
|
};
|
|
1226
|
-
function
|
|
1227
|
+
function $t(e, n) {
|
|
1227
1228
|
let t = e.toString();
|
|
1228
1229
|
const r = t.startsWith("-");
|
|
1229
1230
|
r && (t = t.slice(1)), t = t.padStart(n, "0");
|
|
@@ -1234,12 +1235,12 @@ function _t(e, n) {
|
|
|
1234
1235
|
return i = i.replace(/(0+)$/, ""), `${r ? "-" : ""}${s || "0"}${i ? `.${i}` : ""}`;
|
|
1235
1236
|
}
|
|
1236
1237
|
function mi(e, n = "wei") {
|
|
1237
|
-
return
|
|
1238
|
+
return $t(e, gi[n]);
|
|
1238
1239
|
}
|
|
1239
1240
|
function oe(e, n = "wei") {
|
|
1240
|
-
return
|
|
1241
|
+
return $t(e, vi[n]);
|
|
1241
1242
|
}
|
|
1242
|
-
function
|
|
1243
|
+
function er(e) {
|
|
1243
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);
|
|
1244
1245
|
return n.map(([r, s]) => ` ${`${r}:`.padEnd(t + 1)} ${s}`).join(`
|
|
1245
1246
|
`);
|
|
@@ -1266,7 +1267,7 @@ class xi extends h {
|
|
|
1266
1267
|
metaMessages: [
|
|
1267
1268
|
"Provided Transaction:",
|
|
1268
1269
|
"{",
|
|
1269
|
-
|
|
1270
|
+
er(n),
|
|
1270
1271
|
"}",
|
|
1271
1272
|
"",
|
|
1272
1273
|
"To infer the type, either provide:",
|
|
@@ -1301,13 +1302,13 @@ function zi(e) {
|
|
|
1301
1302
|
}
|
|
1302
1303
|
return n;
|
|
1303
1304
|
}
|
|
1304
|
-
function
|
|
1305
|
+
function nr(e) {
|
|
1305
1306
|
const { kzg: n } = e, t = e.to ?? (typeof e.blobs[0] == "string" ? "hex" : "bytes"), r = typeof e.blobs[0] == "string" ? e.blobs.map((i) => le(i)) : e.blobs, s = [];
|
|
1306
1307
|
for (const i of r)
|
|
1307
1308
|
s.push(Uint8Array.from(n.blobToKzgCommitment(i)));
|
|
1308
1309
|
return t === "bytes" ? s : s.map((i) => ee(i));
|
|
1309
1310
|
}
|
|
1310
|
-
function
|
|
1311
|
+
function tr(e) {
|
|
1311
1312
|
const { kzg: n } = e, t = e.to ?? (typeof e.blobs[0] == "string" ? "hex" : "bytes"), r = typeof e.blobs[0] == "string" ? e.blobs.map((a) => le(a)) : e.blobs, s = typeof e.commitments[0] == "string" ? e.commitments.map((a) => le(a)) : e.commitments, i = [];
|
|
1312
1313
|
for (let a = 0; a < r.length; a++) {
|
|
1313
1314
|
const c = r[a], l = s[a];
|
|
@@ -1334,7 +1335,7 @@ function $e(e, n = !0) {
|
|
|
1334
1335
|
if (n && e.finished)
|
|
1335
1336
|
throw new Error("Hash#digest() has already been called");
|
|
1336
1337
|
}
|
|
1337
|
-
function
|
|
1338
|
+
function rr(e, n) {
|
|
1338
1339
|
Ve(e);
|
|
1339
1340
|
const t = n.outputLen;
|
|
1340
1341
|
if (e.length < t)
|
|
@@ -1371,9 +1372,9 @@ function hi(e) {
|
|
|
1371
1372
|
function Dn(e) {
|
|
1372
1373
|
return typeof e == "string" && (e = hi(e)), Ve(e), e;
|
|
1373
1374
|
}
|
|
1374
|
-
class
|
|
1375
|
+
class sr {
|
|
1375
1376
|
}
|
|
1376
|
-
function
|
|
1377
|
+
function ir(e) {
|
|
1377
1378
|
const n = (r) => e().update(Dn(r)).digest(), t = e();
|
|
1378
1379
|
return n.outputLen = t.outputLen, n.blockLen = t.blockLen, n.create = () => e(), n;
|
|
1379
1380
|
}
|
|
@@ -1389,7 +1390,7 @@ function Wi(e, n, t) {
|
|
|
1389
1390
|
function Vi(e, n, t) {
|
|
1390
1391
|
return e & n ^ e & t ^ n & t;
|
|
1391
1392
|
}
|
|
1392
|
-
class Xi extends
|
|
1393
|
+
class Xi extends sr {
|
|
1393
1394
|
constructor(n, t, r, s) {
|
|
1394
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);
|
|
1395
1396
|
}
|
|
@@ -1409,7 +1410,7 @@ class Xi extends rr {
|
|
|
1409
1410
|
return this.length += n.length, this.roundClean(), this;
|
|
1410
1411
|
}
|
|
1411
1412
|
digestInto(n) {
|
|
1412
|
-
$e(this),
|
|
1413
|
+
$e(this), rr(n, this), this.finished = !0;
|
|
1413
1414
|
const { buffer: t, view: r, blockLen: s, isLE: i } = this;
|
|
1414
1415
|
let { pos: a } = this;
|
|
1415
1416
|
t[a++] = 128, Xe(this.buffer.subarray(a)), this.padOffset > s - a && (this.process(r, 0), a = 0);
|
|
@@ -1561,9 +1562,9 @@ class Li extends Xi {
|
|
|
1561
1562
|
this.set(0, 0, 0, 0, 0, 0, 0, 0), Xe(this.buffer);
|
|
1562
1563
|
}
|
|
1563
1564
|
}
|
|
1564
|
-
const Yi = /* @__PURE__ */
|
|
1565
|
+
const Yi = /* @__PURE__ */ ir(() => new Li()), Zi = Yi;
|
|
1565
1566
|
function Ji(e, n) {
|
|
1566
|
-
return Zi(Te(e, { strict: !1 }) ?
|
|
1567
|
+
return Zi(Te(e, { strict: !1 }) ? Kt(e) : e);
|
|
1567
1568
|
}
|
|
1568
1569
|
function Di(e) {
|
|
1569
1570
|
const { commitment: n, version: t = 1 } = e, r = e.to ?? (typeof n == "string" ? "hex" : "bytes"), s = Ji(n);
|
|
@@ -1579,9 +1580,9 @@ function Fi(e) {
|
|
|
1579
1580
|
}));
|
|
1580
1581
|
return s;
|
|
1581
1582
|
}
|
|
1582
|
-
const ft = 6,
|
|
1583
|
+
const ft = 6, or = 32, Fn = 4096, cr = or * Fn, ut = cr * ft - // terminator byte (0x80).
|
|
1583
1584
|
1 - // zero byte (0x00) appended to each field element.
|
|
1584
|
-
1 * Fn * ft,
|
|
1585
|
+
1 * Fn * ft, ar = 1;
|
|
1585
1586
|
class Hi extends h {
|
|
1586
1587
|
constructor({ maxSize: n, size: t }) {
|
|
1587
1588
|
super("Blob size is too large.", {
|
|
@@ -1590,7 +1591,7 @@ class Hi extends h {
|
|
|
1590
1591
|
});
|
|
1591
1592
|
}
|
|
1592
1593
|
}
|
|
1593
|
-
class
|
|
1594
|
+
class lr extends h {
|
|
1594
1595
|
constructor() {
|
|
1595
1596
|
super("Blob data must not be empty.", { name: "EmptyBlobError" });
|
|
1596
1597
|
}
|
|
@@ -1607,7 +1608,7 @@ class Ki extends h {
|
|
|
1607
1608
|
constructor({ hash: n, version: t }) {
|
|
1608
1609
|
super(`Versioned hash "${n}" version is invalid.`, {
|
|
1609
1610
|
metaMessages: [
|
|
1610
|
-
`Expected: ${
|
|
1611
|
+
`Expected: ${ar}`,
|
|
1611
1612
|
`Received: ${t}`
|
|
1612
1613
|
],
|
|
1613
1614
|
name: "InvalidVersionedHashVersionError"
|
|
@@ -1617,7 +1618,7 @@ class Ki extends h {
|
|
|
1617
1618
|
function qi(e) {
|
|
1618
1619
|
const n = e.to ?? (typeof e.data == "string" ? "hex" : "bytes"), t = typeof e.data == "string" ? le(e.data) : e.data, r = be(t);
|
|
1619
1620
|
if (!r)
|
|
1620
|
-
throw new
|
|
1621
|
+
throw new lr();
|
|
1621
1622
|
if (r > ut)
|
|
1622
1623
|
throw new Hi({
|
|
1623
1624
|
maxSize: ut,
|
|
@@ -1626,10 +1627,10 @@ function qi(e) {
|
|
|
1626
1627
|
const s = [];
|
|
1627
1628
|
let i = !0, a = 0;
|
|
1628
1629
|
for (; i; ) {
|
|
1629
|
-
const c =
|
|
1630
|
+
const c = Gt(new Uint8Array(cr));
|
|
1630
1631
|
let l = 0;
|
|
1631
1632
|
for (; l < Fn; ) {
|
|
1632
|
-
const d = t.slice(a, a + (
|
|
1633
|
+
const d = t.slice(a, a + (or - 1));
|
|
1633
1634
|
if (c.pushByte(0), c.pushBytes(d), d.length < 31) {
|
|
1634
1635
|
c.pushByte(128), i = !1;
|
|
1635
1636
|
break;
|
|
@@ -1641,7 +1642,7 @@ function qi(e) {
|
|
|
1641
1642
|
return n === "bytes" ? s.map((c) => c.bytes) : s.map((c) => ee(c.bytes));
|
|
1642
1643
|
}
|
|
1643
1644
|
function Ui(e) {
|
|
1644
|
-
const { data: n, kzg: t, to: r } = e, s = e.blobs ?? qi({ data: n, to: r }), i = e.commitments ??
|
|
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 = [];
|
|
1645
1646
|
for (let l = 0; l < s.length; l++)
|
|
1646
1647
|
c.push({
|
|
1647
1648
|
blob: s[l],
|
|
@@ -1838,7 +1839,7 @@ Object.defineProperty(Ne, "nodeMessage", {
|
|
|
1838
1839
|
writable: !0,
|
|
1839
1840
|
value: /max priority fee per gas higher than max fee per gas|tip higher than fee cap/
|
|
1840
1841
|
});
|
|
1841
|
-
class
|
|
1842
|
+
class dr extends h {
|
|
1842
1843
|
constructor({ cause: n }) {
|
|
1843
1844
|
super(`An error occurred while executing: ${n?.shortMessage}`, {
|
|
1844
1845
|
cause: n,
|
|
@@ -1846,7 +1847,7 @@ class lr extends h {
|
|
|
1846
1847
|
});
|
|
1847
1848
|
}
|
|
1848
1849
|
}
|
|
1849
|
-
class
|
|
1850
|
+
class Ar extends Map {
|
|
1850
1851
|
constructor(n) {
|
|
1851
1852
|
super(), Object.defineProperty(this, "maxSize", {
|
|
1852
1853
|
enumerable: !0,
|
|
@@ -1867,15 +1868,15 @@ class dr extends Map {
|
|
|
1867
1868
|
return this;
|
|
1868
1869
|
}
|
|
1869
1870
|
}
|
|
1870
|
-
const Gi = BigInt(0), ye = BigInt(1), Ri = BigInt(2), _i = BigInt(7), $i = BigInt(256), eo = BigInt(113),
|
|
1871
|
+
const Gi = BigInt(0), ye = BigInt(1), Ri = BigInt(2), _i = BigInt(7), $i = BigInt(256), eo = BigInt(113), fr = [], ur = [], gr = [];
|
|
1871
1872
|
for (let e = 0, n = ye, t = 1, r = 0; e < 24; e++) {
|
|
1872
|
-
[t, r] = [r, (2 * t + 3 * r) % 5],
|
|
1873
|
+
[t, r] = [r, (2 * t + 3 * r) % 5], fr.push(2 * (5 * r + t)), ur.push((e + 1) * (e + 2) / 2 % 64);
|
|
1873
1874
|
let s = Gi;
|
|
1874
1875
|
for (let i = 0; i < 7; i++)
|
|
1875
1876
|
n = (n << ye ^ (n >> _i) * eo) % $i, n & Ri && (s ^= ye << (ye << /* @__PURE__ */ BigInt(i)) - ye);
|
|
1876
|
-
|
|
1877
|
+
gr.push(s);
|
|
1877
1878
|
}
|
|
1878
|
-
const
|
|
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);
|
|
1879
1880
|
function ro(e, n = 24) {
|
|
1880
1881
|
const t = new Uint32Array(10);
|
|
1881
1882
|
for (let r = 24 - n; r < 24; r++) {
|
|
@@ -1888,7 +1889,7 @@ function ro(e, n = 24) {
|
|
|
1888
1889
|
}
|
|
1889
1890
|
let s = e[2], i = e[3];
|
|
1890
1891
|
for (let a = 0; a < 24; a++) {
|
|
1891
|
-
const c =
|
|
1892
|
+
const c = ur[a], l = gt(s, i, c), d = vt(s, i, c), f = fr[a];
|
|
1892
1893
|
s = e[f], i = e[f + 1], e[f] = l, e[f + 1] = d;
|
|
1893
1894
|
}
|
|
1894
1895
|
for (let a = 0; a < 50; a += 10) {
|
|
@@ -1901,7 +1902,7 @@ function ro(e, n = 24) {
|
|
|
1901
1902
|
}
|
|
1902
1903
|
Xe(t);
|
|
1903
1904
|
}
|
|
1904
|
-
class Hn extends
|
|
1905
|
+
class Hn extends sr {
|
|
1905
1906
|
// NOTE: we accept arguments in bytes instead of bits here.
|
|
1906
1907
|
constructor(n, t, r, s = !1, i = 24) {
|
|
1907
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))
|
|
@@ -1951,7 +1952,7 @@ class Hn extends rr {
|
|
|
1951
1952
|
return lt(n), this.xofInto(new Uint8Array(n));
|
|
1952
1953
|
}
|
|
1953
1954
|
digestInto(n) {
|
|
1954
|
-
if (
|
|
1955
|
+
if (rr(n, this), this.finished)
|
|
1955
1956
|
throw new Error("digest() was already called");
|
|
1956
1957
|
return this.writeInto(n), this.destroy(), n;
|
|
1957
1958
|
}
|
|
@@ -1966,21 +1967,21 @@ class Hn extends rr {
|
|
|
1966
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;
|
|
1967
1968
|
}
|
|
1968
1969
|
}
|
|
1969
|
-
const so = (e, n, t) =>
|
|
1970
|
+
const so = (e, n, t) => ir(() => new Hn(n, e, t)), io = so(1, 136, 256 / 8);
|
|
1970
1971
|
function oo(e, n) {
|
|
1971
|
-
return io(Te(e, { strict: !1 }) ?
|
|
1972
|
+
return io(Te(e, { strict: !1 }) ? Kt(e) : e);
|
|
1972
1973
|
}
|
|
1973
|
-
const vn = /* @__PURE__ */ new
|
|
1974
|
+
const vn = /* @__PURE__ */ new Ar(8192);
|
|
1974
1975
|
function co(e, n) {
|
|
1975
1976
|
if (vn.has(`${e}.${n}`))
|
|
1976
1977
|
return vn.get(`${e}.${n}`);
|
|
1977
|
-
const t = e.substring(2).toLowerCase(), r = oo(
|
|
1978
|
+
const t = e.substring(2).toLowerCase(), r = oo(qt(t)), s = t.split("");
|
|
1978
1979
|
for (let a = 0; a < 40; a += 2)
|
|
1979
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());
|
|
1980
1981
|
const i = `0x${s.join("")}`;
|
|
1981
1982
|
return vn.set(`${e}.${n}`, i), i;
|
|
1982
1983
|
}
|
|
1983
|
-
const ao = /^0x[a-fA-F0-9]{40}$/, mn = /* @__PURE__ */ new
|
|
1984
|
+
const ao = /^0x[a-fA-F0-9]{40}$/, mn = /* @__PURE__ */ new Ar(8192);
|
|
1984
1985
|
function $(e, n) {
|
|
1985
1986
|
const { strict: t = !0 } = n ?? {}, r = `${e}.${t}`;
|
|
1986
1987
|
if (mn.has(r))
|
|
@@ -1995,7 +1996,7 @@ function lo(e, n, t, { strict: r } = {}) {
|
|
|
1995
1996
|
strict: r
|
|
1996
1997
|
});
|
|
1997
1998
|
}
|
|
1998
|
-
function
|
|
1999
|
+
function mr(e, n, t) {
|
|
1999
2000
|
if (be(e) !== t - n)
|
|
2000
2001
|
throw new Js({
|
|
2001
2002
|
offset: t,
|
|
@@ -2005,11 +2006,11 @@ function vr(e, n, t) {
|
|
|
2005
2006
|
}
|
|
2006
2007
|
function Ao(e, n, t, { strict: r } = {}) {
|
|
2007
2008
|
const s = e.slice(n, t);
|
|
2008
|
-
return r &&
|
|
2009
|
+
return r && mr(s, n, t), s;
|
|
2009
2010
|
}
|
|
2010
2011
|
function fo(e, n, t, { strict: r } = {}) {
|
|
2011
2012
|
const s = `0x${e.replace("0x", "").slice(n * 2, t * 2)}`;
|
|
2012
|
-
return r &&
|
|
2013
|
+
return r && mr(s, n, t), s;
|
|
2013
2014
|
}
|
|
2014
2015
|
function uo(e) {
|
|
2015
2016
|
const { authorizationList: n } = e;
|
|
@@ -2027,12 +2028,12 @@ function go(e) {
|
|
|
2027
2028
|
const { blobVersionedHashes: n } = e;
|
|
2028
2029
|
if (n) {
|
|
2029
2030
|
if (n.length === 0)
|
|
2030
|
-
throw new
|
|
2031
|
+
throw new lr();
|
|
2031
2032
|
for (const t of n) {
|
|
2032
2033
|
const r = be(t), s = _e(lo(t, 0, 1));
|
|
2033
2034
|
if (r !== 32)
|
|
2034
2035
|
throw new Qi({ hash: t, size: r });
|
|
2035
|
-
if (s !==
|
|
2036
|
+
if (s !== ar)
|
|
2036
2037
|
throw new Ki({
|
|
2037
2038
|
hash: t,
|
|
2038
2039
|
version: s
|
|
@@ -2132,14 +2133,14 @@ function bo(e, n) {
|
|
|
2132
2133
|
go(e);
|
|
2133
2134
|
let u = e.blobVersionedHashes, v = e.sidecars;
|
|
2134
2135
|
if (e.blobs && (typeof u > "u" || typeof v > "u")) {
|
|
2135
|
-
const w = typeof e.blobs[0] == "string" ? e.blobs : e.blobs.map((z) => ee(z)), L = e.kzg, b =
|
|
2136
|
+
const w = typeof e.blobs[0] == "string" ? e.blobs : e.blobs.map((z) => ee(z)), L = e.kzg, b = nr({
|
|
2136
2137
|
blobs: w,
|
|
2137
2138
|
kzg: L
|
|
2138
2139
|
});
|
|
2139
2140
|
if (typeof u > "u" && (u = Fi({
|
|
2140
2141
|
commitments: b
|
|
2141
2142
|
})), typeof v > "u") {
|
|
2142
|
-
const z =
|
|
2143
|
+
const z = tr({ blobs: w, commitments: b, kzg: L });
|
|
2143
2144
|
v = Ui({ blobs: w, commitments: b, proofs: z });
|
|
2144
2145
|
}
|
|
2145
2146
|
}
|
|
@@ -2334,7 +2335,7 @@ const en = {
|
|
|
2334
2335
|
contracts: Po,
|
|
2335
2336
|
formatters: yo,
|
|
2336
2337
|
serializers: ho
|
|
2337
|
-
},
|
|
2338
|
+
}, pr = /* @__PURE__ */ se({
|
|
2338
2339
|
id: 42161,
|
|
2339
2340
|
name: "Arbitrum One",
|
|
2340
2341
|
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
@@ -2408,7 +2409,7 @@ const en = {
|
|
|
2408
2409
|
({
|
|
2409
2410
|
...Kn
|
|
2410
2411
|
});
|
|
2411
|
-
const
|
|
2412
|
+
const Cr = /* @__PURE__ */ se({
|
|
2412
2413
|
id: 56,
|
|
2413
2414
|
name: "BNB Smart Chain",
|
|
2414
2415
|
blockTime: 750,
|
|
@@ -2470,7 +2471,7 @@ function No(e) {
|
|
|
2470
2471
|
class jo extends h {
|
|
2471
2472
|
constructor(n, { account: t, docsPath: r, chain: s, data: i, gas: a, gasPrice: c, maxFeePerGas: l, maxPriorityFeePerGas: d, nonce: f, to: A, value: u, stateOverride: v }) {
|
|
2472
2473
|
const m = t ? qn(t) : void 0;
|
|
2473
|
-
let g =
|
|
2474
|
+
let g = er({
|
|
2474
2475
|
from: m?.address,
|
|
2475
2476
|
to: A,
|
|
2476
2477
|
value: typeof u < "u" && `${mi(u)} ${s?.nativeCurrency?.symbol || "ETH"}`,
|
|
@@ -2517,14 +2518,14 @@ function To(e, n) {
|
|
|
2517
2518
|
cause: e,
|
|
2518
2519
|
maxFeePerGas: n?.maxFeePerGas,
|
|
2519
2520
|
maxPriorityFeePerGas: n?.maxPriorityFeePerGas
|
|
2520
|
-
}) : new
|
|
2521
|
+
}) : new dr({
|
|
2521
2522
|
cause: e
|
|
2522
2523
|
});
|
|
2523
2524
|
}
|
|
2524
2525
|
function Eo(e, { docsPath: n, ...t }) {
|
|
2525
2526
|
const r = (() => {
|
|
2526
2527
|
const s = To(e, t);
|
|
2527
|
-
return s instanceof
|
|
2528
|
+
return s instanceof dr ? e : s;
|
|
2528
2529
|
})();
|
|
2529
2530
|
return new jo(r, {
|
|
2530
2531
|
docsPath: n,
|
|
@@ -2623,7 +2624,7 @@ async function pt({ client: e, multiply: n, request: t, type: r }) {
|
|
|
2623
2624
|
return null;
|
|
2624
2625
|
}
|
|
2625
2626
|
}
|
|
2626
|
-
const
|
|
2627
|
+
const xr = /* @__PURE__ */ se({
|
|
2627
2628
|
...Lo,
|
|
2628
2629
|
id: 59144,
|
|
2629
2630
|
name: "Linea Mainnet",
|
|
@@ -2657,7 +2658,7 @@ const Cr = /* @__PURE__ */ se({
|
|
|
2657
2658
|
},
|
|
2658
2659
|
ensTlds: [".linea.eth"],
|
|
2659
2660
|
testnet: !1
|
|
2660
|
-
}),
|
|
2661
|
+
}), br = /* @__PURE__ */ se({
|
|
2661
2662
|
id: 1,
|
|
2662
2663
|
name: "Ethereum",
|
|
2663
2664
|
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
@@ -2684,7 +2685,7 @@ const Cr = /* @__PURE__ */ se({
|
|
|
2684
2685
|
blockCreated: 14353601
|
|
2685
2686
|
}
|
|
2686
2687
|
}
|
|
2687
|
-
}), he = 1,
|
|
2688
|
+
}), he = 1, zr = /* @__PURE__ */ se({
|
|
2688
2689
|
...en,
|
|
2689
2690
|
id: 10,
|
|
2690
2691
|
name: "OP Mainnet",
|
|
@@ -2729,7 +2730,7 @@ const Cr = /* @__PURE__ */ se({
|
|
|
2729
2730
|
}
|
|
2730
2731
|
},
|
|
2731
2732
|
sourceId: he
|
|
2732
|
-
}),
|
|
2733
|
+
}), Ir = /* @__PURE__ */ se({
|
|
2733
2734
|
id: 137,
|
|
2734
2735
|
name: "Polygon",
|
|
2735
2736
|
nativeCurrency: { name: "POL", symbol: "POL", decimals: 18 },
|
|
@@ -2803,12 +2804,12 @@ const Cr = /* @__PURE__ */ se({
|
|
|
2803
2804
|
name: "Dogecoin"
|
|
2804
2805
|
}
|
|
2805
2806
|
}, Ce = {
|
|
2806
|
-
evm: [
|
|
2807
|
+
evm: [br, Cr, zr, pr, xr, Kn, Ir],
|
|
2807
2808
|
solana: [Yo],
|
|
2808
2809
|
aptos: [Zo],
|
|
2809
2810
|
dogecoin: [Jo]
|
|
2810
|
-
},
|
|
2811
|
-
const { apiChains: r = [] } = t || {}, s = r.length > 0 ?
|
|
2811
|
+
}, wr = (e, n, t) => {
|
|
2812
|
+
const { apiChains: r = [] } = t || {}, s = r.length > 0 ? Dt(r) : ae, i = [], a = e?.aptos || [];
|
|
2812
2813
|
a.length > 0 ? a.forEach((A) => {
|
|
2813
2814
|
const u = r.find((v) => H(v.chainId) === "aptos");
|
|
2814
2815
|
i.push({
|
|
@@ -2978,17 +2979,17 @@ const Do = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
2978
2979
|
const e = W(X);
|
|
2979
2980
|
if (!e)
|
|
2980
2981
|
throw new Error("WalletConnectContext not found");
|
|
2981
|
-
const { copied: n, copy: t } = Ln(), { chains: r } =
|
|
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, f = s.chainId, A = f ? Number(BigInt(f || "0").toString()) : void 0, u = s.currentWallet, v = O(async () => {
|
|
2982
2983
|
try {
|
|
2983
2984
|
if (!l) return;
|
|
2984
2985
|
t(l);
|
|
2985
2986
|
} catch (I) {
|
|
2986
2987
|
console.error("Failed to copy address:", I);
|
|
2987
2988
|
}
|
|
2988
|
-
}, [l, t]), m = y(() => /* @__PURE__ */ o(k, { 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(k, { 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]);
|
|
2989
2990
|
if (!u)
|
|
2990
2991
|
return null;
|
|
2991
|
-
const g =
|
|
2992
|
+
const g = wr(e.config?.chains, u?.connectors, {
|
|
2992
2993
|
apiChains: r
|
|
2993
2994
|
}), p = g.find((I) => {
|
|
2994
2995
|
if (I.chainType !== d) return !1;
|
|
@@ -3017,7 +3018,7 @@ const Do = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3017
3018
|
variant: "light",
|
|
3018
3019
|
color: "default",
|
|
3019
3020
|
onPress: () => e.modal.setView(V.SelectChains),
|
|
3020
|
-
endContent: /* @__PURE__ */ o(
|
|
3021
|
+
endContent: /* @__PURE__ */ o(Jr, { className: "size-4" }),
|
|
3021
3022
|
children: /* @__PURE__ */ C("div", { className: "flex items-center gap-2", children: [
|
|
3022
3023
|
/* @__PURE__ */ o(
|
|
3023
3024
|
ze,
|
|
@@ -3049,7 +3050,7 @@ const Do = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3049
3050
|
color: "default",
|
|
3050
3051
|
variant: "light",
|
|
3051
3052
|
className: "w-full",
|
|
3052
|
-
startContent: /* @__PURE__ */ o(
|
|
3053
|
+
startContent: /* @__PURE__ */ o(Zr, { className: "size-4" }),
|
|
3053
3054
|
onPress: i,
|
|
3054
3055
|
children: "Disconnect wallet"
|
|
3055
3056
|
}
|
|
@@ -3065,7 +3066,7 @@ const Do = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3065
3066
|
currentProvider: null,
|
|
3066
3067
|
actionsLoading: !1,
|
|
3067
3068
|
providers: {}
|
|
3068
|
-
},
|
|
3069
|
+
}, Pr = () => {
|
|
3069
3070
|
const [e, n] = Y(Ct), [t, r] = Y("");
|
|
3070
3071
|
return {
|
|
3071
3072
|
walletState: e,
|
|
@@ -3073,14 +3074,14 @@ const Do = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3073
3074
|
error: t,
|
|
3074
3075
|
setError: r,
|
|
3075
3076
|
resetWalletState: () => {
|
|
3076
|
-
n(Ct),
|
|
3077
|
+
n(Ct), Jt();
|
|
3077
3078
|
}
|
|
3078
3079
|
};
|
|
3079
3080
|
}, Ho = () => {
|
|
3080
3081
|
const e = W(X), n = e?.modal.state;
|
|
3081
3082
|
if (!e)
|
|
3082
3083
|
throw new Error("WalletConnectContext not found");
|
|
3083
|
-
const t = n?.chainType || "evm", r = n?.chainId || "", s = n?.name || "-", i = n?.chainInfo?.icon || "", { resetWalletState: a } =
|
|
3084
|
+
const t = n?.chainType || "evm", r = n?.chainId || "", s = n?.name || "-", i = n?.chainInfo?.icon || "", { resetWalletState: a } = Pr(), { mutate: c, isPending: l } = En({
|
|
3084
3085
|
mutationKey: ["switchWallet"],
|
|
3085
3086
|
mutationFn: async () => {
|
|
3086
3087
|
a(), e.modal.setView(V.WalletSearch, {
|
|
@@ -3269,7 +3270,7 @@ const Do = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3269
3270
|
}, bt = {
|
|
3270
3271
|
DEFAULT: "#FCD436",
|
|
3271
3272
|
foreground: "#12122A"
|
|
3272
|
-
},
|
|
3273
|
+
}, yr = () => ({
|
|
3273
3274
|
prefix: "heroui",
|
|
3274
3275
|
themes: {
|
|
3275
3276
|
light: {
|
|
@@ -3289,7 +3290,7 @@ const Do = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3289
3290
|
}
|
|
3290
3291
|
}
|
|
3291
3292
|
}
|
|
3292
|
-
}),
|
|
3293
|
+
}), Br = ({ content: e, size: n = 280, logo: t, logoBackground: r }) => {
|
|
3293
3294
|
const s = ce(null), i = ce(null), [a, c] = Y("#FCD436");
|
|
3294
3295
|
return J(() => {
|
|
3295
3296
|
if (s.current) {
|
|
@@ -3331,19 +3332,19 @@ const Do = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3331
3332
|
if (i.current)
|
|
3332
3333
|
i.current.update(d);
|
|
3333
3334
|
else {
|
|
3334
|
-
const A = new
|
|
3335
|
+
const A = new As(d);
|
|
3335
3336
|
i.current = A, l.innerHTML = "", A.append(l);
|
|
3336
3337
|
}
|
|
3337
3338
|
const f = l;
|
|
3338
3339
|
return () => {
|
|
3339
3340
|
f && i.current && (f.innerHTML = "", i.current = null);
|
|
3340
3341
|
};
|
|
3341
|
-
}, [e, n, t, r, a]), /* @__PURE__ */ o(
|
|
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 }) }) });
|
|
3342
3343
|
}, Ro = ({ isOpen: e, onClose: n, onBack: t, url: r, logo: s, logoBackground: i, title: a }) => {
|
|
3343
3344
|
const { copy: c, copied: l } = Ln();
|
|
3344
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: [
|
|
3345
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." }),
|
|
3346
|
-
/* @__PURE__ */ o(
|
|
3347
|
+
/* @__PURE__ */ o(Br, { content: r, logo: s, logoBackground: i }),
|
|
3347
3348
|
/* @__PURE__ */ o(k, { variant: "bordered", size: "lg", fullWidth: !0, onPress: () => {
|
|
3348
3349
|
c(r);
|
|
3349
3350
|
}, children: l ? "Copied!" : "Copy Link" })
|
|
@@ -3445,7 +3446,7 @@ const Do = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3445
3446
|
/* @__PURE__ */ o("p", { children: "Please wait while we set up your wallet connection..." })
|
|
3446
3447
|
] })
|
|
3447
3448
|
] }) });
|
|
3448
|
-
},
|
|
3449
|
+
}, hr = () => {
|
|
3449
3450
|
const e = W(X), { connectWallet: n } = Oe();
|
|
3450
3451
|
return {
|
|
3451
3452
|
handleSelectWallet: O(
|
|
@@ -3508,23 +3509,23 @@ const Do = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3508
3509
|
url: typeof window < "u" ? window.location.origin : "",
|
|
3509
3510
|
icons: ["https://tomo.inc/favicon.svg"]
|
|
3510
3511
|
}
|
|
3511
|
-
},
|
|
3512
|
-
stage: "
|
|
3512
|
+
}, Mr = "cTQxTUlSZXhwOXF6T2hnTHJVRzI6MTpjaQ", Wr = "362812706401-eppkpnqocdaejaf45ics815t22oe0j7l.apps.googleusercontent.com", He = {
|
|
3513
|
+
stage: "prod-dogeos",
|
|
3513
3514
|
name: "DogeOS Social Wallet",
|
|
3514
3515
|
logo: "https://web3-assets.tomo.inc/assets/wallets/mydoge/wallet.svg",
|
|
3515
|
-
xClientId:
|
|
3516
|
-
googleClientId:
|
|
3516
|
+
xClientId: Mr,
|
|
3517
|
+
googleClientId: Wr,
|
|
3517
3518
|
walletBaseUrl: "https://dogeos.embedded-wallet.tomo.inc/embed"
|
|
3518
3519
|
}, zt = {
|
|
3519
3520
|
basicLogins: ["email", "externalWallets"],
|
|
3520
3521
|
socialLogins: [
|
|
3521
|
-
{ type: "google", clientId:
|
|
3522
|
-
{ type: "x", clientId:
|
|
3522
|
+
{ type: "google", clientId: Wr },
|
|
3523
|
+
{ type: "x", clientId: Mr }
|
|
3523
3524
|
]
|
|
3524
3525
|
}, ie = {
|
|
3525
3526
|
connectors: re.recommendedWallets,
|
|
3526
3527
|
chains: {
|
|
3527
|
-
evm: [
|
|
3528
|
+
evm: [br, Cr, zr, pr, xr, Kn, Ir],
|
|
3528
3529
|
// solana: recommendedChains.solana,
|
|
3529
3530
|
// aptos: recommendedChains.aptos,
|
|
3530
3531
|
dogecoin: Ce.dogecoin
|
|
@@ -3578,12 +3579,12 @@ const Do = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3578
3579
|
return Tt({
|
|
3579
3580
|
chainType: "all",
|
|
3580
3581
|
recommendedConnectors: n,
|
|
3581
|
-
connectorTypes: n.map((r) =>
|
|
3582
|
+
connectorTypes: n.map((r) => rs(r) ? "wagmi" : "tomo"),
|
|
3582
3583
|
options: {
|
|
3583
3584
|
baseUrl: t
|
|
3584
3585
|
}
|
|
3585
3586
|
});
|
|
3586
|
-
}, It = (e, n) => n === "all" ? e : e.filter((t) => !!t.connectors[n]),
|
|
3587
|
+
}, It = (e, n) => n === "all" ? e : e.filter((t) => !!t.connectors[n]), Vr = (e) => {
|
|
3587
3588
|
if (!e || !e.info)
|
|
3588
3589
|
return null;
|
|
3589
3590
|
const n = e.connectors;
|
|
@@ -3604,7 +3605,7 @@ const Do = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3604
3605
|
queryFn: a,
|
|
3605
3606
|
// Refetch on window focus to update wallet installation status
|
|
3606
3607
|
refetchOnWindowFocus: !0
|
|
3607
|
-
}), l = y(() => s ?
|
|
3608
|
+
}), l = y(() => s ? Vr(s) : null, [s]), d = y(() => {
|
|
3608
3609
|
if (!c.data)
|
|
3609
3610
|
return;
|
|
3610
3611
|
const f = Array.isArray(c.data.all) ? [...c.data.all] : [], A = Array.isArray(c.data.recommoned) ? [...c.data.recommoned] : [];
|
|
@@ -3634,7 +3635,7 @@ const Do = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3634
3635
|
children: [
|
|
3635
3636
|
/* @__PURE__ */ o("span", { children: "Powered by" }),
|
|
3636
3637
|
r.logo && /* @__PURE__ */ o("img", { src: r.logo, alt: "logo", className: "w-4 h-4" }),
|
|
3637
|
-
!r.logo && /* @__PURE__ */ o(
|
|
3638
|
+
!r.logo && /* @__PURE__ */ o(Fr, {})
|
|
3638
3639
|
]
|
|
3639
3640
|
}
|
|
3640
3641
|
)
|
|
@@ -3662,7 +3663,7 @@ const Do = ({ title: e, onBack: n, onClose: t, rightContent: r, hideCloseButton:
|
|
|
3662
3663
|
const i = t?.uuid === "walletConnect";
|
|
3663
3664
|
return /* @__PURE__ */ o("span", { className: "text-xs line-height-[140px] font-normal text-[#A9A29D]", children: i ? "QR Code" : "Installed" });
|
|
3664
3665
|
}, [t?.uuid, r]);
|
|
3665
|
-
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: [
|
|
3666
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" }) }),
|
|
3667
3668
|
/* @__PURE__ */ C("div", { className: "flex flex-col justify-center items-center scale-80 text-center", children: [
|
|
3668
3669
|
/* @__PURE__ */ o("span", { className: "text-sm font-medium", children: t.name }),
|
|
@@ -3710,30 +3711,30 @@ const lc = {
|
|
|
3710
3711
|
}), a;
|
|
3711
3712
|
}, [t?.config?.chains]), s = (i) => i.icon ? /* @__PURE__ */ o(ze, { icon: i.icon, className: "size-6 overflow-hidden rounded-full" }) : i.title;
|
|
3712
3713
|
return /* @__PURE__ */ o(
|
|
3713
|
-
|
|
3714
|
+
Kr,
|
|
3714
3715
|
{
|
|
3715
3716
|
variant: "bordered",
|
|
3716
3717
|
fullWidth: !0,
|
|
3717
3718
|
selectedKey: e,
|
|
3718
3719
|
onSelectionChange: (i) => n(i),
|
|
3719
|
-
children: r.map((i) => /* @__PURE__ */ o(
|
|
3720
|
+
children: r.map((i) => /* @__PURE__ */ o(qr, { title: s(i) }, i.key))
|
|
3720
3721
|
}
|
|
3721
3722
|
);
|
|
3722
3723
|
}, Ac = ({ wallet: e, onSelectWallet: n }) => {
|
|
3723
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]);
|
|
3724
3725
|
return /* @__PURE__ */ o(
|
|
3725
|
-
|
|
3726
|
+
Nr,
|
|
3726
3727
|
{
|
|
3727
3728
|
onPress: () => n?.(e),
|
|
3728
|
-
startContent: /* @__PURE__ */ o(
|
|
3729
|
+
startContent: /* @__PURE__ */ o(Xr, { icon: t?.icon, title: t?.name }),
|
|
3729
3730
|
endContent: s
|
|
3730
3731
|
},
|
|
3731
3732
|
e.info.uuid
|
|
3732
3733
|
);
|
|
3733
|
-
},
|
|
3734
|
+
}, Xr = ({ icon: e, title: n }) => /* @__PURE__ */ C("div", { className: "flex items-center gap-2", children: [
|
|
3734
3735
|
typeof e == "string" ? /* @__PURE__ */ o(fe, { src: e, alt: n, width: 32, height: 32, radius: "md" }) : e,
|
|
3735
3736
|
/* @__PURE__ */ o("span", { className: "text-sm font-medium text-foreground", children: n })
|
|
3736
|
-
] }),
|
|
3737
|
+
] }), Nr = (e) => /* @__PURE__ */ o(
|
|
3737
3738
|
k,
|
|
3738
3739
|
{
|
|
3739
3740
|
fullWidth: !0,
|
|
@@ -3760,7 +3761,7 @@ function fc({ wallets: e, loading: n, onSelectWallet: t }) {
|
|
|
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(Ac, { wallet: r, onSelectWallet: t }, r.info?.uuid)) });
|
|
3761
3762
|
}
|
|
3762
3763
|
const uc = () => {
|
|
3763
|
-
const e = W(X), { handleSelectWallet: n } =
|
|
3764
|
+
const e = W(X), { handleSelectWallet: n } = hr(), { data: t, isLoading: r } = ke("all", e?.config?.connectors), [s, i] = y(() => {
|
|
3764
3765
|
const l = t?.recommended || [], d = t?.all || [];
|
|
3765
3766
|
return Os(l, d);
|
|
3766
3767
|
}, [t]), a = y(
|
|
@@ -3770,10 +3771,10 @@ const uc = () => {
|
|
|
3770
3771
|
return /* @__PURE__ */ o(F, { title: "Connect your wallet", children: /* @__PURE__ */ C("div", { className: "flex flex-col gap-4", children: [
|
|
3771
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 }) }) }),
|
|
3772
3773
|
r ? null : /* @__PURE__ */ o(
|
|
3773
|
-
|
|
3774
|
+
Nr,
|
|
3774
3775
|
{
|
|
3775
3776
|
onPress: () => e?.modal.setView(V.WalletSearch),
|
|
3776
|
-
startContent: /* @__PURE__ */ o(
|
|
3777
|
+
startContent: /* @__PURE__ */ o(Xr, { icon: /* @__PURE__ */ o(Ur, {}), title: "Search more wallets" }),
|
|
3777
3778
|
endContent: /* @__PURE__ */ o("span", { className: "text-[#A9A29D] text-sm", children: i.length })
|
|
3778
3779
|
}
|
|
3779
3780
|
),
|
|
@@ -3807,7 +3808,7 @@ const uc = () => {
|
|
|
3807
3808
|
n.current && (n.current.scrollTop = 0);
|
|
3808
3809
|
}, e), n;
|
|
3809
3810
|
}, mc = Nt, pc = () => {
|
|
3810
|
-
const e = W(X), { handleSelectWallet: n } =
|
|
3811
|
+
const e = W(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: f } = gc(), A = y(() => a.filter((g) => g.info?.name?.toLowerCase().includes(c.toLowerCase())).filter((g) => !g.isEmbeddedWallet), [a, c]), u = vc([r]), v = y(() => d && f > 0 ? `${Math.max(180, 340 - f * 0.6)}px` : "340px", [d, f]), m = O(
|
|
3811
3812
|
(g) => {
|
|
3812
3813
|
e?.modal.setCurrentViewState({ chainType: g });
|
|
3813
3814
|
},
|
|
@@ -3827,7 +3828,7 @@ const uc = () => {
|
|
|
3827
3828
|
placeholder: "Search wallet",
|
|
3828
3829
|
value: c,
|
|
3829
3830
|
onChange: (g) => l(g.target.value),
|
|
3830
|
-
startContent: /* @__PURE__ */ o(
|
|
3831
|
+
startContent: /* @__PURE__ */ o(Gr, {}),
|
|
3831
3832
|
classNames: {
|
|
3832
3833
|
inputWrapper: "rounded-full h-11"
|
|
3833
3834
|
}
|
|
@@ -3863,7 +3864,7 @@ const uc = () => {
|
|
|
3863
3864
|
error: null
|
|
3864
3865
|
}, xc = (e = {}) => {
|
|
3865
3866
|
const { closeModalBeforeIframe: n = !0 } = e, [t, r] = Y(!1), s = W(X), i = Cc(), { embeddedWalletConnector: a } = ke("all"), { connectWallet: c } = Oe(), l = y(
|
|
3866
|
-
() => a ?? (i.wallet ?
|
|
3867
|
+
() => a ?? (i.wallet ? Vr(i.wallet) : null),
|
|
3867
3868
|
[a, i.wallet]
|
|
3868
3869
|
);
|
|
3869
3870
|
if (!s)
|
|
@@ -3946,7 +3947,7 @@ const uc = () => {
|
|
|
3946
3947
|
const e = W(X);
|
|
3947
3948
|
if (!e)
|
|
3948
3949
|
return { themeMode: "dark", themeType: "doge_dark" };
|
|
3949
|
-
const { themeMode: n } = e.config || { themeMode: "dark" }, t =
|
|
3950
|
+
const { themeMode: n } = e.config || { themeMode: "dark" }, t = yr();
|
|
3950
3951
|
return { themeMode: n, themeType: t, isDark: n === "dark" };
|
|
3951
3952
|
}, zc = ({
|
|
3952
3953
|
text: e = "or",
|
|
@@ -4028,7 +4029,7 @@ const uc = () => {
|
|
|
4028
4029
|
throw new Error("WalletConnectContext not found");
|
|
4029
4030
|
const [i, a] = Y(e.modal.state?.email || "");
|
|
4030
4031
|
J(() => {
|
|
4031
|
-
e.modal.state?.error && (
|
|
4032
|
+
e.modal.state?.error && (Rr({
|
|
4032
4033
|
title: e.modal.state.error,
|
|
4033
4034
|
color: "danger",
|
|
4034
4035
|
timeout: 3e3,
|
|
@@ -4108,7 +4109,7 @@ const uc = () => {
|
|
|
4108
4109
|
autoComplete: "new-password",
|
|
4109
4110
|
onKeyDown: (f) => {
|
|
4110
4111
|
if (f.key === "Enter") {
|
|
4111
|
-
if (!
|
|
4112
|
+
if (!Zt(i))
|
|
4112
4113
|
return;
|
|
4113
4114
|
c();
|
|
4114
4115
|
}
|
|
@@ -4216,7 +4217,7 @@ const Wc = (e) => {
|
|
|
4216
4217
|
setCurrentViewState: g
|
|
4217
4218
|
};
|
|
4218
4219
|
};
|
|
4219
|
-
let xe = null,
|
|
4220
|
+
let xe = null, jr = null;
|
|
4220
4221
|
function wt(e) {
|
|
4221
4222
|
xe = e;
|
|
4222
4223
|
}
|
|
@@ -4224,12 +4225,12 @@ function Vc() {
|
|
|
4224
4225
|
return xe;
|
|
4225
4226
|
}
|
|
4226
4227
|
function pn(e) {
|
|
4227
|
-
|
|
4228
|
-
}
|
|
4229
|
-
function jr() {
|
|
4230
|
-
return Nr;
|
|
4228
|
+
jr = e;
|
|
4231
4229
|
}
|
|
4232
4230
|
function Tr() {
|
|
4231
|
+
return jr;
|
|
4232
|
+
}
|
|
4233
|
+
function Er() {
|
|
4233
4234
|
if (typeof window > "u")
|
|
4234
4235
|
return xe;
|
|
4235
4236
|
if (xe)
|
|
@@ -4248,32 +4249,32 @@ function ln() {
|
|
|
4248
4249
|
return xe !== null;
|
|
4249
4250
|
}
|
|
4250
4251
|
function Rn() {
|
|
4251
|
-
const e =
|
|
4252
|
+
const e = Er();
|
|
4252
4253
|
return ln() ? e !== null : !1;
|
|
4253
4254
|
}
|
|
4254
|
-
function
|
|
4255
|
+
function Sr() {
|
|
4255
4256
|
if (!ln())
|
|
4256
4257
|
return null;
|
|
4257
|
-
const e = Rn(), n =
|
|
4258
|
+
const e = Rn(), n = fs();
|
|
4258
4259
|
return e ? n : null;
|
|
4259
4260
|
}
|
|
4260
4261
|
function Xc() {
|
|
4261
4262
|
if (!ln())
|
|
4262
4263
|
return null;
|
|
4263
|
-
const e = Rn(), n =
|
|
4264
|
+
const e = Rn(), n = gs();
|
|
4264
4265
|
return e ? n : null;
|
|
4265
4266
|
}
|
|
4266
4267
|
function Nc() {
|
|
4267
4268
|
if (!ln())
|
|
4268
4269
|
return null;
|
|
4269
|
-
const e = Rn(), n =
|
|
4270
|
+
const e = Rn(), n = us();
|
|
4270
4271
|
return e ? n : null;
|
|
4271
4272
|
}
|
|
4272
4273
|
function Xn(e, n, t) {
|
|
4273
4274
|
const r = Vc();
|
|
4274
4275
|
if (!r)
|
|
4275
4276
|
return null;
|
|
4276
|
-
const s =
|
|
4277
|
+
const s = Tr(), i = t || s || r.connectors;
|
|
4277
4278
|
return !i || i.length === 0 ? null : i.find((a) => {
|
|
4278
4279
|
const c = (a.id || "").toLowerCase(), l = (a.name || "").toLowerCase(), d = e.toLowerCase(), f = n?.toLowerCase();
|
|
4279
4280
|
return c === d || c === f || l === d || l === f || c.includes(d) || l.includes(d);
|
|
@@ -4290,7 +4291,7 @@ const Cn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4290
4291
|
resetWalletState: s,
|
|
4291
4292
|
setMainView: i
|
|
4292
4293
|
}) => {
|
|
4293
|
-
const { currentProvider: a, currentWallet: c, isConnected: l, actionsLoading: d } = e, A = W(an)?.connectedInfo ?? null, u =
|
|
4294
|
+
const { currentProvider: a, currentWallet: c, isConnected: l, actionsLoading: d } = e, A = W(an)?.connectedInfo ?? null, u = Sr(), v = Xc(), m = Tr(), g = O(
|
|
4294
4295
|
async (b) => {
|
|
4295
4296
|
const { wallet: z, chainType: M } = b, S = (z.connectors[M] || null)?.provider || null;
|
|
4296
4297
|
if (l && c?.info?.uuid === z.info.uuid && M === e.chainType)
|
|
@@ -4485,7 +4486,7 @@ const Cn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4485
4486
|
} catch (B) {
|
|
4486
4487
|
if ((B && typeof B == "object" && "code" in B ? B.code : void 0) === 4902)
|
|
4487
4488
|
try {
|
|
4488
|
-
return await
|
|
4489
|
+
return await ss(S, E), !0;
|
|
4489
4490
|
} catch (j) {
|
|
4490
4491
|
throw r(j instanceof Error ? j.message : "Add chain failed"), console.error("Add chain failed:", j), j;
|
|
4491
4492
|
}
|
|
@@ -4509,7 +4510,7 @@ const Cn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4509
4510
|
issuedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
4510
4511
|
}, ...b || {} };
|
|
4511
4512
|
try {
|
|
4512
|
-
const E = await
|
|
4513
|
+
const E = await is(M, {
|
|
4513
4514
|
chainType: e.chainType,
|
|
4514
4515
|
account: {
|
|
4515
4516
|
address: e.address,
|
|
@@ -4547,7 +4548,7 @@ const Cn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4547
4548
|
const { message: z, nonce: M } = b;
|
|
4548
4549
|
if (!z || z.length === 0)
|
|
4549
4550
|
throw new Error("Message is required");
|
|
4550
|
-
return t((S) => ({ ...S, actionsLoading: !0 })), await
|
|
4551
|
+
return t((S) => ({ ...S, actionsLoading: !0 })), await os(
|
|
4551
4552
|
{ message: z, nonce: M || Math.random().toString(36).substring(7) },
|
|
4552
4553
|
{
|
|
4553
4554
|
chainType: e.chainType,
|
|
@@ -4712,7 +4713,7 @@ const Cn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4712
4713
|
const { currentWallet: n } = e.account;
|
|
4713
4714
|
if (!n)
|
|
4714
4715
|
throw new Error("Current wallet not found");
|
|
4715
|
-
const { chains: t, isLoading: r } =
|
|
4716
|
+
const { chains: t, isLoading: r } = Yt(), s = wr(e.config?.chains, n?.connectors, {
|
|
4716
4717
|
apiChains: r ? void 0 : t
|
|
4717
4718
|
});
|
|
4718
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(Ec, { chains: s }) }) }) });
|
|
@@ -4878,7 +4879,7 @@ const Cn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4878
4879
|
}, title: "Wallet Connect", children: /* @__PURE__ */ C("div", { className: "flex flex-col items-center justify-center px-5 pb-6 gap-4", children: [
|
|
4879
4880
|
/* @__PURE__ */ o("p", { className: "text-sm text-foreground/80 text-center", children: "Scan the QR code with your wallet camera" }),
|
|
4880
4881
|
/* @__PURE__ */ o(
|
|
4881
|
-
|
|
4882
|
+
Br,
|
|
4882
4883
|
{
|
|
4883
4884
|
content: t,
|
|
4884
4885
|
logo: n.info.icon,
|
|
@@ -4887,7 +4888,7 @@ const Cn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4887
4888
|
),
|
|
4888
4889
|
/* @__PURE__ */ o(k, { variant: "light", size: "lg", fullWidth: !0, onPress: a, children: i ? "Copied!" : "Copy Link" })
|
|
4889
4890
|
] }) });
|
|
4890
|
-
},
|
|
4891
|
+
}, Or = {
|
|
4891
4892
|
[V.Loading]: () => /* @__PURE__ */ o(rc, {}),
|
|
4892
4893
|
[V.Error]: () => /* @__PURE__ */ o(qo, {}),
|
|
4893
4894
|
[V.Connecting]: () => /* @__PURE__ */ o(Ko, {}),
|
|
@@ -4903,18 +4904,18 @@ const Cn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4903
4904
|
[V.UnsupportChain]: () => /* @__PURE__ */ o(Hc, {}),
|
|
4904
4905
|
[V.WalletHome]: () => /* @__PURE__ */ o(Bc, {})
|
|
4905
4906
|
}, Kc = (e) => {
|
|
4906
|
-
const { hideHeader: n, hideBody: t, onBack: r, ...s } = e, i = y(() => r ? /* @__PURE__ */ o(k, { isIconOnly: !0, size: "sm", variant: "light", onPress: r, radius: "full", children: /* @__PURE__ */ o(Mt, {}) }) : null, [r]), a = y(() => n ? null : /* @__PURE__ */ C(
|
|
4907
|
+
const { hideHeader: n, hideBody: t, onBack: r, ...s } = e, i = y(() => r ? /* @__PURE__ */ o(k, { isIconOnly: !0, size: "sm", variant: "light", onPress: r, radius: "full", children: /* @__PURE__ */ o(Mt, {}) }) : null, [r]), a = y(() => n ? null : /* @__PURE__ */ C(_r, { className: "flex items-center justify-between", children: [
|
|
4907
4908
|
i,
|
|
4908
4909
|
/* @__PURE__ */ o("span", { children: e.title }),
|
|
4909
4910
|
/* @__PURE__ */ o(k, { isIconOnly: !0, size: "sm", variant: "light", onPress: e.onClose, radius: "full", children: /* @__PURE__ */ o(Wt, {}) })
|
|
4910
|
-
] }), [n, e.title, e.onClose, i]), c = y(() => t ? null : /* @__PURE__ */ o(
|
|
4911
|
+
] }), [n, e.title, e.onClose, i]), c = y(() => t ? null : /* @__PURE__ */ o($r, { className: "px-5", children: e.children }), [t, e.children]);
|
|
4911
4912
|
return /* @__PURE__ */ o(
|
|
4912
4913
|
Xt,
|
|
4913
4914
|
{
|
|
4914
4915
|
...s,
|
|
4915
4916
|
hideCloseButton: !0,
|
|
4916
4917
|
portalContainer: document.getElementById("modal-container") || void 0,
|
|
4917
|
-
children: /* @__PURE__ */ C(
|
|
4918
|
+
children: /* @__PURE__ */ C(es, { className: "bg-content1", children: [
|
|
4918
4919
|
a,
|
|
4919
4920
|
c
|
|
4920
4921
|
] })
|
|
@@ -4925,7 +4926,7 @@ const Cn = (e, n, t = "Wallet is performing an action, please wait...") => {
|
|
|
4925
4926
|
if (!e)
|
|
4926
4927
|
return null;
|
|
4927
4928
|
const { modal: n, connection: t } = e, r = () => {
|
|
4928
|
-
const s =
|
|
4929
|
+
const s = Or[n.view];
|
|
4929
4930
|
return s ? s(e) : null;
|
|
4930
4931
|
};
|
|
4931
4932
|
return /* @__PURE__ */ o(
|
|
@@ -4953,7 +4954,7 @@ function Rc(e, n) {
|
|
|
4953
4954
|
}
|
|
4954
4955
|
const _c = ["embeddedWallet"];
|
|
4955
4956
|
async function $c(e, n) {
|
|
4956
|
-
const t =
|
|
4957
|
+
const t = ms.getInstance(), r = await t.init({
|
|
4957
4958
|
...e,
|
|
4958
4959
|
clientId: e.clientId,
|
|
4959
4960
|
stage: e.stage || "prod"
|
|
@@ -5009,7 +5010,7 @@ const ea = ({
|
|
|
5009
5010
|
embeddedWalletState: s,
|
|
5010
5011
|
wagmiConfig: i
|
|
5011
5012
|
}) => {
|
|
5012
|
-
const a = ce(!1), { data: c } = ke("all", [], { embeddedWallet: s?.wallet ?? null }), l = y(() => c?.all || [], [c?.all]), d =
|
|
5013
|
+
const a = ce(!1), { data: c } = ke("all", [], { embeddedWallet: s?.wallet ?? null }), l = y(() => c?.all || [], [c?.all]), d = Sr(), f = Nc();
|
|
5013
5014
|
J(() => {
|
|
5014
5015
|
if (a.current || t || n)
|
|
5015
5016
|
return;
|
|
@@ -5330,11 +5331,11 @@ function aa(e = 11) {
|
|
|
5330
5331
|
return Ke.substring(Qe, Qe++ + e);
|
|
5331
5332
|
}
|
|
5332
5333
|
const la = "2.22.1", da = () => `@wagmi/core@${la}`;
|
|
5333
|
-
var
|
|
5334
|
+
var kr = function(e, n, t, r) {
|
|
5334
5335
|
if (t === "a" && !r) throw new TypeError("Private accessor was defined without a getter");
|
|
5335
5336
|
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");
|
|
5336
5337
|
return t === "m" ? r : t === "a" ? r.call(e) : r ? r.value : n.get(e);
|
|
5337
|
-
}, nn,
|
|
5338
|
+
}, nn, Lr;
|
|
5338
5339
|
class je extends Error {
|
|
5339
5340
|
get docsBaseUrl() {
|
|
5340
5341
|
return "https://wagmi.sh/core";
|
|
@@ -5383,11 +5384,11 @@ class je extends Error {
|
|
|
5383
5384
|
`), t.cause && (this.cause = t.cause), this.details = r, this.docsPath = s, this.metaMessages = t.metaMessages, this.shortMessage = n;
|
|
5384
5385
|
}
|
|
5385
5386
|
walk(n) {
|
|
5386
|
-
return
|
|
5387
|
+
return kr(this, nn, "m", Lr).call(this, this, n);
|
|
5387
5388
|
}
|
|
5388
5389
|
}
|
|
5389
|
-
nn = /* @__PURE__ */ new WeakSet(),
|
|
5390
|
-
return t?.(n) ? n : n.cause ?
|
|
5390
|
+
nn = /* @__PURE__ */ new WeakSet(), Lr = function e(n, t) {
|
|
5391
|
+
return t?.(n) ? n : n.cause ? kr(this, nn, "m", e).call(this, n.cause, t) : n;
|
|
5391
5392
|
};
|
|
5392
5393
|
class Aa extends je {
|
|
5393
5394
|
constructor() {
|
|
@@ -5497,7 +5498,7 @@ function _n(e = {}) {
|
|
|
5497
5498
|
throw new ve();
|
|
5498
5499
|
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));
|
|
5499
5500
|
try {
|
|
5500
|
-
await
|
|
5501
|
+
await Cs(() => (
|
|
5501
5502
|
// TODO: Remove explicit type for viem@3
|
|
5502
5503
|
d.request({
|
|
5503
5504
|
// `'wallet_revokePermissions'` added in `viem@2.10.3`
|
|
@@ -5548,7 +5549,7 @@ function _n(e = {}) {
|
|
|
5548
5549
|
}
|
|
5549
5550
|
throw new ve();
|
|
5550
5551
|
}
|
|
5551
|
-
return !!(await
|
|
5552
|
+
return !!(await ps(() => this.getAccounts())).length;
|
|
5552
5553
|
} catch {
|
|
5553
5554
|
return !1;
|
|
5554
5555
|
}
|
|
@@ -5713,7 +5714,7 @@ function ua(e, n = T.EVM) {
|
|
|
5713
5714
|
if (!t)
|
|
5714
5715
|
return null;
|
|
5715
5716
|
const r = e.info, s = r.rdns || r.uuid || `wallet-${r.name.toLowerCase().replace(/\s+/g, "-")}`;
|
|
5716
|
-
return
|
|
5717
|
+
return vs((i) => ({
|
|
5717
5718
|
..._n({
|
|
5718
5719
|
target: () => ({
|
|
5719
5720
|
id: s,
|
|
@@ -5760,7 +5761,7 @@ const ma = ({
|
|
|
5760
5761
|
defaultMainView: r,
|
|
5761
5762
|
socialLoginEnabled: s
|
|
5762
5763
|
}) => {
|
|
5763
|
-
const [i, a] = Y(V.Loading), { walletState: c, setWalletState: l, error: d, setError: f, resetWalletState: A } =
|
|
5764
|
+
const [i, a] = Y(V.Loading), { walletState: c, setWalletState: l, error: d, setError: f, resetWalletState: A } = Pr(), {
|
|
5764
5765
|
wallet: u,
|
|
5765
5766
|
isAvailable: v,
|
|
5766
5767
|
isLoading: m,
|
|
@@ -5869,7 +5870,7 @@ const ma = ({
|
|
|
5869
5870
|
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);
|
|
5870
5871
|
ge.length > 0 ? pn(ge) : pn(null);
|
|
5871
5872
|
}, [j.data, N]), J(() => {
|
|
5872
|
-
|
|
5873
|
+
cs(n?.walletConnectConfig || Vn);
|
|
5873
5874
|
}, [n?.walletConnectConfig]), na({
|
|
5874
5875
|
setWalletState: l,
|
|
5875
5876
|
currentWallet: M.currentWallet,
|
|
@@ -5928,13 +5929,13 @@ function pa({
|
|
|
5928
5929
|
[d, f]
|
|
5929
5930
|
);
|
|
5930
5931
|
return /* @__PURE__ */ o(X.Provider, { value: A, children: /* @__PURE__ */ C(
|
|
5931
|
-
|
|
5932
|
+
ns,
|
|
5932
5933
|
{
|
|
5933
5934
|
themeConfig: c,
|
|
5934
5935
|
defaultTheme: l || "light",
|
|
5935
5936
|
children: [
|
|
5936
5937
|
/* @__PURE__ */ o(
|
|
5937
|
-
|
|
5938
|
+
ts,
|
|
5938
5939
|
{
|
|
5939
5940
|
maxVisibleToasts: 3,
|
|
5940
5941
|
placement: "top-center",
|
|
@@ -5951,14 +5952,14 @@ function pa({
|
|
|
5951
5952
|
}
|
|
5952
5953
|
) });
|
|
5953
5954
|
}
|
|
5954
|
-
const Ca = new
|
|
5955
|
+
const Ca = new ls({
|
|
5955
5956
|
defaultOptions: {
|
|
5956
5957
|
queries: {
|
|
5957
5958
|
refetchOnWindowFocus: !1
|
|
5958
5959
|
}
|
|
5959
5960
|
}
|
|
5960
5961
|
}), Xa = ({ children: e, config: n }) => {
|
|
5961
|
-
const t =
|
|
5962
|
+
const t = Er(), r = y(() => {
|
|
5962
5963
|
const c = n || ie, l = c.login ? {
|
|
5963
5964
|
basicLogins: c.login.basicLogins ?? [],
|
|
5964
5965
|
socialLogins: c.login.socialLogins ?? []
|
|
@@ -5994,7 +5995,7 @@ const Ca = new as({
|
|
|
5994
5995
|
};
|
|
5995
5996
|
return wt(t || null), v;
|
|
5996
5997
|
}, [n, t]), s = V.WalletHome, i = y(() => Uc(n?.login), [n?.login]), a = y(() => {
|
|
5997
|
-
const c =
|
|
5998
|
+
const c = yr(), l = n?.theme;
|
|
5998
5999
|
if (!l) return c;
|
|
5999
6000
|
const d = c.themes ?? {}, f = l.themes ?? {}, A = (u, v) => {
|
|
6000
6001
|
if (!v) return u ?? {};
|
|
@@ -6016,7 +6017,7 @@ const Ca = new as({
|
|
|
6016
6017
|
}
|
|
6017
6018
|
};
|
|
6018
6019
|
}, [n?.theme]);
|
|
6019
|
-
return typeof window > "u" ? null : /* @__PURE__ */ o(
|
|
6020
|
+
return typeof window > "u" ? null : /* @__PURE__ */ o(as, { client: Ca, children: /* @__PURE__ */ o(
|
|
6020
6021
|
ma,
|
|
6021
6022
|
{
|
|
6022
6023
|
contextConfig: r,
|
|
@@ -6031,7 +6032,7 @@ const Ca = new as({
|
|
|
6031
6032
|
if (!t)
|
|
6032
6033
|
return console.error("WalletConnectEmbed must be used within WalletConnectProvider"), null;
|
|
6033
6034
|
const s = t.connection.isConnected ? V.Account : t.modal.view, a = (() => {
|
|
6034
|
-
const c =
|
|
6035
|
+
const c = Or[s];
|
|
6035
6036
|
return c ? c(t) : null;
|
|
6036
6037
|
})();
|
|
6037
6038
|
return /* @__PURE__ */ o(
|
|
@@ -6046,11 +6047,11 @@ const Ca = new as({
|
|
|
6046
6047
|
async function ja() {
|
|
6047
6048
|
let e = [];
|
|
6048
6049
|
try {
|
|
6049
|
-
e = await
|
|
6050
|
+
e = await Lt();
|
|
6050
6051
|
} catch (r) {
|
|
6051
6052
|
console.warn("Failed to fetch chains from API, using default chains:", r);
|
|
6052
6053
|
}
|
|
6053
|
-
const n = e.length > 0 ?
|
|
6054
|
+
const n = e.length > 0 ? Dt(e) : ae, t = {};
|
|
6054
6055
|
if (e.length > 0) {
|
|
6055
6056
|
const r = e.filter((s) => H(s.chainId) === "aptos");
|
|
6056
6057
|
r.length > 0 && (t.aptos = r.map((s) => ({
|