@privy-io/react-auth 3.9.0 → 3.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{AccountNotFoundScreen-C0im9fAJ.js → AccountNotFoundScreen-BjG_YLcK.js} +1 -1
- package/dist/cjs/{Address-Doz93lgh.js → Address-5znFAhQw.js} +1 -1
- package/dist/cjs/{AffirmativeConsentScreen-OgvUs4oT.js → AffirmativeConsentScreen-BiwTOLaX.js} +1 -1
- package/dist/cjs/{AllowlistRejectionScreen-CBfQZVO7.js → AllowlistRejectionScreen-DOZr-QmF.js} +1 -1
- package/dist/cjs/{AuthenticateWithWalletScreen-B4aHQC44.js → AuthenticateWithWalletScreen-BO4ml_zL.js} +1 -1
- package/dist/cjs/{AwaitingEvmToSolBridgingScreen-Cz2E1cWa.js → AwaitingEvmToSolBridgingScreen-DCvvtPfy.js} +1 -1
- package/dist/cjs/{AwaitingExternalEthereumTransferScreen-Ca1z7D4v.js → AwaitingExternalEthereumTransferScreen-DXSQjzHX.js} +1 -1
- package/dist/cjs/{AwaitingPasswordlessCodeScreen-DDws79F8.js → AwaitingPasswordlessCodeScreen-COP_Jshz.js} +1 -1
- package/dist/cjs/{AwaitingSolToEvmBridgingScreen-DlTJafw4.js → AwaitingSolToEvmBridgingScreen-tGqHxf1K.js} +1 -1
- package/dist/cjs/{BridgeNetworkSelectionView-Cg3JjiFh.js → BridgeNetworkSelectionView-DgFjMLY3.js} +1 -1
- package/dist/cjs/{Button-DpuRzAgk.js → Button-Bm_Ft0Dw.js} +1 -1
- package/dist/cjs/{CaptchaScreen-DrvkYUK-.js → CaptchaScreen-BvyOQUvH.js} +1 -1
- package/dist/cjs/{CoinbaseOnrampStatusScreen-Cfbivt0s.js → CoinbaseOnrampStatusScreen-9G_2yIQ-.js} +1 -1
- package/dist/cjs/{ConnectEmailForm-DeN1Pg_E.js → ConnectEmailForm-D0Xd9Tnw.js} +1 -1
- package/dist/cjs/{ConnectLedgerScreen-F3-JADjW.js → ConnectLedgerScreen-COTQ1lqK.js} +1 -1
- package/dist/cjs/{ConnectOnlyLandingScreen-DQ9hxL8H.js → ConnectOnlyLandingScreen-DErN9BXL.js} +1 -1
- package/dist/cjs/{ConnectOnlyStatusScreen-YPhacltK.js → ConnectOnlyStatusScreen-DKhKRV2M.js} +1 -1
- package/dist/cjs/ConnectOrCreateScreen-54nvcrr7.js +1 -0
- package/dist/cjs/{ConnectPhoneForm-CIaHyHT9.js → ConnectPhoneForm-WT8rso3i.js} +1 -1
- package/dist/cjs/ConnectWalletView-DsOX-lHz.js +1 -0
- package/dist/cjs/{ConnectionStatusScreen-Dg1LMsi6.js → ConnectionStatusScreen-C1nqbW_A.js} +1 -1
- package/dist/cjs/CrossAppAuthScreen-weeiAu3O.js +1 -0
- package/dist/cjs/CustomLandingScreenView-DQLDU2GD.js +2 -0
- package/dist/cjs/{DelegatedActionsConsentScreen-CP9xV4-_.js → DelegatedActionsConsentScreen-C_-0aHwH.js} +1 -1
- package/dist/cjs/{DelegatedActionsRevokeScreen-QrgQlVmp.js → DelegatedActionsRevokeScreen-SZkD3b1o.js} +1 -1
- package/dist/cjs/{EmbeddedWalletConnectingScreen-Ccb4geKv.js → EmbeddedWalletConnectingScreen-VdpmfKNX.js} +1 -1
- package/dist/cjs/{EmbeddedWalletCreatedScreen-DTRBR5WW.js → EmbeddedWalletCreatedScreen-CfEf4KkH.js} +1 -1
- package/dist/cjs/{EmbeddedWalletKeyExportScreen-B1Ezr57N.js → EmbeddedWalletKeyExportScreen-D0NE_HvJ.js} +1 -1
- package/dist/cjs/{EmbeddedWalletOnAccountCreateScreen-0v1ZwZgX.js → EmbeddedWalletOnAccountCreateScreen-CrJFTRI0.js} +1 -1
- package/dist/cjs/{EmbeddedWalletPasswordUpdateScreen-DJr1d2fN.js → EmbeddedWalletPasswordUpdateScreen-CjVK53bu.js} +1 -1
- package/dist/cjs/{EmbeddedWalletPasswordUpdateSplashScreen-Slns6kTr.js → EmbeddedWalletPasswordUpdateSplashScreen-CVldlThA.js} +1 -1
- package/dist/cjs/{EnrollTotp-zJR3l-q0.js → EnrollTotp-BVeDTQ5J.js} +1 -1
- package/dist/cjs/{ErrorScreen-DAUNTckD.js → ErrorScreen-BSjRGrRR.js} +1 -1
- package/dist/cjs/{FarcasterConnectStatusScreen-C3PPAnT1.js → FarcasterConnectStatusScreen-B7Ab3ddi.js} +1 -1
- package/dist/cjs/{FarcasterSignerStatusScreen-BMd0iB8M.js → FarcasterSignerStatusScreen-Bf--BYd8.js} +1 -1
- package/dist/cjs/{FundSolWalletWithExternalSolanaWallet-u8DS0vOP.js → FundSolWalletWithExternalSolanaWallet-DcRxhkRg.js} +2 -2
- package/dist/cjs/{FundWalletMethodHeader-DFV8N4os.js → FundWalletMethodHeader-BKgYjMau.js} +1 -1
- package/dist/cjs/{FundingEditAmountScreen-DXA8k8zQ.js → FundingEditAmountScreen-Bs3_avzr.js} +1 -1
- package/dist/cjs/{FundingMethodSelectionScreen-tlU_tfXm.js → FundingMethodSelectionScreen-C_cbW1TC.js} +1 -1
- package/dist/cjs/{InAppBrowserLoginNotPossible-BB_zYdr4.js → InAppBrowserLoginNotPossible-CySpQd3Y.js} +1 -1
- package/dist/cjs/{InstallWalletScreen-sNsX0qIj.js → InstallWalletScreen-rFpE2-7H.js} +1 -1
- package/dist/cjs/LandingScreen-BmZWpgb3.js +1 -0
- package/dist/cjs/{LinkConflictScreen-CwA2g0DP.js → LinkConflictScreen-DSIPReKB.js} +1 -1
- package/dist/cjs/{LinkEmailScreen-DExuIdVG.js → LinkEmailScreen-Dc8QC15P.js} +1 -1
- package/dist/cjs/{LinkPasskeyScreen-DXLAama3.js → LinkPasskeyScreen-CUMuhJ2Q.js} +1 -1
- package/dist/cjs/{LinkPhoneScreen-BGKi4PVT.js → LinkPhoneScreen-bozyY6A1.js} +1 -1
- package/dist/cjs/{LoginFailedScreen-BMAuqJva.js → LoginFailedScreen-C4gl1Ezs.js} +1 -1
- package/dist/cjs/{ManualTransferScreen-Dg8uGXZw.js → ManualTransferScreen-BTj8KQgY.js} +1 -1
- package/dist/cjs/{MfaAuthEnrollmentFlowScreen-BZ1svjjW.js → MfaAuthEnrollmentFlowScreen-cmFsgDp4.js} +1 -1
- package/dist/cjs/{MfaAuthVerifyFlowScreen-CJhMSZ1r.js → MfaAuthVerifyFlowScreen-DEC3hYOD.js} +1 -1
- package/dist/cjs/{MfaEnrollmentFlowScreen-DvxX-vrH.js → MfaEnrollmentFlowScreen-3lOG0uKv.js} +1 -1
- package/dist/cjs/{MfaVerifyFlowScreen-BWPqGNNj.js → MfaVerifyFlowScreen-aRH0rn8s.js} +1 -1
- package/dist/cjs/{ModalHeader-4MV7Tgk7.js → ModalHeader-DB7Tbjwz.js} +1 -1
- package/dist/cjs/{MoonpayStatusScreen-Cd_71Pyq.js → MoonpayStatusScreen-DANoQOd5.js} +1 -1
- package/dist/cjs/{OAuthStatusScreen-ZTRfDJXT.js → OAuthStatusScreen-DsGkPiMe.js} +1 -1
- package/dist/cjs/{PasskeySelectSignupOrLogin-CQZM_RDH.js → PasskeySelectSignupOrLogin-D9Wfb44J.js} +1 -1
- package/dist/cjs/{PasskeyStatusScreen-BM1Mvl9i.js → PasskeyStatusScreen-DAxg2zUJ.js} +1 -1
- package/dist/cjs/{PasswordRecoveryScreen-CvVt6RGf.js → PasswordRecoveryScreen-CJfW4kpk.js} +1 -1
- package/dist/cjs/{QrCode-DvJPyneT.js → QrCode-DsQD8cG6.js} +1 -1
- package/dist/cjs/{RecoveryOAuthStatusScreen-Cg2ntkgK.js → RecoveryOAuthStatusScreen-_R1gExdU.js} +1 -1
- package/dist/cjs/{RecoveryPasswordCreateScreen-dGZOvD2x.js → RecoveryPasswordCreateScreen-Cb-gcVc8.js} +1 -1
- package/dist/cjs/{RecoverySelectionScreen-DBAg2tyX.js → RecoverySelectionScreen-CZOXXRGl.js} +1 -1
- package/dist/cjs/{Screen-CJM19YNL.js → Screen-D9Tvi297.js} +1 -1
- package/dist/cjs/{ScreenLayout-Bbhw-EIr.js → ScreenLayout-BeH-Q6N2.js} +1 -1
- package/dist/cjs/{SetAutomaticRecoveryScreen-C65Py491.js → SetAutomaticRecoveryScreen-BSDQb_dJ.js} +1 -1
- package/dist/cjs/{SetWalletPasswordForm-Bx4bpcUs.js → SetWalletPasswordForm-C3YB2v_1.js} +1 -1
- package/dist/cjs/{SignRequestScreen-Dy8xnXXp.js → SignRequestScreen-DW3SnJi5.js} +1 -1
- package/dist/cjs/{StandardSignAndSendTransactionScreen-x1O5yfj4.js → StandardSignAndSendTransactionScreen-Cima1YEn.js} +1 -1
- package/dist/cjs/{TelegramAuthScreen-DaxoKw-V.js → TelegramAuthScreen-pfwAx0uQ.js} +1 -1
- package/dist/cjs/{TransactionDetails-DvBQbDgX.js → TransactionDetails-KB5Wyu1l.js} +1 -1
- package/dist/cjs/{TransactionErrorView-BdTYgWfc.js → TransactionErrorView-SaY08uTA.js} +1 -1
- package/dist/cjs/TransferFromWalletScreen-DVzjB3Gc.js +1 -0
- package/dist/cjs/TransferOrBridgeLoadingScreen-B3zo8l43.js +1 -0
- package/dist/cjs/{UpdateEmailScreen-BtndcDiP.js → UpdateEmailScreen-CwWKZeJR.js} +1 -1
- package/dist/cjs/{UpdatePhoneScreen-BQb3cbdX.js → UpdatePhoneScreen-B84E2DOe.js} +1 -1
- package/dist/cjs/{UserLimitReachedScreen-Ctgox4aT.js → UserLimitReachedScreen-CQMqK5QW.js} +1 -1
- package/dist/cjs/{WalletInfoCard-DQtI0K25.js → WalletInfoCard-DKVdH9iF.js} +1 -1
- package/dist/cjs/{WalletInterstitialScreen-HfTntL7I.js → WalletInterstitialScreen-0cBKaDQ1.js} +1 -1
- package/dist/cjs/{WalletLink-CbnPrVEH.js → WalletLink-GY0_Tmtg.js} +1 -1
- package/dist/cjs/WalletOverflowButton-iCeXR9aA.js +1 -0
- package/dist/cjs/abstract-smart-wallets.js +1 -1
- package/dist/cjs/context-DFq1obBO.js +1 -0
- package/dist/cjs/{ethers-BwK3McWK.js → ethers-DZGJ4Y5i.js} +1 -1
- package/dist/cjs/extended-chains.js +1 -1
- package/dist/cjs/{get-is-unified-wallet-CHHPpmxX.js → get-is-unified-wallet-D4ouXJpi.js} +1 -1
- package/dist/cjs/{index-D7QitaMz.js → index-BQai4Vqd.js} +1 -1
- package/dist/cjs/{index-DiPPDo6V.js → index-CKB4VKFb.js} +1 -1
- package/dist/cjs/{index-4-C2N_7K.js → index-NJrQkxJ7.js} +3 -3
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/internal.js +1 -1
- package/dist/cjs/{prepareFundingModalData-Bap-QRCV.js → prepareFundingModalData-Cnd6rhhJ.js} +1 -1
- package/dist/cjs/{shared-BjdszO5f.js → shared-CCAyvw5i.js} +1 -1
- package/dist/cjs/{shouldProceedtoEmbeddedWalletCreationFlow-CuHR6wvs.js → shouldProceedtoEmbeddedWalletCreationFlow-DZvEYqlO.js} +1 -1
- package/dist/cjs/{smart-wallets-Cb8qgePj.js → smart-wallets-CV78p-ta.js} +1 -1
- package/dist/cjs/smart-wallets.js +1 -1
- package/dist/cjs/solana.js +1 -1
- package/dist/cjs/{to-ui-error-C_N9DMza.js → to-ui-error-ER-8XlJF.js} +1 -1
- package/dist/cjs/ui.js +1 -1
- package/dist/cjs/{use-create-wallet-without-fallback-y9YpooGA.js → use-create-wallet-without-fallback-q0_yd_V9.js} +1 -1
- package/dist/cjs/{use-export-wallet-CmWKVG5J.js → use-export-wallet-DKaavHqM.js} +1 -1
- package/dist/cjs/{useActiveWallet-B5cSS56I.js → useActiveWallet-BOX8xCn9.js} +1 -1
- package/dist/cjs/{useGetTokenPrice-CdW08dO7.js → useGetTokenPrice-BHq-guWz.js} +1 -1
- package/dist/cjs/{useI18n-D21RT6EH.js → useI18n-CY6Et_lH.js} +1 -1
- package/dist/cjs/{usePrivy-DobNyfbl.js → usePrivy-CcfSRv1R.js} +1 -1
- package/dist/cjs/{useSolanaRpcClient-ZoxUaxNS.js → useSolanaRpcClient-TQdbjNyx.js} +1 -1
- package/dist/cjs/{useWallets-DPdw6ah8.js → useWallets-BLFNjTwC.js} +1 -1
- package/dist/cjs/{useWallets-Z7ZZY1fI.js → useWallets-oPpMUdRR.js} +1 -1
- package/dist/dts/{events-context-D8iPaW-H.d.ts → events-context-BYT6PpDG.d.mts} +1 -1
- package/dist/dts/{events-context-D8iPaW-H.d.mts → events-context-BYT6PpDG.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 +26 -4
- package/dist/dts/index.d.ts +26 -4
- 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-diVZpIb-.d.mts → types-D7U23FgR.d.mts} +2 -0
- package/dist/dts/{types-diVZpIb-.d.ts → types-D7U23FgR.d.ts} +2 -0
- package/dist/dts/ui.d.mts +1 -1
- package/dist/dts/ui.d.ts +1 -1
- package/dist/esm/{AccountNotFoundScreen-CvMiU7Tz.mjs → AccountNotFoundScreen-Bk2ZDlxR.mjs} +1 -1
- package/dist/esm/{Address-CDOE2oK9.mjs → Address-BsvZLUXE.mjs} +1 -1
- package/dist/esm/{AffirmativeConsentScreen-Cia_UEaD.mjs → AffirmativeConsentScreen-CMcGT-7c.mjs} +1 -1
- package/dist/esm/{AllowlistRejectionScreen-DMqAO2Y-.mjs → AllowlistRejectionScreen-CgdkdFzy.mjs} +1 -1
- package/dist/esm/{AuthenticateWithWalletScreen-DvzZViMZ.mjs → AuthenticateWithWalletScreen-fhyjSxI8.mjs} +1 -1
- package/dist/esm/{AwaitingEvmToSolBridgingScreen-BSG_hKyl.mjs → AwaitingEvmToSolBridgingScreen-DbNP1yPY.mjs} +1 -1
- package/dist/esm/{AwaitingExternalEthereumTransferScreen-BcZRmV50.mjs → AwaitingExternalEthereumTransferScreen-COnzLcDW.mjs} +1 -1
- package/dist/esm/{AwaitingPasswordlessCodeScreen-Dd7TblcM.mjs → AwaitingPasswordlessCodeScreen-D9BoqETu.mjs} +1 -1
- package/dist/esm/{AwaitingSolToEvmBridgingScreen-BD1wkQFf.mjs → AwaitingSolToEvmBridgingScreen-JY-d6qlj.mjs} +1 -1
- package/dist/esm/{BridgeNetworkSelectionView-DSCjcHJX.mjs → BridgeNetworkSelectionView-Dn5uqa3q.mjs} +1 -1
- package/dist/esm/{Button-DJY5dut3.mjs → Button-B8mqatRx.mjs} +1 -1
- package/dist/esm/{CaptchaScreen-CapFNnoZ.mjs → CaptchaScreen-D3uGo3qJ.mjs} +1 -1
- package/dist/esm/{CoinbaseOnrampStatusScreen-DbQEEYPn.mjs → CoinbaseOnrampStatusScreen-Ce2Z_vJB.mjs} +1 -1
- package/dist/esm/{ConnectEmailForm-Cs3r5aBq.mjs → ConnectEmailForm--PZXgvw4.mjs} +1 -1
- package/dist/esm/{ConnectLedgerScreen-EYZ2eRpE.mjs → ConnectLedgerScreen-CRDZ_shP.mjs} +1 -1
- package/dist/esm/{ConnectOnlyLandingScreen-BM747X2V.mjs → ConnectOnlyLandingScreen-NSgaj_D4.mjs} +1 -1
- package/dist/esm/{ConnectOnlyStatusScreen-CW3W1N8z.mjs → ConnectOnlyStatusScreen-DAGVWgFv.mjs} +1 -1
- package/dist/esm/ConnectOrCreateScreen-CuVcGxrh.mjs +1 -0
- package/dist/esm/{ConnectPhoneForm-Ft9zAuQd.mjs → ConnectPhoneForm-DoYmHBv3.mjs} +1 -1
- package/dist/esm/ConnectWalletView-eQbJO3Pg.mjs +1 -0
- package/dist/esm/{ConnectionStatusScreen-nzx3dVCV.mjs → ConnectionStatusScreen-DVtobAVi.mjs} +1 -1
- package/dist/esm/CrossAppAuthScreen-B0633bnY.mjs +1 -0
- package/dist/esm/CustomLandingScreenView-DNbO8W7v.mjs +2 -0
- package/dist/esm/{DelegatedActionsConsentScreen-C35m_lng.mjs → DelegatedActionsConsentScreen-Cm3QtgBC.mjs} +1 -1
- package/dist/esm/{DelegatedActionsRevokeScreen-h4GhIT-2.mjs → DelegatedActionsRevokeScreen-C2WBGR2c.mjs} +1 -1
- package/dist/esm/{EmbeddedWalletConnectingScreen-CrgNS1_v.mjs → EmbeddedWalletConnectingScreen-CpKPkmKa.mjs} +1 -1
- package/dist/esm/{EmbeddedWalletCreatedScreen-BhSPSO8A.mjs → EmbeddedWalletCreatedScreen-CMyRcNaG.mjs} +1 -1
- package/dist/esm/{EmbeddedWalletKeyExportScreen-BlAL_BUV.mjs → EmbeddedWalletKeyExportScreen-nkSO3O1P.mjs} +1 -1
- package/dist/esm/{EmbeddedWalletOnAccountCreateScreen-Xz2dhW-I.mjs → EmbeddedWalletOnAccountCreateScreen-rwdmo9iN.mjs} +1 -1
- package/dist/esm/{EmbeddedWalletPasswordUpdateScreen-DQbd-pAr.mjs → EmbeddedWalletPasswordUpdateScreen-Tcp68U7U.mjs} +1 -1
- package/dist/esm/{EmbeddedWalletPasswordUpdateSplashScreen-9VnFkswr.mjs → EmbeddedWalletPasswordUpdateSplashScreen-5PH-3FQ3.mjs} +1 -1
- package/dist/esm/{EnrollTotp-twiE9SrW.mjs → EnrollTotp-ULLNt8tl.mjs} +1 -1
- package/dist/esm/{ErrorScreen-CTI5XNc0.mjs → ErrorScreen-BdxNEgU1.mjs} +1 -1
- package/dist/esm/{FarcasterConnectStatusScreen-26MCKeUz.mjs → FarcasterConnectStatusScreen-CruCPzPD.mjs} +1 -1
- package/dist/esm/{FarcasterSignerStatusScreen-YwCO1kz9.mjs → FarcasterSignerStatusScreen-DBAyc7bd.mjs} +1 -1
- package/dist/esm/{FundSolWalletWithExternalSolanaWallet-B3w3-z6B.mjs → FundSolWalletWithExternalSolanaWallet-Fxpj9pEN.mjs} +1 -1
- package/dist/esm/{FundWalletMethodHeader-CN-93vVj.mjs → FundWalletMethodHeader-I8a6Y30s.mjs} +1 -1
- package/dist/esm/{FundingEditAmountScreen-Cz6ZAJlk.mjs → FundingEditAmountScreen-yKYKiyG9.mjs} +1 -1
- package/dist/esm/{FundingMethodSelectionScreen-B85fzSsC.mjs → FundingMethodSelectionScreen-Dr-QG6BQ.mjs} +1 -1
- package/dist/esm/{InAppBrowserLoginNotPossible-CPsaFweG.mjs → InAppBrowserLoginNotPossible-BYO_nlWy.mjs} +1 -1
- package/dist/esm/{InstallWalletScreen-D5mGXNHF.mjs → InstallWalletScreen-Cma1GXX4.mjs} +1 -1
- package/dist/esm/LandingScreen-DCR5C-gA.mjs +1 -0
- package/dist/esm/{LinkConflictScreen-D8y5of24.mjs → LinkConflictScreen-C8kM_4ZL.mjs} +1 -1
- package/dist/esm/{LinkEmailScreen-C9lKAk-L.mjs → LinkEmailScreen-DsrprT7p.mjs} +1 -1
- package/dist/esm/{LinkPasskeyScreen-C33kWVrX.mjs → LinkPasskeyScreen-yKY5ebtx.mjs} +1 -1
- package/dist/esm/{LinkPhoneScreen-Bi98Ngac.mjs → LinkPhoneScreen-BklMbJs1.mjs} +1 -1
- package/dist/esm/{LoginFailedScreen-BX7s2pm7.mjs → LoginFailedScreen-CVGjcD9g.mjs} +1 -1
- package/dist/esm/ManualTransferScreen-C6MTkQcg.mjs +1 -0
- package/dist/esm/{MfaAuthEnrollmentFlowScreen-BBOfIRfA.mjs → MfaAuthEnrollmentFlowScreen-BrEYUoOi.mjs} +1 -1
- package/dist/esm/{MfaAuthVerifyFlowScreen-CwZbfXVc.mjs → MfaAuthVerifyFlowScreen-D_LbAt1N.mjs} +1 -1
- package/dist/esm/{MfaEnrollmentFlowScreen-Dq5X_CVZ.mjs → MfaEnrollmentFlowScreen-BseHvqlH.mjs} +1 -1
- package/dist/esm/{MfaVerifyFlowScreen-DGylIeVO.mjs → MfaVerifyFlowScreen-DB8BFfTJ.mjs} +1 -1
- package/dist/esm/{ModalHeader-DHXUvTf4.mjs → ModalHeader-BLGC-7ev.mjs} +1 -1
- package/dist/esm/{MoonpayStatusScreen-Boj9S0LW.mjs → MoonpayStatusScreen-D-Qnyxst.mjs} +1 -1
- package/dist/esm/{OAuthStatusScreen-DLvm8CkQ.mjs → OAuthStatusScreen-pEjYhAdx.mjs} +1 -1
- package/dist/esm/{PasskeySelectSignupOrLogin-62N4Cj_4.mjs → PasskeySelectSignupOrLogin-CmmjfwZM.mjs} +1 -1
- package/dist/esm/{PasskeyStatusScreen-DE8Ez-Rl.mjs → PasskeyStatusScreen-AiT-3Rq0.mjs} +1 -1
- package/dist/esm/{PasswordRecoveryScreen-CxXsaYPM.mjs → PasswordRecoveryScreen-BW7BBSLI.mjs} +1 -1
- package/dist/esm/{QrCode-CbRLsYtm.mjs → QrCode-DR5LogOp.mjs} +1 -1
- package/dist/esm/{RecoveryOAuthStatusScreen-9ETDOsJ0.mjs → RecoveryOAuthStatusScreen-BGxGq84t.mjs} +1 -1
- package/dist/esm/{RecoveryPasswordCreateScreen-CZizgkaK.mjs → RecoveryPasswordCreateScreen-Brv0MUPN.mjs} +1 -1
- package/dist/esm/{RecoverySelectionScreen-CDzuMgIx.mjs → RecoverySelectionScreen-CluXGpRG.mjs} +1 -1
- package/dist/esm/{Screen-CKaxnxac.mjs → Screen-BTyXgDrd.mjs} +1 -1
- package/dist/esm/{ScreenLayout-BQ6FV6yc.mjs → ScreenLayout-CddsD3Of.mjs} +1 -1
- package/dist/esm/{SetAutomaticRecoveryScreen-D5x6hDUL.mjs → SetAutomaticRecoveryScreen-nXcm7pIi.mjs} +1 -1
- package/dist/esm/{SetWalletPasswordForm-DelBzpVM.mjs → SetWalletPasswordForm-DvgKP4Ez.mjs} +1 -1
- package/dist/esm/{SignRequestScreen-BA5JF3Hr.mjs → SignRequestScreen-Cp5zIIZ3.mjs} +1 -1
- package/dist/esm/{StandardSignAndSendTransactionScreen-CiJd6Wf9.mjs → StandardSignAndSendTransactionScreen-bbPFP1pO.mjs} +1 -1
- package/dist/esm/{TelegramAuthScreen-zZOkgtJy.mjs → TelegramAuthScreen-DorSPB8G.mjs} +1 -1
- package/dist/esm/{TransactionDetails-B2vXU-k4.mjs → TransactionDetails-Bb1NEpUH.mjs} +1 -1
- package/dist/esm/{TransactionErrorView-DOcJFQEX.mjs → TransactionErrorView-CfyBAYzV.mjs} +2 -2
- package/dist/esm/TransferFromWalletScreen-BeSvua3b.mjs +1 -0
- package/dist/esm/{TransferOrBridgeLoadingScreen-B-uvt7Fj.mjs → TransferOrBridgeLoadingScreen-D5Y_FQAB.mjs} +1 -1
- package/dist/esm/{UpdateEmailScreen-B1-pVdEN.mjs → UpdateEmailScreen-BolXWblK.mjs} +1 -1
- package/dist/esm/{UpdatePhoneScreen-CwYS0KNr.mjs → UpdatePhoneScreen-G2aRPp1w.mjs} +1 -1
- package/dist/esm/{UserLimitReachedScreen-C9lTsh_J.mjs → UserLimitReachedScreen-BUXcfdpd.mjs} +1 -1
- package/dist/esm/{WalletInfoCard-C8BrD5jy.mjs → WalletInfoCard-YE5P6CSV.mjs} +1 -1
- package/dist/esm/{WalletInterstitialScreen-d520uEnZ.mjs → WalletInterstitialScreen-6lMKxpAk.mjs} +1 -1
- package/dist/esm/{WalletLink-WAY9-CI0.mjs → WalletLink-C9CSqqVy.mjs} +1 -1
- package/dist/esm/WalletOverflowButton-DV9Pe-aq.mjs +1 -0
- package/dist/esm/abstract-smart-wallets.mjs +1 -1
- package/dist/esm/context-Bycd1SKV.mjs +1 -0
- package/dist/esm/{ethers-g3QzXj2h.mjs → ethers-C3Y94dat.mjs} +1 -1
- package/dist/esm/extended-chains.mjs +1 -1
- package/dist/esm/{get-is-unified-wallet-_KIJnP68.mjs → get-is-unified-wallet-DvKS5IUO.mjs} +1 -1
- package/dist/esm/{index-BGEWwttv.mjs → index-C9_VQk69.mjs} +1 -1
- package/dist/esm/{index-Dr4t3oWO.mjs → index-CCyaupaz.mjs} +3 -3
- package/dist/esm/{index-CiEOopPN.mjs → index-DeGXWdV3.mjs} +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal.mjs +1 -1
- package/dist/esm/{prepareFundingModalData-BYy0MVol.mjs → prepareFundingModalData-CIgFwA7s.mjs} +1 -1
- package/dist/esm/{shared-CRNjAkzC.mjs → shared-rucIJmk0.mjs} +1 -1
- package/dist/esm/{shouldProceedtoEmbeddedWalletCreationFlow-iMnL58wW.mjs → shouldProceedtoEmbeddedWalletCreationFlow-Djgu4xiS.mjs} +1 -1
- package/dist/esm/{smart-wallets-BMn13jfV.mjs → smart-wallets-B-nGTJog.mjs} +1 -1
- package/dist/esm/smart-wallets.mjs +1 -1
- package/dist/esm/solana.mjs +1 -1
- package/dist/esm/{to-ui-error-CnxcoZ1S.mjs → to-ui-error-3mK4-1VA.mjs} +1 -1
- package/dist/esm/ui.mjs +1 -1
- package/dist/esm/{use-create-wallet-without-fallback-5er4aqoE.mjs → use-create-wallet-without-fallback-cSYr4rn8.mjs} +1 -1
- package/dist/esm/{use-export-wallet-WZT8QqOJ.mjs → use-export-wallet-ntS-M0Jk.mjs} +1 -1
- package/dist/esm/{useActiveWallet-SiVSXkvG.mjs → useActiveWallet-Bsy5GTCV.mjs} +1 -1
- package/dist/esm/{useGetTokenPrice-CfQvz_Mo.mjs → useGetTokenPrice-0Bn0Y88A.mjs} +1 -1
- package/dist/esm/{useI18n-O3hskpuB.mjs → useI18n-BtdAZuQ8.mjs} +1 -1
- package/dist/esm/{usePrivy-Bh4N2Hpm.mjs → usePrivy-BaiIHGte.mjs} +1 -1
- package/dist/esm/{useSolanaRpcClient-DaxiCEwc.mjs → useSolanaRpcClient-DW9Xaoo_.mjs} +1 -1
- package/dist/esm/{useWallets-gElyEQoU.mjs → useWallets-D0lpBS44.mjs} +1 -1
- package/dist/esm/{useWallets-DCp1uab-.mjs → useWallets-NhjmJtNE.mjs} +1 -1
- package/package.json +4 -4
- package/dist/cjs/ConnectOrCreateScreen-DmitWRwr.js +0 -1
- package/dist/cjs/ConnectWalletView-B33uROyL.js +0 -1
- package/dist/cjs/CrossAppAuthScreen-B6h5ejCd.js +0 -1
- package/dist/cjs/CustomLandingScreenView-ClPdt2GY.js +0 -2
- package/dist/cjs/LandingScreen-BE8xOJTr.js +0 -1
- package/dist/cjs/TransferFromWalletScreen-CGRGSTHN.js +0 -1
- package/dist/cjs/TransferOrBridgeLoadingScreen-C4UYLYIL.js +0 -1
- package/dist/cjs/WalletButtonList-C6cavPqd.js +0 -1
- package/dist/cjs/context-Dn8Hzo8O.js +0 -1
- package/dist/esm/ConnectOrCreateScreen-BREVA7pu.mjs +0 -1
- package/dist/esm/ConnectWalletView-DFfXN_9_.mjs +0 -1
- package/dist/esm/CrossAppAuthScreen-DAQweVCP.mjs +0 -1
- package/dist/esm/CustomLandingScreenView-BkNtLof4.mjs +0 -2
- package/dist/esm/LandingScreen-BqSnrgDb.mjs +0 -1
- package/dist/esm/ManualTransferScreen-BBMujAte.mjs +0 -1
- package/dist/esm/TransferFromWalletScreen-C5QQN9h6.mjs +0 -1
- package/dist/esm/WalletButtonList-DZp-38Ac.mjs +0 -1
- package/dist/esm/context-Dee1TPOi.mjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t,jsxs as e}from"react/jsx-runtime";import{ArrowRightLeft as i}from"lucide-react";import{styled as o}from"styled-components";import{a as r}from"./get-is-unified-wallet-
|
|
1
|
+
import{jsx as t,jsxs as e}from"react/jsx-runtime";import{ArrowRightLeft as i}from"lucide-react";import{styled as o}from"styled-components";import{a as r}from"./get-is-unified-wallet-DvKS5IUO.mjs";import{S as n}from"./ScreenLayout-CddsD3Of.mjs";import{F as m}from"./index-CCyaupaz.mjs";import"viem";import"react";import"./context-Bycd1SKV.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./internal-context-e-Eni5bG.mjs";import"ofetch";import"./Button-B8mqatRx.mjs";import"./useActiveWallet-Bsy5GTCV.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-CIgFwA7s.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-D0lpBS44.mjs";import"./Screen-BTyXgDrd.mjs";import"./ModalHeader-BLGC-7ev.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"./index-CJMgUOnw.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-BaiIHGte.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";const p=e=>/*#__PURE__*/t("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"-0.625 12.48 397.647 399.546",width:"2500",height:"674",preserveAspectRatio:"none",...e,children:/*#__PURE__*/t("g",{children:/*#__PURE__*/t("path",{fill:"#333745",d:"M 333.9 12.8 L 150.9 12.8 L 150.9 258.4 L 396.5 258.4 L 396.5 76.7 C 396.6 42.2 368.4 12.8 333.9 12.8 Z M 94.7 12.8 L 64 12.8 C 29.5 12.8 0 40.9 0 76.8 L 0 107.5 L 94.7 107.5 L 94.7 12.8 Z M 0 165 L 94.7 165 L 94.7 259.7 L 0 259.7 L 0 165 Z M 301.9 410.6 L 332.6 410.6 C 367.1 410.6 396.6 382.5 396.6 346.6 L 396.6 316 L 301.9 316 L 301.9 410.6 Z M 150.9 316 L 245.6 316 L 245.6 410.7 L 150.9 410.7 L 150.9 316 Z M 0 316 L 0 346.7 C 0 381.2 28.1 410.7 64 410.7 L 94.7 410.7 L 94.7 316 L 0 316 Z"})})}),s=({onContinueWithLedger:o,onContinueWithoutLedger:r,title:s="Phantom supports Ledger",subtitle:a="Are you using a Ledger hardware wallet?\nContinue to sign with Ledger"})=>/*#__PURE__*/t(n,{title:s,subtitle:/*#__PURE__*/t(d,{children:a}),primaryCta:{label:"Continue with Ledger",onClick:o},secondaryCta:{label:"Continue without Ledger",onClick:r},watermark:!0,children:/*#__PURE__*/e(l,{children:[/*#__PURE__*/t(m,{style:{width:"48px",height:"48px"}}),/*#__PURE__*/t(i,{strokeWidth:2,color:"var(--privy-color-icon-subtle)",width:22,height:22}),/*#__PURE__*/t(p,{style:{width:"48px",height:"48px"}})]})});function a(){let{data:e,setModalData:i,navigate:o}=r();/*#__PURE__*/return t(s,{onContinueWithLedger:function(){i({...e,login:{...e?.login,isSigningInWithLedgerSolana:!0}}),o("ConnectionStatusScreen")},onContinueWithoutLedger:function(){i({...e,login:{...e?.login,isSigningInWithLedgerSolana:!1}}),o("ConnectionStatusScreen")}})}const c={component:a};let l=/*#__PURE__*/o.div.withConfig({displayName:"IconContainer",componentId:"sc-54536274-0"})(["display:flex;align-items:center;justify-content:center;gap:8px;margin-bottom:var(--screen-space);"]),d=/*#__PURE__*/o.span.withConfig({displayName:"SubtitleText",componentId:"sc-54536274-1"})(["white-space:pre-wrap;"]);export{c as ConnectLedgerScreen,a as ConnectLedgerScreenComponent,s as ConnectLedgerScreenView,c as default};
|
package/dist/esm/{ConnectOnlyLandingScreen-BM747X2V.mjs → ConnectOnlyLandingScreen-NSgaj_D4.mjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{useRef as t}from"react";import{u as o}from"./context-
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useRef as t}from"react";import{u as o}from"./context-Bycd1SKV.mjs";import{u as r,c as n,b as a}from"./internal-context-e-Eni5bG.mjs";import{a as i}from"./events-context-CI0iqAXA.mjs";import{a as l}from"./get-is-unified-wallet-DvKS5IUO.mjs";import{i as c}from"./ConnectWalletView-eQbJO3Pg.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"viem";import"@heroicons/react/24/outline";import"@tanstack/react-virtual";import"react-device-detect";import"styled-components";import"./Button-B8mqatRx.mjs";import"./useActiveWallet-Bsy5GTCV.mjs";import"zustand";import"./prepareFundingModalData-CIgFwA7s.mjs";import"eventemitter3";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-D0lpBS44.mjs";import"@heroicons/react/24/outline/CheckIcon";import"./copy-Bx2Jwc5_.mjs";import"./ModalHeader-BLGC-7ev.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"./QrCode-DR5LogOp.mjs";import"qrcode";import"./EmailInputForm-B4hjCxRU.mjs";import"./ErrorMessage-Cx8GKGhL.mjs";import"./useI18n-BtdAZuQ8.mjs";import"./WalletCards-DH1rqayz.mjs";import"./Screen-BTyXgDrd.mjs";import"./index-CJMgUOnw.mjs";const m={component:()=>{let{closePrivyModal:m}=r(),{data:s,navigate:p}=l(),d=o(),u=i(),C=s?.externalConnectWallet?.description,j=t(s?.externalConnectWallet?.walletList??d.appearance.walletList),E=t(s?.externalConnectWallet?.walletChainType??d.appearance.walletChainType);/*#__PURE__*/return e(c,{walletList:j.current,walletChainType:E.current,preSelectedWalletId:s?.externalConnectWallet?.preSelectedWalletId,hideHeader:s?.externalConnectWallet?.hideHeader,onBack:s?.funding?()=>p("FundingMethodSelectionScreen"):void 0,onClose:()=>{u("connectWallet","onError",a.GENERIC_CONNECT_WALLET_ERROR),m()},onConnect:({connector:e,wallet:t})=>{u("connectWallet","onSuccess",{wallet:t});let o=s?.externalConnectWallet?.onCompleteNavigateTo;o?p(o({address:t.address,walletClientType:e?.walletClientType,walletChainType:e?.chainType})):m()},onConnectError:e=>{e instanceof n?(console.warn(e.cause?e.cause:e.message),u("connectWallet","onError",e.privyErrorCode||a.GENERIC_CONNECT_WALLET_ERROR)):(console.warn(e),u("connectWallet","onError",a.UNKNOWN_CONNECT_WALLET_ERROR))},customDescription:C,app:d,connectOnly:!0})},isUnauthenticatedScreem:!0};export{m as ConnectOnlyLandingScreen,m as default};
|
package/dist/esm/{ConnectOnlyStatusScreen-CW3W1N8z.mjs → ConnectOnlyStatusScreen-DAGVWgFv.mjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{useState as t,useEffect as o}from"react";import{isMobile as r}from"react-device-detect";import{C as n}from"./prepareFundingModalData-
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useState as t,useEffect as o}from"react";import{isMobile as r}from"react-device-detect";import{C as n}from"./prepareFundingModalData-CIgFwA7s.mjs";import{q as i}from"./context-Bycd1SKV.mjs";import{Q as a}from"./useActiveWallet-Bsy5GTCV.mjs";import{u as s}from"./internal-context-e-Eni5bG.mjs";import{a as l}from"./get-is-unified-wallet-DvKS5IUO.mjs";import{S as c}from"./ScreenLayout-CddsD3Of.mjs";import{B as m}from"./index-CCyaupaz.mjs";import{getErrorDetails as p}from"./ConnectionStatusScreen-DVtobAVi.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"tinycolor2";import"zustand";import"styled-components";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-D0lpBS44.mjs";import"ofetch";import"./Button-B8mqatRx.mjs";import"./Screen-BTyXgDrd.mjs";import"./ModalHeader-BLGC-7ev.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"./index-CJMgUOnw.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-BaiIHGte.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./Link-DwjLfHwW.mjs";import"./useI18n-BtdAZuQ8.mjs";import"./shouldProceedtoEmbeddedWalletCreationFlow-Djgu4xiS.mjs";const u=({walletLogo:t,success:o,errorMessage:r,title:i,subtitle:a,onRetry:s,onUseDifferentWallet:l,onBack:m,numRetries:p,maxRetries:u})=>/*#__PURE__*/e(c,{title:i,subtitle:a,icon:t,iconVariant:"loading",iconLoadingStatus:{success:o,fail:!!r},primaryCta:r===n.ERROR_USER_EXISTS?{label:"Use a different wallet",onClick:l}:!o&&r?.retryable&&p<u?{label:"Retry",onClick:s,disabled:!r?.retryable||p>=u}:!o&&r&&p>=u?{label:"Use a different wallet",onClick:l}:void 0,onBack:m,watermark:!0}),d={component:()=>{let n,{navigateBack:c,navigate:d,lastScreen:w,currentScreen:f,data:y,setModalData:g}=l(),{walletConnectionStatus:j,closePrivyModal:v}=s(),[h,C]=t(void 0),[k,b]=t(0),x=a(j?.connector?.walletClientType||"unknown"),S="connected"===j?.status,T="switching_to_supported_chain"===j?.status;o((()=>{if(S){let e;if(y?.externalConnectWallet?.onCompleteNavigateTo){let t=y.externalConnectWallet.onCompleteNavigateTo,o=j.connectedWallet?.address;e=setTimeout((()=>{if(y.funding&&j.connector){let e=j.connector.wallets.find((e=>e.address===o));g({...y,funding:{...y.funding,connectedWallet:e}})}d(t({address:o,walletClientType:j.connector?.walletClientType,walletChainType:j.connector?.chainType}))}),i)}else e=setTimeout(v,i);return()=>clearTimeout(e)}}),[S]);o((()=>{var e;j?.connectError&&(e=j?.connectError,C(p(e)))}),[j]);let R=j?.connector?.connectorType||"injected",B=j?.connector?.walletClientType||"unknown",W=x?.metadata?.shortName||x?.name||j?.connector?.walletBranding.name||"Browser Extension",M=x?.image_url?.md||j?.connector?.walletBranding.icon||(t=>/*#__PURE__*/e(m,{...t})),E="Browser Extension"===W?W.toLowerCase():W;n=S?`Successfully connected with ${E}`:h?h.message:T?"Switching networks":`Waiting for ${E}`;let _="Don’t see your wallet? Check your other browser windows.";return S?_="You’re good to go!":k>=2&&h?_="Unable to connect wallet":h?_=h.detail:T?_="Switch your wallet to the requested network.":"metamask"===B&&r?_="Click to continue to open and connect MetaMask.":"metamask"===B?_="For the best experience, connect only one wallet at a time.":"wallet_connect_v2"===R?_="Open your mobile wallet app to continue":"coinbase_wallet"===R&&(_="Confirm in the Coinbase app/popup to continue."),/*#__PURE__*/e(u,{walletName:W,walletLogo:M,success:S,errorMessage:h,title:n,subtitle:_,onRetry:()=>{b(k+1),C(void 0),j?.connectRetry()},onUseDifferentWallet:c,onBack:f===w?void 0:c,numRetries:k,maxRetries:2})}};export{d as ConnectOnlyStatusScreen,u as ConnectOnlyStatusScreenView,d as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{u as o}from"./context-Bycd1SKV.mjs";import{C as r,L as i}from"./CustomLandingScreenView-DNbO8W7v.mjs";import"react";import"@privy-io/js-sdk-core";import"tinycolor2";import"@heroicons/react/24/outline/UserCircleIcon";import"styled-components";import"./ModalHeader-BLGC-7ev.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"./internal-context-e-Eni5bG.mjs";import"ofetch";import"./useActiveWallet-Bsy5GTCV.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-CIgFwA7s.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./get-is-unified-wallet-DvKS5IUO.mjs";import"./useWallets-D0lpBS44.mjs";import"./index-CCyaupaz.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-BaiIHGte.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./ConnectWalletView-eQbJO3Pg.mjs";import"@heroicons/react/24/outline";import"@tanstack/react-virtual";import"./Button-B8mqatRx.mjs";import"@heroicons/react/24/outline/CheckIcon";import"./copy-Bx2Jwc5_.mjs";import"./QrCode-DR5LogOp.mjs";import"qrcode";import"./EmailInputForm-B4hjCxRU.mjs";import"./ErrorMessage-Cx8GKGhL.mjs";import"./useI18n-BtdAZuQ8.mjs";import"./WalletCards-DH1rqayz.mjs";import"./Screen-BTyXgDrd.mjs";import"./index-CJMgUOnw.mjs";import"lucide-react";import"./ConnectEmailForm--PZXgvw4.mjs";import"./Chip-Bsgj4Yc-.mjs";import"./LoadingSkeleton-CHdaq3pb.mjs";import"./farcaster-DPlSjvF5.mjs";import"@heroicons/react/24/outline/FingerPrintIcon";import"./Link-DwjLfHwW.mjs";import"./ConnectPhoneForm-DoYmHBv3.mjs";import"./twitter-6jomarO4.mjs";import"./twitch-5IOe4sIQ.mjs";import"./telegram-B-JqnkqZ.mjs";import"./WalletOverflowButton-DV9Pe-aq.mjs";import"./ScreenLayout-CddsD3Of.mjs";const e={component:()=>{let e=o();return e.loginMethodsAndOrder&&e.loginMethodsAndOrder.primary.length>0?/*#__PURE__*/t(r,{connectOnly:!0}):/*#__PURE__*/t(i,{connectOnly:!0})}};export{e as ConnectOrCreateScreen,e as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o,jsxs as e,Fragment as n}from"react/jsx-runtime";import{forwardRef as r,useState as t,useEffect as i}from"react";import{styled as a}from"styled-components";import{countryCodesAndNumbers as d,validatePhoneNumber as l,phoneNumberTypingFormatter as c,getPlaceholderPhoneNumber as p,getCountryCallingCode as u,getPhoneCountryCodeAndNumber as h,formatPhoneNumber as s}from"@privy-io/js-sdk-core";import{u as g}from"./context-
|
|
1
|
+
import{jsx as o,jsxs as e,Fragment as n}from"react/jsx-runtime";import{forwardRef as r,useState as t,useEffect as i}from"react";import{styled as a}from"styled-components";import{countryCodesAndNumbers as d,validatePhoneNumber as l,phoneNumberTypingFormatter as c,getPlaceholderPhoneNumber as p,getCountryCallingCode as u,getPhoneCountryCodeAndNumber as h,formatPhoneNumber as s}from"@privy-io/js-sdk-core";import{u as g}from"./context-Bycd1SKV.mjs";import{F as m}from"./useActiveWallet-Bsy5GTCV.mjs";import{E as v,P as x}from"./Button-B8mqatRx.mjs";import{C as b}from"./Chip-Bsgj4Yc-.mjs";const f=({value:n,onChange:r})=>/*#__PURE__*/o("select",{value:n,onChange:r,children:d.map((o=>/*#__PURE__*/e("option",{value:o.code,children:[o.code," +",o.callCode]},o.code)))}),w=/*#__PURE__*/r(((r,a)=>{let d=g(),[w,k]=t(!1),{accountType:N}=m(),[P,S]=t(""),[$,j]=t(d?.intl.defaultCountry??"US"),I=l(P,$),V=c($),z=p($),L=u($),q=!I,[B,E]=t(!1),D=L.length,F=o=>{let e=o.target.value;j(e),S(""),r.onChange&&r.onChange({rawPhoneNumber:P,qualifiedPhoneNumber:s(P,e),countryCode:e,isValid:l(P,$)})},R=(o,e)=>{try{let n=o.replace(/\D/g,"")===P.replace(/\D/g,"")?o:V.input(o);S(n),r.onChange&&r.onChange({rawPhoneNumber:n,qualifiedPhoneNumber:s(o,e),countryCode:e,isValid:l(o,e)})}catch(o){console.error("Error processing phone number:",o)}},T=()=>{E(!0);let o=s(P,$);r.onSubmit({rawPhoneNumber:P,qualifiedPhoneNumber:o,countryCode:$,isValid:l(P,$)}).finally((()=>E(!1)))};return i((()=>{if(r.defaultValue){let o=h(r.defaultValue);V.reset(),F({target:{value:o.countryCode}}),R(o.phone,o.countryCode)}}),[r.defaultValue]),/*#__PURE__*/e(n,{children:[/*#__PURE__*/o(y,{children:/*#__PURE__*/e(C,{$callingCodeLength:D,$stacked:r.stacked,children:[/*#__PURE__*/o(f,{value:$,onChange:F}),/*#__PURE__*/o("input",{ref:a,id:"phone-number-input",className:"login-method-button",type:"tel",placeholder:z,onFocus:()=>k(!0),onChange:o=>{R(o.target.value,$)},onKeyUp:o=>{"Enter"===o.key&&T()},value:P,autoComplete:"tel"}),"phone"!==N||w||r.hideRecent?r.stacked||r.noIncludeSubmitButton?/*#__PURE__*/o("span",{}):/*#__PURE__*/o(v,{isSubmitting:B,onClick:T,disabled:q,children:"Submit"}):/*#__PURE__*/o(b,{color:"gray",children:"Recent"})]})}),r.stacked&&!r.noIncludeSubmitButton?/*#__PURE__*/o(x,{loading:B,loadingText:null,onClick:T,disabled:q,children:"Submit"}):null]})}));let y=/*#__PURE__*/a.div.withConfig({displayName:"InputContainer",componentId:"sc-545daacd-0"})(["width:100%;"]),C=/*#__PURE__*/a.label.withConfig({displayName:"PhoneNumberInput",componentId:"sc-545daacd-1"})(["--country-code-dropdown-width:calc(54px + calc(12 * ","px));--phone-input-extra-padding-left:calc(12px + calc(3 * ","px));display:block;position:relative;width:100%;@media (min-width:441px){--country-code-dropdown-width:calc(52px + calc(10 * ","px));}&& > select{font-size:16px;height:24px;position:absolute;margin:13px calc(var(--country-code-dropdown-width) / 4);line-height:24px;width:var(--country-code-dropdown-width);background-color:var(--privy-color-background);background-size:auto;background-position-x:right;cursor:pointer;@media (min-width:441px){font-size:14px;width:var(--country-code-dropdown-width);}:focus{outline:none;box-shadow:none;}}&& > input{font-size:16px;line-height:24px;color:var(--privy-color-foreground);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;width:calc(100% - var(--country-code-dropdown-width));padding:12px 88px 12px calc(var(--country-code-dropdown-width) + var(--phone-input-extra-padding-left));padding-right:",";flex-grow:1;background:var(--privy-color-background);border:1px solid var(--privy-color-foreground-4);border-radius:var(--privy-border-radius-md);width:100%;:focus{outline:none;border-color:var(--privy-color-accent);}:autofill,:-webkit-autofill{background:var(--privy-color-background);}@media (min-width:441px){font-size:14px;padding-right:78px;}}&& > :last-child{right:16px;position:absolute;top:50%;transform:translate(0,-50%);}&& > button:last-child{right:0px;line-height:24px;padding:13px 17px;:focus{outline:none;border-color:var(--privy-color-accent);}}&& > input::placeholder{color:var(--privy-color-foreground-3);}"],(o=>o.$callingCodeLength),(o=>o.$callingCodeLength),(o=>o.$callingCodeLength),(o=>o.$stacked?"16px":"88px"));export{w as C};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsxs as e,jsx as n,Fragment as t}from"react/jsx-runtime";import{MagnifyingGlassIcon as i}from"@heroicons/react/24/outline";import{useVirtualizer as l}from"@tanstack/react-virtual";import{useState as a,useMemo as o,useCallback as r,useRef as c,useEffect as s}from"react";import{isMobile as d}from"react-device-detect";import{styled as h}from"styled-components";import{B as m}from"./Button-B8mqatRx.mjs";import p from"@heroicons/react/24/outline/CheckIcon";import{C as u}from"./copy-Bx2Jwc5_.mjs";import{T as g}from"./ModalHeader-BLGC-7ev.mjs";import{Q as w}from"./QrCode-DR5LogOp.mjs";import{E as f}from"./EmailInputForm-B4hjCxRU.mjs";import{u as y,q as v}from"./context-Bycd1SKV.mjs";import{u as b}from"./useI18n-BtdAZuQ8.mjs";import{M as C,q as x,d as W,e as k,K as T,V as _,w as z,S}from"./useActiveWallet-Bsy5GTCV.mjs";import{u as L,P as I,b as N}from"./internal-context-e-Eni5bG.mjs";import{W as A}from"./WalletCards-DH1rqayz.mjs";import{W as B,h as E}from"./prepareFundingModalData-CIgFwA7s.mjs";import{S as j}from"./Screen-BTyXgDrd.mjs";let O=/*#__PURE__*/h.button.withConfig({displayName:"CopyTextButton",componentId:"sc-4b0620dc-0"})(["display:flex;align-items:center;gap:0.5rem;&:hover{text-decoration:underline;}svg{width:0.875rem;height:0.875rem;}"]),q=/*#__PURE__*/h.span.withConfig({displayName:"CopiedText",componentId:"sc-4b0620dc-1"})(["display:flex;align-items:center;gap:0.25rem;font-size:0.875rem;color:var(--privy-color-foreground-2);"]),U=/*#__PURE__*/h(p).withConfig({displayName:"GreenCheck",componentId:"sc-4b0620dc-2"})(["color:var(--privy-color-success);"]),F=/*#__PURE__*/h(u).withConfig({displayName:"StyledCopy",componentId:"sc-4b0620dc-3"})(["color:var(--privy-color-foreground-3);opactiy:0.5;"]);function M({children:t,iconOnly:i,value:l,hideCopyIcon:o,...r}){let[c,s]=a(!1);/*#__PURE__*/return e(O,{...r,onClick:()=>{navigator.clipboard.writeText(l||t).catch(console.error),s(!0),setTimeout((()=>s(!1)),1500)},children:[t," ",c?/*#__PURE__*/e(q,{children:[/*#__PURE__*/n(U,{})," ",!i&&"Copied"]}):!o&&/*#__PURE__*/n(F,{})]})}const $={phantom:{mobile:{native:"phantom://",universal:"https://phantom.app/ul/"}},solflare:{mobile:{native:void 0,universal:"https://solflare.com/ul/v1/"}},metamask:{image_url:{sm:C,md:C}}};class P{static normalize(e){return e.replace(/[-_]wallet$/,"").replace(/[-_]extension$/,"").toLowerCase()}isEth(e){return e.chains.some((e=>e.includes("eip155:")))}isSol(e){return e.chains.some((e=>e.includes("solana:")))}inAllowList(e,n){if(!this.normalizedAllowList||0===this.normalizedAllowList.length||"listing"===n&&this.includeWalletConnect)return!0;let t=P.normalize(e);return this.normalizedAllowList.some((e=>t===P.normalize(e)))}inDenyList(e,n){return"listing"===n&&"rabby"===e}chainMatches(e){return"ethereum-only"===this.chainFilter?"ethereum"===e:"solana-only"!==this.chainFilter||"solana"===e}connectorOk(e){return!!("null"!==e.connectorType&&"walletconnect_solana"!==e.walletBranding.id&&this.chainMatches(e.chainType)&&(this.inAllowList(e.walletClientType,"connector")||("injected"===e.connectorType||"solana_adapter"===e.connectorType)&&("ethereum"===e.chainType&&this.detectedEth||"solana"===e.chainType&&this.detectedSol)))}listingOk(e){if(e.slug.includes("coinbase"))return!1;if("ethereum-only"===this.chainFilter){if(!this.isEth(e))return!1}else if("solana-only"===this.chainFilter&&!this.isSol(e))return!1;return!(!this.inAllowList(e.slug,"listing")||this.inDenyList(e.slug,"listing"))}getWallets(e,n){let t=new Map,i=e=>{let n=t.get(e.id);if(n){n.chainType!==e.chainType&&(n.chainType="multi");let t=new Set(n.chains);e.chains.forEach((e=>t.add(e))),n.chains=Array.from(t),!n.icon&&e.icon&&(n.icon=e.icon),!n.url&&e.url&&(n.url=e.url),!n.listing&&e.listing&&(n.listing=e.listing)}else t.set(e.id,e)};e.filter((e=>this.connectorOk(e))).forEach((e=>{let n=P.normalize(e.walletClientType);i({id:n,label:e.walletBranding?.name??n,source:"connector",connector:e,chainType:e.chainType,icon:e.walletBranding?.icon,url:void 0,chains:["ethereum"===e.chainType?"eip155":"solana"]})}));let l=e.find((e=>"wallet_connect_v2"===e.connectorType)),a=e.find((e=>"walletconnect_solana"===e.walletBranding.id));n.filter((e=>this.listingOk(e))).forEach((n=>{let t=[...n.chains].filter((e=>e.includes("eip155:")||e.includes("solana:")));if(e.some((e=>P.normalize(e.walletClientType)===P.normalize(n.slug)&&"ethereum"===e.chainType&&"null"!==e.connectorType))||l||n.mobile.native||n.mobile.universal||x[n.slug]?.chainTypes.includes("ethereum")||(t=t.filter((e=>!e.includes("eip155:")))),e.some((e=>P.normalize(e.walletClientType)===P.normalize(n.slug)&&"solana"===e.chainType&&"null"!==e.connectorType))||a||n.mobile.native||n.mobile.universal||x[n.slug]?.chainTypes.includes("solana")||(t=t.filter((e=>!e.includes("solana:")))),!t.length)return;let o=P.normalize(n.slug),r=$[n.slug],c=r?.image_url?.sm||n.image_url?.sm;t.some((e=>e.includes("eip155:")))&&i({id:o,label:n.name||o,source:"listing",listing:n,chainType:"ethereum",icon:c,url:n.homepage,chains:t}),t.some((e=>e.includes("solana:")))&&i({id:o,label:n.name||o,source:"listing",listing:n,chainType:"solana",icon:c,url:n.homepage,chains:t})})),this.includeWalletConnectQr&&l&&i({id:"wallet_connect_qr",label:"WalletConnect",source:"connector",connector:l,chainType:"ethereum",icon:B,url:void 0,chains:["eip155"]}),this.includeWalletConnectQrSolana&&a&&i({id:"wallet_connect_qr_solana",label:"WalletConnect",source:"connector",connector:a,chainType:"solana",icon:B,url:void 0,chains:["solana"]});let o=Array.from(t.values());o.forEach((e=>{let n=$[e.listing?.slug||e.id];n?.image_url?.sm&&(e.icon=n.image_url.sm)}));let r=new Map;return this.normalizedAllowList?.forEach(((e,n)=>{r.set(P.normalize(e),n)})),{wallets:o.slice().sort(((e,n)=>{let t=P.normalize(e.id),i=P.normalize(n.id);"binance-defi"===t?t="binance":"universalprofiles"===t?t="universal_profile":"cryptocom-defi"===t?t="cryptocom":"bitkeep"===t&&(t="bitget_wallet"),"binance-defi"===i?i="binance":"universalprofiles"===i?i="universal_profile":"cryptocom-defi"===i?i="cryptocom":"bitkeep"===i&&(i="bitget_wallet");let l=r.has(t),a=r.has(i);return l&&a?r.get(t)-r.get(i):l?-1:a?1:"connector"===e.source&&"listing"===n.source?-1:"listing"===e.source&&"connector"===n.source?1:e.label.toLowerCase().localeCompare(n.label.toLowerCase())})),walletCount:o.length}}constructor(e,n){this.chainFilter=e,n&&n.length>0&&(this.normalizedAllowList=n.map(String),this.normalizedAllowList.includes("binance")&&this.normalizedAllowList.push("binance-defi-wallet"),this.normalizedAllowList.includes("bitget_wallet")&&this.normalizedAllowList.push("bitkeep")),this.detectedEth=this.normalizedAllowList?.includes("detected_ethereum_wallets")??!1,this.detectedSol=this.normalizedAllowList?.includes("detected_solana_wallets")??!1,this.includeWalletConnect=this.normalizedAllowList?.includes("wallet_connect")??!1,this.includeWalletConnectQr=this.normalizedAllowList?.includes("wallet_connect_qr")??!1,this.includeWalletConnectQrSolana=this.normalizedAllowList?.includes("wallet_connect_qr_solana")??!1}}var Q=t=>/*#__PURE__*/e("svg",{viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...t,children:[/*#__PURE__*/n("path",{d:"m0 0h32v32h-32z",fill:"#5469d4"}),/*#__PURE__*/n("path",{d:"m15.997 5.333-.143.486v14.106l.143.143 6.548-3.87z",fill:"#c2ccf4"}),/*#__PURE__*/n("path",{d:"m15.996 5.333-6.548 10.865 6.548 3.87z",fill:"#fff"}),/*#__PURE__*/n("path",{d:"m15.997 21.306-.08.098v5.025l.08.236 6.552-9.227z",fill:"#c2ccf4"}),/*#__PURE__*/n("path",{d:"m15.996 26.665v-5.36l-6.548-3.867z",fill:"#fff"}),/*#__PURE__*/n("path",{d:"m15.995 20.07 6.548-3.87-6.548-2.976v6.847z",fill:"#8698e8"}),/*#__PURE__*/n("path",{d:"m9.448 16.2 6.548 3.87v-6.846z",fill:"#c2ccf4"})]}),D=t=>/*#__PURE__*/e("svg",{viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...t,children:[/*#__PURE__*/e("linearGradient",{id:"a",gradientUnits:"userSpaceOnUse",x1:"7.233",x2:"24.766",y1:"24.766",y2:"7.234",children:[/*#__PURE__*/n("stop",{offset:"0",stopColor:"#9945ff"}),/*#__PURE__*/n("stop",{offset:".2",stopColor:"#7962e7"}),/*#__PURE__*/n("stop",{offset:"1",stopColor:"#00d18c"})]}),/*#__PURE__*/n("path",{d:"m0 0h32v32h-32z",fill:"#10111a"}),/*#__PURE__*/n("path",{clipRule:"evenodd",d:"m9.873 20.41a.645.645 0 0 1 .476-.21l14.662.012a.323.323 0 0 1 .238.54l-3.123 3.438a.643.643 0 0 1 -.475.21l-14.662-.012a.323.323 0 0 1 -.238-.54zm15.376-2.862a.322.322 0 0 1 -.238.54l-14.662.012a.642.642 0 0 1 -.476-.21l-3.122-3.44a.323.323 0 0 1 .238-.54l14.662-.012a.644.644 0 0 1 .475.21zm-15.376-9.738a.644.644 0 0 1 .476-.21l14.662.012a.322.322 0 0 1 .238.54l-3.123 3.438a.643.643 0 0 1 -.475.21l-14.662-.012a.323.323 0 0 1 -.238-.54z",fill:"url(#a)",fillRule:"evenodd"})]});const H=/*#__PURE__*/h.div.withConfig({displayName:"Header",componentId:"sc-9b65f2b6-0"})(["display:flex;justify-content:space-between;align-items:center;"]),R=/*#__PURE__*/h.button.withConfig({displayName:"CloseButton",componentId:"sc-9b65f2b6-1"})(["padding:0.25rem;height:30px;width:30px;display:flex;align-items:center;justify-content:center;border-radius:var(--privy-border-radius-full);background:var(--privy-color-background-2);"]),V=/*#__PURE__*/h.div.withConfig({displayName:"WalletIconWithActiveIndicator",componentId:"sc-9b65f2b6-2"})(["position:relative;display:inline-flex;align-items:center;&::after{content:' ';border-radius:var(--privy-border-radius-full);height:6px;width:6px;background-color:var(--privy-color-icon-success);position:absolute;right:-3px;top:-3px;}"]),G=/*#__PURE__*/h.img.withConfig({displayName:"WalletIcon",componentId:"sc-9b65f2b6-3"})(["width:32px;height:32px;border-radius:0.25rem;object-fit:contain;"]),Y=/*#__PURE__*/h.span.withConfig({displayName:"Chip",componentId:"sc-9b65f2b6-4"})(["display:flex;gap:0.25rem;align-items:center;padding:0.25rem 0.5rem;font-size:0.75rem;font-weight:500;line-height:1.125rem;border-radius:var(--privy-border-radius-sm);background-color:var(--privy-color-background-2);svg{width:100%;max-width:1rem;max-height:1rem;stroke-width:2;}"]),K=/*#__PURE__*/h.div.withConfig({displayName:"ScrollContainer",componentId:"sc-9b65f2b6-5"})(["display:flex;flex-direction:column;gap:0.5rem;max-height:24rem;overflow-y:scroll;&::-webkit-scrollbar{display:none;}scrollbar-gutter:stable both-edges;scrollbar-width:none;-ms-overflow-style:none;"," background-repeat:no-repeat;background-size:100% 32px,100% 16px;background-attachment:local,scroll;"],(e=>"light"===e.$colorScheme?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.06)) bottom;":"dark"===e.$colorScheme?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.06)) bottom;":void 0));function J({enabled:e=!0,walletList:n,walletChainType:t}){let i=y(),{connectors:l}=L(),{listings:r,loading:c}=W(e),s=t??i.appearance.walletChainType,d=n??i.appearance?.walletList,h=o((()=>new P(s,d)),[s,d]),{wallets:m,walletCount:p}=o((()=>h.getWallets(l,r)),[h,l,r]),[u,g]=a(""),w=o((()=>u?m.filter((e=>e.label.toLowerCase().includes(u.toLowerCase()))):m),[u,m]),[f,v]=a();return{selected:f,setSelected:v,search:u,setSearch:g,loadingListings:c,wallets:w,walletCount:p}}let X=e=>!e||"string"!=typeof e&&(e instanceof z||e instanceof S);const Z=({index:i,style:l,data:a,recent:o})=>{let r=a.wallets[i],{walletChainType:c,handleWalletClick:s}=a,{t:d}=b(),h={...l,boxSizing:"border-box"};return r?/*#__PURE__*/e(ie,{style:h,onClick:()=>s(r),children:[r.icon&&(r.connector&&!X(r.connector)?/*#__PURE__*/n(V,{children:"string"==typeof r.icon?/*#__PURE__*/n(G,{src:r.icon}):/*#__PURE__*/n(r.icon,{style:{width:"32px",height:"32px"}})}):"string"==typeof r.icon?/*#__PURE__*/n(G,{src:r.icon}):/*#__PURE__*/n(r.icon,{style:{width:"32px",height:"32px"}})),/*#__PURE__*/n(oe,{children:r.label}),o?/*#__PURE__*/e(t,{children:[/*#__PURE__*/n(Y,{children:d("connectWallet.lastUsed")}),/*#__PURE__*/n(le,{children:/*#__PURE__*/e(t,{children:["ethereum-only"===c&&/*#__PURE__*/n(Q,{}),"solana-only"===c&&/*#__PURE__*/n(D,{})]})})]}):/*#__PURE__*/n(le,{children:!("ethereum-only"===c||"solana-only"===c)&&/*#__PURE__*/e(t,{children:[r.chains?.some((e=>e.startsWith("eip155")))&&/*#__PURE__*/n(Q,{}),r.chains?.some((e=>e.startsWith("solana")))&&/*#__PURE__*/n(D,{})]})})]}):null};var ee=({className:h,customDescription:p,connectOnly:u,preSelectedWalletId:C,hideHeader:W,...B})=>{let O=y(),{t:q}=b(),{connectors:U}=L(),F=B.walletChainType||O.appearance.walletChainType,M=B.walletList||O.appearance?.walletList,{onBack:H,onClose:R,app:V}=B,{selected:Y,setSelected:K,qrUrl:ee,setQrUrl:ce,connecting:se,uiState:de,errorCode:he,wallets:me,walletCount:pe,handleConnect:ue,handleBack:ge,showSearchBar:we,isInitialConnectView:fe,title:ye,search:ve,setSearch:be}=function({onConnect:e,onBack:n,onClose:t,onConnectError:i,walletList:l,walletChainType:c,app:s}){let h=y(),{connectors:m}=L(),{t:p}=b(),{wallets:u,walletCount:g,search:w,setSearch:f,selected:C,setSelected:x}=J({enabled:k(l??[]),walletList:l,walletChainType:c}),[W,_]=a(),[z,S]=a(),[N,A]=a(),[B,E]=a(),j=!C&&!N&&!B,O=j&&(g>6||w.length>0),q=m.find((e=>"wallet_connect_v2"===e.connectorType)),U=r((async(n,t)=>{if(n){if(B?.connector===n&&"loading"===W)return void console.log("Already connecting to this wallet, skipping duplicate attempt");if(_("loading"),"string"==typeof n)return E({connector:n,name:t?.name??"Wallet",icon:t?.icon}),void window.open(n,"_blank");E({connector:n,name:t?.name??n.walletBranding.name??"Wallet",icon:t?.icon??n.walletBranding.icon});try{let t=await n.connect({showPrompt:!0});if(!t)return _("error"),S(void 0),void i?.(new I("Unable to connect wallet"));_("success"),S(void 0),T({address:t.address,client:t.walletClientType,appId:h.id}),setTimeout((()=>{e({connector:n,wallet:t})}),v)}catch(n){if(console.error("ERROR: ",{e:n}),n?.message?.includes("already pending for origin")||n?.message?.includes("wallet_requestPermissions"))return void console.log("Connection request already pending, maintaining loading state");_("error"),S(n?.privyErrorCode),i?.(n instanceof Error?n:new I(n?.message||"Unable to connect wallet"))}}}),[h.id,e,B,W]),F=r((()=>N?(_(void 0),S(void 0),E(void 0),void A(void 0)):B?(_(void 0),S(void 0),void E(void 0)):C?(_(void 0),S(void 0),E(void 0),void x(void 0)):"error"===W||"loading"===W?(_(void 0),S(void 0),void E(void 0)):void n?.()),[N,B,C,W,n]),M=o((()=>B?.connector===q&&N&&d&&B?.name?p("connectWallet.goToWallet",{walletName:B.name}):B?.connector===q&&N&&B?.name?p("connectWallet.scanToConnect",{walletName:B.name}):N&&B?.name?p(d?"connectWallet.goToWallet":"connectWallet.scanToConnect",{walletName:B.name}):"string"==typeof B?.connector?p("connectWallet.openOrInstall",{walletName:B.name}):C&&!B?p("connectWallet.selectNetwork"):B?null:p("connectWallet.selectYourWallet")),[B,N,C,q,p]);return{selected:C,setSelected:x,qrUrl:N,setQrUrl:A,connecting:B,uiState:W,errorCode:z,search:w,setSearch:f,wallets:u,walletCount:g,wc:q,isInitialConnectView:j,showSearchBar:O,title:M,handleConnect:U,handleBack:F,onClose:t,onConnect:e,app:s}}({...B,walletList:M,walletChainType:F}),Ce=U.find((e=>"wallet_connect_v2"===e.connectorType)),xe=U.find((e=>"walletconnect_solana"===e.walletBranding.id)),We=c(null),ke=l({count:me.length,getScrollElement:()=>We.current,estimateSize:()=>56,overscan:6,gap:5}),Te=r((async e=>{let n="solana-only"!==F&&e.chains?.some((e=>e.startsWith("eip155"))),t="ethereum-only"!==F&&e.chains?.some((e=>e.startsWith("solana"))),i=n=>{let t=P.normalize(e.id);return U.find((e=>P.normalize(e.walletClientType)===t&&e.chainType===n&&!("ethereum"===e.chainType&&e instanceof z||"solana"===e.chainType&&e instanceof S)))},l=async()=>{if(!Ce||!e.listing)return!1;let n=$[e.listing.slug]?{...e.listing,...$[e.listing.slug]}:e.listing;return Ce.setWalletEntry(n,ce),await Ce.resetConnection(e.id),await ue(Ce,{name:e.label,icon:e.icon}),!0},a=async()=>!!xe&&!!e.listing&&(await xe.disconnect(),xe.wallet.setWalletEntry(e.listing,ce),await new Promise((e=>setTimeout(e,100))),await ue(xe,{name:e.label,icon:e.icon}),!0),o=async n=>{let t=(n=>{let t=x[e.id];if(t)return t.getMobileRedirect({isSolana:n,connectOnly:!!u,useUniversalLink:!1})})(n);return!!t&&(await ue(t,{name:e.label,icon:e.icon}),!0)};if(n&&t)K(e);else{if(n&&!t){let n=i("ethereum");if(n&&!X(n))return void await ue(n,{name:e.label,icon:e.icon});if(d&&"phantom"===e.id){if(await o(!1)||await l())return}else if(await l()||await o(!1))return}if(t&&!n){let n=i("solana");if(n&&!X(n))return void await ue(n,{name:e.label,icon:e.icon});if(d){if(await o(!0)||await a())return}else if(await a()||await o(!0))return}if(!X(e.connector)){if(Ce&&"wallet_connect_v2"===e.connector?.connectorType)if(await Ce.resetConnection(e.id),"wallet_connect_qr"!==e.id&&e.listing){let n=$[e.listing.slug]?{...e.listing,...$[e.listing.slug]}:e.listing;Ce.setWalletEntry(n,ce)}else Ce.setWalletEntry({id:"wallet_connect_qr",name:"WalletConnect",rdns:"",slug:"wallet-connect",homepage:"",chains:["eip155"],mobile:{native:"",universal:void 0}},ce);return xe&&"walletconnect_solana"===e.connector?.walletBranding.id&&(await xe.disconnect(),"wallet_connect_qr_solana"!==e.id&&e.listing?xe.wallet.setWalletEntry(e.listing,ce):xe.wallet.setWalletEntry({id:"wallet_connect_solana_qr",name:"WalletConnect",rdns:"",slug:"wallet-connect-solana",homepage:"",chains:["solana"],mobile:{native:"",universal:void 0}},ce),await new Promise((e=>setTimeout(e,100)))),void await ue(e.connector,{name:e.label,icon:e.icon})}e.url&&await ue(e.url,{name:e.label,icon:e.icon})}}),[Ce,xe,ue,K,ce,F,u,U]);return s((()=>{if(!C)return;let e=me.find((({id:e})=>e===C));e&&Te(e).catch(console.error)}),[C]),/*#__PURE__*/e(j,{className:h,children:[/*#__PURE__*/n(j.Header,{icon:W&&fe?void 0:se&&!ee||ee&&d&&se?.icon?se.icon:se?void 0:A,iconVariant:se&&!ee||ee&&d?"loading":void 0,iconLoadingStatus:se&&!ee||ee&&d?{success:"success"===de,fail:"error"===de}:void 0,title:W&&fe?void 0:se&&!ee?q("connectWallet.waitingForWallet",{walletName:se.name}):ee&&d?q("connectWallet.waitingForWallet",{walletName:se?.name??"connection"}):ye,subtitle:W&&fe?void 0:se&&!ee&&"string"==typeof se.connector?q("connectWallet.installAndConnect",{walletName:se.name}):se&&!ee&&"string"!=typeof se.connector?"error"===de?he===N.NO_SOLANA_ACCOUNTS?`The connected wallet has no Solana accounts. Please add a Solana account in ${se.name} and try again.`:q("connectWallet.tryConnectingAgain"):q("connectionStatus.connectOneWallet"):fe?p??(V?q("connectWallet.connectToAccount",{appName:V.name}):null):null,showBack:!!H||!fe,showClose:!0,onBack:H||ge,onClose:R}),/*#__PURE__*/e(j.Body,{ref:We,$colorScheme:O.appearance.palette.colorScheme,style:{marginBottom:ee?"0.5rem":void 0},children:[we&&/*#__PURE__*/n(ne,{children:/*#__PURE__*/e(f,{style:{background:"transparent"},children:[/*#__PURE__*/n(_,{children:/*#__PURE__*/n(i,{})}),/*#__PURE__*/n("input",{className:"login-method-button",type:"text",placeholder:q("connectWallet.searchPlaceholder",{count:String(pe)}),onChange:e=>be(e.target.value),value:ve})]})}),ee&&d&&"loading"===de&&/*#__PURE__*/e("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"1rem"},children:[/*#__PURE__*/n(m,{variant:"primary",onClick:()=>window.open(ee.universal??ee.native,"_blank"),style:{width:"100%"},children:q("connectWallet.openInApp")}),/*#__PURE__*/n(re,{value:ee.universal??ee.native,iconOnly:!0,children:"Copy link"})]}),ee&&!d&&"loading"===de&&/*#__PURE__*/n("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"1rem"},children:/*#__PURE__*/n(re,{value:ee.universal??ee.native,iconOnly:!0,children:q("connectWallet.copyLink")})}),ee&&!d&&/*#__PURE__*/n(w,{size:280,url:ee.universal??ee.native,squareLogoElement:se?.icon?"string"==typeof se.icon?e=>/*#__PURE__*/n("svg",{...e,children:/*#__PURE__*/n("image",{href:se.icon,height:e.height,width:e.width})}):se.icon:E}),/*#__PURE__*/e(te,{children:[se&&!ee&&"string"==typeof se.connector&&/*#__PURE__*/e(ie,{onClick:()=>window.open(se.connector,"_blank"),children:[se.icon&&("string"==typeof se.icon?/*#__PURE__*/n(G,{src:se.icon}):/*#__PURE__*/n(se.icon,{})),/*#__PURE__*/n(oe,{children:se.name})]}),Y?.chains.some((e=>e.startsWith("eip155")))&&!se&&/*#__PURE__*/e(ie,{onClick:()=>Te({...Y,chains:Y.chains.filter((e=>e.startsWith("eip155")))}),children:[Y.icon&&("string"==typeof Y.icon?/*#__PURE__*/n(G,{src:Y.icon}):/*#__PURE__*/n(Y.icon,{})),/*#__PURE__*/n(oe,{children:Y.label}),/*#__PURE__*/n(le,{children:/*#__PURE__*/n(Q,{})})]}),Y?.chains.some((e=>e.startsWith("solana")))&&!se&&/*#__PURE__*/e(ie,{onClick:()=>Te({...Y,chains:Y.chains.filter((e=>e.startsWith("solana")))}),children:[Y.icon&&("string"==typeof Y.icon?/*#__PURE__*/n(G,{src:Y.icon}):/*#__PURE__*/n(Y.icon,{})),/*#__PURE__*/n(oe,{children:Y.label}),/*#__PURE__*/n(le,{children:/*#__PURE__*/n(D,{})})]}),fe&&/*#__PURE__*/e(t,{children:[!(pe>0)&&/*#__PURE__*/n(ae,{children:q("connectWallet.noWalletsFound")}),pe>0&&!ee&&/*#__PURE__*/n("div",{style:{maxHeight:56*Math.min(me.length,5)+5,width:"100%"},children:/*#__PURE__*/n("div",{style:{height:`${ke.getTotalSize()}px`,width:"100%",position:"relative"},children:ke.getVirtualItems().map((e=>/*#__PURE__*/n(Z,{index:e.index,style:{position:"absolute",top:0,left:0,height:`${e.size}px`,transform:`translateY(${e.start}px)`},data:{wallets:me,walletChainType:F,handleWalletClick:Te}},e.key)))})})]})]})]}),/*#__PURE__*/e(j.Footer,{children:[se&&!ee&&"string"!=typeof se.connector&&"error"===de&&/*#__PURE__*/n(j.Actions,{children:/*#__PURE__*/n(m,{style:{width:"100%",alignItems:"center"},variant:"error",onClick:()=>ue(se.connector,{name:se.name,icon:se.icon}),children:q("connectWallet.retry")})}),!!(V&&V.legal.privacyPolicyUrl&&V.legal.termsAndConditionsUrl)&&/*#__PURE__*/n(g,{app:V,alwaysShowImplicitConsent:!0}),/*#__PURE__*/n(j.Watermark,{})]})]})};let ne=/*#__PURE__*/h.div.withConfig({displayName:"StickySearchContainer",componentId:"sc-34a6bff4-0"})(["position:sticky;margin-top:-3px;padding-top:3px;top:-3px;z-index:1;background:var(--privy-color-background);padding-bottom:calc(var(--screen-space) / 2);"]),te=/*#__PURE__*/h.div.withConfig({displayName:"WalletListContainer",componentId:"sc-34a6bff4-1"})(["display:flex;flex-direction:column;gap:","px;"],5),ie=/*#__PURE__*/h.button.withConfig({displayName:"Button",componentId:"sc-34a6bff4-2"})(["&&{gap:0.5rem;align-items:center;display:flex;position:relative;text-align:left;font-weight:500;transition:background 200ms ease-in;width:calc(100% - 4px);border-radius:var(--privy-border-radius-md);padding:0.75em;border:1px solid var(--privy-color-foreground-4);justify-content:space-between;}&:hover{background:var(--privy-color-background-2);}"]),le=/*#__PURE__*/h.span.withConfig({displayName:"ButtonBadge",componentId:"sc-34a6bff4-3"})(["display:flex;align-items:center;justify-content:end;position:relative;& > svg{border-radius:var(--privy-border-radius-full);stroke-width:2.5;width:100%;max-height:1rem;max-width:1rem;flex-shrink:0;}& > svg:not(:last-child){border-radius:var(--privy-border-radius-full);margin-right:-0.375rem;}"]),ae=/*#__PURE__*/h.div.withConfig({displayName:"EmptyContainer",componentId:"sc-34a6bff4-4"})(["height:60px;display:flex;align-items:center;justify-content:center;text-align:center;"]),oe=/*#__PURE__*/h.span.withConfig({displayName:"WalletName",componentId:"sc-34a6bff4-5"})(["text-overflow:ellipsis;white-space:nowrap;color:var(--privy-color-foreground);font-weight:400;flex:1;"]),re=/*#__PURE__*/h(M).withConfig({displayName:"StyledCopyableText",componentId:"sc-34a6bff4-6"})(["&&{margin:0.5rem auto 0 auto;}"]);export{M as C,H,K as S,G as W,Y as a,R as b,P as c,Z as d,ee as i,J as u};
|
package/dist/esm/{ConnectionStatusScreen-nzx3dVCV.mjs → ConnectionStatusScreen-DVtobAVi.mjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import{useRef as o,useEffect as i,useState as a,useCallback as r}from"react";import{isMobile as c}from"react-device-detect";import{styled as l}from"styled-components";import{a as s,S as d,W as m,B as u,b as p}from"./index-Dr4t3oWO.mjs";import{L as g}from"./Link-DwjLfHwW.mjs";import{u as w,q as h}from"./context-Dee1TPOi.mjs";import{u as S}from"./useI18n-O3hskpuB.mjs";import{C as y,P as f,d as C}from"./prepareFundingModalData-BYy0MVol.mjs";import{Q as b,k as v,T}from"./useActiveWallet-SiVSXkvG.mjs";import{isHex as _,getAddress as E}from"viem";import{b as R,u as k,k as A}from"./internal-context-e-Eni5bG.mjs";import{u as W,a as I}from"./get-is-unified-wallet-_KIJnP68.mjs";import{s as L}from"./shouldProceedtoEmbeddedWalletCreationFlow-iMnL58wW.mjs";import{c as j,e as U}from"./usePrivy-Bh4N2Hpm.mjs";import{S as O}from"./ScreenLayout-BQ6FV6yc.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useWallets-gElyEQoU.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"viem/utils";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"@scure/base";import"./events-context-CI0iqAXA.mjs";import"zustand";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./getPublicClient-A9RSftUZ.mjs";import"ofetch";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"tinycolor2";import"./Button-DJY5dut3.mjs";import"./Screen-CKaxnxac.mjs";import"./ModalHeader-DHXUvTf4.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"./index-CJMgUOnw.mjs";const N=e=>{let t=localStorage.getItem("-walletlink:https://www.walletlink.org:Addresses")?.split(" ").filter((e=>_(e,{strict:!0}))).map((e=>E(e)));return!!t?.length&&!!e?.linkedAccounts.filter((e=>"wallet"==e.type&&t.includes(e.address))).length};const M=e=>e?.privyErrorCode===R.LINKED_TO_ANOTHER_USER?y.ERROR_USER_EXISTS:e instanceof f&&!e.details.default?e.details:e instanceof C?y.ERROR_TIMED_OUT:e?.privyErrorCode===R.CANNOT_LINK_MORE_OF_TYPE?y.ERROR_USER_LIMIT_REACHED:y.ERROR_WALLET_CONNECTION,x=({walletLogo:o,title:i,subtitle:a,signSuccess:r,errorMessage:c,connectSuccess:l,separateConnectAndSign:s,signing:d,walletConnectRedirectUri:m,walletConnectFallbackUniversalUri:u,hasTabbedAway:p,showCoinbaseWalletResetCta:w,numRetries:h,onBack:f,onSign:C,onRetry:b,onCoinbaseReset:v,onDifferentWallet:T})=>{let{t:_}=S(),E=w?{label:"Use a different wallet",onClick:v,disabled:r}:c===y.ERROR_USER_EXISTS&&f?{label:"Use a different wallet",onClick:T}:l&&!r&&s?{label:d?"Signing":"Sign with your wallet",onClick:C,disabled:d}:!r&&c?.retryable&&h<2?{label:"Retry",onClick:b,disabled:!1}:r||c?void 0:{label:_("connectionStatus.connecting"),onClick:()=>{},disabled:!0};/*#__PURE__*/return e(O,{title:i,subtitle:a,icon:o,iconVariant:"loading",iconLoadingStatus:{success:r,fail:!!c},primaryCta:E,onBack:f,watermark:!0,children:!l&&m&&!p&&/*#__PURE__*/t(B,{children:[_("connectionStatus.stillHere")," ",/*#__PURE__*/e(g,{href:m,target:"_blank",variant:"underlined",size:"sm",children:_("connectionStatus.tryConnectingAgain")}),u&&/*#__PURE__*/t(n,{children:[" ",_("connectionStatus.or")," ",/*#__PURE__*/e(g,{href:u,target:"_blank",variant:"underlined",size:"sm",children:_("connectionStatus.useDifferentLink")})]})]})})},D={component:()=>{let t,[n,l]=a(!1),[g,f]=a(!1),[C,_]=a(void 0),{authenticated:E,logout:O}=W(),{navigate:D,navigateBack:B,lastScreen:F,currentScreen:P,setModalData:q,data:H}=I(),X=w(),{t:z}=S(),{getAuthFlow:Q,walletConnectionStatus:Y,closePrivyModal:J,initLoginWithWallet:K,loginWithWallet:V,updateWallets:$,createAnalyticsEvent:G}=k(),{walletConnectors:Z}=W(),[ee,te]=a(0),{user:ne}=W(),oe=j(),[ie]=a(ne?.linkedAccounts.length||0),[ae,re]=a(""),[ce,le]=a(""),[se,de]=a(!1),{hasTabbedAway:me}=function(){let[e,t]=a(!1),n=r((()=>{document.hidden&&t(!0)}),[]);return i((()=>(document.addEventListener("visibilitychange",n),()=>document.removeEventListener("visibilitychange",n))),[n]),{hasTabbedAway:e,reset:()=>t(!1)}}(),{enabled:ue,token:pe}=s(),ge=b(Y?.connector?.walletClientType||"unknown"),we=c&&"wallet_connect_v2"===Y?.connector?.connectorType||c&&"coinbase_wallet"===Y?.connector?.connectorType||c&&"base_account"===Y?.connector?.connectorType||c&&"injected"===Y?.connector?.connectorType&&"phantom"===Y?.connector?.walletClientType||c&&"solana_adapter"===Y?.connector?.connectorType&&"mobile_wallet_adapter"===Y.connector.walletClientType,he="connected"===Y?.status,Se="switching_to_supported_chain"===Y?.status;i((()=>{let e=Q(),t=e instanceof p||e instanceof d?e:void 0;he&&"solana"===Y.connector?.chainType&&"phantom"===Y.connector?.walletClientType&&oe(U)&&void 0===H?.login?.isSigningInWithLedgerSolana?D("ConnectLedgerScreen",!1):(he&&!t&&(!ue||pe||E?K(Y.connectedWallet,pe,H?.login?.disableSignup,H?.login?.isSigningInWithLedgerSolana?"transaction":"plain").then((()=>{de(!0)})):(q({captchaModalData:{callback:e=>K(Y.connectedWallet,e,H?.login?.disableSignup,H?.login?.isSigningInWithLedgerSolana?"transaction":"plain").then((()=>{de(!0)})),userIntentRequired:!1,onSuccessNavigateTo:"ConnectionStatusScreen",onErrorNavigateTo:"ErrorScreen"}}),D("CaptchaScreen",!1))),t instanceof d&&H?.login?.isSigningInWithLedgerSolana&&(t.messageType="transaction"),t&&we&&he&&!t.preparedMessage?t.buildMessage():t&&!we&&he&&(g||(async()=>{f(!0),_(void 0);try{"wallet_connect_v2"===Y?.connector?.connectorType&&"metamask"===Y?.connector?.walletClientType&&await v(2500),await fe()}catch(e){console.warn("Auto-prompted signature failed",e)}finally{f(!1)}})()))}),[ee,he,se]),i((()=>{if(ne&&n){let e=h-500;if(X?.legal.requireUsersAcceptTerms&&!ne.hasAcceptedTerms){let t=setTimeout((()=>{D("AffirmativeConsentScreen")}),e);return()=>clearTimeout(t)}if(L(ne,X.embeddedWallets)){let t=setTimeout((()=>{q({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),G({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"ConnectionStatusScreen"}}),O()},callAuthOnSuccessOnClose:!0}}),D("EmbeddedWalletOnAccountCreateScreen")}),e);return()=>clearTimeout(t)}$();let t=setTimeout((()=>J({shouldCallAuthOnSuccess:!0,isSuccess:!0})),h);return()=>clearTimeout(t)}}),[ne,n]);let ye=e=>{if(e?.privyErrorCode!==R.ALLOWLIST_REJECTED){if(e?.privyErrorCode===R.USER_LIMIT_REACHED)return console.error(new A(e).toString()),void D("UserLimitReachedScreen");if(e?.privyErrorCode!==R.USER_DOES_NOT_EXIST)return e?.privyErrorCode===R.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce?(q({accountTransfer:{nonce:e.data?.data?.nonce,account:Q()?.meta.address,displayName:e.data?.data?.account?.displayName,externalWalletMetadata:{walletClientType:Q()?.meta.walletClientType,chainId:Q()?.meta.chainId,connectorType:Q()?.meta.connectorType},linkMethod:Q()instanceof p?"siwe":"siws",embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress}}),void D("LinkConflictScreen")):void _(M(e));D("AccountNotFoundScreen")}else D("AllowlistRejectionScreen")};async function fe(){try{await V(),l(!0)}catch(e){ye(e)}finally{f(!1)}}i((()=>{Y?.connectError&&ye(Y?.connectError)}),[Y]),((e,t)=>{let n=o((()=>{}));i((()=>{n.current=e})),i((()=>{if(null!==t){let e=setInterval((()=>n.current()),t||0);return()=>clearInterval(e)}}),[t])})((()=>{let e="wallet_connect_v2"===Ce&&Y?.connector instanceof m?Y.connector.redirectUri:void 0;e&&re(e);let t="wallet_connect_v2"===Ce&&Y?.connector instanceof m?Y.connector.fallbackUniversalRedirectUri:void 0;t&&le(t)}),Y?.connector instanceof m&&!ae?500:null);let Ce=Y?.connector?.connectorType||"injected",be=Y?.connector?.walletClientType||"unknown",ve=ge?.metadata?.shortName||ge?.name||Y?.connector?.walletBranding.name||"Browser Extension",Te=ge?.image_url?.md||Y?.connector?.walletBranding.icon||(t=>/*#__PURE__*/e(u,{...t})),_e="Browser Extension"===ve?ve.toLowerCase():ve;t=n?z("connectionStatus.successfullyConnected",{walletName:_e}):C?z("connectionStatus.errorTitle",{errorMessage:C.message}):Se?"Switching networks":he?g&&we?"Signing":"Sign to verify":`Waiting for ${_e}`;let Ee=z("connectionStatus.checkOtherWindows");n?Ee=ie===(ne?.linkedAccounts.length||0)?"Wallet was already linked.":"You're good to go!":ee>=2&&C?Ee="Unable to connect wallet":C?Ee=C.detail:Se?Ee="Switch your wallet to the requested network.":he&&we?Ee="Sign the message in your wallet to verify it belongs to you.":"metamask"===be&&c?Ee="Click continue to open and connect MetaMask.":"metamask"===be?Ee="For the best experience, connect only one wallet at a time.":"wallet_connect"===Ce?Ee="Open your mobile wallet app to continue":"coinbase_wallet"===Ce?T()||(Ee=N(ne)?"Continue with the Coinbase app. Not the right wallet? Reset your connection below.":"Confirm in the Coinbase app/popup to continue."):H?.login?.isSigningInWithLedgerSolana&&(Ee="Ledger requires a transaction to verify your identity. You'll sign a transaction that performs no onchain action.");let Re=Z?.walletConnectors?.find((e=>"coinbase_wallet"===e.walletClientType)),ke="coinbase_wallet"===be&&(N(ne)||C===y.ERROR_USER_EXISTS);/*#__PURE__*/return e(x,{walletLogo:Te,title:t,subtitle:Ee,signSuccess:n,errorMessage:C,connectSuccess:he,separateConnectAndSign:we,signing:g,walletConnectRedirectUri:ae,walletConnectFallbackUniversalUri:ce,hasTabbedAway:me,showCoinbaseWalletResetCta:ke,numRetries:ee,onBack:F&&P!==F?B:void 0,onSign:()=>{f(!0),fe()},onRetry:()=>{te(ee+1),_(void 0),he?(f(!0),fe()):Y?.connectRetry()},onCoinbaseReset:()=>{Re&&Re?.disconnect()},onDifferentWallet:B})}};let B=/*#__PURE__*/l.p.withConfig({displayName:"RedirectLinksContainer",componentId:"sc-2a867557-0"})(["text-align:center;color:var(--privy-color-foreground-2);font-size:14px;line-height:22px;margin:16px 0;"]);export{D as ConnectionStatusScreen,x as ConnectionStatusView,D as default,M as getErrorDetails};
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import{useRef as o,useEffect as i,useState as a,useCallback as r}from"react";import{isMobile as c}from"react-device-detect";import{styled as l}from"styled-components";import{a as s,S as d,W as m,B as u,b as p}from"./index-CCyaupaz.mjs";import{L as g}from"./Link-DwjLfHwW.mjs";import{u as w,q as h}from"./context-Bycd1SKV.mjs";import{u as S}from"./useI18n-BtdAZuQ8.mjs";import{C as y,P as f,d as C}from"./prepareFundingModalData-CIgFwA7s.mjs";import{Q as b,k as v,T}from"./useActiveWallet-Bsy5GTCV.mjs";import{isHex as _,getAddress as E}from"viem";import{b as R,u as k,k as A}from"./internal-context-e-Eni5bG.mjs";import{u as W,a as I}from"./get-is-unified-wallet-DvKS5IUO.mjs";import{s as L}from"./shouldProceedtoEmbeddedWalletCreationFlow-Djgu4xiS.mjs";import{c as j,e as U}from"./usePrivy-BaiIHGte.mjs";import{S as O}from"./ScreenLayout-CddsD3Of.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useWallets-D0lpBS44.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"viem/utils";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"@scure/base";import"./events-context-CI0iqAXA.mjs";import"zustand";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./getPublicClient-A9RSftUZ.mjs";import"ofetch";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"tinycolor2";import"./Button-B8mqatRx.mjs";import"./Screen-BTyXgDrd.mjs";import"./ModalHeader-BLGC-7ev.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"./index-CJMgUOnw.mjs";const N=e=>{let t=localStorage.getItem("-walletlink:https://www.walletlink.org:Addresses")?.split(" ").filter((e=>_(e,{strict:!0}))).map((e=>E(e)));return!!t?.length&&!!e?.linkedAccounts.filter((e=>"wallet"==e.type&&t.includes(e.address))).length};const M=e=>e?.privyErrorCode===R.LINKED_TO_ANOTHER_USER?y.ERROR_USER_EXISTS:e instanceof f&&!e.details.default?e.details:e instanceof C?y.ERROR_TIMED_OUT:e?.privyErrorCode===R.CANNOT_LINK_MORE_OF_TYPE?y.ERROR_USER_LIMIT_REACHED:y.ERROR_WALLET_CONNECTION,x=({walletLogo:o,title:i,subtitle:a,signSuccess:r,errorMessage:c,connectSuccess:l,separateConnectAndSign:s,signing:d,walletConnectRedirectUri:m,walletConnectFallbackUniversalUri:u,hasTabbedAway:p,showCoinbaseWalletResetCta:w,numRetries:h,onBack:f,onSign:C,onRetry:b,onCoinbaseReset:v,onDifferentWallet:T})=>{let{t:_}=S(),E=w?{label:"Use a different wallet",onClick:v,disabled:r}:c===y.ERROR_USER_EXISTS&&f?{label:"Use a different wallet",onClick:T}:l&&!r&&s?{label:d?"Signing":"Sign with your wallet",onClick:C,disabled:d}:!r&&c?.retryable&&h<2?{label:"Retry",onClick:b,disabled:!1}:r||c?void 0:{label:_("connectionStatus.connecting"),onClick:()=>{},disabled:!0};/*#__PURE__*/return e(O,{title:i,subtitle:a,icon:o,iconVariant:"loading",iconLoadingStatus:{success:r,fail:!!c},primaryCta:E,onBack:f,watermark:!0,children:!l&&m&&!p&&/*#__PURE__*/t(B,{children:[_("connectionStatus.stillHere")," ",/*#__PURE__*/e(g,{href:m,target:"_blank",variant:"underlined",size:"sm",children:_("connectionStatus.tryConnectingAgain")}),u&&/*#__PURE__*/t(n,{children:[" ",_("connectionStatus.or")," ",/*#__PURE__*/e(g,{href:u,target:"_blank",variant:"underlined",size:"sm",children:_("connectionStatus.useDifferentLink")})]})]})})},D={component:()=>{let t,[n,l]=a(!1),[g,f]=a(!1),[C,_]=a(void 0),{authenticated:E,logout:O}=W(),{navigate:D,navigateBack:B,lastScreen:F,currentScreen:P,setModalData:q,data:H}=I(),X=w(),{t:z}=S(),{getAuthFlow:Q,walletConnectionStatus:Y,closePrivyModal:J,initLoginWithWallet:K,loginWithWallet:V,updateWallets:$,createAnalyticsEvent:G}=k(),{walletConnectors:Z}=W(),[ee,te]=a(0),{user:ne}=W(),oe=j(),[ie]=a(ne?.linkedAccounts.length||0),[ae,re]=a(""),[ce,le]=a(""),[se,de]=a(!1),{hasTabbedAway:me}=function(){let[e,t]=a(!1),n=r((()=>{document.hidden&&t(!0)}),[]);return i((()=>(document.addEventListener("visibilitychange",n),()=>document.removeEventListener("visibilitychange",n))),[n]),{hasTabbedAway:e,reset:()=>t(!1)}}(),{enabled:ue,token:pe}=s(),ge=b(Y?.connector?.walletClientType||"unknown"),we=c&&"wallet_connect_v2"===Y?.connector?.connectorType||c&&"coinbase_wallet"===Y?.connector?.connectorType||c&&"base_account"===Y?.connector?.connectorType||c&&"injected"===Y?.connector?.connectorType&&"phantom"===Y?.connector?.walletClientType||c&&"solana_adapter"===Y?.connector?.connectorType&&"mobile_wallet_adapter"===Y.connector.walletClientType,he="connected"===Y?.status,Se="switching_to_supported_chain"===Y?.status;i((()=>{let e=Q(),t=e instanceof p||e instanceof d?e:void 0;he&&"solana"===Y.connector?.chainType&&"phantom"===Y.connector?.walletClientType&&oe(U)&&void 0===H?.login?.isSigningInWithLedgerSolana?D("ConnectLedgerScreen",!1):(he&&!t&&(!ue||pe||E?K(Y.connectedWallet,pe,H?.login?.disableSignup,H?.login?.isSigningInWithLedgerSolana?"transaction":"plain").then((()=>{de(!0)})):(q({captchaModalData:{callback:e=>K(Y.connectedWallet,e,H?.login?.disableSignup,H?.login?.isSigningInWithLedgerSolana?"transaction":"plain").then((()=>{de(!0)})),userIntentRequired:!1,onSuccessNavigateTo:"ConnectionStatusScreen",onErrorNavigateTo:"ErrorScreen"}}),D("CaptchaScreen",!1))),t instanceof d&&H?.login?.isSigningInWithLedgerSolana&&(t.messageType="transaction"),t&&we&&he&&!t.preparedMessage?t.buildMessage():t&&!we&&he&&(g||(async()=>{f(!0),_(void 0);try{"wallet_connect_v2"===Y?.connector?.connectorType&&"metamask"===Y?.connector?.walletClientType&&await v(2500),await fe()}catch(e){console.warn("Auto-prompted signature failed",e)}finally{f(!1)}})()))}),[ee,he,se]),i((()=>{if(ne&&n){let e=h-500;if(X?.legal.requireUsersAcceptTerms&&!ne.hasAcceptedTerms){let t=setTimeout((()=>{D("AffirmativeConsentScreen")}),e);return()=>clearTimeout(t)}if(L(ne,X.embeddedWallets)){let t=setTimeout((()=>{q({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),G({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"ConnectionStatusScreen"}}),O()},callAuthOnSuccessOnClose:!0}}),D("EmbeddedWalletOnAccountCreateScreen")}),e);return()=>clearTimeout(t)}$();let t=setTimeout((()=>J({shouldCallAuthOnSuccess:!0,isSuccess:!0})),h);return()=>clearTimeout(t)}}),[ne,n]);let ye=e=>{if(e?.privyErrorCode!==R.ALLOWLIST_REJECTED){if(e?.privyErrorCode===R.USER_LIMIT_REACHED)return console.error(new A(e).toString()),void D("UserLimitReachedScreen");if(e?.privyErrorCode!==R.USER_DOES_NOT_EXIST)return e?.privyErrorCode===R.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce?(q({accountTransfer:{nonce:e.data?.data?.nonce,account:Q()?.meta.address,displayName:e.data?.data?.account?.displayName,externalWalletMetadata:{walletClientType:Q()?.meta.walletClientType,chainId:Q()?.meta.chainId,connectorType:Q()?.meta.connectorType},linkMethod:Q()instanceof p?"siwe":"siws",embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress}}),void D("LinkConflictScreen")):void _(M(e));D("AccountNotFoundScreen")}else D("AllowlistRejectionScreen")};async function fe(){try{await V(),l(!0)}catch(e){ye(e)}finally{f(!1)}}i((()=>{Y?.connectError&&ye(Y?.connectError)}),[Y]),((e,t)=>{let n=o((()=>{}));i((()=>{n.current=e})),i((()=>{if(null!==t){let e=setInterval((()=>n.current()),t||0);return()=>clearInterval(e)}}),[t])})((()=>{let e="wallet_connect_v2"===Ce&&Y?.connector instanceof m?Y.connector.redirectUri:void 0;e&&re(e);let t="wallet_connect_v2"===Ce&&Y?.connector instanceof m?Y.connector.fallbackUniversalRedirectUri:void 0;t&&le(t)}),Y?.connector instanceof m&&!ae?500:null);let Ce=Y?.connector?.connectorType||"injected",be=Y?.connector?.walletClientType||"unknown",ve=ge?.metadata?.shortName||ge?.name||Y?.connector?.walletBranding.name||"Browser Extension",Te=ge?.image_url?.md||Y?.connector?.walletBranding.icon||(t=>/*#__PURE__*/e(u,{...t})),_e="Browser Extension"===ve?ve.toLowerCase():ve;t=n?z("connectionStatus.successfullyConnected",{walletName:_e}):C?z("connectionStatus.errorTitle",{errorMessage:C.message}):Se?"Switching networks":he?g&&we?"Signing":"Sign to verify":`Waiting for ${_e}`;let Ee=z("connectionStatus.checkOtherWindows");n?Ee=ie===(ne?.linkedAccounts.length||0)?"Wallet was already linked.":"You're good to go!":ee>=2&&C?Ee="Unable to connect wallet":C?Ee=C.detail:Se?Ee="Switch your wallet to the requested network.":he&&we?Ee="Sign the message in your wallet to verify it belongs to you.":"metamask"===be&&c?Ee="Click continue to open and connect MetaMask.":"metamask"===be?Ee="For the best experience, connect only one wallet at a time.":"wallet_connect"===Ce?Ee="Open your mobile wallet app to continue":"coinbase_wallet"===Ce?T()||(Ee=N(ne)?"Continue with the Coinbase app. Not the right wallet? Reset your connection below.":"Confirm in the Coinbase app/popup to continue."):H?.login?.isSigningInWithLedgerSolana&&(Ee="Ledger requires a transaction to verify your identity. You'll sign a transaction that performs no onchain action.");let Re=Z?.walletConnectors?.find((e=>"coinbase_wallet"===e.walletClientType)),ke="coinbase_wallet"===be&&(N(ne)||C===y.ERROR_USER_EXISTS);/*#__PURE__*/return e(x,{walletLogo:Te,title:t,subtitle:Ee,signSuccess:n,errorMessage:C,connectSuccess:he,separateConnectAndSign:we,signing:g,walletConnectRedirectUri:ae,walletConnectFallbackUniversalUri:ce,hasTabbedAway:me,showCoinbaseWalletResetCta:ke,numRetries:ee,onBack:F&&P!==F?B:void 0,onSign:()=>{f(!0),fe()},onRetry:()=>{te(ee+1),_(void 0),he?(f(!0),fe()):Y?.connectRetry()},onCoinbaseReset:()=>{Re&&Re?.disconnect()},onDifferentWallet:B})}};let B=/*#__PURE__*/l.p.withConfig({displayName:"RedirectLinksContainer",componentId:"sc-2a867557-0"})(["text-align:center;color:var(--privy-color-foreground-2);font-size:14px;line-height:22px;margin:16px 0;"]);export{D as ConnectionStatusScreen,x as ConnectionStatusView,D as default,M as getErrorDetails};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useMemo as t,useState as o,useEffect as r}from"react";import{u as i,q as a}from"./context-Bycd1SKV.mjs";import{R as s}from"./index-CCyaupaz.mjs";import{u as n,a as c,e as l,b as m}from"./internal-context-e-Eni5bG.mjs";import{a as p}from"./get-is-unified-wallet-DvKS5IUO.mjs";import{z as u}from"./useActiveWallet-Bsy5GTCV.mjs";import{s as d}from"./shouldProceedtoEmbeddedWalletCreationFlow-Djgu4xiS.mjs";import{S as f}from"./ScreenLayout-CddsD3Of.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"uuid";import"jose";import"eventemitter3";import"./useWallets-D0lpBS44.mjs";import"./prepareFundingModalData-CIgFwA7s.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"react-device-detect";import"viem/utils";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-BaiIHGte.mjs";import"./events-context-CI0iqAXA.mjs";import"@scure/base";import"styled-components";import"zustand";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"viem";import"./getPublicClient-A9RSftUZ.mjs";import"ofetch";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./Button-B8mqatRx.mjs";import"./Screen-BTyXgDrd.mjs";import"./ModalHeader-BLGC-7ev.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"./index-CJMgUOnw.mjs";const h=({providerApp:o,success:r,error:i,onClose:a})=>{let{title:s,subtitle:n}=t((()=>r?{title:`Successfully connected with ${o.name}`,subtitle:"You're good to go!"}:i?{title:"Authentication failed",subtitle:i.message}:{title:`Connecting to ${o.name}`,subtitle:`Please check the pop-up from ${o.name} to continue`}),[r,i,o.name]);/*#__PURE__*/return e(f,{title:s,subtitle:n,icon:o.logoUrl,iconVariant:"loading",iconLoadingStatus:{success:r,fail:!!i},onBack:a,watermark:!0})},v={component:()=>{let t=i(),{data:f,navigate:v,setModalData:g,onUserCloseViaDialogOrKeybindRef:A}=p(),{crossAppAuthFlow:j,updateWallets:y,closePrivyModal:b,createAnalyticsEvent:C}=n(),{logout:w}=u(),[S,U]=o({}),T=f?.crossAppAuth;if(!T)return console.debug("Data missing for screen"),null;let k={id:T.appId,name:T.name,logoUrl:T.logoUrl},W=new c(`There was an issue connecting your ${k.name} account. Please try again.`),x=new s((async e=>{if(T.popup)try{let t=await j({appId:e,popup:T.popup,action:T.action});U({data:t})}catch(e){if(e instanceof c)U({error:e});else if(e instanceof l){if(e.privyErrorCode===m.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce)return g({accountTransfer:{nonce:e.data?.data?.nonce,account:e.data?.data?.subject,displayName:e.data?.data?.account?.displayName,linkMethod:`privy:${k.id}`,embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress,oAuthUserInfo:e.data?.data?.otherUser?.oAuthUserInfo}}),void v("LinkConflictScreen");T.popup&&T.popup.close(),U({error:W})}else U({error:W})}else U({error:W})})),E=()=>{S.data&&(y(),T.onSuccess(S.data),b({shouldCallAuthOnSuccess:!0,isSuccess:!0})),T.onError(S.error??new c("User canceled flow")),b({shouldCallAuthOnSuccess:!1,isSuccess:!1})};return A.current=E,r((()=>{k.id.length&&x.execute(k.id)}),[k.id]),r((()=>{if(!S.data)return;let e=S.data;if(t.legal.requireUsersAcceptTerms&&!e.hasAcceptedTerms){let e=setTimeout((()=>{v("AffirmativeConsentScreen")}),a);return()=>clearTimeout(e)}if(d(e,t.embeddedWallets)){let e=setTimeout((()=>{g({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),C({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,provider:`privy:${k.id}`,screen:"CrossAppAuthScreen"}}),w()},callAuthOnSuccessOnClose:!0}}),v("EmbeddedWalletOnAccountCreateScreen")}),a);return()=>clearTimeout(e)}let o=setTimeout(E,a);return()=>clearTimeout(o)}),[S.data]),/*#__PURE__*/e(h,{providerApp:k,success:!!S.data,error:S.error,onClose:E})},isShownBeforeReady:!0};export{v as CrossAppAuthScreen,h as CrossAppAuthScreenView,v as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as i}from"react/jsx-runtime";import a from"@heroicons/react/24/outline/UserCircleIcon";import l,{useState as r,useEffect as n,useRef as o,useMemo as s}from"react";import{styled as c}from"styled-components";import{T as d,M as p,B as h}from"./ModalHeader-BLGC-7ev.mjs";import{u}from"./context-Bycd1SKV.mjs";import{U as g,G as m,H as f,V as y,F as w,W as v,X as C,Y as b,e as k,Z as S,d as T,_ as M,$ as x,a0 as A}from"./useActiveWallet-Bsy5GTCV.mjs";import{u as L}from"./internal-context-e-Eni5bG.mjs";import{u as I,a as W,i as N}from"./get-is-unified-wallet-DvKS5IUO.mjs";import{a as E,t as P}from"./index-CCyaupaz.mjs";import{u as j,c as D,d as O}from"./ConnectWalletView-eQbJO3Pg.mjs";import{Mail as R,Smartphone as _,UserCircle as V}from"lucide-react";import{C as U}from"./ConnectEmailForm--PZXgvw4.mjs";import{C as F}from"./Chip-Bsgj4Yc-.mjs";import{F as $}from"./farcaster-DPlSjvF5.mjs";import{toObjectKeys as z}from"@privy-io/js-sdk-core";import H from"@heroicons/react/24/outline/QuestionMarkCircleIcon";import G from"@heroicons/react/24/outline/FingerPrintIcon";import{L as q}from"./Link-DwjLfHwW.mjs";import{C as B}from"./ConnectPhoneForm-DoYmHBv3.mjs";import{T as K,a as X,I as Z,S as J,L as Q,G as Y,b as ee,D as te,A as ie}from"./twitter-6jomarO4.mjs";import{T as ae,L as le}from"./twitch-5IOe4sIQ.mjs";import{T as re}from"./telegram-B-JqnkqZ.mjs";import{W as ne}from"./WalletOverflowButton-DV9Pe-aq.mjs";import{S as oe}from"./ScreenLayout-CddsD3Of.mjs";const se=()=>{let t=u(),i=t?.appearance?.logo,a=`${t?.name} logo`,r={maxHeight:"90px",maxWidth:"180px"};return i?"string"==typeof i?/*#__PURE__*/e("img",{src:i,alt:a,style:r}):"svg"===i.type||"img"===i.type?/*#__PURE__*/l.cloneElement(i,{alt:a,style:r}):(console.warn("`config.appearance.logo` must be a string, or an SVG / IMG element. Nothing will be rendered."),null):null},ce=t=>{let i=u();return i?.appearance.logo?/*#__PURE__*/e(de,{...t,children:/*#__PURE__*/e(se,{})}):null},de=/*#__PURE__*/c.div.withConfig({displayName:"AppLogoContainer",componentId:"sc-b210074-0"})(["display:flex;flex-direction:column;align-items:center;padding:24px 0;flex-grow:1;justify-content:center;"]),pe=({name:t,logoUrl:i,size:a="38px"})=>"string"==typeof i?/*#__PURE__*/e("img",{src:i,alt:`${t??"Provider app"} logo`,style:{width:a,height:a,maxHeight:"90px",maxWidth:"180px",borderRadius:"8px"}}):
|
|
2
|
+
/*#__PURE__*/e("span",{}),he=({appId:a})=>{let[l,o]=r(void 0),{startCrossAppAuthFlow:s,authenticated:c}=I(),{client:d}=L();return n((()=>{(async()=>{d&&o(await d.getCrossAppProviderDetails(a))})()}),[d]),/*#__PURE__*/e(g,{onClick:()=>s({appId:a,action:c?"link":"login"}),disabled:!l,children:l?/*#__PURE__*/t(i,{children:[/*#__PURE__*/e(pe,{name:l.name,logoUrl:l.icon_url||void 0,size:"24px"})," ",l.name]}):/*#__PURE__*/e(m,{})})},ue=({isEditable:a,setIsEditable:l,defaultValue:r})=>{let n=o(null);/*#__PURE__*/return t(i,{children:[/*#__PURE__*/e(f,{$if:!a,children:/*#__PURE__*/e(U,{ref:n,defaultValue:r})}),/*#__PURE__*/e(f,{$if:a,children:/*#__PURE__*/t(g,{onClick:()=>{l(),setTimeout((()=>{n.current?.focus()}),0)},children:[/*#__PURE__*/e(y,{children:/*#__PURE__*/e(R,{})}),"Continue with Email"]})})]})},ge=()=>{let[i,a]=r(!1),{currentScreen:l,navigate:n,setModalData:o,data:s}=W(),{enabled:c,token:d}=E(),{initLoginWithFarcaster:p}=L(),{accountType:h}=w();/*#__PURE__*/return t(g,{onClick:async()=>{a(!0);try{c&&!d?(o({captchaModalData:{callback:e=>p(e,s?.login?.disableSignup),userIntentRequired:!0,onSuccessNavigateTo:"FarcasterConnectStatusScreen",onErrorNavigateTo:"ErrorScreen"}}),n("CaptchaScreen")):(await p(d,s?.login?.disableSignup),n("FarcasterConnectStatusScreen"))}catch(e){o({errorModalData:{error:e,previousScreen:l||"LandingScreen"}}),n("ErrorScreen")}finally{a(!1)}},disabled:!1,children:[/*#__PURE__*/e($,{width:32,height:32})," Farcaster",i&&/*#__PURE__*/e(m,{}),"farcaster"===h&&/*#__PURE__*/e(me,{color:"gray",children:"Recent"})]})};let me=/*#__PURE__*/c(F).withConfig({displayName:"StyledChip",componentId:"sc-2f1c7323-0"})(["margin-left:auto;"]);const fe=({...i})=>/*#__PURE__*/t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"25",height:"25",viewBox:"0 0 25 25",fill:"none",...i,children:[/*#__PURE__*/t("g",{clipPath:"url(#clip0_2856_1743)",children:[/*#__PURE__*/e("path",{d:"M22.1673 8.24075V16.3642C22.1673 17.3256 21.3421 18.105 20.3241 18.105H17.0028M22.1673 8.24075C22.1673 7.27936 21.3421 6.5 20.3241 6.5H11.5302M22.1673 8.24075V8.42852C22.1673 9.03302 21.8352 9.59423 21.2901 9.91105L15.1463 13.4818C14.5539 13.8261 13.8067 13.8261 13.2143 13.4818L10.1621 11.5401",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),/*#__PURE__*/e("path",{d:"M3.12913 6.64816C0.508085 12.9507 3.49251 20.1847 9.79504 22.8057L11.5068 23.5176C12.4522 23.9108 13.7783 23.2222 14.1714 22.2768L14.6054 21.2333C14.7687 20.8406 14.6438 20.3871 14.3024 20.1334L11.2872 17.8927C10.9878 17.6702 10.5843 17.6488 10.2632 17.8384L9.11575 18.5156C8.78274 18.7121 8.3597 18.6844 8.07552 18.4221C5.94293 16.4542 4.77629 13.6264 4.90096 10.7273C4.91757 10.3409 5.19796 10.023 5.57269 9.92753L6.86381 9.59869C7.22522 9.50664 7.49627 9.20696 7.55169 8.83815L8.10986 5.12321C8.17306 4.70259 7.94188 4.29293 7.54915 4.1296L6.50564 3.69564C5.56026 3.30248 4.23416 3.99103 3.84101 4.9364L3.12913 6.64816Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),/*#__PURE__*/e("defs",{children:/*#__PURE__*/e("clipPath",{id:"clip0_2856_1743",children:/*#__PURE__*/e("rect",{x:"0.5",y:"0.5",width:"24",height:"24",rx:"6",fill:"white"})})})]}),ye=({chainType:i,withPadding:a})=>{let l="";return l="ethereum-only"===i||"ethereum-and-solana"===i?"Rainbow, Phantom, or Coinbase Wallet":"Phantom or Solflare",/*#__PURE__*/e(v,{$withPadding:a,children:/*#__PURE__*/t(C,{children:[/*#__PURE__*/e(H,{style:{color:"var(--privy-color-warn)",height:48,width:48}}),/*#__PURE__*/e("h3",{children:"No wallets available"}),/*#__PURE__*/t("p",{children:["Please download an external wallet provider, like ",l,"."]})]})},"empty-wallet-state")},we=()=>{let{enabled:i,token:a}=E(),{navigate:l,setModalData:r,data:n}=W(),o=u(),{initLoginWithPasskey:c}=L(),d=()=>{o.loginConfig.passkeysForSignupEnabled?l("PasskeySelectSignupOrLogin"):(async()=>{i&&!a?(r({passkeyAuthModalData:{passkeySignupFlow:!1},captchaModalData:{callback:e=>c({captchaToken:e,withPrivyUi:!0}),userIntentRequired:!1,onSuccessNavigateTo:"PasskeyStatusScreen",onErrorNavigateTo:"ErrorScreen"}}),l("CaptchaScreen")):(await c({withPrivyUi:!0,captchaToken:a}),r({passkeyAuthModalData:{passkeySignupFlow:!1}}),l("PasskeyStatusScreen"))})()};return 0===s((()=>{let e=n?.login?.loginMethods;return e?e.filter((e=>"passkey"!==e)).length:Object.entries(o.loginMethods).filter((([e,t])=>t)).filter((([e])=>"passkey"!==e)).length}),[o.loginMethods,n?.login])?/*#__PURE__*/t(g,{onClick:d,children:[/*#__PURE__*/e(G,{})," Continue with passkey"]}):/*#__PURE__*/e(q,{as:"button",onClick:d,size:"sm",variant:"navigation",style:{width:"100%",justifyContent:"center"},children:"I have a passkey"})},ve=({isEditable:a,setIsEditable:l,defaultValue:r})=>{let n=o(null),{authenticated:s}=I(),{navigate:c,setModalData:d,currentScreen:p,data:h}=W(),{initLoginWithSms:m}=L(),{enabled:w,token:v}=E(),{whatsAppEnabled:C}=u();/*#__PURE__*/return t(i,{children:[/*#__PURE__*/e(f,{$if:!a,children:/*#__PURE__*/e(B,{ref:n,onSubmit:async function({qualifiedPhoneNumber:e}){if(!w||v||s)try{await m({phoneNumber:e,captchaToken:v,withPrivyUi:!0,disableSignup:h?.login?.disableSignup}),c("AwaitingPasswordlessCodeScreen")}catch(e){d({errorModalData:{error:e,previousScreen:p||"LandingScreen"}}),c("ErrorScreen")}else d({captchaModalData:{callback:t=>m({phoneNumber:e,captchaToken:t,withPrivyUi:!0,disableSignup:h?.login?.disableSignup}),userIntentRequired:!1,onSuccessNavigateTo:"AwaitingPasswordlessCodeScreen",onErrorNavigateTo:"ErrorScreen"}}),c("CaptchaScreen")},defaultValue:r})}),/*#__PURE__*/e(f,{$if:a,children:/*#__PURE__*/t(g,{onClick:()=>{l(),setTimeout((()=>{n.current?.focus()}),0)},children:[/*#__PURE__*/e(y,{children:/*#__PURE__*/e(_,{})}),"Continue with ",C?"WhatsApp":"SMS"]})})]})};let Ce={apple:{logo:ie,displayName:"Apple"},discord:{logo:te,displayName:"Discord"},github:{logo:ee,displayName:"GitHub"},google:{logo:Y,displayName:"Google"},linkedin:{logo:Q,displayName:"LinkedIn"},spotify:{logo:J,displayName:"Spotify"},instagram:{logo:Z,displayName:"Instagram"},twitter:{logo:X,displayName:"Twitter"},tiktok:{logo:K,displayName:"TikTok"},line:{logo:le,displayName:"LINE"},twitch:{logo:ae,displayName:"Twitch"}};const be=({provider:i})=>{let{enabled:a,token:l}=E(),{navigate:n,setModalData:o,data:c}=W(),[d,p]=r(!1),h=u(),{initLoginWithOAuth:m}=L(),{accountType:f}=w(),v=s((()=>f&&"guest"!==f&&"authorization_key"!==f&&"cross_app"!==f?P(f):null),[f]),{displayName:C,logo:b}=s((()=>{if(N(i)){let t=h.customOAuthProviders.find((e=>e.provider===i)),a=t.provider_icon_url,l=t.provider_display_name;return{displayName:l,logo:({style:t})=>/*#__PURE__*/e("img",{alt:`${l} logo`,src:a,style:t})}}return Ce[i]}),[i,h.customOAuthProviders]);/*#__PURE__*/return t(g,{onClick:()=>{p(!0),setTimeout((()=>{p(!1)}),2e3),a&&!l?(o({captchaModalData:{callback:e=>m(i,e,c?.login?.disableSignup),userIntentRequired:!0,onSuccessNavigateTo:null,onErrorNavigateTo:"ErrorScreen"}}),n("CaptchaScreen")):m(i,void 0,c?.login?.disableSignup)},disabled:d,children:[/*#__PURE__*/e(y,{$fullSize:!0,children:/*#__PURE__*/e(b,{style:{width:"32px",height:"32px"}})}),C,v?.loginMethod===i&&/*#__PURE__*/e(ke,{color:"gray",children:"Recent"})]})};let ke=/*#__PURE__*/c(F).withConfig({displayName:"StyledChip",componentId:"sc-e74c7091-0"})(["margin-left:auto;"]);const Se=()=>{let{enabled:i,token:a}=E(),{navigate:l,setModalData:n,data:o}=W(),[s,c]=r(!1),{initLoginWithTelegram:d}=L(),{accountType:p}=w();async function h(e){try{await d(e,o?.login?.disableSignup),n({telegramAuthModalData:{seamlessAuth:!1}}),l("TelegramAuthScreen")}catch(e){console.error(e),c(!1)}}/*#__PURE__*/return t(g,{onClick:async function(){if(c(!0),i&&!a)return n({captchaModalData:{callback:h,userIntentRequired:!0,onSuccessNavigateTo:null,onErrorNavigateTo:"ErrorScreen"}}),void l("CaptchaScreen");await h(a)},disabled:s,children:[/*#__PURE__*/e(re,{width:32,height:32}),"Telegram","telegram"===p&&/*#__PURE__*/e(Te,{color:"gray",children:"Recent"})]})};let Te=/*#__PURE__*/c(F).withConfig({displayName:"StyledChip",componentId:"sc-639dd483-0"})(["margin-left:auto;"]);const Me=({onClick:i,text:a,icon:l})=>/*#__PURE__*/t(g,{onClick:i,children:[/*#__PURE__*/e(y,{children:l}),/*#__PURE__*/e(b,{children:a})]}),xe=({connectOnly:a})=>{let{closePrivyModal:l}=L(),{data:o,setModalData:c,onUserCloseViaDialogOrKeybindRef:p,navigate:h}=W(),g=u(),m=o?.login,f=g.appearance.walletList,y=m?.walletChainType??g.appearance.walletChainType,{accountType:v,walletClientType:C,chainType:b}=w(),T=s((()=>v&&"guest"!==v&&"authorization_key"!==v&&"cross_app"!==v?P(v):null),[v]),{email:M,sms:x,google:A,twitter:I,discord:E,github:R,spotify:_,instagram:V,tiktok:U,line:F,twitch:$,linkedin:H,apple:G,wallet:q,farcaster:B,telegram:K}=s((()=>m?.loginMethods?z(m.loginMethods,!0):null),[m])??g.loginMethods,{wallets:X}=j({enabled:k(q?f:[]),walletList:f,walletChainType:y}),Z=g.customOAuthProviders,J=g.crossAppProviders,{passkey:Q}=g.loginMethods,Y=[M&&"email",x&&"sms",A&&"google",I&&"twitter",E&&"discord",R&&"github",_&&"spotify",V&&"instagram",U&&"tiktok",F&&"line",$&&"twitch",H&&"linkedin",G&&"apple",B&&"farcaster",K&&"telegram",...Z.map((e=>e.provider)),...J].filter((e=>!!e)),ee=Y.length>0,te=s((()=>q&&!ee?"web3-first":q&&g?.appearance.loginGroupPriority||"web2-first"),[q,ee,g?.appearance.loginGroupPriority]),ie=g?.appearance.hideDirectWeb2Inputs,[ae,le]=r("default"),[re,ce]=r(Ee({mostRecentlyUsedAccountType:v,smsAvailable:x,emailAvailable:M,prefilledType:m?.prefill?.type}));n((()=>{ce(Ee({mostRecentlyUsedAccountType:v,smsAvailable:x,emailAvailable:M,prefilledType:m?.prefill?.type}))}),[M,x,v]);let de=()=>{l({shouldCallAuthOnSuccess:!0}),setTimeout((()=>{le("default")}),150)};p.current=de;let pe=[];C&&q?pe.push(C):T?.loginMethod&&Y.includes(T.loginMethod)&&pe.push(T.loginMethod);let me=t=>{if("email"===t)/*#__PURE__*/return e(ue,{isEditable:"email"===re,setIsEditable:()=>{ce("email")},defaultValue:"email"===m?.prefill?.type?m.prefill.value:void 0},t);if("sms"===t)/*#__PURE__*/return e(ve,{isEditable:"sms"===re,setIsEditable:()=>{ce("sms")},defaultValue:"phone"===m?.prefill?.type?m.prefill.value:void 0},t);if("apple"===t)/*#__PURE__*/return e(be,{provider:"apple"},t);if("discord"===t)/*#__PURE__*/return e(be,{provider:"discord"},t);if("farcaster"===t)/*#__PURE__*/return e(ge,{},t);if("github"===t)/*#__PURE__*/return e(be,{provider:"github"},t);if("google"===t)/*#__PURE__*/return e(be,{provider:"google"},t);if("linkedin"===t)/*#__PURE__*/return e(be,{provider:"linkedin"},t);if("tiktok"===t)/*#__PURE__*/return e(be,{provider:"tiktok"},t);if("line"===t)/*#__PURE__*/return e(be,{provider:"line"},t);if("twitch"===t)/*#__PURE__*/return e(be,{provider:"twitch"},t);if("spotify"===t)/*#__PURE__*/return e(be,{provider:"spotify"},t);if("instagram"===t)/*#__PURE__*/return e(be,{provider:"instagram"},t);if("twitter"===t)/*#__PURE__*/return e(be,{provider:"twitter"},t);if("telegram"===t)/*#__PURE__*/return e(Se,{},t);if(N(t))/*#__PURE__*/return e(be,{provider:t},t);if(t.startsWith("privy:")){let i=t.split(":")[1];if(!i)throw Error("Invalid cross-app provider format. App ID missing.");/*#__PURE__*/return e(he,{appId:i},t)}let i=X.findIndex((({id:e})=>e===D.normalize(t))),l="solana"===b?"solana-only":"ethereum-only";/*#__PURE__*/return e(O,{recent:!0,index:i,data:{wallets:X,walletChainType:l,handleWalletClick(e){c((t=>({...t,externalConnectWallet:{walletList:f,walletChainType:l,preSelectedWalletId:e.id}}))),h(a?"ConnectOnlyLandingScreen":"AuthenticateWithWalletScreen")}}})},fe=X.filter((e=>e.id!==D.normalize(C||""))),Ce=fe.map(((t,i)=>/*#__PURE__*/e(O,{index:i,data:{walletChainType:y,wallets:fe,handleWalletClick(e){c((t=>({...t,externalConnectWallet:{walletList:f,walletChainType:y,preSelectedWalletId:e.id}}))),h(a?"ConnectOnlyLandingScreen":"AuthenticateWithWalletScreen")}}},t.id))),ke=Y.filter((e=>e!==T?.loginMethod)).flatMap(me),Te=pe.flatMap(me);"web3-first"===te&&"default"===ae?Ce.unshift(...Te):"web2-first"===te&&ke.unshift(...Te);let xe="web2-overflow"===ae?()=>le("default"):void 0,Pe=Y.filter((e=>"email"!==e&&"sms"!==e)),je=Ie({priority:te,email:M,sms:x,social:Pe}),De=We({priority:te,email:M,sms:x,social:Pe}),Oe=/*#__PURE__*/e(ne,{text:Ne({priority:te}),onClick:()=>{c({...o,externalConnectWallet:{walletChainType:m?.walletChainType??g.appearance.walletChainType}}),h(a?"ConnectOnlyLandingScreen":"AuthenticateWithWalletScreen")}}),Re=/*#__PURE__*/e(Me,{text:je,icon:De,onClick:()=>le("web2-overflow")}),_e=ie?0:1,Ve=q&&Ce.length>0,Ue=0===ke.length&&q&&0===Ce.length,Fe=5-(Ve?1:0),$e="default"===ae&&g?.appearance.logo,ze="default"===ae&&g.appearance.loginMessage;/*#__PURE__*/return t(oe,{title:g.appearance.landingHeader,icon:$e?/*#__PURE__*/e(se,{}):void 0,iconVariant:$e?"logo":void 0,onClose:de,showClose:!0,onBack:xe,showBack:!!xe,helpText:g||Q&&"default"===ae?/*#__PURE__*/t(i,{children:[Q&&"default"===ae&&/*#__PURE__*/e(we,{}),g&&/*#__PURE__*/e(d,{app:g})]}):void 0,watermark:!0,children:[ze&&("string"==typeof g.appearance.loginMessage?/*#__PURE__*/e(Ae,{children:g.appearance.loginMessage}):/*#__PURE__*/e(Le,{children:g.appearance.loginMessage})),/*#__PURE__*/e(S,{$colorScheme:g.appearance.palette.colorScheme,children:"default"===ae&&"web2-first"===te?/*#__PURE__*/t(i,{children:[ke.length>Fe?ke.slice(0,Fe-1):ke,ke.length>Fe&&Re,Ve&&Oe,Ue&&/*#__PURE__*/e(ye,{chainType:g.appearance.walletChainType})]}):"default"===ae&&"web3-first"===te?/*#__PURE__*/t(i,{children:[q&&/*#__PURE__*/t(i,{children:[Ce.length>Fe?Ce.slice(0,Fe-1):Ce,Ce.length>Fe&&Oe]}),ke.length>_e&&Re,ke.length===_e&&ke[0],Ue&&/*#__PURE__*/e(ye,{chainType:g.appearance.walletChainType})]}):"web2-overflow"===ae?/*#__PURE__*/e(i,{children:"web3-first"===te?ke:ke.slice(3)}):null})]})};let Ae=/*#__PURE__*/c.div.withConfig({displayName:"StyledSubtitle",componentId:"sc-c85d71fe-0"})(["text-align:center;font-size:14px;margin-bottom:24px;"]),Le=/*#__PURE__*/c.div.withConfig({displayName:"MessageContainer",componentId:"sc-c85d71fe-1"})(["margin-bottom:24px;"]),Ie=({priority:e,email:t,sms:i,social:a})=>"web2-first"===e?"Other socials":t&&i&&a.length>0||t&&a.length>0?"Log in with email or socials":i&&a.length>0?"Log in with sms or socials":t&&i?"Continue with email or sms":t?"Continue with email":i?"Continue with sms":"Log in with a social account",We=({priority:t,email:i,sms:a,social:l})=>"web2-first"===t||l.length>0?/*#__PURE__*/e(V,{}):i&&a?/*#__PURE__*/e(fe,{}):i?/*#__PURE__*/e(R,{}):a?/*#__PURE__*/e(_,{}):null,Ne=({priority:e})=>"web2-first"===e?"Continue with a wallet":"Other wallets";const Ee=({mostRecentlyUsedAccountType:e,smsAvailable:t,emailAvailable:i,prefilledType:a})=>i&&("email"===e&&"phone"!==a||"email"===a)||!t||"phone"!==e&&"phone"!==a?"email":"sms",Pe=({connectOnly:l})=>{let{closePrivyModal:o,connectors:c}=L(),{data:g,setModalData:m,onUserCloseViaDialogOrKeybindRef:f,navigate:y}=W(),v=u(),C=v.appearance.palette.colorScheme,{accountType:b,walletClientType:k}=w(),I=s((()=>b&&"guest"!==b&&"authorization_key"!==b&&"cross_app"!==b?P(b):null),[b]),N=v.loginMethodsAndOrder?.primary??[],E=v.loginMethodsAndOrder?.overflow??[],j=s((()=>[...N,...E]),[N,E]),R=v.loginMethods.passkey,_=g?.login,V=[];k&&j.includes(k)?V.push(k):b&&j.includes(I?.loginMethod)&&V.push(I?.loginMethod);let[U,F]=r("default"),[$,z]=r(Ee({mostRecentlyUsedAccountType:b,smsAvailable:j.includes("sms"),emailAvailable:j.includes("email"),prefilledType:_?.prefill?.type}));n((()=>{z(Ee({mostRecentlyUsedAccountType:b,smsAvailable:j.includes("sms"),emailAvailable:j.includes("email"),prefilledType:_?.prefill?.type}))}),[j,b]),n((()=>{"phone"===b&&z("sms");let e=j.indexOf("sms"),t=j.indexOf("email");e>-1&&e<t&&z("sms")}),[b,N,E]);let H=()=>{o({shouldCallAuthOnSuccess:!0}),setTimeout((()=>{F("default")}),150)};f.current=H;let{listings:G}=T(),q=t=>{if("email"===t)/*#__PURE__*/return e(ue,{isEditable:"email"===$,setIsEditable:()=>{z("email")},defaultValue:"email"===_?.prefill?.type?_.prefill.value:void 0},t);if("sms"===t)/*#__PURE__*/return e(ve,{isEditable:"sms"===$,setIsEditable:()=>{z("sms")},defaultValue:"phone"===_?.prefill?.type?_.prefill.value:void 0},t);if("apple"===t)/*#__PURE__*/return e(be,{provider:"apple"},t);if("discord"===t)/*#__PURE__*/return e(be,{provider:"discord"},t);if("farcaster"===t)/*#__PURE__*/return e(ge,{},t);if("github"===t)/*#__PURE__*/return e(be,{provider:"github"},t);if("google"===t)/*#__PURE__*/return e(be,{provider:"google"},t);if("linkedin"===t)/*#__PURE__*/return e(be,{provider:"linkedin"},t);if("spotify"===t)/*#__PURE__*/return e(be,{provider:"spotify"},t);if("instagram"===t)/*#__PURE__*/return e(be,{provider:"instagram"},t);if("tiktok"===t)/*#__PURE__*/return e(be,{provider:"tiktok"},t);if("line"===t)/*#__PURE__*/return e(be,{provider:"line"},t);if("twitch"===t)/*#__PURE__*/return e(be,{provider:"twitch"},t);if("twitter"===t)/*#__PURE__*/return e(be,{provider:"twitter"},t);if("telegram"===t)/*#__PURE__*/return e(Se,{},t);if(t.startsWith("privy:"))/*#__PURE__*/return e(he,{appId:t.replace("privy:","")},t);let i=v.appearance.walletChainType,a=new D(i,[t]).getWallets(c,G);return a.wallets.map(((t,r)=>/*#__PURE__*/e(O,{index:r,data:{wallets:a.wallets,walletChainType:i,handleWalletClick(e){m((t=>({...t,externalConnectWallet:{walletList:j,walletChainType:i,preSelectedWalletId:e.id}}))),y(l?"ConnectOnlyLandingScreen":"AuthenticateWithWalletScreen")}}},t.id+r)))},B=V.flatMap(q),K=N.filter((e=>e!==k&&e!==I?.loginMethod)).flatMap(q),X=E.filter((e=>e!==k&&e!==I?.loginMethod)).flatMap(q),[Z,J]=M([...B,...K,...X],je({primary:K.length+B.length,overflow:X.length}));/*#__PURE__*/return t(i,{children:[/*#__PURE__*/e(p,{title:v.appearance.landingHeader,onClose:H,backFn:"default"===U?void 0:()=>{F("default")}}),"default"===U&&/*#__PURE__*/e(De,{}),"default"===U&&("string"==typeof v.appearance.loginMessage?/*#__PURE__*/e(x,{children:v.appearance.loginMessage}):v.appearance.loginMessage),/*#__PURE__*/e(A,{style:{overflow:"hidden"},children:/*#__PURE__*/t(S,{$colorScheme:C,children:["default"===U&&/*#__PURE__*/t(i,{children:[Z,J.length>0&&/*#__PURE__*/e(Me,{text:"More options",icon:/*#__PURE__*/e(a,{}),onClick:()=>F("overflow")})]}),"overflow"===U&&/*#__PURE__*/e(i,{children:J}),R&&"default"===U&&/*#__PURE__*/e(we,{})]})}),v&&/*#__PURE__*/e(d,{app:v}),/*#__PURE__*/e(h,{})]})};let je=({primary:e,overflow:t})=>e<5?e:5===e&&0===t?5:4,De=/*#__PURE__*/c(ce).withConfig({displayName:"StyledAppLogoHeader",componentId:"sc-ead54d53-0"})(["margin-bottom:16px;"]);export{Pe as C,xe as L};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{AlertCircle as t,CheckCircle as o,CloudUpload as r}from"lucide-react";import{useState as i,useEffect as s}from"react";import{W as a}from"./WalletInfoCard-
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{AlertCircle as t,CheckCircle as o,CloudUpload as r}from"lucide-react";import{useState as i,useEffect as s}from"react";import{W as a}from"./WalletInfoCard-YE5P6CSV.mjs";import{u as n,r as c}from"./context-Bycd1SKV.mjs";import{u as m,a as l}from"./internal-context-e-Eni5bG.mjs";import{a as p}from"./get-is-unified-wallet-DvKS5IUO.mjs";import{S as u}from"./ScreenLayout-CddsD3Of.mjs";import"styled-components";import"./Button-B8mqatRx.mjs";import"./useActiveWallet-Bsy5GTCV.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-CIgFwA7s.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-D0lpBS44.mjs";import"./ErrorMessage-Cx8GKGhL.mjs";import"./LabelXs-BOisBtqT.mjs";import"./Address-BsvZLUXE.mjs";import"./shared-CtYf3O54.mjs";import"tinycolor2";import"ofetch";import"./Screen-BTyXgDrd.mjs";import"./ModalHeader-BLGC-7ev.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"./index-CJMgUOnw.mjs";const d=({appName:i,address:s,success:n,error:c,onAccept:m,onDecline:l,onClose:p})=>/*#__PURE__*/e(u,n||c?{title:c?"Something went wrong":"Success!",subtitle:c?"Please try again.":`You've successfully granted delegated action permissions to ${i}.`,icon:c?t:o,iconVariant:c?"error":"success",onBack:p,watermark:!0}:{title:"Enable offline access",subtitle:`By confirming, ${i} will be able to use your wallet for you even when you're not around. You can revoke this later.`,icon:r,primaryCta:{label:"Accept",onClick:m},secondaryCta:{label:"Not now",onClick:l},onBack:p,watermark:!0,children:/*#__PURE__*/e(a,{address:s,title:"Wallet"})}),j={component:()=>{let{data:t}=p(),o=n(),{closePrivyModal:r}=m(),[a,u]=i(!1),[j,f]=i(),{address:y,onDelegate:g,onSuccess:h,onError:w}=t.delegatedActions.consent,v=async()=>{a?h():w(j??new l("User declined delegating actions.")),r({shouldCallAuthOnSuccess:!1})};return s((()=>{if(!a&&!j)return;let e=setTimeout(v,c);return()=>clearTimeout(e)}),[a,j]),/*#__PURE__*/e(d,{appName:o.name,address:y,success:a,error:j,onAccept:async()=>{try{await g(),u(!0)}catch(e){f(e)}},onDecline:()=>{v()},onClose:v})}};export{j as DelegatedActionsConsentScreen,d as DelegatedActionsConsentScreenView,j as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{AlertCircle as o,CheckCircle as t,Ban as r}from"lucide-react";import{useState as i,useEffect as n}from"react";import{u as s,r as a}from"./context-
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{AlertCircle as o,CheckCircle as t,Ban as r}from"lucide-react";import{useState as i,useEffect as n}from"react";import{u as s,r as a}from"./context-Bycd1SKV.mjs";import{u as c,a as m}from"./internal-context-e-Eni5bG.mjs";import{a as l}from"./get-is-unified-wallet-DvKS5IUO.mjs";import{S as p}from"./ScreenLayout-CddsD3Of.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"viem";import"./Button-B8mqatRx.mjs";import"styled-components";import"./useActiveWallet-Bsy5GTCV.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-CIgFwA7s.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-D0lpBS44.mjs";import"./Screen-BTyXgDrd.mjs";import"./ModalHeader-BLGC-7ev.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"./index-CJMgUOnw.mjs";const u=({appName:i,success:n,error:s,onRevoke:a,onDeny:c,onClose:m})=>/*#__PURE__*/e(p,n||s?{title:s?"Something went wrong":"Success!",subtitle:s?"Please try again.":"You've successfully revoked permissions.",icon:s?o:t,iconVariant:s?"error":"success",onBack:m,watermark:!0}:{title:"Revoke offline access to wallet",subtitle:`By confirming, ${i} will no longer be able to use this wallet on your behalf when you are not online.`,icon:r,primaryCta:{label:"Confirm",onClick:a},secondaryCta:{label:"Deny",onClick:c},onBack:m,watermark:!0}),d={component:()=>{let{data:o}=l(),t=s(),{closePrivyModal:r}=c(),[p,d]=i(!1),[f,y]=i(),{onRevoke:v,onSuccess:k,onError:h}=o.delegatedActions.revoke,j=async()=>{p?k():h(f??new m("User declined revoking access to their delegated wallet.")),r({shouldCallAuthOnSuccess:!1})};return n((()=>{if(!p&&!f)return;let e=setTimeout(j,a);return()=>clearTimeout(e)}),[p,f]),/*#__PURE__*/e(u,{appName:t.name,success:p,error:f,onRevoke:async()=>{try{await v(),d(!0)}catch(e){y(e)}},onDeny:()=>{j()},onClose:j})}};export{d as DelegatedActionsRevokeScreen,u as DelegatedActionsRevokeScreenView,d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{XCircle as t}from"lucide-react";import{useMemo as r,useState as o,useEffect as i}from"react";import{e as a,c as n}from"./index-
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{XCircle as t}from"lucide-react";import{useMemo as r,useState as o,useEffect as i}from"react";import{e as a,c as n}from"./index-CCyaupaz.mjs";import{u as s}from"./internal-context-e-Eni5bG.mjs";import{u as l,a as c}from"./get-is-unified-wallet-DvKS5IUO.mjs";import{S as m}from"./ScreenLayout-CddsD3Of.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-Bsy5GTCV.mjs";import"zustand";import"./context-Bycd1SKV.mjs";import"tinycolor2";import"styled-components";import"react-device-detect";import"./prepareFundingModalData-CIgFwA7s.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-D0lpBS44.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-BaiIHGte.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"ofetch";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./Button-B8mqatRx.mjs";import"./Screen-BTyXgDrd.mjs";import"./ModalHeader-BLGC-7ev.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"./index-CJMgUOnw.mjs";const p=({connectionFailed:r,onClose:o})=>/*#__PURE__*/e(m,r?{title:"Something went wrong",subtitle:"We're on it. Please try again later.",icon:t,iconVariant:"error",primaryCta:{label:"Close",onClick:o},watermark:!0}:{title:"Connecting to your wallet",subtitle:"Please wait...",iconVariant:"loading",showClose:!0,onClose:o,watermark:!1}),d={component:()=>{let{authenticated:t,user:m}=l(),{client:d,closePrivyModal:u,createAnalyticsEvent:y,walletProxy:v}=s(),{navigate:h,data:f,setModalData:w,onUserCloseViaDialogOrKeybindRef:b}=c(),j=r((()=>Date.now()),[]),[g,C]=o(!1),{onCompleteNavigateTo:A,onFailure:I,shouldForceMFA:k,entropyId:x,entropyIdVerifier:S,recoveryMethod:F,connectingWalletAddress:M,isUnifiedWallet:P=!1}=f?.connectWallet,T=e=>{g||(C(!0),I("string"==typeof e?Error(e):e))};return i((()=>{let e;return t?v?((async()=>{let t=await d.getAccessToken();if(!t)return T("User must be authenticated and have a Privy wallet before it can be connected");try{if(!P){if(!x||!S)return T("For on-device first-class chain wallets, entropyId and entropyIdVerifier are required");await v.connect({accessToken:t,entropyId:x,entropyIdVerifier:S})}k&&await v.verifyMfa({accessToken:t});let r=(Date.now()-j)/1e3;"EmbeddedWalletKeyExportScreen"===A&&r<1?e=setTimeout((()=>{h(A,!1)}),1e3*(1-r)):h(A,!1)}catch(e){if(a(e)&&"privy"===F){let e=await d.getAccessToken();if(!e)return T("User must be authenticated and have a Privy wallet before it can be recovered");try{y({eventName:"embedded_wallet_pinless_recovery_started",payload:{walletAddress:M}});let t=await(v?.recover({accessToken:e,entropyId:x,entropyIdVerifier:S}));t?.entropyId||T(Error("Unable to recover wallet")),A?h(A):u({shouldCallAuthOnSuccess:!1}),y({eventName:"embedded_wallet_recovery_completed",payload:{walletAddress:M}}),h(A)}catch(e){T("An error has occurred, please try again.")}}else a(e)&&"privy"!==F&&"privy-v2"!==F?(w({...f,recoverWallet:{entropyId:x,entropyIdVerifier:S,onCompleteNavigateTo:A,onFailure:I},recoveryOAuthStatus:{provider:F,action:"recover",isInAccountCreateFlow:!1,shouldCreateEth:!1,shouldCreateSol:!1}}),h(n(F))):T(e)}})(),()=>clearTimeout(e)):void 0:T("User must be authenticated and have a Privy wallet before it can be connected")}),[t,m,v]),b.current=()=>{T("User exited before wallet could be connected"),u({shouldCallAuthOnSuccess:!1})},/*#__PURE__*/e(p,{connectionFailed:g,onClose:()=>u({shouldCallAuthOnSuccess:!1})})}};export{d as EmbeddedWalletConnectingScreen,p as EmbeddedWalletConnectingView,d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{CheckCircle as t}from"lucide-react";import{useEffect as o}from"react";import{u as r,a as i,b as s,c}from"./get-is-unified-wallet-
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{CheckCircle as t}from"lucide-react";import{useEffect as o}from"react";import{u as r,a as i,b as s,c}from"./get-is-unified-wallet-DvKS5IUO.mjs";import{u as a,r as m}from"./context-Bycd1SKV.mjs";import{u as n}from"./internal-context-e-Eni5bG.mjs";import{S as l}from"./ScreenLayout-CddsD3Of.mjs";import"viem";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"./Button-B8mqatRx.mjs";import"styled-components";import"./useActiveWallet-Bsy5GTCV.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-CIgFwA7s.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-D0lpBS44.mjs";import"./Screen-BTyXgDrd.mjs";import"./ModalHeader-BLGC-7ev.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"./index-CJMgUOnw.mjs";const u=({title:o,description:r,onClose:i})=>/*#__PURE__*/e(l,{title:o,subtitle:r,icon:t,iconVariant:"success",watermark:!0,onBack:i}),p={component:()=>{let{user:t}=r(),{closePrivyModal:l,isNewUserThisSession:p,updateWallets:d}=n(),{data:j,onUserCloseViaDialogOrKeybindRef:f}=i(),h=a(),{onSuccess:v,onFailure:C,callAuthOnSuccessOnClose:y}=j.createWallet,S=()=>{let e=s(t)??c(t);t&&e?(d(),v({user:t,account:e})):C(Error("Failed to create wallet")),l({shouldCallAuthOnSuccess:y})};return o((()=>{let e=setTimeout(S,m);return()=>clearTimeout(e)}),[]),f.current=S,/*#__PURE__*/e(u,{title:p?"Welcome"+(h?.name?` to ${h?.name}`:""):"All set!",description:p?"You've successfully created an account.":"Your account is secured.",onClose:S})}};export{p as EmbeddedWalletCreatedScreen,u as EmbeddedWalletCreatedScreenView,p as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import{useState as o,useEffect as i,useRef as n}from"react";import{styled as a}from"styled-components";import{constructURL as l}from"@privy-io/urls";import{W as d}from"./WarningBanner-BDp-QC9i.mjs";import{W as c}from"./WalletInfoCard-
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import{useState as o,useEffect as i,useRef as n}from"react";import{styled as a}from"styled-components";import{constructURL as l}from"@privy-io/urls";import{W as d}from"./WarningBanner-BDp-QC9i.mjs";import{W as c}from"./WalletInfoCard-YE5P6CSV.mjs";import{u as s}from"./context-Bycd1SKV.mjs";import{u as p}from"./internal-context-e-Eni5bG.mjs";import{u as m,a as u}from"./get-is-unified-wallet-DvKS5IUO.mjs";import{S as h}from"./ScreenLayout-CddsD3Of.mjs";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"lucide-react";import"./Button-B8mqatRx.mjs";import"./useActiveWallet-Bsy5GTCV.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-CIgFwA7s.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-D0lpBS44.mjs";import"./ErrorMessage-Cx8GKGhL.mjs";import"./LabelXs-BOisBtqT.mjs";import"./Address-BsvZLUXE.mjs";import"./shared-CtYf3O54.mjs";import"tinycolor2";import"ofetch";import"./Screen-BTyXgDrd.mjs";import"./ModalHeader-BLGC-7ev.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"./index-CJMgUOnw.mjs";const y=({address:o,accessToken:i,appConfigTheme:n,onClose:a,isLoading:l=!1,exportButtonProps:s})=>/*#__PURE__*/e(h,{title:"Export wallet",subtitle:/*#__PURE__*/t(r,{children:["Copy either your private key or seed phrase to export your wallet."," ",/*#__PURE__*/e("a",{href:"https://privy-io.notion.site/Transferring-your-account-9dab9e16c6034a7ab1ff7fa479b02828",target:"blank",rel:"noopener noreferrer",children:"Learn more"})]}),onClose:a,watermark:!0,children:/*#__PURE__*/t(f,{children:[/*#__PURE__*/e(d,{theme:n,children:"Never share your private key or seed phrase with anyone."}),/*#__PURE__*/e(c,{title:"Your wallet",address:o,showCopyButton:!0}),/*#__PURE__*/e("div",{style:{width:"100%"},children:l?/*#__PURE__*/e(g,{}):i&&s&&/*#__PURE__*/e(w,{accessToken:i,dimensions:{height:"44px"},...s})})]})});let f=/*#__PURE__*/a.div.withConfig({displayName:"ContentContainer",componentId:"sc-b9fde557-0"})(["display:flex;flex-direction:column;gap:1.25rem;text-align:left;"]),g=()=>/*#__PURE__*/e(v,{children:/*#__PURE__*/e(x,{children:"Loading..."})}),v=/*#__PURE__*/a.div.withConfig({displayName:"PlaceholderContainer",componentId:"sc-b9fde557-1"})(["display:flex;gap:12px;height:44px;"]),x=/*#__PURE__*/a.div.withConfig({displayName:"PlaceholderButton",componentId:"sc-b9fde557-2"})(["display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:16px;font-weight:500;border-radius:var(--privy-border-radius-md);background-color:var(--privy-color-background-2);color:var(--privy-color-foreground-3);"]);function w(r){let[a,d]=o(r.dimensions.width),[c,s]=o(void 0),p=n(null);i((()=>{if(p.current&&void 0===a){let{width:e}=p.current.getBoundingClientRect();d(e)}let e=getComputedStyle(document.documentElement);s({background:e.getPropertyValue("--privy-color-background"),background2:e.getPropertyValue("--privy-color-background-2"),foreground3:e.getPropertyValue("--privy-color-foreground-3"),foregroundAccent:e.getPropertyValue("--privy-color-foreground-accent"),accent:e.getPropertyValue("--privy-color-accent"),accentDark:e.getPropertyValue("--privy-color-accent-dark"),success:e.getPropertyValue("--privy-color-success"),colorScheme:e.getPropertyValue("color-scheme")})}),[]);let m="ethereum"===r.chainType&&!r.imported&&!r.isUnifiedWallet;/*#__PURE__*/return e("div",{ref:p,children:a&&
|
|
2
2
|
/*#__PURE__*/t(b,{children:[/*#__PURE__*/e("iframe",{style:{position:"absolute",zIndex:1},width:a,height:r.dimensions.height,allow:"clipboard-write self *",src:l({origin:r.origin,path:`/apps/${r.appId}/embedded-wallets/export`,query:r.isUnifiedWallet?{v:"1-unified",wallet_id:r.walletId,client_id:r.appClientId,width:`${a}px`,caid:r.clientAnalyticsId,phrase_export:m,...c}:{v:"1",entropy_id:r.entropyId,entropy_id_verifier:r.entropyIdVerifier,hd_wallet_index:r.hdWalletIndex,chain_type:r.chainType,client_id:r.appClientId,width:`${a}px`,caid:r.clientAnalyticsId,phrase_export:m,...c},hash:{token:r.accessToken}})}),/*#__PURE__*/e(C,{children:"Loading..."}),m&&/*#__PURE__*/e(C,{children:"Loading..."})]})})}const I={component:()=>{let[t,r]=o(null),{authenticated:n,user:a}=m(),{closePrivyModal:l,createAnalyticsEvent:d,clientAnalyticsId:c,client:h}=p(),f=s(),{data:g,onUserCloseViaDialogOrKeybindRef:v}=u(),{onFailure:x,onSuccess:w,origin:I,appId:b,appClientId:C,entropyId:k,entropyIdVerifier:j,walletId:_,hdWalletIndex:A,chainType:P,address:T,isUnifiedWallet:V,imported:W}=g.keyExport,B=e=>{l({shouldCallAuthOnSuccess:!1}),x("string"==typeof e?Error(e):e)},L=()=>{l({shouldCallAuthOnSuccess:!1}),w(),d({eventName:"embedded_wallet_key_export_completed",payload:{walletAddress:T}})};return i((()=>{if(!n)return B("User must be authenticated before exporting their wallet");h.getAccessToken().then(r).catch(B)}),[n,a]),v.current=L,/*#__PURE__*/e(y,{address:T,accessToken:t,appConfigTheme:f.appearance.palette.colorScheme,onClose:L,isLoading:!t,exportButtonProps:t?{origin:I,appId:b,appClientId:C,clientAnalyticsId:c,entropyId:k,entropyIdVerifier:j,walletId:_,hdWalletIndex:A,isUnifiedWallet:V,imported:W,chainType:P}:void 0})}};let b=/*#__PURE__*/a.div.withConfig({displayName:"ButtonContainer",componentId:"sc-b9fde557-3"})(["overflow:visible;position:relative;overflow:none;height:44px;display:flex;gap:12px;"]),C=/*#__PURE__*/a.div.withConfig({displayName:"LoadingButton",componentId:"sc-b9fde557-4"})(["display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:16px;font-weight:500;border-radius:var(--privy-border-radius-md);background-color:var(--privy-color-background-2);color:var(--privy-color-foreground-3);"]);export{I as EmbeddedWalletKeyExportScreen,y as EmbeddedWalletKeyExportView,I as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{XCircle as t}from"lucide-react";import{useState as r,useEffect as o}from"react";import{u as a}from"./context-
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{XCircle as t}from"lucide-react";import{useState as r,useEffect as o}from"react";import{u as a}from"./context-Bycd1SKV.mjs";import{s as i,k as s,E as l,R as n}from"./index-CCyaupaz.mjs";import{u as m,m as c}from"./internal-context-e-Eni5bG.mjs";import{u as d}from"./use-create-wallet-without-fallback-cSYr4rn8.mjs";import{a as u,u as p}from"./get-is-unified-wallet-DvKS5IUO.mjs";import{S as h}from"./ScreenLayout-CddsD3Of.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-Bsy5GTCV.mjs";import"zustand";import"styled-components";import"react-device-detect";import"./prepareFundingModalData-CIgFwA7s.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-D0lpBS44.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-BaiIHGte.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"ofetch";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./Button-B8mqatRx.mjs";import"./Screen-BTyXgDrd.mjs";import"./ModalHeader-BLGC-7ev.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"./index-CJMgUOnw.mjs";const w=({errorMessage:r,onClose:o})=>/*#__PURE__*/e(h,r?{title:"Something went wrong",subtitle:r,icon:t,iconVariant:"error",primaryCta:{label:"Close",onClick:o},watermark:!0}:{title:"Creating your wallet",subtitle:"Please wait...",iconVariant:"loading",watermark:!1}),y={component:()=>{let{setModalData:t,navigate:h,data:y,onUserCloseViaDialogOrKeybindRef:v}=u(),g=a(),[j,C]=r(""),{embeddedWallets:f}=a(),{authenticated:b,user:S}=p(),{closePrivyModal:x,walletProxy:W,client:O}=m(),{onSuccess:k,onFailure:A,callAuthOnSuccessOnClose:I,shouldCreateEth:M,shouldCreateSol:P}=y.createWallet,R="legacy-embedded-wallets-only"===g.embeddedWallets.mode&&!0===g?.embeddedWallets.requireUserOwnedRecoveryOnCreate,[U,E]=r(null),{create:L}=d(),T=M??(!!S&&i(S,g.embeddedWallets.ethereum.createOnLogin)),F=P??(!!S&&s(S,g.embeddedWallets.solana.createOnLogin)),D=new n((async()=>{let e=await O.getAccessToken();if(S&&e&&W)try{let e;if(T&&F)e=await L({chainType:"ethereum",walletIndex:0,latestUser:S}),e=await L({chainType:"solana",walletIndex:0,latestUser:e.user});else if(F)e=await L({chainType:"solana",walletIndex:0,latestUser:S});else{if(!T)return void x({shouldCallAuthOnSuccess:I});e=await L({chainType:"ethereum",walletIndex:0,latestUser:S})}E(e),h("EmbeddedWalletCreatedScreen")}catch(e){C(e.message)}}));return o((()=>b&&S?R?(t({...y,createWallet:{...y.createWallet,shouldCreateEth:T,shouldCreateSol:F},recoverySelection:{...y?.recoverySelection,isInAccountCreateFlow:!0,shouldCreateEth:T,shouldCreateSol:F}}),h(l({walletAction:"create",showAutomaticRecovery:!1,availableRecoveryMethods:f.userOwnedRecoveryOptions,legacySetWalletPasswordFlow:!1,isResettingPassword:!1}))):void D.execute():(h("LandingScreen"),void A(Error("User must be authenticated before creating a Privy wallet")))),[R,b]),v.current=()=>null/*#__PURE__*/,e(w,{errorMessage:j||void 0,onClose:()=>{U?(k(U),x({shouldCallAuthOnSuccess:I})):(A(new c("User wallet creation failed")),x({shouldCallAuthOnSuccess:!1}))}})}};export{y as EmbeddedWalletOnAccountCreateScreen,w as EmbeddedWalletOnAccountCreateView,y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{useState as o,useEffect as r}from"react";import{u as t,a as s,g as a}from"./get-is-unified-wallet-
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useState as o,useEffect as r}from"react";import{u as t,a as s,g as a}from"./get-is-unified-wallet-DvKS5IUO.mjs";import{u as i}from"./context-Bycd1SKV.mjs";import{u as n,o as d,m as c}from"./internal-context-e-Eni5bG.mjs";import{g as l}from"./useWallets-D0lpBS44.mjs";import{S as m,g as p}from"./SetWalletPasswordForm-DvgKP4Ez.mjs";import"viem";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"./Layouts-Bmf8DxNP.mjs";import"styled-components";import"./ModalHeader-BLGC-7ev.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-rucIJmk0.mjs";import"@heroicons/react/24/outline/ArrowPathIcon";import"@heroicons/react/24/outline/EyeIcon";import"@heroicons/react/24/outline/EyeSlashIcon";import"./Button-B8mqatRx.mjs";import"./useActiveWallet-Bsy5GTCV.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-CIgFwA7s.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./Checkbox-NmGCZeKL.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-Biz1wq02.mjs";const u={component:()=>{let[u,w]=o(null),[y,h]=o(!1),[v,g]=o(null),[f,M]=o(""),{authenticated:_,user:A}=t(),{client:I,walletProxy:j,refreshSessionAndUser:b,closePrivyModal:C,createAnalyticsEvent:R}=n(),{navigate:P,data:x,onUserCloseViaDialogOrKeybindRef:S}=s(),E=i(),{onSuccess:k,onFailure:D}=x.setWalletPassword,N=a(A),O="user-passcode"===u?.recoveryMethod,L="user-passcode"===N?.recoveryMethod;r((()=>{_||(P("LandingScreen"),D(new d("User must be authenticated before setting a password on a Privy wallet")))}),[_]);let T=()=>v?(D(v),void C({shouldCallAuthOnSuccess:!1})):O?(k(u),void C({shouldCallAuthOnSuccess:!1})):(D(new c("Exited before password was added to wallet")),void C({shouldCallAuthOnSuccess:!1}));S.current=T;/*#__PURE__*/return e(m,{appName:E?.name||"privy",config:{initiatedBy:"user",onCancel:T},error:v?"An error has occurred, please try again.":void 0,buttonLoading:y,buttonHideAnimations:!1,password:f,isResettingPassword:L,onPasswordGenerate:()=>M(p()),onPasswordChange:M,onSubmit:async()=>{O?(k(u),C({shouldCallAuthOnSuccess:!1})):(h(!0),g(null),await(async()=>{let e=await I.getAccessToken();if(e&&A&&N?.address&&f&&j)try{R({eventName:"embedded_wallet_set_recovery_started",payload:{walletAddress:N.address,existingRecoveryMethod:N.recoveryMethod,targetRecoveryMethod:"user-passcode",isResettingPassword:L}});let{entropyId:o,entropyIdVerifier:r}=l(A);if(!(await j.setRecovery({accessToken:e,entropyId:o,entropyIdVerifier:r,recoveryPassword:f,recoveryMethod:"user-passcode"})).entropyId)return g(new c("Error setting password on privy wallet")),void R({eventName:"embedded_wallet_set_recovery_failed",payload:{walletAddress:N.address,existingRecoveryMethod:N.recoveryMethod,targetRecoveryMethod:"user-passcode",isResettingPassword:L,reason:"error setting password"}});let t=await b(),s=a(t);if(!s)return g(new c("Error setting password on privy wallet")),void R({eventName:"embedded_wallet_set_recovery_failed",payload:{walletAddress:N.address,existingRecoveryMethod:N.recoveryMethod,targetRecoveryMethod:"user-passcode",isResettingPassword:L,reason:"wallet disconnected"}});w(s),R({eventName:"embedded_wallet_set_recovery_completed",payload:{walletAddress:N.address,existingRecoveryMethod:N.recoveryMethod,targetRecoveryMethod:"user-passcode",isResettingPassword:L}})}catch(e){console.warn(e),g(e instanceof Error?e:Error("Error setting password on privy wallet")),R({eventName:"embedded_wallet_set_password_failed",payload:{walletAddress:N.address,reason:e}})}})(),h(!1))},onClose:T})}};export{u as EmbeddedWalletPasswordUpdateScreen,u as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as o,Fragment as t}from"react/jsx-runtime";import{Lock as r}from"lucide-react";import{u as i,m as s}from"./internal-context-e-Eni5bG.mjs";import{a}from"./get-is-unified-wallet-
|
|
1
|
+
import{jsx as e,jsxs as o,Fragment as t}from"react/jsx-runtime";import{Lock as r}from"lucide-react";import{u as i,m as s}from"./internal-context-e-Eni5bG.mjs";import{a}from"./get-is-unified-wallet-DvKS5IUO.mjs";import{S as n}from"./ScreenLayout-CddsD3Of.mjs";import"ofetch";import"react";import"viem";import"./context-Bycd1SKV.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./Button-B8mqatRx.mjs";import"styled-components";import"./useActiveWallet-Bsy5GTCV.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-CIgFwA7s.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-D0lpBS44.mjs";import"./Screen-BTyXgDrd.mjs";import"./ModalHeader-BLGC-7ev.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"./index-CJMgUOnw.mjs";const m=({onClose:i,onProceed:s})=>/*#__PURE__*/e(n,{title:"Secure Your Account",subtitle:/*#__PURE__*/o(t,{children:["Please set a password to secure your account.",/*#__PURE__*/e("br",{}),"Losing access to this password and this device will make your account inaccessible."]}),icon:r,primaryCta:{label:"Add password",onClick:s},onClose:i,watermark:!0}),c={component:()=>{let{closePrivyModal:o}=i(),{data:t,navigate:r,onUserCloseViaDialogOrKeybindRef:n}=a(),{onFailure:c}=t.setWalletPassword,l=()=>{c(new s("Exited before password was added to wallet")),o({shouldCallAuthOnSuccess:!1})};return n.current=l,/*#__PURE__*/e(m,{onClose:l,onProceed:()=>{r("EmbeddedWalletPasswordUpdateScreen")}})}};export{c as EmbeddedWalletPasswordUpdateSplashScreen,m as EmbeddedWalletPasswordUpdateSplashView,c as default};
|