@web3auth/modal 9.6.0 → 10.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. package/dist/lib.cjs/node_modules/style-inject/dist/style-inject.es.js +28 -0
  2. package/dist/lib.cjs/{config.js → packages/modal/src/config.js} +14 -14
  3. package/dist/lib.cjs/{index.js → packages/modal/src/index.js} +7 -0
  4. package/dist/lib.cjs/{modalManager.js → packages/modal/src/modalManager.js} +92 -92
  5. package/dist/lib.cjs/packages/modal/src/react/Web3AuthProvider.js +15 -0
  6. package/dist/lib.cjs/packages/modal/src/react/context/Web3AuthInnerContext.js +225 -0
  7. package/dist/lib.cjs/packages/modal/src/react/hooks/useWeb3Auth.js +15 -0
  8. package/dist/lib.cjs/packages/modal/src/react/index.js +12 -0
  9. package/dist/lib.cjs/packages/modal/src/ui/assets/arrow-left-dark.svg.js +7 -0
  10. package/dist/lib.cjs/packages/modal/src/ui/assets/arrow-left-light.svg.js +7 -0
  11. package/dist/lib.cjs/packages/modal/src/ui/assets/x-dark.svg.js +7 -0
  12. package/dist/lib.cjs/packages/modal/src/ui/assets/x-light.svg.js +7 -0
  13. package/dist/lib.cjs/packages/modal/src/ui/components/AdapterLoader.js +108 -0
  14. package/dist/lib.cjs/packages/modal/src/ui/components/Button/Button.js +34 -0
  15. package/dist/lib.cjs/packages/modal/src/ui/components/Button/styles.css.js +8 -0
  16. package/dist/lib.cjs/packages/modal/src/ui/components/ExternalWallet/ExternalWalletButton.js +44 -0
  17. package/dist/lib.cjs/packages/modal/src/ui/components/ExternalWallet/ExternalWalletConnect.js +67 -0
  18. package/dist/lib.cjs/packages/modal/src/ui/components/ExternalWallet/ExternalWalletDetails.js +34 -0
  19. package/dist/lib.cjs/packages/modal/src/ui/components/ExternalWallet/ExternalWalletHeader.js +46 -0
  20. package/dist/lib.cjs/packages/modal/src/ui/components/ExternalWallet/ExternalWalletInstall.js +167 -0
  21. package/dist/lib.cjs/packages/modal/src/ui/components/ExternalWallets.js +273 -0
  22. package/dist/lib.cjs/packages/modal/src/ui/components/Footer.js +20 -0
  23. package/dist/lib.cjs/packages/modal/src/ui/components/Header.js +81 -0
  24. package/dist/lib.cjs/packages/modal/src/ui/components/Icon.js +73 -0
  25. package/dist/lib.cjs/packages/modal/src/ui/components/Image.js +51 -0
  26. package/dist/lib.cjs/packages/modal/src/ui/components/Loader.js +59 -0
  27. package/dist/lib.cjs/packages/modal/src/ui/components/Modal.js +244 -0
  28. package/dist/lib.cjs/packages/modal/src/ui/components/SelfCustodyViaWeb3Auth.js +30 -0
  29. package/dist/lib.cjs/packages/modal/src/ui/components/SocialLoginPasswordless.js +141 -0
  30. package/dist/lib.cjs/packages/modal/src/ui/components/SocialLogins.js +148 -0
  31. package/dist/lib.cjs/packages/modal/src/ui/components/WalletConnect.js +84 -0
  32. package/dist/lib.cjs/packages/modal/src/ui/config.js +17 -0
  33. package/dist/lib.cjs/packages/modal/src/ui/context/ThemeContext.js +9 -0
  34. package/dist/lib.cjs/packages/modal/src/ui/css/web3auth.css.js +8 -0
  35. package/dist/lib.cjs/packages/modal/src/ui/i18n/dutch.json.js +84 -0
  36. package/dist/lib.cjs/packages/modal/src/ui/i18n/english.json.js +84 -0
  37. package/dist/lib.cjs/packages/modal/src/ui/i18n/french.json.js +82 -0
  38. package/dist/lib.cjs/packages/modal/src/ui/i18n/german.json.js +84 -0
  39. package/dist/lib.cjs/packages/modal/src/ui/i18n/japanese.json.js +84 -0
  40. package/dist/lib.cjs/packages/modal/src/ui/i18n/korean.json.js +84 -0
  41. package/dist/lib.cjs/packages/modal/src/ui/i18n/mandarin.json.js +84 -0
  42. package/dist/lib.cjs/packages/modal/src/ui/i18n/portuguese.json.js +84 -0
  43. package/dist/lib.cjs/packages/modal/src/ui/i18n/spanish.json.js +84 -0
  44. package/dist/lib.cjs/packages/modal/src/ui/i18n/turkish.json.js +84 -0
  45. package/dist/lib.cjs/packages/modal/src/ui/interfaces.js +26 -0
  46. package/dist/lib.cjs/packages/modal/src/ui/localeImport.js +25 -0
  47. package/dist/lib.cjs/packages/modal/src/ui/loginModal.js +309 -0
  48. package/dist/lib.cjs/packages/modal/src/ui/utils.js +71 -0
  49. package/dist/lib.cjs/packages/modal/src/vue/Web3AuthProvider.js +234 -0
  50. package/dist/lib.cjs/packages/modal/src/vue/composables/useWeb3Auth.js +12 -0
  51. package/dist/lib.cjs/packages/modal/src/vue/index.js +9 -0
  52. package/dist/lib.esm/node_modules/style-inject/dist/style-inject.es.js +26 -0
  53. package/dist/lib.esm/{config.js → packages/modal/src/config.js} +1 -1
  54. package/dist/lib.esm/{index.js → packages/modal/src/index.js} +1 -0
  55. package/dist/lib.esm/{modalManager.js → packages/modal/src/modalManager.js} +5 -5
  56. package/dist/lib.esm/packages/modal/src/react/Web3AuthProvider.js +13 -0
  57. package/dist/lib.esm/packages/modal/src/react/context/Web3AuthInnerContext.js +222 -0
  58. package/dist/lib.esm/packages/modal/src/react/hooks/useWeb3Auth.js +13 -0
  59. package/dist/lib.esm/packages/modal/src/react/index.js +3 -0
  60. package/dist/lib.esm/packages/modal/src/ui/assets/arrow-left-dark.svg.js +5 -0
  61. package/dist/lib.esm/packages/modal/src/ui/assets/arrow-left-light.svg.js +5 -0
  62. package/dist/lib.esm/packages/modal/src/ui/assets/x-dark.svg.js +5 -0
  63. package/dist/lib.esm/packages/modal/src/ui/assets/x-light.svg.js +5 -0
  64. package/dist/lib.esm/packages/modal/src/ui/components/AdapterLoader.js +106 -0
  65. package/dist/lib.esm/packages/modal/src/ui/components/Button/Button.js +32 -0
  66. package/dist/lib.esm/packages/modal/src/ui/components/Button/styles.css.js +6 -0
  67. package/dist/lib.esm/packages/modal/src/ui/components/ExternalWallet/ExternalWalletButton.js +42 -0
  68. package/dist/lib.esm/packages/modal/src/ui/components/ExternalWallet/ExternalWalletConnect.js +65 -0
  69. package/dist/lib.esm/packages/modal/src/ui/components/ExternalWallet/ExternalWalletDetails.js +32 -0
  70. package/dist/lib.esm/packages/modal/src/ui/components/ExternalWallet/ExternalWalletHeader.js +44 -0
  71. package/dist/lib.esm/packages/modal/src/ui/components/ExternalWallet/ExternalWalletInstall.js +165 -0
  72. package/dist/lib.esm/packages/modal/src/ui/components/ExternalWallets.js +271 -0
  73. package/dist/lib.esm/packages/modal/src/ui/components/Footer.js +18 -0
  74. package/dist/lib.esm/packages/modal/src/ui/components/Header.js +79 -0
  75. package/dist/lib.esm/packages/modal/src/ui/components/Icon.js +71 -0
  76. package/dist/lib.esm/packages/modal/src/ui/components/Image.js +49 -0
  77. package/dist/lib.esm/packages/modal/src/ui/components/Loader.js +57 -0
  78. package/dist/lib.esm/packages/modal/src/ui/components/Modal.js +242 -0
  79. package/dist/lib.esm/packages/modal/src/ui/components/SelfCustodyViaWeb3Auth.js +28 -0
  80. package/dist/lib.esm/packages/modal/src/ui/components/SocialLoginPasswordless.js +139 -0
  81. package/dist/lib.esm/packages/modal/src/ui/components/SocialLogins.js +146 -0
  82. package/dist/lib.esm/packages/modal/src/ui/components/WalletConnect.js +82 -0
  83. package/dist/lib.esm/packages/modal/src/ui/config.js +13 -0
  84. package/dist/lib.esm/packages/modal/src/ui/context/ThemeContext.js +7 -0
  85. package/dist/lib.esm/packages/modal/src/ui/css/web3auth.css.js +6 -0
  86. package/dist/lib.esm/packages/modal/src/ui/i18n/dutch.json.js +79 -0
  87. package/dist/lib.esm/packages/modal/src/ui/i18n/english.json.js +79 -0
  88. package/dist/lib.esm/packages/modal/src/ui/i18n/french.json.js +77 -0
  89. package/dist/lib.esm/packages/modal/src/ui/i18n/german.json.js +79 -0
  90. package/dist/lib.esm/packages/modal/src/ui/i18n/japanese.json.js +79 -0
  91. package/dist/lib.esm/packages/modal/src/ui/i18n/korean.json.js +79 -0
  92. package/dist/lib.esm/packages/modal/src/ui/i18n/mandarin.json.js +79 -0
  93. package/dist/lib.esm/packages/modal/src/ui/i18n/portuguese.json.js +79 -0
  94. package/dist/lib.esm/packages/modal/src/ui/i18n/spanish.json.js +79 -0
  95. package/dist/lib.esm/packages/modal/src/ui/i18n/turkish.json.js +79 -0
  96. package/dist/lib.esm/packages/modal/src/ui/interfaces.js +20 -0
  97. package/dist/lib.esm/packages/modal/src/ui/localeImport.js +23 -0
  98. package/dist/lib.esm/packages/modal/src/ui/loginModal.js +307 -0
  99. package/dist/lib.esm/packages/modal/src/ui/utils.js +65 -0
  100. package/dist/lib.esm/packages/modal/src/vue/Web3AuthProvider.js +232 -0
  101. package/dist/lib.esm/packages/modal/src/vue/composables/useWeb3Auth.js +10 -0
  102. package/dist/lib.esm/packages/modal/src/vue/index.js +2 -0
  103. package/dist/modal.cjs.js +5703 -420
  104. package/dist/modal.umd.min.js +1 -1
  105. package/dist/modal.umd.min.js.LICENSE.txt +54 -0
  106. package/dist/types/index.d.ts +1 -0
  107. package/dist/types/interface.d.ts +1 -1
  108. package/dist/types/modalManager.d.ts +2 -3
  109. package/dist/types/react/Web3AuthProvider.d.ts +3 -0
  110. package/dist/types/react/context/Web3AuthInnerContext.d.ts +4 -0
  111. package/dist/types/react/context/index.d.ts +1 -0
  112. package/dist/types/react/hooks/index.d.ts +1 -0
  113. package/dist/types/react/hooks/useWeb3Auth.d.ts +2 -0
  114. package/dist/types/react/index.d.ts +4 -0
  115. package/dist/types/react/interfaces.d.ts +18 -0
  116. package/dist/types/ui/components/AdapterLoader.d.ts +11 -0
  117. package/dist/types/ui/components/Button/Button.d.ts +16 -0
  118. package/dist/types/ui/components/Button/index.d.ts +1 -0
  119. package/dist/types/ui/components/ExternalWallet/ExternalWalletButton.d.ts +7 -0
  120. package/dist/types/ui/components/ExternalWallet/ExternalWalletConnect.d.ts +9 -0
  121. package/dist/types/ui/components/ExternalWallet/ExternalWalletDetails.d.ts +9 -0
  122. package/dist/types/ui/components/ExternalWallet/ExternalWalletHeader.d.ts +8 -0
  123. package/dist/types/ui/components/ExternalWallet/ExternalWalletInstall.d.ts +8 -0
  124. package/dist/types/ui/components/ExternalWallets.d.ts +17 -0
  125. package/dist/types/ui/components/Footer.d.ts +1 -0
  126. package/dist/types/ui/components/Header.d.ts +8 -0
  127. package/dist/types/ui/components/Icon.d.ts +9 -0
  128. package/dist/types/ui/components/Image.d.ts +12 -0
  129. package/dist/types/ui/components/Loader.d.ts +10 -0
  130. package/dist/types/ui/components/Modal.d.ts +16 -0
  131. package/dist/types/ui/components/SelfCustodyViaWeb3Auth.d.ts +1 -0
  132. package/dist/types/ui/components/SocialLoginPasswordless.d.ts +16 -0
  133. package/dist/types/ui/components/SocialLogins.d.ts +14 -0
  134. package/dist/types/ui/components/WalletConnect.d.ts +8 -0
  135. package/dist/types/ui/config.d.ts +4 -0
  136. package/dist/types/ui/context/ThemeContext.d.ts +3 -0
  137. package/dist/types/ui/helper/countryData.d.ts +7 -0
  138. package/dist/types/ui/i18n/index.d.ts +11 -0
  139. package/dist/types/ui/index.d.ts +4 -0
  140. package/dist/types/ui/interfaces.d.ts +106 -0
  141. package/dist/types/ui/localeImport.d.ts +3 -0
  142. package/dist/types/ui/loginModal.d.ts +27 -0
  143. package/dist/types/ui/utils.d.ts +12 -0
  144. package/dist/types/vue/Web3AuthProvider.d.ts +13 -0
  145. package/dist/types/vue/composables/index.d.ts +1 -0
  146. package/dist/types/vue/composables/useWeb3Auth.d.ts +2 -0
  147. package/dist/types/vue/index.d.ts +3 -0
  148. package/dist/types/vue/interfaces.d.ts +45 -0
  149. package/package.json +100 -43
  150. package/dist/modal.esm.js +0 -513
@@ -4,6 +4,21 @@
4
4
  http://jedwatson.github.io/classnames
5
5
  */
6
6
 
7
+ /*!
8
+ * decimal.js v10.5.0
9
+ * An arbitrary-precision Decimal type for JavaScript.
10
+ * https://github.com/MikeMcl/decimal.js
11
+ * Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
12
+ * MIT Licence
13
+ */
14
+
15
+ /*!
16
+ * The buffer module from node.js, for the browser.
17
+ *
18
+ * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
19
+ * @license MIT
20
+ */
21
+
7
22
  /*!
8
23
  * The buffer module from node.js, for the browser.
9
24
  *
@@ -11,10 +26,40 @@
11
26
  * @license MIT
12
27
  */
13
28
 
29
+ /*! *****************************************************************************
30
+ Copyright (c) Microsoft Corporation.
31
+
32
+ Permission to use, copy, modify, and/or distribute this software for any
33
+ purpose with or without fee is hereby granted.
34
+
35
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
36
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
37
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
38
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
39
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
40
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
41
+ PERFORMANCE OF THIS SOFTWARE.
42
+ ***************************************************************************** */
43
+
14
44
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
15
45
 
46
+ /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
47
+
48
+ /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
49
+
16
50
  /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
17
51
 
52
+ /*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */
53
+
54
+ /**
55
+ * @license
56
+ * Lodash <https://lodash.com/>
57
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
58
+ * Released under MIT license <https://lodash.com/license>
59
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
60
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
61
+ */
62
+
18
63
  /**
19
64
  * @license React
20
65
  * react-dom.production.min.js
@@ -54,3 +99,12 @@
54
99
  * This source code is licensed under the MIT license found in the
55
100
  * LICENSE file in the root directory of this source tree.
56
101
  */
102
+
103
+ /**
104
+ * [js-sha3]{@link https://github.com/emn178/js-sha3}
105
+ *
106
+ * @version 0.8.0
107
+ * @author Chen, Yi-Cyuan [emn178@gmail.com]
108
+ * @copyright Chen, Yi-Cyuan 2015-2018
109
+ * @license MIT
110
+ */
@@ -1,3 +1,4 @@
1
1
  export * from "./config";
2
2
  export * from "./interface";
3
3
  export * from "./modalManager";
4
+ export * from "@web3auth/no-modal";
@@ -1,4 +1,4 @@
1
- import type { BaseAdapterConfig, ChainNamespaceType, IProvider, IWeb3Auth, LoginMethodConfig, WALLET_ADAPTER_TYPE } from "@web3auth/base";
1
+ import type { BaseAdapterConfig, ChainNamespaceType, IProvider, IWeb3Auth, LoginMethodConfig, WALLET_ADAPTER_TYPE } from "@web3auth/no-modal";
2
2
  export interface ModalConfig extends Omit<BaseAdapterConfig, "isInjected"> {
3
3
  loginMethods?: LoginMethodConfig;
4
4
  }
@@ -1,7 +1,6 @@
1
- import { IBaseProvider, IProvider, IWeb3AuthCoreOptions } from "@web3auth/base";
2
- import { Web3AuthNoModal } from "@web3auth/no-modal";
3
- import { LoginModal, UIConfig } from "@web3auth/ui";
1
+ import { IBaseProvider, IProvider, IWeb3AuthCoreOptions, Web3AuthNoModal } from "@web3auth/no-modal";
4
2
  import { AdaptersModalConfig, IWeb3AuthModal, ModalConfigParams } from "./interface";
3
+ import { LoginModal, UIConfig } from "./ui";
5
4
  export interface Web3AuthOptions extends IWeb3AuthCoreOptions {
6
5
  /**
7
6
  * Config for configuring modal ui display properties
@@ -0,0 +1,3 @@
1
+ import { PropsWithChildren } from "react";
2
+ import { Web3AuthProviderProps } from "./interfaces";
3
+ export declare function Web3AuthProvider({ config, children }: PropsWithChildren<Web3AuthProviderProps>): import("react").FunctionComponentElement<PropsWithChildren<Web3AuthProviderProps>>;
@@ -0,0 +1,4 @@
1
+ import { PropsWithChildren } from "react";
2
+ import { IWeb3AuthInnerContext, Web3AuthProviderProps } from "../interfaces";
3
+ export declare const Web3AuthInnerContext: import("react").Context<IWeb3AuthInnerContext>;
4
+ export declare function Web3AuthInnerProvider(params: PropsWithChildren<Web3AuthProviderProps>): import("react").FunctionComponentElement<import("react").ProviderProps<IWeb3AuthInnerContext>>;
@@ -0,0 +1 @@
1
+ export * from "./Web3AuthInnerContext";
@@ -0,0 +1 @@
1
+ export { useWeb3Auth } from "./useWeb3Auth";
@@ -0,0 +1,2 @@
1
+ import { IWeb3AuthInnerContext } from "../interfaces";
2
+ export declare const useWeb3Auth: () => IWeb3AuthInnerContext;
@@ -0,0 +1,4 @@
1
+ export * from "./context";
2
+ export * from "./hooks";
3
+ export * from "./interfaces";
4
+ export * from "./Web3AuthProvider";
@@ -0,0 +1,18 @@
1
+ import type { IAdapter, IBaseWeb3AuthHookContext, IPlugin, IProvider, WALLET_ADAPTER_TYPE } from "@web3auth/no-modal";
2
+ import { type ModalConfig } from "../interface";
3
+ import type { Web3Auth, Web3AuthOptions } from "../modalManager";
4
+ export type Web3AuthContextConfig = {
5
+ web3AuthOptions: Web3AuthOptions;
6
+ modalConfig?: Record<WALLET_ADAPTER_TYPE, ModalConfig>;
7
+ hideWalletDiscovery?: boolean;
8
+ adapters?: IAdapter<unknown>[];
9
+ plugins?: IPlugin[];
10
+ };
11
+ export interface Web3AuthProviderProps {
12
+ config: Web3AuthContextConfig;
13
+ }
14
+ export interface IWeb3AuthInnerContext extends IBaseWeb3AuthHookContext {
15
+ web3Auth: Web3Auth | null;
16
+ connect(): Promise<IProvider>;
17
+ }
18
+ export type IWeb3AuthContext = IWeb3AuthInnerContext;
@@ -0,0 +1,11 @@
1
+ import { ModalStatusType } from "../interfaces";
2
+ interface DetailedLoaderProps {
3
+ message?: string;
4
+ appLogo?: string;
5
+ adapter: string;
6
+ adapterName: string;
7
+ modalStatus: ModalStatusType;
8
+ onClose: () => void;
9
+ }
10
+ export default function DetailedLoader(props: DetailedLoaderProps): import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,16 @@
1
+ import "./styles.css";
2
+ import { CSSProperties, ReactNode } from "react";
3
+ type ButtonProps = {
4
+ variant: "primary" | "secondary" | "tertiary";
5
+ onClick?: () => void;
6
+ title?: string;
7
+ children?: ReactNode;
8
+ className?: string;
9
+ style?: CSSProperties;
10
+ size?: string;
11
+ disabled?: boolean;
12
+ type?: "button" | "submit";
13
+ };
14
+ declare function Button(props: ButtonProps): import("react/jsx-runtime").JSX.Element;
15
+ declare const _default: import("react").MemoExoticComponent<typeof Button>;
16
+ export default _default;
@@ -0,0 +1 @@
1
+ export { default } from "./Button";
@@ -0,0 +1,7 @@
1
+ import { ExternalButton } from "../../interfaces";
2
+ interface ExternalWalletButtonProps {
3
+ button: ExternalButton;
4
+ handleWalletClick: (button: ExternalButton) => void;
5
+ }
6
+ export default function ExternalWalletButton(props: ExternalWalletButtonProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,9 @@
1
+ import { ExternalButton } from "../../interfaces";
2
+ interface ExternalWalletConnectProps {
3
+ connectButton: ExternalButton;
4
+ walletConnectUri: string;
5
+ goBack: () => void;
6
+ closeModal: () => void;
7
+ }
8
+ export default function ExternalWalletConnect(props: ExternalWalletConnectProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,9 @@
1
+ import { ExternalButton } from "../../interfaces";
2
+ interface ExternalWalletDetailProps {
3
+ connectButton: ExternalButton;
4
+ walletConnectUri: string;
5
+ goBack: () => void;
6
+ closeModal: () => void;
7
+ }
8
+ export default function ExternalWalletDetail(props: ExternalWalletDetailProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,8 @@
1
+ interface ExternalWalletHeaderProps {
2
+ title: string;
3
+ goBack: () => void;
4
+ disableBackButton?: boolean;
5
+ closeModal: () => void;
6
+ }
7
+ export default function ExternalWalletHeader(props: ExternalWalletHeaderProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,8 @@
1
+ import { ExternalButton } from "../../interfaces";
2
+ interface ExternalWalletInstallProps {
3
+ connectButton: ExternalButton;
4
+ goBack: () => void;
5
+ closeModal: () => void;
6
+ }
7
+ export default function ExternalWalletInstall(props: ExternalWalletInstallProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,17 @@
1
+ import { BaseAdapterConfig, ChainNamespaceType, WalletRegistry } from "@web3auth/no-modal";
2
+ import { ModalStatusType } from "../interfaces";
3
+ interface ExternalWalletsProps {
4
+ hideExternalWallets: () => void;
5
+ handleExternalWalletClick: (params: {
6
+ adapter: string;
7
+ }) => void;
8
+ closeModal: () => void;
9
+ config: Record<string, BaseAdapterConfig>;
10
+ walletConnectUri: string | undefined;
11
+ showBackButton: boolean;
12
+ modalStatus: ModalStatusType;
13
+ chainNamespace: ChainNamespaceType;
14
+ walletRegistry?: WalletRegistry;
15
+ }
16
+ export default function ExternalWallet(props: ExternalWalletsProps): import("react/jsx-runtime").JSX.Element;
17
+ export {};
@@ -0,0 +1 @@
1
+ export default function Footer(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ interface HeaderProps {
2
+ appName: string;
3
+ appLogo?: string;
4
+ onClose: () => void;
5
+ }
6
+ declare function Header(props: HeaderProps): import("react/jsx-runtime").JSX.Element;
7
+ declare const memoizedHeader: import("react").MemoExoticComponent<typeof Header>;
8
+ export default memoizedHeader;
@@ -0,0 +1,9 @@
1
+ interface IconProps {
2
+ iconName: string;
3
+ iconTitle?: string;
4
+ width?: string;
5
+ height?: string;
6
+ darkIconName?: string;
7
+ }
8
+ export default function Icon(props: IconProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,12 @@
1
+ export interface ImageProps {
2
+ hoverImageId?: string;
3
+ imageId: string;
4
+ isButton?: boolean;
5
+ height?: string;
6
+ width?: string;
7
+ fallbackImageId?: string;
8
+ extension?: string;
9
+ darkImageId?: string;
10
+ darkHoverImageId?: string;
11
+ }
12
+ export default function Image(props: ImageProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { ModalStatusType } from "../interfaces";
2
+ interface LoaderProps {
3
+ message?: string;
4
+ modalStatus: ModalStatusType;
5
+ label?: string;
6
+ onClose?: () => void;
7
+ canEmit?: boolean;
8
+ }
9
+ export default function Loader(props: LoaderProps): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,16 @@
1
+ import { type SafeEventEmitter } from "@web3auth/auth";
2
+ import { ChainNamespaceType, WalletRegistry } from "@web3auth/no-modal";
3
+ import { ExternalWalletEventType, SocialLoginEventType, StateEmitterEvents } from "../interfaces";
4
+ interface ModalProps {
5
+ stateListener: SafeEventEmitter<StateEmitterEvents>;
6
+ appLogo?: string;
7
+ appName?: string;
8
+ chainNamespace: ChainNamespaceType;
9
+ walletRegistry?: WalletRegistry;
10
+ handleSocialLoginClick: (params: SocialLoginEventType) => void;
11
+ handleExternalWalletClick: (params: ExternalWalletEventType) => void;
12
+ handleShowExternalWallets: (externalWalletsInitialized: boolean) => void;
13
+ closeModal: () => void;
14
+ }
15
+ export default function Modal(props: ModalProps): import("react/jsx-runtime").JSX.Element;
16
+ export {};
@@ -0,0 +1 @@
1
+ export default function SelfCustodyViaWeb3Auth(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,16 @@
1
+ interface SocialLoginPasswordlessProps {
2
+ isPrimaryBtn: boolean;
3
+ isEmailVisible: boolean;
4
+ isSmsVisible: boolean;
5
+ adapter: string;
6
+ handleSocialLoginClick: (params: {
7
+ adapter: string;
8
+ loginParams: {
9
+ loginProvider: string;
10
+ login_hint?: string;
11
+ name: string;
12
+ };
13
+ }) => void;
14
+ }
15
+ export default function SocialLoginPasswordless(props: SocialLoginPasswordlessProps): import("react/jsx-runtime").JSX.Element;
16
+ export {};
@@ -0,0 +1,14 @@
1
+ import { SocialLoginsConfig } from "../interfaces";
2
+ interface SocialLoginProps {
3
+ socialLoginsConfig: SocialLoginsConfig;
4
+ handleSocialLoginClick: (params: {
5
+ adapter: string;
6
+ loginParams: {
7
+ loginProvider: string;
8
+ login_hint?: string;
9
+ name: string;
10
+ };
11
+ }) => void;
12
+ }
13
+ export default function SocialLogins(props: SocialLoginProps): import("react/jsx-runtime").JSX.Element;
14
+ export {};
@@ -0,0 +1,8 @@
1
+ interface WalletConnectProps {
2
+ walletConnectUri: string;
3
+ logoImage?: string;
4
+ primaryColor?: string;
5
+ }
6
+ declare function WalletConnect(props: WalletConnectProps): import("react/jsx-runtime").JSX.Element;
7
+ declare const _default: import("react").MemoExoticComponent<typeof WalletConnect>;
8
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import { LOGIN_PROVIDER_TYPE } from "@web3auth/auth";
2
+ export declare function capitalizeFirstLetter(string: string): string;
3
+ export declare const AUTH_PROVIDERS: ("google" | "facebook" | "reddit" | "discord" | "twitch" | "apple" | "line" | "github" | "kakao" | "linkedin" | "twitter" | "weibo" | "wechat" | "farcaster" | "email_passwordless" | "sms_passwordless" | "webauthn" | "jwt" | "passkeys" | "authenticator")[];
4
+ export declare const AUTH_PROVIDERS_NAMES: Record<LOGIN_PROVIDER_TYPE, string>;
@@ -0,0 +1,3 @@
1
+ export declare const ThemedContext: import("react").Context<{
2
+ isDark: boolean;
3
+ }>;
@@ -0,0 +1,7 @@
1
+ declare const COUNTRY_DATA: {
2
+ name: string;
3
+ flag: string;
4
+ code: string;
5
+ dial_code: string;
6
+ }[];
7
+ export default COUNTRY_DATA;
@@ -0,0 +1,11 @@
1
+ import nl from "./dutch.json";
2
+ import en from "./english.json";
3
+ import fr from "./french.json";
4
+ import de from "./german.json";
5
+ import ja from "./japanese.json";
6
+ import ko from "./korean.json";
7
+ import zh from "./mandarin.json";
8
+ import pt from "./portuguese.json";
9
+ import es from "./spanish.json";
10
+ import tr from "./turkish.json";
11
+ export { de, en, es, fr, ja, ko, nl, pt, tr, zh };
@@ -0,0 +1,4 @@
1
+ export * from "./config";
2
+ export * from "./interfaces";
3
+ export { LoginModal } from "./loginModal";
4
+ export * from "./utils";
@@ -0,0 +1,106 @@
1
+ import type { SafeEventEmitter, UX_MODE_TYPE, WhiteLabelData } from "@web3auth/auth";
2
+ import { BaseAdapterConfig, ChainNamespaceType, LoginMethodConfig, WALLET_ADAPTER_TYPE, WalletRegistry, WalletRegistryItem, Web3AuthNoModalEvents } from "@web3auth/no-modal";
3
+ export interface UIConfig extends WhiteLabelData {
4
+ /**
5
+ * order of how login methods are shown
6
+ *
7
+ * @defaultValue `["google", "facebook", "twitter", "reddit", "discord", "twitch", "apple", "line", "github", "kakao", "linkedin", "weibo", "wechat", "email_passwordless"]`
8
+ */
9
+ loginMethodsOrder?: string[];
10
+ /**
11
+ * Z-index of the modal and iframe
12
+ * @defaultValue 99998
13
+ */
14
+ modalZIndex?: string;
15
+ /**
16
+ * Whether to show errors on Web3Auth modal.
17
+ *
18
+ * @defaultValue `true`
19
+ */
20
+ displayErrorsOnModal?: boolean;
21
+ /**
22
+ * number of columns to display the Social Login buttons
23
+ *
24
+ * @defaultValue `3`
25
+ */
26
+ loginGridCol?: 2 | 3;
27
+ /**
28
+ * Decides which button will be the focus of the modal
29
+ * For `socialLogin` the social icon will be colored
30
+ * For other options like `emailLogin` and `externalLogin` the respective buttons will be converted into a primary button
31
+ *
32
+ * @defaultValue `socialLogin`
33
+ */
34
+ primaryButton?: "externalLogin" | "socialLogin" | "emailLogin";
35
+ adapterListener: SafeEventEmitter<Web3AuthNoModalEvents>;
36
+ /**
37
+ * UX Mode for the auth adapter
38
+ */
39
+ uxMode?: UX_MODE_TYPE;
40
+ }
41
+ export interface LoginModalProps extends UIConfig {
42
+ chainNamespace: ChainNamespaceType;
43
+ walletRegistry: WalletRegistry;
44
+ }
45
+ export declare const LOGIN_MODAL_EVENTS: {
46
+ readonly INIT_EXTERNAL_WALLETS: "INIT_EXTERNAL_WALLETS";
47
+ readonly LOGIN: "LOGIN";
48
+ readonly DISCONNECT: "DISCONNECT";
49
+ readonly MODAL_VISIBILITY: "MODAL_VISIBILITY";
50
+ };
51
+ export type SocialLoginsConfig = {
52
+ loginMethodsOrder: string[];
53
+ loginMethods: LoginMethodConfig;
54
+ adapter: WALLET_ADAPTER_TYPE;
55
+ uiConfig: Omit<UIConfig, "adapterListener">;
56
+ };
57
+ export declare const MODAL_STATUS: {
58
+ INITIALIZED: string;
59
+ CONNECTED: string;
60
+ CONNECTING: string;
61
+ ERRORED: string;
62
+ };
63
+ export type ModalStatusType = (typeof MODAL_STATUS)[keyof typeof MODAL_STATUS];
64
+ export interface ModalState {
65
+ status: ModalStatusType;
66
+ externalWalletsInitialized: boolean;
67
+ hasExternalWallets: boolean;
68
+ externalWalletsVisibility: boolean;
69
+ modalVisibility: boolean;
70
+ modalVisibilityDelayed: boolean;
71
+ postLoadingMessage: string;
72
+ walletConnectUri: string;
73
+ socialLoginsConfig: SocialLoginsConfig;
74
+ externalWalletsConfig: Record<string, BaseAdapterConfig>;
75
+ detailedLoaderAdapter: string;
76
+ detailedLoaderAdapterName: string;
77
+ showExternalWalletsOnly: boolean;
78
+ }
79
+ export type SocialLoginEventType = {
80
+ adapter: string;
81
+ loginParams: {
82
+ loginProvider: string;
83
+ login_hint?: string;
84
+ name: string;
85
+ };
86
+ };
87
+ export type ExternalWalletEventType = {
88
+ adapter: string;
89
+ };
90
+ export declare const DEFAULT_LOGO_LIGHT = "https://images.web3auth.io/web3auth-logo-w.svg";
91
+ export declare const DEFAULT_LOGO_DARK = "https://images.web3auth.io/web3auth-logo-w-light.svg";
92
+ export declare const WALLET_CONNECT_LOGO = "https://images.web3auth.io/login-wallet-connect.svg";
93
+ export type StateEmitterEvents = {
94
+ STATE_UPDATED: (state: Partial<ModalState>) => void;
95
+ MOUNTED: () => void;
96
+ };
97
+ export type ExternalButton = {
98
+ name: string;
99
+ displayName?: string;
100
+ href?: string;
101
+ hasInjectedWallet: boolean;
102
+ hasWalletConnect: boolean;
103
+ hasInstallLinks: boolean;
104
+ walletRegistryItem?: WalletRegistryItem;
105
+ imgExtension?: string;
106
+ };
@@ -0,0 +1,3 @@
1
+ import i18n from "i18next";
2
+ declare const i18nInstance: typeof i18n;
3
+ export default i18nInstance;
@@ -0,0 +1,27 @@
1
+ import "./css/web3auth.css";
2
+ import { SafeEventEmitter } from "@web3auth/auth";
3
+ import { BaseAdapterConfig, LoginMethodConfig, WALLET_ADAPTER_TYPE } from "@web3auth/no-modal";
4
+ import { LoginModalProps, UIConfig } from "./interfaces";
5
+ export declare class LoginModal extends SafeEventEmitter {
6
+ private uiConfig;
7
+ private stateEmitter;
8
+ private chainNamespace;
9
+ private walletRegistry;
10
+ constructor(uiConfig: LoginModalProps);
11
+ get isDark(): boolean;
12
+ initModal: () => Promise<void>;
13
+ addSocialLogins: (adapter: WALLET_ADAPTER_TYPE, loginMethods: LoginMethodConfig, loginMethodsOrder: string[], uiConfig: Omit<UIConfig, "adapterListener">) => void;
14
+ addWalletLogins: (externalWalletsConfig: Record<string, BaseAdapterConfig>, options: {
15
+ showExternalWalletsOnly: boolean;
16
+ }) => void;
17
+ open: () => void;
18
+ closeModal: () => void;
19
+ initExternalWalletContainer: () => void;
20
+ private handleShowExternalWallets;
21
+ private handleExternalWalletClick;
22
+ private handleSocialLoginClick;
23
+ private setState;
24
+ private updateWalletConnect;
25
+ private handleAdapterData;
26
+ private subscribeCoreEvents;
27
+ }
@@ -0,0 +1,12 @@
1
+ import { LANGUAGE_TYPE } from "@web3auth/auth";
2
+ import { LoginMethodConfig } from "@web3auth/no-modal";
3
+ export declare const getAdapterSocialLogins: (adapterName: string, loginMethodsConfig?: LoginMethodConfig) => LoginMethodConfig;
4
+ export declare function validateImageUrl(url: string): Promise<boolean>;
5
+ export declare function getNetworkIconId(ticker: string): Promise<string>;
6
+ export declare const passwordlessBackendUrl = "https://api-passwordless.web3auth.io";
7
+ export declare const getUserCountry: () => Promise<{
8
+ country: string;
9
+ dialCode: string;
10
+ } | null>;
11
+ export declare const validatePhoneNumber: (phoneNumber: string) => Promise<string | boolean>;
12
+ export declare const getUserLanguage: (defaultLanguage: string | undefined) => LANGUAGE_TYPE;
@@ -0,0 +1,13 @@
1
+ import { PropType } from "vue";
2
+ import { Web3AuthContextConfig } from "./interfaces";
3
+ export declare const Web3AuthProvider: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ config: {
5
+ type: PropType<Web3AuthContextConfig>;
6
+ required: true;
7
+ };
8
+ }>, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
9
+ config: {
10
+ type: PropType<Web3AuthContextConfig>;
11
+ required: true;
12
+ };
13
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1 @@
1
+ export * from "./useWeb3Auth";
@@ -0,0 +1,2 @@
1
+ import { IWeb3AuthContext } from "../interfaces";
2
+ export declare const useWeb3Auth: () => IWeb3AuthContext;
@@ -0,0 +1,3 @@
1
+ export * from "./composables";
2
+ export * from "./interfaces";
3
+ export * from "./Web3AuthProvider";
@@ -0,0 +1,45 @@
1
+ import type { AuthUserInfo, LoginParams } from "@web3auth/auth";
2
+ import type { ADAPTER_STATUS_TYPE, CustomChainConfig, IAdapter, IPlugin, IProvider, UserAuthInfo, WALLET_ADAPTER_TYPE } from "@web3auth/no-modal";
3
+ import { Ref, ShallowRef } from "vue";
4
+ import type { ModalConfig } from "../interface";
5
+ import type { Web3Auth, Web3AuthOptions } from "../modalManager";
6
+ export type Web3AuthContextConfig = {
7
+ web3AuthOptions: Web3AuthOptions;
8
+ modalConfig?: Record<WALLET_ADAPTER_TYPE, ModalConfig>;
9
+ hideWalletDiscovery?: boolean;
10
+ adapters?: IAdapter<unknown>[];
11
+ plugins?: IPlugin[];
12
+ };
13
+ export interface Web3AuthProviderProps {
14
+ config: Web3AuthContextConfig;
15
+ }
16
+ interface IBaseWeb3AuthComposableContext {
17
+ isConnecting: Ref<boolean>;
18
+ connectError: Ref<Error | null>;
19
+ isConnected: Ref<boolean>;
20
+ provider: Ref<IProvider | null>;
21
+ userInfo: Ref<Partial<AuthUserInfo> | null>;
22
+ isMFAEnabled: Ref<boolean>;
23
+ isInitializing: Ref<boolean>;
24
+ initError: Ref<Error | null>;
25
+ isInitialized: Ref<boolean>;
26
+ status: Ref<ADAPTER_STATUS_TYPE | null>;
27
+ enableMFA(params?: LoginParams): Promise<void>;
28
+ manageMFA(params?: LoginParams): Promise<void>;
29
+ logout(params?: {
30
+ cleanup: boolean;
31
+ }): Promise<void>;
32
+ addAndSwitchChain(chainConfig: CustomChainConfig): Promise<void>;
33
+ addPlugin(plugin: IPlugin): void;
34
+ getPlugin(pluginName: string): IPlugin | null;
35
+ authenticateUser(): Promise<UserAuthInfo>;
36
+ addChain(chainConfig: CustomChainConfig): Promise<void>;
37
+ switchChain(params: {
38
+ chainId: string;
39
+ }): Promise<void>;
40
+ }
41
+ export interface IWeb3AuthContext extends IBaseWeb3AuthComposableContext {
42
+ web3Auth: ShallowRef<Web3Auth | null>;
43
+ connect(): Promise<IProvider | null>;
44
+ }
45
+ export {};