@b3dotfun/sdk 0.1.69 → 0.1.70-alpha.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/cjs/anyspend/constants/rpc.d.ts +1 -1
- package/dist/cjs/anyspend/constants/rpc.js +1 -1
- package/dist/cjs/anyspend/react/components/AnySpend.d.ts +2 -0
- package/dist/cjs/anyspend/react/components/AnySpend.js +12 -4
- package/dist/cjs/anyspend/react/components/AnySpendCollectorClubPurchase.d.ts +5 -1
- package/dist/cjs/anyspend/react/components/AnySpendCollectorClubPurchase.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendCustom.d.ts +2 -0
- package/dist/cjs/anyspend/react/components/AnySpendCustom.js +7 -3
- package/dist/cjs/anyspend/react/components/AnySpendDeposit.d.ts +3 -1
- package/dist/cjs/anyspend/react/components/AnySpendDeposit.js +3 -3
- package/dist/cjs/anyspend/react/components/AnySpendNFT.d.ts +3 -1
- package/dist/cjs/anyspend/react/components/AnySpendNFT.js +4 -4
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3.js +1 -1
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3ExactIn.js +1 -1
- package/dist/cjs/anyspend/react/components/AnySpendStakeUpside.d.ts +3 -1
- package/dist/cjs/anyspend/react/components/AnySpendStakeUpside.js +2 -2
- package/dist/cjs/anyspend/react/components/checkout/AnySpendCheckout.d.ts +3 -1
- package/dist/cjs/anyspend/react/components/checkout/AnySpendCheckout.js +15 -6
- package/dist/cjs/anyspend/react/components/checkout/CartItemRow.d.ts +2 -1
- package/dist/cjs/anyspend/react/components/checkout/CartSummary.d.ts +6 -4
- package/dist/cjs/anyspend/react/components/checkout/CartSummary.js +13 -11
- package/dist/cjs/anyspend/react/components/checkout/CheckoutCartPanel.d.ts +3 -1
- package/dist/cjs/anyspend/react/components/checkout/CheckoutCartPanel.js +5 -4
- package/dist/cjs/anyspend/react/components/checkout/CheckoutFormPanel.d.ts +3 -1
- package/dist/cjs/anyspend/react/components/checkout/CheckoutFormPanel.js +2 -2
- package/dist/cjs/anyspend/react/components/checkout/CheckoutPaymentPanel.js +2 -4
- package/dist/cjs/anyspend/react/components/checkout/CheckoutSuccess.d.ts +2 -1
- package/dist/cjs/anyspend/react/components/checkout/CheckoutSuccess.js +5 -3
- package/dist/cjs/anyspend/react/components/checkout/CryptoPayPanel.js +43 -23
- package/dist/cjs/anyspend/react/components/checkout/DiscountCodeInput.d.ts +3 -1
- package/dist/cjs/anyspend/react/components/checkout/DiscountCodeInput.js +3 -6
- package/dist/cjs/anyspend/react/components/checkout/FiatCheckoutPanel.js +1 -2
- package/dist/cjs/anyspend/react/components/checkout/KycGate.js +1 -2
- package/dist/cjs/anyspend/react/components/checkout/PriceSkeleton.d.ts +5 -0
- package/dist/cjs/anyspend/react/components/checkout/PriceSkeleton.js +9 -0
- package/dist/cjs/anyspend/react/components/checkout/ShippingSelector.d.ts +3 -1
- package/dist/cjs/anyspend/react/components/checkout/ShippingSelector.js +3 -2
- package/dist/cjs/anyspend/react/components/common/CryptoPaymentMethod.d.ts +8 -0
- package/dist/cjs/anyspend/react/components/common/CryptoPaymentMethod.js +10 -9
- package/dist/cjs/anyspend/react/components/common/InsufficientDepositPayment.js +2 -2
- package/dist/cjs/anyspend/react/components/common/OrderDetails.js +7 -2
- package/dist/cjs/anyspend/react/components/common/OrderDetailsCollapsible.js +2 -2
- package/dist/cjs/anyspend/react/components/common/OrderStatus.js +37 -6
- package/dist/cjs/anyspend/react/components/common/StepProgress.d.ts +2 -0
- package/dist/cjs/anyspend/react/components/common/StepProgress.js +7 -2
- package/dist/cjs/anyspend/react/components/common/TransferCryptoDetails.js +2 -2
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +4 -6
- package/dist/cjs/anyspend/react/hooks/useKycStatus.d.ts +3 -1
- package/dist/cjs/anyspend/react/hooks/useKycStatus.js +11 -7
- package/dist/cjs/anyspend/utils/chain.js +8 -7
- package/dist/cjs/app.shared.js +9 -7
- package/dist/cjs/global-account/better-auth-client.d.ts +1883 -0
- package/dist/cjs/global-account/better-auth-client.js +17 -0
- package/dist/cjs/global-account/bsmnt.d.ts +0 -1
- package/dist/cjs/global-account/bsmnt.js +0 -6
- package/dist/cjs/global-account/react/components/AvatarEditor/AvatarEditor.js +3 -1
- package/dist/cjs/global-account/react/components/B3DynamicModal.js +5 -2
- package/dist/cjs/global-account/react/components/B3Provider/AuthenticationProvider.d.ts +3 -1
- package/dist/cjs/global-account/react/components/B3Provider/AuthenticationProvider.js +2 -1
- package/dist/cjs/global-account/react/components/B3Provider/B3ConfigProvider.d.ts +8 -1
- package/dist/cjs/global-account/react/components/B3Provider/B3ConfigProvider.js +3 -1
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.d.ts +27 -2
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.js +11 -13
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.native.js +6 -8
- package/dist/cjs/global-account/react/components/B3Provider/BetterAuthClientProvider.d.ts +17 -0
- package/dist/cjs/global-account/react/components/B3Provider/BetterAuthClientProvider.js +31 -0
- package/dist/cjs/global-account/react/components/B3Provider/BetterAuthProvider.d.ts +16 -0
- package/dist/cjs/global-account/react/components/B3Provider/BetterAuthProvider.js +121 -0
- package/dist/cjs/global-account/react/components/B3Provider/LocalSDKProvider.d.ts +3 -1
- package/dist/cjs/global-account/react/components/B3Provider/LocalSDKProvider.js +3 -1
- package/dist/cjs/global-account/react/components/IPFSMediaRenderer/IPFSMediaRenderer.d.ts +3 -1
- package/dist/cjs/global-account/react/components/IPFSMediaRenderer/IPFSMediaRenderer.js +4 -2
- package/dist/cjs/global-account/react/components/LinkAccount/LinkedAccountItem.js +2 -1
- package/dist/cjs/global-account/react/components/ManageAccount/BottomNavigation.js +4 -2
- package/dist/cjs/global-account/react/components/ManageAccount/Header.js +36 -4
- package/dist/cjs/global-account/react/components/ManageAccount/HomeContent.js +4 -1
- package/dist/cjs/global-account/react/components/ManageAccount/ManageAccount.js +6 -0
- package/dist/cjs/global-account/react/components/ManageAccount/ProfileSection.js +17 -6
- package/dist/cjs/global-account/react/components/ManageAccount/SessionDurationContent.d.ts +5 -0
- package/dist/cjs/global-account/react/components/ManageAccount/SessionDurationContent.js +57 -0
- package/dist/cjs/global-account/react/components/ManageAccount/SettingsContent.js +14 -29
- package/dist/cjs/global-account/react/components/ManageAccount/SettingsProfileCard.js +27 -16
- package/dist/cjs/global-account/react/components/Send/Send.js +5 -2
- package/dist/cjs/global-account/react/components/SignInWithB3/BetterAuthResetPassword.d.ts +21 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/BetterAuthResetPassword.js +68 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/BetterAuthSignIn.d.ts +39 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/BetterAuthSignIn.js +173 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/BetterAuthVerifyEmail.d.ts +37 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/BetterAuthVerifyEmail.js +85 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/SignIn.js +14 -4
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Flow.d.ts +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +14 -5
- package/dist/cjs/global-account/react/components/SignInWithB3/components/AuthButton.js +10 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/components/PasswordInput.d.ts +10 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/components/PasswordInput.js +10 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStepBetterAuth.d.ts +8 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStepBetterAuth.js +141 -0
- package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStepCustom.js +96 -15
- package/dist/cjs/global-account/react/components/SignInWithB3/utils/signInUtils.d.ts +5 -3
- package/dist/cjs/global-account/react/components/SignInWithB3/utils/signInUtils.js +20 -3
- package/dist/cjs/global-account/react/components/SingleUserSearchSelector/SingleUserSearchSelector.js +2 -1
- package/dist/cjs/global-account/react/components/Toast/ToastContext.d.ts +3 -0
- package/dist/cjs/global-account/react/components/Toast/ToastContext.js +30 -7
- package/dist/cjs/global-account/react/components/UserAvatar/UserAvatar.d.ts +18 -0
- package/dist/cjs/global-account/react/components/UserAvatar/UserAvatar.js +27 -0
- package/dist/cjs/global-account/react/components/custom/Button.d.ts +1 -1
- package/dist/cjs/global-account/react/components/index.d.ts +6 -0
- package/dist/cjs/global-account/react/components/index.js +14 -3
- package/dist/cjs/global-account/react/components/ui/button.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/index.d.ts +1 -0
- package/dist/cjs/global-account/react/hooks/index.js +5 -2
- package/dist/cjs/global-account/react/hooks/useAuth.js +26 -15
- package/dist/cjs/global-account/react/hooks/useAuthentication.js +23 -12
- package/dist/cjs/global-account/react/hooks/useAutoSelectWallet.d.ts +6 -3
- package/dist/cjs/global-account/react/hooks/useAutoSelectWallet.js +31 -3
- package/dist/cjs/global-account/react/hooks/useBetterAuth.d.ts +973 -0
- package/dist/cjs/global-account/react/hooks/useBetterAuth.js +159 -0
- package/dist/cjs/global-account/react/hooks/useConnect.d.ts +2 -2
- package/dist/cjs/global-account/react/hooks/useFirstEOA.d.ts +8 -8
- package/dist/cjs/global-account/react/hooks/useTWAuth.js +0 -1
- package/dist/cjs/global-account/react/stores/useModalStore.d.ts +14 -1
- package/dist/cjs/global-account/react/utils/createWagmiConfig.d.ts +4 -31
- package/dist/cjs/global-account/react/utils/createWagmiConfig.js +5 -24
- package/dist/cjs/global-account/react/utils/index.d.ts +0 -1
- package/dist/cjs/global-account/react/utils/index.js +0 -1
- package/dist/cjs/global-account/react/utils/profileDisplay.js +17 -18
- package/dist/cjs/shared/constants/chains/b3Chain.d.ts +7 -7
- package/dist/cjs/shared/constants/chains/b3Chain.js +4 -4
- package/dist/cjs/shared/constants/chains/b3Viem.d.ts +6 -0
- package/dist/cjs/shared/constants/chains/b3Viem.js +19 -0
- package/dist/cjs/shared/constants/chains/supported.d.ts +1 -1
- package/dist/cjs/shared/constants/index.d.ts +1 -0
- package/dist/cjs/shared/constants/index.js +2 -1
- package/dist/cjs/shared/generated/chain-networks.json +2 -2
- package/dist/cjs/shared/utils/chains.d.ts +1 -1
- package/dist/cjs/shared/utils/chains.js +2 -2
- package/dist/cjs/shared/utils/session-duration.d.ts +15 -0
- package/dist/cjs/shared/utils/session-duration.js +69 -0
- package/dist/cjs/wallet/react/components/ConnectWallet.d.ts +11 -0
- package/dist/cjs/wallet/react/components/ConnectWallet.js +467 -0
- package/dist/cjs/wallet/react/components/WalletProvider.d.ts +35 -0
- package/dist/cjs/wallet/react/components/WalletProvider.js +20 -0
- package/dist/cjs/wallet/react/hooks/useWalletDisconnect.d.ts +13 -0
- package/dist/cjs/wallet/react/hooks/useWalletDisconnect.js +22 -0
- package/dist/cjs/wallet/react/hooks/useWalletState.d.ts +31 -0
- package/dist/cjs/wallet/react/hooks/useWalletState.js +63 -0
- package/dist/cjs/wallet/react/index.d.ts +5 -0
- package/dist/cjs/wallet/react/index.js +16 -0
- package/dist/cjs/wallet/utils/createWalletConfig.d.ts +21 -0
- package/dist/cjs/wallet/utils/createWalletConfig.js +24 -0
- package/dist/esm/anyspend/constants/rpc.d.ts +1 -1
- package/dist/esm/anyspend/constants/rpc.js +1 -1
- package/dist/esm/anyspend/react/components/AnySpend.d.ts +2 -0
- package/dist/esm/anyspend/react/components/AnySpend.js +12 -4
- package/dist/esm/anyspend/react/components/AnySpendCollectorClubPurchase.d.ts +5 -1
- package/dist/esm/anyspend/react/components/AnySpendCollectorClubPurchase.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpendCustom.d.ts +2 -0
- package/dist/esm/anyspend/react/components/AnySpendCustom.js +7 -3
- package/dist/esm/anyspend/react/components/AnySpendDeposit.d.ts +3 -1
- package/dist/esm/anyspend/react/components/AnySpendDeposit.js +3 -3
- package/dist/esm/anyspend/react/components/AnySpendNFT.d.ts +3 -1
- package/dist/esm/anyspend/react/components/AnySpendNFT.js +4 -4
- package/dist/esm/anyspend/react/components/AnySpendStakeB3.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpendStakeB3ExactIn.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpendStakeUpside.d.ts +3 -1
- package/dist/esm/anyspend/react/components/AnySpendStakeUpside.js +2 -2
- package/dist/esm/anyspend/react/components/checkout/AnySpendCheckout.d.ts +3 -1
- package/dist/esm/anyspend/react/components/checkout/AnySpendCheckout.js +15 -6
- package/dist/esm/anyspend/react/components/checkout/CartItemRow.d.ts +2 -1
- package/dist/esm/anyspend/react/components/checkout/CartSummary.d.ts +6 -4
- package/dist/esm/anyspend/react/components/checkout/CartSummary.js +13 -11
- package/dist/esm/anyspend/react/components/checkout/CheckoutCartPanel.d.ts +3 -1
- package/dist/esm/anyspend/react/components/checkout/CheckoutCartPanel.js +5 -4
- package/dist/esm/anyspend/react/components/checkout/CheckoutFormPanel.d.ts +3 -1
- package/dist/esm/anyspend/react/components/checkout/CheckoutFormPanel.js +2 -2
- package/dist/esm/anyspend/react/components/checkout/CheckoutPaymentPanel.js +2 -4
- package/dist/esm/anyspend/react/components/checkout/CheckoutSuccess.d.ts +2 -1
- package/dist/esm/anyspend/react/components/checkout/CheckoutSuccess.js +5 -3
- package/dist/esm/anyspend/react/components/checkout/CryptoPayPanel.js +44 -24
- package/dist/esm/anyspend/react/components/checkout/DiscountCodeInput.d.ts +3 -1
- package/dist/esm/anyspend/react/components/checkout/DiscountCodeInput.js +3 -6
- package/dist/esm/anyspend/react/components/checkout/FiatCheckoutPanel.js +2 -3
- package/dist/esm/anyspend/react/components/checkout/KycGate.js +2 -3
- package/dist/esm/anyspend/react/components/checkout/PriceSkeleton.d.ts +5 -0
- package/dist/esm/anyspend/react/components/checkout/PriceSkeleton.js +6 -0
- package/dist/esm/anyspend/react/components/checkout/ShippingSelector.d.ts +3 -1
- package/dist/esm/anyspend/react/components/checkout/ShippingSelector.js +3 -2
- package/dist/esm/anyspend/react/components/common/CryptoPaymentMethod.d.ts +8 -0
- package/dist/esm/anyspend/react/components/common/CryptoPaymentMethod.js +9 -8
- package/dist/esm/anyspend/react/components/common/InsufficientDepositPayment.js +2 -2
- package/dist/esm/anyspend/react/components/common/OrderDetails.js +8 -3
- package/dist/esm/anyspend/react/components/common/OrderDetailsCollapsible.js +2 -2
- package/dist/esm/anyspend/react/components/common/OrderStatus.js +34 -3
- package/dist/esm/anyspend/react/components/common/StepProgress.d.ts +2 -0
- package/dist/esm/anyspend/react/components/common/StepProgress.js +4 -2
- package/dist/esm/anyspend/react/components/common/TransferCryptoDetails.js +2 -2
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +5 -7
- package/dist/esm/anyspend/react/hooks/useKycStatus.d.ts +3 -1
- package/dist/esm/anyspend/react/hooks/useKycStatus.js +9 -5
- package/dist/esm/anyspend/utils/chain.js +10 -9
- package/dist/esm/app.shared.js +9 -7
- package/dist/esm/global-account/better-auth-client.d.ts +1883 -0
- package/dist/esm/global-account/better-auth-client.js +13 -0
- package/dist/esm/global-account/bsmnt.d.ts +0 -1
- package/dist/esm/global-account/bsmnt.js +0 -5
- package/dist/esm/global-account/react/components/AvatarEditor/AvatarEditor.js +3 -1
- package/dist/esm/global-account/react/components/B3DynamicModal.js +5 -2
- package/dist/esm/global-account/react/components/B3Provider/AuthenticationProvider.d.ts +3 -1
- package/dist/esm/global-account/react/components/B3Provider/AuthenticationProvider.js +2 -1
- package/dist/esm/global-account/react/components/B3Provider/B3ConfigProvider.d.ts +8 -1
- package/dist/esm/global-account/react/components/B3Provider/B3ConfigProvider.js +3 -1
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.d.ts +27 -2
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.js +6 -8
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.native.js +4 -6
- package/dist/esm/global-account/react/components/B3Provider/BetterAuthClientProvider.d.ts +17 -0
- package/dist/esm/global-account/react/components/B3Provider/BetterAuthClientProvider.js +27 -0
- package/dist/esm/global-account/react/components/B3Provider/BetterAuthProvider.d.ts +16 -0
- package/dist/esm/global-account/react/components/B3Provider/BetterAuthProvider.js +116 -0
- package/dist/esm/global-account/react/components/B3Provider/LocalSDKProvider.d.ts +3 -1
- package/dist/esm/global-account/react/components/B3Provider/LocalSDKProvider.js +3 -1
- package/dist/esm/global-account/react/components/IPFSMediaRenderer/IPFSMediaRenderer.d.ts +3 -1
- package/dist/esm/global-account/react/components/IPFSMediaRenderer/IPFSMediaRenderer.js +4 -2
- package/dist/esm/global-account/react/components/LinkAccount/LinkedAccountItem.js +2 -1
- package/dist/esm/global-account/react/components/ManageAccount/BottomNavigation.js +5 -3
- package/dist/esm/global-account/react/components/ManageAccount/Header.js +37 -5
- package/dist/esm/global-account/react/components/ManageAccount/HomeContent.js +4 -1
- package/dist/esm/global-account/react/components/ManageAccount/ManageAccount.js +7 -1
- package/dist/esm/global-account/react/components/ManageAccount/ProfileSection.js +16 -8
- package/dist/esm/global-account/react/components/ManageAccount/SessionDurationContent.d.ts +5 -0
- package/dist/esm/global-account/react/components/ManageAccount/SessionDurationContent.js +52 -0
- package/dist/esm/global-account/react/components/ManageAccount/SettingsContent.js +16 -31
- package/dist/esm/global-account/react/components/ManageAccount/SettingsProfileCard.js +27 -16
- package/dist/esm/global-account/react/components/Send/Send.js +5 -2
- package/dist/esm/global-account/react/components/SignInWithB3/BetterAuthResetPassword.d.ts +21 -0
- package/dist/esm/global-account/react/components/SignInWithB3/BetterAuthResetPassword.js +65 -0
- package/dist/esm/global-account/react/components/SignInWithB3/BetterAuthSignIn.d.ts +39 -0
- package/dist/esm/global-account/react/components/SignInWithB3/BetterAuthSignIn.js +170 -0
- package/dist/esm/global-account/react/components/SignInWithB3/BetterAuthVerifyEmail.d.ts +37 -0
- package/dist/esm/global-account/react/components/SignInWithB3/BetterAuthVerifyEmail.js +82 -0
- package/dist/esm/global-account/react/components/SignInWithB3/SignIn.js +15 -5
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Flow.d.ts +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +14 -5
- package/dist/esm/global-account/react/components/SignInWithB3/components/AuthButton.js +11 -2
- package/dist/esm/global-account/react/components/SignInWithB3/components/PasswordInput.d.ts +10 -0
- package/dist/esm/global-account/react/components/SignInWithB3/components/PasswordInput.js +7 -0
- package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStepBetterAuth.d.ts +8 -0
- package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStepBetterAuth.js +138 -0
- package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStepCustom.js +100 -19
- package/dist/esm/global-account/react/components/SignInWithB3/utils/signInUtils.d.ts +5 -3
- package/dist/esm/global-account/react/components/SignInWithB3/utils/signInUtils.js +19 -2
- package/dist/esm/global-account/react/components/SingleUserSearchSelector/SingleUserSearchSelector.js +2 -1
- package/dist/esm/global-account/react/components/Toast/ToastContext.d.ts +3 -0
- package/dist/esm/global-account/react/components/Toast/ToastContext.js +30 -7
- package/dist/esm/global-account/react/components/UserAvatar/UserAvatar.d.ts +18 -0
- package/dist/esm/global-account/react/components/UserAvatar/UserAvatar.js +21 -0
- package/dist/esm/global-account/react/components/custom/Button.d.ts +1 -1
- package/dist/esm/global-account/react/components/index.d.ts +6 -0
- package/dist/esm/global-account/react/components/index.js +6 -0
- package/dist/esm/global-account/react/components/ui/button.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/index.d.ts +1 -0
- package/dist/esm/global-account/react/hooks/index.js +1 -0
- package/dist/esm/global-account/react/hooks/useAuth.js +28 -17
- package/dist/esm/global-account/react/hooks/useAuthentication.js +24 -13
- package/dist/esm/global-account/react/hooks/useAutoSelectWallet.d.ts +6 -3
- package/dist/esm/global-account/react/hooks/useAutoSelectWallet.js +33 -5
- package/dist/esm/global-account/react/hooks/useBetterAuth.d.ts +973 -0
- package/dist/esm/global-account/react/hooks/useBetterAuth.js +151 -0
- package/dist/esm/global-account/react/hooks/useConnect.d.ts +2 -2
- package/dist/esm/global-account/react/hooks/useFirstEOA.d.ts +8 -8
- package/dist/esm/global-account/react/hooks/useTWAuth.js +0 -1
- package/dist/esm/global-account/react/stores/useModalStore.d.ts +14 -1
- package/dist/esm/global-account/react/utils/createWagmiConfig.d.ts +4 -31
- package/dist/esm/global-account/react/utils/createWagmiConfig.js +5 -23
- package/dist/esm/global-account/react/utils/index.d.ts +0 -1
- package/dist/esm/global-account/react/utils/index.js +0 -1
- package/dist/esm/global-account/react/utils/profileDisplay.js +17 -18
- package/dist/esm/shared/constants/chains/b3Chain.d.ts +7 -7
- package/dist/esm/shared/constants/chains/b3Chain.js +4 -4
- package/dist/esm/shared/constants/chains/b3Viem.d.ts +6 -0
- package/dist/esm/shared/constants/chains/b3Viem.js +16 -0
- package/dist/esm/shared/constants/chains/supported.d.ts +1 -1
- package/dist/esm/shared/constants/index.d.ts +1 -0
- package/dist/esm/shared/constants/index.js +1 -0
- package/dist/esm/shared/generated/chain-networks.json +2 -2
- package/dist/esm/shared/utils/chains.d.ts +1 -1
- package/dist/esm/shared/utils/chains.js +2 -2
- package/dist/esm/shared/utils/session-duration.d.ts +15 -0
- package/dist/esm/shared/utils/session-duration.js +64 -0
- package/dist/esm/wallet/react/components/ConnectWallet.d.ts +11 -0
- package/dist/esm/wallet/react/components/ConnectWallet.js +431 -0
- package/dist/esm/wallet/react/components/WalletProvider.d.ts +35 -0
- package/dist/esm/wallet/react/components/WalletProvider.js +17 -0
- package/dist/esm/wallet/react/hooks/useWalletDisconnect.d.ts +13 -0
- package/dist/esm/wallet/react/hooks/useWalletDisconnect.js +19 -0
- package/dist/esm/wallet/react/hooks/useWalletState.d.ts +31 -0
- package/dist/esm/wallet/react/hooks/useWalletState.js +60 -0
- package/dist/esm/wallet/react/index.d.ts +5 -0
- package/dist/esm/wallet/react/index.js +8 -0
- package/dist/esm/wallet/utils/createWalletConfig.d.ts +21 -0
- package/dist/esm/wallet/utils/createWalletConfig.js +21 -0
- package/dist/styles/index.css +1 -1
- package/dist/types/anyspend/constants/rpc.d.ts +1 -1
- package/dist/types/anyspend/react/components/AnySpend.d.ts +2 -0
- package/dist/types/anyspend/react/components/AnySpendCollectorClubPurchase.d.ts +5 -1
- package/dist/types/anyspend/react/components/AnySpendCustom.d.ts +2 -0
- package/dist/types/anyspend/react/components/AnySpendDeposit.d.ts +3 -1
- package/dist/types/anyspend/react/components/AnySpendNFT.d.ts +3 -1
- package/dist/types/anyspend/react/components/AnySpendStakeUpside.d.ts +3 -1
- package/dist/types/anyspend/react/components/checkout/AnySpendCheckout.d.ts +3 -1
- package/dist/types/anyspend/react/components/checkout/CartItemRow.d.ts +2 -1
- package/dist/types/anyspend/react/components/checkout/CartSummary.d.ts +6 -4
- package/dist/types/anyspend/react/components/checkout/CheckoutCartPanel.d.ts +3 -1
- package/dist/types/anyspend/react/components/checkout/CheckoutFormPanel.d.ts +3 -1
- package/dist/types/anyspend/react/components/checkout/CheckoutSuccess.d.ts +2 -1
- package/dist/types/anyspend/react/components/checkout/DiscountCodeInput.d.ts +3 -1
- package/dist/types/anyspend/react/components/checkout/PriceSkeleton.d.ts +5 -0
- package/dist/types/anyspend/react/components/checkout/ShippingSelector.d.ts +3 -1
- package/dist/types/anyspend/react/components/common/CryptoPaymentMethod.d.ts +8 -0
- package/dist/types/anyspend/react/components/common/StepProgress.d.ts +2 -0
- package/dist/types/anyspend/react/hooks/useKycStatus.d.ts +3 -1
- package/dist/types/global-account/better-auth-client.d.ts +1883 -0
- package/dist/types/global-account/bsmnt.d.ts +0 -1
- package/dist/types/global-account/react/components/B3Provider/AuthenticationProvider.d.ts +3 -1
- package/dist/types/global-account/react/components/B3Provider/B3ConfigProvider.d.ts +8 -1
- package/dist/types/global-account/react/components/B3Provider/B3Provider.d.ts +27 -2
- package/dist/types/global-account/react/components/B3Provider/BetterAuthClientProvider.d.ts +17 -0
- package/dist/types/global-account/react/components/B3Provider/BetterAuthProvider.d.ts +16 -0
- package/dist/types/global-account/react/components/B3Provider/LocalSDKProvider.d.ts +3 -1
- package/dist/types/global-account/react/components/IPFSMediaRenderer/IPFSMediaRenderer.d.ts +3 -1
- package/dist/types/global-account/react/components/ManageAccount/SessionDurationContent.d.ts +5 -0
- package/dist/types/global-account/react/components/SignInWithB3/BetterAuthResetPassword.d.ts +21 -0
- package/dist/types/global-account/react/components/SignInWithB3/BetterAuthSignIn.d.ts +39 -0
- package/dist/types/global-account/react/components/SignInWithB3/BetterAuthVerifyEmail.d.ts +37 -0
- package/dist/types/global-account/react/components/SignInWithB3/SignInWithB3Flow.d.ts +1 -1
- package/dist/types/global-account/react/components/SignInWithB3/components/PasswordInput.d.ts +10 -0
- package/dist/types/global-account/react/components/SignInWithB3/steps/LoginStepBetterAuth.d.ts +8 -0
- package/dist/types/global-account/react/components/SignInWithB3/utils/signInUtils.d.ts +5 -3
- package/dist/types/global-account/react/components/Toast/ToastContext.d.ts +3 -0
- package/dist/types/global-account/react/components/UserAvatar/UserAvatar.d.ts +18 -0
- package/dist/types/global-account/react/components/custom/Button.d.ts +1 -1
- package/dist/types/global-account/react/components/index.d.ts +6 -0
- package/dist/types/global-account/react/components/ui/button.d.ts +1 -1
- package/dist/types/global-account/react/hooks/index.d.ts +1 -0
- package/dist/types/global-account/react/hooks/useAutoSelectWallet.d.ts +6 -3
- package/dist/types/global-account/react/hooks/useBetterAuth.d.ts +973 -0
- package/dist/types/global-account/react/hooks/useConnect.d.ts +2 -2
- package/dist/types/global-account/react/hooks/useFirstEOA.d.ts +8 -8
- package/dist/types/global-account/react/stores/useModalStore.d.ts +14 -1
- package/dist/types/global-account/react/utils/createWagmiConfig.d.ts +4 -31
- package/dist/types/global-account/react/utils/index.d.ts +0 -1
- package/dist/types/shared/constants/chains/b3Chain.d.ts +7 -7
- package/dist/types/shared/constants/chains/b3Viem.d.ts +6 -0
- package/dist/types/shared/constants/chains/supported.d.ts +1 -1
- package/dist/types/shared/constants/index.d.ts +1 -0
- package/dist/types/shared/utils/chains.d.ts +1 -1
- package/dist/types/shared/utils/session-duration.d.ts +15 -0
- package/dist/types/wallet/react/components/ConnectWallet.d.ts +11 -0
- package/dist/types/wallet/react/components/WalletProvider.d.ts +35 -0
- package/dist/types/wallet/react/hooks/useWalletDisconnect.d.ts +13 -0
- package/dist/types/wallet/react/hooks/useWalletState.d.ts +31 -0
- package/dist/types/wallet/react/index.d.ts +5 -0
- package/dist/types/wallet/utils/createWalletConfig.d.ts +21 -0
- package/package.json +15 -6
- package/src/anyspend/constants/rpc.ts +2 -1
- package/src/anyspend/react/components/AnySpend.tsx +24 -12
- package/src/anyspend/react/components/AnySpendCollectorClubPurchase.tsx +6 -0
- package/src/anyspend/react/components/AnySpendCustom.tsx +12 -2
- package/src/anyspend/react/components/AnySpendDeposit.tsx +38 -31
- package/src/anyspend/react/components/AnySpendNFT.tsx +6 -2
- package/src/anyspend/react/components/AnySpendStakeB3.tsx +2 -2
- package/src/anyspend/react/components/AnySpendStakeB3ExactIn.tsx +2 -2
- package/src/anyspend/react/components/AnySpendStakeUpside.tsx +4 -0
- package/src/anyspend/react/components/checkout/AnySpendCheckout.tsx +25 -5
- package/src/anyspend/react/components/checkout/CartItemRow.tsx +2 -1
- package/src/anyspend/react/components/checkout/CartSummary.tsx +24 -20
- package/src/anyspend/react/components/checkout/CheckoutCartPanel.tsx +12 -3
- package/src/anyspend/react/components/checkout/CheckoutFormPanel.tsx +5 -0
- package/src/anyspend/react/components/checkout/CheckoutPaymentPanel.tsx +2 -4
- package/src/anyspend/react/components/checkout/CheckoutSuccess.tsx +13 -3
- package/src/anyspend/react/components/checkout/CryptoPayPanel.tsx +45 -27
- package/src/anyspend/react/components/checkout/DiscountCodeInput.tsx +15 -5
- package/src/anyspend/react/components/checkout/FiatCheckoutPanel.tsx +9 -3
- package/src/anyspend/react/components/checkout/KycGate.tsx +8 -3
- package/src/anyspend/react/components/checkout/PriceSkeleton.tsx +19 -0
- package/src/anyspend/react/components/checkout/ShippingSelector.tsx +5 -1
- package/src/anyspend/react/components/common/CryptoPaymentMethod.tsx +10 -8
- package/src/anyspend/react/components/common/InsufficientDepositPayment.tsx +2 -2
- package/src/anyspend/react/components/common/OrderDetails.tsx +10 -2
- package/src/anyspend/react/components/common/OrderDetailsCollapsible.tsx +4 -4
- package/src/anyspend/react/components/common/OrderStatus.tsx +38 -3
- package/src/anyspend/react/components/common/StepProgress.tsx +15 -5
- package/src/anyspend/react/components/common/TransferCryptoDetails.tsx +2 -2
- package/src/anyspend/react/hooks/useAnyspendCreateOnrampOrder.ts +5 -7
- package/src/anyspend/react/hooks/useKycStatus.ts +8 -5
- package/src/anyspend/utils/chain.ts +9 -9
- package/src/app.shared.ts +9 -8
- package/src/global-account/better-auth-client.ts +17 -0
- package/src/global-account/bsmnt.ts +0 -6
- package/src/global-account/react/components/AvatarEditor/AvatarEditor.tsx +3 -1
- package/src/global-account/react/components/B3DynamicModal.tsx +5 -2
- package/src/global-account/react/components/B3Provider/AuthenticationProvider.tsx +4 -0
- package/src/global-account/react/components/B3Provider/B3ConfigProvider.tsx +12 -0
- package/src/global-account/react/components/B3Provider/B3Provider.native.tsx +16 -21
- package/src/global-account/react/components/B3Provider/B3Provider.tsx +78 -38
- package/src/global-account/react/components/B3Provider/BetterAuthClientProvider.tsx +40 -0
- package/src/global-account/react/components/B3Provider/BetterAuthProvider.tsx +128 -0
- package/src/global-account/react/components/B3Provider/LocalSDKProvider.tsx +5 -0
- package/src/global-account/react/components/IPFSMediaRenderer/IPFSMediaRenderer.tsx +17 -10
- package/src/global-account/react/components/LinkAccount/LinkedAccountItem.tsx +2 -1
- package/src/global-account/react/components/ManageAccount/BottomNavigation.tsx +18 -14
- package/src/global-account/react/components/ManageAccount/Header.tsx +71 -4
- package/src/global-account/react/components/ManageAccount/HomeContent.tsx +25 -19
- package/src/global-account/react/components/ManageAccount/ManageAccount.tsx +13 -0
- package/src/global-account/react/components/ManageAccount/ProfileSection.tsx +40 -15
- package/src/global-account/react/components/ManageAccount/SessionDurationContent.tsx +107 -0
- package/src/global-account/react/components/ManageAccount/SettingsContent.tsx +35 -54
- package/src/global-account/react/components/ManageAccount/SettingsProfileCard.tsx +31 -22
- package/src/global-account/react/components/Send/Send.tsx +8 -5
- package/src/global-account/react/components/SignInWithB3/BetterAuthResetPassword.tsx +145 -0
- package/src/global-account/react/components/SignInWithB3/BetterAuthSignIn.tsx +446 -0
- package/src/global-account/react/components/SignInWithB3/BetterAuthVerifyEmail.tsx +155 -0
- package/src/global-account/react/components/SignInWithB3/SignIn.tsx +42 -13
- package/src/global-account/react/components/SignInWithB3/SignInWithB3Flow.tsx +20 -4
- package/src/global-account/react/components/SignInWithB3/components/AuthButton.tsx +21 -2
- package/src/global-account/react/components/SignInWithB3/components/PasswordInput.tsx +62 -0
- package/src/global-account/react/components/SignInWithB3/steps/LoginStepBetterAuth.tsx +315 -0
- package/src/global-account/react/components/SignInWithB3/steps/LoginStepCustom.tsx +207 -54
- package/src/global-account/react/components/SignInWithB3/utils/signInUtils.ts +24 -4
- package/src/global-account/react/components/SingleUserSearchSelector/SingleUserSearchSelector.tsx +2 -1
- package/src/global-account/react/components/Toast/ToastContext.tsx +39 -7
- package/src/global-account/react/components/UserAvatar/UserAvatar.tsx +45 -0
- package/src/global-account/react/components/index.ts +12 -0
- package/src/global-account/react/hooks/index.ts +1 -0
- package/src/global-account/react/hooks/useAuth.ts +28 -17
- package/src/global-account/react/hooks/useAuthentication.ts +24 -13
- package/src/global-account/react/hooks/useAutoSelectWallet.ts +40 -6
- package/src/global-account/react/hooks/useBetterAuth.ts +193 -0
- package/src/global-account/react/hooks/useConnect.tsx +2 -2
- package/src/global-account/react/hooks/useTWAuth.tsx +0 -1
- package/src/global-account/react/stores/useModalStore.ts +15 -0
- package/src/global-account/react/utils/createWagmiConfig.tsx +6 -25
- package/src/global-account/react/utils/index.ts +0 -1
- package/src/global-account/react/utils/profileDisplay.ts +21 -19
- package/src/shared/constants/chains/b3Chain.ts +5 -5
- package/src/shared/constants/chains/b3Viem.ts +18 -0
- package/src/shared/constants/index.ts +2 -0
- package/src/shared/generated/chain-networks.json +2 -2
- package/src/shared/utils/chains.ts +3 -2
- package/src/shared/utils/session-duration.ts +64 -0
- package/src/types/torph.d.ts +4 -0
- package/src/wallet/__tests__/createWalletConfig.test.ts +39 -0
- package/src/wallet/react/components/ConnectWallet.tsx +665 -0
- package/src/wallet/react/components/WalletProvider.tsx +64 -0
- package/src/wallet/react/hooks/useWalletDisconnect.ts +22 -0
- package/src/wallet/react/hooks/useWalletState.ts +93 -0
- package/src/wallet/react/index.ts +10 -0
- package/src/wallet/utils/createWalletConfig.ts +39 -0
- package/dist/cjs/global-account/react/components/AvatarCreator/AvatarCreator.d.ts +0 -6
- package/dist/cjs/global-account/react/components/AvatarCreator/AvatarCreator.js +0 -54
- package/dist/cjs/global-account/react/components/ProfileAvatar.d.ts +0 -0
- package/dist/cjs/global-account/react/components/ProfileAvatar.js +0 -127
- package/dist/cjs/global-account/react/hooks/useRPMToken.d.ts +0 -7
- package/dist/cjs/global-account/react/hooks/useRPMToken.js +0 -11
- package/dist/cjs/global-account/react/utils/updateAvatar.d.ts +0 -4
- package/dist/cjs/global-account/react/utils/updateAvatar.js +0 -54
- package/dist/esm/global-account/react/components/AvatarCreator/AvatarCreator.d.ts +0 -6
- package/dist/esm/global-account/react/components/AvatarCreator/AvatarCreator.js +0 -51
- package/dist/esm/global-account/react/components/ProfileAvatar.d.ts +0 -0
- package/dist/esm/global-account/react/components/ProfileAvatar.js +0 -127
- package/dist/esm/global-account/react/hooks/useRPMToken.d.ts +0 -7
- package/dist/esm/global-account/react/hooks/useRPMToken.js +0 -8
- package/dist/esm/global-account/react/utils/updateAvatar.d.ts +0 -4
- package/dist/esm/global-account/react/utils/updateAvatar.js +0 -18
- package/dist/types/global-account/react/components/AvatarCreator/AvatarCreator.d.ts +0 -6
- package/dist/types/global-account/react/components/ProfileAvatar.d.ts +0 -0
- package/dist/types/global-account/react/hooks/useRPMToken.d.ts +0 -7
- package/dist/types/global-account/react/utils/updateAvatar.d.ts +0 -4
- package/src/global-account/react/components/AvatarCreator/AvatarCreator.tsx +0 -90
- package/src/global-account/react/components/ProfileAvatar.tsx +0 -138
- package/src/global-account/react/hooks/useRPMToken.ts +0 -17
- package/src/global-account/react/utils/updateAvatar.ts +0 -21
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
AuthButton,
|
|
4
4
|
Button,
|
|
5
5
|
getConnectOptionsFromStrategy,
|
|
6
|
+
Input,
|
|
6
7
|
isWalletType,
|
|
7
8
|
LoginStepContainer,
|
|
8
9
|
useAuthentication,
|
|
@@ -11,12 +12,21 @@ import {
|
|
|
11
12
|
useConnect,
|
|
12
13
|
WalletRow,
|
|
13
14
|
} from "@b3dotfun/sdk/global-account/react";
|
|
15
|
+
import { ecosystemWalletId } from "@b3dotfun/sdk/shared/constants";
|
|
14
16
|
import { debugB3React } from "@b3dotfun/sdk/shared/utils/debug";
|
|
15
17
|
import { client } from "@b3dotfun/sdk/shared/utils/thirdweb";
|
|
16
18
|
import { useState } from "react";
|
|
17
19
|
import { Chain } from "thirdweb";
|
|
18
|
-
import { useConnect as useConnectTW } from "thirdweb/react";
|
|
19
|
-
import {
|
|
20
|
+
import { useConnectedWallets, useConnect as useConnectTW } from "thirdweb/react";
|
|
21
|
+
import {
|
|
22
|
+
Account,
|
|
23
|
+
createWallet,
|
|
24
|
+
MultiStepAuthArgsType,
|
|
25
|
+
preAuthenticate,
|
|
26
|
+
SingleStepAuthArgsType,
|
|
27
|
+
Wallet,
|
|
28
|
+
WalletId,
|
|
29
|
+
} from "thirdweb/wallets";
|
|
20
30
|
|
|
21
31
|
interface LoginStepCustomProps {
|
|
22
32
|
automaticallySetFirstEoa: boolean;
|
|
@@ -28,6 +38,7 @@ interface LoginStepCustomProps {
|
|
|
28
38
|
}
|
|
29
39
|
|
|
30
40
|
const debug = debugB3React("LoginStepCustom");
|
|
41
|
+
const EMAIL_REGEX = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
31
42
|
|
|
32
43
|
export function LoginStepCustom({
|
|
33
44
|
onSuccess,
|
|
@@ -40,32 +51,49 @@ export function LoginStepCustom({
|
|
|
40
51
|
const { partnerId } = useB3Config();
|
|
41
52
|
const [isLoading, setIsLoading] = useState(false);
|
|
42
53
|
const [showAllWallets, setShowAllWallets] = useState(false);
|
|
54
|
+
const [showEmailFlow, setShowEmailFlow] = useState(false);
|
|
55
|
+
const [email, setEmail] = useState("");
|
|
56
|
+
const [verificationCode, setVerificationCode] = useState("");
|
|
57
|
+
const [emailCodeSent, setEmailCodeSent] = useState(false);
|
|
58
|
+
const [emailError, setEmailError] = useState<string | null>(null);
|
|
43
59
|
const { connect } = useConnect(partnerId, chain);
|
|
44
60
|
const setIsAuthenticating = useAuthStore(state => state.setIsAuthenticating);
|
|
45
|
-
const
|
|
46
|
-
const { logout } = useAuthentication(partnerId, { skipAutoConnect: true });
|
|
61
|
+
const { connect: onAuthConnect, logout } = useAuthentication(partnerId, { skipAutoConnect: true });
|
|
47
62
|
const { connect: connectTW } = useConnectTW();
|
|
63
|
+
const connectedWallets = useConnectedWallets();
|
|
48
64
|
|
|
49
65
|
// Split strategies into auth and wallet types
|
|
50
66
|
const authStrategies = strategies.filter(s => !isWalletType(s));
|
|
51
67
|
const walletStrategies = strategies.filter(isWalletType);
|
|
52
68
|
const initialWallets = walletStrategies.slice(0, maxInitialWallets);
|
|
53
69
|
const additionalWallets = walletStrategies.slice(maxInitialWallets);
|
|
70
|
+
const authGridColumns = Math.max(1, Math.min(authStrategies.length, 4));
|
|
54
71
|
|
|
55
|
-
const
|
|
72
|
+
const resetEmailFlow = () => {
|
|
73
|
+
setShowEmailFlow(false);
|
|
74
|
+
setEmailCodeSent(false);
|
|
75
|
+
setVerificationCode("");
|
|
76
|
+
setEmailError(null);
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
const connectWithOptions = async (
|
|
80
|
+
strategy: AllowedStrategy,
|
|
81
|
+
options: MultiStepAuthArgsType | SingleStepAuthArgsType,
|
|
82
|
+
) => {
|
|
56
83
|
try {
|
|
57
84
|
setIsLoading(true);
|
|
58
85
|
debug("setIsAuthenticating:true:3");
|
|
59
86
|
setIsAuthenticating(true);
|
|
60
|
-
const options = getConnectOptionsFromStrategy(strategy);
|
|
61
87
|
let connectResult: Wallet | null;
|
|
62
88
|
|
|
63
|
-
if (automaticallySetFirstEoa) {
|
|
64
|
-
|
|
89
|
+
if (automaticallySetFirstEoa && isWalletType(strategy) && options.strategy === "wallet") {
|
|
90
|
+
const walletId = options.wallet?.id as WalletId | undefined;
|
|
91
|
+
if (!walletId) {
|
|
65
92
|
throw new Error("Wallet ID is required");
|
|
66
93
|
}
|
|
94
|
+
|
|
67
95
|
connectResult = await connectTW(async () => {
|
|
68
|
-
const wallet = createWallet(
|
|
96
|
+
const wallet = createWallet(walletId);
|
|
69
97
|
await wallet.connect({
|
|
70
98
|
client,
|
|
71
99
|
});
|
|
@@ -73,19 +101,27 @@ export function LoginStepCustom({
|
|
|
73
101
|
return wallet;
|
|
74
102
|
});
|
|
75
103
|
} else {
|
|
76
|
-
// @ts-expect-error we have custom strategies too and we also get things like "apple" isn't assignable to "wallet"
|
|
77
104
|
connectResult = await connect(options);
|
|
78
105
|
}
|
|
79
106
|
|
|
80
107
|
const account = connectResult?.getAccount();
|
|
81
108
|
debug("@@connectResult", { connectResult, account, options });
|
|
82
|
-
if (!account) throw new Error("Failed to connect");
|
|
109
|
+
if (!account || !connectResult) throw new Error("Failed to connect");
|
|
110
|
+
const allConnectedWallets =
|
|
111
|
+
connectedWallets.length > 0 && connectedWallets.some(wallet => wallet.id === connectResult.id)
|
|
112
|
+
? connectedWallets
|
|
113
|
+
: [connectResult, ...connectedWallets.filter(wallet => wallet.id !== connectResult.id)];
|
|
114
|
+
await onAuthConnect(connectResult, allConnectedWallets);
|
|
83
115
|
await onSuccess(account);
|
|
84
|
-
|
|
116
|
+
if (strategy === "email") {
|
|
117
|
+
resetEmailFlow();
|
|
118
|
+
}
|
|
85
119
|
} catch (error) {
|
|
120
|
+
if (strategy === "email") {
|
|
121
|
+
setEmailError(error instanceof Error ? error.message : "Failed to sign in with email");
|
|
122
|
+
}
|
|
86
123
|
await onError?.(error as Error);
|
|
87
124
|
await logout();
|
|
88
|
-
setIsAuthenticated(false);
|
|
89
125
|
} finally {
|
|
90
126
|
setIsLoading(false);
|
|
91
127
|
debug("setIsAuthenticating:false:3");
|
|
@@ -93,60 +129,177 @@ export function LoginStepCustom({
|
|
|
93
129
|
}
|
|
94
130
|
};
|
|
95
131
|
|
|
132
|
+
const handleConnect = async (strategy: AllowedStrategy) => {
|
|
133
|
+
if (strategy === "email") {
|
|
134
|
+
setShowEmailFlow(true);
|
|
135
|
+
setEmailCodeSent(false);
|
|
136
|
+
setVerificationCode("");
|
|
137
|
+
setEmailError(null);
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
const options = getConnectOptionsFromStrategy(strategy);
|
|
142
|
+
await connectWithOptions(strategy, options as SingleStepAuthArgsType);
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
const handleSendEmailCode = async () => {
|
|
146
|
+
const normalizedEmail = email.trim().toLowerCase();
|
|
147
|
+
if (!normalizedEmail) {
|
|
148
|
+
setEmailError("Please enter your email address");
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
if (!EMAIL_REGEX.test(normalizedEmail)) {
|
|
153
|
+
setEmailError("Please enter a valid email address");
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
try {
|
|
158
|
+
setIsLoading(true);
|
|
159
|
+
setEmailError(null);
|
|
160
|
+
await preAuthenticate({
|
|
161
|
+
client,
|
|
162
|
+
strategy: "email",
|
|
163
|
+
email: normalizedEmail,
|
|
164
|
+
ecosystem: {
|
|
165
|
+
id: ecosystemWalletId,
|
|
166
|
+
partnerId,
|
|
167
|
+
},
|
|
168
|
+
});
|
|
169
|
+
setEmail(normalizedEmail);
|
|
170
|
+
setEmailCodeSent(true);
|
|
171
|
+
} catch (error) {
|
|
172
|
+
setEmailError(error instanceof Error ? error.message : "Failed to send verification code");
|
|
173
|
+
await onError?.(error as Error);
|
|
174
|
+
} finally {
|
|
175
|
+
setIsLoading(false);
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
const handleEmailLogin = async () => {
|
|
180
|
+
const normalizedEmail = email.trim().toLowerCase();
|
|
181
|
+
const normalizedCode = verificationCode.trim();
|
|
182
|
+
|
|
183
|
+
if (!EMAIL_REGEX.test(normalizedEmail)) {
|
|
184
|
+
setEmailError("Please enter a valid email address");
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
if (!normalizedCode) {
|
|
189
|
+
setEmailError("Please enter your verification code");
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
await connectWithOptions("email", {
|
|
194
|
+
strategy: "email",
|
|
195
|
+
email: normalizedEmail,
|
|
196
|
+
verificationCode: normalizedCode,
|
|
197
|
+
});
|
|
198
|
+
};
|
|
199
|
+
|
|
96
200
|
return (
|
|
97
201
|
<LoginStepContainer partnerId={partnerId}>
|
|
98
|
-
{
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
onClick={() => handleConnect(strategy)}
|
|
108
|
-
isLoading={isLoading}
|
|
109
|
-
/>
|
|
110
|
-
);
|
|
111
|
-
})}
|
|
112
|
-
</div>
|
|
113
|
-
)}
|
|
114
|
-
|
|
115
|
-
{/* Initial Wallet List */}
|
|
116
|
-
<div className="mb-4 w-full space-y-2">
|
|
117
|
-
{initialWallets.map(walletId => (
|
|
118
|
-
<WalletRow
|
|
119
|
-
key={walletId}
|
|
120
|
-
walletId={walletId as WalletId}
|
|
121
|
-
onClick={() => handleConnect(walletId)}
|
|
122
|
-
isLoading={isLoading}
|
|
202
|
+
{showEmailFlow ? (
|
|
203
|
+
<div className="mb-6 w-full space-y-3 px-3">
|
|
204
|
+
<p className="text-center text-sm font-medium text-gray-900 dark:text-gray-100">Sign in with email</p>
|
|
205
|
+
<Input
|
|
206
|
+
type="email"
|
|
207
|
+
placeholder="you@example.com"
|
|
208
|
+
value={email}
|
|
209
|
+
onChange={event => setEmail(event.target.value)}
|
|
210
|
+
disabled={isLoading || emailCodeSent}
|
|
123
211
|
/>
|
|
124
|
-
))}
|
|
125
|
-
</div>
|
|
126
212
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
213
|
+
{emailCodeSent && (
|
|
214
|
+
<Input
|
|
215
|
+
type="text"
|
|
216
|
+
placeholder="Enter verification code"
|
|
217
|
+
value={verificationCode}
|
|
218
|
+
onChange={event => setVerificationCode(event.target.value)}
|
|
219
|
+
disabled={isLoading}
|
|
220
|
+
/>
|
|
221
|
+
)}
|
|
222
|
+
|
|
223
|
+
{emailError && <p className="text-sm text-red-500">{emailError}</p>}
|
|
224
|
+
|
|
130
225
|
<Button
|
|
131
|
-
onClick={
|
|
132
|
-
|
|
226
|
+
onClick={emailCodeSent ? handleEmailLogin : handleSendEmailCode}
|
|
227
|
+
disabled={isLoading}
|
|
228
|
+
className="w-full"
|
|
133
229
|
>
|
|
134
|
-
{
|
|
230
|
+
{isLoading ? "Loading..." : emailCodeSent ? "Verify code" : "Send code"}
|
|
135
231
|
</Button>
|
|
136
232
|
|
|
137
|
-
{
|
|
138
|
-
<
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
233
|
+
{emailCodeSent && (
|
|
234
|
+
<Button variant="outline" onClick={handleSendEmailCode} disabled={isLoading} className="w-full">
|
|
235
|
+
Resend code
|
|
236
|
+
</Button>
|
|
237
|
+
)}
|
|
238
|
+
|
|
239
|
+
<Button variant="outline" onClick={resetEmailFlow} disabled={isLoading} className="w-full">
|
|
240
|
+
Back
|
|
241
|
+
</Button>
|
|
242
|
+
</div>
|
|
243
|
+
) : (
|
|
244
|
+
<>
|
|
245
|
+
{/* Auth Strategies */}
|
|
246
|
+
{authStrategies.length > 0 && (
|
|
247
|
+
<div
|
|
248
|
+
className={`mb-6 grid w-full gap-4 px-3 ${authStrategies.length > 4 ? "grid-cols-4" : ""}`}
|
|
249
|
+
style={
|
|
250
|
+
authStrategies.length <= 4
|
|
251
|
+
? { gridTemplateColumns: `repeat(${authGridColumns}, minmax(0, 1fr))` }
|
|
252
|
+
: undefined
|
|
253
|
+
}
|
|
254
|
+
>
|
|
255
|
+
{authStrategies.map(strategy => (
|
|
256
|
+
<AuthButton
|
|
257
|
+
key={strategy}
|
|
258
|
+
strategy={strategy}
|
|
259
|
+
onClick={() => handleConnect(strategy)}
|
|
144
260
|
isLoading={isLoading}
|
|
145
261
|
/>
|
|
146
262
|
))}
|
|
147
263
|
</div>
|
|
148
264
|
)}
|
|
149
|
-
|
|
265
|
+
|
|
266
|
+
{/* Initial Wallet List */}
|
|
267
|
+
<div className="mb-4 w-full space-y-2">
|
|
268
|
+
{initialWallets.map(walletId => (
|
|
269
|
+
<WalletRow
|
|
270
|
+
key={walletId}
|
|
271
|
+
walletId={walletId as WalletId}
|
|
272
|
+
onClick={() => handleConnect(walletId)}
|
|
273
|
+
isLoading={isLoading}
|
|
274
|
+
/>
|
|
275
|
+
))}
|
|
276
|
+
</div>
|
|
277
|
+
|
|
278
|
+
{/* Additional Wallets Section */}
|
|
279
|
+
{additionalWallets.length > 0 && (
|
|
280
|
+
<div className="w-full">
|
|
281
|
+
<Button
|
|
282
|
+
onClick={() => setShowAllWallets(!showAllWallets)}
|
|
283
|
+
className="mb-2 w-full bg-transparent text-gray-600 hover:bg-gray-100"
|
|
284
|
+
>
|
|
285
|
+
{showAllWallets ? "Show less" : "More options"}
|
|
286
|
+
</Button>
|
|
287
|
+
|
|
288
|
+
{showAllWallets && (
|
|
289
|
+
<div className="max-h-60 space-y-2 overflow-y-auto">
|
|
290
|
+
{additionalWallets.map(walletId => (
|
|
291
|
+
<WalletRow
|
|
292
|
+
key={walletId}
|
|
293
|
+
walletId={walletId as WalletId}
|
|
294
|
+
onClick={() => handleConnect(walletId)}
|
|
295
|
+
isLoading={isLoading}
|
|
296
|
+
/>
|
|
297
|
+
))}
|
|
298
|
+
</div>
|
|
299
|
+
)}
|
|
300
|
+
</div>
|
|
301
|
+
)}
|
|
302
|
+
</>
|
|
150
303
|
)}
|
|
151
304
|
</LoginStepContainer>
|
|
152
305
|
);
|
|
@@ -5,7 +5,8 @@ type WalletType = Wallet["id"];
|
|
|
5
5
|
type StrategyType = SingleStepAuthArgsType["strategy"];
|
|
6
6
|
type CustomStrategyType = "basement" | "privy";
|
|
7
7
|
|
|
8
|
-
type AllowedStrategies = StrategyType | WalletType | CustomStrategyType;
|
|
8
|
+
type AllowedStrategies = StrategyType | WalletType | CustomStrategyType | "email";
|
|
9
|
+
type NonWalletStrategyType = Exclude<AllowedStrategies, WalletType>;
|
|
9
10
|
const customStrategies = ["basement", "privy"] as const;
|
|
10
11
|
// type CustomStrategy = (typeof customStrategies)[number];
|
|
11
12
|
|
|
@@ -13,9 +14,10 @@ export const allowedStrategies = [
|
|
|
13
14
|
// Auth strategies
|
|
14
15
|
"apple",
|
|
15
16
|
"google",
|
|
17
|
+
"github",
|
|
16
18
|
"x",
|
|
17
19
|
"discord",
|
|
18
|
-
|
|
20
|
+
"email",
|
|
19
21
|
"guest",
|
|
20
22
|
|
|
21
23
|
// Wallet IDs
|
|
@@ -36,7 +38,7 @@ export function isWalletType(strategy: AllowedStrategies): strategy is WalletTyp
|
|
|
36
38
|
return strategy === "walletConnect" || walletIdPattern.test(strategy);
|
|
37
39
|
}
|
|
38
40
|
|
|
39
|
-
export function isStrategyType(strategy: AllowedStrategies): strategy is
|
|
41
|
+
export function isStrategyType(strategy: AllowedStrategies): strategy is NonWalletStrategyType {
|
|
40
42
|
return !isWalletType(strategy);
|
|
41
43
|
}
|
|
42
44
|
|
|
@@ -49,6 +51,10 @@ export function getConnectOptionsFromStrategy(strategy: AllowedStrategy): {
|
|
|
49
51
|
throw new Error(`Invalid strategy: ${strategy}`);
|
|
50
52
|
}
|
|
51
53
|
|
|
54
|
+
if (strategy === "email") {
|
|
55
|
+
throw new Error("Email strategy requires OTP flow and cannot be connected in a single step");
|
|
56
|
+
}
|
|
57
|
+
|
|
52
58
|
if (isWalletType(strategy)) {
|
|
53
59
|
return { strategy: "wallet" as const, wallet: createWallet(strategy) };
|
|
54
60
|
} else {
|
|
@@ -59,11 +65,25 @@ export function getConnectOptionsFromStrategy(strategy: AllowedStrategy): {
|
|
|
59
65
|
|
|
60
66
|
export const strategyIcons: Record<string, string> = {
|
|
61
67
|
google: "https://cdn.b3.fun/google.svg",
|
|
68
|
+
github: "https://cdn.jsdelivr.net/gh/devicons/devicon/icons/github/github-original.svg",
|
|
62
69
|
x: "https://cdn.b3.fun/x.svg?1",
|
|
63
70
|
discord: "https://cdn.b3.fun/discord.svg",
|
|
64
71
|
apple: "https://cdn.b3.fun/apple.svg",
|
|
65
72
|
guest: "https://cdn.b3.fun/incognito.svg",
|
|
66
|
-
|
|
73
|
+
microsoft: "https://upload.wikimedia.org/wikipedia/commons/4/44/Microsoft_logo.svg",
|
|
74
|
+
slack: "https://upload.wikimedia.org/wikipedia/commons/d/d5/Slack_icon_2019.svg",
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export const strategyLabels: Record<string, string> = {
|
|
78
|
+
google: "Google",
|
|
79
|
+
x: "X",
|
|
80
|
+
discord: "Discord",
|
|
81
|
+
apple: "Apple",
|
|
82
|
+
guest: "Guest",
|
|
83
|
+
github: "GitHub",
|
|
84
|
+
email: "Email",
|
|
85
|
+
microsoft: "Microsoft",
|
|
86
|
+
slack: "Slack",
|
|
67
87
|
};
|
|
68
88
|
// Test it
|
|
69
89
|
// console.log(getConnectOptionsFromStrategy("io.metamask"));
|
package/src/global-account/react/components/SingleUserSearchSelector/SingleUserSearchSelector.tsx
CHANGED
|
@@ -5,6 +5,7 @@ import { Search, X } from "lucide-react";
|
|
|
5
5
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
6
6
|
import type { CombinedProfile, Profile } from "../../hooks/useProfile";
|
|
7
7
|
import { fetchProfile as fetchProfileApi } from "../../utils/profileApi";
|
|
8
|
+
import { validateImageUrl } from "../../utils/profileDisplay";
|
|
8
9
|
import { IPFSMediaRenderer } from "../IPFSMediaRenderer/IPFSMediaRenderer";
|
|
9
10
|
import { Input } from "../ui/input";
|
|
10
11
|
|
|
@@ -283,7 +284,7 @@ export function SingleUserSearchSelector({
|
|
|
283
284
|
{/* Avatar */}
|
|
284
285
|
<div className="single-user-search-result-avatar h-11 w-11 shrink-0">
|
|
285
286
|
<IPFSMediaRenderer
|
|
286
|
-
src={searchResult.avatar}
|
|
287
|
+
src={validateImageUrl(searchResult.avatar) ?? undefined}
|
|
287
288
|
alt={getDisplayName(searchResult)}
|
|
288
289
|
className="h-full w-full rounded-full object-cover"
|
|
289
290
|
/>
|
|
@@ -15,6 +15,9 @@ interface ToastContextType {
|
|
|
15
15
|
addToast: (type: ToastType, message: string, duration?: number) => string;
|
|
16
16
|
removeToast: (id: string) => void;
|
|
17
17
|
clearAll: () => void;
|
|
18
|
+
headerMode: boolean;
|
|
19
|
+
setHeaderMode: (enabled: boolean) => void;
|
|
20
|
+
latestToast: ToastItem | null;
|
|
18
21
|
}
|
|
19
22
|
|
|
20
23
|
const ToastContext = createContext<ToastContextType | undefined>(undefined);
|
|
@@ -23,6 +26,9 @@ let globalToastCounter = 0;
|
|
|
23
26
|
|
|
24
27
|
export function ToastProvider({ children }: { children: React.ReactNode }) {
|
|
25
28
|
const [toasts, setToasts] = useState<ToastItem[]>([]);
|
|
29
|
+
const [headerMode, setHeaderMode] = useState(false);
|
|
30
|
+
const headerModeRef = useRef(false);
|
|
31
|
+
const [latestToast, setLatestToast] = useState<ToastItem | null>(null);
|
|
26
32
|
const timeoutsRef = useRef<Map<string, NodeJS.Timeout>>(new Map());
|
|
27
33
|
|
|
28
34
|
const removeToast = useCallback((id: string) => {
|
|
@@ -45,13 +51,23 @@ export function ToastProvider({ children }: { children: React.ReactNode }) {
|
|
|
45
51
|
createdAt: Date.now(),
|
|
46
52
|
};
|
|
47
53
|
|
|
48
|
-
|
|
54
|
+
if (headerModeRef.current) {
|
|
55
|
+
setLatestToast(newToast);
|
|
56
|
+
if (duration > 0) {
|
|
57
|
+
const timeout = setTimeout(() => {
|
|
58
|
+
setLatestToast(null);
|
|
59
|
+
}, duration);
|
|
60
|
+
timeoutsRef.current.set(id, timeout);
|
|
61
|
+
}
|
|
62
|
+
} else {
|
|
63
|
+
setToasts(prev => [...prev, newToast]);
|
|
49
64
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
65
|
+
if (duration > 0) {
|
|
66
|
+
const timeout = setTimeout(() => {
|
|
67
|
+
removeToast(id);
|
|
68
|
+
}, duration);
|
|
69
|
+
timeoutsRef.current.set(id, timeout);
|
|
70
|
+
}
|
|
55
71
|
}
|
|
56
72
|
|
|
57
73
|
return id;
|
|
@@ -65,6 +81,16 @@ export function ToastProvider({ children }: { children: React.ReactNode }) {
|
|
|
65
81
|
setToasts([]);
|
|
66
82
|
}, []);
|
|
67
83
|
|
|
84
|
+
const setHeaderModeCallback = useCallback((enabled: boolean) => {
|
|
85
|
+
setHeaderMode(enabled);
|
|
86
|
+
headerModeRef.current = enabled;
|
|
87
|
+
if (!enabled) {
|
|
88
|
+
setLatestToast(null);
|
|
89
|
+
timeoutsRef.current.forEach(timeout => clearTimeout(timeout));
|
|
90
|
+
timeoutsRef.current.clear();
|
|
91
|
+
}
|
|
92
|
+
}, []);
|
|
93
|
+
|
|
68
94
|
// Cleanup on unmount
|
|
69
95
|
useEffect(() => {
|
|
70
96
|
const timeouts = timeoutsRef.current;
|
|
@@ -74,7 +100,13 @@ export function ToastProvider({ children }: { children: React.ReactNode }) {
|
|
|
74
100
|
};
|
|
75
101
|
}, []);
|
|
76
102
|
|
|
77
|
-
return
|
|
103
|
+
return (
|
|
104
|
+
<ToastContext.Provider
|
|
105
|
+
value={{ toasts, addToast, removeToast, clearAll, headerMode, setHeaderMode: setHeaderModeCallback, latestToast }}
|
|
106
|
+
>
|
|
107
|
+
{children}
|
|
108
|
+
</ToastContext.Provider>
|
|
109
|
+
);
|
|
78
110
|
}
|
|
79
111
|
|
|
80
112
|
export function useToastContext() {
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { validateImageUrl } from "@b3dotfun/sdk/global-account/react/utils/profileDisplay";
|
|
2
|
+
import { AVATAR_COLORS } from "@b3dotfun/sdk/shared/constants";
|
|
3
|
+
import Avatar from "boring-avatars";
|
|
4
|
+
import { useCallback, useEffect, useState } from "react";
|
|
5
|
+
import { IPFSMediaRenderer } from "../IPFSMediaRenderer/IPFSMediaRenderer";
|
|
6
|
+
|
|
7
|
+
interface UserAvatarProps {
|
|
8
|
+
/** Direct avatar URL (IPFS or HTTP). Resolved and validated internally. */
|
|
9
|
+
avatarUrl?: string | null;
|
|
10
|
+
/** Seed for the generated fallback avatar + alt text. Use email, username, or address. */
|
|
11
|
+
name?: string;
|
|
12
|
+
/** Avatar size in pixels (square). */
|
|
13
|
+
size?: number;
|
|
14
|
+
/** Additional className for the outer container. */
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Renders a user avatar with IPFS support and boring-avatars fallback.
|
|
20
|
+
*
|
|
21
|
+
* - If `avatarUrl` is provided and valid, renders via IPFSMediaRenderer.
|
|
22
|
+
* - On load failure or missing URL, falls back to a deterministic boring-avatars beam.
|
|
23
|
+
*/
|
|
24
|
+
export function UserAvatar({ avatarUrl, name = "user", size = 40, className }: UserAvatarProps) {
|
|
25
|
+
const resolvedSrc = validateImageUrl(avatarUrl);
|
|
26
|
+
const [imgError, setImgError] = useState(false);
|
|
27
|
+
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
setImgError(false);
|
|
30
|
+
}, [avatarUrl]);
|
|
31
|
+
|
|
32
|
+
const handleImgError = useCallback(() => setImgError(true), []);
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<div className={className} style={{ width: size, height: size, minWidth: size, minHeight: size }}>
|
|
36
|
+
{resolvedSrc && !imgError ? (
|
|
37
|
+
<div onErrorCapture={handleImgError} className="h-full w-full overflow-hidden rounded-full">
|
|
38
|
+
<IPFSMediaRenderer src={resolvedSrc} alt={name} className="h-full w-full object-cover" />
|
|
39
|
+
</div>
|
|
40
|
+
) : (
|
|
41
|
+
<Avatar name={name} variant="beam" size={size} colors={AVATAR_COLORS} />
|
|
42
|
+
)}
|
|
43
|
+
</div>
|
|
44
|
+
);
|
|
45
|
+
}
|
|
@@ -2,13 +2,22 @@
|
|
|
2
2
|
// Core Components
|
|
3
3
|
export { B3DynamicModal } from "./B3DynamicModal";
|
|
4
4
|
export { B3Provider } from "./B3Provider/B3Provider";
|
|
5
|
+
export type { AuthStrategy } from "./B3Provider/B3ConfigProvider";
|
|
5
6
|
export { RelayKitProviderWrapper } from "./B3Provider/RelayKitProviderWrapper";
|
|
6
7
|
export { useB3 } from "./B3Provider/useB3";
|
|
7
8
|
export { useB3Account } from "./B3Provider/useB3Account";
|
|
8
9
|
export { useB3Config } from "./B3Provider/useB3Config";
|
|
10
|
+
export { useBetterAuthClient } from "./B3Provider/BetterAuthClientProvider";
|
|
9
11
|
export { StyleRoot } from "./StyleRoot";
|
|
10
12
|
|
|
11
13
|
// SignInWithB3 Components
|
|
14
|
+
export { BetterAuthResetPassword, type BetterAuthResetPasswordProps } from "./SignInWithB3/BetterAuthResetPassword";
|
|
15
|
+
export { BetterAuthSignIn, type BetterAuthSignInProps } from "./SignInWithB3/BetterAuthSignIn";
|
|
16
|
+
export {
|
|
17
|
+
BetterAuthVerifyEmail,
|
|
18
|
+
type BetterAuthVerifyEmailProps,
|
|
19
|
+
type BetterAuthVerifyEmailState,
|
|
20
|
+
} from "./SignInWithB3/BetterAuthVerifyEmail";
|
|
12
21
|
export { AuthButton } from "./SignInWithB3/components/AuthButton";
|
|
13
22
|
export { PermissionItem } from "./SignInWithB3/components/PermissionItem";
|
|
14
23
|
export { WalletRow } from "./SignInWithB3/components/WalletRow";
|
|
@@ -21,6 +30,9 @@ export { getConnectOptionsFromStrategy, isWalletType, type AllowedStrategy } fro
|
|
|
21
30
|
// ManageAccount Components
|
|
22
31
|
export { ManageAccount } from "./ManageAccount/ManageAccount";
|
|
23
32
|
|
|
33
|
+
// UserAvatar
|
|
34
|
+
export { UserAvatar } from "./UserAvatar/UserAvatar";
|
|
35
|
+
|
|
24
36
|
// Deposit Components
|
|
25
37
|
export { Deposit } from "./Deposit/Deposit";
|
|
26
38
|
|
|
@@ -5,6 +5,7 @@ export { useAddTWSessionKey } from "./useAddTWSessionKey";
|
|
|
5
5
|
export { useAnalytics } from "./useAnalytics";
|
|
6
6
|
export { useAuth } from "./useAuth";
|
|
7
7
|
export { useAuthentication } from "./useAuthentication";
|
|
8
|
+
export { useBetterAuth, EmailVerificationRequiredError } from "./useBetterAuth";
|
|
8
9
|
export { useB3BalanceFromAddresses } from "./useB3BalanceFromAddresses";
|
|
9
10
|
export { useB3EnsName } from "./useB3EnsName";
|
|
10
11
|
export { useChainSwitchWithAction } from "./useChainSwitchWithAction";
|