@privy-io/react-auth 3.13.1 → 3.14.0-beta-20260213175842
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/AccountNotFoundScreen-5vIT9Vj5.js +1 -0
- package/dist/cjs/{Address-BAzd87pQ.js → Address-CSvwjtZr.js} +1 -1
- package/dist/cjs/AffirmativeConsentScreen-CkZG9t3r.js +6 -0
- package/dist/cjs/AllowlistRejectionScreen-BIpHpSsP.js +1 -0
- package/dist/cjs/AuthenticateWithWalletScreen-DxE4Mo3e.js +1 -0
- package/dist/cjs/AwaitingEvmToSolBridgingScreen-C4cZT6jZ.js +2 -0
- package/dist/cjs/AwaitingExternalEthereumTransferScreen-DysfSqRu.js +2 -0
- package/dist/cjs/AwaitingPasswordlessCodeScreen-BKgo7WSz.js +103 -0
- package/dist/cjs/AwaitingSolToEvmBridgingScreen-By2XqcuD.js +2 -0
- package/dist/cjs/{BridgeNetworkSelectionView-BBifxbuQ.js → BridgeNetworkSelectionView-Cbcwjeju.js} +7 -7
- package/dist/cjs/CaptchaScreen-DLafB2fk.js +1 -0
- package/dist/cjs/CoinbaseOnrampStatusScreen-BOecfziJ.js +16 -0
- package/dist/cjs/{ConnectEmailForm-DSB_ECav.js → ConnectEmailForm-DxGEbc_v.js} +1 -1
- package/dist/cjs/ConnectLedgerScreen-Bt6fqaYQ.js +9 -0
- package/dist/cjs/ConnectOnlyLandingScreen-Drw33dcK.js +1 -0
- package/dist/cjs/ConnectOnlyStatusScreen-Bo8cxqDk.js +1 -0
- package/dist/cjs/ConnectOrCreateScreen-L6lv1fMf.js +1 -0
- package/dist/cjs/{ConnectPhoneForm-lBXP5nI1.js → ConnectPhoneForm-H8tbcWjZ.js} +1 -1
- package/dist/cjs/ConnectWalletView-C90zRo3A.js +147 -0
- package/dist/cjs/ConnectionStatusScreen-B0xQfUL_.js +7 -0
- package/dist/cjs/CopyToClipboard-CC0DCGEH.js +39 -0
- package/dist/cjs/CopyableText-DbFeIZI0.js +23 -0
- package/dist/cjs/CrossAppAuthScreen-DmbfWG4K.js +1 -0
- package/dist/cjs/{CustomLandingScreenView-CQqBEerN.js → CustomLandingScreenView-F5WyUe3t.js} +3 -3
- package/dist/cjs/DelegatedActionsConsentScreen-DaARlIlY.js +1 -0
- package/dist/cjs/DelegatedActionsRevokeScreen-Ckwh9Fde.js +1 -0
- package/dist/cjs/EmbeddedWalletConnectingScreen-Dt0qglpB.js +1 -0
- package/dist/cjs/EmbeddedWalletCreatedScreen-D-U2qhvc.js +1 -0
- package/dist/cjs/{EmbeddedWalletKeyExportScreen-CLwKZG9l.js → EmbeddedWalletKeyExportScreen-DHAE6n6A.js} +3 -3
- package/dist/cjs/EmbeddedWalletOnAccountCreateScreen-BLM0P_Et.js +1 -0
- package/dist/cjs/EmbeddedWalletPasswordUpdateScreen-DDwEP_VK.js +1 -0
- package/dist/cjs/EmbeddedWalletPasswordUpdateSplashScreen-xcFuRZ6Q.js +1 -0
- package/dist/cjs/{EnrollTotp-Dzazx21f.js → EnrollTotp-BrTAAhHi.js} +8 -8
- package/dist/cjs/ErrorScreen-CDPwlNzs.js +4 -0
- package/dist/cjs/{FarcasterConnectStatusScreen-B7w0TBzB.js → FarcasterConnectStatusScreen-DbxK9gJn.js} +6 -6
- package/dist/cjs/FarcasterSignerStatusScreen-BOMNzi1f.js +29 -0
- package/dist/cjs/FundSolWalletWithExternalSolanaWallet-Dmqm7veU.js +2 -0
- package/dist/cjs/{FundWalletMethodHeader-2kXHTrGK.js → FundWalletMethodHeader-DJyBd0Vy.js} +1 -1
- package/dist/cjs/FundWithBankDepositScreen-Czy1E-yH.js +175 -0
- package/dist/cjs/FundingEditAmountScreen-6frvmbbd.js +1 -0
- package/dist/cjs/FundingMethodSelectionScreen-yOWUZZMX.js +1 -0
- package/dist/cjs/InAppBrowserLoginNotPossible-B4w2nX7Y.js +1 -0
- package/dist/cjs/{InfoBanner-C15hE_sj.js → InfoBanner-D5_XYHKY.js} +9 -6
- package/dist/cjs/InstallWalletScreen-CzTSvUdl.js +1 -0
- package/dist/cjs/LandingScreen-DNxGiYzs.js +1 -0
- package/dist/cjs/{LinkConflictScreen-CQiPRZsR.js → LinkConflictScreen-BPOi68lz.js} +3 -3
- package/dist/cjs/LinkEmailScreen-DhYoI9Vx.js +1 -0
- package/dist/cjs/{LinkPasskeyScreen-DR1inEW4.js → LinkPasskeyScreen-BVFUwWQG.js} +11 -11
- package/dist/cjs/LinkPhoneScreen-BqHYoNzR.js +1 -0
- package/dist/cjs/LoginFailedScreen-D0WLbTBb.js +1 -0
- package/dist/cjs/ManualTransferScreen-CRJmPuoR.js +1 -0
- package/dist/cjs/MfaAuthEnrollmentFlowScreen-BOZc_N-x.js +1 -0
- package/dist/cjs/MfaAuthVerifyFlowScreen-CN0qs3DP.js +1 -0
- package/dist/cjs/MfaEnrollmentFlowScreen-BpP8OUm7.js +1 -0
- package/dist/cjs/MfaVerifyFlowScreen-B8ij23uJ.js +1 -0
- package/dist/cjs/{ModalHeader-CabvEpAG.js → ModalHeader-CSz_JC8Q.js} +18 -12
- package/dist/cjs/MoonpayStatusScreen-CBADlt11.js +16 -0
- package/dist/cjs/OAuthStatusScreen-DQ5Tw8M1.js +1 -0
- package/dist/cjs/PasskeySelectSignupOrLogin-DsjVGCMc.js +1 -0
- package/dist/cjs/PasskeyStatusScreen-l2rYZ1IG.js +3 -0
- package/dist/cjs/PasswordRecoveryScreen-V3DheMKe.js +20 -0
- package/dist/cjs/{QrCode-B5K0VLPw.js → QrCode-CeAi1LRZ.js} +1 -1
- package/dist/cjs/RecoveryOAuthStatusScreen-tu_yyjoG.js +1 -0
- package/dist/cjs/RecoveryPasswordCreateScreen-Z7ucSNLS.js +1 -0
- package/dist/cjs/{RecoverySelectionScreen-C2tuntn9.js → RecoverySelectionScreen-DWqGXp3l.js} +2 -2
- package/dist/cjs/{Screen-BXzBiTIN.js → Screen-D6ig-IDr.js} +20 -10
- package/dist/cjs/ScreenLayout-Dkt0mrht.js +1 -0
- package/dist/cjs/{SetAutomaticRecoveryScreen-DDVOX064.js → SetAutomaticRecoveryScreen-DHNuiSgK.js} +2 -2
- package/dist/cjs/{SetWalletPasswordForm-CjifRxS3.js → SetWalletPasswordForm-R9Somnyp.js} +2 -2
- package/dist/cjs/{SignRequestScreen-B6fS5qTS.js → SignRequestScreen-ZokQxsYU.js} +2 -2
- package/dist/cjs/{StandardSignAndSendTransactionScreen-B5BX6LFZ.js → StandardSignAndSendTransactionScreen-wTGPTlgg.js} +2 -2
- package/dist/cjs/TelegramAuthScreen-BFDvy3uz.js +1 -0
- package/dist/cjs/{TransactionDetails-CGZ0hDXd.js → TransactionDetails-ddaXz8YV.js} +1 -1
- package/dist/cjs/{TransactionErrorView-C5-4kCDL.js → TransactionErrorView-CrjFmgNv.js} +5 -5
- package/dist/cjs/{TransferFromWalletScreen-Be_N5MeO.js → TransferFromWalletScreen-Rt6vEVf4.js} +2 -2
- package/dist/cjs/{TransferOrBridgeLoadingScreen-BGp5x3h8.js → TransferOrBridgeLoadingScreen-Dp_vpEYG.js} +2 -2
- package/dist/cjs/UpdateEmailScreen-6gNNAUvB.js +1 -0
- package/dist/cjs/UpdatePhoneScreen-C7qjXMNn.js +1 -0
- package/dist/cjs/UserLimitReachedScreen-DWgXgQyy.js +1 -0
- package/dist/cjs/{WalletInfoCard-BYZGsWwj.js → WalletInfoCard-CO7fOCNd.js} +4 -4
- package/dist/cjs/WalletInterstitialScreen-C05fMGUR.js +1 -0
- package/dist/cjs/{WalletLink-Bj02lEf9.js → WalletLink-Bldwftgh.js} +5 -5
- package/dist/cjs/{WalletOverflowButton-p3vpo0QR.js → WalletOverflowButton-D6xV7e4O.js} +1 -1
- package/dist/cjs/abstract-smart-wallets.js +1 -1
- package/dist/cjs/{context-CuNnvCIL.js → context-6PrkFAzG.js} +1 -1
- package/dist/cjs/{ethers-C_dhPYcC.js → ethers-_hdpXGqQ.js} +1 -1
- package/dist/cjs/extended-chains.js +1 -1
- package/dist/cjs/{get-is-unified-wallet-C2yi08Zy.js → get-is-unified-wallet-Cd_IhZS9.js} +1 -1
- package/dist/cjs/{getErc20Balance-CJvcxOe9.js → getErc20Balance-D2jXMvJ8.js} +1 -1
- package/dist/cjs/{getErc20TokenInfo-DqY-nDYo.js → getErc20TokenInfo-DxDd_HN6.js} +1 -1
- package/dist/cjs/{index-CKUeuhfu.js → index-BlUF144d.js} +1 -1
- package/dist/cjs/index-CaGJR6Wm.js +174 -0
- package/dist/cjs/{index-TUET0BYX.js → index-rArQaM8n.js} +3 -3
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/internal.js +1 -1
- package/dist/cjs/{shared-AII0g-d1.js → shared-hn3VMWc8.js} +1 -1
- package/dist/cjs/{shouldProceedtoEmbeddedWalletCreationFlow-DE4oGpYl.js → shouldProceedtoEmbeddedWalletCreationFlow-KizljXLw.js} +1 -1
- package/dist/cjs/{smart-wallets-BypZdOsC.js → smart-wallets-B7Oeb874.js} +1 -1
- package/dist/cjs/smart-wallets.js +1 -1
- package/dist/cjs/solana.js +1 -1
- package/dist/cjs/{styles-D7QQZERY.js → styles-Dthqo7lh.js} +4 -4
- package/dist/cjs/{to-ui-error-DNNop_FY.js → to-ui-error-DfSSp7Nk.js} +2 -2
- package/dist/cjs/ui.js +40 -40
- package/dist/cjs/{use-export-wallet-B7CUqWdP.js → use-export-wallet-Ce_CCutn.js} +1 -1
- package/dist/cjs/use-export-wallet-DZ-GzASy.js +1 -0
- package/dist/cjs/{useActiveWallet-D5qqs3GS.js → useActiveWallet-B-qt_lhr.js} +1 -1
- package/dist/cjs/{useGetTokenPrice-BRQnbdi2.js → useGetTokenPrice-C8Me29xD.js} +1 -1
- package/dist/cjs/{useI18n-DKrZl8KW.js → useI18n-Bffg27Cp.js} +1 -1
- package/dist/cjs/{usePrivy-BKHhRZMn.js → usePrivy-CLwa9i8X.js} +1 -1
- package/dist/cjs/{useSolanaRpcClient-DXykrMtX.js → useSolanaRpcClient-COyhHAzq.js} +1 -1
- package/dist/cjs/{useWallets-CP2-zXxW.js → useWallets-C3RaxJM1.js} +1 -1
- package/dist/cjs/{useWallets-Bv9SU-di.js → useWallets-DMj2ztZn.js} +1 -1
- package/dist/dts/{events-context-CV9PiG6M.d.ts → events-context-JU6EgMXK.d.mts} +1 -1
- package/dist/dts/{events-context-CV9PiG6M.d.mts → events-context-JU6EgMXK.d.ts} +1 -1
- package/dist/dts/extended-chains.d.mts +1 -1
- package/dist/dts/extended-chains.d.ts +1 -1
- package/dist/dts/farcaster.d.mts +1 -1
- package/dist/dts/farcaster.d.ts +1 -1
- package/dist/dts/index.d.mts +27 -7
- package/dist/dts/index.d.ts +27 -7
- package/dist/dts/internal.d.mts +1 -1
- package/dist/dts/internal.d.ts +1 -1
- package/dist/dts/smart-wallets.d.mts +1 -1
- package/dist/dts/smart-wallets.d.ts +1 -1
- package/dist/dts/solana.d.mts +3 -3
- package/dist/dts/solana.d.ts +3 -3
- package/dist/dts/{types-xIUh0rN4.d.mts → types-BVn8nTiQ.d.mts} +48 -2
- package/dist/dts/{types-xIUh0rN4.d.ts → types-BVn8nTiQ.d.ts} +48 -2
- package/dist/dts/ui.d.mts +1 -1
- package/dist/dts/ui.d.ts +1 -1
- package/dist/esm/AccountNotFoundScreen-C2pbqBG5.mjs +1 -0
- package/dist/esm/{Address-BmCgxKQR.mjs → Address-BUuQgiKx.mjs} +1 -1
- package/dist/esm/AffirmativeConsentScreen-Dzep5iOm.mjs +6 -0
- package/dist/esm/AllowlistRejectionScreen-BsdZulEI.mjs +1 -0
- package/dist/esm/AuthenticateWithWalletScreen-CsJMj128.mjs +1 -0
- package/dist/esm/AwaitingEvmToSolBridgingScreen-DLbhkxwX.mjs +2 -0
- package/dist/esm/AwaitingExternalEthereumTransferScreen-DnC6EHU3.mjs +2 -0
- package/dist/esm/AwaitingPasswordlessCodeScreen-C7ijDazf.mjs +103 -0
- package/dist/esm/AwaitingSolToEvmBridgingScreen-Dyj2FHsc.mjs +2 -0
- package/dist/esm/{BridgeNetworkSelectionView-tyz86GlM.mjs → BridgeNetworkSelectionView-BxMqN8K9.mjs} +2 -2
- package/dist/esm/CaptchaScreen-whJmro23.mjs +1 -0
- package/dist/esm/CoinbaseOnrampStatusScreen-BUQ33EPn.mjs +16 -0
- package/dist/esm/ConnectEmailForm-7WKXyLIX.mjs +3 -0
- package/dist/esm/ConnectLedgerScreen-0KV09asJ.mjs +9 -0
- package/dist/esm/ConnectOnlyLandingScreen-zmLwJak1.mjs +1 -0
- package/dist/esm/ConnectOnlyStatusScreen-1icMWuif.mjs +1 -0
- package/dist/esm/ConnectOrCreateScreen-2TykrLcn.mjs +1 -0
- package/dist/esm/{ConnectPhoneForm-nVYECWzo.mjs → ConnectPhoneForm-Bww6OFqd.mjs} +1 -1
- package/dist/esm/ConnectWalletView-DQNMKorC.mjs +147 -0
- package/dist/esm/ConnectionStatusScreen-VsYDFXuf.mjs +7 -0
- package/dist/esm/CopyToClipboard-DSTf_eKU.mjs +39 -0
- package/dist/esm/CopyableText-BCytXyJL.mjs +23 -0
- package/dist/esm/CrossAppAuthScreen-C--90PAJ.mjs +1 -0
- package/dist/esm/{CustomLandingScreenView-B4a5Rc9z.mjs → CustomLandingScreenView-By1LM9_0.mjs} +4 -4
- package/dist/esm/DelegatedActionsConsentScreen-8g9H15c_.mjs +1 -0
- package/dist/esm/DelegatedActionsRevokeScreen-zc8PZT7I.mjs +1 -0
- package/dist/esm/EmbeddedWalletConnectingScreen-BGVioYgV.mjs +1 -0
- package/dist/esm/EmbeddedWalletCreatedScreen-Mhhj67RG.mjs +1 -0
- package/dist/esm/{EmbeddedWalletKeyExportScreen-B-6Lfc6D.mjs → EmbeddedWalletKeyExportScreen-yqPvQfdO.mjs} +3 -3
- package/dist/esm/EmbeddedWalletOnAccountCreateScreen-BOhuDYCL.mjs +1 -0
- package/dist/esm/EmbeddedWalletPasswordUpdateScreen-X518ZR44.mjs +1 -0
- package/dist/esm/EmbeddedWalletPasswordUpdateSplashScreen-DC4MfkYK.mjs +1 -0
- package/dist/esm/{EnrollTotp-D6VGtjIL.mjs → EnrollTotp-BcCG_2JB.mjs} +5 -5
- package/dist/esm/ErrorScreen-CfvFq4SG.mjs +4 -0
- package/dist/esm/{FarcasterConnectStatusScreen-BN_wRxNV.mjs → FarcasterConnectStatusScreen-BOCl_7jx.mjs} +6 -6
- package/dist/esm/FarcasterSignerStatusScreen-u4I-WK_R.mjs +28 -0
- package/dist/esm/FundSolWalletWithExternalSolanaWallet-BUIK74Vs.mjs +1 -0
- package/dist/esm/{FundWalletMethodHeader-Ce0vLrUa.mjs → FundWalletMethodHeader-CIBx6zhp.mjs} +1 -1
- package/dist/esm/FundWithBankDepositScreen-3QErhg-G.mjs +175 -0
- package/dist/esm/FundingEditAmountScreen-BgoXDEQJ.mjs +1 -0
- package/dist/esm/FundingMethodSelectionScreen-DtehXUD4.mjs +1 -0
- package/dist/esm/InAppBrowserLoginNotPossible-CQh8AsKB.mjs +1 -0
- package/dist/esm/{InfoBanner-Dk1KghcK.mjs → InfoBanner-DkQEPd77.mjs} +7 -4
- package/dist/esm/InstallWalletScreen-DM3c8LSP.mjs +1 -0
- package/dist/esm/LandingScreen-YPDnWhWL.mjs +1 -0
- package/dist/esm/{LinkConflictScreen-B-yRqIRn.mjs → LinkConflictScreen-hKT_zmu4.mjs} +3 -3
- package/dist/esm/LinkEmailScreen-Df1znKnY.mjs +1 -0
- package/dist/esm/{LinkPasskeyScreen-BfGROb2f.mjs → LinkPasskeyScreen-bcve9Yp2.mjs} +5 -5
- package/dist/esm/LinkPhoneScreen-o7rW47jd.mjs +1 -0
- package/dist/esm/LoginFailedScreen-C0I8TCwN.mjs +1 -0
- package/dist/esm/ManualTransferScreen-BvZ-uUht.mjs +1 -0
- package/dist/esm/MfaAuthEnrollmentFlowScreen-DK5SBNG1.mjs +1 -0
- package/dist/esm/MfaAuthVerifyFlowScreen-uFMuo7rY.mjs +1 -0
- package/dist/esm/MfaEnrollmentFlowScreen-D5btQxJc.mjs +1 -0
- package/dist/esm/MfaVerifyFlowScreen-DJVq1as_.mjs +1 -0
- package/dist/esm/{ModalHeader-CvLNEZ0F.mjs → ModalHeader-D0p4fONI.mjs} +31 -25
- package/dist/esm/MoonpayStatusScreen-Cfm8Qiby.mjs +16 -0
- package/dist/esm/OAuthStatusScreen-5eCQuPjc.mjs +1 -0
- package/dist/esm/PasskeySelectSignupOrLogin-Cv5Q8ywD.mjs +1 -0
- package/dist/esm/PasskeyStatusScreen-BvG8ib-c.mjs +3 -0
- package/dist/esm/PasswordRecoveryScreen-DxqMp8Jc.mjs +20 -0
- package/dist/esm/{QrCode-AKgpho6r.mjs → QrCode-DZulv1E7.mjs} +1 -1
- package/dist/esm/RecoveryOAuthStatusScreen-CAgXyVJk.mjs +1 -0
- package/dist/esm/RecoveryPasswordCreateScreen-DKt0Ntjx.mjs +1 -0
- package/dist/esm/{RecoverySelectionScreen-CJG-J3Aj.mjs → RecoverySelectionScreen-DCrjjtfj.mjs} +2 -2
- package/dist/esm/{Screen-DnEl8dVF.mjs → Screen-BVipC9vr.mjs} +21 -11
- package/dist/esm/ScreenLayout-jvcCZKF1.mjs +1 -0
- package/dist/esm/{SetAutomaticRecoveryScreen-CXNCqRU4.mjs → SetAutomaticRecoveryScreen-BfeoWlEq.mjs} +1 -1
- package/dist/esm/{SetWalletPasswordForm-Bns8qtXn.mjs → SetWalletPasswordForm-A8PITZIA.mjs} +4 -4
- package/dist/esm/{SignRequestScreen-7t8KCRXP.mjs → SignRequestScreen-BeJ09qE0.mjs} +4 -4
- package/dist/esm/{StandardSignAndSendTransactionScreen-BIJeFjT1.mjs → StandardSignAndSendTransactionScreen-D7QXH5p4.mjs} +2 -2
- package/dist/esm/TelegramAuthScreen-I0g5mHaE.mjs +1 -0
- package/dist/esm/{TransactionDetails-DhYW2qjK.mjs → TransactionDetails-JIdNJKup.mjs} +4 -4
- package/dist/esm/{TransactionErrorView-DtnhZ5P5.mjs → TransactionErrorView-UHPbTcc8.mjs} +8 -8
- package/dist/esm/{TransferFromWalletScreen-BdIo62Cg.mjs → TransferFromWalletScreen-DtSbt6rX.mjs} +3 -3
- package/dist/esm/{TransferOrBridgeLoadingScreen-C9hX5Ost.mjs → TransferOrBridgeLoadingScreen-bbU-Tw1f.mjs} +1 -1
- package/dist/esm/UpdateEmailScreen-B4t4yIw5.mjs +1 -0
- package/dist/esm/UpdatePhoneScreen-BeYLqIY0.mjs +1 -0
- package/dist/esm/UserLimitReachedScreen-Bj4M7xcN.mjs +1 -0
- package/dist/esm/{WalletInfoCard-CVCh-Z5E.mjs → WalletInfoCard-B-r0es4h.mjs} +2 -2
- package/dist/esm/WalletInterstitialScreen-CWc04MMh.mjs +1 -0
- package/dist/esm/{WalletLink-xufwYyQh.mjs → WalletLink-DlGvmqW7.mjs} +1 -1
- package/dist/esm/{WalletOverflowButton-qXN0KcGe.mjs → WalletOverflowButton-DHr4glN7.mjs} +1 -1
- package/dist/esm/abstract-smart-wallets.mjs +1 -1
- package/dist/esm/context-Drt9FC1y.mjs +1 -0
- package/dist/esm/{ethers-DGsvPPEp.mjs → ethers-UlIaNUWW.mjs} +1 -1
- package/dist/esm/extended-chains.mjs +1 -1
- package/dist/esm/get-is-unified-wallet-BC-7_b8O.mjs +1 -0
- package/dist/esm/{getErc20Balance-D0MGUaOw.mjs → getErc20Balance-DA4dGV9O.mjs} +1 -1
- package/dist/esm/{getErc20TokenInfo-CZJTqd4c.mjs → getErc20TokenInfo-1Q6w1Ibq.mjs} +1 -1
- package/dist/esm/{index-BMpFxPbi.mjs → index-B7hLnfAQ.mjs} +1 -1
- package/dist/esm/index-BZ6FAPh7.mjs +174 -0
- package/dist/esm/{index--X7RfrXS.mjs → index-Df3Phxz2.mjs} +3 -3
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal.mjs +1 -1
- package/dist/esm/{shared-CSN6-8CF.mjs → shared-BpuV-mxk.mjs} +1 -1
- package/dist/esm/{shouldProceedtoEmbeddedWalletCreationFlow-BdpCzEJT.mjs → shouldProceedtoEmbeddedWalletCreationFlow-COZ-_baJ.mjs} +1 -1
- package/dist/esm/{smart-wallets-DjBZWleC.mjs → smart-wallets-EqV3QCuS.mjs} +1 -1
- package/dist/esm/smart-wallets.mjs +1 -1
- package/dist/esm/solana.mjs +1 -1
- package/dist/esm/{styles-aArPlAod.mjs → styles-Dl341B8G.mjs} +15 -15
- package/dist/esm/{to-ui-error-DKeOToXI.mjs → to-ui-error-DvLMlZKC.mjs} +2 -2
- package/dist/esm/ui.mjs +16 -16
- package/dist/esm/use-export-wallet-BlKa-i97.mjs +1 -0
- package/dist/esm/{use-export-wallet-BcHSx5WT.mjs → use-export-wallet-CqWaIkKU.mjs} +1 -1
- package/dist/esm/{useActiveWallet-36SuARye.mjs → useActiveWallet-DGV02YBT.mjs} +1 -1
- package/dist/esm/useGetTokenPrice-CyEyHBvW.mjs +1 -0
- package/dist/esm/{useI18n-CbESkJQ7.mjs → useI18n-De-HiNn7.mjs} +1 -1
- package/dist/esm/usePrivy-pdKy_IjS.mjs +1 -0
- package/dist/esm/{useSolanaRpcClient-DajzMnxc.mjs → useSolanaRpcClient-DlKLUp1h.mjs} +1 -1
- package/dist/esm/{useWalletBalance-BDrbQBDX.mjs → useWalletBalance-CDyi5_iR.mjs} +1 -1
- package/dist/esm/{useWallets-BwdySlks.mjs → useWallets-BAZolsyf.mjs} +1 -1
- package/dist/esm/{useWallets-02TRgRMN.mjs → useWallets-CV3WTwML.mjs} +1 -1
- package/package.json +4 -3
- package/dist/cjs/AccountNotFoundScreen-iNQ-eJ82.js +0 -1
- package/dist/cjs/AffirmativeConsentScreen-Ba1XAxqh.js +0 -6
- package/dist/cjs/AllowlistRejectionScreen-CMZahkkw.js +0 -1
- package/dist/cjs/AuthenticateWithWalletScreen-BpfHRQ17.js +0 -1
- package/dist/cjs/AwaitingEvmToSolBridgingScreen-BWaBsau9.js +0 -2
- package/dist/cjs/AwaitingExternalEthereumTransferScreen-DN7h9ETe.js +0 -2
- package/dist/cjs/AwaitingPasswordlessCodeScreen-D2KbYvKF.js +0 -103
- package/dist/cjs/AwaitingSolToEvmBridgingScreen-C06q4jjQ.js +0 -2
- package/dist/cjs/CaptchaScreen-Bj5yik5Q.js +0 -1
- package/dist/cjs/CoinbaseOnrampStatusScreen-CP5PYZBV.js +0 -16
- package/dist/cjs/ConnectLedgerScreen-BazfRtiX.js +0 -9
- package/dist/cjs/ConnectOnlyLandingScreen-CsbSt3la.js +0 -1
- package/dist/cjs/ConnectOnlyStatusScreen-5aAg7ONz.js +0 -1
- package/dist/cjs/ConnectOrCreateScreen-C0t-tK0s.js +0 -1
- package/dist/cjs/ConnectWalletView-EuTf-6Vt.js +0 -171
- package/dist/cjs/ConnectionStatusScreen-BL6n6Ct-.js +0 -7
- package/dist/cjs/CopyToClipboard-BCe_l6_D.js +0 -39
- package/dist/cjs/CrossAppAuthScreen-fjiTzpoh.js +0 -1
- package/dist/cjs/DelegatedActionsConsentScreen-C2DG4aoM.js +0 -1
- package/dist/cjs/DelegatedActionsRevokeScreen-CCr2Kw57.js +0 -1
- package/dist/cjs/EmbeddedWalletConnectingScreen-BW3TLACZ.js +0 -1
- package/dist/cjs/EmbeddedWalletCreatedScreen-yTh0CETA.js +0 -1
- package/dist/cjs/EmbeddedWalletOnAccountCreateScreen-BJ9tuKSI.js +0 -1
- package/dist/cjs/EmbeddedWalletPasswordUpdateScreen-C3Pu2FvV.js +0 -1
- package/dist/cjs/EmbeddedWalletPasswordUpdateSplashScreen-Dzvq3GAs.js +0 -1
- package/dist/cjs/ErrorScreen-Dbie0wkk.js +0 -4
- package/dist/cjs/FarcasterSignerStatusScreen-CTZRoFL3.js +0 -29
- package/dist/cjs/FundSolWalletWithExternalSolanaWallet-Czi1l_qS.js +0 -2
- package/dist/cjs/FundingEditAmountScreen-xtC8kXZ9.js +0 -1
- package/dist/cjs/FundingMethodSelectionScreen-CwORHNKY.js +0 -1
- package/dist/cjs/InAppBrowserLoginNotPossible-D9m4nJvR.js +0 -1
- package/dist/cjs/InstallWalletScreen-D2iE62NY.js +0 -1
- package/dist/cjs/LandingScreen-Cclv1lfx.js +0 -1
- package/dist/cjs/LinkEmailScreen-DaTzx7Fk.js +0 -1
- package/dist/cjs/LinkPhoneScreen-Den2l7u5.js +0 -1
- package/dist/cjs/LoginFailedScreen-CG5VpqB1.js +0 -1
- package/dist/cjs/ManualTransferScreen-QVz0bbM4.js +0 -1
- package/dist/cjs/MfaAuthEnrollmentFlowScreen-CgEdqCAi.js +0 -1
- package/dist/cjs/MfaAuthVerifyFlowScreen-BmhIWVUg.js +0 -1
- package/dist/cjs/MfaEnrollmentFlowScreen-BSALpHSu.js +0 -1
- package/dist/cjs/MfaVerifyFlowScreen-NBi3M6EX.js +0 -1
- package/dist/cjs/MoonpayStatusScreen-DQCYOZ0M.js +0 -16
- package/dist/cjs/OAuthStatusScreen-Dzo0z0tK.js +0 -1
- package/dist/cjs/PasskeySelectSignupOrLogin-D6KxIann.js +0 -1
- package/dist/cjs/PasskeyStatusScreen-DfcsZHZm.js +0 -3
- package/dist/cjs/PasswordRecoveryScreen-DfpNr526.js +0 -20
- package/dist/cjs/RecoveryOAuthStatusScreen-CaoYW19J.js +0 -1
- package/dist/cjs/RecoveryPasswordCreateScreen-BEEpGGv7.js +0 -1
- package/dist/cjs/ScreenLayout-SSjax2iq.js +0 -1
- package/dist/cjs/TelegramAuthScreen-CrpOhr2m.js +0 -1
- package/dist/cjs/UpdateEmailScreen-GKUeQDLE.js +0 -1
- package/dist/cjs/UpdatePhoneScreen-BUA9FZ9k.js +0 -1
- package/dist/cjs/UserLimitReachedScreen-ByQxJS_K.js +0 -1
- package/dist/cjs/WalletInterstitialScreen-t0tp0uiQ.js +0 -1
- package/dist/cjs/copy-BiZ7dtqy.js +0 -1
- package/dist/cjs/index-DyCLWLpL.js +0 -174
- package/dist/cjs/use-export-wallet-COKs2yxH.js +0 -1
- package/dist/esm/AccountNotFoundScreen-Dty9AII6.mjs +0 -1
- package/dist/esm/AffirmativeConsentScreen-CZ3QtNmP.mjs +0 -6
- package/dist/esm/AllowlistRejectionScreen-DUd4GJIK.mjs +0 -1
- package/dist/esm/AuthenticateWithWalletScreen-Fa-n1Sey.mjs +0 -1
- package/dist/esm/AwaitingEvmToSolBridgingScreen-DCpcHpQX.mjs +0 -2
- package/dist/esm/AwaitingExternalEthereumTransferScreen-D1V2_vDk.mjs +0 -2
- package/dist/esm/AwaitingPasswordlessCodeScreen-DGAxwdL6.mjs +0 -103
- package/dist/esm/AwaitingSolToEvmBridgingScreen-B6Xv92AB.mjs +0 -2
- package/dist/esm/CaptchaScreen-BL1nWi7c.mjs +0 -1
- package/dist/esm/CoinbaseOnrampStatusScreen-DhIZ3gwP.mjs +0 -16
- package/dist/esm/ConnectEmailForm-DvQJmoTc.mjs +0 -3
- package/dist/esm/ConnectLedgerScreen-CURsQoYz.mjs +0 -9
- package/dist/esm/ConnectOnlyLandingScreen-CBjbbuDg.mjs +0 -1
- package/dist/esm/ConnectOnlyStatusScreen-VM7nNu6X.mjs +0 -1
- package/dist/esm/ConnectOrCreateScreen-8FxDiOyl.mjs +0 -1
- package/dist/esm/ConnectWalletView-BXqs6pWG.mjs +0 -171
- package/dist/esm/ConnectionStatusScreen-SAx7YO5y.mjs +0 -7
- package/dist/esm/CopyToClipboard-BGTSFnT3.mjs +0 -39
- package/dist/esm/CrossAppAuthScreen-V6LW9fie.mjs +0 -1
- package/dist/esm/DelegatedActionsConsentScreen-0_shAgnh.mjs +0 -1
- package/dist/esm/DelegatedActionsRevokeScreen-olNf5JQw.mjs +0 -1
- package/dist/esm/EmbeddedWalletConnectingScreen-Dleo6nTw.mjs +0 -1
- package/dist/esm/EmbeddedWalletCreatedScreen-Dx0eaEaV.mjs +0 -1
- package/dist/esm/EmbeddedWalletOnAccountCreateScreen-DbiGNXpt.mjs +0 -1
- package/dist/esm/EmbeddedWalletPasswordUpdateScreen-fA9JGXuz.mjs +0 -1
- package/dist/esm/EmbeddedWalletPasswordUpdateSplashScreen-CTPO_C5V.mjs +0 -1
- package/dist/esm/ErrorScreen-Ba4Ml9CI.mjs +0 -4
- package/dist/esm/FarcasterSignerStatusScreen-B8IyPJhe.mjs +0 -28
- package/dist/esm/FundSolWalletWithExternalSolanaWallet-B3Y84dbg.mjs +0 -1
- package/dist/esm/FundingEditAmountScreen-DeM_ClwN.mjs +0 -1
- package/dist/esm/FundingMethodSelectionScreen-Be8LIw6i.mjs +0 -1
- package/dist/esm/InAppBrowserLoginNotPossible-7kqa69SP.mjs +0 -1
- package/dist/esm/InstallWalletScreen-EfqvUoSZ.mjs +0 -1
- package/dist/esm/LandingScreen-DPaqiLpx.mjs +0 -1
- package/dist/esm/LinkEmailScreen-CQ5mnYS9.mjs +0 -1
- package/dist/esm/LinkPhoneScreen-CVNSbTfD.mjs +0 -1
- package/dist/esm/LoginFailedScreen-B2KtCyAw.mjs +0 -1
- package/dist/esm/ManualTransferScreen-C2Rl54K3.mjs +0 -1
- package/dist/esm/MfaAuthEnrollmentFlowScreen-D6ujM0kh.mjs +0 -1
- package/dist/esm/MfaAuthVerifyFlowScreen-zG9ps8-7.mjs +0 -1
- package/dist/esm/MfaEnrollmentFlowScreen-gELi8Ppl.mjs +0 -1
- package/dist/esm/MfaVerifyFlowScreen-6eccLZxg.mjs +0 -1
- package/dist/esm/MoonpayStatusScreen-u9OjnVb2.mjs +0 -16
- package/dist/esm/OAuthStatusScreen-C4KNGm-v.mjs +0 -1
- package/dist/esm/PasskeySelectSignupOrLogin-DM959Ikc.mjs +0 -1
- package/dist/esm/PasskeyStatusScreen-BfUHTu2T.mjs +0 -3
- package/dist/esm/PasswordRecoveryScreen-BnkB7Xwe.mjs +0 -20
- package/dist/esm/RecoveryOAuthStatusScreen-DaP1Oh1u.mjs +0 -1
- package/dist/esm/RecoveryPasswordCreateScreen-B-dLBQVH.mjs +0 -1
- package/dist/esm/ScreenLayout-kyRBwF5n.mjs +0 -1
- package/dist/esm/TelegramAuthScreen-D-cJY_dj.mjs +0 -1
- package/dist/esm/UpdateEmailScreen-0TGU13Qv.mjs +0 -1
- package/dist/esm/UpdatePhoneScreen-C7fQ2ohl.mjs +0 -1
- package/dist/esm/UserLimitReachedScreen-dLjGUBN-.mjs +0 -1
- package/dist/esm/WalletInterstitialScreen-C8UPLmif.mjs +0 -1
- package/dist/esm/context-CwMpvKNV.mjs +0 -1
- package/dist/esm/copy-Bx2Jwc5_.mjs +0 -1
- package/dist/esm/get-is-unified-wallet-C6sEzDpG.mjs +0 -1
- package/dist/esm/index-C47JxA4c.mjs +0 -174
- package/dist/esm/use-export-wallet-CwQ5-CS4.mjs +0 -1
- package/dist/esm/useGetTokenPrice-CgGm0Ecu.mjs +0 -1
- package/dist/esm/usePrivy-D_kd_mMH.mjs +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsxs as e,Fragment as o,jsx as t}from"react/jsx-runtime";import r from"@heroicons/react/24/outline/QuestionMarkCircleIcon";import i from"@heroicons/react/24/outline/ShieldCheckIcon";import{useState as n}from"react";import{M as s,b as a,P as m}from"./ModalHeader-CvLNEZ0F.mjs";import{L as l}from"./useActiveWallet-36SuARye.mjs";import{u as c}from"./context-CwMpvKNV.mjs";import{u as p,a as u}from"./get-is-unified-wallet-C6sEzDpG.mjs";import{M as d,E as h,a as y,b as f}from"./EnrollTotp-D6VGtjIL.mjs";import{A as v,C as j,I as k,T as g,S as C,B as w}from"./PinInput-3SLvbnQa.mjs";import"styled-components";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"zustand";import"react-device-detect";import"./use-export-wallet-CwQ5-CS4.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"viem/utils";import"./useWallets-02TRgRMN.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"tinycolor2";import"@heroicons/react/24/outline/ChevronRightIcon";import"@heroicons/react/24/outline/DevicePhoneMobileIcon";import"@heroicons/react/24/outline/FingerPrintIcon";import"@heroicons/react/24/outline/MinusCircleIcon";import"@heroicons/react/24/outline/PhoneIcon";import"./Chip-D2-wZOHJ.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"@heroicons/react/24/outline/ArrowRightEndOnRectangleIcon";import"@heroicons/react/24/outline/ClockIcon";import"./ErrorScreen-Ba4Ml9CI.mjs";import"lucide-react";import"./index-C47JxA4c.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-D_kd_mMH.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./reservoir-0wfhnc0j.mjs";import"./ScreenLayout-kyRBwF5n.mjs";import"./Screen-DnEl8dVF.mjs";import"./index-Dq_xe9dz.mjs";import"./LinkPasskeyScreen-BfGROb2f.mjs";import"./TodoList-CgrU7uwu.mjs";import"./CopyToClipboard-BGTSFnT3.mjs";import"./copy-Bx2Jwc5_.mjs";import"./Layouts-BlFm53ED.mjs";import"./Column-C2X2MHYX.mjs";import"./LabelXs-oqZNqbm_.mjs";import"./Subtitle-CV-2yKE4.mjs";import"./Title-BnzYV3Is.mjs";import"./shared-FM0rljBt.mjs";import"@heroicons/react/24/solid/ShieldCheckIcon";import"./QrCode-AKgpho6r.mjs";import"qrcode";const M={component:()=>{let{user:M,ready:b}=p(),{data:I,onUserCloseViaDialogOrKeybindRef:P}=u(),S=c(),[A,E]=n(null),[R,T]=n(null),[x,F]=n(null),[L,B]=n(!1),[U,W]=n(!1),[D,O]=n(),$=async()=>{D?H(D):M?await K({user:M}):H(Error("Must be logged in to manage MFA")),setTimeout((()=>{E(null),T(null)}),500)};if(P.current=$,!I?.mfaEnroll)throw Error("Missing modal data for MFA enrollment screen.");let{onFailure:H,onSuccess:K,onBack:Q,mfaMethods:X,verify:q,generateTotpSecret:z,enrollTotp:N,unenrollTotp:V,enrollPasskey:Y}=I.mfaEnroll,G=M?.mfaMethods.includes("sms"),J=M?.mfaMethods.includes("totp"),Z=M?.mfaMethods.includes("passkey"),_=!!M?.phone,ee=M?.linkedAccounts.filter((e=>"passkey"===e.type)).map((e=>e.credentialId))??[];function oe(){E(null),T(null),O(void 0)}async function te(e=ee){try{O(void 0),W(!0);let o=await Y(e);return await K({user:o})}catch(e){O(e)}finally{W(!1),B(!1)}}if(!b||!M||!S)/*#__PURE__*/return e(o,{children:[/*#__PURE__*/t(s,{onClose:$,backFn:Q},"header"),/*#__PURE__*/t(v,{children:/*#__PURE__*/t(d,{})}),/*#__PURE__*/t(j,{children:/*#__PURE__*/t(l,{})}),/*#__PURE__*/t(a,{})]});if("sms"===A)return null;if("totp"===A)/*#__PURE__*/return e(o,{children:[/*#__PURE__*/t(s,{backFn:oe,onClose:$},"header"),/*#__PURE__*/t(k,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/t(r,{})}),/*#__PURE__*/t(g,{children:"Remove authenticator app verification?"}),/*#__PURE__*/e(C,{children:["MFA adds an extra layer of security to your ",S?.name," account. Make sure you have other methods to secure your account."]}),/*#__PURE__*/t(w,{children:/*#__PURE__*/t(m,{$warn:!0,onClick:async function(){try{O(void 0),W(!0);let e=await V();return await K({user:e})}catch(e){O(e)}finally{W(!1),E(null)}},loading:U,children:"Remove"})}),/*#__PURE__*/t(a,{})]});if("passkey"===A){let i=I.mfaEnroll.shouldUnlinkOnUnenrollMfa??!0;/*#__PURE__*/return e(o,{children:[/*#__PURE__*/t(s,{backFn:oe,onClose:$},"header"),/*#__PURE__*/t(k,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/t(r,{})}),/*#__PURE__*/t(g,{children:"Are you sure you want to remove this passkey?"}),/*#__PURE__*/t(C,{children:i?"Removing your passkey will remove as both a verification method and a login method.":"Removing your passkey will remove as a verification method."}),/*#__PURE__*/t(w,{children:/*#__PURE__*/t(m,{$warn:!0,onClick:async function(){try{O(void 0),W(!0);let e=await Y([]);return await K({user:e})}catch(e){O(e)}finally{W(!1),E(null)}},loading:U,children:"Remove"})}),/*#__PURE__*/t(a,{})]})}return 0!==X.length||G||J||Z?"sms"===R?null:"totp"===R&&x?/*#__PURE__*/t(h,{onClose:$,onReset:oe,submitEnrollmentWithTotp:e=>async function(e){try{O(void 0),W(!0);let o=await N(e);return await K({user:o})}catch(e){O(e)}finally{W(!1),E(null)}}(e.mfaCode),error:D,totpInfo:{...x,appName:S?.name||"Privy"}}):"passkey"===R?/*#__PURE__*/t(y,{onReset:oe,onClose:$,submitEnrollmentWithPasskey:te}):/*#__PURE__*/t(f,{showIntro:!0,userMfaMethods:M.mfaMethods,appMfaMethods:S.mfa.methods,userHasAuthSms:_,backFn:Q,handleSelectMethod:async function(e){O(void 0);try{await q()}catch(e){return void O(e)}return"totp"===e?(T(e),F(null),void z().then((({totpSecret:e,totpAuthUrl:o})=>{F({authUrl:o,secret:e})})).catch((()=>{F(null),oe()}))):"passkey"===e&&1===ee.length?await te():void T(e)},isTotpLoading:"totp"===R&&!x,isPasskeyLoading:L,error:D,onClose:$,setRemovingMfaMethod:async function(e){O(void 0);try{await q()}catch(e){return void O(e)}E(e)}}):/*#__PURE__*/e(o,{children:[/*#__PURE__*/t(s,{onClose:$,backFn:Q},"header"),/*#__PURE__*/t(k,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/t(i,{})}),/*#__PURE__*/t(g,{children:"Add more security"}),/*#__PURE__*/e(C,{children:[S?.name," does not have any verification methods enabled."]}),/*#__PURE__*/t(w,{children:/*#__PURE__*/t(m,{onClick:$,children:"Close"})}),/*#__PURE__*/t(a,{})]})}};export{M as MfaAuthEnrollmentFlowScreen,M as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as o}from"react/jsx-runtime";import{useMemo as e,useState as t,useEffect as r,useRef as i}from"react";import{u as s}from"./context-CwMpvKNV.mjs";import{u as m,a as n}from"./get-is-unified-wallet-C6sEzDpG.mjs";import{V as a,a as c,b as p,t as l}from"./to-ui-error-DKeOToXI.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"viem";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"@heroicons/react/24/outline/DevicePhoneMobileIcon";import"@heroicons/react/24/outline/FingerPrintIcon";import"@heroicons/react/24/outline/PhoneIcon";import"@heroicons/react/24/outline/ShieldCheckIcon";import"./ModalHeader-CvLNEZ0F.mjs";import"styled-components";import"./useActiveWallet-36SuARye.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-CwQ5-CS4.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-02TRgRMN.mjs";import"./events-context-CI0iqAXA.mjs";import"./getPublicClient-B4uPLKn-.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./ScreenLayout-kyRBwF5n.mjs";import"./Screen-DnEl8dVF.mjs";import"./index-Dq_xe9dz.mjs";import"./PinInput-3SLvbnQa.mjs";import"@heroicons/react/24/outline/CalendarIcon";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"./StackedContainer-B2vaEl56.mjs";import"./useGetTokenPrice-CgGm0Ecu.mjs";import"./useGetSolPrice-DwwjjGbd.mjs";import"./index-C47JxA4c.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-D_kd_mMH.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./TransactionDetails-DhYW2qjK.mjs";import"./WalletLink-xufwYyQh.mjs";import"./ethers-DGsvPPEp.mjs";import"./getFormattedUsdFromLamports-B6EqSEho.mjs";import"./transaction-CnfuREWo.mjs";import"./Layouts-BlFm53ED.mjs";import"@heroicons/react/24/outline/ChevronDownIcon";const u={component:()=>{let{user:u}=m(),d=s(),h=e((()=>u?.mfaMethods.filter((o=>"passkey"!==o||!d.globalDisablePasskeys))??[]),[u?.mfaMethods,d.globalDisablePasskeys]),{data:f}=n(),[j,y]=t(h[0]),[v,k]=t(!1),[g,w]=t(),[C,b]=t();if(r((()=>{y(h[0])}),[h]),!f?.mfaVerify)throw Error("Missing modal data for MFA verification screen.");let{onFailure:M,onSuccess:P,generateOptions:S,verifyTotpCode:I,verifyPasskey:x,verifySmsCode:A,sendSmsCode:E}=f.mfaVerify,B=async o=>{if("passkey"!==o)try{y(o),"sms"===o&&(y(o),await E()),"totp"===o&&y(o)}catch(o){console.error(o)}else try{y(o);let e=await S();if(!e)throw Error("something went wrong");w(e),await x(e),k(!0),b(void 0),P()}catch(o){b(l(o))}},D=async o=>{b(void 0);try{if(!o||!j)return;if("passkey"===j){if(!g)throw Error("Missing passkey challenge");await x(g)}else"sms"===j?await A(o):"totp"===j&&await I(o);b(void 0),k(!0),P()}catch(o){throw l(o).error}},F=()=>{C||!v?M(C?.error??Error("Canceled MFA verification.")):P()},L=i(!1);return r((()=>{!L.current&&j&&(L.current=!0,B(j).finally((()=>{L.current=!1})))}),[open]),u?"passkey"===j?/*#__PURE__*/o(a,{account:u.linkedAccounts.filter((o=>"passkey"===o.type&&o.enrolledInMfa)).sort(((o,e)=>e.firstVerifiedAt.valueOf()-o.firstVerifiedAt.valueOf()))[0],submitSuccess:v,hasBlockingError:C?.isBlocking??!1,error:C?.error,onClose:F,onBack:()=>{y(void 0),b(void 0)},handleSubmit:()=>D(g).catch(b)}):"sms"===j||"totp"===j?/*#__PURE__*/o(c,{selectedMethod:j,submitSuccess:v,hasBlockingError:C?.isBlocking??!1,handleSubmitCode:D,onClose:F,onBack:h.length>1?()=>y(void 0):void 0}):/*#__PURE__*/o(p,{mfaMethods:h,onSelect:B,handleClose:F}):null}};export{u as MfaAuthVerifyFlowScreen,u as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as e,jsxs as o,Fragment as r}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/QuestionMarkCircleIcon";import n from"@heroicons/react/24/outline/ShieldCheckIcon";import i from"@heroicons/react/24/solid/CheckBadgeIcon";import l from"@heroicons/react/24/solid/IdentificationIcon";import{useState as a,useEffect as s}from"react";import{M as c,b as m,P as d,S as h}from"./ModalHeader-CvLNEZ0F.mjs";import{L as u}from"./useActiveWallet-36SuARye.mjs";import{u as p}from"./context-CwMpvKNV.mjs";import{u as y}from"./internal-context-Z-fyxadS.mjs";import{a as f,u as v}from"./get-is-unified-wallet-C6sEzDpG.mjs";import{d as C,f as w,g as k,h as g,i as j,u as b}from"./index-C47JxA4c.mjs";import{M,E as S,a as E,b as I}from"./EnrollTotp-D6VGtjIL.mjs";import P from"@heroicons/react/24/outline/CheckCircleIcon";import F from"@heroicons/react/24/outline/PhoneIcon";import{lastFourDigits as R}from"@privy-io/js-sdk-core";import{C as x}from"./ConnectPhoneForm-nVYECWzo.mjs";import{I as T,T as W,S as L,C as A,a as B,B as N,N as U,A as O,L as D,b as Y,c as $}from"./PinInput-3SLvbnQa.mjs";import{ErrorScreenView as q}from"./ErrorScreen-Ba4Ml9CI.mjs";import"styled-components";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/XMarkIcon";import"zustand";import"react-device-detect";import"./use-export-wallet-CwQ5-CS4.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-02TRgRMN.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"tinycolor2";import"ofetch";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-D_kd_mMH.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"@heroicons/react/24/outline/ChevronRightIcon";import"@heroicons/react/24/outline/DevicePhoneMobileIcon";import"@heroicons/react/24/outline/FingerPrintIcon";import"@heroicons/react/24/outline/MinusCircleIcon";import"./Chip-D2-wZOHJ.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"@heroicons/react/24/outline/ArrowRightEndOnRectangleIcon";import"@heroicons/react/24/outline/ClockIcon";import"./LinkPasskeyScreen-BfGROb2f.mjs";import"lucide-react";import"./TodoList-CgrU7uwu.mjs";import"./ScreenLayout-kyRBwF5n.mjs";import"./Screen-DnEl8dVF.mjs";import"./index-Dq_xe9dz.mjs";import"./CopyToClipboard-BGTSFnT3.mjs";import"./copy-Bx2Jwc5_.mjs";import"./Layouts-BlFm53ED.mjs";import"./Column-C2X2MHYX.mjs";import"./LabelXs-oqZNqbm_.mjs";import"./Subtitle-CV-2yKE4.mjs";import"./Title-BnzYV3Is.mjs";import"./shared-FM0rljBt.mjs";import"@heroicons/react/24/solid/ShieldCheckIcon";import"./QrCode-AKgpho6r.mjs";import"qrcode";import"./reservoir-0wfhnc0j.mjs";const H=({appName:t,onComplete:n,onReset:i,onClose:l})=>{let[s,h]=a(""),[u,y]=a(!1),[v,b]=a(null),[M,S]=a("enroll"),{initEnrollmentWithSms:E,submitEnrollmentWithSms:I}=C(),{data:O}=f(),D=p();function Y(){O?.mfaEnrollmentFlow?.onSuccess(),n()}return v?/*#__PURE__*/e(q,{allowlistConfig:D.allowlistConfig,error:v,onBack:()=>b(null),onRetry:()=>b(null)}):/*#__PURE__*/o(r,"enroll"===M?{children:[/*#__PURE__*/e(c,{backFn:i,onClose:l},"header"),/*#__PURE__*/e(T,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(F,{})}),/*#__PURE__*/e(W,{children:"Set up SMS verification"}),/*#__PURE__*/o(L,{children:["We'll text a verification code to this mobile device whenever you use your ",t," ","wallet."]}),/*#__PURE__*/o(A,{children:[/*#__PURE__*/e(x,{onSubmit:async function({qualifiedPhoneNumber:e}){try{await E({phoneNumber:e}),h(e),S("verify")}catch(e){b(e)}},hideRecent:!0}),/*#__PURE__*/o(B,{children:["By providing your mobile number, you agree to receive text messages from ",D?.name,". Some carrier charges may apply"]})]}),/*#__PURE__*/e(m,{})]}:u?{children:[/*#__PURE__*/e(c,{onClose:Y},"header"),/*#__PURE__*/e(T,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(P,{})}),/*#__PURE__*/e(W,{children:"SMS verification added"}),/*#__PURE__*/o(L,{children:["From now on, you'll enter the verification code sent to your mobile device whenever you use your ",t," wallet."]}),/*#__PURE__*/e(N,{children:/*#__PURE__*/e(d,{onClick:Y,children:"Done"})}),/*#__PURE__*/e(m,{})]}:{children:[/*#__PURE__*/e(c,{backFn:function(){"verify"===M?S("enroll"):i()},onClose:l},"header"),/*#__PURE__*/e(T,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(F,{})}),/*#__PURE__*/e(W,{children:"Enter enrollment code"}),/*#__PURE__*/o(A,{children:[/*#__PURE__*/e(U,{onChange:async function(e){try{if(!e)return;await I({phoneNumber:s,mfaCode:e}),y(!0)}catch(e){if(w(e))throw Error("You have exceeded the maximum number of attempts. Please close this window and try again in 10 seconds.");if(k(e))throw Error("The code you entered is not valid");if(g(e))throw Error("You have exceeded the time limit for code entry. Please try again in 30 seconds.");throw j(e)?Error("Verification canceled"):Error("Unknown error")}}}),/*#__PURE__*/o(L,{children:["To continue, enter the 6-digit code sent to ",/*#__PURE__*/e("strong",{children:R(s)})]})]}),/*#__PURE__*/e(m,{})]})},K={component:()=>{let{user:w,enrollInMfa:k,ready:g}=v(),[j,P]=a(null),{unenrollWithSms:F,unenrollWithTotp:R,unenrollWithPasskey:x,submitEnrollmentWithTotp:B,initEnrollmentWithPasskey:U,submitEnrollmentWithPasskey:q,initEnrollmentWithTotp:K}=C(),{data:Q,onUserCloseViaDialogOrKeybindRef:V}=f(),X=p(),{closePrivyModal:z}=y(),{promptMfa:G}=b(),[J,Z]=a(!1),[_,ee]=a(null),[oe,re]=a(null),te=()=>{z({shouldCallAuthOnSuccess:!0}),k(!1),setTimeout((()=>{P(null),ee(null)}),500)},[ne,ie]=a(!1),[le,ae]=a();V.current=te;let se=w?.mfaMethods.includes("sms"),ce=!!w?.phone,me=w?.mfaMethods.includes("totp"),de=w?.mfaMethods.includes("passkey"),he=se||me||de,ue=w?.linkedAccounts.filter((e=>"passkey"===e.type)).map((e=>e.credentialId))??[];function pe(){P(null),ee(null)}async function ye(e=ue){ie(!0);try{return await U(),await q({credentialIds:e},{removeForLogin:Q?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa}),Q?.mfaEnrollmentFlow?.onSuccess(),te()}catch(e){ae(e)}finally{ie(!1)}}if(s((()=>{he&&Z(!0)}),[he]),!g||!w||!X/*#__PURE__*/)return o(r,{children:[/*#__PURE__*/e(c,{onClose:te},"header"),/*#__PURE__*/e(O,{children:/*#__PURE__*/e(M,{})}),/*#__PURE__*/e(A,{children:/*#__PURE__*/e(u,{})}),/*#__PURE__*/e(m,{})]});if("sms"===j)/*#__PURE__*/return o(r,{children:[/*#__PURE__*/e(c,{backFn:pe,onClose:te},"header"),/*#__PURE__*/e(T,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(t,{})}),/*#__PURE__*/e(W,{children:"Remove SMS verification?"}),/*#__PURE__*/o(L,{children:["MFA adds an extra layer of security to your ",X?.name," account. Make sure you have other methods to secure your account."]}),/*#__PURE__*/e(N,{children:/*#__PURE__*/e(d,{$warn:!0,onClick:async function(){P(null);try{await F()}catch(e){P(null)}},children:"Remove"})}),/*#__PURE__*/e(m,{})]});if("totp"===j)/*#__PURE__*/return o(r,{children:[/*#__PURE__*/e(c,{backFn:pe,onClose:te},"header"),/*#__PURE__*/e(T,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(t,{})}),/*#__PURE__*/e(W,{children:"Remove authenticator app verification?"}),/*#__PURE__*/o(L,{children:["MFA adds an extra layer of security to your ",X?.name," account. Make sure you have other methods to secure your account."]}),/*#__PURE__*/e(N,{children:/*#__PURE__*/e(d,{$warn:!0,onClick:async function(){P(null);try{await R()}catch(e){P(null)}},children:"Remove"})}),/*#__PURE__*/e(m,{})]});if("passkey"===j){let n=Q?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa??!0;/*#__PURE__*/return o(r,{children:[/*#__PURE__*/e(c,{backFn:pe,onClose:te},"header"),/*#__PURE__*/e(T,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(t,{})}),/*#__PURE__*/e(W,{children:"Are you sure you want to remove this passkey?"}),/*#__PURE__*/e(L,{children:n?"Removing your passkey will remove as both a verification method and a login method.":"Removing your passkey will remove as a verification method."}),/*#__PURE__*/e(N,{children:/*#__PURE__*/e(d,{$warn:!0,onClick:async function(){P(null);try{await x({removeForLogin:Q?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa})}catch(e){P(null)}},children:"Remove"})}),/*#__PURE__*/e(m,{})]})}if(0===Q.mfaEnrollmentFlow.mfaMethods.length&&!he)/*#__PURE__*/return o(r,{children:[/*#__PURE__*/e(c,{onClose:te},"header"),/*#__PURE__*/e(T,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(n,{})}),/*#__PURE__*/e(W,{children:"Add more security"}),/*#__PURE__*/o(L,{children:[X?.name," does not have any verification methods enabled."]}),/*#__PURE__*/e(N,{children:/*#__PURE__*/e(d,{onClick:te,children:"Close"})}),/*#__PURE__*/e(m,{})]});let fe=!he&&!J;return fe?/*#__PURE__*/o(r,{children:[/*#__PURE__*/e(c,{onClose:te},"header"),/*#__PURE__*/e(T,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(n,{})}),/*#__PURE__*/e(W,{children:"Transaction Protection"}),/*#__PURE__*/e(L,{children:"Set up transaction protection to add an extra layer of security to your account"}),/*#__PURE__*/o(D,{children:[/*#__PURE__*/o(Y,{children:[/*#__PURE__*/e($,{children:/*#__PURE__*/e(i,{})}),"Enable 2-Step verification for your ",X?.name," wallet."]}),/*#__PURE__*/o(Y,{children:[/*#__PURE__*/e($,{children:/*#__PURE__*/e(l,{})}),"You'll be prompted to authenticate to complete transactions."]})]}),/*#__PURE__*/o(N,{children:[/*#__PURE__*/e(d,{onClick:()=>Z(!0),children:"Continue"}),/*#__PURE__*/e(h,{onClick:te,children:"Not now"})]}),/*#__PURE__*/e(m,{})]}):"sms"===_?/*#__PURE__*/e(H,{appName:X?.name||"Privy",onComplete:te,onReset:pe,onClose:te}):"totp"===_&&oe?/*#__PURE__*/e(S,{onClose:te,onReset:pe,submitEnrollmentWithTotp:({mfaCode:e})=>async function(e){try{return ae(void 0),await B({mfaCode:e}),Q?.mfaEnrollmentFlow?.onSuccess(),te()}catch(e){ae(e)}finally{P(null)}}(e),totpInfo:{...oe,appName:X?.name||"Privy"}}):"passkey"===_?/*#__PURE__*/e(E,{onReset:pe,onClose:te,submitEnrollmentWithPasskey:ye}):/*#__PURE__*/e(I,{showIntro:fe,userMfaMethods:w.mfaMethods,appMfaMethods:X.mfa.methods,userHasAuthSms:ce,backFn:function(){Z(!1)},handleSelectMethod:async function(e){try{await G()}catch(e){return void ae(e)}return"totp"===e?(ee(e),re(null),void K().then((e=>{re(e)})).catch((()=>{re(null),pe()}))):"passkey"===e&&1===ue.length?await ye():void ee(e)},isTotpLoading:"totp"===_&&!oe,isPasskeyLoading:ne,error:le,onClose:te,setRemovingMfaMethod:async e=>{try{await G()}catch(e){return void ae(e)}P(e)}})}};export{K as MfaEnrollmentFlowScreen,K as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as o}from"react/jsx-runtime";import{useMemo as t,useState as e,useEffect as r,useRef as i}from"react";import{u as s}from"./context-CwMpvKNV.mjs";import{u as m}from"./get-is-unified-wallet-C6sEzDpG.mjs";import{u as n}from"./index-C47JxA4c.mjs";import{V as a,a as c,b as l,t as p}from"./to-ui-error-DKeOToXI.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"viem";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-36SuARye.mjs";import"zustand";import"styled-components";import"react-device-detect";import"./use-export-wallet-CwQ5-CS4.mjs";import"viem/utils";import"./useWallets-02TRgRMN.mjs";import"./events-context-CI0iqAXA.mjs";import"./getPublicClient-B4uPLKn-.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-D_kd_mMH.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"@heroicons/react/24/outline/DevicePhoneMobileIcon";import"@heroicons/react/24/outline/FingerPrintIcon";import"@heroicons/react/24/outline/PhoneIcon";import"@heroicons/react/24/outline/ShieldCheckIcon";import"./ModalHeader-CvLNEZ0F.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./ScreenLayout-kyRBwF5n.mjs";import"./Screen-DnEl8dVF.mjs";import"./index-Dq_xe9dz.mjs";import"./PinInput-3SLvbnQa.mjs";import"@heroicons/react/24/outline/CalendarIcon";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"./StackedContainer-B2vaEl56.mjs";import"./useGetTokenPrice-CgGm0Ecu.mjs";import"./useGetSolPrice-DwwjjGbd.mjs";import"./TransactionDetails-DhYW2qjK.mjs";import"./WalletLink-xufwYyQh.mjs";import"./ethers-DGsvPPEp.mjs";import"./getFormattedUsdFromLamports-B6EqSEho.mjs";import"./transaction-CnfuREWo.mjs";import"./Layouts-BlFm53ED.mjs";import"@heroicons/react/24/outline/ChevronDownIcon";const u=({onClose:u})=>{let{user:d}=m(),h=s(),j=t((()=>d?.mfaMethods.filter((o=>"passkey"!==o||!h.globalDisablePasskeys))??[]),[d?.mfaMethods,h.globalDisablePasskeys]),[f,v]=e(j[0]??null),{init:y,cancel:k,submit:g}=n(),[b,w]=e(!1),[C,I]=e(null),[P,x]=e();r((()=>{v(j[0]??null)}),[j]);let S=i(!1);async function M(o){x(void 0);try{if(!o||!f)return;await g(f,o),w(!0),x(void 0),u()}catch(o){throw p(o).error}}async function A(o){if("passkey"!==o)try{v(o),await y(o)}catch(o){console.error(o)}else try{v(o);let t=await y(o);if(!t)throw Error("something went wrong");I(t),await g(o,t),w(!0),x(void 0),u()}catch(o){x(p(o))}}r((()=>{!S.current&&f&&(S.current=!0,A(f).finally((()=>{S.current=!1})))}),[]);let B=()=>{v(null),x(void 0),k(),u()};return d?"passkey"===f?/*#__PURE__*/o(a,{account:d.linkedAccounts.filter((o=>"passkey"===o.type&&o.enrolledInMfa)).sort(((o,t)=>t.firstVerifiedAt.valueOf()-o.firstVerifiedAt.valueOf()))[0],submitSuccess:b,hasBlockingError:P?.isBlocking??!1,error:P?.error,onClose:B,onBack:()=>{v(null),x(void 0)},handleSubmit:()=>M(C).catch(x)}):f?/*#__PURE__*/o(c,{submitSuccess:b,hasBlockingError:P?.isBlocking??!1,handleSubmitCode:M,selectedMethod:f,onClose:B,onBack:j.length>1?()=>v(null):void 0}):/*#__PURE__*/o(l,{mfaMethods:j,onSelect:A,handleClose:B}):null};export{u as MfaVerifyFlowScreen,u as default};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import{jsx as t,jsxs as e,Fragment as r}from"react/jsx-runtime";import o from"@heroicons/react/24/solid/ArrowsRightLeftIcon";import i from"@heroicons/react/24/solid/CheckCircleIcon";import{useMemo as n}from"react";import{styled as a}from"styled-components";import{M as l,B as s,P as c}from"./ModalHeader-CvLNEZ0F.mjs";import{a as m}from"./Layouts-BlFm53ED.mjs";import{L as d,a7 as u}from"./useActiveWallet-36SuARye.mjs";import{u as p}from"./context-CwMpvKNV.mjs";import{u as h}from"./internal-context-Z-fyxadS.mjs";import{a as f}from"./get-is-unified-wallet-C6sEzDpG.mjs";import{u as g}from"./index-BMpFxPbi.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"zustand";import"react-device-detect";import"./use-export-wallet-CwQ5-CS4.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"viem/utils";import"./useWallets-02TRgRMN.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"tinycolor2";import"ofetch";import"./analytics-mkkvFRju.mjs";const y=({size:r=61,...o})=>/*#__PURE__*/t("svg",{width:r,height:r,viewBox:"0 0 61 61",fill:"none",xmlns:"http://www.w3.org/2000/svg",...o,children:/*#__PURE__*/e("g",{id:"moonpay_symbol_wht 2",children:[/*#__PURE__*/t("rect",{x:"1.3374",y:"1",width:"59",height:"59",rx:"11.5",fill:"#7715F5"}),/*#__PURE__*/t("path",{id:"Vector",d:"M43.8884 23.3258C45.0203 23.3258 46.1268 22.9901 47.068 22.3613C48.0091 21.7324 48.7427 20.8386 49.1759 19.7928C49.6091 18.747 49.7224 17.5962 49.5016 16.4861C49.2807 15.3759 48.7357 14.3561 47.9353 13.5557C47.1349 12.7553 46.1151 12.2102 45.0049 11.9893C43.8947 11.7685 42.7439 11.8819 41.6982 12.3151C40.6524 12.7482 39.7585 13.4818 39.1297 14.423C38.5008 15.3641 38.1651 16.4707 38.1651 17.6026C38.165 18.3542 38.3131 19.0985 38.6007 19.7929C38.8883 20.4873 39.3098 21.1182 39.8413 21.6496C40.3728 22.1811 41.0037 22.6027 41.6981 22.8903C42.3925 23.1778 43.1367 23.3259 43.8884 23.3258ZM26.3395 49.1017C23.5804 49.1017 20.8832 48.2836 18.5891 46.7507C16.295 45.2178 14.5069 43.039 13.4511 40.49C12.3952 37.9409 12.1189 35.1359 12.6572 32.4298C13.1955 29.7237 14.5241 27.238 16.4751 25.287C18.4262 23.336 20.9118 22.0074 23.6179 21.4691C26.324 20.9308 29.129 21.2071 31.6781 22.2629C34.2272 23.3189 36.406 25.1069 37.9389 27.401C39.4717 29.6952 40.2899 32.3923 40.2899 35.1514C40.2899 36.9835 39.9291 38.7975 39.2281 40.49C38.527 42.1826 37.4994 43.7205 36.204 45.0159C34.9086 46.3113 33.3707 47.3389 31.6781 48.04C29.9856 48.741 28.1715 49.1018 26.3395 49.1017Z",fill:"white"})]})});const v={component:()=>{let{data:o,setModalData:i,navigateBack:n}=f(),a=p(),{closePrivyModal:c}=h(),{externalTransactionId:m}=o?.moonpayStatus,d=g(m||null,a.fundingMethodConfig.moonpay.useSandbox??!1);/*#__PURE__*/return e(r,{children:[/*#__PURE__*/t(l,{title:"Fund account",backFn:()=>{let t={...o?.funding,showAlternateFundingMethod:!0};t.usingDefaultFundingMethod&&(t.usingDefaultFundingMethod=!1),i({funding:t,solanaFundingData:o?.solanaFundingData}),n()}}),/*#__PURE__*/t(C,{status:d,onClickCta:c}),/*#__PURE__*/t(s,{})]})}};let C=({status:o,onClickCta:i})=>{let{title:a,body:l,cta:s}=n((()=>(t=>{switch(t){case"completed":return{title:"You've funded your account!",body:"It may take a few minutes for the assets to appear.",cta:"Continue"};case"waitingAuthorization":return{title:"Processing payment",body:"This may take up to a few hours. You will receive an email when the purchase is complete.",cta:"Continue"};default:return{title:"In Progress",body:"Go back to MoonPay to finish funding your account.",cta:""}}})(o)),[o]);/*#__PURE__*/return e(r,{children:[/*#__PURE__*/e(x,{children:[/*#__PURE__*/t(w,{status:o}),/*#__PURE__*/e(m,{children:[/*#__PURE__*/t("h3",{children:a}),/*#__PURE__*/t(b,{children:l})]})]}),s&&/*#__PURE__*/t(c,{onClick:i,children:s})]})},w=({status:r})=>{if(!r||"pending"===r){let r="var(--privy-color-foreground-4)";/*#__PURE__*/return e("div",{style:{position:"relative"},children:[/*#__PURE__*/t(d,{color:r,style:{position:"absolute"}}),/*#__PURE__*/t(u,{color:r}),/*#__PURE__*/t(y,{size:"3rem",style:{position:"absolute",top:"1rem",left:"1rem"}})]})}let n=(e=>{switch(e){case"completed":return i;case"waitingAuthorization":return()=>/*#__PURE__*/t(o,{width:"3rem",height:"3rem",style:{backgroundColor:"var(--privy-color-foreground-4)",color:"var(--privy-color-background)",borderRadius:"100%",padding:"0.5rem",margin:"0.5rem"}});default:return}})(r),a=(l=r)?{completed:"var(--privy-color-success)",failed:"var(--privy-color-error)",serviceFailure:"var(--privy-color-error)",waitingAuthorization:"var(--privy-color-accent)",pending:"var(--privy-color-foreground-4)"}[l]:"var(--privy-color-foreground-4)";var l;/*#__PURE__*/return t("div",{style:{borderColor:a,display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"100%",borderWidth:2,padding:"0.5rem",marginBottom:"0.5rem"},children:n&&/*#__PURE__*/t(n,{width:"4rem",height:"4rem",color:a})})},b=a.p`
|
|
2
|
-
font-size: 1rem;
|
|
3
|
-
color: var(--privy-color-foreground-3);
|
|
4
|
-
margin-bottom: 1rem;
|
|
5
|
-
display: flex;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
gap: 1rem;
|
|
8
|
-
`,x=a.div`
|
|
9
|
-
display: flex;
|
|
10
|
-
flex-direction: column;
|
|
11
|
-
align-items: center;
|
|
12
|
-
justify-content: center;
|
|
13
|
-
margin-left: 1.75rem;
|
|
14
|
-
margin-right: 1.75rem;
|
|
15
|
-
padding: 2rem 0;
|
|
16
|
-
`;export{v as MoonpayStatusScreen,v as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import t,{useState as r,useEffect as o}from"react";import{i,u as a,a as n}from"./get-is-unified-wallet-C6sEzDpG.mjs";import{A as s,T as m,I as c,S as l,a as d,L as p,b as u,D as h,G as v}from"./twitter-BoAxhlj6.mjs";import y from"@heroicons/react/24/outline/GlobeAltIcon";import{T as g,L as f}from"./twitch-5IOe4sIQ.mjs";import{u as E,q as A}from"./context-CwMpvKNV.mjs";import{b as T,u as S,k as w}from"./internal-context-Z-fyxadS.mjs";import{s as C}from"./shouldProceedtoEmbeddedWalletCreationFlow-BdpCzEJT.mjs";import{S as b}from"./ScreenLayout-kyRBwF5n.mjs";import{e as _}from"./capitalizeFirstLetter-DmLYqXsO.mjs";import{l as j}from"./index-C47JxA4c.mjs";import"viem";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"./ModalHeader-CvLNEZ0F.mjs";import"styled-components";import"./useActiveWallet-36SuARye.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-CwQ5-CS4.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-02TRgRMN.mjs";import"./events-context-CI0iqAXA.mjs";import"./getPublicClient-B4uPLKn-.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-DnEl8dVF.mjs";import"./index-Dq_xe9dz.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-D_kd_mMH.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";const O=({style:t})=>/*#__PURE__*/e(y,{style:{color:"var(--privy-color-error)",...t}});let R={google:{name:"Google",component:v},discord:{name:"Discord",component:h},github:{name:"Github",component:u},linkedin:{name:"LinkedIn",component:p},twitter:{name:"Twitter",component:d},spotify:{name:"Spotify",component:l},instagram:{name:"Instagram",component:c},tiktok:{name:"Tiktok",component:m},line:{name:"LINE",component:f},twitch:{name:"Twitch",component:g},apple:{name:"Apple",component:s}},N=({iconUrl:e,...r})=>t.createElement("svg",{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},t.createElement("foreignObject",{x:"2",y:"2",width:"29",height:"28"},t.createElement("img",{src:e,width:"29",height:"28",style:{display:"block",objectFit:"contain",borderRadius:"4px"},alt:"Provider icon"})));const U=(e,r)=>{if(e in R)return R[e];if(i(e)&&r){let o=r.find((t=>t.provider===e));if(o)return{name:o.provider_display_name,component:e=>t.createElement(N,{...e,iconUrl:o.provider_icon_url})}}return{name:"Unknown",component:O}};function I(e,t,r){let o={detail:"",retryable:!1},i=_(t);if(e?.privyErrorCode===T.LINKED_TO_ANOTHER_USER&&(o.detail="This account has already been linked to another user."),e?.privyErrorCode===T.INVALID_CREDENTIALS&&(o.retryable=!0,o.detail="Something went wrong. Try again."),e.privyErrorCode===T.OAUTH_USER_DENIED&&(o.detail=`Retry and check ${i} to finish connecting your account.`,o.retryable=!0),e?.privyErrorCode===T.TOO_MANY_REQUESTS&&(o.detail="Too many requests. Please wait before trying again."),e?.privyErrorCode===T.TOO_MANY_REQUESTS&&e.message.includes("provider rate limit")){let e=U(t,r).name;o.detail=`Request limit reached for ${e}. Please wait a moment and try again.`}if(e?.privyErrorCode===T.OAUTH_ACCOUNT_SUSPENDED){let e=U(t,r).name;o.detail=`Your ${e} account is suspended. Please try another login method.`}return e?.privyErrorCode===T.CANNOT_LINK_MORE_OF_TYPE&&(o.detail="You cannot authorize more than one account for this user."),e?.privyErrorCode===T.OAUTH_UNEXPECTED&&t.startsWith("privy:")&&(o.detail="Something went wrong. Please try again."),o}const L=({providerName:t,ProviderLogo:r,success:o,errorMessage:i,onRetry:a})=>{let n=o?`Successfully connected with ${t}`:i?i.message:`Verifying connection to ${t}`;/*#__PURE__*/return e(b,{title:n,subtitle:o?"You're good to go!":i?i.detail:"Just a few moments more",icon:r,iconVariant:"loading",iconLoadingStatus:{success:o,fail:!!i},secondaryCta:i?.retryable&&a?{label:"Retry",onClick:a}:void 0,watermark:!0})},k={component:()=>{let{authenticated:t,logout:i,ready:s,user:m}=a(),{setModalData:c,navigate:l,resetNavigation:d}=n(),p=E(),{getAuthMeta:u,initLoginWithOAuth:h,loginWithOAuth:v,updateWallets:y,setReadyToTrue:g,closePrivyModal:f,createAnalyticsEvent:b}=S(),[_,O]=r(!1),[R,N]=r(void 0),k=u()?.provider||"google",{name:P,component:D}=U(k,p.customOAuthProviders);return o((()=>{v(k).then((()=>{O(!0),g(!0)})).catch((e=>{if(g(!1),e?.privyErrorCode===T.ALLOWLIST_REJECTED)return N(void 0),d(),void l("AllowlistRejectionScreen");if(e?.privyErrorCode===T.USER_LIMIT_REACHED)return console.error(new w(e).toString()),N(void 0),d(),void l("UserLimitReachedScreen");if(e?.privyErrorCode===T.USER_DOES_NOT_EXIST)return N(void 0),d(),void l("AccountNotFoundScreen");if(e?.privyErrorCode===T.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce)return N(void 0),d(),c({accountTransfer:{nonce:e.data?.data?.nonce,account:e.data?.data?.subject,displayName:e.data?.data?.account?.displayName,linkMethod:u()?.provider,embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress,oAuthUserInfo:e.data?.data?.otherUser?.oAuthUserInfo}}),void l("LinkConflictScreen");let{retryable:t,detail:r}=I(e,k,p.customOAuthProviders);N({retryable:t,detail:r,message:"Authentication failed"})})).finally((()=>{j()}))}),[P,k]),o((()=>{if(s&&t&&_&&m){if(p?.legal.requireUsersAcceptTerms&&!m.hasAcceptedTerms){let e=setTimeout((()=>{l("AffirmativeConsentScreen")}),A);return()=>clearTimeout(e)}if(C(m,p.embeddedWallets)){let e=setTimeout((()=>{c({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),b({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,provider:k,screen:"OAuthStatusScreen"}}),i()},callAuthOnSuccessOnClose:!0}}),l("EmbeddedWalletOnAccountCreateScreen")}),A);return()=>clearTimeout(e)}{let e=setTimeout((()=>f({shouldCallAuthOnSuccess:!0,isSuccess:!0})),A);return y(),()=>clearTimeout(e)}}}),[s,t,_,m]),/*#__PURE__*/e(L,{providerName:P,ProviderLogo:D,success:_,errorMessage:R,onRetry:R?.retryable?()=>{j(),h(k),N(void 0)}:void 0})},isShownBeforeReady:!0};export{k as OAuthStatusScreen,L as OAuthStatusScreenView,k as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{FingerprintIcon as e}from"lucide-react";import{a as i}from"./index-C47JxA4c.mjs";import{u as o}from"./internal-context-Z-fyxadS.mjs";import{a as r}from"./get-is-unified-wallet-C6sEzDpG.mjs";import{S as a}from"./ScreenLayout-kyRBwF5n.mjs";import"react";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-36SuARye.mjs";import"zustand";import"./context-CwMpvKNV.mjs";import"tinycolor2";import"styled-components";import"react-device-detect";import"./use-export-wallet-CwQ5-CS4.mjs";import"viem/utils";import"./useWallets-02TRgRMN.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-D_kd_mMH.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./ModalHeader-CvLNEZ0F.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-DnEl8dVF.mjs";import"./index-Dq_xe9dz.mjs";const s=({title:i="Log in or create a new account?",subtitle:o="Create a new account with a passkey or use a passkey to log in to an existing account.",onSignup:r,onLogin:s})=>/*#__PURE__*/t(a,{title:i,subtitle:o,icon:e,primaryCta:{label:"Create new account",onClick:r},secondaryCta:{label:"Log in with a passkey",onClick:s},watermark:!0}),n={component:()=>{let{enabled:e,token:a}=i(),{navigate:n,setModalData:p}=r(),{initSignupWithPasskey:c,initLoginWithPasskey:m}=o();/*#__PURE__*/return t(s,{onSignup:async()=>{e&&!a?(p({passkeyAuthModalData:{passkeySignupFlow:!0},captchaModalData:{callback:t=>c({captchaToken:t,withPrivyUi:!0}),userIntentRequired:!1,onSuccessNavigateTo:"PasskeyStatusScreen",onErrorNavigateTo:"ErrorScreen"}}),n("CaptchaScreen")):(await c({withPrivyUi:!0,captchaToken:a}),p({passkeyAuthModalData:{passkeySignupFlow:!0}}),n("PasskeyStatusScreen"))},onLogin:async()=>{e&&!a?(p({passkeyAuthModalData:{passkeySignupFlow:!1},captchaModalData:{callback:t=>m({captchaToken:t,withPrivyUi:!0}),userIntentRequired:!1,onSuccessNavigateTo:"PasskeyStatusScreen",onErrorNavigateTo:"ErrorScreen"}}),n("CaptchaScreen")):(await m({withPrivyUi:!0,captchaToken:a}),p({passkeyAuthModalData:{passkeySignupFlow:!1}}),n("PasskeyStatusScreen"))}})}};export{n as PasskeySelectSignupOrLogin,s as PasskeySelectSignupOrLoginView,n as default};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{FingerprintIcon as r}from"lucide-react";import{useState as t,useRef as o,useEffect as s}from"react";import{styled as i}from"styled-components";import{u as a,q as n}from"./context-CwMpvKNV.mjs";import{c,b as m,u}from"./internal-context-Z-fyxadS.mjs";import{a as l,u as p}from"./get-is-unified-wallet-C6sEzDpG.mjs";import{s as d}from"./shouldProceedtoEmbeddedWalletCreationFlow-BdpCzEJT.mjs";import{S as y}from"./ScreenLayout-kyRBwF5n.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"viem";import"./index-C47JxA4c.mjs";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-36SuARye.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-CwQ5-CS4.mjs";import"viem/utils";import"./useWallets-02TRgRMN.mjs";import"./events-context-CI0iqAXA.mjs";import"./getPublicClient-B4uPLKn-.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-D_kd_mMH.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./ModalHeader-CvLNEZ0F.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-DnEl8dVF.mjs";import"./index-Dq_xe9dz.mjs";const h=({status:t,passkeySignupFlow:o=!1,error:s,onRetry:i})=>/*#__PURE__*/e(y,{title:(()=>{switch(t){case"loading":return"Waiting for passkey";case"success":return"Success";case"error":return"Something went wrong"}})(),subtitle:/*#__PURE__*/e(g,{children:(()=>{switch(t){case"loading":return o?"Please follow prompts to register your passkey.":"Please follow prompts to verify your passkey.\nYou will have to sign up with another method first to register a passkey for your account.";case"success":return"You've successfully logged in with your passkey.";case"error":if(s instanceof c){if(s.privyErrorCode===m.CANNOT_LINK_MORE_OF_TYPE)return"Cannot link more passkeys to account.";if(s.privyErrorCode===m.PASSKEY_NOT_ALLOWED)return"Passkey request timed out or rejected by user.\nYou will have to sign up with another method first to register a passkey for your account."}return"An unknown error occurred.\nYou will have to sign up with another method first to register a passkey for your account."}})()}),icon:r,iconVariant:"loading",iconLoadingStatus:{success:"success"===t,fail:"error"===t},primaryCta:"error"===t&&i?{label:"Retry",onClick:i}:"success"===t?{label:"Continue",disabled:!0}:void 0,watermark:!0}),f={component:()=>{let{data:r,setModalData:i,navigate:c}=l(),m=a(),{loginWithPasskey:y,signupWithPasskey:f,closePrivyModal:g,createAnalyticsEvent:v}=u(),{user:w,logout:j}=p(),{passkeySignupFlow:k}=r?.passkeyAuthModalData??{},S=n-500,[C,b]=t("loading"),[A,P]=t(null),E=o([]),W=e=>{E.current=[e,...E.current]};s((()=>()=>{E.current.forEach((e=>clearTimeout(e))),E.current=[]}),[]);let x=async()=>{b("loading");try{k?await f():await y(),b("success")}catch(e){P(e),b("error")}};return s((()=>{if("success"===C&&w){if(m?.legal.requireUsersAcceptTerms&&!w.hasAcceptedTerms)return void W(setTimeout((()=>{c("AffirmativeConsentScreen")}),S));if(!d(w,m?.embeddedWallets))return void W(setTimeout((()=>{g({shouldCallAuthOnSuccess:!0,isSuccess:!0})}),n));W(setTimeout((()=>{i({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),v({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"PasskeyStatusScreen"}}),j()},callAuthOnSuccessOnClose:!0}}),c("EmbeddedWalletOnAccountCreateScreen")}),S))}}),[w,C]),s((()=>{x()}),[]),/*#__PURE__*/e(h,{status:C,passkeySignupFlow:k,error:A,onRetry:x})}};let g=i.span`
|
|
2
|
-
white-space: pre-wrap;
|
|
3
|
-
`;export{f as PasskeyStatusScreen,h as PasskeyStatusScreenView,f as default};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import{jsxs as e,jsx as r}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/ShieldCheckIcon";import{useState as o,useEffect as i}from"react";import{styled as s,css as a}from"styled-components";import{u as n,a as l,h as c}from"./get-is-unified-wallet-C6sEzDpG.mjs";import{P as m}from"./ModalHeader-CvLNEZ0F.mjs";import{S as d}from"./Layouts-BlFm53ED.mjs";import{P as p,a as u,I as h,H as y,S as v}from"./shared-CSN6-8CF.mjs";import{n as f}from"./index-C47JxA4c.mjs";import{u as w,m as g}from"./internal-context-Z-fyxadS.mjs";import{S as j}from"./Screen-DnEl8dVF.mjs";import"viem";import"./context-CwMpvKNV.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./useActiveWallet-36SuARye.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-CwQ5-CS4.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-02TRgRMN.mjs";import"./events-context-CI0iqAXA.mjs";import"./getPublicClient-B4uPLKn-.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"@heroicons/react/24/outline/ArrowPathIcon";import"@heroicons/react/24/outline/EyeIcon";import"@heroicons/react/24/outline/EyeSlashIcon";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-D_kd_mMH.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./index-Dq_xe9dz.mjs";const b={component:()=>{let[s,a]=o(!0),{authenticated:m,user:b}=n(),{walletProxy:A,closePrivyModal:I,createAnalyticsEvent:P,client:S}=w(),{navigate:T,data:W,onUserCloseViaDialogOrKeybindRef:_}=l(),[E,R]=o(void 0),[H,M]=o(""),[U,N]=o(!1),{entropyId:O,entropyIdVerifier:V,onCompleteNavigateTo:$,onSuccess:z,onFailure:D}=W.recoverWallet,F=(e="User exited before their wallet could be recovered")=>{I({shouldCallAuthOnSuccess:!1}),D("string"==typeof e?new g(e):e)};_.current=F,i((()=>{if(!m)return F("User must be authenticated and have a Privy wallet before it can be recovered")}),[m]);/*#__PURE__*/return e(j,{children:[/*#__PURE__*/r(j.Header,{icon:t,title:"Enter your password",subtitle:"Please provision your account on this new device. To continue, enter your recovery password.",showClose:!0,onClose:F}),/*#__PURE__*/r(j.Body,{children:/*#__PURE__*/r(x,{children:/*#__PURE__*/e("div",{children:[/*#__PURE__*/e(p,{children:[/*#__PURE__*/r(u,{type:s?"password":"text",onChange:e=>(e=>{e&&R(e)})(e.target.value),disabled:U,style:{paddingRight:"2.3rem"}}),/*#__PURE__*/r(h,{style:{right:"0.75rem"},children:s?/*#__PURE__*/r(y,{onClick:()=>a(!1)}):/*#__PURE__*/r(v,{onClick:()=>a(!0)})})]}),!!H&&/*#__PURE__*/r(C,{children:H})]})})}),/*#__PURE__*/e(j.Footer,{children:[/*#__PURE__*/r(j.HelpText,{children:/*#__PURE__*/e(d,{children:[/*#__PURE__*/r("h4",{children:"Why is this necessary?"}),/*#__PURE__*/r("p",{children:"You previously set a password for this wallet. This helps ensure only you can access it"})]})}),/*#__PURE__*/r(j.Actions,{children:/*#__PURE__*/r(k,{loading:U||!A,disabled:!E,onClick:async()=>{N(!0);let e=await S.getAccessToken(),r=c(b,O);if(!e||!r||null===E)return F("User must be authenticated and have a Privy wallet before it can be recovered");try{P({eventName:"embedded_wallet_recovery_started",payload:{walletAddress:r.address}}),await(A?.recover({accessToken:e,entropyId:O,entropyIdVerifier:V,recoveryPassword:E})),M(""),$?T($):I({shouldCallAuthOnSuccess:!1}),z?.(r),P({eventName:"embedded_wallet_recovery_completed",payload:{walletAddress:r.address}})}catch(e){f(e)?M("Invalid recovery password, please try again."):M("An error has occurred, please try again.")}finally{N(!1)}},$hideAnimations:!O&&U,children:"Recover your account"})}),/*#__PURE__*/r(j.Watermark,{})]})]})}};let x=s.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
gap: 1.5rem;
|
|
5
|
-
`,C=s.div`
|
|
6
|
-
line-height: 20px;
|
|
7
|
-
height: 20px;
|
|
8
|
-
font-size: 13px;
|
|
9
|
-
color: var(--privy-color-error);
|
|
10
|
-
text-align: left;
|
|
11
|
-
margin-top: 0.5rem;
|
|
12
|
-
`,k=s(m)`
|
|
13
|
-
${({$hideAnimations:e})=>e&&a`
|
|
14
|
-
&& {
|
|
15
|
-
// Remove animations because the recoverWallet task on the iframe partially
|
|
16
|
-
// blocks the renderer, so the animation stutters and doesn't look good
|
|
17
|
-
transition: none;
|
|
18
|
-
}
|
|
19
|
-
`}
|
|
20
|
-
`;export{b as PasswordRecoveryScreen,b as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsxs as e,Fragment as t,jsx as r}from"react/jsx-runtime";import{useState as o,useEffect as a,useCallback as i}from"react";import{M as c,P as s,B as l}from"./ModalHeader-CvLNEZ0F.mjs";import{C as n}from"./ScreenHeader-CHmc4-Lu.mjs";import{q as d}from"./context-CwMpvKNV.mjs";import{o as p,q as u,r as m,v as h,R as v,l as w}from"./index-C47JxA4c.mjs";import{a as y,f,b as _,u as A}from"./internal-context-Z-fyxadS.mjs";import{a as E,u as g,g as C}from"./get-is-unified-wallet-C6sEzDpG.mjs";import{a8 as b,a9 as R,aa as k}from"./paths-3HW55qZg.mjs";import{g as T}from"./useWallets-02TRgRMN.mjs";import{a as O}from"./events-context-CI0iqAXA.mjs";import{A as N,G as S,R as x}from"./styles-BsotlekN.mjs";import"styled-components";import"./useActiveWallet-36SuARye.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-CwQ5-CS4.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"viem/utils";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"tinycolor2";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./usePrivy-D_kd_mMH.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";async function I({url:e,popup:t,provider:r}){return t.location=e,new Promise(((e,r)=>{function o(){t?.close(),window.removeEventListener("message",a)}function a(t){t.data&&("PRIVY_OAUTH_RESPONSE"===t.data.type&&t.data.stateCode&&t.data.authorizationCode&&(e(t.data),o()),"https://cdn.apple-cloudkit.com"===t.origin&&t.data.ckSession&&(e({type:"PRIVY_OAUTH_RESPONSE",ckWebAuthToken:t.data.ckSession}),o()),"PRIVY_OAUTH_ERROR"===t.data.type&&(r(t.data.error),o()))}window.addEventListener("message",a)}))}async function M({api:e,provider:t,stateCode:r,codeVerifier:o,authorizationCode:a}){if(!a||!r)throw new y("[OAuth AuthFlow] Authorization and state codes code must be set prior to calling authenicate.");if("undefined"===a)throw new y("User denied confirmation during OAuth flow");try{return(await e.post(b,{authorization_code:a,state_code:r,code_verifier:o,provider:t})).access_token}catch(e){let t=f(e);if(t.privyErrorCode)throw new y(t.message||"Invalid code during OAuth flow.",void 0,t.privyErrorCode);if("User denied confirmation during OAuth flow"===t.message)throw new y("Invalid code during oauth flow.",void 0,_.OAUTH_USER_DENIED);throw new y("Invalid code during OAuth flow.",void 0,_.UNKNOWN_AUTH_ERROR)}}async function U({api:e,provider:t}){let r=p(),o=u(),a=await m(r);try{return"icloud"===t?{url:(await e.post(R,{client_type:"web"})).url}:{url:(await e.post(k,{redirect_to:window.location.href,code_challenge:a,state_code:o})).url,codeVerifier:r,stateCode:o,provider:t}}catch(e){throw f(e)}}let j={"google-drive":{name:"Google Drive",component:S},icloud:{name:"iCloud",component:N}};const W={component:()=>{let{logout:p}=g(),{navigate:u,setModalData:m,data:f}=E(),{closePrivyModal:b,createAnalyticsEvent:R}=A(),{execute:k}=(()=>{let{client:e,walletProxy:t,refreshSessionAndUser:r}=A(),{data:o}=E(),{user:a}=g(),i=O(),{create:c}=h();return{execute:async({provider:s,action:l,popup:n,shouldCreateEth:d,shouldCreateSol:p})=>{let u,m;if(!e)throw new y("Missing client");function h(t){if(!t&&e)throw e.createAnalyticsEvent({eventName:"recovery_oauth_error",payload:{error:"Unable to open recovery OAuth popup",provider:s}}),new y("Recovery OAuth failed")}switch(s){case"google-drive":{let t,r,{url:o,codeVerifier:a,stateCode:i}=await U({api:e.api,provider:s});h(o);try{let a=await I({url:o,popup:n,provider:s});if(t=a.stateCode,r=a.authorizationCode,t!==i)throw e.createAnalyticsEvent({eventName:"possible_phishing_attempt",payload:{provider:s,storedStateCode:i??"",returnedStateCode:t??""}}),new y("Unexpected auth flow. This may be a phishing attempt.",void 0,_.OAUTH_UNEXPECTED)}catch(t){throw e.createAnalyticsEvent({eventName:"recovery_oauth_error",payload:{error:t.toString(),provider:s}}),new y("Recovery OAuth failed")}[u,m]=await Promise.all([e.getAccessToken(),M({api:e.api,provider:s,codeVerifier:a,stateCode:t,authorizationCode:r})]);break}case"icloud":{let{url:t}=await U({api:e.api,provider:s});h(t);let{ckWebAuthToken:r}=await I({url:t,popup:n,provider:s});m=r,u=await e.getAccessToken()}}if(!t)throw new y("Cannot connect to wallet proxy");if(!u)throw new y("Unable to authorize user");switch(l){case"recover":{let r=o?.recoverWallet?.entropyId,a=o?.recoverWallet?.entropyIdVerifier;if(!r||!a)throw new y("Recovery OAuth failed");e.createAnalyticsEvent({eventName:"embedded_wallet_recovery_started",payload:{walletAddress:r,recoveryMethod:s}}),await t.recover({accessToken:u,entropyId:r,entropyIdVerifier:a,recoveryAccessToken:m}),e.createAnalyticsEvent({eventName:"embedded_wallet_recovery_completed",payload:{walletAddress:r,recoveryMethod:s}});break}case"create-wallet":{let t;if(e.createAnalyticsEvent({eventName:"embedded_wallet_creation_started"}),d&&p)t=await c({recoveryMethod:s,recoveryAccessToken:m,chainType:"ethereum",walletIndex:0,latestUser:a}),t=await c({chainType:"solana",walletIndex:0,latestUser:t.user});else if(p)t=await c({recoveryMethod:s,recoveryAccessToken:m,chainType:"solana",walletIndex:0,latestUser:a});else{if(!d)throw Error("Invalid args to create wallet");t=await c({recoveryMethod:s,recoveryAccessToken:m,chainType:"ethereum",walletIndex:0,latestUser:a})}if(!t)throw i("createWallet","onError",_.UNKNOWN_EMBEDDED_WALLET_ERROR),Error("Failed to create wallet");e.createAnalyticsEvent({eventName:"embedded_wallet_creation_completed",payload:{walletAddress:t.account.address}}),i("createWallet","onSuccess",{wallet:t.account});break}case"set-recovery":{let o=C(a);if(!o)throw i("setWalletRecovery","onError",_.EMBEDDED_WALLET_NOT_FOUND),Error("Embedded wallet not found");e.createAnalyticsEvent({eventName:"embedded_wallet_set_recovery_started",payload:{walletAddress:o.address,existingRecoveryMethod:o.recoveryMethod,targetRecoveryMethod:s}});let{entropyId:c,entropyIdVerifier:l}=T(a);await t.setRecovery({accessToken:u,entropyId:c,entropyIdVerifier:l,recoveryMethod:s,recoveryAccessToken:m});let n=C(await r());if(!n)throw i("createWallet","onError",_.UNKNOWN_EMBEDDED_WALLET_ERROR),Error("Failed to set recovery on wallet");e.createAnalyticsEvent({eventName:"embedded_wallet_set_recovery_completed",payload:{walletAddress:o.address,existingRecoveryMethod:o.recoveryMethod,targetRecoveryMethod:s}}),i("setWalletRecovery","onSuccess",{method:s,wallet:n});break}default:throw new y("Unsupported recovery action")}}}})(),[N,S]=o(!1),{provider:W,action:P,isInAccountCreateFlow:D,shouldCreateEth:V,shouldCreateSol:L}=f?.recoveryOAuthStatus,[z,H]=o(void 0),[$,B]=o("create-wallet"===P);if("user-passcode"===W)throw Error("RecoveryOAuthScreen should never be called with a wallet that specifies recoveryMethod: `user-passcode`");let F=j[W].name,G=j[W].component,K=f?.recoverWallet?.onCompleteNavigateTo,Y=new v((async(e="create-wallet")=>(B(!0),new Promise(((t,r)=>{setTimeout((async()=>{try{let r=window.open();await k({provider:W,action:e,popup:r,shouldCreateEth:V,shouldCreateSol:L}),S(!0),t()}catch(t){H({message:`${"recover"===e?"Recovery":"Back up"} with ${F} unsuccessful`,detail:"recover"===P?`Please verify that you are selecting the ${F} account associated with your backup.`:"",retryable:!0}),r()}}),0)})))));a((()=>{"recover"!==P&&Y.execute(D?"create-wallet":"set-recovery")}),[]),a((()=>{if(!N)return;let e=setTimeout((()=>{D?(m({createWallet:{onSuccess:()=>{},onFailure:e=>{R({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"RecoveryOAuthScreen"}}),p()},callAuthOnSuccessOnClose:!0,shouldCreateEth:!1,shouldCreateSol:!1}}),u("EmbeddedWalletCreatedScreen")):b({shouldCallAuthOnSuccess:!1})}),d);return()=>clearTimeout(e)}),[N]);let q=i((async()=>{await Y.execute("recover"),K?u(K):S(!0)}),[]),X="google-drive"===W?"Google Drive":"Apple iCloud",Q=N&&`Successfully ${"recover"===P?"recovered":"backed up"} with ${X}.`||z&&z.message||`${"recover"===P?"Recovering":"Backing up"} with ${X}...`,J=z?z.detail:"";/*#__PURE__*/return e(t,{children:[/*#__PURE__*/r(c,{}),$?/*#__PURE__*/r(t,{children:/*#__PURE__*/e(x,{children:[/*#__PURE__*/r(n,{title:Q,icon:/*#__PURE__*/r(G,{style:{width:"38px",height:"38px"}}),description:J}),z&&z?.retryable?/*#__PURE__*/r(s,{onClick:()=>{w(),H(void 0),"create-wallet"===P?Y.execute("create-wallet"):q()},disabled:!N&&!z?.retryable,children:"Try again"}):null]})}):/*#__PURE__*/e(x,{children:[/*#__PURE__*/r(n,{title:"Confirm it's really you",icon:/*#__PURE__*/r(G,{style:{height:42,width:48}}),description:`To confirm your identity, please log in to ${X} where your account is backed up.`}),/*#__PURE__*/e(s,{onClick:q,children:["Confirm with ",X]})]}),/*#__PURE__*/r(l,{})]})}};export{W as RecoveryOAuthScreen,W as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{useState as t,useEffect as o}from"react";import{u as r}from"./context-CwMpvKNV.mjs";import{v as i,R as s}from"./index-C47JxA4c.mjs";import{u as a,m as n}from"./internal-context-Z-fyxadS.mjs";import{a as c,u as l}from"./get-is-unified-wallet-C6sEzDpG.mjs";import{S as m,g as p}from"./SetWalletPasswordForm-Bns8qtXn.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-36SuARye.mjs";import"zustand";import"styled-components";import"react-device-detect";import"./use-export-wallet-CwQ5-CS4.mjs";import"viem/utils";import"./useWallets-02TRgRMN.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-D_kd_mMH.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"./Layouts-BlFm53ED.mjs";import"./ModalHeader-CvLNEZ0F.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./shared-CSN6-8CF.mjs";import"@heroicons/react/24/outline/ArrowPathIcon";import"@heroicons/react/24/outline/EyeIcon";import"@heroicons/react/24/outline/EyeSlashIcon";import"./Checkbox-BhNoOKjX.mjs";import"@heroicons/react/24/outline/KeyIcon";import"@heroicons/react/24/solid/CheckCircleIcon";import"fast-password-entropy";import"secure-password-utilities";import"secure-password-utilities/wordlists";import"@heroicons/react/24/outline/ArrowDownTrayIcon";import"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import"@heroicons/react/24/outline/DocumentDuplicateIcon";import"@heroicons/react/24/solid/XCircleIcon";import"./ScreenHeader-CHmc4-Lu.mjs";const u={component:()=>{let{navigate:u,data:d,onUserCloseViaDialogOrKeybindRef:h}=c(),w=r(),[y,v]=t(""),[j,f]=t(!1),[g,C]=t(),[I,b]=t(null),{create:x}=i(),{authenticated:P,user:S}=l(),{closePrivyModal:A,isNewUserThisSession:T,initializeWalletProxy:U}=a(),{onSuccess:k,onFailure:E,callAuthOnSuccessOnClose:M,shouldCreateEth:O,shouldCreateSol:W}=d.createWallet,[D,L]=t(null),R=new s((async()=>{try{let e;if(O&&W)e=await x({recoveryMethod:"user-passcode",recoveryPassword:g,chainType:"ethereum",walletIndex:0,latestUser:S}),e=await x({chainType:"solana",walletIndex:0,latestUser:e.user});else if(W)e=await x({recoveryMethod:"user-passcode",recoveryPassword:g,chainType:"solana",walletIndex:0,latestUser:S});else{if(!O)throw Error("Invalid args to create wallet");e=await x({recoveryMethod:"user-passcode",recoveryPassword:g,chainType:"ethereum",walletIndex:0,latestUser:S})}L(e),T?u("EmbeddedWalletCreatedScreen"):(k(e),A({shouldCallAuthOnSuccess:M}))}catch(e){v(e.message)}}));o((()=>{I||U(3e4).then((e=>b(e)))}),[I]),o((()=>{if(!P||!S)return u("LandingScreen"),void E(Error("User must be authenticated before creating a Privy wallet"))}),[P]),h.current=()=>null;/*#__PURE__*/return e(m,{config:{initiatedBy:"automatic"},appName:w?.name||"privy",loading:!I,buttonLoading:j,buttonHideAnimations:!D&&j,isResettingPassword:!1,error:y,password:g||"",onClose:()=>{D&&"user-passcode"!==D.account.recoveryMethod?(E(new n("User created a wallet but failed to set a password for it")),A({shouldCallAuthOnSuccess:!1})):D?(k(D),A({shouldCallAuthOnSuccess:M})):(E(new n("User wallet creation failed")),A({shouldCallAuthOnSuccess:!1}))},onPasswordChange:C,onPasswordGenerate:()=>C(p()),onSubmit:async()=>(f(!0),R.execute().then((()=>new Promise((e=>setTimeout(e,250))))).finally((()=>f(!1))))})}};export{u as EmbeddedWalletPasswordCreateScreen,u as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsxs as r,Fragment as e,jsx as l}from"react/jsx-runtime";import{a}from"./ModalHeader-CvLNEZ0F.mjs";import{S as t}from"./Screen-DnEl8dVF.mjs";const n=({primaryCta:n,secondaryCta:i,helpText:d,watermark:s=!0,children:c,...m})=>{let o=n||i?/*#__PURE__*/r(e,{children:[n&&(()=>{let{label:r,...e}=n,t=e.variant||"primary";/*#__PURE__*/return l(a,{...e,variant:t,style:{width:"100%",...e.style},children:r})})(),i&&(()=>{let{label:r,...e}=i,t=e.variant||"secondary";/*#__PURE__*/return l(a,{...e,variant:t,style:{width:"100%",...e.style},children:r})})()]}):null;/*#__PURE__*/return r(t,{id:m.id,className:m.className,children:[/*#__PURE__*/l(t.Header,{...m}),c?/*#__PURE__*/l(t.Body,{children:c}):null,d||o||s?/*#__PURE__*/r(t.Footer,{children:[d?/*#__PURE__*/l(t.HelpText,{children:d}):null,o?/*#__PURE__*/l(t.Actions,{children:o}):null,s?/*#__PURE__*/l(t.Watermark,{}):null]}):null]})};export{n as S};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{useState as t,useEffect as r}from"react";import{a as o,m as i,C as a}from"./index-C47JxA4c.mjs";import{u as s,q as n}from"./context-CwMpvKNV.mjs";import{u as l,b as m,k as c}from"./internal-context-Z-fyxadS.mjs";import{u as d,a as u}from"./get-is-unified-wallet-C6sEzDpG.mjs";import{s as p}from"./shouldProceedtoEmbeddedWalletCreationFlow-BdpCzEJT.mjs";import{S as g}from"./ScreenLayout-kyRBwF5n.mjs";import{T as v}from"./telegram-B-JqnkqZ.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-36SuARye.mjs";import"zustand";import"styled-components";import"react-device-detect";import"./use-export-wallet-CwQ5-CS4.mjs";import"viem/utils";import"./useWallets-02TRgRMN.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-D_kd_mMH.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"tinycolor2";import"./ModalHeader-CvLNEZ0F.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-DnEl8dVF.mjs";import"./index-Dq_xe9dz.mjs";const y=({success:t,errorMessage:r,onRetry:o})=>{let i=t?"Successfully connected with Telegram":r?r.message:"Verifying connection to Telegram";/*#__PURE__*/return e(g,{title:i,subtitle:t?"You're good to go!":r?r.detail:"Just a few moments more",icon:v,iconVariant:"loading",iconLoadingStatus:{success:t,fail:!!r},secondaryCta:r?.retryable&&o?{label:"Retry",onClick:o}:void 0,watermark:!0})},f={component:()=>{let{authenticated:g,logout:v,ready:f,user:h}=d(),{setModalData:A,navigate:b,resetNavigation:j,data:T}=u(),C=s(),{initLoginWithTelegram:S,loginWithTelegram:w,updateWallets:E,setReadyToTrue:R,closePrivyModal:W,createAnalyticsEvent:_,getAuthMeta:k}=l(),[x,L]=t(!1),[M,I]=t(void 0),D=o();async function U(){try{let e=await async function(){let e;if(!g){if(D.enabled&&"error"===D.status)throw new a(D.error,null,m.CAPTCHA_FAILURE);return D.enabled&&"success"!==D.status&&(D.execute(),e=await D.waitForResult()),e}}();await w({captchaToken:e}),L(!0),R(!0)}catch(e){if(e?.privyErrorCode===m.ALLOWLIST_REJECTED)return I(void 0),j(),void b("AllowlistRejectionScreen");if(e?.privyErrorCode===m.USER_LIMIT_REACHED)return console.error(new c(e).toString()),I(void 0),j(),void b("UserLimitReachedScreen");if(e?.privyErrorCode===m.USER_DOES_NOT_EXIST)return I(void 0),j(),void b("AccountNotFoundScreen");if(e?.privyErrorCode===m.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce)return I(void 0),j(),A({accountTransfer:{nonce:e.data?.data?.nonce,account:e.data?.data?.subject,telegramAuthResult:k()?.telegramAuthResult,telegramWebAppData:k()?.telegramWebAppData,displayName:e.data?.data?.account?.displayName,linkMethod:"telegram",embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress}}),void b("LinkConflictScreen");let{retryable:t,detail:r}=i(e);I({retryable:t,detail:r,message:"Authentication failed"})}}r((()=>{U()}),[]),r((()=>{if(!(f&&g&&x&&h))return;if(C?.legal.requireUsersAcceptTerms&&!h.hasAcceptedTerms){let e=setTimeout((()=>{b("AffirmativeConsentScreen")}),n);return()=>clearTimeout(e)}if(p(h,C.embeddedWallets)){let e=setTimeout((()=>{A({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),_({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,provider:"telegram",screen:"TelegramAuthScreen"}}),v()},callAuthOnSuccessOnClose:!0}}),b("EmbeddedWalletOnAccountCreateScreen")}),n);return()=>clearTimeout(e)}E();let e=setTimeout((()=>W({shouldCallAuthOnSuccess:!0,isSuccess:!0})),n);return()=>clearTimeout(e)}),[f,g,x,h]);/*#__PURE__*/return e(y,{success:x,errorMessage:M,onRetry:M?.retryable?async()=>{try{I(void 0),T?.telegramAuthModalData?.seamlessAuth||await S(void 0,T?.login?.disableSignup),await U()}catch(e){let{retryable:t,detail:r}=i(e);I({retryable:t,detail:r,message:"Authentication failed"})}}:void 0})},isCaptchaRequired:!0,isShownBeforeReady:!0};export{f as TelegramAuthScreen,y as TelegramAuthScreenView,f as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsxs as e,Fragment as r,jsx as t}from"react/jsx-runtime";import i from"@heroicons/react/24/outline/EnvelopeIcon";import{B as o}from"./Layouts-BlFm53ED.mjs";import{Mail as a}from"lucide-react";import{forwardRef as s,useState as m}from"react";import{u as n}from"./context-CwMpvKNV.mjs";import{a as l}from"./index-C47JxA4c.mjs";import{u as c}from"./internal-context-Z-fyxadS.mjs";import{u as d,a as p}from"./get-is-unified-wallet-C6sEzDpG.mjs";import{a1 as u,V as h}from"./useActiveWallet-36SuARye.mjs";import{E as j,P as v}from"./ModalHeader-CvLNEZ0F.mjs";import{I as f,E as g}from"./EmailInputForm-Dgoii4vf.mjs";import{E as y}from"./ErrorMessage-D8VaAP5m.mjs";import{S as w}from"./ScreenLayout-kyRBwF5n.mjs";import"styled-components";import"@privy-io/js-sdk-core";import"tinycolor2";import"uuid";import"jose";import"eventemitter3";import"./useWallets-02TRgRMN.mjs";import"./use-export-wallet-CwQ5-CS4.mjs";import"viem/utils";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"react-device-detect";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-D_kd_mMH.mjs";import"./events-context-CI0iqAXA.mjs";import"@scure/base";import"zustand";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"viem";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./getPublicClient-B4uPLKn-.mjs";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-DnEl8dVF.mjs";import"./index-Dq_xe9dz.mjs";const k=/*#__PURE__*/s(((i,o)=>{let[s,f]=m(""),[g,w]=m(""),[k,S]=m(!1),{authenticated:x,user:A}=d(),{initUpdateEmail:C}=c(),{navigate:P,setModalData:I,currentScreen:M}=p(),{enabled:T,token:U}=l(),D=n(),L=u(s)&&(D.disablePlusEmails&&s.includes("+")?(g||w("Please enter a valid email address without a '+'."),!1):(g&&w(""),!0)),W=k||!L,q=()=>{!T||U||x?(async e=>{if(!A?.email)throw Error("User is required to have an email address to update it.");S(!0);try{await C({oldAddress:A.email.address,newAddress:s,captchaToken:e}),P("AwaitingPasswordlessCodeScreen")}catch(e){I({errorModalData:{error:e,previousScreen:M||"LandingScreen"}}),P("ErrorScreen")}S(!1)})(U):(I({captchaModalData:{callback:e=>{if(!A?.email)throw Error("User is required to have an email address to update it.");return C({oldAddress:A.email.address,newAddress:s,captchaToken:e})},userIntentRequired:!1,onSuccessNavigateTo:"AwaitingPasswordlessCodeScreen",onErrorNavigateTo:"ErrorScreen"}}),P("CaptchaScreen"))};/*#__PURE__*/return e(r,{children:[/*#__PURE__*/e(b,{children:[g&&/*#__PURE__*/t(y,{style:{marginTop:"0.25rem",textAlign:"left"},children:g}),/*#__PURE__*/e(E,{$error:!!g,children:[/*#__PURE__*/t(h,{children:/*#__PURE__*/t(a,{})}),/*#__PURE__*/t("input",{ref:o,id:"email-input",type:"email",placeholder:"your@email.com",onChange:e=>f(e.target.value),onKeyUp:e=>{"Enter"===e.key&&q()},value:s,autoComplete:"email"}),i.stacked?null:/*#__PURE__*/t(j,{isSubmitting:k,onClick:q,disabled:W,children:"Submit"})]})]}),i.stacked?/*#__PURE__*/t(v,{loadingText:null,loading:k,disabled:W,onClick:q,style:{width:"100%"},children:"Submit"}):null]})}));let b=f,E=g;const S=({title:e="Update your email",subtitle:r="Add the email address you'd like to use going forward. We'll send you a confirmation code"})=>/*#__PURE__*/t(w,{title:e,subtitle:r,icon:i,watermark:!0,children:/*#__PURE__*/t(o,{children:/*#__PURE__*/t(k,{stacked:!0})})}),x={component:()=>/*#__PURE__*/t(S,{})};export{x as UpdateEmailScreen,S as UpdateEmailScreenView,x as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/PhoneIcon";import{useState as o}from"react";import{C as r}from"./ConnectPhoneForm-nVYECWzo.mjs";import{u as i}from"./internal-context-Z-fyxadS.mjs";import{a as n,u as m}from"./get-is-unified-wallet-C6sEzDpG.mjs";import{S as a}from"./ScreenLayout-kyRBwF5n.mjs";import"styled-components";import"@privy-io/js-sdk-core";import"./context-CwMpvKNV.mjs";import"tinycolor2";import"./useActiveWallet-36SuARye.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-CwQ5-CS4.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-02TRgRMN.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"./ModalHeader-CvLNEZ0F.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Chip-D2-wZOHJ.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"ofetch";import"./Screen-DnEl8dVF.mjs";import"./index-Dq_xe9dz.mjs";const s=({title:i="Update your phone number",subtitle:n="Add the phone number you'd like to use going forward. We'll send you a confirmation code",onSubmit:m,isSubmitting:s=!1})=>{let[c,u]=o(null);/*#__PURE__*/return e(a,{title:i,subtitle:n,icon:t,primaryCta:{label:s?"Submitting":"Update",onClick:async()=>{c?.qualifiedPhoneNumber&&await m(c)},disabled:!c?.isValid||s},watermark:!0,children:/*#__PURE__*/e(r,{onChange:e=>{u(e)},onSubmit:async()=>{},noIncludeSubmitButton:!0,hideRecent:!0})})},c={component:()=>{let{currentScreen:t,data:r,navigate:a,setModalData:c}=n(),{user:u}=m(),{initUpdatePhone:l}=i(),[p,d]=o(!1);/*#__PURE__*/return e(s,{onSubmit:async e=>{d(!0);try{if(!u?.phone?.number)throw Error("User is required to have an phone number to update it.");await l(u?.phone?.number,e.qualifiedPhoneNumber),a("AwaitingPasswordlessCodeScreen")}catch(e){c({errorModalData:{error:e,previousScreen:r?.errorModalData?.previousScreen||t||"LinkPhoneScreen"}}),a("ErrorScreen")}finally{d(!1)}},isSubmitting:p})}};export{c as UpdatePhoneScreen,s as UpdatePhoneScreenView,c as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{a as e}from"./get-is-unified-wallet-C6sEzDpG.mjs";import{S as o}from"./ScreenLayout-kyRBwF5n.mjs";import"viem";import"react";import"./context-CwMpvKNV.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"./ModalHeader-CvLNEZ0F.mjs";import"styled-components";import"./useActiveWallet-36SuARye.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-CwQ5-CS4.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-02TRgRMN.mjs";import"./events-context-CI0iqAXA.mjs";import"./getPublicClient-B4uPLKn-.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-DnEl8dVF.mjs";import"./index-Dq_xe9dz.mjs";const i=({style:e,...o})=>/*#__PURE__*/t("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"38px",width:"38px",...e},...o,children:/*#__PURE__*/t("path",{d:"M20 13.6V20M20 26.4H20.016M36 20C36 28.8365 28.8366 36 20 36C11.1635 36 4.00001 28.8365 4.00001 20C4.00001 11.1634 11.1635 3.99999 20 3.99999C28.8366 3.99999 36 11.1634 36 20Z",stroke:"currentColor",strokeWidth:"3.2",strokeLinecap:"round",strokeLinejoin:"round"})}),r=({title:e="Unable to sign in",subtitle:r="This is a test application that has reached its user limit. To allow more users, this app needs to be upgraded to production.",onGoBack:n})=>/*#__PURE__*/t(o,{title:e,subtitle:r,icon:i,iconVariant:"subtle",primaryCta:{label:"Go back",onClick:n},showBack:!0,onBack:n,watermark:!0}),n={component:()=>{let{navigate:o}=e();/*#__PURE__*/return t(r,{onGoBack:()=>{o("LandingScreen")}})}};export{n as UserLimitReachedScreen,r as UserLimitReachedScreenView,n as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{useState as e}from"react";import{u as o,a as i}from"./get-is-unified-wallet-C6sEzDpG.mjs";import{S as n}from"./ScreenLayout-kyRBwF5n.mjs";import"viem";import"./context-CwMpvKNV.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"./ModalHeader-CvLNEZ0F.mjs";import"styled-components";import"./useActiveWallet-36SuARye.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-CwQ5-CS4.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-02TRgRMN.mjs";import"./events-context-CI0iqAXA.mjs";import"./getPublicClient-B4uPLKn-.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-DnEl8dVF.mjs";import"./index-Dq_xe9dz.mjs";const r=({title:e,subtitle:o,buttonText:i,buttonHref:r,isLoading:l=!1,helpText:a,onButtonClick:m})=>/*#__PURE__*/t(n,{title:e,subtitle:o,primaryCta:{label:i,onClick:()=>{r&&window.open(r,"_self"),m?.()},disabled:l},helpText:a,watermark:!0}),l={component:()=>{let{ready:n}=o(),{data:l}=i(),[a,m]=e(!1);if(!l?.installWalletModalData)throw Error("Wallet data is missing");let{walletConfig:s,connectOnly:c,chainType:p}=l.installWalletModalData,u=s.getMobileRedirect({useUniversalLink:!a,isSolana:"solana"===p,connectOnly:c}),d=s.name.replace(/ wallet/gi,""),h={title:`Redirecting to ${d} Mobile Wallet`,description:`We'll take you to the ${d} Mobile Wallet app to continue your login experience.`,footnote:""};return n&&(h.description=`For the best experience, we'll automatically log you into the ${d} Mobile Wallet in-app browser.`,h.footnote="You can always return here to login via other methods."),a&&(h.title="Still here?",h.description=`You may need to install the ${s.name} mobile app.`,h.footnote=`Once you're done, you can connect with ${s.name} wallet to complete the login.`),/*#__PURE__*/t(r,{title:h.title,subtitle:h.description,buttonText:a?"Go to App Store":"Continue",buttonHref:u,isLoading:n&&!u,helpText:h.footnote||void 0,onButtonClick:()=>{setTimeout((()=>m(!0)),1e3)}})}};export{l as WalletInterstitialScreen,r as WalletInterstitialScreenView,l as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{useState as t,useMemo as a,useEffect as n,createContext as o,useContext as l}from"react";import{dedupeSupportedChains as r,DEFAULT_SUPPORTED_CHAINS as i,mainnet as s}from"@privy-io/js-sdk-core";import c from"tinycolor2";const d="https://auth.privy.io",u=2e4,g=1400,h=2500,f=4e3,p="3.13.1",_="privy:token",b="privy-token",m="privy:refresh_token",v="privy-refresh-token",w="privy:pat",k="privy:id_token",y="privy-id-token",F="privy-session",C="privy:caid",M=e=>`privy:guest:${e}`,A=e=>`privy:cross-app:${e}`,E="privy:state_code",x="privy:code_verifier",B="privy:headless_oauth",D="privy:oauth_disable_signup",W=e=>`privy:wallet:${e}`,S="privy:connections",L=12e4,H=1,I="0x1",O=3e4,U="https://api.moonpay.com/v1",P="https://api.moonpay.com/v1",q="pk_live_hirbpu0cVcLHrjktC9l7fbc9ctjv0SL",j="pk_test_fqWjXZMSFwloh7orvJsRfjiUHXJqFzI",R="deprecated",T={appearance:{landingHeader:"Log in or sign up",theme:"light",walletList:["detected_ethereum_wallets","detected_solana_wallets","metamask","coinbase_wallet","rainbow","base_account","wallet_connect","phantom"]},walletConnectCloudProjectId:"34357d3c125c2bcf2ce2bc3309d98715",_render:{standalone:!1},fundingMethodConfig:{moonpay:{useSandbox:!1}}};let N=new Set(["coinbase_wallet","base_account","cryptocom","metamask","okx_wallet","phantom","rainbow","uniswap","zerion","universal_profile","bybit_wallet","ronin_wallet","haha_wallet","wallet_connect","wallet_connect_qr","wallet_connect_qr_solana","detected_solana_wallets","detected_ethereum_wallets","rabby_wallet","safe","solflare","backpack","jupiter","binance","binanceus","bitget_wallet","kraken_wallet"]),$=e=>N.has(e),z=(e,t,a)=>a.indexOf(e)===t;const Y=({input:e,overrides:t})=>t?t.primary.concat(t.overflow??[]).filter($).filter(z):e?e.filter($).filter(z):T.appearance.walletList;let G=/paymaster\.biconomy\.io\/api/i,J={mode:"SPONSORED",calculateGasLimits:!0,expiryDuration:300,sponsorshipInfo:{webhookData:{},smartAccountInfo:{name:"BICONOMY",version:"2.0.0"}}};const V=(e,t)=>e&&G.test(e)?J:t&&t.policy_id?{policyId:t.policy_id}:void 0;function K(e,t){let a=Math.max(0,Math.min(1,e.toHsl().l+t));return c({...e.toHsl(),l:a})}function X(e,t){let a=e.getLuminance(),n=t.getLuminance();return(Math.max(a,n)+.05)/(Math.min(a,n)+.05)}function Z(e,t){if(!e){let e=t?ee:te;return{accent:c(e.background.interactive),accentLight:c(e.background.interactive),accentHover:c(e.background["interactive-hover"]),accentDark:c(e.background["interactive-clicked"]),accentDarkest:c(e.background["interactive-disabled"])}}let a=c(e);return{accent:a,accentLight:K(a,.15),accentHover:K(a,.3),accentDark:K(a,-.06),accentDarkest:K(a,-.6)}}function Q({backgroundTheme:e,accentHex:t}){let a,n;"light"===e?a=!1:"dark"===e?a=!0:(a=.5>=c(e).getLuminance(),n=c(e).toHslString());let o=a?"dark":"light",l=a?ee:te,{accent:r,accentLight:i,accentHover:s,accentDark:d,accentDarkest:u}=Z(t,a),g=function(e){let t=c(te.text.default),a=c(ee.text.default),n=X(e,t),o=X(e,a),l=e.toHsl();return l.h>=220&&l.h<=300&&o>=3?ee.text.default:n>o?te.text.default:ee.text.default}(r),h=c(g),f=X(r,c(l.background.default))>=3;return{colorScheme:o,background:n||l.background.default,background2:l.background.elevated,background3:l.background.interactive,foreground:l.text.default,foreground2:l.text.muted,foreground3:l.text.placeholder,foreground4:l.border.default,accent:r.toHslString(),accentLight:i.toHslString(),accentHover:s.toHslString(),accentDark:d.toHslString(),accentDarkest:u.toHslString(),foregroundAccent:h.toHslString(),success:l.background.success,successDark:l.text.success,successLight:l.background.success,error:l.text.error,errorLight:l.background.error,warn:l.background.warning,warnLight:l.background.warning,warningDark:l.text.warning,errorDark:l.text.error,successBg:l.background.success,errorBg:l.background.error,errorBgHover:l.background["error-hover"],warnBg:l.background.warning,infoBg:l.background.info,infoBgHover:l.background["info-hover"],borderDefault:l.border.default,borderHover:l.border["default-hover"],borderFocus:l.border.focused,borderError:l.border.error,borderSuccess:l.border.success,borderWarning:l.border.warning,borderInfo:l.border.info,borderInteractive:l.border.interactive,borderInteractiveHover:l.border["interactive-hover"],backgroundHover:l.background["default-hover"],backgroundClicked:l.background["default-clicked"],backgroundDisabled:l.background["default-disabled"],backgroundInteractive:l.background.interactive,backgroundInteractiveHover:l.background["interactive-hover"],backgroundInteractiveClicked:l.background["interactive-clicked"],backgroundInteractiveDisabled:l.background["interactive-disabled"],foregroundHover:l.text.default,foregroundClicked:l.text.default,foregroundDisabled:l.text["default-disabled"],foregroundInteractive:l.text.interactive,foregroundInteractiveHover:l.text["interactive-hover"],accentHasGoodContrast:f?"1":"0",linkNavigationColor:f?r.toHslString():l.text.default,linkNavigationDecoration:f?"none":"underline",iconDefault:l.icon.default,iconMuted:l.icon.muted,iconSubtle:l.icon.subtle,iconInverse:l.icon.inverse,iconSuccess:l.icon.success,iconWarning:l.icon.warning,iconError:l.icon.error,iconInteractive:l.icon.interactive,iconDefaultHover:l.icon["default-hover"],iconMutedHover:l.icon["muted-hover"],iconSubtleHover:l.icon["subtle-hover"],iconDefaultClicked:l.icon["default-clicked"],iconMutedClicked:l.icon["muted-clicked"],iconSubtleClicked:l.icon["subtle-clicked"],iconDefaultDisabled:l.icon["default-disabled"],iconMutedDisabled:l.icon["muted-disabled"],iconSubtleDisabled:l.icon["subtle-disabled"],iconErrorHover:l.icon["error-hover"],iconInteractiveHover:l.icon["interactive-hover"],iconErrorClicked:l.icon["error-clicked"],iconInteractiveClicked:l.icon["interactive-clicked"],iconMutedDisabledAlt:l.icon["muted-disabled"],iconSubtleDisabledAlt:l.icon["subtle-disabled"]}}const ee={background:{default:"#020713",elevated:"#1A2230","default-hover":"#101724","default-clicked":"#1A2230","default-disabled":"#020713",success:"#0E3E2D",warning:"#373827",error:"#2E0C18",interactive:"#8B86FF","error-hover":"#441821","interactive-hover":"#7B73E5","interactive-clicked":"#6560CC","interactive-disabled":"#141824",info:"#1F2937","info-hover":"#141824"},icon:{default:"#F8F8F8",muted:"#9BA2AE",subtle:"#7B8491",inverse:"#020713",success:"#88E3B5",warning:"#FDF27B",error:"#EF4444",interactive:"#88B6FF","default-hover":"#F8F8F8","muted-hover":"#AEB3BD","subtle-hover":"#8B939E","default-clicked":"#F8F8F8","muted-clicked":"#9097A5","subtle-clicked":"#78818E","default-disabled":"#404452","muted-disabled":"#404452","subtle-disabled":"#404452","error-hover":"#F05555","interactive-hover":"#7B73E5","error-clicked":"#EF4444","interactive-clicked":"#6560CC"},text:{default:"#F8F8F8",muted:"#9BA2AE",placeholder:"#7B8491",success:"#ACEECB",warning:"#FEF9A0",error:"#FCA5A5",interactive:"#A29EFF","default-disabled":"#404452","interactive-hover":"#8C88E5"},border:{default:"#1F2937",interactive:"#88B0FF",focused:"#F8F8FC",info:"#5B83D3",success:"#317056",warning:"#FBBF24",error:"#F87171","default-hover":"#34304A","interactive-hover":"#88B0FF"}},te={background:{default:"#FFFFFF",elevated:"#F1F2F9","default-hover":"#F8F9FC","default-clicked":"#F1F2F9","default-disabled":"#FFFFFF",success:"#DCFCE7",warning:"#FEF3C7",error:"#FEE2E2",interactive:"#5B4FFF","error-hover":"#FECACA","interactive-hover":"#4F46E5","interactive-clicked":"#4338CA","interactive-disabled":"#F1F2F9",info:"#E0E7FF","info-hover":"#EEF2FF"},icon:{default:"#110F2A",muted:"#64668B",subtle:"#9498B8",inverse:"#FFFFFF",success:"#33B287",warning:"#F59E0B",error:"#EF4444",interactive:"#564FFF","default-hover":"#1D1B35","muted-hover":"#64668B","subtle-hover":"#888AAE","default-clicked":"#060C23","muted-clicked":"#64668B","subtle-clicked":"#788804","default-disabled":"#CBCDE1","muted-disabled":"#CBCDE1","subtle-disabled":"#CBCDE1","error-hover":"#F06060","interactive-hover":"#4F46E5","error-clicked":"#DC3838","interactive-clicked":"#2BA482"},text:{default:"#040217",muted:"#64668B",placeholder:"#9498B8",success:"#135638",warning:"#906218",error:"#991B1B",interactive:"#5B4FFF","default-disabled":"#CBCDE1","interactive-hover":"#5B4FFF"},border:{default:"#E2E3F0",interactive:"#5B4FFF",focused:"#949DF9",info:"#F1F2F9",success:"#87D7B7",warning:"#FACD63",error:"#F69393","default-hover":"#E2E3F0","interactive-hover":"#5B4FFF"}};function ae(e,t,a,n,o){let l,c,d,u,g,h,f,p,_,b,m,v,w,k,y,F,C,M,A=a?console.warn:()=>{},E=[];if(t?.loginMethods)for(let e of(l=t.loginMethods.includes("email"),c=t.loginMethods.includes("sms"),u=t.loginMethods.includes("wallet"),g=t.loginMethods.includes("google"),h=t.loginMethods.includes("twitter"),f=t.loginMethods.includes("discord"),m=t.loginMethods.includes("spotify"),v=t.loginMethods.includes("instagram"),p=t.loginMethods.includes("tiktok"),_=t.loginMethods.includes("line"),b=t.loginMethods.includes("twitch"),k=t.loginMethods.includes("github"),w=t.loginMethods.includes("linkedin"),y=t.loginMethods.includes("apple"),F=t.loginMethods.includes("farcaster"),C=t.loginMethods.includes("telegram"),d=t.loginMethods.includes("passkey"),t.loginMethods))"string"==typeof e&&e.startsWith("privy:")&&E.push(e);else l=e.email_auth,c=e.sms_auth,u=e.wallet_auth||e.solana_wallet_auth,g=e.google_oauth,h=e.twitter_oauth,f=e.discord_oauth,k=e.github_oauth,m=e.spotify_oauth,v=e.instagram_oauth,p=e.tiktok_oauth,_=e.line_oauth,b=e.twitch_oauth,w=e.linkedin_oauth,y=e.apple_oauth,F=e.farcaster_auth,C=e.telegram_auth,d=e.passkey_auth,M=e.custom_jwt_auth;e.passkey_auth&&(d=!0),"undefined"!=typeof window&&"function"!=typeof window.PublicKeyCredential&&(d=!1);let x=[l,c].filter(Boolean),B=[g,h,f,k,m,v,p,_,b,w,y,F,C].filter(Boolean),D=[u].filter(Boolean),W=t?.loginMethods?.includes("passkey")??!1,S=e.passkeys_for_signup_enabled??!1,L=[d&&(S||W)].filter(Boolean),H=[M].filter(Boolean);if(x.length+B.length+D.length+L.length+H.length+E.length===0)throw Error("You must enable at least one login method");let I=void 0!==t?.appearance?.showWalletLoginFirst?t?.appearance?.showWalletLoginFirst:e.show_wallet_login_first;I&&0===D.length?(A("You should only enable `showWalletLoginFirst` when `wallet` logins are also enabled. `showWalletLoginFirst` has been set to false"),I=!1):I||B.length+x.length!==0||(A("You should only disable `showWalletLoginFirst` when `email`, `sms`, or social logins are also enabled. `showWalletLoginFirst` has been set to true"),I=!0);let O=t?.externalWallets?.walletConnect?.enabled??!0;t?.loginMethods&&t.loginMethodsAndOrder&&A("You should only configure one of `loginMethods` or `loginMethodsAndOrder`");let U=Y({input:t?.appearance?.walletList,overrides:t?.loginMethodsAndOrder});if((U.includes("wallet_connect_qr")||U.includes("wallet_connect"))&&U.includes("wallet_connect_qr_solana"))throw Error("wallet_connect_qr and wallet_connect_qr_solana cannot both be present in walletList due to WalletConnect session conflicts.");let P=(({input:e})=>{if(!e||!e.primary[0])return;let t=[e.primary[0]],a=[];for(let a of(e.primary.length>4&&console.warn("You should not specify greater than 4 login methods in `loginMethodsAndOrder.primary`"),e.primary.slice(1)))t.includes(a)?console.warn(`Duplicated login method: ${a}`):t.push(a);for(let n of e.overflow??[])t.includes(n)||a.includes(n)?console.warn(`Duplicated login method: ${n}`):a.push(n);return{primary:t,overflow:a}})({input:t?.loginMethodsAndOrder}),q=t?.intl?.defaultCountry??"US",{chains:j,defaultChain:R}=function({supportedChains:e,defaultChainFromConfig:t}){let a;if(e){if(0===e.length)throw Error("`supportedChains` must contain at least one chain");a=r(e)}else a=[...i];let n=e?a[0]:s,o=t??n;if(!a.find((e=>e.id===o.id)))throw Error("`defaultChain` must be included in `supportedChains`");return{chains:a,defaultChain:o}}({supportedChains:t?.supportedChains,defaultChainFromConfig:t?.defaultChain}),N=!!t?.defaultChain,$=t?.customAuth?.getCustomAccessToken&&!1!==t?.customAuth?.enabled,z=$?"all-users":e.embedded_wallet_config.ethereum.create_on_login,G=e.embedded_wallet_config.solana.create_on_login;e.solana_wallet_auth&&!t?.externalWallets?.solana?.connectors&&console.warn("App configuration has Solana wallet login enabled, but no Solana wallet connectors have been passed to Privy. Make sure to pass Solana connectors to the `config.externalWallets.solana.connectors` field of the `PrivyProvider`");let J=e.telegram_auth_config?{botId:e.telegram_auth_config.bot_id,botName:e.telegram_auth_config.bot_name,linkEnabled:e.telegram_auth_config.link_enabled,seamlessAuthEnabled:e.telegram_auth_config.seamless_auth_enabled}:void 0,K=e.funding_config?{methods:e.funding_config.methods,options:e.funding_config.options,defaultRecommendedAmount:e.funding_config.default_recommended_amount,defaultRecommendedCurrency:e.funding_config.default_recommended_currency,promptFundingOnWalletCreation:e.funding_config.prompt_funding_on_wallet_creation,crossChainBridgingEnabled:e.funding_config.cross_chain_bridging_enabled}:void 0,X=e.smart_wallet_config;return{id:e.id,appClientId:o,name:e.name,allowlistConfig:{errorTitle:e.allowlist_config.error_title,errorDetail:e.allowlist_config.error_detail,errorCtaText:e.allowlist_config.cta_text,errorCtaLink:e.allowlist_config.cta_link},legacyWalletUiConfig:e.legacy_wallet_ui_config,appearance:{logo:t?.appearance?.logo??e.logo_url??void 0,landingHeader:t?.appearance?.landingHeader??T.appearance.landingHeader,loginMessage:"string"==typeof t?.appearance?.loginMessage?t?.appearance?.loginMessage.slice(0,100):t?.appearance?.loginMessage,footerLogo:t?.appearance?.footerLogo,palette:Q({backgroundTheme:t?.appearance?.theme??T.appearance.theme,accentHex:t?.appearance?.accentColor??e.accent_color}),loginGroupPriority:I?"web3-first":"web2-first",hideDirectWeb2Inputs:!!t?.appearance?.hideDirectWeb2Inputs,walletList:U,walletChainType:t?.appearance?.walletChainType??(({evmWalletAuth:e,solanaWalletAuth:t})=>e&&t?"ethereum-and-solana":e?"ethereum-only":t?"solana-only":"ethereum-only")({evmWalletAuth:e.wallet_auth??!1,solanaWalletAuth:e.solana_wallet_auth??!1})},loginMethods:{wallet:u,email:l,sms:c,passkey:d,google:g,twitter:h,discord:f,github:k,spotify:m,instagram:v,tiktok:p,line:_,twitch:b,linkedin:w,apple:y,farcaster:F,telegram:C},globalDisablePasskeys:t?.globalDisablePasskeys??!1,customOAuthProviders:(e.custom_oauth_providers??[]).filter((e=>!1!==e.enabled)),crossAppProviders:E,disablePlusEmails:e.disable_plus_emails,loginMethodsAndOrder:P,legal:{termsAndConditionsUrl:t?.legal?.termsAndConditionsUrl??e.terms_and_conditions_url,privacyPolicyUrl:t?.legal?.privacyPolicyUrl??e.privacy_policy_url,requireUsersAcceptTerms:e.require_users_accept_terms??!1},walletConnectCloudProjectId:t?.walletConnectCloudProjectId??e.wallet_connect_cloud_project_id??T.walletConnectCloudProjectId,rpcConfig:{rpcUrls:{},rpcTimeouts:t?.externalWallets?.signatureRequestTimeouts??{}},chains:j,defaultChain:R,intl:{defaultCountry:q,textLocalization:t?.intl?.textLocalization},shouldEnforceDefaultChainOnConnect:N,captcha:{enabledProvider:e.enabled_captcha_provider??null,siteKey:e.captcha_site_key},externalWallets:{coinbaseWallet:{config:{appName:e.name,appLogoUrl:e.logo_url,preference:{options:"all",...t?.externalWallets?.coinbaseWallet?.config?.preference},...t?.externalWallets?.coinbaseWallet?.config}},baseAccount:{config:{appName:e.name,appLogoUrl:e.logo_url,...t?.externalWallets?.baseAccount?.config,preference:{...t?.externalWallets?.baseAccount?.config?.preference,telemetry:!1}}},walletConnect:{enabled:O},solana:{connectors:t?.externalWallets?.solana?.connectors},disableAllExternalWallets:t?.externalWallets?.disableAllExternalWallets??!1},embeddedWallets:{requireUserOwnedRecoveryOnCreate:!$&&(e.embedded_wallet_config.require_user_owned_recovery_on_create??!1),userOwnedRecoveryOptions:$?["user-passcode"]:e.embedded_wallet_config.user_owned_recovery_options,priceDisplay:t?.embeddedWallets?.priceDisplay??{primary:"fiat-currency",secondary:"native-token"},ethereum:{createOnLogin:t?.embeddedWallets?.ethereum?.createOnLogin??z},solana:{createOnLogin:t?.embeddedWallets?.solana?.createOnLogin??G},disableAutomaticMigration:t?.embeddedWallets?.disableAutomaticMigration??!1,mode:e.embedded_wallet_config.mode,showWalletUIs:t?.embeddedWallets?.showWalletUIs??e.enforce_wallet_uis??!0,extendedCalldataDecoding:t?.embeddedWallets?.extendedCalldataDecoding??!1,transactionScanning:{enabled:t?.embeddedWallets?.transactionScanning?.enabled??!1,domain:t?.embeddedWallets?.transactionScanning?.domain??n??"https://auth.privy.io"}},mfa:{methods:e.mfa_methods??[],noPromptOnMfaRequired:t?.mfa?.noPromptOnMfaRequired??!1},passkeys:{shouldUnlinkOnUnenrollMfa:t?.passkeys?.shouldUnlinkOnUnenrollMfa,shouldUnenrollMfaOnUnlink:t?.passkeys?.shouldUnenrollMfaOnUnlink,registration:t?.passkeys?.registration},customAuth:$?{enabled:!0,...t.customAuth}:void 0,loginConfig:{telegramAuthConfiguration:J,passkeysForSignupEnabled:e.passkeys_for_signup_enabled},headless:!!t?.headless,render:{standalone:t?._render?.standalone??T._render.standalone},fundingConfig:K,fundingMethodConfig:{...t?.fundingMethodConfig??T.fundingMethodConfig,moonpay:{...t?.fundingMethodConfig?.moonpay??T.fundingMethodConfig.moonpay,useSandbox:t?.fundingMethodConfig?.moonpay.useSandbox??T.fundingMethodConfig.moonpay.useSandbox}},whatsAppEnabled:!!e.whatsapp_enabled,customOAuthRedirectUrl:t?.customOAuthRedirectUrl,allowOAuthInEmbeddedBrowsers:t?.allowOAuthInEmbeddedBrowsers??!1,solanaRpcs:{"solana:mainnet":t?.solana?.rpcs?.["solana:mainnet"]??null,"solana:devnet":t?.solana?.rpcs?.["solana:devnet"]??null,"solana:testnet":t?.solana?.rpcs?.["solana:testnet"]??null},smartWallets:X?.enabled?{enabled:X.enabled,smartWalletVersion:X.smart_wallet_version,smartWalletType:X.smart_wallet_type,configuredNetworks:X.configured_networks.map((e=>({chainId:e.chain_id,bundlerUrl:e.bundler_url,paymasterUrl:e.paymaster_url,paymasterContext:V(e.paymaster_url,e.paymaster_context)})))}:{enabled:X?.enabled??!1}}}const ne={show_wallet_login_first:!0,allowlist_config:{error_title:null,error_detail:null,cta_text:null,cta_link:null},wallet_auth:!0,email_auth:!0,sms_auth:!1,google_oauth:!1,twitter_oauth:!1,discord_oauth:!1,github_oauth:!1,linkedin_oauth:!1,apple_oauth:!1,disable_plus_emails:!1,terms_and_conditions_url:null,privacy_policy_url:null,embedded_wallet_config:{create_on_login:"off",ethereum:{create_on_login:"off"},solana:{create_on_login:"off"},require_user_owned_recovery_on_create:!1,user_owned_recovery_options:["user-passcode"],mode:"user-controlled-server-wallets-only"},captcha_site_key:"",enforce_wallet_uis:!1,legacy_wallet_ui_config:!1,id:"",name:"",passkeys_for_signup_enabled:!1,whatsapp_enabled:!1};let oe=/*#__PURE__*/o({appConfig:ae(ne,void 0,!1),isServerConfigLoaded:!1});const le=({children:o,client:l,legacyClient:r,clientConfig:i,appClientId:s})=>{let[c,d]=t(null),u=a((()=>ae(c??ne,i,!!c,"undefined"!=typeof window?window.location.origin:void 0,s)),[c,i,s]);return n((()=>{if(!c)return;let e=function(e){if(!e)return{};let{appearance:t,supportedChains:a,defaultChain:n,externalWallets:o,...l}=e;return{...l,...a?{supportedChains:a.map((e=>e.id))}:void 0,...n?{defaultChain:n.id}:void 0,...o?{walletConnect:o.walletConnect?{enabled:o.walletConnect.enabled}:void 0,coinbaseWallet:o.coinbaseWallet,solana:{connectors:o.solana?.connectors?.get().map((e=>e.walletClientType))}}:void 0}}(i),t=function(e,t=0){let a=3735928559^t,n=1103547991^t;for(let t,o=0;o<e.length;o++)a=Math.imul(a^(t=e.charCodeAt(o)),2654435761),n=Math.imul(n^t,1597334677);return a=Math.imul(a^a>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),4294967296*(2097151&(n=Math.imul(n^n>>>16,2246822507)^Math.imul(a^a>>>13,3266489909)))+(a>>>0)}(JSON.stringify(e)).toString(),a=`privy:sent:${c.id}:${t}`;localStorage.getItem(a)||(r.createAnalyticsEvent({eventName:"sdk_initialize",payload:e}),localStorage.setItem(a,"t"))}),[i,c]),n((()=>{c||(async()=>{try{await l.initialize();let e=l.app.getConfig();e.custom_api_url&&r.updateApiUrl(e.custom_api_url),d(e)}catch(e){console.warn("Error generating app config: ",e)}})()}),[]),/*#__PURE__*/e(oe.Provider,{value:{appConfig:u,isServerConfigLoaded:!!c},children:o})},re=()=>{let{appConfig:e}=l(oe);return e},ie=()=>{let{isServerConfigLoaded:e}=l(oe);return e};export{_ as C,d as D,B as H,k as I,P as M,D as O,w as P,m as R,E as S,p as V,O as W,x as a,S as b,ie as c,C as d,A as e,F as f,M as g,R as h,b as i,v as j,y as k,u as l,le as m,L as n,W as o,I as p,g as q,h as r,H as s,f as t,re as u,U as v,j as w,q as x};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as h}from"react/jsx-runtime";const c=({color:c,...v})=>/*#__PURE__*/h("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 115.77 122.88",xmlSpace:"preserve",...v,children:/*#__PURE__*/h("g",{children:/*#__PURE__*/h("path",{fill:c||"currentColor",className:"st0",d:"M89.62,13.96v7.73h12.19h0.01v0.02c3.85,0.01,7.34,1.57,9.86,4.1c2.5,2.51,4.06,5.98,4.07,9.82h0.02v0.02 v73.27v0.01h-0.02c-0.01,3.84-1.57,7.33-4.1,9.86c-2.51,2.5-5.98,4.06-9.82,4.07v0.02h-0.02h-61.7H40.1v-0.02 c-3.84-0.01-7.34-1.57-9.86-4.1c-2.5-2.51-4.06-5.98-4.07-9.82h-0.02v-0.02V92.51H13.96h-0.01v-0.02c-3.84-0.01-7.34-1.57-9.86-4.1 c-2.5-2.51-4.06-5.98-4.07-9.82H0v-0.02V13.96v-0.01h0.02c0.01-3.85,1.58-7.34,4.1-9.86c2.51-2.5,5.98-4.06,9.82-4.07V0h0.02h61.7 h0.01v0.02c3.85,0.01,7.34,1.57,9.86,4.1c2.5,2.51,4.06,5.98,4.07,9.82h0.02V13.96L89.62,13.96z M79.04,21.69v-7.73v-0.02h0.02 c0-0.91-0.39-1.75-1.01-2.37c-0.61-0.61-1.46-1-2.37-1v0.02h-0.01h-61.7h-0.02v-0.02c-0.91,0-1.75,0.39-2.37,1.01 c-0.61,0.61-1,1.46-1,2.37h0.02v0.01v64.59v0.02h-0.02c0,0.91,0.39,1.75,1.01,2.37c0.61,0.61,1.46,1,2.37,1v-0.02h0.01h12.19V35.65 v-0.01h0.02c0.01-3.85,1.58-7.34,4.1-9.86c2.51-2.5,5.98-4.06,9.82-4.07v-0.02h0.02H79.04L79.04,21.69z M105.18,108.92V35.65v-0.02 h0.02c0-0.91-0.39-1.75-1.01-2.37c-0.61-0.61-1.46-1-2.37-1v0.02h-0.01h-61.7h-0.02v-0.02c-0.91,0-1.75,0.39-2.37,1.01 c-0.61,0.61-1,1.46-1,2.37h0.02v0.01v73.27v0.02h-0.02c0,0.91,0.39,1.75,1.01,2.37c0.61,0.61,1.46,1,2.37,1v-0.02h0.01h61.7h0.02 v0.02c0.91,0,1.75-0.39,2.37-1.01c0.61-0.61,1-1.46,1-2.37h-0.02V108.92L105.18,108.92z"})})});export{c as C};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{getAddress as e}from"viem";import{jsx as t,jsxs as i}from"react/jsx-runtime";import{useContext as a,createContext as r,useState as s,useRef as l,useEffect as n}from"react";import{u}from"./context-CwMpvKNV.mjs";import{n as d}from"./internal-context-Z-fyxadS.mjs";function o(e){return"string"==typeof e&&/^custom:[a-zA-Z0-9_-]+$/i.test(e)}function c(e){return e?new Date(1e3*e):null}function p(e,t){return e.slice().sort(((e,t)=>(e.firstVerifiedAt?.getTime()??0)-(t.firstVerifiedAt?.getTime()??0))).find((e=>e.type===t))}const m=e=>e?f(e).find((e=>0===e.walletIndex))??null:null,f=e=>e?_(e,"ethereum"):[],_=(e,t)=>e.linkedAccounts.filter((e=>"wallet"===e.type&&"privy"===e.walletClientType&&!e.imported&&e.chainType===t)),y=e=>e?_(e,"solana"):[],h=e=>e?y(e).find((e=>0===e.walletIndex))??null:null,b=e=>(e?.linkedAccounts??[]).filter((e=>"wallet"===e.type&&"privy"===e.walletClientType&&e.imported&&"ethereum"===e.chainType)),k=e=>(e?.linkedAccounts??[]).filter((e=>"wallet"===e.type&&e.imported&&"privy"===e.walletClientType&&"solana"===e.chainType)),g=(t,i)=>t===i||!(!t.startsWith("0x")||!i.startsWith("0x"))&&42===t.length&&42===i.length&&e(t)===e(i),v=(e,t)=>e?.linkedAccounts.find((e=>"wallet"===e.type&&"privy"===e.walletClientType&&g(e.address,t)))||null,A=(e,t)=>e.find((e=>g(e.address,t)))||null,j=e=>m(e)??h(e);function w(e){if(!e)return null;let t=function(e){let t=[];for(let i of e){let e=i.type;switch(i.type){case"wallet":let a={id:i.id,address:i.address,type:i.type,imported:i.imported,delegated:i.delegated,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at),chainType:i.chain_type,walletClientType:i.wallet_client_type,connectorType:i.connector_type,recoveryMethod:i.recovery_method,walletIndex:i.wallet_index,publicKey:i.public_key};t.push(a);break;case"smart_wallet":let r={address:i.address,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at),smartWalletType:i.smart_wallet_type,smartWalletVersion:i.smart_wallet_version};t.push(r);break;case"cross_app":let s={type:i.type,subject:i.subject,embeddedWallets:i.embedded_wallets,smartWallets:i.smart_wallets,providerApp:{id:i.provider_app_id},firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(s);break;case"email":let l={address:i.address,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(l);break;case"phone":let n={number:i.phoneNumber,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(n);break;case"google_oauth":let u={subject:i.subject,email:i.email,name:i.name,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(u);break;case"spotify_oauth":let d={subject:i.subject,email:i.email,name:i.name,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(d);break;case"instagram_oauth":let p={subject:i.subject,username:i.username,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(p);break;case"twitter_oauth":let m={subject:i.subject,username:i.username,name:i.name,type:i.type,profilePictureUrl:i.profile_picture_url,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(m);break;case"discord_oauth":let f={subject:i.subject,username:i.username,email:i.email,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(f);break;case"github_oauth":let _={subject:i.subject,username:i.username,name:i.name,email:i.email,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(_);break;case"tiktok_oauth":let y={subject:i.subject,username:i.username,name:i.name,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(y);break;case"line_oauth":let h={subject:i.subject,name:i.name,email:i.email,profilePictureUrl:i.profile_picture_url,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(h);break;case"twitch_oauth":let b={subject:i.subject,username:i.username,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(b);break;case"linkedin_oauth":let k={subject:i.subject,name:i.name,email:i.email,vanityName:i.vanity_name,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(k);break;case"apple_oauth":let g={subject:i.subject,email:i.email,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(g);break;case"custom_auth":t.push({type:i.type,customUserId:i.custom_user_id,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)});break;case"farcaster":let v={type:i.type,fid:i.fid,ownerAddress:i.owner_address,displayName:i.display_name,username:i.username,bio:i.bio,pfp:i.profile_picture_url,url:i.homepage_url,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at),signerPublicKey:i.signer_public_key};t.push(v);break;case"passkey":let A={type:i.type,enrolledInMfa:i.enrolled_in_mfa,credentialId:i.credential_id,publicKey:i.public_key,authenticatorName:i.authenticator_name,createdWithDevice:i.created_with_device,createdWithOs:i.created_with_os,createdWithBrowser:i.created_with_browser,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(A);break;case"telegram":let j={type:i.type,telegramUserId:i.telegram_user_id,firstName:i.first_name,lastName:i.last_name,username:i.username,photoUrl:i.photo_url,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(j);break;default:if(o(i.type)){let e={type:i.type,subject:i.subject,name:i.name,username:i.username,email:i.email,profilePictureUrl:i.profile_picture_url,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(e);break}console.warn(`Unrecognized account type: ${e}. Please consider upgrading the Privy SDK.`)}}return t}(e.linked_accounts),i=p(t,"wallet"),a=p(t,"smart_wallet"),r=p(t,"email"),s=p(t,"phone"),l=p(t,"google_oauth"),n=p(t,"twitter_oauth"),u=p(t,"discord_oauth"),d=p(t,"github_oauth"),m=p(t,"spotify_oauth"),f=p(t,"instagram_oauth"),_=p(t,"tiktok_oauth"),y=p(t,"line_oauth"),h=p(t,"twitch_oauth"),b=p(t,"linkedin_oauth"),k=p(t,"apple_oauth"),g=p(t,"farcaster"),v=p(t,"telegram"),A=e.mfa_methods.map((({type:e,verified_at:t})=>({type:e,verifiedAt:c(t)})));return{id:e.id,createdAt:c(e.created_at),linkedAccounts:t,email:r&&{address:r?.address},phone:s&&{number:s?.number},wallet:i&&{id:i.id,address:i.address,chainType:i.chainType,walletClientType:i.walletClientType,connectorType:i.connectorType,recoveryMethod:i.recoveryMethod,imported:i.imported,delegated:i.delegated,walletIndex:i.walletIndex,publicKey:i.publicKey},smartWallet:a&&{address:a.address,smartWalletType:a.smartWalletType,smartWalletVersion:a.smartWalletVersion},google:l&&{subject:l.subject,email:l.email,name:l.name},twitter:n&&{subject:n.subject,username:n.username,name:n.name,profilePictureUrl:n.profilePictureUrl},discord:u&&{subject:u.subject,username:u.username,email:u.email},github:d&&{subject:d.subject,username:d.username,name:d.name,email:d.email},spotify:m&&{subject:m.subject,email:m.email,name:m.name},instagram:f&&{subject:f.subject,username:f.username},tiktok:_&&{subject:_.subject,username:_.username,name:_.name},line:y&&{subject:y.subject,name:y.name,email:y.email,profilePictureUrl:y.profilePictureUrl},twitch:h&&{subject:h.subject,username:h.username},linkedin:b&&{subject:b.subject,name:b.name,email:b.email,vanityName:b.vanityName},apple:k&&{subject:k.subject,email:k.email},farcaster:g&&{fid:g.fid,ownerAddress:g.ownerAddress,displayName:g.displayName,username:g.username,bio:g.bio,pfp:g.pfp,url:g.url,signerPublicKey:g.signerPublicKey},telegram:v&&{telegramUserId:v.telegramUserId,firstName:v.firstName,lastName:v.lastName,username:v.username,photoUrl:v.photoUrl},delegatedWallets:[],mfaMethods:A.map((e=>e.type)),hasAcceptedTerms:e.has_accepted_terms??!1,isGuest:e.is_guest,customMetadata:e.custom_metadata}}function V({src:e,...i}){/*#__PURE__*/return t("img",{src:e,...i,style:{display:"none"}})}const T=/*#__PURE__*/r({currentScreen:null,lastScreen:null,navigate:d,navigateBack:d,resetNavigation:d,setModalData:d,onUserCloseViaDialogOrKeybindRef:void 0}),W=e=>{let a=u(),[r,d]=s(e.initialScreen),o=l(null);n((()=>{e.open||(o.current=null)}),[e.open]),n((()=>{o.current=null}),[e.initialScreen]);let c={data:e.data,setModalData:e.setModalData,currentScreen:e.initialScreen,lastScreen:r,navigate:(t,i=!0)=>{e.setInitialScreen(t),i&&d(e.initialScreen)},navigateBack:()=>{e.setInitialScreen(r)},resetNavigation:()=>{e.setInitialScreen(null),d(null)},onUserCloseViaDialogOrKeybindRef:o};/*#__PURE__*/return i(T.Provider,{value:c,children:[("string"==typeof a.appearance.logo||"img"===a.appearance.logo?.type)&&/*#__PURE__*/t(V,{src:"string"==typeof a.appearance.logo?a.appearance.logo:a.appearance.logo.props.src}),e.children]})},P=()=>a(T),I=/*#__PURE__*/r({ready:!1,authenticated:!1,user:null,walletConnectors:null,connectWallet:d,login:d,connectOrCreateWallet:d,linkEmail:d,linkPhone:d,linkFarcaster:d,linkWallet:d,startCrossAppAuthFlow:d,linkGoogle:d,linkTwitter:d,linkTwitch:d,linkDiscord:d,linkGithub:d,linkSpotify:d,linkInstagram:d,linkTelegram:d,linkTiktok:d,linkLine:d,linkLinkedIn:d,linkApple:d,linkPasskey:d,updateEmail:d,updatePhone:d,logout:d,getAccessToken:d,unlinkEmail:d,unlinkPhone:d,unlinkWallet:d,unlinkGoogle:d,unlinkTwitter:d,unlinkTwitch:d,unlinkDiscord:d,unlinkGithub:d,unlinkSpotify:d,unlinkInstagram:d,unlinkTiktok:d,unlinkLine:d,unlinkLinkedIn:d,unlinkApple:d,unlinkCrossAppAccount:d,unlinkFarcaster:d,unlinkTelegram:d,unlinkPasskey:d,signMessage:d,signTypedData:d,enrollInMfa:d,initEnrollmentWithSms:d,initEnrollmentWithTotp:d,initEnrollmentWithPasskey:d,promptMfa:d,init:d,submitEnrollmentWithSms:d,submitEnrollmentWithTotp:d,submitEnrollmentWithPasskey:d,unenroll:d,submit:d,cancel:d,sendTransaction:d,signTransaction:d,setWalletPassword:d,setWalletRecovery:d,requestFarcasterSignerFromWarpcast:d,getFarcasterSignerPublicKey:d,signFarcasterMessage:d,signMessageWithCrossAppWallet:d,signTypedDataWithCrossAppWallet:d,sendTransactionWithCrossAppWallet:d,signTransactionWithCrossAppWallet:d,isModalOpen:!1,mfaMethods:[]}),M=()=>a(I),S=e=>!!e.id&&"privy-v2"===e.recoveryMethod;export{W as M,I as P,P as a,S as b,m as c,h as d,f as e,b as f,j as g,v as h,o as i,A as j,k,w as l,g as m,_ as n,y as o,M as u};
|