@web3auth/modal 10.16.0 → 11.0.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/lib.cjs/node_modules/style-inject/dist/style-inject.es.js +1 -1
- package/dist/lib.cjs/packages/modal/src/account-linking/index.js +12 -0
- package/dist/lib.cjs/packages/modal/src/account-linking/react.js +22 -0
- package/dist/lib.cjs/packages/modal/src/account-linking/vue.js +22 -0
- package/dist/lib.cjs/packages/modal/src/config.js +1 -1
- package/dist/lib.cjs/packages/modal/src/modalManager.js +473 -17
- package/dist/lib.cjs/packages/modal/src/react/Web3AuthProvider.js +4 -2
- package/dist/lib.cjs/packages/modal/src/react/context/WalletServicesInnerContext.js +3 -56
- package/dist/lib.cjs/packages/modal/src/react/context/Web3AuthInnerContext.js +15 -152
- package/dist/lib.cjs/packages/modal/src/react/hooks/useWeb3Auth.js +1 -22
- package/dist/lib.cjs/packages/modal/src/react/hooks/useWeb3AuthConnect.js +30 -43
- package/dist/lib.cjs/packages/modal/src/react/hooks/useWeb3AuthInner.js +8 -4
- package/dist/lib.cjs/packages/modal/src/react/index.js +61 -28
- package/dist/lib.cjs/packages/modal/src/react/solana/index.js +21 -8
- package/dist/lib.cjs/packages/modal/src/react/wagmi/provider.js +34 -17
- package/dist/lib.cjs/packages/modal/src/ui/components/BottomSheet/BottomSheet.js +15 -18
- package/dist/lib.cjs/packages/modal/src/ui/components/Button/Button.js +4 -2
- package/dist/lib.cjs/packages/modal/src/ui/components/Button/ButtonSocial/ButtonSocial.js +4 -4
- package/dist/lib.cjs/packages/modal/src/ui/components/Button/ButtonWallet/ButtonWallet.js +11 -12
- package/dist/lib.cjs/packages/modal/src/ui/components/Footer/Footer.js +7 -7
- package/dist/lib.cjs/packages/modal/src/ui/components/Image/Image.js +6 -6
- package/dist/lib.cjs/packages/modal/src/ui/components/Loader/Loader.js +132 -44
- package/dist/lib.cjs/packages/modal/src/ui/components/LoginHint/LoginHint.js +3 -3
- package/dist/lib.cjs/packages/modal/src/ui/components/Modal/Modal.js +20 -19
- package/dist/lib.cjs/packages/modal/src/ui/components/Otp/Otp.js +10 -10
- package/dist/lib.cjs/packages/modal/src/ui/components/PulseLoader/PulseLoader.js +4 -4
- package/dist/lib.cjs/packages/modal/src/ui/components/SocialLoginList/SocialLoginList.js +22 -24
- package/dist/lib.cjs/packages/modal/src/ui/components/SpinnerLoader/SpinnerLoader.css.js +6 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/SpinnerLoader/SpinnerLoader.js +30 -0
- package/dist/lib.cjs/packages/modal/src/ui/components/Toast/Toast.js +12 -12
- package/dist/lib.cjs/packages/modal/src/ui/constants.js +5 -2
- package/dist/lib.cjs/packages/modal/src/ui/containers/AccountLinking/AccountLinking.js +109 -0
- package/dist/lib.cjs/packages/modal/src/ui/{components → containers}/ConnectWallet/ConnectWallet.js +77 -29
- package/dist/lib.cjs/packages/modal/src/ui/{components → containers}/ConnectWallet/ConnectWalletChainFilter/ConnectWalletChainFilter.js +20 -11
- package/dist/lib.cjs/packages/modal/src/ui/{components → containers}/ConnectWallet/ConnectWalletChainNamespaceSelect/ConnectWalletChainNamespaceSelect.js +10 -10
- package/dist/lib.cjs/packages/modal/src/ui/{components → containers}/ConnectWallet/ConnectWalletHeader/ConnectWalletHeader.js +9 -8
- package/dist/lib.cjs/packages/modal/src/ui/{components → containers}/ConnectWallet/ConnectWalletList/ConnectWalletList.js +41 -33
- package/dist/lib.cjs/packages/modal/src/ui/{components → containers}/ConnectWallet/ConnectWalletQrCode/ConnectWalletQrCode.js +13 -11
- package/dist/lib.cjs/packages/modal/src/ui/{components → containers}/ConnectWallet/ConnectWalletSearch/ConnectWalletSearch.js +13 -7
- package/dist/lib.cjs/packages/modal/src/ui/{components → containers}/Embed/Embed.js +12 -11
- package/dist/lib.cjs/packages/modal/src/ui/{components → containers}/Login/Login.js +95 -80
- package/dist/lib.cjs/packages/modal/src/ui/{components → containers}/Login/LoginOtp/LoginOtp.js +12 -12
- package/dist/lib.cjs/packages/modal/src/ui/{components → containers}/Login/LoginPasswordLess/LoginPasswordLess.js +14 -14
- package/dist/lib.cjs/packages/modal/src/ui/containers/Root/Root.js +250 -0
- package/dist/lib.cjs/packages/modal/src/ui/containers/Root/RootBodySheets/RootBodySheets.js +185 -0
- package/dist/lib.cjs/packages/modal/src/ui/containers/Widget/Widget.js +110 -0
- package/dist/lib.cjs/packages/modal/src/ui/context/ModalStateContext.js +158 -0
- package/dist/lib.cjs/packages/modal/src/ui/context/RootContext.js +64 -21
- package/dist/lib.cjs/packages/modal/src/ui/context/WidgetContext.js +52 -0
- package/dist/lib.cjs/packages/modal/src/ui/css/index.css.js +1 -1
- package/dist/lib.cjs/packages/modal/src/ui/i18n/dutch.json.js +14 -0
- package/dist/lib.cjs/packages/modal/src/ui/i18n/english.json.js +14 -0
- package/dist/lib.cjs/packages/modal/src/ui/i18n/french.json.js +14 -0
- package/dist/lib.cjs/packages/modal/src/ui/i18n/german.json.js +14 -0
- package/dist/lib.cjs/packages/modal/src/ui/i18n/japanese.json.js +26 -12
- package/dist/lib.cjs/packages/modal/src/ui/i18n/korean.json.js +14 -0
- package/dist/lib.cjs/packages/modal/src/ui/i18n/mandarin.json.js +14 -0
- package/dist/lib.cjs/packages/modal/src/ui/i18n/portuguese.json.js +14 -0
- package/dist/lib.cjs/packages/modal/src/ui/i18n/spanish.json.js +14 -0
- package/dist/lib.cjs/packages/modal/src/ui/i18n/turkish.json.js +14 -0
- package/dist/lib.cjs/packages/modal/src/ui/interfaces.js +28 -1
- package/dist/lib.cjs/packages/modal/src/ui/loginModal.js +186 -46
- package/dist/lib.cjs/packages/modal/src/vue/WalletServicesInnerProvider.js +2 -50
- package/dist/lib.cjs/packages/modal/src/vue/Web3AuthProvider.js +7 -170
- package/dist/lib.cjs/packages/modal/src/vue/composables/useWeb3AuthConnect.js +31 -33
- package/dist/lib.cjs/packages/modal/src/vue/composables/useWeb3AuthInner.js +2 -5
- package/dist/lib.cjs/packages/modal/src/vue/index.js +61 -28
- package/dist/lib.cjs/packages/modal/src/vue/solana/index.js +29 -8
- package/dist/lib.cjs/packages/modal/src/vue/wagmi/provider.js +37 -23
- package/dist/lib.cjs/packages/modal/src/x402/index.js +12 -0
- package/dist/lib.cjs/packages/modal/src/x402/react.js +26 -0
- package/dist/lib.cjs/packages/modal/src/x402/vue.js +18 -0
- package/dist/lib.cjs/types/account-linking/index.d.ts +1 -0
- package/dist/lib.cjs/types/account-linking/react.d.ts +2 -0
- package/dist/lib.cjs/types/account-linking/vue.d.ts +2 -0
- package/dist/lib.cjs/types/interface.d.ts +2 -2
- package/dist/lib.cjs/types/modalManager.d.ts +46 -4
- package/dist/lib.cjs/types/react/context/WalletServicesInnerContext.d.ts +12 -5
- package/dist/lib.cjs/types/react/context/Web3AuthInnerContext.d.ts +4 -3
- package/dist/lib.cjs/types/react/hooks/index.d.ts +16 -14
- package/dist/lib.cjs/types/react/hooks/useWallets.d.ts +2 -0
- package/dist/lib.cjs/types/react/hooks/useWeb3Auth.d.ts +1 -2
- package/dist/lib.cjs/types/react/hooks/useWeb3AuthConnect.d.ts +3 -3
- package/dist/lib.cjs/types/react/interfaces.d.ts +3 -2
- package/dist/lib.cjs/types/react/solana/hooks/index.d.ts +5 -4
- package/dist/lib.cjs/types/react/solana/index.d.ts +1 -0
- package/dist/lib.cjs/types/react/solana/provider.d.ts +1 -0
- package/dist/lib.cjs/types/ui/components/BottomSheet/BottomSheet.d.ts +1 -1
- package/dist/lib.cjs/types/ui/components/BottomSheet/BottomSheet.type.d.ts +4 -3
- package/dist/lib.cjs/types/ui/components/Button/ButtonWallet/ButtonWallet.type.d.ts +1 -0
- package/dist/lib.cjs/types/ui/components/Loader/Loader.type.d.ts +7 -5
- package/dist/lib.cjs/types/ui/components/LoginHint/LoginHint.type.d.ts +2 -1
- package/dist/lib.cjs/types/ui/components/SpinnerLoader/SpinnerLoader.d.ts +4 -0
- package/dist/lib.cjs/types/ui/components/SpinnerLoader/SpinnerLoader.type.d.ts +9 -0
- package/dist/lib.cjs/types/ui/components/SpinnerLoader/index.d.ts +2 -0
- package/dist/lib.cjs/types/ui/constants.d.ts +7 -4
- package/dist/lib.cjs/types/ui/containers/AccountLinking/AccountLinking.d.ts +6 -0
- package/dist/lib.cjs/types/ui/containers/AccountLinking/index.d.ts +1 -0
- package/dist/lib.cjs/types/ui/containers/ConnectWallet/ConnectWallet.type.d.ts +7 -0
- package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletChainFilter/ConnectWalletChainFilter.type.d.ts +0 -2
- package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletHeader/ConnectWalletHeader.type.d.ts +1 -0
- package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletList/ConnectWalletList.type.d.ts +3 -9
- package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletSearch/ConnectWalletSearch.type.d.ts +0 -2
- package/dist/lib.cjs/types/ui/containers/Login/Login.type.d.ts +6 -0
- package/dist/lib.cjs/types/ui/{components → containers}/Root/Root.d.ts +1 -1
- package/dist/lib.cjs/types/ui/containers/Root/Root.type.d.ts +3 -0
- package/dist/lib.cjs/types/ui/containers/Root/RootBodySheets/RootBodySheets.d.ts +1 -0
- package/dist/lib.cjs/types/ui/containers/Widget/Widget.type.d.ts +5 -0
- package/dist/lib.cjs/types/ui/context/ModalStateContext.d.ts +28 -0
- package/dist/lib.cjs/types/ui/context/RootContext.d.ts +19 -7
- package/dist/lib.cjs/types/ui/context/WidgetContext.d.ts +45 -0
- package/dist/lib.cjs/types/ui/interfaces.d.ts +53 -15
- package/dist/lib.cjs/types/ui/loginModal.d.ts +31 -4
- package/dist/lib.cjs/types/ui/utils.d.ts +1 -1
- package/dist/lib.cjs/types/vue/composables/index.d.ts +3 -14
- package/dist/lib.cjs/types/vue/composables/useWallets.d.ts +2 -0
- package/dist/lib.cjs/types/vue/composables/useWeb3Auth.d.ts +1 -2
- package/dist/lib.cjs/types/vue/composables/useWeb3AuthConnect.d.ts +3 -3
- package/dist/lib.cjs/types/vue/interfaces.d.ts +3 -17
- package/dist/lib.cjs/types/vue/solana/composables/index.d.ts +3 -4
- package/dist/lib.cjs/types/vue/solana/composables/useSolanaClient.d.ts +1 -0
- package/dist/lib.cjs/types/vue/solana/constants.d.ts +1 -0
- package/dist/lib.cjs/types/vue/solana/index.d.ts +2 -0
- package/dist/lib.cjs/types/vue/solana/provider.d.ts +1 -0
- package/dist/lib.cjs/types/x402/index.d.ts +1 -0
- package/dist/lib.cjs/types/x402/react.d.ts +2 -0
- package/dist/lib.cjs/types/x402/vue.d.ts +2 -0
- package/dist/lib.esm/node_modules/style-inject/dist/style-inject.es.js +1 -1
- package/dist/lib.esm/packages/modal/src/account-linking/index.js +1 -0
- package/dist/lib.esm/packages/modal/src/account-linking/react.js +1 -0
- package/dist/lib.esm/packages/modal/src/account-linking/vue.js +1 -0
- package/dist/lib.esm/packages/modal/src/config.js +1 -1
- package/dist/lib.esm/packages/modal/src/modalManager.js +478 -19
- package/dist/lib.esm/packages/modal/src/react/Web3AuthProvider.js +4 -2
- package/dist/lib.esm/packages/modal/src/react/context/WalletServicesInnerContext.js +4 -57
- package/dist/lib.esm/packages/modal/src/react/context/Web3AuthInnerContext.js +12 -151
- package/dist/lib.esm/packages/modal/src/react/hooks/useWeb3Auth.js +1 -22
- package/dist/lib.esm/packages/modal/src/react/hooks/useWeb3AuthConnect.js +28 -41
- package/dist/lib.esm/packages/modal/src/react/hooks/useWeb3AuthInner.js +7 -3
- package/dist/lib.esm/packages/modal/src/react/index.js +1 -14
- package/dist/lib.esm/packages/modal/src/react/solana/index.js +1 -4
- package/dist/lib.esm/packages/modal/src/react/wagmi/provider.js +34 -17
- package/dist/lib.esm/packages/modal/src/ui/components/BottomSheet/BottomSheet.js +15 -18
- package/dist/lib.esm/packages/modal/src/ui/components/Button/Button.js +4 -2
- package/dist/lib.esm/packages/modal/src/ui/components/Button/ButtonSocial/ButtonSocial.js +4 -4
- package/dist/lib.esm/packages/modal/src/ui/components/Button/ButtonWallet/ButtonWallet.js +12 -13
- package/dist/lib.esm/packages/modal/src/ui/components/Footer/Footer.js +7 -7
- package/dist/lib.esm/packages/modal/src/ui/components/Image/Image.js +7 -7
- package/dist/lib.esm/packages/modal/src/ui/components/Loader/Loader.js +133 -45
- package/dist/lib.esm/packages/modal/src/ui/components/LoginHint/LoginHint.js +3 -3
- package/dist/lib.esm/packages/modal/src/ui/components/Modal/Modal.js +20 -19
- package/dist/lib.esm/packages/modal/src/ui/components/Otp/Otp.js +10 -10
- package/dist/lib.esm/packages/modal/src/ui/components/PulseLoader/PulseLoader.js +4 -4
- package/dist/lib.esm/packages/modal/src/ui/components/SocialLoginList/SocialLoginList.js +22 -24
- package/dist/lib.esm/packages/modal/src/ui/components/SpinnerLoader/SpinnerLoader.css.js +4 -0
- package/dist/lib.esm/packages/modal/src/ui/components/SpinnerLoader/SpinnerLoader.js +28 -0
- package/dist/lib.esm/packages/modal/src/ui/components/Toast/Toast.js +14 -14
- package/dist/lib.esm/packages/modal/src/ui/constants.js +5 -2
- package/dist/lib.esm/packages/modal/src/ui/containers/AccountLinking/AccountLinking.js +107 -0
- package/dist/lib.esm/packages/modal/src/ui/{components → containers}/ConnectWallet/ConnectWallet.js +81 -32
- package/dist/lib.esm/packages/modal/src/ui/{components → containers}/ConnectWallet/ConnectWalletChainFilter/ConnectWalletChainFilter.js +20 -11
- package/dist/lib.esm/packages/modal/src/ui/{components → containers}/ConnectWallet/ConnectWalletChainNamespaceSelect/ConnectWalletChainNamespaceSelect.js +10 -10
- package/dist/lib.esm/packages/modal/src/ui/{components → containers}/ConnectWallet/ConnectWalletHeader/ConnectWalletHeader.js +9 -8
- package/dist/lib.esm/packages/modal/src/ui/{components → containers}/ConnectWallet/ConnectWalletList/ConnectWalletList.js +41 -33
- package/dist/lib.esm/packages/modal/src/ui/{components → containers}/ConnectWallet/ConnectWalletQrCode/ConnectWalletQrCode.js +15 -13
- package/dist/lib.esm/packages/modal/src/ui/{components → containers}/ConnectWallet/ConnectWalletSearch/ConnectWalletSearch.js +13 -7
- package/dist/lib.esm/packages/modal/src/ui/{components → containers}/Embed/Embed.js +12 -11
- package/dist/lib.esm/packages/modal/src/ui/{components → containers}/Login/Login.js +99 -83
- package/dist/lib.esm/packages/modal/src/ui/{components → containers}/Login/LoginOtp/LoginOtp.js +12 -12
- package/dist/lib.esm/packages/modal/src/ui/{components → containers}/Login/LoginPasswordLess/LoginPasswordLess.js +14 -14
- package/dist/lib.esm/packages/modal/src/ui/containers/Root/Root.js +253 -0
- package/dist/lib.esm/packages/modal/src/ui/containers/Root/RootBodySheets/RootBodySheets.js +183 -0
- package/dist/lib.esm/packages/modal/src/ui/containers/Widget/Widget.js +108 -0
- package/dist/lib.esm/packages/modal/src/ui/context/ModalStateContext.js +161 -0
- package/dist/lib.esm/packages/modal/src/ui/context/RootContext.js +60 -22
- package/dist/lib.esm/packages/modal/src/ui/context/WidgetContext.js +49 -0
- package/dist/lib.esm/packages/modal/src/ui/css/index.css.js +1 -1
- package/dist/lib.esm/packages/modal/src/ui/i18n/dutch.json.js +14 -0
- package/dist/lib.esm/packages/modal/src/ui/i18n/english.json.js +14 -0
- package/dist/lib.esm/packages/modal/src/ui/i18n/french.json.js +14 -0
- package/dist/lib.esm/packages/modal/src/ui/i18n/german.json.js +14 -0
- package/dist/lib.esm/packages/modal/src/ui/i18n/japanese.json.js +26 -12
- package/dist/lib.esm/packages/modal/src/ui/i18n/korean.json.js +14 -0
- package/dist/lib.esm/packages/modal/src/ui/i18n/mandarin.json.js +14 -0
- package/dist/lib.esm/packages/modal/src/ui/i18n/portuguese.json.js +14 -0
- package/dist/lib.esm/packages/modal/src/ui/i18n/spanish.json.js +14 -0
- package/dist/lib.esm/packages/modal/src/ui/i18n/turkish.json.js +14 -0
- package/dist/lib.esm/packages/modal/src/ui/interfaces.js +26 -2
- package/dist/lib.esm/packages/modal/src/ui/loginModal.js +188 -48
- package/dist/lib.esm/packages/modal/src/vue/WalletServicesInnerProvider.js +5 -54
- package/dist/lib.esm/packages/modal/src/vue/Web3AuthProvider.js +9 -176
- package/dist/lib.esm/packages/modal/src/vue/composables/useWeb3AuthConnect.js +28 -30
- package/dist/lib.esm/packages/modal/src/vue/composables/useWeb3AuthInner.js +2 -5
- package/dist/lib.esm/packages/modal/src/vue/index.js +1 -14
- package/dist/lib.esm/packages/modal/src/vue/solana/index.js +1 -4
- package/dist/lib.esm/packages/modal/src/vue/wagmi/provider.js +33 -19
- package/dist/lib.esm/packages/modal/src/x402/index.js +1 -0
- package/dist/lib.esm/packages/modal/src/x402/react.js +1 -0
- package/dist/lib.esm/packages/modal/src/x402/vue.js +1 -0
- package/package.json +94 -47
- package/dist/lib.cjs/packages/modal/src/providers/ethereum-mpc-provider/index.js +0 -12
- package/dist/lib.cjs/packages/modal/src/react/hooks/useChain.js +0 -16
- package/dist/lib.cjs/packages/modal/src/react/hooks/useCheckout.js +0 -34
- package/dist/lib.cjs/packages/modal/src/react/hooks/useEnableMFA.js +0 -30
- package/dist/lib.cjs/packages/modal/src/react/hooks/useFunding.js +0 -34
- package/dist/lib.cjs/packages/modal/src/react/hooks/useIdentityToken.js +0 -46
- package/dist/lib.cjs/packages/modal/src/react/hooks/useManageMFA.js +0 -30
- package/dist/lib.cjs/packages/modal/src/react/hooks/useReceive.js +0 -34
- package/dist/lib.cjs/packages/modal/src/react/hooks/useSwap.js +0 -34
- package/dist/lib.cjs/packages/modal/src/react/hooks/useSwitchChain.js +0 -32
- package/dist/lib.cjs/packages/modal/src/react/hooks/useWalletConnectScanner.js +0 -34
- package/dist/lib.cjs/packages/modal/src/react/hooks/useWalletServicesPlugin.js +0 -13
- package/dist/lib.cjs/packages/modal/src/react/hooks/useWalletUI.js +0 -34
- package/dist/lib.cjs/packages/modal/src/react/hooks/useWeb3AuthDisconnect.js +0 -30
- package/dist/lib.cjs/packages/modal/src/react/hooks/useWeb3AuthUser.js +0 -50
- package/dist/lib.cjs/packages/modal/src/react/solana/hooks/useSignAndSendTransaction.js +0 -36
- package/dist/lib.cjs/packages/modal/src/react/solana/hooks/useSignMessage.js +0 -37
- package/dist/lib.cjs/packages/modal/src/react/solana/hooks/useSignTransaction.js +0 -36
- package/dist/lib.cjs/packages/modal/src/react/solana/hooks/useSolanaWallet.js +0 -68
- package/dist/lib.cjs/packages/modal/src/ui/components/CircularLoader/CircularLoader.js +0 -88
- package/dist/lib.cjs/packages/modal/src/ui/components/Root/Root.js +0 -513
- package/dist/lib.cjs/packages/modal/src/ui/components/Widget/Widget.js +0 -251
- package/dist/lib.cjs/packages/modal/src/ui/context/ThemeContext.js +0 -9
- package/dist/lib.cjs/packages/modal/src/vue/composables/useChain.js +0 -13
- package/dist/lib.cjs/packages/modal/src/vue/composables/useCheckout.js +0 -35
- package/dist/lib.cjs/packages/modal/src/vue/composables/useEnableMFA.js +0 -33
- package/dist/lib.cjs/packages/modal/src/vue/composables/useFunding.js +0 -35
- package/dist/lib.cjs/packages/modal/src/vue/composables/useIdentityToken.js +0 -51
- package/dist/lib.cjs/packages/modal/src/vue/composables/useManageMFA.js +0 -33
- package/dist/lib.cjs/packages/modal/src/vue/composables/useReceive.js +0 -35
- package/dist/lib.cjs/packages/modal/src/vue/composables/useSwap.js +0 -35
- package/dist/lib.cjs/packages/modal/src/vue/composables/useSwitchChain.js +0 -33
- package/dist/lib.cjs/packages/modal/src/vue/composables/useWalletConnectScanner.js +0 -35
- package/dist/lib.cjs/packages/modal/src/vue/composables/useWalletServicesPlugin.js +0 -13
- package/dist/lib.cjs/packages/modal/src/vue/composables/useWalletUI.js +0 -35
- package/dist/lib.cjs/packages/modal/src/vue/composables/useWeb3AuthDisconnect.js +0 -33
- package/dist/lib.cjs/packages/modal/src/vue/composables/useWeb3AuthUser.js +0 -54
- package/dist/lib.cjs/packages/modal/src/vue/solana/composables/useSignAndSendTransaction.js +0 -37
- package/dist/lib.cjs/packages/modal/src/vue/solana/composables/useSignMessage.js +0 -39
- package/dist/lib.cjs/packages/modal/src/vue/solana/composables/useSignTransaction.js +0 -37
- package/dist/lib.cjs/packages/modal/src/vue/solana/composables/useSolanaWallet.js +0 -67
- package/dist/lib.cjs/types/providers/ethereum-mpc-provider/index.d.ts +0 -1
- package/dist/lib.cjs/types/react/hooks/useChain.d.ts +0 -6
- package/dist/lib.cjs/types/react/hooks/useCheckout.d.ts +0 -8
- package/dist/lib.cjs/types/react/hooks/useEnableMFA.d.ts +0 -7
- package/dist/lib.cjs/types/react/hooks/useFunding.d.ts +0 -8
- package/dist/lib.cjs/types/react/hooks/useIdentityToken.d.ts +0 -13
- package/dist/lib.cjs/types/react/hooks/useManageMFA.d.ts +0 -7
- package/dist/lib.cjs/types/react/hooks/useReceive.d.ts +0 -8
- package/dist/lib.cjs/types/react/hooks/useSwap.d.ts +0 -8
- package/dist/lib.cjs/types/react/hooks/useSwitchChain.d.ts +0 -7
- package/dist/lib.cjs/types/react/hooks/useWalletConnectScanner.d.ts +0 -8
- package/dist/lib.cjs/types/react/hooks/useWalletServicesPlugin.d.ts +0 -2
- package/dist/lib.cjs/types/react/hooks/useWalletUI.d.ts +0 -8
- package/dist/lib.cjs/types/react/hooks/useWeb3AuthDisconnect.d.ts +0 -9
- package/dist/lib.cjs/types/react/hooks/useWeb3AuthUser.d.ts +0 -9
- package/dist/lib.cjs/types/react/solana/hooks/useSignAndSendTransaction.d.ts +0 -8
- package/dist/lib.cjs/types/react/solana/hooks/useSignMessage.d.ts +0 -8
- package/dist/lib.cjs/types/react/solana/hooks/useSignTransaction.d.ts +0 -13
- package/dist/lib.cjs/types/react/solana/hooks/useSolanaWallet.d.ts +0 -8
- package/dist/lib.cjs/types/ui/components/CircularLoader/CircularLoader.d.ts +0 -3
- package/dist/lib.cjs/types/ui/components/CircularLoader/CircularLoader.type.d.ts +0 -19
- package/dist/lib.cjs/types/ui/components/CircularLoader/index.d.ts +0 -2
- package/dist/lib.cjs/types/ui/components/ConnectWallet/ConnectWallet.type.d.ts +0 -27
- package/dist/lib.cjs/types/ui/components/Login/Login.type.d.ts +0 -35
- package/dist/lib.cjs/types/ui/components/Root/Root.type.d.ts +0 -36
- package/dist/lib.cjs/types/ui/components/Widget/Widget.type.d.ts +0 -24
- package/dist/lib.cjs/types/ui/context/ThemeContext.d.ts +0 -3
- package/dist/lib.cjs/types/vue/composables/useChain.d.ts +0 -7
- package/dist/lib.cjs/types/vue/composables/useCheckout.d.ts +0 -9
- package/dist/lib.cjs/types/vue/composables/useEnableMFA.d.ts +0 -8
- package/dist/lib.cjs/types/vue/composables/useFunding.d.ts +0 -9
- package/dist/lib.cjs/types/vue/composables/useIdentityToken.d.ts +0 -9
- package/dist/lib.cjs/types/vue/composables/useManageMFA.d.ts +0 -8
- package/dist/lib.cjs/types/vue/composables/useReceive.d.ts +0 -9
- package/dist/lib.cjs/types/vue/composables/useSwap.d.ts +0 -9
- package/dist/lib.cjs/types/vue/composables/useSwitchChain.d.ts +0 -10
- package/dist/lib.cjs/types/vue/composables/useWalletConnectScanner.d.ts +0 -9
- package/dist/lib.cjs/types/vue/composables/useWalletServicesPlugin.d.ts +0 -2
- package/dist/lib.cjs/types/vue/composables/useWalletUI.d.ts +0 -9
- package/dist/lib.cjs/types/vue/composables/useWeb3AuthDisconnect.d.ts +0 -10
- package/dist/lib.cjs/types/vue/composables/useWeb3AuthUser.d.ts +0 -10
- package/dist/lib.cjs/types/vue/solana/composables/useSignAndSendTransaction.d.ts +0 -9
- package/dist/lib.cjs/types/vue/solana/composables/useSignMessage.d.ts +0 -9
- package/dist/lib.cjs/types/vue/solana/composables/useSignTransaction.d.ts +0 -9
- package/dist/lib.cjs/types/vue/solana/composables/useSolanaWallet.d.ts +0 -9
- package/dist/lib.esm/packages/modal/src/providers/ethereum-mpc-provider/index.js +0 -1
- package/dist/lib.esm/packages/modal/src/react/hooks/useChain.js +0 -14
- package/dist/lib.esm/packages/modal/src/react/hooks/useCheckout.js +0 -32
- package/dist/lib.esm/packages/modal/src/react/hooks/useEnableMFA.js +0 -28
- package/dist/lib.esm/packages/modal/src/react/hooks/useFunding.js +0 -32
- package/dist/lib.esm/packages/modal/src/react/hooks/useIdentityToken.js +0 -44
- package/dist/lib.esm/packages/modal/src/react/hooks/useManageMFA.js +0 -28
- package/dist/lib.esm/packages/modal/src/react/hooks/useReceive.js +0 -32
- package/dist/lib.esm/packages/modal/src/react/hooks/useSwap.js +0 -32
- package/dist/lib.esm/packages/modal/src/react/hooks/useSwitchChain.js +0 -30
- package/dist/lib.esm/packages/modal/src/react/hooks/useWalletConnectScanner.js +0 -32
- package/dist/lib.esm/packages/modal/src/react/hooks/useWalletServicesPlugin.js +0 -11
- package/dist/lib.esm/packages/modal/src/react/hooks/useWalletUI.js +0 -32
- package/dist/lib.esm/packages/modal/src/react/hooks/useWeb3AuthDisconnect.js +0 -28
- package/dist/lib.esm/packages/modal/src/react/hooks/useWeb3AuthUser.js +0 -48
- package/dist/lib.esm/packages/modal/src/react/solana/hooks/useSignAndSendTransaction.js +0 -34
- package/dist/lib.esm/packages/modal/src/react/solana/hooks/useSignMessage.js +0 -35
- package/dist/lib.esm/packages/modal/src/react/solana/hooks/useSignTransaction.js +0 -34
- package/dist/lib.esm/packages/modal/src/react/solana/hooks/useSolanaWallet.js +0 -64
- package/dist/lib.esm/packages/modal/src/ui/components/CircularLoader/CircularLoader.js +0 -86
- package/dist/lib.esm/packages/modal/src/ui/components/Root/Root.js +0 -524
- package/dist/lib.esm/packages/modal/src/ui/components/Widget/Widget.js +0 -253
- package/dist/lib.esm/packages/modal/src/ui/context/ThemeContext.js +0 -7
- package/dist/lib.esm/packages/modal/src/vue/composables/useChain.js +0 -11
- package/dist/lib.esm/packages/modal/src/vue/composables/useCheckout.js +0 -33
- package/dist/lib.esm/packages/modal/src/vue/composables/useEnableMFA.js +0 -31
- package/dist/lib.esm/packages/modal/src/vue/composables/useFunding.js +0 -33
- package/dist/lib.esm/packages/modal/src/vue/composables/useIdentityToken.js +0 -49
- package/dist/lib.esm/packages/modal/src/vue/composables/useManageMFA.js +0 -31
- package/dist/lib.esm/packages/modal/src/vue/composables/useReceive.js +0 -33
- package/dist/lib.esm/packages/modal/src/vue/composables/useSwap.js +0 -33
- package/dist/lib.esm/packages/modal/src/vue/composables/useSwitchChain.js +0 -31
- package/dist/lib.esm/packages/modal/src/vue/composables/useWalletConnectScanner.js +0 -33
- package/dist/lib.esm/packages/modal/src/vue/composables/useWalletServicesPlugin.js +0 -11
- package/dist/lib.esm/packages/modal/src/vue/composables/useWalletUI.js +0 -33
- package/dist/lib.esm/packages/modal/src/vue/composables/useWeb3AuthDisconnect.js +0 -31
- package/dist/lib.esm/packages/modal/src/vue/composables/useWeb3AuthUser.js +0 -52
- package/dist/lib.esm/packages/modal/src/vue/solana/composables/useSignAndSendTransaction.js +0 -35
- package/dist/lib.esm/packages/modal/src/vue/solana/composables/useSignMessage.js +0 -37
- package/dist/lib.esm/packages/modal/src/vue/solana/composables/useSignTransaction.js +0 -35
- package/dist/lib.esm/packages/modal/src/vue/solana/composables/useSolanaWallet.js +0 -65
- package/dist/modal.umd.min.js +0 -2
- package/dist/modal.umd.min.js.LICENSE.txt +0 -102
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWallet.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletChainFilter/ConnectWalletChainFilter.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletChainFilter/index.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletChainNamespaceSelect/ConnectWalletChainNamespaceSelect.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletChainNamespaceSelect/ConnectWalletChainNamespaceSelect.type.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletChainNamespaceSelect/index.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletHeader/ConnectWalletHeader.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletHeader/index.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletList/ConnectWalletList.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletList/index.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletQrCode/ConnectWalletQrCode.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletQrCode/ConnectWalletQrCode.type.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletQrCode/index.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletSearch/ConnectWalletSearch.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/ConnectWalletSearch/index.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/ConnectWallet/index.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/Embed/Embed.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/Embed/Embed.type.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/Embed/index.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/Login/Login.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/Login/LoginOtp/LoginOtp.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/Login/LoginOtp/LoginOtp.type.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/Login/LoginOtp/index.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/Login/LoginPasswordLess/LoginPasswordLess.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/Login/LoginPasswordLess/LoginPasswordLess.type.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/Login/LoginPasswordLess/index.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/Login/index.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/Root/index.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/Widget/Widget.d.ts +0 -0
- /package/dist/lib.cjs/types/ui/{components → containers}/Widget/index.d.ts +0 -0
|
@@ -1,59 +1,57 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var noModal = require('@web3auth/no-modal');
|
|
4
|
-
var vue = require('vue');
|
|
4
|
+
var vue = require('@web3auth/no-modal/vue');
|
|
5
|
+
var vue$1 = require('vue');
|
|
5
6
|
var useWeb3AuthInner = require('./useWeb3AuthInner.js');
|
|
6
7
|
|
|
7
8
|
const useWeb3AuthConnect = () => {
|
|
8
9
|
const {
|
|
9
|
-
web3Auth
|
|
10
|
-
isConnected
|
|
10
|
+
web3Auth
|
|
11
11
|
} = useWeb3AuthInner.useWeb3AuthInner();
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
12
|
+
// Web3AuthModal extends the NoModal class, so we can use the same composable
|
|
13
|
+
const {
|
|
14
|
+
isConnected,
|
|
15
|
+
loading: sharedLoading,
|
|
16
|
+
error: sharedError,
|
|
17
|
+
connectorName,
|
|
18
|
+
connect: sharedConnectTo
|
|
19
|
+
} = vue.useWeb3AuthConnect();
|
|
20
|
+
const loading = vue$1.ref(false);
|
|
21
|
+
const error = vue$1.ref(null);
|
|
22
|
+
const connectLoading = vue$1.ref(false);
|
|
23
|
+
const connectError = vue$1.ref(null);
|
|
24
|
+
const activeFlow = vue$1.ref(null);
|
|
25
|
+
vue$1.watch([connectLoading, sharedLoading], ([newConnectLoading, newSharedLoading]) => {
|
|
26
|
+
loading.value = newConnectLoading || newSharedLoading;
|
|
27
|
+
}, {
|
|
28
|
+
immediate: true
|
|
29
|
+
});
|
|
30
|
+
vue$1.watch([activeFlow, connectError, sharedError], ([newActiveFlow, newConnectError, newSharedError]) => {
|
|
31
|
+
error.value = newActiveFlow === "connect" ? newConnectError : newSharedError;
|
|
23
32
|
}, {
|
|
24
33
|
immediate: true
|
|
25
34
|
});
|
|
26
35
|
const connect = async () => {
|
|
27
36
|
try {
|
|
37
|
+
activeFlow.value = "connect";
|
|
28
38
|
if (!web3Auth.value) throw noModal.WalletInitializationError.notReady();
|
|
29
|
-
|
|
30
|
-
|
|
39
|
+
connectError.value = null;
|
|
40
|
+
connectLoading.value = true;
|
|
31
41
|
const localProvider = await web3Auth.value.connect();
|
|
32
|
-
connectorName.value = web3Auth.value.connectedConnectorName;
|
|
33
42
|
return localProvider;
|
|
34
43
|
} catch (err) {
|
|
35
44
|
noModal.log.error("Error connecting", err);
|
|
36
|
-
|
|
45
|
+
connectError.value = err;
|
|
37
46
|
return null;
|
|
38
47
|
} finally {
|
|
39
|
-
|
|
48
|
+
connectLoading.value = false;
|
|
40
49
|
}
|
|
41
50
|
};
|
|
42
51
|
const connectTo = async (connectorType, loginParams) => {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
loading.value = true;
|
|
47
|
-
const localProvider = await web3Auth.value.connectTo(connectorType, loginParams);
|
|
48
|
-
connectorName.value = web3Auth.value.connectedConnectorName;
|
|
49
|
-
return localProvider;
|
|
50
|
-
} catch (err) {
|
|
51
|
-
noModal.log.error("Error connecting to", err);
|
|
52
|
-
error.value = err;
|
|
53
|
-
return null;
|
|
54
|
-
} finally {
|
|
55
|
-
loading.value = false;
|
|
56
|
-
}
|
|
52
|
+
activeFlow.value = "connectTo";
|
|
53
|
+
connectError.value = null;
|
|
54
|
+
return sharedConnectTo(connectorType, loginParams);
|
|
57
55
|
};
|
|
58
56
|
return {
|
|
59
57
|
isConnected,
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var vue = require('vue');
|
|
3
|
+
var vue = require('@web3auth/no-modal/vue');
|
|
5
4
|
|
|
6
5
|
const useWeb3AuthInner = () => {
|
|
7
|
-
|
|
8
|
-
if (!context) throw noModal.WalletInitializationError.fromCode(1000, "usage of `useWeb3Auth` not wrapped in `Web3AuthProvider`.");
|
|
9
|
-
return context;
|
|
6
|
+
return vue.useInjectedWeb3AuthInnerContext();
|
|
10
7
|
};
|
|
11
8
|
|
|
12
9
|
exports.useWeb3AuthInner = useWeb3AuthInner;
|
|
@@ -1,39 +1,72 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var useCheckout = require('./composables/useCheckout.js');
|
|
5
|
-
var useEnableMFA = require('./composables/useEnableMFA.js');
|
|
6
|
-
var useFunding = require('./composables/useFunding.js');
|
|
7
|
-
var useIdentityToken = require('./composables/useIdentityToken.js');
|
|
8
|
-
var useManageMFA = require('./composables/useManageMFA.js');
|
|
9
|
-
var useReceive = require('./composables/useReceive.js');
|
|
10
|
-
var useSwap = require('./composables/useSwap.js');
|
|
11
|
-
var useSwitchChain = require('./composables/useSwitchChain.js');
|
|
12
|
-
var useWalletConnectScanner = require('./composables/useWalletConnectScanner.js');
|
|
13
|
-
var useWalletServicesPlugin = require('./composables/useWalletServicesPlugin.js');
|
|
14
|
-
var useWalletUI = require('./composables/useWalletUI.js');
|
|
3
|
+
var vue = require('@web3auth/no-modal/vue');
|
|
15
4
|
var useWeb3Auth = require('./composables/useWeb3Auth.js');
|
|
16
5
|
var useWeb3AuthConnect = require('./composables/useWeb3AuthConnect.js');
|
|
17
|
-
var useWeb3AuthDisconnect = require('./composables/useWeb3AuthDisconnect.js');
|
|
18
|
-
var useWeb3AuthUser = require('./composables/useWeb3AuthUser.js');
|
|
19
6
|
var Web3AuthProvider = require('./Web3AuthProvider.js');
|
|
20
7
|
|
|
21
8
|
|
|
22
9
|
|
|
23
|
-
exports
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
exports
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
exports
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
10
|
+
Object.defineProperty(exports, "useAuthTokenInfo", {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () { return vue.useAuthTokenInfo; }
|
|
13
|
+
});
|
|
14
|
+
Object.defineProperty(exports, "useChain", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () { return vue.useChain; }
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "useCheckout", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () { return vue.useCheckout; }
|
|
21
|
+
});
|
|
22
|
+
Object.defineProperty(exports, "useEnableMFA", {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
get: function () { return vue.useEnableMFA; }
|
|
25
|
+
});
|
|
26
|
+
Object.defineProperty(exports, "useFunding", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
get: function () { return vue.useFunding; }
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "useManageMFA", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () { return vue.useManageMFA; }
|
|
33
|
+
});
|
|
34
|
+
Object.defineProperty(exports, "useReceive", {
|
|
35
|
+
enumerable: true,
|
|
36
|
+
get: function () { return vue.useReceive; }
|
|
37
|
+
});
|
|
38
|
+
Object.defineProperty(exports, "useSwap", {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function () { return vue.useSwap; }
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports, "useSwitchChain", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () { return vue.useSwitchChain; }
|
|
45
|
+
});
|
|
46
|
+
Object.defineProperty(exports, "useWalletConnectScanner", {
|
|
47
|
+
enumerable: true,
|
|
48
|
+
get: function () { return vue.useWalletConnectScanner; }
|
|
49
|
+
});
|
|
50
|
+
Object.defineProperty(exports, "useWalletServicesPlugin", {
|
|
51
|
+
enumerable: true,
|
|
52
|
+
get: function () { return vue.useWalletServicesPlugin; }
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(exports, "useWalletUI", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () { return vue.useWalletUI; }
|
|
57
|
+
});
|
|
58
|
+
Object.defineProperty(exports, "useWallets", {
|
|
59
|
+
enumerable: true,
|
|
60
|
+
get: function () { return vue.useWallets; }
|
|
61
|
+
});
|
|
62
|
+
Object.defineProperty(exports, "useWeb3AuthDisconnect", {
|
|
63
|
+
enumerable: true,
|
|
64
|
+
get: function () { return vue.useWeb3AuthDisconnect; }
|
|
65
|
+
});
|
|
66
|
+
Object.defineProperty(exports, "useWeb3AuthUser", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function () { return vue.useWeb3AuthUser; }
|
|
69
|
+
});
|
|
35
70
|
exports.useWeb3Auth = useWeb3Auth.useWeb3Auth;
|
|
36
71
|
exports.useWeb3AuthConnect = useWeb3AuthConnect.useWeb3AuthConnect;
|
|
37
|
-
exports.useWeb3AuthDisconnect = useWeb3AuthDisconnect.useWeb3AuthDisconnect;
|
|
38
|
-
exports.useWeb3AuthUser = useWeb3AuthUser.useWeb3AuthUser;
|
|
39
72
|
exports.Web3AuthProvider = Web3AuthProvider.Web3AuthProvider;
|
|
@@ -1,13 +1,34 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var useSignMessage = require('./composables/useSignMessage.js');
|
|
5
|
-
var useSignTransaction = require('./composables/useSignTransaction.js');
|
|
6
|
-
var useSolanaWallet = require('./composables/useSolanaWallet.js');
|
|
3
|
+
var solana = require('@web3auth/no-modal/vue/solana');
|
|
7
4
|
|
|
8
5
|
|
|
9
6
|
|
|
10
|
-
exports
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
Object.defineProperty(exports, "SOLANA_CLIENT_KEY", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return solana.SOLANA_CLIENT_KEY; }
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(exports, "SolanaProvider", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return solana.SolanaProvider; }
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(exports, "useSignAndSendTransaction", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return solana.useSignAndSendTransaction; }
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports, "useSignMessage", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () { return solana.useSignMessage; }
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports, "useSignTransaction", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function () { return solana.useSignTransaction; }
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(exports, "useSolanaClient", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
get: function () { return solana.useSolanaClient; }
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(exports, "useSolanaWallet", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: function () { return solana.useSolanaWallet; }
|
|
34
|
+
});
|
|
@@ -2,15 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
|
|
4
4
|
var core = require('@wagmi/core');
|
|
5
|
-
var vue$
|
|
5
|
+
var vue$2 = require('@wagmi/vue');
|
|
6
6
|
var connectors = require('@wagmi/vue/connectors');
|
|
7
7
|
var auth = require('@web3auth/auth');
|
|
8
8
|
var noModal = require('@web3auth/no-modal');
|
|
9
9
|
var viem = require('viem');
|
|
10
10
|
var vue = require('vue');
|
|
11
|
-
require('@web3auth/no-modal/vue');
|
|
11
|
+
var vue$1 = require('@web3auth/no-modal/vue');
|
|
12
12
|
var useWeb3Auth = require('../composables/useWeb3Auth.js');
|
|
13
|
-
var useWeb3AuthDisconnect = require('../composables/useWeb3AuthDisconnect.js');
|
|
14
13
|
var constants = require('./constants.js');
|
|
15
14
|
|
|
16
15
|
const WEB3AUTH_CONNECTOR_ID = "web3auth";
|
|
@@ -76,16 +75,18 @@ const Web3AuthWagmiProvider = vue.defineComponent({
|
|
|
76
75
|
setup() {
|
|
77
76
|
const {
|
|
78
77
|
isConnected,
|
|
79
|
-
|
|
78
|
+
connection,
|
|
79
|
+
web3Auth
|
|
80
80
|
} = useWeb3Auth.useWeb3Auth();
|
|
81
81
|
const {
|
|
82
82
|
disconnect
|
|
83
|
-
} =
|
|
84
|
-
const wagmiConfig = vue$
|
|
83
|
+
} = vue$1.useWeb3AuthDisconnect();
|
|
84
|
+
const wagmiConfig = vue$2.useConfig();
|
|
85
85
|
const {
|
|
86
|
-
reconnect
|
|
87
|
-
} = vue$
|
|
88
|
-
vue
|
|
86
|
+
mutate: reconnect
|
|
87
|
+
} = vue$2.useReconnect();
|
|
88
|
+
const lastSyncedWeb3AuthConnection = vue.shallowRef(null);
|
|
89
|
+
vue$2.useConnectionEffect({
|
|
89
90
|
onDisconnect: async () => {
|
|
90
91
|
noModal.log.info("Disconnected from wagmi");
|
|
91
92
|
if (isConnected.value) await disconnect();
|
|
@@ -97,16 +98,29 @@ const Web3AuthWagmiProvider = vue.defineComponent({
|
|
|
97
98
|
}
|
|
98
99
|
}
|
|
99
100
|
});
|
|
100
|
-
vue.watch(isConnected, async
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
101
|
+
vue.watch([isConnected, connection], async () => {
|
|
102
|
+
var _newConnection$ethere, _web3Auth$value;
|
|
103
|
+
const newIsConnected = isConnected.value;
|
|
104
|
+
const newConnection = connection.value;
|
|
105
|
+
const newEth = (_newConnection$ethere = newConnection === null || newConnection === void 0 ? void 0 : newConnection.ethereumProvider) !== null && _newConnection$ethere !== void 0 ? _newConnection$ethere : null;
|
|
106
|
+
if (newIsConnected && newConnection && newEth && newConnection.connectorName === ((_web3Auth$value = web3Auth.value) === null || _web3Auth$value === void 0 ? void 0 : _web3Auth$value.primaryConnectorName)) {
|
|
107
|
+
// `ethereumProvider` is a stable proxy (`commonJRPCProvider`) across account switches,
|
|
108
|
+
// so key wagmi resyncs off the Web3Auth connection object instead of provider identity.
|
|
109
|
+
if (lastSyncedWeb3AuthConnection.value !== newConnection) {
|
|
110
|
+
if (getWeb3authConnector(wagmiConfig)) {
|
|
111
|
+
resetConnectorState(wagmiConfig);
|
|
112
|
+
}
|
|
113
|
+
lastSyncedWeb3AuthConnection.value = newConnection;
|
|
114
|
+
const connector = await setupConnector(newEth, wagmiConfig);
|
|
115
|
+
if (!connector) {
|
|
116
|
+
noModal.log.error("Failed to setup vue wagmi connector");
|
|
117
|
+
throw new Error("Failed to setup connector");
|
|
118
|
+
}
|
|
119
|
+
await connectWeb3AuthWithWagmi(connector, wagmiConfig);
|
|
120
|
+
reconnect();
|
|
106
121
|
}
|
|
107
|
-
await connectWeb3AuthWithWagmi(connector, wagmiConfig);
|
|
108
|
-
reconnect();
|
|
109
122
|
} else if (!newIsConnected) {
|
|
123
|
+
lastSyncedWeb3AuthConnection.value = null;
|
|
110
124
|
if (wagmiConfig.state.status === "connected") {
|
|
111
125
|
await disconnectWeb3AuthFromWagmi(wagmiConfig);
|
|
112
126
|
}
|
|
@@ -132,7 +146,7 @@ const Web3AuthWagmiInnerProvider = vue.defineComponent({
|
|
|
132
146
|
const {
|
|
133
147
|
config
|
|
134
148
|
} = props;
|
|
135
|
-
vue.provide(vue$
|
|
149
|
+
vue.provide(vue$2.configKey, config);
|
|
136
150
|
},
|
|
137
151
|
render() {
|
|
138
152
|
var _this$$slots$default2;
|
|
@@ -172,7 +186,7 @@ const WagmiProvider = vue.defineComponent({
|
|
|
172
186
|
return viem.fallback(transports);
|
|
173
187
|
};
|
|
174
188
|
const defineWagmiConfig = () => {
|
|
175
|
-
var _web3Auth$
|
|
189
|
+
var _web3Auth$value2;
|
|
176
190
|
const configParams = _objectSpread(_objectSpread({
|
|
177
191
|
ssr: true
|
|
178
192
|
}, config), {}, {
|
|
@@ -183,7 +197,7 @@ const WagmiProvider = vue.defineComponent({
|
|
|
183
197
|
client: undefined
|
|
184
198
|
});
|
|
185
199
|
const wagmiChains = [];
|
|
186
|
-
if (isInitialized.value && web3Auth !== null && web3Auth !== void 0 && (_web3Auth$
|
|
200
|
+
if (isInitialized.value && web3Auth !== null && web3Auth !== void 0 && (_web3Auth$value2 = web3Auth.value) !== null && _web3Auth$value2 !== void 0 && (_web3Auth$value2 = _web3Auth$value2.coreOptions) !== null && _web3Auth$value2 !== void 0 && _web3Auth$value2.chains) {
|
|
187
201
|
var _web3Auth$value$curre;
|
|
188
202
|
const defaultChainId = (_web3Auth$value$curre = web3Auth.value.currentChain) === null || _web3Auth$value$curre === void 0 ? void 0 : _web3Auth$value$curre.chainId;
|
|
189
203
|
const chains = web3Auth.value.coreOptions.chains.filter(chain => chain.chainNamespace === noModal.CHAIN_NAMESPACES.EIP155);
|
|
@@ -221,7 +235,7 @@ const WagmiProvider = vue.defineComponent({
|
|
|
221
235
|
});
|
|
222
236
|
configParams.chains = [wagmiChains[0], ...wagmiChains.slice(1)];
|
|
223
237
|
}
|
|
224
|
-
return vue$
|
|
238
|
+
return vue$2.createConfig(configParams);
|
|
225
239
|
};
|
|
226
240
|
const hydrateWagmiConfig = () => {
|
|
227
241
|
if (finalConfig.value) {
|
|
@@ -231,8 +245,8 @@ const WagmiProvider = vue.defineComponent({
|
|
|
231
245
|
}
|
|
232
246
|
};
|
|
233
247
|
vue.watch(isInitialized, (newIsInitialized, prevIsInitialized) => {
|
|
234
|
-
var _web3Auth$
|
|
235
|
-
(_web3Auth$
|
|
248
|
+
var _web3Auth$value3;
|
|
249
|
+
(_web3Auth$value3 = web3Auth.value) === null || _web3Auth$value3 === void 0 || _web3Auth$value3.setAnalyticsProperties({
|
|
236
250
|
wagmi_enabled: true
|
|
237
251
|
});
|
|
238
252
|
if (newIsInitialized && !prevIsInitialized) {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var x402 = require('@web3auth/no-modal/x402');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.keys(x402).forEach(function (k) {
|
|
8
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return x402[k]; }
|
|
11
|
+
});
|
|
12
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var react = require('@web3auth/no-modal/x402/react');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "createEvmX402Fetch", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return react.createEvmX402Fetch; }
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(exports, "createProviderBackedEvmSigner", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return react.createProviderBackedEvmSigner; }
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(exports, "createSolanaX402Fetch", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return react.createSolanaX402Fetch; }
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports, "getEvmAddress", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () { return react.getEvmAddress; }
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports, "useX402Fetch", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function () { return react.useX402Fetch; }
|
|
26
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('@web3auth/no-modal/x402/vue');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "createEvmX402Fetch", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return vue.createEvmX402Fetch; }
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(exports, "createSolanaX402Fetch", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return vue.createSolanaX402Fetch; }
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(exports, "useX402Fetch", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return vue.useX402Fetch; }
|
|
18
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@web3auth/no-modal/account-linking";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export type { CITADEL_NETWORK, CitadelLinkAccountPayload, IUseLinkAccount, IUseSwitchAccount, LinkAccountParams, LinkAccountResult, LinkedAccountInfo, UnlinkAccountPayload, UnlinkAccountResult, } from "@web3auth/no-modal/account-linking/react";
|
|
2
|
+
export { makeAccountLinkingRequest, makeAccountUnlinkingRequest, useLinkAccount, useSwitchAccount } from "@web3auth/no-modal/account-linking/react";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export type { CITADEL_NETWORK, CitadelLinkAccountPayload, IUseLinkAccount, IUseSwitchAccount, LinkAccountParams, LinkAccountResult, LinkedAccountInfo, UnlinkAccountPayload, UnlinkAccountResult, } from "@web3auth/no-modal/account-linking/vue";
|
|
2
|
+
export { makeAccountLinkingRequest, makeAccountUnlinkingRequest, useLinkAccount, useSwitchAccount } from "@web3auth/no-modal/account-linking/vue";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BaseConnectorConfig,
|
|
1
|
+
import type { BaseConnectorConfig, Connection, IWeb3Auth, LoginMethodConfig, WALLET_CONNECTOR_TYPE } from "@web3auth/no-modal";
|
|
2
2
|
export interface ModalConfig extends Omit<BaseConnectorConfig, "isInjected" | "chainNamespaces"> {
|
|
3
3
|
loginMethods?: LoginMethodConfig;
|
|
4
4
|
}
|
|
@@ -7,5 +7,5 @@ export interface ConnectorsModalConfig {
|
|
|
7
7
|
hideWalletDiscovery?: boolean;
|
|
8
8
|
}
|
|
9
9
|
export interface IWeb3AuthModal extends IWeb3Auth {
|
|
10
|
-
connect(): Promise<
|
|
10
|
+
connect(): Promise<Connection | null>;
|
|
11
11
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type Connection, type IConnector, type IWeb3AuthCoreOptions, IWeb3AuthState, type LinkAccountParams, type LinkAccountResult, type LinkedAccountInfo, LoginModeType, type ProjectConfig, type WALLET_CONNECTOR_TYPE, Web3AuthNoModal } from "@web3auth/no-modal";
|
|
2
2
|
import { type ConnectorsModalConfig, type IWeb3AuthModal } from "./interface";
|
|
3
|
-
import { LoginModal, type UIConfig } from "./ui";
|
|
3
|
+
import { ACCOUNT_LINKING_INTENT, type AccountLinkingState, LoginModal, type UIConfig } from "./ui";
|
|
4
4
|
export interface Web3AuthOptions extends IWeb3AuthCoreOptions {
|
|
5
5
|
/**
|
|
6
6
|
* Config for configuring modal ui display properties
|
|
@@ -13,13 +13,32 @@ export interface Web3AuthOptions extends IWeb3AuthCoreOptions {
|
|
|
13
13
|
}
|
|
14
14
|
export declare class Web3Auth extends Web3AuthNoModal implements IWeb3AuthModal {
|
|
15
15
|
loginModal: LoginModal;
|
|
16
|
+
loginMode: LoginModeType;
|
|
16
17
|
readonly options: Web3AuthOptions;
|
|
17
18
|
private modalConfig;
|
|
18
|
-
|
|
19
|
+
private removeAccountLinkingConnectorListeners;
|
|
20
|
+
private removeAccountLinkingResetOnCloseListener;
|
|
21
|
+
private accountLinkingPickerResolver;
|
|
22
|
+
private removeAccountLinkingPickerCloseListener;
|
|
23
|
+
constructor(options: Web3AuthOptions, initialState?: Partial<IWeb3AuthState>);
|
|
19
24
|
init(options?: {
|
|
20
25
|
signal?: AbortSignal;
|
|
21
26
|
}): Promise<void>;
|
|
22
|
-
connect(): Promise<
|
|
27
|
+
connect(): Promise<Connection | null>;
|
|
28
|
+
acceptConsent(): Promise<void>;
|
|
29
|
+
switchAccount(account: LinkedAccountInfo): Promise<void>;
|
|
30
|
+
linkAccount(params?: LinkAccountParams): Promise<LinkAccountResult>;
|
|
31
|
+
protected startAccountLinkingModalSession(params: {
|
|
32
|
+
connectorName: WALLET_CONNECTOR_TYPE | string;
|
|
33
|
+
transportConnectorName?: WALLET_CONNECTOR_TYPE | string;
|
|
34
|
+
chainId: string;
|
|
35
|
+
intent: (typeof ACCOUNT_LINKING_INTENT)[keyof typeof ACCOUNT_LINKING_INTENT];
|
|
36
|
+
}): void;
|
|
37
|
+
protected updateAccountLinkingModalSession(accountLinking: Partial<AccountLinkingState>): void;
|
|
38
|
+
protected resetAccountLinkingModalSession(): void;
|
|
39
|
+
protected formatAccountLinkingErrorMessage(error: unknown): string | undefined;
|
|
40
|
+
protected prepareAccountLinkingConnector(connectorName: WALLET_CONNECTOR_TYPE | string, chainId: string): Promise<IConnector<unknown>>;
|
|
41
|
+
protected prepareAccountSwitchConnector(connectorName: WALLET_CONNECTOR_TYPE | string, chainId: string, projectConfig?: ProjectConfig): Promise<IConnector<unknown>>;
|
|
23
42
|
protected initUIConfig(projectConfig: ProjectConfig): void;
|
|
24
43
|
protected getInitializationTrackData(): Record<string, unknown>;
|
|
25
44
|
private filterWalletRegistry;
|
|
@@ -34,6 +53,29 @@ export declare class Web3Auth extends Web3AuthNoModal implements IWeb3AuthModal
|
|
|
34
53
|
private onExternalWalletLogin;
|
|
35
54
|
private onModalVisibility;
|
|
36
55
|
private onMobileVerifyConnect;
|
|
56
|
+
private onAcceptConsent;
|
|
57
|
+
private onDeclineConsent;
|
|
37
58
|
private getChainNamespaces;
|
|
59
|
+
private switchToWalletConnectV2Account;
|
|
60
|
+
/**
|
|
61
|
+
* Runs a link/switch action for WalletConnect v2, racing connector.connect()
|
|
62
|
+
* against a modal-close promise to cancel and clean up the WC session if the
|
|
63
|
+
* user closes the modal during QR scanning.
|
|
64
|
+
* For synchronous connectors use {@link runNonWalletConnectAccountAction}.
|
|
65
|
+
*/
|
|
66
|
+
private runWalletConnectV2AccountAction;
|
|
67
|
+
private linkAccountWithChosenConnector;
|
|
68
|
+
private pickWalletForAccountLinking;
|
|
69
|
+
/**
|
|
70
|
+
* Runs a link/switch action for synchronous connectors (injected wallets, already-connected).
|
|
71
|
+
* Shows the connecting loader, forwards AUTHORIZING events to the modal, and
|
|
72
|
+
* resolves/rejects the loader on completion.
|
|
73
|
+
* For WalletConnect v2 use {@link runWalletConnectV2AccountAction}.
|
|
74
|
+
*/
|
|
75
|
+
private runNonWalletConnectAccountAction;
|
|
76
|
+
private subscribeToAccountLinkingConnectorEvents;
|
|
77
|
+
private clearAccountLinkingConnectorListeners;
|
|
78
|
+
private installAccountLinkingResetOnCloseListener;
|
|
79
|
+
private clearAccountLinkingResetOnCloseListener;
|
|
38
80
|
private getCombinedConnectionId;
|
|
39
81
|
}
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import { Context, PropsWithChildren } from "react";
|
|
2
|
-
import { IWalletServicesContext
|
|
1
|
+
import { type Context, PropsWithChildren } from "react";
|
|
2
|
+
import { type IWalletServicesContext } from "../interfaces";
|
|
3
|
+
type IWeb3AuthContextForWalletServices = {
|
|
4
|
+
getPlugin: (name: string) => unknown;
|
|
5
|
+
isInitialized: boolean;
|
|
6
|
+
isConnected: boolean;
|
|
7
|
+
};
|
|
8
|
+
type WalletServicesContextProviderProps<TWeb3AuthContext extends IWeb3AuthContextForWalletServices> = PropsWithChildren<{
|
|
9
|
+
context: Context<TWeb3AuthContext>;
|
|
10
|
+
}>;
|
|
3
11
|
export declare const WalletServicesContext: Context<IWalletServicesContext>;
|
|
4
|
-
export declare function WalletServicesContextProvider({ children, context }:
|
|
5
|
-
|
|
6
|
-
}>): import("react").FunctionComponentElement<import("react").ProviderProps<IWalletServicesContext>>;
|
|
12
|
+
export declare function WalletServicesContextProvider<TWeb3AuthContext extends IWeb3AuthContextForWalletServices>({ children, context, }: WalletServicesContextProviderProps<TWeb3AuthContext>): import("react").FunctionComponentElement<import("react").ProviderProps<IWalletServicesContext>>;
|
|
13
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { Web3AuthInnerContext as Web3AuthInnerContextNoModal } from "@web3auth/no-modal/react";
|
|
1
2
|
import { PropsWithChildren } from "react";
|
|
2
|
-
import {
|
|
3
|
-
export
|
|
4
|
-
export declare function Web3AuthInnerProvider(params: PropsWithChildren<Web3AuthProviderProps>): import("react").FunctionComponentElement<import("react").ProviderProps<IWeb3AuthInnerContext>>;
|
|
3
|
+
import { Web3AuthProviderProps } from "../interfaces";
|
|
4
|
+
export { Web3AuthInnerContextNoModal as Web3AuthInnerContext };
|
|
5
|
+
export declare function Web3AuthInnerProvider(params: PropsWithChildren<Web3AuthProviderProps>): import("react").FunctionComponentElement<import("react").ProviderProps<import("@web3auth/no-modal/react").IWeb3AuthInnerContext>>;
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./useCheckout";
|
|
3
|
-
export * from "./useEnableMFA";
|
|
4
|
-
export * from "./useFunding";
|
|
5
|
-
export * from "./useIdentityToken";
|
|
6
|
-
export * from "./useManageMFA";
|
|
7
|
-
export * from "./useReceive";
|
|
8
|
-
export * from "./useSwap";
|
|
9
|
-
export * from "./useSwitchChain";
|
|
10
|
-
export * from "./useWalletConnectScanner";
|
|
11
|
-
export * from "./useWalletServicesPlugin";
|
|
12
|
-
export * from "./useWalletUI";
|
|
1
|
+
export * from "./useWallets";
|
|
13
2
|
export * from "./useWeb3Auth";
|
|
14
3
|
export * from "./useWeb3AuthConnect";
|
|
15
|
-
export
|
|
16
|
-
export
|
|
4
|
+
export type { IUseAuthTokenInfo, IUseChain, IUseCheckout, IUseEnableMFA, IUseFunding, IUseManageMFA, IUseReceive, IUseSwap, IUseSwitchChain, IUseWalletConnectScanner, IUseWalletUI, IUseWeb3AuthDisconnect, IUseWeb3AuthUser, } from "@web3auth/no-modal/react";
|
|
5
|
+
export { useAuthTokenInfo } from "@web3auth/no-modal/react";
|
|
6
|
+
export { useChain } from "@web3auth/no-modal/react";
|
|
7
|
+
export { useCheckout } from "@web3auth/no-modal/react";
|
|
8
|
+
export { useEnableMFA } from "@web3auth/no-modal/react";
|
|
9
|
+
export { useFunding } from "@web3auth/no-modal/react";
|
|
10
|
+
export { useManageMFA } from "@web3auth/no-modal/react";
|
|
11
|
+
export { useReceive } from "@web3auth/no-modal/react";
|
|
12
|
+
export { useSwap } from "@web3auth/no-modal/react";
|
|
13
|
+
export { useSwitchChain } from "@web3auth/no-modal/react";
|
|
14
|
+
export { useWalletConnectScanner } from "@web3auth/no-modal/react";
|
|
15
|
+
export { useWalletServicesPlugin } from "@web3auth/no-modal/react";
|
|
16
|
+
export { useWalletUI } from "@web3auth/no-modal/react";
|
|
17
|
+
export { useWeb3AuthDisconnect } from "@web3auth/no-modal/react";
|
|
18
|
+
export { useWeb3AuthUser } from "@web3auth/no-modal/react";
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
import { IWeb3AuthInnerContext } from "../interfaces";
|
|
2
|
-
export
|
|
3
|
-
export declare const useWeb3Auth: () => IUseWeb3Auth;
|
|
2
|
+
export declare const useWeb3Auth: () => IWeb3AuthInnerContext;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Connection, LoginParamMap, WALLET_CONNECTOR_TYPE, Web3AuthError } from "@web3auth/no-modal";
|
|
2
2
|
export interface IUseWeb3AuthConnect {
|
|
3
3
|
isConnected: boolean;
|
|
4
4
|
loading: boolean;
|
|
5
5
|
error: Web3AuthError | null;
|
|
6
6
|
connectorName: WALLET_CONNECTOR_TYPE | null;
|
|
7
|
-
connect(): Promise<
|
|
8
|
-
connectTo<T extends WALLET_CONNECTOR_TYPE>(connector: T, params?: LoginParamMap[T]): Promise<
|
|
7
|
+
connect(): Promise<Connection | null>;
|
|
8
|
+
connectTo<T extends WALLET_CONNECTOR_TYPE>(connector: T, params?: LoginParamMap[T]): Promise<Connection | null>;
|
|
9
9
|
}
|
|
10
10
|
export declare const useWeb3AuthConnect: () => IUseWeb3AuthConnect;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IWeb3AuthState, WalletServicesPluginType } from "@web3auth/no-modal";
|
|
2
|
+
import type { IWeb3AuthInnerContext as INoModalWeb3AuthInnerContext } from "@web3auth/no-modal/react";
|
|
2
3
|
import type { Web3Auth, Web3AuthOptions } from "../modalManager";
|
|
3
4
|
export type Web3AuthContextConfig = {
|
|
4
5
|
web3AuthOptions: Web3AuthOptions;
|
|
@@ -7,7 +8,7 @@ export interface Web3AuthProviderProps {
|
|
|
7
8
|
config: Web3AuthContextConfig;
|
|
8
9
|
initialState?: IWeb3AuthState;
|
|
9
10
|
}
|
|
10
|
-
export interface IWeb3AuthInnerContext extends
|
|
11
|
+
export interface IWeb3AuthInnerContext extends Omit<INoModalWeb3AuthInnerContext, "web3Auth"> {
|
|
11
12
|
web3Auth: Web3Auth | null;
|
|
12
13
|
}
|
|
13
14
|
export interface IWalletServicesContext {
|