diff --git a/assets/ccip-XgLXf-gm.js b/assets/ccip-CxL6bFVJ.js similarity index 99% rename from assets/ccip-XgLXf-gm.js rename to assets/ccip-CxL6bFVJ.js index 6709f1b2..20ae07fe 100644 --- a/assets/ccip-XgLXf-gm.js +++ b/assets/ccip-CxL6bFVJ.js @@ -1,4 +1,4 @@ -import { f as BaseError, h as getUrl, s as stringify, i as decodeErrorResult, j as isAddressEqual, k as call, l as concat, m as encodeAbiParameters, H as HttpRequestError, n as isHex } from "./index-CWBAsnr3.js"; +import { f as BaseError, h as getUrl, s as stringify, i as decodeErrorResult, j as isAddressEqual, k as call, l as concat, m as encodeAbiParameters, H as HttpRequestError, n as isHex } from "./index-BhMw1gK2.js"; class OffchainLookupError extends BaseError { constructor({ callbackSelector, cause, data, extraData, sender, urls }) { var _a; diff --git a/assets/hooks.module-DwKr4YEl.js b/assets/hooks.module-BrgRyP7Z.js similarity index 99% rename from assets/hooks.module-DwKr4YEl.js rename to assets/hooks.module-BrgRyP7Z.js index adf31632..8f6b53c6 100644 --- a/assets/hooks.module-DwKr4YEl.js +++ b/assets/hooks.module-BrgRyP7Z.js @@ -1,5 +1,5 @@ -import { p as process$1, c as commonjsGlobal, B as Buffer$7, a as getAugmentedNamespace } from "./index-CWBAsnr3.js"; -import { e as eventsExports, r as require$$0$1, a as require$$0$2, i as inherits_browserExports } from "./inherits_browser-DgGu3QDl.js"; +import { p as process$1, c as commonjsGlobal, B as Buffer$7, a as getAugmentedNamespace } from "./index-BhMw1gK2.js"; +import { e as eventsExports, r as require$$0$1, a as require$$0$2, i as inherits_browserExports } from "./inherits_browser-DTGd2Otu.js"; var readableBrowser = { exports: {} }; var streamBrowser = eventsExports.EventEmitter; var buffer_list; diff --git a/assets/index-CWBAsnr3.js b/assets/index-BhMw1gK2.js similarity index 99% rename from assets/index-CWBAsnr3.js rename to assets/index-BhMw1gK2.js index 4601a4e3..be36fa0d 100644 --- a/assets/index-CWBAsnr3.js +++ b/assets/index-BhMw1gK2.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-D2U_GLHi.js","./hooks.module-DwKr4YEl.js","./inherits_browser-DgGu3QDl.js","./index-CGSWxPxs.js","./index.es-_Rk8O_FW.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-w36ed5XJ.js","./hooks.module-BrgRyP7Z.js","./inherits_browser-DTGd2Otu.js","./index-DU4nszWG.js","./index.es-DUtzAiMf.js"])))=>i.map(i=>d[i]); var __defProp = Object.defineProperty; var __typeError = (msg) => { throw TypeError(msg); @@ -32993,7 +32993,7 @@ async function call(client2, args) { } catch (err) { const data2 = getRevertErrorData(err); const { offchainLookup, offchainLookupSignature } = await __vitePreload(async () => { - const { offchainLookup: offchainLookup2, offchainLookupSignature: offchainLookupSignature2 } = await import("./ccip-XgLXf-gm.js"); + const { offchainLookup: offchainLookup2, offchainLookupSignature: offchainLookupSignature2 } = await import("./ccip-CxL6bFVJ.js"); return { offchainLookup: offchainLookup2, offchainLookupSignature: offchainLookupSignature2 }; }, true ? [] : void 0, import.meta.url); if (client2.ccipRead !== false && (data2 == null ? void 0 : data2.slice(0, 10)) === offchainLookupSignature && to) @@ -98461,7 +98461,7 @@ function version4(parameters) { if (!walletProvider) { const CoinbaseWalletSDK = await (async () => { const { default: SDK } = await __vitePreload(async () => { - const { default: SDK2 } = await import("./index-D2U_GLHi.js").then((n2) => n2.i); + const { default: SDK2 } = await import("./index-w36ed5XJ.js").then((n2) => n2.i); return { default: SDK2 }; }, true ? __vite__mapDeps([0,1,2]) : void 0, import.meta.url); if (typeof SDK !== "function" && typeof SDK.default === "function") @@ -98643,7 +98643,7 @@ function version3(parameters) { if (!walletProvider) { const CoinbaseWalletSDK = await (async () => { const { default: SDK } = await __vitePreload(async () => { - const { default: SDK2 } = await import("./index-CGSWxPxs.js").then((n2) => n2.i); + const { default: SDK2 } = await import("./index-DU4nszWG.js").then((n2) => n2.i); return { default: SDK2 }; }, true ? __vite__mapDeps([3,2,1]) : void 0, import.meta.url); if (typeof SDK !== "function" && typeof SDK.default === "function") @@ -98879,7 +98879,7 @@ function walletConnect$1(parameters) { if (!optionalChains.length) return; const { EthereumProvider } = await __vitePreload(async () => { - const { EthereumProvider: EthereumProvider2 } = await import("./index.es-_Rk8O_FW.js"); + const { EthereumProvider: EthereumProvider2 } = await import("./index.es-DUtzAiMf.js"); return { EthereumProvider: EthereumProvider2 }; }, true ? __vite__mapDeps([4,2]) : void 0, import.meta.url); return await EthereumProvider.init({ @@ -99327,90 +99327,113 @@ const getDefaultConnectors = (walletType2, options) => { return getDefaultUniversalConnectors(options); } }; -const getDefaultWaasConnectors = ({ appName, projectAccessKey: projectAccessKey2, defaultChainId, walletConnectProjectId: walletConnectProjectId2, waasConfigKey, googleClientId, appleClientId, appleRedirectURI, enableConfirmationModal, legacyEmailAuth = false, isDev = false }) => { - const wallets = [ - emailWaas({ +const getDefaultWaasConnectors = (options) => { + var _a2; + const { projectAccessKey: projectAccessKey2, waasConfigKey, appName, enableConfirmationModal, defaultChainId, isDev } = options; + const wallets = []; + if (options.email !== false) { + wallets.push(emailWaas({ projectAccessKey: projectAccessKey2, waasConfigKey, enableConfirmationModal, network: defaultChainId, - legacyEmailAuth, + legacyEmailAuth: typeof options.email === "object" && options.email.legacyEmailAuth || options.legacyEmailAuth, isDev - }), - coinbaseWallet({ - appName - }) - ]; - if (walletConnectProjectId2) { - wallets.push(walletConnect({ - projectId: walletConnectProjectId2 })); } - if (googleClientId) { + if (options.google || options.googleClientId) { + const googleClientId = options.google && options.google.clientId || options.googleClientId; wallets.push(googleWaas({ projectAccessKey: projectAccessKey2, - googleClientId, waasConfigKey, + googleClientId, enableConfirmationModal, network: defaultChainId, isDev })); } - if (appleClientId && appleRedirectURI) { + if (options.apple || options.appleClientId && options.appleRedirectURI) { + const appleClientId = options.apple && options.apple.clientId || options.appleClientId; + const appleRedirectURI = options.apple && options.apple.redirectURI || options.appleRedirectURI; wallets.push(appleWaas({ projectAccessKey: projectAccessKey2, + waasConfigKey, appleClientId, appleRedirectURI, - waasConfigKey, enableConfirmationModal, network: defaultChainId, isDev })); } + if (options.coinbase !== false) { + wallets.push(coinbaseWallet({ + appName + })); + } + if (options.walletConnect || options.walletConnectProjectId) { + const projectId = options.walletConnect && ((_a2 = options.walletConnect) == null ? void 0 : _a2.projectId) || options.walletConnectProjectId; + wallets.push(walletConnect({ + projectId + })); + } return getKitConnectWallets(projectAccessKey2, wallets); }; -const getDefaultUniversalConnectors = ({ appName, projectAccessKey: projectAccessKey2, defaultChainId, walletConnectProjectId: walletConnectProjectId2 }) => { - const wallets = [ - email({ +const getDefaultUniversalConnectors = (options) => { + var _a2; + const { projectAccessKey: projectAccessKey2, appName, defaultChainId } = options; + const wallets = []; + if (options.email !== false) { + wallets.push(email({ defaultNetwork: defaultChainId, connect: { app: appName } - }), - google({ + })); + } + if (options.google !== false) { + wallets.push(google({ defaultNetwork: defaultChainId, connect: { app: appName } - }), - facebook({ + })); + } + if (options.facebook !== false) { + wallets.push(facebook({ defaultNetwork: defaultChainId, connect: { app: appName } - }), - twitch({ + })); + } + if (options.twitch !== false) { + wallets.push(twitch({ defaultNetwork: defaultChainId, connect: { app: appName } - }), - apple({ + })); + } + if (options.apple !== false) { + wallets.push(apple({ defaultNetwork: defaultChainId, connect: { app: appName } - }), - sequence({ + })); + } + if (options.sequence !== false) { + wallets.push(sequence({ defaultNetwork: defaultChainId, connect: { app: appName } - }) - ]; - if (walletConnectProjectId2) { + })); + } + if (options.walletConnect || options.walletConnectProjectId) { + const projectId = options.walletConnect && ((_a2 = options.walletConnect) == null ? void 0 : _a2.projectId) || options.walletConnectProjectId; wallets.push(walletConnect({ - projectId: walletConnectProjectId2 + projectId })); } return getKitConnectWallets(projectAccessKey2, wallets); @@ -110973,20 +110996,28 @@ const kitConfig = { const config = walletType === "waas" ? createConfig("waas", { ...kitConfig, appName: "Kit Demo", - walletConnectProjectId, chainIds: [ChainId.ARBITRUM_NOVA, ChainId.ARBITRUM_SEPOLIA, ChainId.POLYGON], defaultChainId: ChainId.ARBITRUM_NOVA, waasConfigKey: isDebugMode ? "eyJwcm9qZWN0SWQiOjY5NCwicnBjU2VydmVyIjoiaHR0cHM6Ly9kZXYtd2Fhcy5zZXF1ZW5jZS5hcHAiLCJlbWFpbFJlZ2lvbiI6ImNhLWNlbnRyYWwtMSIsImVtYWlsQ2xpZW50SWQiOiI1NGF0bjV1cGk2M3FjNTlhMWVtM3ZiaHJzbiJ9" : "eyJwcm9qZWN0SWQiOjE2ODE1LCJlbWFpbFJlZ2lvbiI6ImNhLWNlbnRyYWwtMSIsImVtYWlsQ2xpZW50SWQiOiI2N2V2NXVvc3ZxMzVmcGI2OXI3NnJoYnVoIiwicnBjU2VydmVyIjoiaHR0cHM6Ly93YWFzLnNlcXVlbmNlLmFwcCJ9", - googleClientId: isDebugMode ? "603294233249-6h5saeg2uiu8akpcbar3r2aqjp6j7oem.apps.googleusercontent.com" : "970987756660-35a6tc48hvi8cev9cnknp0iugv9poa23.apps.googleusercontent.com", - appleClientId: "com.horizon.sequence.waas", - appleRedirectURI: window.location.origin + window.location.pathname, - enableConfirmationModal: localStorage.getItem("confirmationEnabled") === "true" + enableConfirmationModal: localStorage.getItem("confirmationEnabled") === "true", + google: { + clientId: isDebugMode ? "603294233249-6h5saeg2uiu8akpcbar3r2aqjp6j7oem.apps.googleusercontent.com" : "970987756660-35a6tc48hvi8cev9cnknp0iugv9poa23.apps.googleusercontent.com" + }, + apple: { + clientId: "com.horizon.sequence.waas", + redirectURI: window.location.origin + window.location.pathname + }, + walletConnect: { + projectId: walletConnectProjectId + } }) : createConfig("universal", { ...kitConfig, appName: "Kit Demo", - walletConnectProjectId, chainIds: [ChainId.ARBITRUM_NOVA, ChainId.ARBITRUM_SEPOLIA, ChainId.POLYGON], - defaultChainId: ChainId.ARBITRUM_NOVA + defaultChainId: ChainId.ARBITRUM_NOVA, + walletConnect: { + projectId: walletConnectProjectId + } }); const App = () => { return /* @__PURE__ */ jsxRuntimeExports$1.jsx(ThemeProvider, { theme: "dark", children: /* @__PURE__ */ jsxRuntimeExports$1.jsx(SequenceKit, { config, children: /* @__PURE__ */ jsxRuntimeExports$1.jsx(KitWalletProvider, { children: /* @__PURE__ */ jsxRuntimeExports$1.jsx(KitCheckoutProvider, { children: /* @__PURE__ */ jsxRuntimeExports$1.jsx(Homepage, {}) }) }) }) }); diff --git a/assets/index-Ct_CIen2.js b/assets/index-CQhjFZlr.js similarity index 99% rename from assets/index-Ct_CIen2.js rename to assets/index-CQhjFZlr.js index 63ed201d..7643ea0a 100644 --- a/assets/index-Ct_CIen2.js +++ b/assets/index-CQhjFZlr.js @@ -1,5 +1,5 @@ -import { n as ne$1, s as se$1, T as T$2, t as te$1, a as a$2, o as oe$1, R as R$1, p as p$1, y as y$1 } from "./index-Mv20QOIl.js"; -import "./index-CWBAsnr3.js"; +import { n as ne$1, s as se$1, T as T$2, t as te$1, a as a$2, o as oe$1, R as R$1, p as p$1, y as y$1 } from "./index-DjDbmvaZ.js"; +import "./index-BhMw1gK2.js"; function addUniqueItem(array, item) { array.indexOf(item) === -1 && array.push(item); } diff --git a/assets/index-CGSWxPxs.js b/assets/index-DU4nszWG.js similarity index 99% rename from assets/index-CGSWxPxs.js rename to assets/index-DU4nszWG.js index 4ea93555..a93346c9 100644 --- a/assets/index-CGSWxPxs.js +++ b/assets/index-DU4nszWG.js @@ -1,6 +1,6 @@ -import { c as commonjsGlobal, B as Buffer, a as getAugmentedNamespace, p as process$1, t as tslib_es6, e as eventemitter3Exports, g as getDefaultExportFromCjs } from "./index-CWBAsnr3.js"; -import { r as require$$0$1, e as eventsExports } from "./inherits_browser-DgGu3QDl.js"; -import { s as sha_jsExports, a as require$$1$1, b as require$$2, r as require$$0$2, j as js } from "./hooks.module-DwKr4YEl.js"; +import { c as commonjsGlobal, B as Buffer, a as getAugmentedNamespace, p as process$1, t as tslib_es6, e as eventemitter3Exports, g as getDefaultExportFromCjs } from "./index-BhMw1gK2.js"; +import { r as require$$0$1, e as eventsExports } from "./inherits_browser-DTGd2Otu.js"; +import { s as sha_jsExports, a as require$$1$1, b as require$$2, r as require$$0$2, j as js } from "./hooks.module-BrgRyP7Z.js"; var dist$5 = {}; var CoinbaseWalletSDK$1 = {}; var walletLogo$1 = {}; diff --git a/assets/index-Mv20QOIl.js b/assets/index-DjDbmvaZ.js similarity index 99% rename from assets/index-Mv20QOIl.js rename to assets/index-DjDbmvaZ.js index 6508bf6b..43f02db1 100644 --- a/assets/index-Mv20QOIl.js +++ b/assets/index-DjDbmvaZ.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-Ct_CIen2.js","./index-CWBAsnr3.js","./index-g_cLYwVj.css"])))=>i.map(i=>d[i]); -import { _ as __vitePreload } from "./index-CWBAsnr3.js"; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-CQhjFZlr.js","./index-BhMw1gK2.js","./index-g_cLYwVj.css"])))=>i.map(i=>d[i]); +import { _ as __vitePreload } from "./index-BhMw1gK2.js"; const t = Symbol(); const s = Object.getPrototypeOf, c$1 = /* @__PURE__ */ new WeakMap(), l = (e) => e && (c$1.has(e) ? c$1.get(e) : s(e) === Object.prototype || s(e) === Array.prototype), y$1 = (e) => l(e) && e[t] || null, h = (e, t2 = true) => { c$1.set(e, t2); @@ -472,7 +472,7 @@ class d { } async initUi() { if (typeof window < "u") { - await __vitePreload(() => import("./index-Ct_CIen2.js"), true ? __vite__mapDeps([0,1,2]) : void 0, import.meta.url); + await __vitePreload(() => import("./index-CQhjFZlr.js"), true ? __vite__mapDeps([0,1,2]) : void 0, import.meta.url); const e = document.createElement("wcm-modal"); document.body.insertAdjacentElement("beforeend", e), p.setIsUiLoaded(true); } diff --git a/assets/index-D2U_GLHi.js b/assets/index-w36ed5XJ.js similarity index 99% rename from assets/index-D2U_GLHi.js rename to assets/index-w36ed5XJ.js index e313d5af..20eb0499 100644 --- a/assets/index-D2U_GLHi.js +++ b/assets/index-w36ed5XJ.js @@ -1,5 +1,5 @@ -import { B as Buffer, c as commonjsGlobal, e as eventemitter3Exports, g as getDefaultExportFromCjs } from "./index-CWBAsnr3.js"; -import { j as js, s as sha_jsExports, r as require$$0, a as require$$1, b as require$$2 } from "./hooks.module-DwKr4YEl.js"; +import { B as Buffer, c as commonjsGlobal, e as eventemitter3Exports, g as getDefaultExportFromCjs } from "./index-BhMw1gK2.js"; +import { j as js, s as sha_jsExports, r as require$$0, a as require$$1, b as require$$2 } from "./hooks.module-BrgRyP7Z.js"; var dist = {}; var CoinbaseWalletSDK$1 = {}; var walletLogo$1 = {}; diff --git a/assets/index.es-_Rk8O_FW.js b/assets/index.es-DUtzAiMf.js similarity index 99% rename from assets/index.es-_Rk8O_FW.js rename to assets/index.es-DUtzAiMf.js index c005fd18..c20720b8 100644 --- a/assets/index.es-_Rk8O_FW.js +++ b/assets/index.es-DUtzAiMf.js @@ -1,6 +1,6 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-Mv20QOIl.js","./index-CWBAsnr3.js","./index-g_cLYwVj.css"])))=>i.map(i=>d[i]); -import { p as process$1, a as getAugmentedNamespace, c as commonjsGlobal, b as global, B as Buffer, g as getDefaultExportFromCjs, _ as __vitePreload } from "./index-CWBAsnr3.js"; -import { a as require$$0$2, r as require$$0$3, i as inherits_browserExports, e as eventsExports, G as Gg } from "./inherits_browser-DgGu3QDl.js"; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-DjDbmvaZ.js","./index-BhMw1gK2.js","./index-g_cLYwVj.css"])))=>i.map(i=>d[i]); +import { p as process$1, a as getAugmentedNamespace, c as commonjsGlobal, b as global, B as Buffer, g as getDefaultExportFromCjs, _ as __vitePreload } from "./index-BhMw1gK2.js"; +import { a as require$$0$2, r as require$$0$3, i as inherits_browserExports, e as eventsExports, G as Gg } from "./inherits_browser-DTGd2Otu.js"; var __spreadArray = function(to2, from2, pack) { if (pack || arguments.length === 2) for (var i3 = 0, l2 = from2.length, ar2; i3 < l2; i3++) { if (ar2 || !(i3 in from2)) { @@ -27392,7 +27392,7 @@ class C2 { if (this.rpc = this.getRpcConfig(t), this.chainId = this.rpc.chains.length ? m2(this.rpc.chains) : m2(this.rpc.optionalChains), this.signer = await Iv.init({ projectId: this.rpc.projectId, metadata: this.rpc.metadata, disableProviderPing: t.disableProviderPing, relayUrl: t.relayUrl, storageOptions: t.storageOptions, customStoragePrefix: t.customStoragePrefix, telemetryEnabled: t.telemetryEnabled }), this.registerEventListeners(), await this.loadPersistedSession(), this.rpc.showQrModal) { let s2; try { - const { WalletConnectModal: i3 } = await __vitePreload(() => import("./index-Mv20QOIl.js").then((n4) => n4.i), true ? __vite__mapDeps([0,1,2]) : void 0, import.meta.url); + const { WalletConnectModal: i3 } = await __vitePreload(() => import("./index-DjDbmvaZ.js").then((n4) => n4.i), true ? __vite__mapDeps([0,1,2]) : void 0, import.meta.url); s2 = i3; } catch { throw new Error("To use QR modal, please install @walletconnect/modal package"); diff --git a/assets/inherits_browser-DgGu3QDl.js b/assets/inherits_browser-DTGd2Otu.js similarity index 99% rename from assets/inherits_browser-DgGu3QDl.js rename to assets/inherits_browser-DTGd2Otu.js index 093eace5..fe6c1d5f 100644 --- a/assets/inherits_browser-DgGu3QDl.js +++ b/assets/inherits_browser-DTGd2Otu.js @@ -1,4 +1,4 @@ -import { g as getDefaultExportFromCjs, a as getAugmentedNamespace, d as dist } from "./index-CWBAsnr3.js"; +import { g as getDefaultExportFromCjs, a as getAugmentedNamespace, d as dist } from "./index-BhMw1gK2.js"; var events = { exports: {} }; var R = typeof Reflect === "object" ? Reflect : null; var ReflectApply = R && typeof R.apply === "function" ? R.apply : function ReflectApply2(target, receiver, args) { diff --git a/index.html b/index.html index fbefb797..81a19034 100644 --- a/index.html +++ b/index.html @@ -24,7 +24,7 @@ Learn how to configure a non-root public URL by running `npm run build`. --> Sequence Kit Demo - +