@privy-io/react-auth 3.11.1-beta-20260122161812 → 3.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/AccountNotFoundScreen-BBWWze9O.js +1 -0
- package/dist/cjs/{Address-BJFF-dMG.js → Address-6qDWL5TN.js} +4 -4
- package/dist/cjs/AffirmativeConsentScreen-CCwAwjH1.js +6 -0
- package/dist/cjs/AllowlistRejectionScreen-DEMYbzGA.js +1 -0
- package/dist/cjs/AuthenticateWithWalletScreen-dBvBC7MB.js +1 -0
- package/dist/cjs/AwaitingEvmToSolBridgingScreen-D9NwI47L.js +2 -0
- package/dist/cjs/AwaitingExternalEthereumTransferScreen-D_0NulpI.js +2 -0
- package/dist/cjs/AwaitingPasswordlessCodeScreen-B4HAKL4-.js +103 -0
- package/dist/cjs/AwaitingSolToEvmBridgingScreen-CnuLLTC0.js +2 -0
- package/dist/cjs/{BridgeNetworkSelectionView-BNv-V9G2.js → BridgeNetworkSelectionView-DKA06V8u.js} +11 -11
- package/dist/cjs/CaptchaScreen-N-ueJQF3.js +1 -0
- package/dist/cjs/CoinbaseOnrampStatusScreen-06yaO6r4.js +16 -0
- package/dist/cjs/ConnectEmailForm-DZrCSv9t.js +3 -0
- package/dist/cjs/ConnectLedgerScreen-C7vGQocf.js +9 -0
- package/dist/cjs/ConnectOnlyLandingScreen-_9y9kOsT.js +1 -0
- package/dist/cjs/ConnectOnlyStatusScreen-mZHx4a7S.js +1 -0
- package/dist/cjs/ConnectOrCreateScreen-Cp4uExOd.js +1 -0
- package/dist/cjs/{ConnectPhoneForm-C8JEoPHB.js → ConnectPhoneForm-BWSmRonl.js} +1 -1
- package/dist/cjs/{ConnectWalletView-bug4GgVZ.js → ConnectWalletView-Bh1DK9t5.js} +6 -6
- package/dist/cjs/ConnectionStatusScreen-B27DUsGt.js +7 -0
- package/dist/cjs/CrossAppAuthScreen-BbLFbCdU.js +1 -0
- package/dist/cjs/CustomLandingScreenView-DP1fJrBU.js +23 -0
- package/dist/cjs/DelegatedActionsConsentScreen-DzWruJOn.js +1 -0
- package/dist/cjs/DelegatedActionsRevokeScreen-D-TwUXyj.js +1 -0
- package/dist/cjs/EmbeddedWalletConnectingScreen-CYav4Mjb.js +1 -0
- package/dist/cjs/EmbeddedWalletCreatedScreen-m0t_c_AA.js +1 -0
- package/dist/cjs/EmbeddedWalletKeyExportScreen-_4GMdJuo.js +40 -0
- package/dist/cjs/EmbeddedWalletOnAccountCreateScreen-B5-JBZRJ.js +1 -0
- package/dist/cjs/EmbeddedWalletPasswordUpdateScreen-CITAy3i6.js +1 -0
- package/dist/cjs/EmbeddedWalletPasswordUpdateSplashScreen-DG5LKyjo.js +1 -0
- package/dist/cjs/{EnrollTotp-BpzRLjKc.js → EnrollTotp-leOB_B4o.js} +8 -8
- package/dist/cjs/ErrorScreen-xNDIVXx8.js +4 -0
- package/dist/cjs/{FarcasterConnectStatusScreen-DuOFuio7.js → FarcasterConnectStatusScreen-Bzmd4izn.js} +9 -9
- package/dist/cjs/FarcasterSignerStatusScreen-Cxoi54pp.js +29 -0
- package/dist/cjs/FundSolWalletWithExternalSolanaWallet-BCyBv_xe.js +2 -0
- package/dist/cjs/{FundWalletMethodHeader-Dn7FrcOp.js → FundWalletMethodHeader-YwNCXAU_.js} +1 -1
- package/dist/cjs/FundingEditAmountScreen-CDlb4Acx.js +1 -0
- package/dist/cjs/FundingMethodSelectionScreen-DlPxjsJq.js +1 -0
- package/dist/cjs/InAppBrowserLoginNotPossible-Bdx0vKyA.js +1 -0
- package/dist/cjs/InstallWalletScreen-Cshn01eK.js +1 -0
- package/dist/cjs/LandingScreen-0FdwpJ9w.js +1 -0
- package/dist/cjs/{LinkConflictScreen-8h7pmzsL.js → LinkConflictScreen-BCzS7Szr.js} +7 -7
- package/dist/cjs/LinkEmailScreen-B7rxdQso.js +1 -0
- package/dist/cjs/{LinkPasskeyScreen-cUu7WCqn.js → LinkPasskeyScreen-o4qdrAL3.js} +10 -10
- package/dist/cjs/LinkPhoneScreen-DweFqlM1.js +1 -0
- package/dist/cjs/LoginFailedScreen-mHcvCBEz.js +1 -0
- package/dist/cjs/ManualTransferScreen-CfYgtyLD.js +1 -0
- package/dist/cjs/MfaAuthEnrollmentFlowScreen-D631h0XW.js +1 -0
- package/dist/cjs/MfaAuthVerifyFlowScreen-BZ3IyqAd.js +1 -0
- package/dist/cjs/MfaEnrollmentFlowScreen-_tNeX5lT.js +1 -0
- package/dist/cjs/MfaVerifyFlowScreen-D_7nkuBq.js +1 -0
- package/dist/cjs/{ModalHeader-7knkCFjH.js → ModalHeader-C5O9gNUP.js} +1 -1
- package/dist/cjs/{MoonpayStatusScreen-BWA_sZnz.js → MoonpayStatusScreen-DoFbZ_0d.js} +3 -3
- package/dist/cjs/OAuthStatusScreen-BZY7BiP5.js +1 -0
- package/dist/cjs/PasskeySelectSignupOrLogin-C3k_ixTz.js +1 -0
- package/dist/cjs/PasskeyStatusScreen-BX-SOBDr.js +3 -0
- package/dist/cjs/PasswordRecoveryScreen-VZQDtt5v.js +20 -0
- package/dist/cjs/{QrCode-DPcePk5I.js → QrCode-CLd3Ytk7.js} +3 -3
- package/dist/cjs/RecoveryOAuthStatusScreen-DKYx6ECd.js +1 -0
- package/dist/cjs/RecoveryPasswordCreateScreen-DP0xOBMA.js +1 -0
- package/dist/cjs/RecoverySelectionScreen-Bw9_M6y0.js +7 -0
- package/dist/cjs/{Screen-uapp8UP4.js → Screen-BSwlHqPg.js} +4 -4
- package/dist/cjs/{ScreenLayout-BENEZm1m.js → ScreenLayout-BtVIYAso.js} +1 -1
- package/dist/cjs/SetAutomaticRecoveryScreen-SUOUjBk4.js +14 -0
- package/dist/cjs/{SetWalletPasswordForm-NMSn8MW-.js → SetWalletPasswordForm-Gkq-DskE.js} +3 -3
- package/dist/cjs/SignRequestScreen-BNcy6yU_.js +26 -0
- package/dist/cjs/{StandardSignAndSendTransactionScreen-C0Af9uPz.js → StandardSignAndSendTransactionScreen-z_EUNaeD.js} +3 -3
- package/dist/cjs/TelegramAuthScreen-DV8KYJMX.js +1 -0
- package/dist/cjs/{TransactionDetails-BCQvuSov.js → TransactionDetails-DYow9ihU.js} +4 -4
- package/dist/cjs/{TransactionErrorView-DhdW4Ka8.js → TransactionErrorView-yUMJqqF2.js} +4 -4
- package/dist/cjs/TransferFromWalletScreen-Duk7CEcq.js +31 -0
- package/dist/cjs/TransferOrBridgeLoadingScreen-DuBLyfE1.js +6 -0
- package/dist/cjs/UpdateEmailScreen-DRJv5CZs.js +1 -0
- package/dist/cjs/UpdatePhoneScreen-C3myqOv0.js +1 -0
- package/dist/cjs/UserLimitReachedScreen-l_e6Vhr0.js +1 -0
- package/dist/cjs/{WalletInfoCard-DLnujds6.js → WalletInfoCard-CHEynRZS.js} +4 -4
- package/dist/cjs/{WalletInterstitialScreen-CMMSgAk9.js → WalletInterstitialScreen-BgoDwKIp.js} +1 -1
- package/dist/cjs/WalletLink-CZLtiI7E.js +22 -0
- package/dist/cjs/WalletOverflowButton-FlgoA77a.js +1 -0
- package/dist/cjs/abstract-smart-wallets.js +1 -1
- package/dist/cjs/{context-P14IM76D.js → context-BeSQM-Ma.js} +1 -1
- package/dist/cjs/ethers-XrYC9HG-.js +1 -0
- package/dist/cjs/extended-chains.js +1 -1
- package/dist/cjs/farcaster.js +1 -1
- package/dist/cjs/frame-Oz7volks.js +1 -0
- package/dist/cjs/{get-is-unified-wallet-DL_nMXp5.js → get-is-unified-wallet-BwdzQwn_.js} +1 -1
- package/dist/cjs/getErc20Balance-CN3JMVjF.js +1 -0
- package/dist/cjs/getErc20TokenInfo-DxDd_HN6.js +1 -0
- package/dist/cjs/getPublicClient-BsmZyCGX.js +1 -0
- package/dist/cjs/index-0-2WrPDo.js +12 -0
- package/dist/cjs/index-CzmnSRoa.js +174 -0
- package/dist/cjs/{index-BypMyGGH.js → index-W2ZSukRW.js} +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/{internal-context-NWsAL807.js → internal-context-BJv4f_bO.js} +1 -1
- package/dist/cjs/internal.js +1 -1
- package/dist/cjs/prepareFundingModalData-DDf6xLze.js +1 -0
- package/dist/cjs/{reservoir-CQGyEBb7.js → reservoir-Bx0HQwbb.js} +1 -1
- package/dist/cjs/{shared-CoZLntA9.js → shared-BcueHfN-.js} +6 -6
- package/dist/cjs/shouldProceedtoEmbeddedWalletCreationFlow-j6p9PEm-.js +1 -0
- package/dist/cjs/smart-wallets-BBh3vgRq.js +1 -0
- package/dist/cjs/smart-wallets.js +1 -1
- package/dist/cjs/solana.js +1 -1
- package/dist/cjs/{styles-DtykMHfN.js → styles-Csarwypj.js} +1 -1
- package/dist/cjs/to-ui-error-C4aac_aM.js +4 -0
- package/dist/cjs/ui.js +37 -37
- package/dist/cjs/use-export-wallet-C9HWu0Dq.js +1 -0
- package/dist/cjs/{use-sign-with-user-signer-BcAsQTGF.js → use-sign-with-user-signer-Cu_6Bx7m.js} +1 -1
- package/dist/cjs/useActiveWallet-vlXeDPzp.js +185 -0
- package/dist/cjs/{useGetSolPrice-C986iVoO.js → useGetSolPrice-Ca32VAbF.js} +1 -1
- package/dist/cjs/{useGetTokenPrice-cA2TnAzD.js → useGetTokenPrice-DJpJnTij.js} +1 -1
- package/dist/cjs/{useI18n-D4jKEXmt.js → useI18n-CnsBjm9v.js} +1 -1
- package/dist/cjs/usePrivy-Bx2PKTrU.js +1 -0
- package/dist/cjs/{useSolanaRpcClient-hHdPoMRE.js → useSolanaRpcClient-CYMWkK7E.js} +1 -1
- package/dist/cjs/useWalletBalance-DI8AY31i.js +1 -0
- package/dist/cjs/useWallets-BwB7ALB8.js +1 -0
- package/dist/cjs/useWallets-DMyuB5aJ.js +1 -0
- package/dist/dts/{events-context-vKnpI7Js.d.mts → events-context-DeukTtar.d.mts} +1 -1
- package/dist/dts/{events-context-vKnpI7Js.d.ts → events-context-DeukTtar.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 +40 -4
- package/dist/dts/index.d.ts +40 -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-DAzgcrBH.d.mts → types-FifkyCQc.d.mts} +2 -1
- package/dist/dts/{types-DAzgcrBH.d.ts → types-FifkyCQc.d.ts} +2 -1
- package/dist/dts/ui.d.mts +1 -1
- package/dist/dts/ui.d.ts +1 -1
- package/dist/esm/AccountNotFoundScreen-C6S8_GyN.mjs +1 -0
- package/dist/esm/Address-QmAVCQtO.mjs +17 -0
- package/dist/esm/AffirmativeConsentScreen-QfJBfI_f.mjs +6 -0
- package/dist/esm/AllowlistRejectionScreen-CX57yv4U.mjs +1 -0
- package/dist/esm/AuthenticateWithWalletScreen-CZJ-aWhZ.mjs +1 -0
- package/dist/esm/AwaitingEvmToSolBridgingScreen-C1CMtT4Y.mjs +2 -0
- package/dist/esm/AwaitingExternalEthereumTransferScreen-DX91STcF.mjs +2 -0
- package/dist/esm/AwaitingPasswordlessCodeScreen-BuExr50N.mjs +103 -0
- package/dist/esm/AwaitingSolToEvmBridgingScreen-Bm1i_2qW.mjs +2 -0
- package/dist/esm/BridgeNetworkSelectionView-DQGcampg.mjs +69 -0
- package/dist/esm/CaptchaScreen-B-hFDb5f.mjs +1 -0
- package/dist/esm/CoinbaseOnrampStatusScreen-OHm2RUBv.mjs +16 -0
- package/dist/esm/ConnectEmailForm-Df5OtmDR.mjs +3 -0
- package/dist/esm/ConnectLedgerScreen-BHLYW-F3.mjs +9 -0
- package/dist/esm/ConnectOnlyLandingScreen-C6nzEwpN.mjs +1 -0
- package/dist/esm/ConnectOnlyStatusScreen-CremlXDY.mjs +1 -0
- package/dist/esm/ConnectOrCreateScreen-262UvCdD.mjs +1 -0
- package/dist/esm/{ConnectPhoneForm-C1eL0VZH.mjs → ConnectPhoneForm-BMtTIItD.mjs} +1 -1
- package/dist/esm/{ConnectWalletView-BtuPwm-c.mjs → ConnectWalletView-BMjEKo1_.mjs} +6 -6
- package/dist/esm/ConnectionStatusScreen-mk5beBL7.mjs +7 -0
- package/dist/esm/CrossAppAuthScreen-BXjEJQv6.mjs +1 -0
- package/dist/esm/CustomLandingScreenView-BlDfJaDr.mjs +23 -0
- package/dist/esm/DelegatedActionsConsentScreen-ANmQe-9G.mjs +1 -0
- package/dist/esm/DelegatedActionsRevokeScreen-D9X7mWmI.mjs +1 -0
- package/dist/esm/EmbeddedWalletConnectingScreen-2g-RrIvW.mjs +1 -0
- package/dist/esm/EmbeddedWalletCreatedScreen-BXTAv4_-.mjs +1 -0
- package/dist/esm/EmbeddedWalletKeyExportScreen-DYVHVHOj.mjs +40 -0
- package/dist/esm/EmbeddedWalletOnAccountCreateScreen-CYyMoMFF.mjs +1 -0
- package/dist/esm/EmbeddedWalletPasswordUpdateScreen-oT5ZcPQV.mjs +1 -0
- package/dist/esm/EmbeddedWalletPasswordUpdateSplashScreen-BQcHDyuV.mjs +1 -0
- package/dist/esm/{EnrollTotp-Bk2mWeF6.mjs → EnrollTotp-DVLg14UT.mjs} +8 -8
- package/dist/esm/ErrorScreen-CLfeO5pd.mjs +4 -0
- package/dist/esm/{FarcasterConnectStatusScreen-CHItJej_.mjs → FarcasterConnectStatusScreen-CUO9DKCJ.mjs} +7 -7
- package/dist/esm/FarcasterSignerStatusScreen-B135UOnV.mjs +28 -0
- package/dist/esm/FundSolWalletWithExternalSolanaWallet-DO3ttgom.mjs +1 -0
- package/dist/esm/{FundWalletMethodHeader-B3nAPYAR.mjs → FundWalletMethodHeader-PIxwFzzh.mjs} +1 -1
- package/dist/esm/FundingEditAmountScreen-BRQb2ffL.mjs +1 -0
- package/dist/esm/FundingMethodSelectionScreen-DTt1Z5RI.mjs +1 -0
- package/dist/esm/InAppBrowserLoginNotPossible-DH96QD2c.mjs +1 -0
- package/dist/esm/InstallWalletScreen-PnK6VfrP.mjs +1 -0
- package/dist/esm/LandingScreen-D_EvjOHf.mjs +1 -0
- package/dist/esm/{LinkConflictScreen-DmFrdpwb.mjs → LinkConflictScreen-B94e_-2N.mjs} +7 -7
- package/dist/esm/LinkEmailScreen-CT8gAQr3.mjs +1 -0
- package/dist/esm/LinkPasskeyScreen-DYfWSjKR.mjs +105 -0
- package/dist/esm/LinkPhoneScreen-ccrKA6tf.mjs +1 -0
- package/dist/esm/LoginFailedScreen-BwgxhbMf.mjs +1 -0
- package/dist/esm/ManualTransferScreen-DgCG2P3B.mjs +1 -0
- package/dist/esm/MfaAuthEnrollmentFlowScreen-CNVUTOnE.mjs +1 -0
- package/dist/esm/MfaAuthVerifyFlowScreen-2nvvFipu.mjs +1 -0
- package/dist/esm/MfaEnrollmentFlowScreen-DfnIqNNU.mjs +1 -0
- package/dist/esm/MfaVerifyFlowScreen-BwerwBz5.mjs +1 -0
- package/dist/esm/{ModalHeader-cnW8OaHH.mjs → ModalHeader-rCMpqA2a.mjs} +4 -4
- package/dist/esm/MoonpayStatusScreen-D5fRCEb3.mjs +16 -0
- package/dist/esm/OAuthStatusScreen-DtLgYw89.mjs +1 -0
- package/dist/esm/PasskeySelectSignupOrLogin-QoPhmagh.mjs +1 -0
- package/dist/esm/PasskeyStatusScreen-DzjU3ZVT.mjs +3 -0
- package/dist/esm/PasswordRecoveryScreen-LZYGRBkP.mjs +20 -0
- package/dist/esm/{QrCode-BVe4kf2z.mjs → QrCode-DjnQgnaZ.mjs} +3 -3
- package/dist/esm/RecoveryOAuthStatusScreen-DKfp8Udh.mjs +1 -0
- package/dist/esm/RecoveryPasswordCreateScreen-D4DI5Bom.mjs +1 -0
- package/dist/esm/RecoverySelectionScreen-B2V3518x.mjs +7 -0
- package/dist/esm/{Screen-DgjLPjok.mjs → Screen-CV2tt2Ap.mjs} +11 -11
- package/dist/esm/{ScreenLayout-x3-Xgy2E.mjs → ScreenLayout-DF3DCKOK.mjs} +1 -1
- package/dist/esm/SetAutomaticRecoveryScreen-C6cFVbSx.mjs +14 -0
- package/dist/esm/{SetWalletPasswordForm-Deqef3mc.mjs → SetWalletPasswordForm-ChA4tW4Y.mjs} +4 -4
- package/dist/esm/SignRequestScreen-BslfKJ1N.mjs +26 -0
- package/dist/esm/{StandardSignAndSendTransactionScreen-BGAjDFes.mjs → StandardSignAndSendTransactionScreen-D4OBsj5k.mjs} +3 -3
- package/dist/esm/TelegramAuthScreen-BJq5f_Rq.mjs +1 -0
- package/dist/esm/{TransactionDetails-8R96szrm.mjs → TransactionDetails-BP142O9n.mjs} +4 -4
- package/dist/esm/TransactionErrorView-BwwGMqSj.mjs +166 -0
- package/dist/esm/TransferFromWalletScreen-BHH0YcI4.mjs +31 -0
- package/dist/esm/TransferOrBridgeLoadingScreen-VLQTcf_6.mjs +6 -0
- package/dist/esm/UpdateEmailScreen-CMFBvYz5.mjs +1 -0
- package/dist/esm/UpdatePhoneScreen-DmhHcNq3.mjs +1 -0
- package/dist/esm/UserLimitReachedScreen-DNqgCf3B.mjs +1 -0
- package/dist/esm/{WalletInfoCard-CR6-S95l.mjs → WalletInfoCard-ChBHG5L5.mjs} +3 -3
- package/dist/esm/WalletInterstitialScreen-RS89fm6t.mjs +1 -0
- package/dist/esm/WalletLink-CN4enmsE.mjs +22 -0
- package/dist/esm/WalletOverflowButton-B-nEN4GW.mjs +1 -0
- package/dist/esm/abstract-smart-wallets.mjs +1 -1
- package/dist/esm/context-LVpDfP2H.mjs +1 -0
- package/dist/esm/ethers-BQ45eiVv.mjs +1 -0
- package/dist/esm/extended-chains.mjs +1 -1
- package/dist/esm/farcaster.mjs +1 -1
- package/dist/esm/{frame-cjQkGswH.mjs → frame-uzTmvtww.mjs} +1 -1
- package/dist/esm/get-is-unified-wallet-CNcx75Dp.mjs +1 -0
- package/dist/esm/getErc20Balance-DA4dGV9O.mjs +1 -0
- package/dist/esm/getErc20TokenInfo-CxatSwzi.mjs +1 -0
- package/dist/esm/getPublicClient-B4uPLKn-.mjs +1 -0
- package/dist/esm/{index-0TRQs0PD.mjs → index-2knYP69D.mjs} +3 -3
- package/dist/esm/index-DNz_w3-G.mjs +174 -0
- package/dist/esm/{index-Cp1MRWbr.mjs → index-DoasOxbi.mjs} +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/{internal-context-D4S2Sfvt.mjs → internal-context-Z-fyxadS.mjs} +1 -1
- package/dist/esm/internal.mjs +1 -1
- package/dist/esm/{paths-BzM95ysC.mjs → paths-3HW55qZg.mjs} +1 -1
- package/dist/esm/prepareFundingModalData-DjTxAoJ1.mjs +1 -0
- package/dist/esm/reservoir-0wfhnc0j.mjs +1 -0
- package/dist/esm/{shared-C0CllI3K.mjs → shared-DwO5pr5t.mjs} +1 -1
- package/dist/esm/shouldProceedtoEmbeddedWalletCreationFlow-Cv_C9s3_.mjs +1 -0
- package/dist/esm/smart-wallets-9LKzbfWj.mjs +1 -0
- package/dist/esm/smart-wallets.mjs +1 -1
- package/dist/esm/solana.mjs +1 -1
- package/dist/esm/{styles-Fji1ReGu.mjs → styles-BNn7MnP1.mjs} +1 -1
- package/dist/esm/to-ui-error-CCqAdorW.mjs +4 -0
- package/dist/esm/ui.mjs +37 -37
- package/dist/esm/use-export-wallet-DllHf-2F.mjs +1 -0
- package/dist/esm/{use-sign-with-user-signer--95w9BaG.mjs → use-sign-with-user-signer-Do5Oi_rb.mjs} +1 -1
- package/dist/esm/useActiveWallet-RZ4w-uGq.mjs +185 -0
- package/dist/esm/{useGetSolPrice-usp7QcwI.mjs → useGetSolPrice-DwwjjGbd.mjs} +1 -1
- package/dist/esm/{useGetTokenPrice-DgKSvh6T.mjs → useGetTokenPrice-DERdsrmf.mjs} +1 -1
- package/dist/esm/{useI18n-DleS41MU.mjs → useI18n-Dk9y58cU.mjs} +1 -1
- package/dist/esm/usePrivy-Dj52a5sp.mjs +1 -0
- package/dist/esm/useSolanaRpcClient-B7UDPdLi.mjs +1 -0
- package/dist/esm/useWalletBalance-CRXiZUj2.mjs +1 -0
- package/dist/esm/useWallets-DlGuNtGR.mjs +1 -0
- package/dist/esm/useWallets-cSQYA-Jk.mjs +1 -0
- package/package.json +6 -6
- package/dist/cjs/AccountNotFoundScreen-Clo67iWH.js +0 -1
- package/dist/cjs/AffirmativeConsentScreen-2FGovWDj.js +0 -6
- package/dist/cjs/AllowlistRejectionScreen-BLcPF2_b.js +0 -1
- package/dist/cjs/AuthenticateWithWalletScreen-ByOwd0gq.js +0 -1
- package/dist/cjs/AwaitingEvmToSolBridgingScreen-D_dh3tgw.js +0 -2
- package/dist/cjs/AwaitingExternalEthereumTransferScreen-CB4SnTRS.js +0 -2
- package/dist/cjs/AwaitingPasswordlessCodeScreen-D43lCvaw.js +0 -103
- package/dist/cjs/AwaitingSolToEvmBridgingScreen-ppOL2XCp.js +0 -2
- package/dist/cjs/CaptchaScreen-oTaZlLej.js +0 -1
- package/dist/cjs/CoinbaseOnrampStatusScreen-CO97CoDr.js +0 -16
- package/dist/cjs/ConnectEmailForm-DAA-nxD6.js +0 -3
- package/dist/cjs/ConnectLedgerScreen-3SrqHJBl.js +0 -9
- package/dist/cjs/ConnectOnlyLandingScreen-DkR-VnS2.js +0 -1
- package/dist/cjs/ConnectOnlyStatusScreen-Cafk-5gS.js +0 -1
- package/dist/cjs/ConnectOrCreateScreen-DttF-fCs.js +0 -1
- package/dist/cjs/ConnectionStatusScreen-BfU_d8ZK.js +0 -7
- package/dist/cjs/CrossAppAuthScreen-Bs_x-Isw.js +0 -1
- package/dist/cjs/CustomLandingScreenView-B93ZDqp2.js +0 -23
- package/dist/cjs/DelegatedActionsConsentScreen-Cx5lj2BJ.js +0 -1
- package/dist/cjs/DelegatedActionsRevokeScreen-BEucV6g6.js +0 -1
- package/dist/cjs/EmbeddedWalletConnectingScreen-BjZ_7QsX.js +0 -1
- package/dist/cjs/EmbeddedWalletCreatedScreen-CbmJzZZL.js +0 -1
- package/dist/cjs/EmbeddedWalletKeyExportScreen-CdMuowdD.js +0 -40
- package/dist/cjs/EmbeddedWalletOnAccountCreateScreen-C_EBP_oR.js +0 -1
- package/dist/cjs/EmbeddedWalletPasswordUpdateScreen-DQhHO_tI.js +0 -1
- package/dist/cjs/EmbeddedWalletPasswordUpdateSplashScreen-C1dTDHuI.js +0 -1
- package/dist/cjs/ErrorScreen-CPDISQKp.js +0 -4
- package/dist/cjs/FarcasterSignerStatusScreen-BYnokloK.js +0 -29
- package/dist/cjs/FundSolWalletWithExternalSolanaWallet-D-pMJTgQ.js +0 -2
- package/dist/cjs/FundingEditAmountScreen-CGYBcgzY.js +0 -1
- package/dist/cjs/FundingMethodSelectionScreen-32rXIiuR.js +0 -1
- package/dist/cjs/InAppBrowserLoginNotPossible-Wz6tWwN4.js +0 -1
- package/dist/cjs/InstallWalletScreen-C6na1HMV.js +0 -1
- package/dist/cjs/LandingScreen-GYoGjPT7.js +0 -1
- package/dist/cjs/LinkEmailScreen-Bz6DBn1S.js +0 -1
- package/dist/cjs/LinkPhoneScreen-BFB7atSV.js +0 -1
- package/dist/cjs/LoginFailedScreen-C3X4o4W8.js +0 -1
- package/dist/cjs/ManualTransferScreen-Bx5GRcIk.js +0 -1
- package/dist/cjs/MfaAuthEnrollmentFlowScreen-D8DE5e8S.js +0 -1
- package/dist/cjs/MfaAuthVerifyFlowScreen-BeJSdbHB.js +0 -1
- package/dist/cjs/MfaEnrollmentFlowScreen-0X-6htEq.js +0 -1
- package/dist/cjs/MfaVerifyFlowScreen-BgdY97r7.js +0 -1
- package/dist/cjs/OAuthStatusScreen-DZbrwgcX.js +0 -1
- package/dist/cjs/PasskeySelectSignupOrLogin-DWW-VE2d.js +0 -1
- package/dist/cjs/PasskeyStatusScreen-DiieGaFn.js +0 -3
- package/dist/cjs/PasswordRecoveryScreen-OhRzyQhB.js +0 -20
- package/dist/cjs/RecoveryOAuthStatusScreen-DPPwIU7C.js +0 -1
- package/dist/cjs/RecoveryPasswordCreateScreen-Bg-E6CB6.js +0 -1
- package/dist/cjs/RecoverySelectionScreen-CauE_byN.js +0 -7
- package/dist/cjs/SetAutomaticRecoveryScreen-59UByZZC.js +0 -14
- package/dist/cjs/SignRequestScreen-CYQvIjLY.js +0 -26
- package/dist/cjs/TelegramAuthScreen-DxghStcs.js +0 -1
- package/dist/cjs/TransferFromWalletScreen-DSMlo8kv.js +0 -31
- package/dist/cjs/TransferOrBridgeLoadingScreen-D9t_WQ5r.js +0 -6
- package/dist/cjs/UpdateEmailScreen-CrTIJ16u.js +0 -1
- package/dist/cjs/UpdatePhoneScreen-DQzmlkOL.js +0 -1
- package/dist/cjs/UserLimitReachedScreen-BQxNahAD.js +0 -1
- package/dist/cjs/WalletLink-Bg4We2eg.js +0 -22
- package/dist/cjs/WalletOverflowButton-aYewWDKS.js +0 -1
- package/dist/cjs/ethers-BlKEtatO.js +0 -1
- package/dist/cjs/frame-BmNfc9mp.js +0 -1
- package/dist/cjs/getErc20Balance-CP3UfGGz.js +0 -1
- package/dist/cjs/getErc20TokenInfo-CVfH_czS.js +0 -1
- package/dist/cjs/index-LczlN1Dt.js +0 -12
- package/dist/cjs/private-privy-provider-hH9v0z7o.js +0 -358
- package/dist/cjs/shouldProceedtoEmbeddedWalletCreationFlow-Cp0BucAr.js +0 -1
- package/dist/cjs/smart-wallets-DUl8PaqV.js +0 -1
- package/dist/cjs/state-DMsGOICm.js +0 -1
- package/dist/cjs/stripUrlOAuthParamsAndRemoveStateCode-2iUOCDfo.js +0 -1
- package/dist/cjs/to-ui-error-caFMQ6I1.js +0 -4
- package/dist/cjs/use-create-wallet-without-fallback-CrxEFfhb.js +0 -1
- package/dist/cjs/use-export-wallet-DeI8q3KQ.js +0 -1
- package/dist/cjs/useActiveWallet-BySNV0ev.js +0 -1
- package/dist/cjs/useLogout-zT9OSxoO.js +0 -1
- package/dist/cjs/useMfa-KC6CWm9H.js +0 -1
- package/dist/cjs/useMfaEnrollment-DA9sTwf_.js +0 -1
- package/dist/cjs/useWalletBalance-8waYUAmD.js +0 -1
- package/dist/cjs/useWallets-2ejSMVGq.js +0 -1
- package/dist/esm/AccountNotFoundScreen-Cn6aKFIC.mjs +0 -1
- package/dist/esm/Address-CDF4d_Ha.mjs +0 -17
- package/dist/esm/AffirmativeConsentScreen-DwMHTAWp.mjs +0 -6
- package/dist/esm/AllowlistRejectionScreen-CtVeBy5G.mjs +0 -1
- package/dist/esm/AuthenticateWithWalletScreen-CqqsqfqZ.mjs +0 -1
- package/dist/esm/AwaitingEvmToSolBridgingScreen-CLkDS6o-.mjs +0 -2
- package/dist/esm/AwaitingExternalEthereumTransferScreen-Is2FdGJS.mjs +0 -2
- package/dist/esm/AwaitingPasswordlessCodeScreen-CAwXjOBS.mjs +0 -103
- package/dist/esm/AwaitingSolToEvmBridgingScreen-BDhpWAv1.mjs +0 -2
- package/dist/esm/BridgeNetworkSelectionView-C5xaiL3n.mjs +0 -69
- package/dist/esm/CaptchaScreen-CZCosLCJ.mjs +0 -1
- package/dist/esm/CoinbaseOnrampStatusScreen-DxbYHDRy.mjs +0 -16
- package/dist/esm/ConnectEmailForm-c2xnQzqc.mjs +0 -3
- package/dist/esm/ConnectLedgerScreen-CmspFZG8.mjs +0 -9
- package/dist/esm/ConnectOnlyLandingScreen-JXhxU6Je.mjs +0 -1
- package/dist/esm/ConnectOnlyStatusScreen-CZO6dxUB.mjs +0 -1
- package/dist/esm/ConnectOrCreateScreen-DHwSpwLa.mjs +0 -1
- package/dist/esm/ConnectionStatusScreen-d8tOwFAz.mjs +0 -7
- package/dist/esm/CrossAppAuthScreen-CNvQYKBN.mjs +0 -1
- package/dist/esm/CustomLandingScreenView-82pnUZOi.mjs +0 -23
- package/dist/esm/DelegatedActionsConsentScreen-D2cB2Jqt.mjs +0 -1
- package/dist/esm/DelegatedActionsRevokeScreen-DIdnDrIo.mjs +0 -1
- package/dist/esm/EmbeddedWalletConnectingScreen-DNDkMjZg.mjs +0 -1
- package/dist/esm/EmbeddedWalletCreatedScreen-6rmCkBPR.mjs +0 -1
- package/dist/esm/EmbeddedWalletKeyExportScreen-CrrImf0B.mjs +0 -40
- package/dist/esm/EmbeddedWalletOnAccountCreateScreen-MTCypdEY.mjs +0 -1
- package/dist/esm/EmbeddedWalletPasswordUpdateScreen-o-ONaPrc.mjs +0 -1
- package/dist/esm/EmbeddedWalletPasswordUpdateSplashScreen-BpRZwJZg.mjs +0 -1
- package/dist/esm/ErrorScreen-C891Rurl.mjs +0 -4
- package/dist/esm/FarcasterSignerStatusScreen-P3NEju7D.mjs +0 -28
- package/dist/esm/FundSolWalletWithExternalSolanaWallet-CGZdr_3E.mjs +0 -1
- package/dist/esm/FundingEditAmountScreen-B0MYigL_.mjs +0 -1
- package/dist/esm/FundingMethodSelectionScreen-CNJYvozR.mjs +0 -1
- package/dist/esm/InAppBrowserLoginNotPossible-CVyW-cIh.mjs +0 -1
- package/dist/esm/InstallWalletScreen-Bfo00Txs.mjs +0 -1
- package/dist/esm/LandingScreen-tAGl1tss.mjs +0 -1
- package/dist/esm/LinkEmailScreen-C_G_4bbm.mjs +0 -1
- package/dist/esm/LinkPasskeyScreen-DhD51WvM.mjs +0 -105
- package/dist/esm/LinkPhoneScreen-Bi5gcAMm.mjs +0 -1
- package/dist/esm/LoginFailedScreen-DbAdNYji.mjs +0 -1
- package/dist/esm/ManualTransferScreen-CR2QvdVh.mjs +0 -1
- package/dist/esm/MfaAuthEnrollmentFlowScreen-BEotfobF.mjs +0 -1
- package/dist/esm/MfaAuthVerifyFlowScreen-Cygjr5sH.mjs +0 -1
- package/dist/esm/MfaEnrollmentFlowScreen-jupYBcsQ.mjs +0 -1
- package/dist/esm/MfaVerifyFlowScreen-B8ONcY5T.mjs +0 -1
- package/dist/esm/MoonpayStatusScreen-BjmXS-jc.mjs +0 -16
- package/dist/esm/OAuthStatusScreen-YcgvWTtC.mjs +0 -1
- package/dist/esm/PasskeySelectSignupOrLogin-Db4EFSYE.mjs +0 -1
- package/dist/esm/PasskeyStatusScreen-CR-3RNXX.mjs +0 -3
- package/dist/esm/PasswordRecoveryScreen-BnD1OdcX.mjs +0 -20
- package/dist/esm/RecoveryOAuthStatusScreen-DhLx5fOQ.mjs +0 -1
- package/dist/esm/RecoveryPasswordCreateScreen-BHOh-fE-.mjs +0 -1
- package/dist/esm/RecoverySelectionScreen-1seYQLsM.mjs +0 -7
- package/dist/esm/SetAutomaticRecoveryScreen-CZLgLNlt.mjs +0 -14
- package/dist/esm/SignRequestScreen-EwmYkZZk.mjs +0 -26
- package/dist/esm/TelegramAuthScreen-BMWr2M6a.mjs +0 -1
- package/dist/esm/TransactionErrorView-CcY_O062.mjs +0 -166
- package/dist/esm/TransferFromWalletScreen-BTsyTZMc.mjs +0 -31
- package/dist/esm/TransferOrBridgeLoadingScreen-DZ1diPi7.mjs +0 -6
- package/dist/esm/UpdateEmailScreen-DyXsKvGA.mjs +0 -1
- package/dist/esm/UpdatePhoneScreen-erzZ8qOI.mjs +0 -1
- package/dist/esm/UserLimitReachedScreen-CfiHSh4t.mjs +0 -1
- package/dist/esm/WalletInterstitialScreen-DCg6fl5S.mjs +0 -1
- package/dist/esm/WalletLink-CTp4jR2d.mjs +0 -22
- package/dist/esm/WalletOverflowButton-i2nGLvV0.mjs +0 -1
- package/dist/esm/context-i_OKSUqt.mjs +0 -1
- package/dist/esm/ethers-Cr0T35kS.mjs +0 -1
- package/dist/esm/get-is-unified-wallet-Bon2jknh.mjs +0 -1
- package/dist/esm/getErc20Balance-BDNkB-EL.mjs +0 -1
- package/dist/esm/getErc20TokenInfo-79BQbhYn.mjs +0 -1
- package/dist/esm/private-privy-provider-B2_rZ8aq.mjs +0 -358
- package/dist/esm/reservoir-DNdkSA7R.mjs +0 -1
- package/dist/esm/shouldProceedtoEmbeddedWalletCreationFlow-CDHNJbN9.mjs +0 -1
- package/dist/esm/smart-wallets-BNt96zAq.mjs +0 -1
- package/dist/esm/state-BG13el3v.mjs +0 -1
- package/dist/esm/stripUrlOAuthParamsAndRemoveStateCode-9jsyCRfN.mjs +0 -1
- package/dist/esm/to-ui-error-C46oK5ox.mjs +0 -4
- package/dist/esm/use-create-wallet-without-fallback-CY32SGw2.mjs +0 -1
- package/dist/esm/use-export-wallet-CWry8VMl.mjs +0 -1
- package/dist/esm/useActiveWallet-D-T43q8N.mjs +0 -1
- package/dist/esm/useLogout-CHtNPDaK.mjs +0 -1
- package/dist/esm/useMfa-D20h0FBp.mjs +0 -1
- package/dist/esm/useMfaEnrollment-BOyHpB2c.mjs +0 -1
- package/dist/esm/useSolanaRpcClient-O9yIYVIZ.mjs +0 -1
- package/dist/esm/useWalletBalance-CMO_I7jz.mjs +0 -1
- package/dist/esm/useWallets-B3ZcS4km.mjs +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("./private-privy-provider-hH9v0z7o.js");exports.shouldProceedtoEmbeddedWalletCreationFlow=(r,t)=>e.shouldCreateEmbeddedEthWallet(r,t.ethereum.createOnLogin)||e.shouldCreateEmbeddedSolWallet(r,t.solana.createOnLogin);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("react"),t=require("viem"),r=require("./get-is-unified-wallet-DL_nMXp5.js"),n=require("./context-P14IM76D.js"),a=require("./internal-context-NWsAL807.js"),i=require("./private-privy-provider-hH9v0z7o.js"),s=require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),o=require("permissionless"),l=require("permissionless/accounts"),c=require("permissionless/clients/pimlico"),d=require("viem/account-abstraction"),u=require("@privy-io/js-sdk-core");let p={address:d.entryPoint06Address,version:"0.6"},y={address:d.entryPoint07Address,version:"0.7"},m=({owner:e,smartWalletType:t,smartWalletVersion:r,publicClient:n})=>{switch(t){case u.SAFE:return l.toSafeSmartAccount({client:n,entryPoint:y,owners:[e],version:"1.4.1"});case u.KERNEL:return l.toKernelSmartAccount({client:n,version:"0.3.1",entryPoint:y,useMetaFactory:"optional",owners:[e]});case u.BICONOMY:return l.toBiconomySmartAccount({client:n,owners:[e],entryPoint:p});case u.LIGHT_ACCOUNT:return l.toLightSmartAccount({client:n,entryPoint:p,owner:e,version:"1.1.0"});case u.COINBASE_SMART_WALLET:return async function({client:e,owner:t,version:r}){let[n]=await t.request({method:"eth_accounts"});if(!n)throw Error("Unable to request embedded owner for eth_accounts");return await d.toCoinbaseSmartAccount({client:e,owners:[{type:"local",source:"privy",address:n,sign:async({hash:e})=>await t.request({method:"secp256k1_sign",params:[e]})}],version:r})}({client:n,owner:e,version:r??"1"});case u.THIRDWEB:return l.toThirdwebSmartAccount({client:n,entryPoint:y,owner:e});default:throw Error(`Invalid smart account type: ${t}.`)}};const g=({calls:e,chain:t,maxPriorityFeePerGas:r,maxFeePerGas:n,nonce:a})=>e.map((e=>({to:e.to||void 0,data:e.data,value:e.value,chainId:t.id,nonce:a,maxFeePerGas:n,maxPriorityFeePerGas:r}))),h=async({chain:e,paymasterContext:r,account:n,signer:s,user:l,smartWalletsConfig:d,rpcConfig:u,privyAppId:p})=>{if(!(d?.enabled&&l&&n&&s))return;let y=d?.configuredNetworks.find((t=>t.chainId===`eip155:${e.id}`));if(!y)throw new a.PrivyClientError(`The chain ${e.name} (eip155:${e.id}) must be configured in the smart wallet configuration in your dashboard`);let g=l.smartWallet?l.smartWallet.smartWalletType:d.smartWalletType,h=l.smartWallet?l.smartWallet.smartWalletVersion:d.smartWalletVersion,P=i.getJsonRpcEndpointFromChain(e,u,p),f=t.createPublicClient({chain:e,transport:t.http(P)}),w=r??y.paymasterContext,I=await(async({owner:e,smartWalletType:r,smartWalletVersion:n,chain:a,publicClient:i,bundlerUrl:s,paymasterUrl:l,paymasterContext:d})=>{let u=await m({owner:e,smartWalletType:r,publicClient:i,smartWalletVersion:n}),p=c.createPimlicoClient({transport:t.http(s),entryPoint:u.entryPoint}),y=l?c.createPimlicoClient({transport:t.http(l),entryPoint:u.entryPoint}):void 0;return o.createSmartAccountClient({account:u,chain:a,paymaster:y,paymasterContext:d,bundlerTransport:t.http(s),userOperation:{estimateFeesPerGas:async()=>{if(["public.pimlico.io","api.pimlico.io"].some((e=>s.includes(e))))return await p.getUserOperationGasPrice().then((e=>e.fast));if(["rpc.zerodev.app"].some((e=>s.includes(e))))return(await p.request({method:"zd_getUserOperationGasPrice",params:[]})).fast;if(["g.alchemy.com"].some((e=>s.includes(e)))){let[e,t]=await Promise.all([i.getBlock({blockTag:"latest"}),p.request({method:"rundler_maxPriorityFeePerGas",params:[]})]);if(!e.baseFeePerGas||!t)throw Error("Failed to get block or maxPriorityFeePerGasEstimate");return{maxFeePerGas:150n*e.baseFeePerGas/100n+BigInt(t.toString()),maxPriorityFeePerGas:BigInt(t.toString())}}{let e=await i.estimateFeesPerGas(),t=s.includes("api.developer.coinbase.com")?175n:150n;return{...e,maxFeePerGas:e.maxFeePerGas*t/100n,maxPriorityFeePerGas:e.maxPriorityFeePerGas*t/100n}}}}})})({owner:s,smartWalletType:g,smartWalletVersion:h,chain:e,publicClient:f,paymasterContext:w,...y});if(!I)throw new a.PrivyClientError(`Failed to create smart wallet client for chain ${e.name} (eip155:${e.id})`);return I};exports.callsToTransactionRequests=g,exports.getSmartWalletClient=h,exports.useSmartWalletsUIWrapper=()=>{let{hideWalletUIs:e,openPrivyModal:t,isHeadlessSigning:n}=a.usePrivyInternal(),{setModalData:s}=r.usePrivyModal(),{user:o}=r.usePrivyContext(),l=r.getPrivyEthereumWallet(o),c=!!l&&r.getIsUnifiedWallet(l);return{wrapSmartAccountClientWithUIs:r=>({...r,sendTransaction:async(a,d)=>{if(n({showWalletUIs:d?.uiOptions?.showWalletUIs}))return e.current=!0,await r.sendTransaction(a).finally((()=>e.current=!1));let u=[];"calls"in a&&void 0!==a.calls?u=[...a.calls]:"to"in a&&(u=[{to:a.to,value:a.value||BigInt(0),data:a.data||"0x"}]);let p=async()=>{if(!r.paymaster)return!1;let{paymasterData:e,paymasterAndData:t}=await r.prepareUserOperation({calls:u,maxFeePerGas:a.maxFeePerGas,maxPriorityFeePerGas:a.maxPriorityFeePerGas,nonce:a.nonce?BigInt(a.nonce):void 0});return Number(t??e??0)>0};return new Promise((async(n,y)=>{e.current=!0;let{entropyId:m,entropyIdVerifier:h}=i.getEntropyDetailsForUser(o);s({connectWallet:{recoveryMethod:l.recoveryMethod,connectingWalletAddress:l.address,isUnifiedWallet:c,entropyId:m,entropyIdVerifier:h,onCompleteNavigateTo:"SendTransactionScreen",onFailure:()=>{}},sendTransaction:{transactionRequests:g({calls:u,chain:r.chain,maxPriorityFeePerGas:a.maxPriorityFeePerGas,maxFeePerGas:a.maxFeePerGas,nonce:a.nonce?BigInt(a.nonce):void 0}),transactingWalletIndex:0,transactingWalletAddress:r.account.address,entropyId:m,entropyIdVerifier:h,getIsSponsored:p,signOnly:!1,onConfirm:()=>r.sendTransaction(a),onSuccess:e=>n(e.hash),onFailure:y,uiOptions:d?.uiOptions??{}}}),t("EmbeddedWalletConnectingScreen")})).finally((()=>{e.current=!1}))},signMessage:async(a,d)=>n({showWalletUIs:d?.uiOptions?.showWalletUIs})?(e.current=!0,await r.signMessage(a).finally((()=>e.current=!1))):new Promise((async(n,u)=>{let{entropyId:p,entropyIdVerifier:y}=i.getEntropyDetailsForUser(o);e.current=!0,s({connectWallet:{recoveryMethod:l.recoveryMethod,connectingWalletAddress:l.address,isUnifiedWallet:c,entropyId:p,entropyIdVerifier:y,onCompleteNavigateTo:"SignRequestScreen",onFailure:()=>{}},signMessage:{method:"personal_sign",data:"string"==typeof a.message?a.message:a.message.raw.toString(),confirmAndSign:()=>r.signMessage(a),onSuccess:e=>n(e),onFailure:u,uiOptions:d?.uiOptions??{}}}),t("EmbeddedWalletConnectingScreen")})).finally((()=>{e.current=!1})),signTypedData:async(a,d)=>n({showWalletUIs:d?.uiOptions?.showWalletUIs})?(e.current=!0,await r.signTypedData(a).finally((()=>e.current=!1))):new Promise((async(n,u)=>{e.current=!0;let{entropyId:p,entropyIdVerifier:y}=i.getEntropyDetailsForUser(o);s({connectWallet:{recoveryMethod:l.recoveryMethod,connectingWalletAddress:l.address,isUnifiedWallet:c,entropyId:p,entropyIdVerifier:y,onCompleteNavigateTo:"SignRequestScreen",onFailure:()=>{}},signMessage:{method:"eth_signTypedData_v4",data:a,confirmAndSign:()=>r.signTypedData(a),onSuccess:e=>n(e),onFailure:u,uiOptions:d?.uiOptions??{}}}),t("EmbeddedWalletConnectingScreen")})).finally((()=>{e.current=!1}))})}},exports.useSmartWalletsWrapper=({clientConfig:t,smartWalletsConfig:o})=>{let{hideWalletUIs:l,openPrivyModal:c,appId:d,isHeadlessSigning:u}=a.usePrivyInternal(),p=n.useAppConfig(),{setModalData:y}=r.usePrivyModal(),{user:m}=r.usePrivyContext(),{chains:P}=n.useAppConfig(),{chainId:f,clients:w,setChainId:I,chainIdState:W}=(()=>{let t=e.useRef(),[r,n]=e.useState();return{clients:e.useRef({}),setChainId:e=>{t.current=e,n(e)},chainId:t,chainIdState:r}})(),v=P.find((e=>e.id===W)),{wallets:C}=i.useWallets(),S=r.getPrivyEthereumWallet(m),F=s.getEmbeddedConnectedWalletWithAddress(C,S?.address),x=!!S&&r.getIsUnifiedWallet(S),T=e.useCallback((async()=>f.current),[f]),U=e.useCallback((async({id:e})=>{if(!w.current[e]){let r=await h({chain:P.find((t=>t.id===e)),account:S,signer:await(F?.getEthereumProvider()),user:m,paymasterContext:t?.paymasterContext,smartWalletsConfig:o,rpcConfig:p.rpcConfig,privyAppId:d});r&&(w.current[e]=r)}I(e)}),[P,t,C,m,o]);return{wrapSmartAccountClient:e=>{w.current[e.chain.id]=e,W||I(e.chain.id);return{...e,sendTransaction:async(e,t)=>{let r=w.current[f.current];if(!r)throw new a.PrivyClientError(`Smart wallet client for chain (eip155:${f.current}) not found`);if(delete e.account,u({showWalletUIs:t?.uiOptions?.showWalletUIs}))return l.current=!0,await r.sendTransaction(e).finally((()=>l.current=!1));let n=[];"calls"in e&&void 0!==e.calls?n=[...e.calls]:"to"in e&&(n=[{to:e.to,value:e.value||BigInt(0),data:e.data||"0x"}]);let s=async()=>{let{paymasterAndData:t,paymasterData:a,maxFeePerGas:i,maxPriorityFeePerGas:s}=await r.prepareUserOperation({calls:n,maxFeePerGas:e.maxFeePerGas,maxPriorityFeePerGas:e.maxPriorityFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0});return 0===Number(i)&&0===Number(s)||Number(t??a??0)>0};return new Promise((async(a,o)=>{l.current=!0;let{entropyId:d,entropyIdVerifier:u}=i.getEntropyDetailsForUser(m);y({connectWallet:{recoveryMethod:S.recoveryMethod,connectingWalletAddress:S.address,isUnifiedWallet:x,entropyId:d,entropyIdVerifier:u,onCompleteNavigateTo:"SendTransactionScreen",onFailure:()=>{}},sendTransaction:{transactionRequests:g({calls:n,chain:r.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),transactingWalletIndex:0,transactingWalletAddress:r.account.address,entropyId:d,entropyIdVerifier:u,getIsSponsored:s,signOnly:!1,onConfirm:()=>r.sendTransaction(e),onSuccess:e=>a(e.hash),onFailure:o,uiOptions:t?.uiOptions??{}}}),c("EmbeddedWalletConnectingScreen")})).finally((()=>{l.current=!1}))},signMessage:async(e,t)=>{let r=w.current[f.current];if(!r)throw new a.PrivyClientError(`Smart wallet client for chain (eip155:${f.current}) not found`);return u({showWalletUIs:t?.uiOptions?.showWalletUIs})?(l.current=!0,await r.signMessage(e).finally((()=>l.current=!1))):new Promise((async(n,a)=>{let{entropyId:s,entropyIdVerifier:o}=i.getEntropyDetailsForUser(m);l.current=!0,y({connectWallet:{recoveryMethod:S.recoveryMethod,connectingWalletAddress:S.address,isUnifiedWallet:x,entropyId:s,entropyIdVerifier:o,onCompleteNavigateTo:"SignRequestScreen",onFailure:()=>{}},signMessage:{method:"personal_sign",data:"string"==typeof e.message?e.message:e.message.raw.toString(),confirmAndSign:()=>r.signMessage(e),onSuccess:e=>n(e),onFailure:a,uiOptions:t?.uiOptions??{}}}),c("EmbeddedWalletConnectingScreen")})).finally((()=>{l.current=!1}))},signTypedData:async(e,t)=>{let r=w.current[f.current];if(!r)throw new a.PrivyClientError(`Smart wallet client for chain (eip155:${f.current}) not found`);return delete e.account,u({showWalletUIs:t?.uiOptions?.showWalletUIs})?(l.current=!0,await r.signTypedData(e).finally((()=>l.current=!1))):new Promise((async(n,a)=>{l.current=!0;let{entropyId:s,entropyIdVerifier:o}=i.getEntropyDetailsForUser(m);y({connectWallet:{recoveryMethod:S.recoveryMethod,connectingWalletAddress:S.address,isUnifiedWallet:x,entropyId:s,entropyIdVerifier:o,onCompleteNavigateTo:"SignRequestScreen",onFailure:()=>{}},signMessage:{method:"eth_signTypedData_v4",data:e,confirmAndSign:()=>r.signTypedData(e),onSuccess:e=>n(e),onFailure:a,uiOptions:t?.uiOptions??{}}}),c("EmbeddedWalletConnectingScreen")})).finally((()=>{l.current=!1}))},getChainId:T,chain:v,switchChain:U}}}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("zustand"),t=require("./private-privy-provider-hH9v0z7o.js");const s=e.create((()=>({isModalOpen:!1,resolvers:null})));let l=e.create((()=>({})));const a=e=>`privy:${e}:active-wallet-connection`;exports.close=()=>{let e=s.getState().resolvers;e||console.warn("useActiveWalletStore: Called close while modal was not open"),s.setState({isModalOpen:!1}),e?.resolve({wallet:s.getState().wallet})},exports.open=async()=>{let e,t,a=new Promise(((s,l)=>{e=s,t=l}));return l.setState({}),s.setState({isModalOpen:!0,resolvers:{resolve:e,reject:t}}),await a},exports.setActiveWallet=({address:e,client:l,appId:r})=>{let o=`${l}:${e}`;r&&t.u.put(a(r),o),s.setState({wallet:o})},exports.toActiveWalletKey=a,exports.updateBalance=(e,t,s)=>{l.setState((l=>({[e]:{...l[e],[t]:s}})))},exports.useActiveWalletStore=s,exports.useBalance=(e,t)=>l((s=>s[e]?.[t])),exports.useIsModalOpen=()=>s((e=>e.isModalOpen));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("./context-P14IM76D.js"),r=require("./private-privy-provider-hH9v0z7o.js");exports.stripUrlOAuthParamsAndRemoveStateCode=function(){let t=new URL(window.location.href);t.searchParams.delete("privy_oauth_code"),t.searchParams.delete("privy_oauth_provider"),t.searchParams.delete("privy_oauth_state"),r.u.del(e.STATE_CODE_KEY),window.history.replaceState({},"",t)};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/outline/DevicePhoneMobileIcon"),n=require("@heroicons/react/24/outline/FingerPrintIcon"),t=require("@heroicons/react/24/outline/PhoneIcon"),o=require("@heroicons/react/24/outline/ShieldCheckIcon"),i=require("./ModalHeader-7knkCFjH.js"),s=require("./ScreenLayout-BENEZm1m.js"),a=require("./private-privy-provider-hH9v0z7o.js"),c=require("./PinInput-B12fA7pp.js"),l=require("@heroicons/react/24/outline/CalendarIcon"),d=require("@heroicons/react/24/outline/ExclamationTriangleIcon"),h=require("./StackedContainer-CM36po_U.js"),u=require("./internal-context-NWsAL807.js"),x=require("react"),j=require("styled-components"),m=require("viem"),p=require("./useGetTokenPrice-cA2TnAzD.js"),g=require("./TransactionDetails-BCQvuSov.js"),y=require("./context-P14IM76D.js");function f(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var C=/*#__PURE__*/f(r),I=/*#__PURE__*/f(n),k=/*#__PURE__*/f(t),T=/*#__PURE__*/f(o),M=/*#__PURE__*/f(l),S=/*#__PURE__*/f(d);const P=({pendingTransaction:r})=>{let{wallets:n}=a.useWallets(),{walletProxy:t,rpcConfig:o,chains:i,appId:s,nativeTokenSymbolForChainId:c}=u.usePrivyInternal(),[l,d]=x.useState(null),[h,j]=x.useState(r),{tokenPrice:y}=p.useGetTokenPrice(h.chainId),f=c(r.chainId)||"ETH",C=x.useMemo((()=>n.find((e=>"privy"===e.walletClientType))),[n]);return x.useEffect((()=>{(async function(){if(!t||!C)return h;let e=a.getPublicClient(h.chainId,i,o,{appId:s}),r=await a.prepareTransactionRequest(h,e,C.address);return d(m.toHex(BigInt(r.gas??0))),r})().then(j).catch(console.error)}),[t]),C?/*#__PURE__*/e.jsx(v,{children:/*#__PURE__*/e.jsx(g.TransactionDetails,{from:C.address,to:h.to,txn:h,gas:l??void 0,tokenPrice:y,tokenSymbol:f})}):null};let v=j.styled.div`
|
|
2
|
-
width: 100%;
|
|
3
|
-
padding: 1rem 0;
|
|
4
|
-
`;exports.VerifyMethodSelectionScreen=({handleClose:r,user:n,onSelect:t})=>/*#__PURE__*/e.jsxs(s.ScreenLayout,{title:"Verify your identity",subtitle:"Choose a verification method",icon:T.default,iconVariant:"subtle",onClose:r,showClose:!0,watermark:!0,children:[/*#__PURE__*/e.jsxs(c.MethodList,{children:[n.mfaMethods.includes("totp")&&/*#__PURE__*/e.jsxs(a.LoginMethodButton,{onClick:()=>t("totp"),children:[/*#__PURE__*/e.jsx(a.LoginMethodIconWrapper,{children:/*#__PURE__*/e.jsx(C.default,{})}),"Authenticator app"]},"totp"),n.mfaMethods.includes("sms")&&/*#__PURE__*/e.jsxs(a.LoginMethodButton,{onClick:()=>t("sms"),children:[/*#__PURE__*/e.jsx(a.LoginMethodIconWrapper,{children:/*#__PURE__*/e.jsx(k.default,{})}),"SMS"]},"sms"),n.mfaMethods.includes("passkey")&&/*#__PURE__*/e.jsxs(a.LoginMethodButton,{onClick:()=>t("passkey"),children:[/*#__PURE__*/e.jsx(a.LoginMethodIconWrapper,{children:/*#__PURE__*/e.jsx(I.default,{})}),"Passkey"]},"passkey")]}),/*#__PURE__*/e.jsx(i.ModalFooter,{})]}),exports.VerifyWithPasskey=({hasBlockingError:r,error:n,onClose:t,onBack:o,handleSubmit:s,account:l,submitSuccess:d})=>{let{pendingTransaction:x}=u.usePrivyInternal();/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(i.ModalHeader,{onClose:t},"header"),/*#__PURE__*/e.jsx(h.e,{children:/*#__PURE__*/e.jsxs("div",{children:[/*#__PURE__*/e.jsx(a.ConnectionLoader,{success:d,fail:!!n}),n?/*#__PURE__*/e.jsx(S.default,{style:{width:"38px",height:"38px"}}):/*#__PURE__*/e.jsx(c.FaceId,{style:{width:"38px",height:"38px"}})]})}),/*#__PURE__*/e.jsx(c.Title,{style:{marginTop:"1rem"},children:"Verifying with passkey"}),/*#__PURE__*/e.jsxs(c.List,{children:[/*#__PURE__*/e.jsxs(c.ListItem,{children:[/*#__PURE__*/e.jsx(c.ListItemIcon,{children:/*#__PURE__*/e.jsx(T.default,{})}),"Approve this action using your touch, face, PIN, or hardware key."]}),/*#__PURE__*/e.jsxs(c.ListItem,{children:[/*#__PURE__*/e.jsx(c.ListItemIcon,{children:/*#__PURE__*/e.jsx(M.default,{})}),"You last added a passkey on"," ",l?.firstVerifiedAt?.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"}),"."]})]}),x&&/*#__PURE__*/e.jsx(c.Container,{children:/*#__PURE__*/e.jsx(P,{pendingTransaction:x})}),n&&/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(c.ErrorMessage,{style:{marginTop:"1.25rem"},children:n.message}),/*#__PURE__*/e.jsx(i.PrimaryButton,{disabled:r,onClick:s,style:{margin:"1.25rem auto 0"},children:"Try again"})]}),o&&/*#__PURE__*/e.jsx(c.PrimaryTextButton,{style:{marginTop:"1rem"},onClick:o,children:"Choose another method"}),/*#__PURE__*/e.jsx(i.ModalFooter,{})]})},exports.VerifyWithSmsOrTotpCode=({selectedMethod:r,submitSuccess:n,hasBlockingError:t,onClose:o,onBack:s,handleSubmitCode:a})=>{let l=y.useAppConfig(),{pendingTransaction:d}=u.usePrivyInternal();switch(r){case"sms":/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(i.ModalHeader,{onClose:o},"header"),/*#__PURE__*/e.jsx(c.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(k.default,{})}),/*#__PURE__*/e.jsx(c.Title,{children:"Enter verification code"}),/*#__PURE__*/e.jsxs(c.Container,{children:[/*#__PURE__*/e.jsx(c.NumericPinInput,{success:n,disabled:t,onChange:a}),/*#__PURE__*/e.jsxs(c.SubTitle,{children:["To continue, please enter the 6-digit code sent to your ",/*#__PURE__*/e.jsx("strong",{children:"mobile device"})]}),d&&/*#__PURE__*/e.jsx(P,{pendingTransaction:d})]}),s&&/*#__PURE__*/e.jsx(c.PrimaryTextButton,{theme:l?.appearance.palette.colorScheme,onClick:s,children:"Choose another method"}),/*#__PURE__*/e.jsx(i.SecondaryButton,{onClick:o,children:"Cancel"}),/*#__PURE__*/e.jsx(i.ModalFooter,{})]});case"totp":/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(i.ModalHeader,{onClose:o},"header"),/*#__PURE__*/e.jsx(c.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(C.default,{})}),/*#__PURE__*/e.jsx(c.Title,{children:"Enter verification code"}),/*#__PURE__*/e.jsxs(c.Container,{children:[/*#__PURE__*/e.jsx(c.NumericPinInput,{success:n,disabled:t,onChange:a}),/*#__PURE__*/e.jsxs(c.SubTitle,{children:["To continue, please enter the 6-digit code generated from your"," ",/*#__PURE__*/e.jsx("strong",{children:"authenticator app"})]}),d&&/*#__PURE__*/e.jsx(P,{pendingTransaction:d})]}),s&&/*#__PURE__*/e.jsx(c.PrimaryTextButton,{theme:l?.appearance.palette.colorScheme,onClick:s,children:"Choose another method"}),/*#__PURE__*/e.jsx(i.SecondaryButton,{onClick:o,children:"Cancel"}),/*#__PURE__*/e.jsx(i.ModalFooter,{})]});default:return null}},exports.toUIError=e=>a.errorIndicatesMaxMfaRetries(e)?{isBlocking:!0,error:Error("You have exceeded the maximum number of attempts. Please close this window and try again in 10 seconds.")}:a.errorIndicatesMfaVerificationFailed(e)?{isBlocking:!1,error:Error("The code you entered is not valid")}:a.errorIndicatesMfaTimeout(e)?{isBlocking:!0,error:Error("You have exceeded the time limit for code entry. Please try again in 30 seconds.")}:(console.error(e),{isBlocking:!1,error:Error("Something went wrong.")});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("./private-privy-provider-hH9v0z7o.js"),r=require("./context-P14IM76D.js"),t=require("./internal-context-NWsAL807.js");exports.useCreateWalletWithoutFallback=()=>{let{walletProxy:s,recoverEmbeddedWallet:a,setUser:o,refreshSessionAndUser:c,privy:n,client:i}=t.usePrivyInternal(),l=r.useAppConfig();return{create:async({walletIndex:r,chainType:t,latestUser:d,recoveryMethod:v,recoveryPassword:y,recoveryAccessToken:p})=>{let u=d;u||(u=await c());let w=await i.getAccessToken();if(!u||!w||!s)throw Error("User must be authenticated before creating a Privy wallet");return await e.createWalletAtIndex({appConfig:l,user:u,refreshSessionAndUser:c,privy:n,accessToken:w,proxy:s,recoverEmbeddedWallet:a,setUser:o,walletIndex:r,chainType:t,recoveryMethod:v,recoveryPassword:y,recoveryAccessToken:p})}}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("./context-P14IM76D.js"),t=require("./events-context-Di6--rDg.js"),n=require("./internal-context-NWsAL807.js"),r=require("./get-is-unified-wallet-DL_nMXp5.js"),a=require("./private-privy-provider-hH9v0z7o.js"),i=require("react");exports.useExportWallet=function(){let{user:t,getAccessToken:o}=r.usePrivyContext(),{walletProxy:l,openModal:d,client:s}=n.usePrivyInternal(),{setModalData:u}=r.usePrivyModal(),c=e.useAppConfig();return i.useMemo((()=>({exportWallet:e=>new Promise((async(i,p)=>{if(!t)return void p(new n.PrivyClientError("User must be authenticated before exporting their Privy wallet"));let y=e?.address?r.getPrivyWalletWithAddress(t,e.address):r.getPrivySolanaWallet(t);if(!y)return void p(new n.PrivyClientError("User must have an embedded wallet."));if(!a.isFirstClassChainWallet(y))return void p(Error(`Export is not supported for ${y.chainType} wallets`));let v=r.getIsUnifiedWallet(y),{entropyId:f,entropyIdVerifier:g}=a.getEntropyDetailsForUser(t,y);await o()?l?(u({connectWallet:{recoveryMethod:y.recoveryMethod,connectingWalletAddress:y.address,isUnifiedWallet:v,entropyId:f,entropyIdVerifier:g,onCompleteNavigateTo:"EmbeddedWalletKeyExportScreen",onFailure:p,shouldForceMFA:!0},keyExport:{appId:c.id,appClientId:c.appClientId,origin:s.apiUrl,address:y.address,entropyId:f,entropyIdVerifier:g,hdWalletIndex:y.walletIndex,chainType:y.chainType,walletId:y.id,isUnifiedWallet:v,imported:y.imported,onSuccess:i,onFailure:p}}),d("EmbeddedWalletConnectingScreen")):p(new n.PrivyClientError("Wallet not ready for export")):p(new n.PrivyClientError("Must have valid access token."))}))})),[t,o,l,d,s,u,c])},exports.useFundWallet=function(i){t.usePrivyEventSubscription("fundSolanaWallet",i);let o=e.useAppConfig(),{openModal:l}=n.usePrivyInternal(),{setModalData:d}=r.usePrivyModal();return{fundWallet:async({address:e,options:t})=>{let n=t?.amount||o.fundingConfig?.defaultRecommendedAmount||"1",r=t?.asset||o.fundingConfig?.defaultRecommendedCurrency.asset||"native-currency",i=t?.chain||"solana:mainnet";d({funding:a.prepareSolanaFundingModalData({address:e,appConfig:o,methodScreen:"FundingMethodSelectionScreen",fundWalletConfig:{...t,amount:n,asset:r,chain:i},externalSolanaFundingScreen:"FundSolWalletWithExternalSolanaWallet"}),solanaFundingData:{amount:n,asset:"native-currency"===r?"SOL":"USDC",chain:i,destinationAddress:e,sourceWalletData:void 0}}),l("FundingMethodSelectionScreen")}}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("react"),t=require("./events-context-Di6--rDg.js"),l=require("./get-is-unified-wallet-DL_nMXp5.js"),r=require("./context-P14IM76D.js"),n=require("./private-privy-provider-hH9v0z7o.js"),i=require("./internal-context-NWsAL807.js"),s=require("./state-DMsGOICm.js");exports.useActiveWallet=()=>{let t=r.useAppConfig(),{wallets:l}=n.useWallets(),{connectors:a}=i.usePrivyInternal(),o=e.useMemo((()=>a.filter(n.isSolanaWalletConnector).flatMap((e=>e.wallets))),[a]),u=s.useActiveWalletStore((e=>e.wallet));e.useEffect((()=>{if(!t.id)return;let e=n.u.get(s.toActiveWalletKey(t.id));s.useActiveWalletStore.setState({wallet:e})}),[t.id]);let c=e.useMemo((()=>{if(!u)return;let[,e]=u.split(":");return l.find((t=>t.address===e))||o.find((t=>t.address===e))}),[u,l,o]),d=e.useMemo((()=>c?"ethereum"===c.type?c.chainId:"solana":void 0),[c]);return{connect:async e=>{e?.reset&&(n.u.del(s.toActiveWalletKey(t.id)),s.useActiveWalletStore.setState({wallet:void 0}));let{wallet:r}=await s.open();if(!r)return{};let[,i]=r.split(":"),a=l.find((e=>e.address===i));if(a)return{wallet:a,network:a.chainId};let u=o.find((e=>e.address===i));return u?{wallet:u,network:"solana"}:{}},setActiveWallet:e.useCallback((e=>{s.setActiveWallet({address:e.address,client:e.walletClientType,appId:t.id})}),[t.id]),wallet:c,network:d}},exports.useConnectWallet=function(r){let{connectWallet:n}=e.useContext(l.PrivyContext);return t.usePrivyEventSubscription("connectWallet",r),{connectWallet:n}},exports.useLogin=function(r){let{login:n}=e.useContext(l.PrivyContext);return t.usePrivyEventSubscription("login",r),{login:n}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("react"),t=require("./events-context-Di6--rDg.js"),r=require("./get-is-unified-wallet-DL_nMXp5.js");exports.useLogout=function(u){let{logout:o}=e.useContext(r.PrivyContext);return t.usePrivyEventSubscription("logout",u),{logout:o}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var t=require("react"),e=require("./get-is-unified-wallet-DL_nMXp5.js");exports.useMfa=function(){let{promptMfa:i,init:r,submit:s,cancel:a,mfaMethods:n}=t.useContext(e.PrivyContext);return{promptMfa:i,init:r,submit:s,cancel:a,mfaMethods:n}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var t=require("react"),n=require("./get-is-unified-wallet-DL_nMXp5.js");exports.useMfaEnrollment=function(){let{initEnrollmentWithSms:l,initEnrollmentWithTotp:e,initEnrollmentWithPasskey:i,submitEnrollmentWithSms:o,submitEnrollmentWithTotp:s,submitEnrollmentWithPasskey:r,unenroll:m,enrollInMfa:u}=t.useContext(n.PrivyContext);return{initEnrollmentWithSms:l,initEnrollmentWithTotp:e,initEnrollmentWithPasskey:i,submitEnrollmentWithSms:o,submitEnrollmentWithTotp:s,submitEnrollmentWithPasskey:r,unenrollWithSms:()=>m("sms"),unenrollWithTotp:()=>m("totp"),unenrollWithPasskey:t=>m("passkey",t),showMfaEnrollmentModal:()=>u(!0),closeMfaEnrollmentModal:()=>u(!1)}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("react"),r=require("viem"),t=require("./private-privy-provider-hH9v0z7o.js"),a=require("./internal-context-NWsAL807.js");exports.useWalletBalance=function({rpcConfig:n,appId:i,address:c,chain:s}){let{chains:o}=a.usePrivyInternal(),[l,u]=e.useState(0n),[p,d]=e.useState(!1),h=e.useMemo((()=>{let e=s||o[0];if(e)return r.createPublicClient({chain:s,transport:r.http(t.getJsonRpcEndpointFromChain(e,n,i))})}),[s,n,i]),v=e.useCallback((async()=>{if(!c||!h)return;d(!0);let e=await h.getBalance({address:c}).catch(console.error);return e?(u(e),d(!1),e):void 0}),[h,c,u]);return e.useEffect((()=>{v().catch(console.error)}),[]),{balance:l,isLoading:p,reloadBalance:v}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("@solana/kit"),t=require("react"),n=require("@privy-io/js-sdk-core"),i=require("./internal-context-NWsAL807.js"),s=require("./get-is-unified-wallet-DL_nMXp5.js"),a=require("./private-privy-provider-hH9v0z7o.js"),r=require("eventemitter3"),o=require("@scure/base"),l=require("./context-P14IM76D.js"),d=require("./use-sign-with-user-signer-BcAsQTGF.js"),c=require("./useSolanaRpcClient-hHdPoMRE.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var g=/*#__PURE__*/u(n),h=/*#__PURE__*/u(r);const p=["solana:mainnet","solana:devnet","solana:testnet"];function y(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw TypeError("attempted to use private field on non-instance");return e}var f=0,v="__private_"+f+++"__implementation";class A extends h.default{setImplementation(e){y(this,v)[v]=e}async signMessage(e){return y(this,v)[v].signMessage(e)}async signAndSendTransaction(e){return y(this,v)[v].signAndSendTransaction(e)}async signTransaction(e){return y(this,v)[v].signTransaction(e)}constructor(e){super(),Object.defineProperty(this,v,{writable:!0,value:void 0}),y(this,v)[v]=e}}function w(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw TypeError("attempted to use private field on non-instance");return e}var E=0;function T(e){return"__private_"+E+++"_"+e}var b=/*#__PURE__*/T("_address"),m=/*#__PURE__*/T("_publicKey"),S=/*#__PURE__*/T("_chains"),P=/*#__PURE__*/T("_features"),I=/*#__PURE__*/T("_label"),O=/*#__PURE__*/T("_icon");class W{get address(){return w(this,b)[b]}get publicKey(){return w(this,m)[m].slice()}get chains(){return w(this,S)[S].slice()}get features(){return w(this,P)[P].slice()}get label(){return w(this,I)[I]}get icon(){return w(this,O)[O]}constructor({address:e,publicKey:t,label:n,icon:i}){Object.defineProperty(this,b,{writable:!0,value:void 0}),Object.defineProperty(this,m,{writable:!0,value:void 0}),Object.defineProperty(this,S,{writable:!0,value:void 0}),Object.defineProperty(this,P,{writable:!0,value:void 0}),Object.defineProperty(this,I,{writable:!0,value:void 0}),Object.defineProperty(this,O,{writable:!0,value:void 0}),w(this,b)[b]=e,w(this,m)[m]=t,w(this,S)[S]=p,w(this,I)[I]=n,w(this,O)[O]=i,w(this,P)[P]=["solana:signAndSendTransaction","solana:signTransaction","solana:signMessage"],new.target===W&&Object.freeze(this)}}function C(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw TypeError("attempted to use private field on non-instance");return e}var _=0;function M(e){return"__private_"+_+++"_"+e}var F=/*#__PURE__*/M("_listeners"),j=/*#__PURE__*/M("_version"),U=/*#__PURE__*/M("_name"),D=/*#__PURE__*/M("_icon"),N=/*#__PURE__*/M("_injection"),B=/*#__PURE__*/M("_isPrivyWallet"),x=/*#__PURE__*/M("_accounts"),R=/*#__PURE__*/M("_on"),L=/*#__PURE__*/M("_emit"),V=/*#__PURE__*/M("_off"),q=/*#__PURE__*/M("_connected"),Q=/*#__PURE__*/M("_connect"),H=/*#__PURE__*/M("_disconnect"),G=/*#__PURE__*/M("_signMessage"),K=/*#__PURE__*/M("_signAndSendTransaction"),J=/*#__PURE__*/M("_signTransaction");function Y(e,...t){C(this,F)[F][e]?.forEach((e=>e.apply(null,t)))}function k(e,t){C(this,F)[F][e]=C(this,F)[F][e]?.filter((e=>t!==e))}function Z(t,n,i){let s=structuredClone(e.getTransactionDecoder().decode(t)),a=e.address(n);return a in s.signatures&&(s.signatures[a]=i),new Uint8Array(e.getTransactionEncoder().encode(s))}function z(){let{isHeadlessSigning:e,walletProxy:t,initializeWalletProxy:r,recoverEmbeddedWallet:o,openModal:l,privy:u,client:g}=i.usePrivyInternal(),{user:h}=a.usePrivy(),{setModalData:p}=s.usePrivyModal(),{signWithUserSigner:y}=d.useSignWithUserSigner();return{signMessage:({message:d,address:f,options:v})=>new Promise((async(A,w)=>{let E=s.getPrivyWalletWithAddress(h,f);if("privy"!==E?.walletClientType)return void w(new i.PrivyClientError("Wallet is not a Privy wallet",void 0,i.PrivyErrorCode.EMBEDDED_WALLET_NOT_FOUND));let{entropyId:T,entropyIdVerifier:b}=a.getEntropyDetailsForUser(h,E),m=s.getIsUnifiedWallet(E),S=c.bufferFrom(d).toString("base64");if(S.length<1)return void w(new i.PrivyClientError("Message must be a non-empty string",void 0,i.PrivyErrorCode.INVALID_MESSAGE));let P=async()=>{let e;if(!h)throw Error("User must be authenticated before signing with a Privy wallet");let i=await g.getAccessToken();if(!i)throw Error("User must be authenticated to use their embedded wallet.");let s=t??await r(15e3);if(!s)throw Error("Failed to initialize embedded wallet proxy.");if(!await o({address:E.address}))throw Error("Unable to connect to wallet");if(m){let t=await n.rpc(u,y,{chain_type:"solana",method:"signMessage",params:{message:S,encoding:"base64"},wallet_id:E.id});if(!t.data||!("signature"in t.data))throw Error("Failed to sign message");e=t.data.signature}else{let{response:t}=await s.rpc({accessToken:i,entropyId:T,entropyIdVerifier:b,chainType:"solana",hdWalletIndex:E.walletIndex??0,requesterAppId:v?.uiOptions?.requesterAppId,request:{method:"signMessage",params:{message:S}}});e=t.data.signature}return e};if(e({showWalletUIs:v?.uiOptions?.showWalletUIs}))try{let e=await P(),t=new Uint8Array(c.bufferFrom(e,"base64"));A({signature:t})}catch(e){w(e)}else p({signMessage:{method:"solana_signMessage",data:S,confirmAndSign:P,onSuccess:e=>{A({signature:new Uint8Array(c.bufferFrom(e,"base64"))})},onFailure:e=>{w(e)},uiOptions:v?.uiOptions??{}},connectWallet:{recoveryMethod:E.recoveryMethod,connectingWalletAddress:E.address,entropyId:T,entropyIdVerifier:b,isUnifiedWallet:m,onCompleteNavigateTo:"SignRequestScreen",onFailure:e=>{w(new i.PrivyClientError("Failed to connect to wallet",e,i.PrivyErrorCode.UNKNOWN_CONNECT_WALLET_ERROR))}}}),l("EmbeddedWalletConnectingScreen")}))}}function X(){let{isHeadlessSigning:e,openModal:t}=i.usePrivyInternal(),{setModalData:n}=s.usePrivyModal(),{signMessage:r}=z(),{user:o}=a.usePrivy();return{signTransaction:async({transaction:l,options:d,chain:u="solana:mainnet",address:g})=>{async function h(e){let{signature:t}=await r({message:c.getTransactionMessageBytes(e),address:g,options:{...d,uiOptions:{...d?.uiOptions,showWalletUIs:!1}}});return{signedTransaction:Z(e,g,t)}}return e({showWalletUIs:d?.uiOptions?.showWalletUIs})?h(l):new Promise((async(e,r)=>{let c=s.getPrivyWalletWithAddress(o,g);if("privy"!==c?.walletClientType)return void r(new i.PrivyClientError("Wallet is not a Privy wallet",void 0,i.PrivyErrorCode.EMBEDDED_WALLET_NOT_FOUND));let{entropyId:p,entropyIdVerifier:y}=a.getEntropyDetailsForUser(o,c),f=s.getIsUnifiedWallet(c);function v(e){return t=>{t instanceof i.PrivyClientError?r(t):r(new i.PrivyClientError("Failed to connect to wallet",t,e))}}let A={account:c,transaction:l,chain:u,signOnly:!0,uiOptions:d?.uiOptions||{},onConfirm:h,onSuccess:e,onFailure:v(i.PrivyErrorCode.TRANSACTION_FAILURE)};n({connectWallet:{recoveryMethod:c.recoveryMethod,connectingWalletAddress:c.address,entropyId:p,entropyIdVerifier:y,isUnifiedWallet:f,onCompleteNavigateTo:"StandardSignAndSendTransactionScreen",onFailure:v(i.PrivyErrorCode.UNKNOWN_CONNECT_WALLET_ERROR)},standardSignAndSendTransaction:A}),t("EmbeddedWalletConnectingScreen")}))}}}let $=new A({signTransaction:i.notImplementedWithMessage("signTransaction was not injected"),signAndSendTransaction:i.notImplementedWithMessage("signAndSendTransaction was not injected"),signMessage:i.notImplementedWithMessage("signMessage was not injected")}),ee=new class{get version(){return C(this,j)[j]}get name(){return C(this,U)[U]}get icon(){return C(this,D)[D]}get chains(){return p.slice()}get features(){return{"standard:connect":{version:"1.0.0",connect:C(this,Q)[Q]},"standard:disconnect":{version:"1.0.0",disconnect:C(this,H)[H]},"standard:events":{version:"1.0.0",on:C(this,R)[R]},"solana:signAndSendTransaction":{version:"1.0.0",supportedTransactionVersions:["legacy",0],signAndSendTransaction:C(this,K)[K]},"solana:signTransaction":{version:"1.0.0",supportedTransactionVersions:["legacy",0],signTransaction:C(this,J)[J]},"solana:signMessage":{version:"1.0.0",signMessage:C(this,G)[G]},"privy:":{privy:{signMessage:C(this,N)[N].signMessage,signTransaction:C(this,N)[N].signTransaction,signAndSendTransaction:C(this,N)[N].signAndSendTransaction}}}}get accounts(){return C(this,x)[x].slice()}get isPrivyWallet(){return C(this,B)[B]}constructor({name:e,icon:t,version:n,injection:i,wallets:s}){Object.defineProperty(this,L,{value:Y}),Object.defineProperty(this,V,{value:k}),Object.defineProperty(this,F,{writable:!0,value:void 0}),Object.defineProperty(this,j,{writable:!0,value:void 0}),Object.defineProperty(this,U,{writable:!0,value:void 0}),Object.defineProperty(this,D,{writable:!0,value:void 0}),Object.defineProperty(this,N,{writable:!0,value:void 0}),Object.defineProperty(this,B,{writable:!0,value:void 0}),Object.defineProperty(this,x,{writable:!0,value:void 0}),Object.defineProperty(this,R,{writable:!0,value:void 0}),Object.defineProperty(this,q,{writable:!0,value:void 0}),Object.defineProperty(this,Q,{writable:!0,value:void 0}),Object.defineProperty(this,H,{writable:!0,value:void 0}),Object.defineProperty(this,G,{writable:!0,value:void 0}),Object.defineProperty(this,K,{writable:!0,value:void 0}),Object.defineProperty(this,J,{writable:!0,value:void 0}),C(this,F)[F]={},C(this,R)[R]=(e,t)=>(C(this,F)[F][e]?.push(t)||(C(this,F)[F][e]=[t]),()=>C(this,V)[V](e,t)),C(this,q)[q]=e=>{null!=e&&(C(this,x)[x]=e.map((({address:e})=>new W({address:e,publicKey:o.base58.decode(e)})))),C(this,L)[L]("change",{accounts:this.accounts})},C(this,Q)[Q]=async()=>(C(this,L)[L]("change",{accounts:this.accounts}),{accounts:this.accounts}),C(this,H)[H]=async()=>{C(this,L)[L]("change",{accounts:this.accounts})},C(this,G)[G]=async(...e)=>{let t=[];for(let{account:n,...i}of e){let{signature:e}=await C(this,N)[N].signMessage({...i,address:n.address});t.push({signedMessage:i.message,signature:e})}return t},C(this,K)[K]=async(...e)=>{let t=[];for(let n of e){let{signature:e}=await C(this,N)[N].signAndSendTransaction({...n,transaction:n.transaction,address:n.account.address,chain:n.chain||"solana:mainnet",options:n.options});t.push({signature:e})}return t},C(this,J)[J]=async(...e)=>{let t=[];for(let{transaction:n,account:i,options:s,chain:a}of e){let{signedTransaction:e}=await C(this,N)[N].signTransaction({transaction:n,address:i.address,chain:a||"solana:mainnet",options:s});t.push({signedTransaction:e})}return t},C(this,U)[U]=e,C(this,D)[D]=t,C(this,j)[j]=n,C(this,N)[N]=i,C(this,x)[x]=[],C(this,B)[B]=!0,i.on("accountChanged",C(this,q)[q],this),C(this,q)[q](s)}}({name:"Privy",version:"1.0.0",icon:"data:image/png;base64,AAABAAEAFBQAAAAAIABlAQAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAAUAAAAFAgGAAAAjYkdDQAAAAlwSFlzAAAOwwAADsMBx2+oZAAAAQVJREFUeJxiYMANZIC4E4ivAPFPIP4FxDeAuB+IlfDowwBMQFwJxF+B+D8O/AOI66Bq8QJGIF6ExyB0vAqImfEZmEeCYTDcgMswPiB+T4aB34FYApuBsWQYBsP52AycToGBK7EZuJECAw9jM3AVBQbuwWZgIwUGTsZmoDkFBnpiMxAEjpJh2FV8iVsbiD+TYBgoDVrgMgwGnID4HRGGgTKBGyHDYEAaiBdCSxh0g/5AU4Q8sYYhAzEgjoGmABBOgFo2eACowFABYn0oVgViAVINkQTiZUD8DIj/ATF6GILEXgLxCiCWIsZAbiAuBeKtQHwHiEHJ6C8UfwHie0C8E4jLoWpRAAAAAP//rcbhsQAAAAZJREFUAwBYFs3VKJ0cuQAAAABJRU5ErkJggg==",wallets:[],injection:$});function te(){let{ready:e}=a.useWallets(),{user:r}=a.usePrivy(),{signMessage:u}=z(),{signTransaction:h}=X(),{signAndSendTransaction:p}=function(){let e=l.useAppConfig(),{isHeadlessSigning:t,openModal:r}=i.usePrivyInternal(),{setModalData:u}=s.usePrivyModal(),{signTransaction:h}=X(),p=c.useSolanaRpcClient(),{user:y}=a.usePrivy(),{signWithUserSigner:f}=d.useSignWithUserSigner();return{signAndSendTransaction:async({transaction:l,address:d,chain:v="solana:mainnet",options:A})=>{let w=s.getPrivyWalletWithAddress(y,d);if("privy"!==w?.walletClientType)throw new i.PrivyClientError("Wallet is not a Privy wallet",void 0,i.PrivyErrorCode.EMBEDDED_WALLET_NOT_FOUND);let E=s.getIsUnifiedWallet(w);async function T(t){if(A?.sponsor)return await(async t=>{if(!E)throw new i.PrivyClientError("Sponsoring transactions is only supported for wallets on the TEE stack",i.PrivyErrorCode.INVALID_DATA);let s=new g.default({appId:e.id,clientId:e.appClientId,storage:a.u}),r=await n.rpc(s,f,{chain_type:"solana",method:"signAndSendTransaction",sponsor:!0,params:{transaction:c.bufferFrom(t).toString("base64"),encoding:"base64"},caip2:`solana:${(await p(v).rpc.getGenesisHash().send()).substring(0,32)}`,wallet_id:w.id});if(r.data&&"hash"in r.data)return{signature:o.base58.decode(r.data.hash)};throw Error("Failed to sign and send transaction")})(t);let{signedTransaction:s}=await h({transaction:t,address:d,chain:v,options:{...A,uiOptions:{...A?.uiOptions,showWalletUIs:!1}}}),{signature:r}=await p(v).sendAndConfirmTransaction(s);return{signature:r}}return t({showWalletUIs:A?.uiOptions?.showWalletUIs})?T(l):new Promise((async(t,n)=>{let s,o,{entropyId:c,entropyIdVerifier:g}=a.getEntropyDetailsForUser(y,w);function h(e){return t=>{t instanceof i.PrivyClientError?n(t):n(new i.PrivyClientError("Failed to connect to wallet",t,e))}}let p={account:w,transaction:l,chain:v,signOnly:!1,uiOptions:A?.uiOptions||{},onConfirm:T,onSuccess:t,onFailure:h(i.PrivyErrorCode.TRANSACTION_FAILURE),isSponsored:!!A?.sponsor},f={recoveryMethod:w.recoveryMethod,connectingWalletAddress:w.address,entropyId:c,entropyIdVerifier:g,isUnifiedWallet:E,onCompleteNavigateTo:"StandardSignAndSendTransactionScreen",onFailure:h(i.PrivyErrorCode.UNKNOWN_CONNECT_WALLET_ERROR)};e.fundingConfig&&(s=a.prepareSolanaFundingModalData({address:d,appConfig:e,methodScreen:"FundingMethodSelectionScreen",fundWalletConfig:{...A,asset:"native-currency",chain:v},externalSolanaFundingScreen:"FundSolWalletWithExternalSolanaWallet"}),o={amount:e.fundingConfig.defaultRecommendedAmount,asset:"SOL",chain:v,destinationAddress:d,afterSuccessScreen:"StandardSignAndSendTransactionScreen",sourceWalletData:void 0}),u({connectWallet:f,standardSignAndSendTransaction:p,funding:s,solanaFundingData:o}),r("EmbeddedWalletConnectingScreen")}))}}}(),y=t.useMemo((()=>{let e=[...s.getPrivySolanaHDWallets(r).sort(((e,t)=>(e.walletIndex??0)-(t.walletIndex??0)))],t=s.getImportedPrivySolanaWallets(r);return t.length?[...e,...t]:e}),[r]),f=t.useMemo((()=>({signMessage:async({message:e,address:t,options:n})=>await u({message:e,address:t,options:n}),signTransaction:async({transaction:e,address:t,chain:n,options:i})=>await h({transaction:e,address:t,chain:n,options:i}),async signAndSendTransaction({transaction:e,address:t,chain:n,options:i}){let{signature:s}=await p({transaction:e,address:t,chain:n,options:i});return{signature:s}}})),[u,h,p]);return t.useEffect((()=>{$?.setImplementation(f)}),[f]),t.useEffect((()=>{var t;!e||(t=ee.accounts).length===y.length&&t.every(((e,t)=>e.address===y[t]?.address))||$?.emit("accountChanged",y)}),[e,y]),{ready:e,wallet:ee}}function ne(){let{client:e}=i.usePrivyInternal(),{ready:n,wallet:s}=te(),[a,r]=t.useState([]),[o,l]=t.useState([]);return t.useEffect((()=>{let e=[s,...a.filter((e=>"solana"===e.chainType&&!!e.wallet.features)).map((e=>e.wallet))];l(e);let t=a.flatMap((t=>{let n=()=>l([...e]);return t.on("walletsUpdated",n),{connector:t,off:n}})),n=e.map((t=>t.features["standard:events"]?.on("change",(()=>{l([...e])}))));return()=>{n.forEach((e=>e?.())),t.forEach((({connector:e,off:t})=>e.off("walletsUpdated",t)))}}),[a]),t.useEffect((()=>{r(e.connectors?.walletConnectors.filter((e=>"solana"===e.chainType))??[]);let t=()=>{r(e.connectors?.walletConnectors.filter((e=>"solana"===e.chainType))??[])};return e.connectors?.on("connectorInitialized",t),()=>{e.connectors?.off("connectorInitialized",t)}}),[n,e.connectors]),{ready:n,wallets:o}}exports.SOLANA_CHAINS=p,exports.getAddressFromBuffer=function(t){return e.getBase58Decoder().decode(t)},exports.useSolanaStandardWallets=ne,exports.useWallets=function(){let{ready:e,wallets:i}=ne();return{ready:e,wallets:t.useMemo((()=>i.flatMap((e=>e.accounts.map((t=>new n.ConnectedStandardSolanaWallet({wallet:e,account:t})))))),[i])}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{HelpCircle as o}from"lucide-react";import{a as i}from"./context-i_OKSUqt.mjs";import{u as e}from"./internal-context-D4S2Sfvt.mjs";import{a as r}from"./get-is-unified-wallet-Bon2jknh.mjs";import{S as a}from"./ScreenLayout-x3-Xgy2E.mjs";import"react";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"viem";import"./ModalHeader-cnW8OaHH.mjs";import"styled-components";import"./private-privy-provider-B2_rZ8aq.mjs";import"mipd";import"react-device-detect";import"viem/utils";import"@privy-io/popup";import"./paths-BzM95ysC.mjs";import"@scure/base";import"uuid";import"jose";import"eventemitter3";import"zustand";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"js-cookie";import"./events-context-CI0iqAXA.mjs";import"@headlessui/react";import"@privy-io/ethereum";import"@privy-io/urls";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-DgjLPjok.mjs";import"./index-Dq_xe9dz.mjs";const m=({title:i="Account not found",subtitle:e,appName:r="this app",ctaText:m="Try logging in again",onRetry:n})=>/*#__PURE__*/t(a,{title:i,subtitle:e||`Please try logging in again or go to ${r} to create an account.`,icon:o,iconVariant:"warning",primaryCta:{label:m,onClick:n},watermark:!0}),n={component:()=>{let{navigate:o,setModalData:a,data:n}=r(),p=i(),{getAuthMeta:c,client:s}=e();/*#__PURE__*/return t(m,{appName:p?.name,onRetry:()=>{let t=c();a({...n,login:{...n?.login,...t?.disableSignup?{disableSignup:!0}:{}}}),s?.authFlow&&(s.authFlow=void 0),o("LandingScreen")}})}};export{n as AccountNotFoundScreen,m as AccountNotFoundScreenView,n as default};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import{jsxs as e,jsx as r,Fragment as o}from"react/jsx-runtime";import{Check as i,Copy as t}from"lucide-react";import{useState as n,useEffect as l}from"react";import{styled as s}from"styled-components";import{S as a}from"./private-privy-provider-B2_rZ8aq.mjs";import{S as c}from"./ModalHeader-cnW8OaHH.mjs";const p=({address:s,showCopyIcon:p,url:h,className:u})=>{let[g,y]=n(!1);function v(e){e.stopPropagation(),navigator.clipboard.writeText(s).then((()=>y(!0))).catch(console.error)}return l((()=>{if(g){let e=setTimeout((()=>y(!1)),3e3);return()=>clearTimeout(e)}}),[g]),/*#__PURE__*/e(d,h?{children:[/*#__PURE__*/r(f,{title:s,className:u,href:`${h}/address/${s}`,target:"_blank",children:a(s)}),p&&/*#__PURE__*/r(c,{onClick:v,size:"sm",style:{gap:"0.375rem"},children:/*#__PURE__*/e(o,g?{children:["Copied",/*#__PURE__*/r(i,{size:16})]}:{children:["Copy",/*#__PURE__*/r(t,{size:16})]})})]}:{children:[/*#__PURE__*/r(m,{title:s,className:u,children:a(s)}),p&&/*#__PURE__*/r(c,{onClick:v,size:"sm",style:{gap:"0.375rem",fontSize:"14px"},children:/*#__PURE__*/e(o,g?{children:["Copied",/*#__PURE__*/r(i,{size:14})]}:{children:["Copy",/*#__PURE__*/r(t,{size:14})]})})]})};let d=s.span`
|
|
2
|
-
display: inline-flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
gap: 0.5rem;
|
|
5
|
-
`,m=s.span`
|
|
6
|
-
font-size: 14px;
|
|
7
|
-
font-weight: 500;
|
|
8
|
-
color: var(--privy-color-foreground);
|
|
9
|
-
`,f=s.a`
|
|
10
|
-
font-size: 14px;
|
|
11
|
-
color: var(--privy-color-foreground);
|
|
12
|
-
text-decoration: none;
|
|
13
|
-
|
|
14
|
-
&:hover {
|
|
15
|
-
text-decoration: underline;
|
|
16
|
-
}
|
|
17
|
-
`;export{p as A};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{FileCheck as r,ExternalLink as o}from"lucide-react";import"react";import{styled as i}from"styled-components";import{a}from"./ModalHeader-cnW8OaHH.mjs";import{a as n}from"./context-i_OKSUqt.mjs";import{u as l}from"./internal-context-D4S2Sfvt.mjs";import{u as s,a as c}from"./get-is-unified-wallet-Bon2jknh.mjs";import{s as m}from"./shouldProceedtoEmbeddedWalletCreationFlow-CDHNJbN9.mjs";import{S as p}from"./ScreenLayout-x3-Xgy2E.mjs";import"./private-privy-provider-B2_rZ8aq.mjs";import"mipd";import"react-device-detect";import"viem/utils";import"@privy-io/js-sdk-core";import"@privy-io/popup";import"./paths-BzM95ysC.mjs";import"@scure/base";import"viem";import"uuid";import"jose";import"eventemitter3";import"zustand";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"ofetch";import"js-cookie";import"./events-context-CI0iqAXA.mjs";import"@headlessui/react";import"@privy-io/ethereum";import"@privy-io/urls";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"tinycolor2";import"./Screen-DgjLPjok.mjs";import"./index-Dq_xe9dz.mjs";const d={component:()=>{let{user:t,logout:r}=s(),{onUserCloseViaDialogOrKeybindRef:o,setModalData:i,navigate:a}=c(),p=n(),{acceptTerms:d,closePrivyModal:y,createAnalyticsEvent:h}=l(),v=e=>{e?.preventDefault(),y({shouldCallAuthOnSuccess:!1}),r()};o.current=v;/*#__PURE__*/return e(u,{termsAndConditionsUrl:p?.legal.termsAndConditionsUrl,privacyPolicyUrl:p?.legal.privacyPolicyUrl,onAccept:async e=>{e?.preventDefault(),await d(),t&&m(t,p.embeddedWallets)?(i({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),h({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"AffirmativeConsentScreen"}}),r()},callAuthOnSuccessOnClose:!0}}),a("EmbeddedWalletOnAccountCreateScreen")):y()},onDecline:v})}},u=({termsAndConditionsUrl:i,privacyPolicyUrl:n,onAccept:l,onDecline:s,title:c="One last step",subtitle:m="By signing up, you agree to our terms and privacy policy."})=>/*#__PURE__*/e(p,{title:c,subtitle:m,icon:r,primaryCta:{label:"Accept",onClick:l},secondaryCta:{label:"No thanks",onClick:s},watermark:!0,children:(i||n)&&/*#__PURE__*/t(y,{children:[i&&/*#__PURE__*/t(a,{variant:"muted",href:i,target:"_blank",size:"lg",style:{justifyContent:"space-between"},as:"a",children:["View Terms",/*#__PURE__*/e(o,{width:16,height:16,strokeWidth:2.25})]}),n&&/*#__PURE__*/t(a,{variant:"muted",href:n,target:"_blank",size:"lg",style:{justifyContent:"space-between"},as:"a",children:["View Privacy Policy",/*#__PURE__*/e(o,{width:16,height:16,strokeWidth:2.25})]})]})});let y=i.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
gap: 12px;
|
|
5
|
-
margin-top: var(--screen-space);
|
|
6
|
-
`;export{d as AffirmativeConsentScreen,u as AffirmativeConsentScreenView,d as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{Lock as o}from"lucide-react";import"react";import{a as i}from"./context-i_OKSUqt.mjs";import{a as e}from"./get-is-unified-wallet-Bon2jknh.mjs";import{S as r}from"./ScreenLayout-x3-Xgy2E.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"viem";import"./internal-context-D4S2Sfvt.mjs";import"ofetch";import"./ModalHeader-cnW8OaHH.mjs";import"styled-components";import"./private-privy-provider-B2_rZ8aq.mjs";import"mipd";import"react-device-detect";import"viem/utils";import"@privy-io/popup";import"./paths-BzM95ysC.mjs";import"@scure/base";import"uuid";import"jose";import"eventemitter3";import"zustand";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"js-cookie";import"./events-context-CI0iqAXA.mjs";import"@headlessui/react";import"@privy-io/ethereum";import"@privy-io/urls";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-DgjLPjok.mjs";import"./index-Dq_xe9dz.mjs";const a=({title:i="You don't have access to this app",subtitle:e="Have you been invited?",ctaText:a="Try another account",ctaLink:n,onCtaClick:m})=>/*#__PURE__*/t(r,{title:i,subtitle:e,icon:o,iconVariant:"warning",primaryCta:{label:a,onClick:()=>{n?window.open(n,"_blank"):m?.()}},watermark:!0}),n={component:()=>{let{navigate:o}=e(),r=i(),n=r?.allowlistConfig.errorTitle||"You don't have access to this app",m=r?.allowlistConfig.errorDetail||"Have you been invited?",p=r?.allowlistConfig.errorCtaText||"Try another account",c=r?.allowlistConfig.errorCtaLink;/*#__PURE__*/return t(a,{title:n,subtitle:m,ctaText:p,ctaLink:c??void 0,onCtaClick:()=>{o("LandingScreen")}})}};export{n as AllowlistRejectionScreen,a as AllowlistRejectionScreenView,n as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{useRef as t,useCallback as o}from"react";import{a as r}from"./context-i_OKSUqt.mjs";import{u as n,c as i,a}from"./internal-context-D4S2Sfvt.mjs";import{a as c}from"./events-context-CI0iqAXA.mjs";import{a as l}from"./get-is-unified-wallet-Bon2jknh.mjs";import{i as m}from"./ConnectWalletView-BtuPwm-c.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"./ModalHeader-cnW8OaHH.mjs";import"./private-privy-provider-B2_rZ8aq.mjs";import"mipd";import"viem/utils";import"@privy-io/popup";import"./paths-BzM95ysC.mjs";import"@scure/base";import"uuid";import"jose";import"eventemitter3";import"zustand";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"js-cookie";import"@headlessui/react";import"@privy-io/ethereum";import"@privy-io/urls";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"@heroicons/react/24/outline/CheckIcon";import"./copy-Bx2Jwc5_.mjs";import"./Link-DJ5gq9Di.mjs";import"./QrCode-BVe4kf2z.mjs";import"qrcode";import"./EmailInputForm-Dgoii4vf.mjs";import"./ErrorMessage-D8VaAP5m.mjs";import"./useI18n-DleS41MU.mjs";import"./WalletCards-DH1rqayz.mjs";import"./state-BG13el3v.mjs";import"./Screen-DgjLPjok.mjs";import"./index-Dq_xe9dz.mjs";const s={component:()=>{let{setWalletConnectionStatus:s,closePrivyModal:p,inProgressAuthFlowRef:u}=n(),{data:d,navigate:C}=l(),j=r(),W=c(),h=d?.externalConnectWallet?.description,v=t(d?.externalConnectWallet?.walletList??j.appearance.walletList),w=t(d?.externalConnectWallet?.walletChainType??j.appearance.walletChainType),E=v.current,y=w.current,f="link"===u.current?void 0:()=>C("LandingScreen");/*#__PURE__*/return e(m,{walletList:E,walletChainType:y,onClose:p,onConnect:o((({connector:e,wallet:t})=>{W("connectWallet","onSuccess",{wallet:t}),s({status:"connected",connectedWallet:t,connector:e,connectError:null,connectRetry:()=>null}),C("ConnectionStatusScreen",!d?.externalConnectWallet?.preSelectedWalletId)}),[s,C,d?.login?.disableSignup,d?.externalConnectWallet?.preSelectedWalletId]),onConnectError:e=>{e instanceof i?(console.warn(e.cause?e.cause:e.message),W("connectWallet","onError",e.privyErrorCode||a.GENERIC_CONNECT_WALLET_ERROR)):(console.warn(e),W("connectWallet","onError",a.UNKNOWN_CONNECT_WALLET_ERROR))},onBack:f,customDescription:h||"",preSelectedWalletId:d?.externalConnectWallet?.preSelectedWalletId,app:j})},isUnauthenticatedScreem:!0};export{s as AuthenticateWithWalletScreen,s as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsxs as e,Fragment as t,jsx as a}from"react/jsx-runtime";import n from"@heroicons/react/24/outline/CheckCircleIcon";import{useState as i,useEffect as r}from"react";import{createWalletClient as o,custom as s,publicActions as d,createPublicClient as c,http as l,formatUnits as m}from"viem";import{addToDefaultChains as u}from"@privy-io/js-sdk-core";import{b as p,c as h,R as g}from"./Layouts-BlFm53ED.mjs";import{B as f}from"./ModalHeader-cnW8OaHH.mjs";import{C as v}from"./ScreenHeader-CHmc4-Lu.mjs";import{t as I}from"./FundWalletMethodHeader-B3nAPYAR.mjs";import{N as w}from"./index-Dq_xe9dz.mjs";import{a as T,t as y}from"./context-i_OKSUqt.mjs";import{u as j,P as C,a as b}from"./internal-context-D4S2Sfvt.mjs";import{o as S,ab as N,aZ as k,S as E,q as A}from"./private-privy-provider-B2_rZ8aq.mjs";import{a as x}from"./get-is-unified-wallet-Bon2jknh.mjs";import{u as F}from"./useGetTokenPrice-DgKSvh6T.mjs";import{O as B}from"./analytics-mkkvFRju.mjs";import{g as L,t as U,a as P,b as M,c as q,u as H}from"./reservoir-DNdkSA7R.mjs";import{g as O}from"./getChainName-DjpPdUSc.mjs";import{g as R,a as W}from"./transaction-CnfuREWo.mjs";import{g as D,B as $}from"./BridgeNetworkSelectionView-C5xaiL3n.mjs";import{T as _}from"./TransferOrBridgeLoadingScreen-DZ1diPi7.mjs";import"styled-components";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"tinycolor2";import"ofetch";import"mipd";import"react-device-detect";import"viem/utils";import"@privy-io/popup";import"./paths-BzM95ysC.mjs";import"@scure/base";import"uuid";import"jose";import"eventemitter3";import"zustand";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"js-cookie";import"./events-context-CI0iqAXA.mjs";import"@headlessui/react";import"@privy-io/ethereum";import"@privy-io/urls";import"./useGetSolPrice-usp7QcwI.mjs";import"./getFormattedUsdFromLamports-B6EqSEho.mjs";import"./getErc20Balance-BDNkB-EL.mjs";import"./Row-C9vrS4Zi.mjs";import"./ErrorMessage-D8VaAP5m.mjs";import"./Value-tcJV9e0L.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"./Subtitle-CV-2yKE4.mjs";import"./Title-BnzYV3Is.mjs";import"@heroicons/react/24/outline/WalletIcon";import"./Chip-D2-wZOHJ.mjs";import"./NetworkIcon-B48ilzF8.mjs";import"@heroicons/react/24/outline/GlobeAltIcon";import"./shared-FM0rljBt.mjs";import"@heroicons/react/24/outline/ChevronDownIcon";import"./formatErc20TokenAmount-BuPk9xcy.mjs";import"./ethers-Cr0T35kS.mjs";import"./styles-Fji1ReGu.mjs";import"./LinkPasskeyScreen-DhD51WvM.mjs";import"lucide-react";import"./TodoList-CgrU7uwu.mjs";import"./ScreenLayout-x3-Xgy2E.mjs";import"./Screen-DgjLPjok.mjs";import"./InjectedWalletIcon-DLcYOGDj.mjs";import"./Address-CDF4d_Ha.mjs";const G={component:()=>{let G=T(),{rpcConfig:V,appId:Q,closePrivyModal:z,createAnalyticsEvent:K}=j(),{navigate:X,setModalData:Y,data:Z}=x(),J=T(),{wallets:ee}=S(),[te,ae]=i(null),[ne,ie]=i(null),[re,oe]=i([]),[se,de]=i(0),[ce,le]=i(!1),[me,ue]=i(!1),[pe,he]=i(!1),[ge,fe]=i(!1),[ve,Ie]=i(),[we,Te]=i();if(!Z?.funding||"solana"!==Z.funding.chainType)throw Error("Invalid funding data");let{address:ye,chain:je,connectedWallet:Ce}=Z.funding,[be,Se]=i(Z.funding.amount),Ne=("ethereum"===Ce?.type?Ce:void 0)??ee[0],ke=N(Ne?.walletClientType||"unknown"),Ee=ke?.name||"wallet",[Ae,xe]=i(null);r((()=>{(async()=>{if(!Ne)return;let e=await Ne.getEthereumProvider();xe(o({account:Ne.address,transport:s(e)}).extend(d))})().catch(console.error)}),[Ne]);let[Fe,Be]=i(0n),Le=R(Fe);r((()=>{let e=G.solanaRpcs[je];e?k({rpc:e.rpc,address:ye}).then((e=>Be(BigInt(e)))).catch(console.error):console.warn("Unable to load solana rpc, skipping balance")}),[]);let[Ue,Pe]=i(),{tokenPrice:Me}=F("solana"),{fundingAmountInBaseUnit:qe,fundingAmountInUsd:He}=W({amount:be,fee:0n,tokenPrice:Me,isUsdc:Z.funding.isUSDC});if(r((()=>{(async()=>{if(!Ae||!Ne)return;let e=["solana:testnet","solana:devnet"].includes(je);e&&console.warn("Solana testnets are not supported for bridging");let t=u(J.chains).filter((({testnet:t})=>!!t===e)),a=(await D({chains:t,address:Ne.address,appId:Q,rpcConfig:V})).filter((e=>e.balance>0n));if(a.length<1)return void ae(new C(`Wallet ${E(Ne.address)} does not have enough funds.`,void 0,b.INSUFFICIENT_BALANCE));a.sort(((e,t)=>Number(t.balance-e.balance)));let n=(await Promise.allSettled(a.map((async e=>({...e,quote:await L({isTestnet:!1,input:U({appId:Q,amount:qe.toString(),user:Ne.address,recipient:ye,destinationChainId:M,destinationCurrency:P,originChainId:e.chain.id})})}))))).filter((e=>"fulfilled"===e.status)).map((e=>e.value));if(n.length<1)return void ae(new C(`Unable to fetch quotes for bridging. Wallet ${E(Ne.address)} does not have enough funds.`,void 0,b.INSUFFICIENT_BALANCE));let i=n.map((({quote:e,balance:t,chain:a})=>({bridgeTx:q(e),balance:t,chain:a,isErc20Quote:!1}))).filter((({bridgeTx:e})=>!!e));if(i.length>1)return void oe(i);let r=i.at(0);r?(ue(!0),Pe({data:r.bridgeTx.data,to:r.bridgeTx.to,value:r.bridgeTx.value,chain:r.chain})):ae(new C(`Unable to select bridge option from quotes. Wallet ${E(Ne.address)} does not have enough funds.`,void 0,b.INSUFFICIENT_BALANCE))})().catch(console.error)}),[Ae]),r((()=>{(async()=>{let e,t;if(!Ae||!Ne||ce||pe||!Ue)return;le(!0);let a=c({chain:Ue.chain,transport:l(A(Ue.chain,V,Q))});try{e=await a.prepareTransactionRequest({account:Ne.address,to:Ue.to,chain:Ue.chain,data:Ue.data,value:BigInt(Ue.value??0)})}catch(e){console.error(e),re.length>1&&ie(e.shortMessage??"Something went wrong")}if(e){le(!1),he(!0);try{await Ae.switchChain({id:Ue.chain.id})}catch(e){await Ae.addChain({chain:Ue.chain}),await Ae.switchChain({id:Ue.chain.id})}try{t=await Ae.sendTransaction(e)}catch(e){console.error(e),"TransactionExecutionError"===e.name&&(re.length<1?ae(new C(e.shortMessage,void 0,b.TRANSACTION_FAILURE)):ie(e.shortMessage??"Something went wrong"))}if(t)return await Ae.waitForTransactionReceipt({hash:t}),me?(Te("pending"),void Ie(t)):(he(!1),fe(!0),void K({eventName:B,payload:{provider:"external",status:"success",txHash:t,address:Ne.address,chainId:Ue.chain.id,chainType:"ethereum",value:Ue.value?m(BigInt(Ue.value),18):void 0,token:"ETH",destination:ye,destinationClusterName:"mainnet-beta",destinationChainType:"solana",destinationValue:m(qe,9),destinationToken:"SOL"}}));he(!1)}else le(!1)})().catch(console.error)}),[Ae,Ue]),H({transactionHash:ve,isTestnet:!1,bridgingStatus:we,setBridgingStatus:Te,onSuccess({transactionHash:e}){ue(!1),fe(!0),K({eventName:B,payload:{provider:"external",status:"success",txHash:e,address:Ne?.address,chainId:Ue?.chain.id,chainType:"ethereum",value:Ue?.value?m(BigInt(Ue.value),18):void 0,token:"ETH",destination:ye,destinationClusterName:"mainnet-beta",destinationChainType:"solana",destinationValue:m(qe,9),destinationToken:"SOL"}})},onFailure({error:e}){ue(!1),ae(e)}}),r((()=>{te&&(Y({funding:Z?.funding,solanaFundingData:Z?.solanaFundingData,sendTransaction:Z?.sendTransaction,errorModalData:{error:te,previousScreen:"TransferFromWalletScreen"}}),X("ErrorScreen",!1))}),[te]),r((()=>{if(!ge)return;let e=setTimeout(z,y);return()=>clearTimeout(e)}),[ge]),ge/*#__PURE__*/)return e(t,{children:[/*#__PURE__*/a(I,{}),/*#__PURE__*/a(p,{}),/*#__PURE__*/e(h,{children:[/*#__PURE__*/a(n,{color:"var(--privy-color-success)",width:"64px",height:"64px"}),/*#__PURE__*/a(v,{title:"Success!",description:`You’ve successfully added ${be} SOL to your ${J.name} wallet. It may take a minute before the funds are available to use.`})]}),/*#__PURE__*/a(g,{}),/*#__PURE__*/a(f,{})]});let Oe=re[se];return re.length>1&&Oe?/*#__PURE__*/a($,{displayName:Ee,configuredFundingChain:je,formattedBalance:Le,fundingAmount:be,fundingCurrency:"SOL",fundingAmountInUsd:He,options:re,selectedOption:Oe,isPreparing:ce,isSubmitting:pe,addressToFund:ye,fundingWalletAddress:Ne?.address||"",errorMessage:ne,onSubmit:()=>{Z.funding?.amount!==be?async function(){if(Ne&&Oe)try{let e=await L({isTestnet:!1,input:U({appId:Q,amount:qe.toString(),user:Ne.address,recipient:ye,destinationChainId:M,destinationCurrency:P,originChainId:Oe.chain.id})}),t=q(e);if(!t)throw Error("Invalid transaction request");ue(!0),Pe({data:t.data,to:t.to,value:t.value,chain:Oe.chain})}catch(e){console.error(e),ae(new C("Unable to fetch quotes for bridging",e,b.INSUFFICIENT_BALANCE))}}().catch(console.error):Pe({to:Oe.bridgeTx.to,data:Oe.bridgeTx.data,value:Oe.bridgeTx.value,chain:Oe.chain})},onSelect:e=>{e!==se&&(ie(null),de(e))},onAmountChange:Se}):pe&&Ne?/*#__PURE__*/a(_,{walletClientType:Ne?.walletClientType||"unknown",displayName:Ee,addressToFund:ye,isBridging:me,isErc20Flow:!1,chainId:"solana",chainName:O(je),totalPriceInUsd:void 0,totalPriceInNativeCurrency:void 0,gasPriceInUsd:void 0,gasPriceInNativeCurrency:void 0}):
|
|
2
|
-
/*#__PURE__*/e(t,{children:[/*#__PURE__*/a(I,{}),/*#__PURE__*/a(w,{}),/*#__PURE__*/a("div",{style:{marginTop:"1rem"}}),/*#__PURE__*/a(f,{})]})}};export{G as AwaitingEvmToSolBridgingScreen,G as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsxs as e,Fragment as t,jsx as a}from"react/jsx-runtime";import n from"@heroicons/react/24/outline/CheckCircleIcon";import{useState as r,useEffect as i}from"react";import{parseEther as o,createWalletClient as s,custom as d,publicActions as c,createPublicClient as l,http as m,encodeFunctionData as u,formatUnits as p}from"viem";import{addToDefaultChains as h}from"@privy-io/js-sdk-core";import{b as f,c as g,R as v}from"./Layouts-BlFm53ED.mjs";import{B as y}from"./ModalHeader-cnW8OaHH.mjs";import{C}from"./ScreenHeader-CHmc4-Lu.mjs";import{t as I}from"./FundWalletMethodHeader-B3nAPYAR.mjs";import{N as T}from"./index-Dq_xe9dz.mjs";import{a as w,t as b}from"./context-i_OKSUqt.mjs";import{u as j,P as E,a as S}from"./internal-context-D4S2Sfvt.mjs";import{o as N,ab as A,q as k,S as B,a_ as x}from"./private-privy-provider-B2_rZ8aq.mjs";import{a as F}from"./get-is-unified-wallet-Bon2jknh.mjs";import{u as M}from"./useGetTokenPrice-DgKSvh6T.mjs";import{E as U,a as L}from"./transfer-6YztDh-t.mjs";import{f as P}from"./formatErc20TokenAmount-BuPk9xcy.mjs";import{c as H,a as W,g as $,s as q}from"./ethers-Cr0T35kS.mjs";import{O as D}from"./analytics-mkkvFRju.mjs";import{t as R,g as _,c as O,u as Q}from"./reservoir-DNdkSA7R.mjs";import{g as G,B as V}from"./BridgeNetworkSelectionView-C5xaiL3n.mjs";import{g as z}from"./getErc20Balance-BDNkB-EL.mjs";import{T as K}from"./TransferOrBridgeLoadingScreen-DZ1diPi7.mjs";import"styled-components";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"tinycolor2";import"ofetch";import"mipd";import"react-device-detect";import"viem/utils";import"@privy-io/popup";import"./paths-BzM95ysC.mjs";import"@scure/base";import"uuid";import"jose";import"eventemitter3";import"zustand";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"js-cookie";import"./events-context-CI0iqAXA.mjs";import"@headlessui/react";import"@privy-io/ethereum";import"@privy-io/urls";import"./useGetSolPrice-usp7QcwI.mjs";import"./Row-C9vrS4Zi.mjs";import"./ErrorMessage-D8VaAP5m.mjs";import"./Value-tcJV9e0L.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"./Subtitle-CV-2yKE4.mjs";import"./Title-BnzYV3Is.mjs";import"@heroicons/react/24/outline/WalletIcon";import"./getChainName-DjpPdUSc.mjs";import"./Chip-D2-wZOHJ.mjs";import"./NetworkIcon-B48ilzF8.mjs";import"@heroicons/react/24/outline/GlobeAltIcon";import"./shared-FM0rljBt.mjs";import"@heroicons/react/24/outline/ChevronDownIcon";import"./styles-Fji1ReGu.mjs";import"./LinkPasskeyScreen-DhD51WvM.mjs";import"lucide-react";import"./TodoList-CgrU7uwu.mjs";import"./ScreenLayout-x3-Xgy2E.mjs";import"./Screen-DgjLPjok.mjs";import"./InjectedWalletIcon-DLcYOGDj.mjs";import"./Address-CDF4d_Ha.mjs";const X={component:()=>{let{rpcConfig:X,appId:Y,closePrivyModal:Z,createAnalyticsEvent:J}=j(),{navigate:ee,setModalData:te,data:ae}=F(),ne=w(),{wallets:re}=N(),[ie,oe]=r(!1),[se,de]=r(0n),[ce,le]=r(!1),[me,ue]=r(null),[pe,he]=r(null),[fe,ge]=r([]),[ve,ye]=r(0),[Ce,Ie]=r(!1),[Te,we]=r(!1),[be,je]=r(!1),[Ee,Se]=r(!1),[Ne,Ae]=r(),[ke,Be]=r();if(!ae?.funding||"ethereum"!==ae.funding.chainType)throw Error("Invalid funding data");let{erc20ContractInfo:xe,chain:Fe,connectedWallet:Me}=ae.funding,Ue=ae.funding.address,Le=ae.funding.erc20Address,[Pe,He]=r(ae.funding.amount);i((()=>{Le&&!xe&&ue(Error("Unable to fetch token details"))}),[]);let We=!!Le&&!!xe,$e=We?BigInt(parseFloat(Pe)*10**xe.decimals):o(Pe),qe=("ethereum"===Me?.type?Me:void 0)??re[0],De=A(qe?.walletClientType||"unknown"),Re=De?.name||"wallet",[_e,Oe]=r(null);i((()=>{(async()=>{if(!qe)return;let e=await qe.getEthereumProvider();Oe(s({account:qe.address,transport:d(e)}).extend(c))})().catch(console.error)}),[qe]);let[Qe,Ge]=r(0n);i((()=>{l({chain:Fe,transport:m(k(Fe,X,Y))}).getBalance({address:Ue}).then(Ge).catch(console.error)}),[]);let[Ve,ze]=r(0n);i((()=>{We&&z({chain:Fe,address:Ue,appId:Y,rpcConfig:X,erc20Address:Le}).then((e=>ze(e.balance))).catch(console.error)}),[]);let{tokenPrice:Ke}=M(Fe.id),[Xe,Ye]=r({to:Ue,chain:Fe,value:$e,data:void 0});i((()=>{(async()=>{let e,t;if(!_e||!qe||Ce||be)return;Ie(!0);let a=l({chain:Xe.chain,transport:m(k(Xe.chain,X,Y))});if(We&&!Xe.data)return await a.simulateContract({address:Le,chain:Xe.chain,abi:U,functionName:"transfer",args:[Ue,$e],account:qe.address}).catch((e=>{if("ContractFunctionZeroDataError"===e?.cause?.name||e?.message?.includes("returned no data"))return a.simulateContract({address:Le,chain:Xe.chain,abi:L,functionName:"transfer",args:[Ue,$e],account:qe.address}).catch((e=>{console.warn("Simulated token transfer failed with error, fetching bridge options.",e)}));console.warn("Simulated token transfer failed with error, fetching bridge options.",e)}))?(Ie(!1),void Ye({to:Le,chain:Xe.chain,data:u({abi:U,functionName:"transfer",args:[Ue,$e]}),value:"0x0"})):(Ie(!1),void le(!0));try{e=await a.prepareTransactionRequest({account:qe.address,to:Xe.to,chain:Xe.chain,data:Xe.data,value:BigInt(Xe.value??0)})}catch(e){if(console.error(e),fe.length>1)he(e.shortMessage??"Something went wrong");else if(Te&&0===fe.length)return void ue(new E(`Wallet ${B(qe.address)} does not have enough funds.`,void 0,S.INSUFFICIENT_BALANCE))}if(!e)return Ie(!1),void le(!0);Ie(!1),je(!0),oe(!0),de(e.gas);try{await _e.switchChain({id:Xe.chain.id})}catch(e){await _e.addChain({chain:Xe.chain}),await _e.switchChain({id:Xe.chain.id})}try{t=await _e.sendTransaction(e)}catch(e){if(console.error(e),"TransactionExecutionError"===e.name)if(fe.length<1){let t=e.shortMessage;(e.shortMessage.includes("rejected the request")||e.details.includes("rejected the request"))&&(t="User rejected the request."),ue(new E(t,void 0,S.TRANSACTION_FAILURE))}else he(e.shortMessage??"Something went wrong")}if(t)return await _e.waitForTransactionReceipt({hash:t}),je(!1),Te?(Ae(t),void Be("pending")):(Se(!0),te(x(ae,"completed",t,qe?.walletClientType,We,xe,Fe)),void J({eventName:D,payload:{provider:"external",status:"success",txHash:t,address:qe.address,chainId:Xe.chain.id,chainType:"ethereum",value:Xe.value?p(BigInt(Xe.value),xe?.decimals??18):void 0,token:xe?.symbol??Le??"ETH",destinationAddress:Ue,destinationChainId:Fe.id,destinationChainType:"ethereum",destinationValue:$e?p($e,xe?.decimals??18):void 0,destinationToken:xe?.symbol??Le??Fe.nativeCurrency.name}}));je(!1)})().catch(console.error)}),[_e,Xe]),i((()=>{(async()=>{if(!ce||!_e||!qe)return;let e=h(ne.chains).filter((e=>e.id!==Fe.id&&!!e.testnet==!!Fe.testnet));We&&e.unshift(Fe);let t=await G({chains:e,address:qe.address,appId:Y,rpcConfig:X,includeUsdc:ae.funding?.isUSDC}),a=We?t.filter((e=>e.balance>0n)):t.filter((e=>e.balance>$e)),n=We&&t.every((e=>0n===e.balance));if(a.length<1)return void ue(new E(n?`Wallet ${B(qe.address)} doesn't have enough funds to cover gas fees. Top up your wallet and try again.`:`Wallet ${B(qe.address)} does not have enough funds.`,void 0,S.INSUFFICIENT_BALANCE));a.sort(((e,t)=>Number(We?(t.erc20Balance??0n)-(e.erc20Balance??0n):t.balance-e.balance)));let r=a.flatMap((e=>{let t=[{...e,isErc20Quote:!1,isTestnet:!!Fe.testnet,input:R({appId:Y,amount:$e.toString(),user:qe.address,recipient:Ue,destinationChainId:Fe.id,destinationCurrency:Le,originChainId:e.chain.id})}];return We&&Le&&(e.erc20Balance??0n)>=$e&&t.push({...e,isErc20Quote:!0,isTestnet:!!Fe.testnet,input:R({appId:Y,amount:$e.toString(),user:qe.address,recipient:Ue,destinationChainId:Fe.id,destinationCurrency:Le,originChainId:e.chain.id,originCurrency:e.erc20Address})}),t})),i=(await Promise.allSettled(r.map((async e=>({...e,quote:await _(e)}))))).filter((e=>"fulfilled"===e.status)).map((e=>e.value));if(i.length<1)return void ue(new E(`Wallet ${B(qe.address)} does not have enough funds.`,void 0,S.INSUFFICIENT_BALANCE));let o=i.map((e=>({bridgeTx:O(e.quote),balance:e.balance,chain:e.chain,erc20Balance:e.erc20Balance,isErc20Quote:e.isErc20Quote}))).filter((e=>!!e.bridgeTx));if(o.length>1)return void ge(o);let s=o[0];s?(we(!0),Ye({data:s.bridgeTx.data,to:s.bridgeTx.to,value:s.bridgeTx.value,chain:s.chain})):ue(new E(`Wallet ${B(qe.address)} does not have enough funds.`,void 0,S.INSUFFICIENT_BALANCE))})().catch(console.error)}),[ce]),Q({transactionHash:Ne,isTestnet:!!Fe.testnet,bridgingStatus:ke,setBridgingStatus:Be,onSuccess({transactionHash:e}){we(!1),Se(!0),te(x(ae,"completed",e,qe?.walletClientType,We,xe,Fe)),J({eventName:D,payload:{provider:"external",status:"success",txHash:e,address:qe?.address,chainId:Xe.chain.id,chainType:"ethereum",value:Xe.value?p(BigInt(Xe.value),xe?.decimals??18):void 0,token:xe?.symbol??Le??"ETH",destinationAddress:Ue,destinationChainId:Fe.id,destinationChainType:"ethereum",destinationValue:$e?p($e,xe?.decimals??18):void 0,destinationToken:xe?.symbol??Le??Fe.nativeCurrency.name}})},onFailure({error:e}){we(!1),ue(e)}}),i((()=>{me&&(te({funding:ae?.funding,solanaFundingData:ae?.solanaFundingData,sendTransaction:ae?.sendTransaction,errorModalData:{error:me,previousScreen:"TransferFromWalletScreen"}}),ee("ErrorScreen",!1))}),[me]);let Ze=!We&&Ke?H(Pe??"0",Ke):void 0,Je=We?se:q([se,$e]),et=Je&&Ke?W(Je,Ke):void 0,tt=Je?$(Je,ae?.funding?.erc20Address?ae?.funding?.erc20ContractInfo?.symbol||"ETH":ae?.funding?.chain.nativeCurrency.symbol||"ETH"):void 0,at=se&&Ke?W(se,Ke):void 0,nt=se?$(se,Fe?.nativeCurrency?.symbol||"ETH"):void 0;if(i((()=>{if(!Ee)return;let e=setTimeout(Z,b);return()=>clearTimeout(e)}),[Ee]),Ee/*#__PURE__*/)return e(t,{children:[/*#__PURE__*/a(I,{}),/*#__PURE__*/a(f,{}),/*#__PURE__*/e(g,{children:[/*#__PURE__*/a(n,{color:"var(--privy-color-success)",width:"64px",height:"64px"}),/*#__PURE__*/a(C,{title:"Success!",description:`You’ve successfully added ${Pe} ${We?xe.symbol:Fe.nativeCurrency.symbol} to your ${ne.name} wallet. It may take a minute before the funds are available to use.`})]}),/*#__PURE__*/a(v,{}),/*#__PURE__*/a(y,{})]});let rt=We?`${P({amount:Ve,decimals:xe.decimals})} ${xe.symbol}`:$(Qe,Fe.nativeCurrency.symbol,3,!0),it=fe[ve];return fe.length>1&&it?/*#__PURE__*/a(V,{displayName:Re,configuredFundingChain:Fe,erc20ContractInfo:xe,formattedBalance:rt,fundingAmount:Pe,fundingCurrency:We?xe.symbol:Fe.nativeCurrency.symbol,fundingAmountInUsd:Ze,options:fe,selectedOption:it,isPreparing:Ce,isSubmitting:be,addressToFund:Ue,fundingWalletAddress:qe?.address||"",errorMessage:pe,onSubmit:()=>{ae.funding?.amount!==Pe?async function(){if(qe&&it)try{let e=await _({isTestnet:!!Fe.testnet,input:R({appId:Y,amount:$e.toString(),user:qe.address,recipient:Ue,destinationChainId:Fe.id,destinationCurrency:Le,originChainId:it.chain.id})}),t=O(e);if(!t)throw Error("Invalid transaction request");we(!0),Ye({data:t.data,to:t.to,value:t.value,chain:it.chain})}catch(e){console.error(e),ue(new E("Unable to fetch quotes for bridging",e,S.INSUFFICIENT_BALANCE))}}().catch(console.error):Ye({to:it.bridgeTx.to,data:it.bridgeTx.data,value:it.bridgeTx.value,chain:it.chain})},onSelect:e=>{e!==ve&&(he(null),ye(e))},onAmountChange:He}):ie&&se&&qe&&ae?.funding?/*#__PURE__*/a(K,{walletClientType:qe?.walletClientType||"unknown",displayName:Re,addressToFund:Ue,isBridging:Te,isErc20Flow:We,totalPriceInUsd:et,totalPriceInNativeCurrency:tt,gasPriceInUsd:at,gasPriceInNativeCurrency:nt,chainId:Fe.id,chainName:Fe.name}):
|
|
2
|
-
/*#__PURE__*/e(t,{children:[/*#__PURE__*/a(I,{}),/*#__PURE__*/a(T,{}),/*#__PURE__*/a("div",{style:{marginTop:"1rem"}}),/*#__PURE__*/a(y,{})]})}};export{X as AwaitingExternalEthereumTransferScreen,X as default};
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import{jsx as e,jsxs as r}from"react/jsx-runtime";import o from"@heroicons/react/20/solid/CheckIcon";import t from"@heroicons/react/24/outline/EnvelopeIcon";import i from"@heroicons/react/24/outline/PhoneIcon";import{useState as n,useEffect as a}from"react";import{isMobile as c}from"react-device-detect";import{styled as s}from"styled-components";import{H as l}from"./Layouts-BlFm53ED.mjs";import{L as d}from"./Link-DJ5gq9Di.mjs";import{a as p,q as u}from"./context-i_OKSUqt.mjs";import{u as m,h as f,a as v,k as h}from"./internal-context-D4S2Sfvt.mjs";import{a as y,u as g}from"./get-is-unified-wallet-Bon2jknh.mjs";import{s as x}from"./shouldProceedtoEmbeddedWalletCreationFlow-CDHNJbN9.mjs";import{S as E}from"./ScreenLayout-x3-Xgy2E.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"viem";import"./private-privy-provider-B2_rZ8aq.mjs";import"mipd";import"viem/utils";import"@privy-io/popup";import"./paths-BzM95ysC.mjs";import"@scure/base";import"uuid";import"jose";import"eventemitter3";import"zustand";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"js-cookie";import"./events-context-CI0iqAXA.mjs";import"@headlessui/react";import"@privy-io/ethereum";import"@privy-io/urls";import"./ModalHeader-cnW8OaHH.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-DgjLPjok.mjs";import"./index-Dq_xe9dz.mjs";const b=({contactMethod:s,authFlow:p,appName:u="Privy",whatsAppEnabled:m=!1,onBack:f,onCodeSubmit:v,onResend:h,errorMessage:y,success:g=!1,resendCountdown:x=0,onInvalidInput:b,onClearError:A})=>{let[w,T]=n(C);a((()=>{y||T(C)}),[y]);let k=async e=>{e.preventDefault();let r=e.currentTarget.value.replace(" ","");if(""===r)return;if(isNaN(Number(r)))return void b?.("Code should be numeric");A?.();let o=Number(e.currentTarget.name?.charAt(5)),t=[...r||[""]].slice(0,S-o),i=[...w.slice(0,o),...t,...w.slice(o+t.length)];T(i);let n=Math.min(Math.max(o+t.length,0),S-1);if(!isNaN(Number(e.currentTarget.value))){let e=document.querySelector(`input[name=code-${n}]`);e?.focus()}if(i.every((e=>e&&!isNaN(+e)))){let e=document.querySelector(`input[name=code-${n}]`);e?.blur(),await(v?.(i.join("")))}};/*#__PURE__*/return e(E,{title:"Enter confirmation code",subtitle:/*#__PURE__*/r("span","email"===p?{children:["Please check ",/*#__PURE__*/e(M,{children:s})," for an email from privy.io and enter your code below."]}:{children:["Please check ",/*#__PURE__*/e(M,{children:s})," for a",m?" WhatsApp":""," message from ",u," and enter your code below."]}),icon:"email"===p?t:i,onBack:f,showBack:!0,helpText:/*#__PURE__*/r(L,{children:[/*#__PURE__*/r("span",{children:["Didn't get ","email"===p?"an email":"a message","?"]}),x?/*#__PURE__*/r(R,{children:[/*#__PURE__*/e(o,{color:"var(--privy-color-foreground)",strokeWidth:1.33,height:"12px",width:"12px"}),/*#__PURE__*/e("span",{children:"Code sent"})]}):/*#__PURE__*/e(d,{as:"button",size:"sm",onClick:h,children:"Resend code"})]}),children:/*#__PURE__*/e(_,{children:/*#__PURE__*/e(l,{children:/*#__PURE__*/r(I,{children:[/*#__PURE__*/e("div",{children:w.map(((r,o)=>/*#__PURE__*/e("input",{name:`code-${o}`,type:"text",value:w[o],onChange:k,onKeyUp:e=>{"Backspace"===e.key&&(e=>{if(A?.(),T([...w.slice(0,e),"",...w.slice(e+1)]),e>0){let r=document.querySelector(`input[name=code-${e-1}]`);r?.focus()}})(o)},inputMode:"numeric",autoFocus:0===o,pattern:"[0-9]",className:`${g?"success":""} ${y?"fail":""}`,autoComplete:c?"one-time-code":"off"},o)))}),/*#__PURE__*/e(j,{$fail:!!y,$success:g,children:/*#__PURE__*/e("span",{children:"Invalid or expired verification code"===y?"Incorrect code":y||(g?"Success!":"")})})]})})})})};let S=6,C=Array(6).fill("");var A,w,T=((A=T||{})[A.RESET_AFTER_DELAY=0]="RESET_AFTER_DELAY",A[A.CLEAR_ON_NEXT_VALID_INPUT=1]="CLEAR_ON_NEXT_VALID_INPUT",A),k=((w=k||{})[w.EMAIL=0]="EMAIL",w[w.SMS=1]="SMS",w);const N={component:()=>{let{navigate:r,lastScreen:o,navigateBack:t,setModalData:i,onUserCloseViaDialogOrKeybindRef:c}=y(),s=p(),{closePrivyModal:l,resendEmailCode:d,resendSmsCode:E,getAuthMeta:S,loginWithCode:C,updateWallets:A,createAnalyticsEvent:w}=m(),{authenticated:T,logout:k,user:N}=g(),{whatsAppEnabled:_}=p(),[I,j]=n(!1),[L,R]=n(null),[M,D]=n(null),[O,U]=n(0);c.current=()=>null;let P=S()?.email?0:1,W=0===P?S()?.email||"":S()?.phoneNumber||"",$=u-500;a((()=>{if(O){let e=setTimeout((()=>{U(O-1)}),1e3);return()=>clearTimeout(e)}}),[O]),a((()=>{if(T&&I&&N){if(s?.legal.requireUsersAcceptTerms&&!N.hasAcceptedTerms){let e=setTimeout((()=>{r("AffirmativeConsentScreen")}),$);return()=>clearTimeout(e)}if(x(N,s.embeddedWallets)){let e=setTimeout((()=>{i({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),w({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"AwaitingPasswordlessCodeScreen"}}),k()},callAuthOnSuccessOnClose:!0}}),r("EmbeddedWalletOnAccountCreateScreen")}),$);return()=>clearTimeout(e)}{A();let e=setTimeout((()=>l({shouldCallAuthOnSuccess:!0,isSuccess:!0})),u);return()=>clearTimeout(e)}}}),[T,I,N]),a((()=>{if(L&&0===M){let e=setTimeout((()=>{R(null),D(null);let e=document.querySelector("input[name=code-0]");e?.focus()}),1400);return()=>clearTimeout(e)}}),[L,M]);/*#__PURE__*/return e(b,{contactMethod:W,authFlow:0===P?"email":"sms",appName:s?.name,whatsAppEnabled:_,onBack:()=>t(),onCodeSubmit:async e=>{try{await C(e),j(!0)}catch(e){if(e instanceof f&&e.privyErrorCode===v.INVALID_CREDENTIALS)R("Invalid or expired verification code"),D(0);else if(e instanceof f&&e.privyErrorCode===v.CANNOT_LINK_MORE_OF_TYPE)R(e.message);else{if(e instanceof f&&e.privyErrorCode===v.USER_LIMIT_REACHED)return console.error(new h(e).toString()),void r("UserLimitReachedScreen");if(e instanceof f&&e.privyErrorCode===v.USER_DOES_NOT_EXIST)return void r("AccountNotFoundScreen");if(e instanceof f&&e.privyErrorCode===v.LINKED_TO_ANOTHER_USER)return i({errorModalData:{error:e,previousScreen:o??"AwaitingPasswordlessCodeScreen"}}),void r("ErrorScreen",!1);if(e instanceof f&&e.privyErrorCode===v.DISALLOWED_PLUS_EMAIL)return i({inlineError:{error:e}}),void r("ConnectOrCreateScreen",!1);if(e instanceof f&&e.privyErrorCode===v.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce)return i({accountTransfer:{nonce:e.data?.data?.nonce,account:W,displayName:e.data?.data?.account?.displayName,linkMethod:0===P?"email":"sms",embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress}}),void r("LinkConflictScreen");R("Issue verifying code"),D(0)}}},onResend:async()=>{U(30),0===P?await d():await E()},errorMessage:L||void 0,success:I,resendCountdown:O,onInvalidInput:e=>{R(e),D(1)},onClearError:()=>{1===M&&(R(null),D(null))}})}};let _=s.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
align-items: center;
|
|
5
|
-
justify-content: center;
|
|
6
|
-
margin: auto;
|
|
7
|
-
gap: 16px;
|
|
8
|
-
flex-grow: 1;
|
|
9
|
-
width: 100%;
|
|
10
|
-
`,I=s.div`
|
|
11
|
-
display: flex;
|
|
12
|
-
flex-direction: column;
|
|
13
|
-
width: 100%;
|
|
14
|
-
gap: 12px;
|
|
15
|
-
|
|
16
|
-
> div:first-child {
|
|
17
|
-
display: flex;
|
|
18
|
-
justify-content: center;
|
|
19
|
-
gap: 0.5rem;
|
|
20
|
-
width: 100%;
|
|
21
|
-
border-radius: var(--privy-border-radius-sm);
|
|
22
|
-
|
|
23
|
-
> input {
|
|
24
|
-
border: 1px solid var(--privy-color-foreground-4);
|
|
25
|
-
background: var(--privy-color-background);
|
|
26
|
-
border-radius: var(--privy-border-radius-sm);
|
|
27
|
-
padding: 8px 10px;
|
|
28
|
-
height: 48px;
|
|
29
|
-
width: 40px;
|
|
30
|
-
text-align: center;
|
|
31
|
-
font-size: 18px;
|
|
32
|
-
font-weight: 600;
|
|
33
|
-
color: var(--privy-color-foreground);
|
|
34
|
-
transition: all 0.2s ease;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
> input:focus {
|
|
38
|
-
border: 1px solid var(--privy-color-foreground);
|
|
39
|
-
box-shadow: 0 0 0 1px var(--privy-color-foreground);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
> input:invalid {
|
|
43
|
-
border: 1px solid var(--privy-color-error);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
> input.success {
|
|
47
|
-
border: 1px solid var(--privy-color-border-success);
|
|
48
|
-
background: var(--privy-color-success-bg);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
> input.fail {
|
|
52
|
-
border: 1px solid var(--privy-color-border-error);
|
|
53
|
-
background: var(--privy-color-error-bg);
|
|
54
|
-
animation: shake 180ms;
|
|
55
|
-
animation-iteration-count: 2;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
@keyframes shake {
|
|
60
|
-
0% {
|
|
61
|
-
transform: translate(1px, 0px);
|
|
62
|
-
}
|
|
63
|
-
33% {
|
|
64
|
-
transform: translate(-1px, 0px);
|
|
65
|
-
}
|
|
66
|
-
67% {
|
|
67
|
-
transform: translate(-1px, 0px);
|
|
68
|
-
}
|
|
69
|
-
100% {
|
|
70
|
-
transform: translate(1px, 0px);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
`,j=s.div`
|
|
74
|
-
line-height: 20px;
|
|
75
|
-
min-height: 20px;
|
|
76
|
-
font-size: 14px;
|
|
77
|
-
font-weight: 400;
|
|
78
|
-
color: ${e=>e.$success?"var(--privy-color-success-dark)":e.$fail?"var(--privy-color-error-dark)":"transparent"};
|
|
79
|
-
display: flex;
|
|
80
|
-
justify-content: center;
|
|
81
|
-
width: 100%;
|
|
82
|
-
text-align: center;
|
|
83
|
-
`,L=s.div`
|
|
84
|
-
display: flex;
|
|
85
|
-
gap: 8px;
|
|
86
|
-
align-items: center;
|
|
87
|
-
justify-content: center;
|
|
88
|
-
width: 100%;
|
|
89
|
-
color: var(--privy-color-foreground-2);
|
|
90
|
-
`,R=s.div`
|
|
91
|
-
display: flex;
|
|
92
|
-
align-items: center;
|
|
93
|
-
justify-content: center;
|
|
94
|
-
border-radius: var(--privy-border-radius-sm);
|
|
95
|
-
padding: 2px 8px;
|
|
96
|
-
gap: 4px;
|
|
97
|
-
background: var(--privy-color-background-2);
|
|
98
|
-
color: var(--privy-color-foreground-2);
|
|
99
|
-
`,M=s.span`
|
|
100
|
-
font-weight: 500;
|
|
101
|
-
word-break: break-all;
|
|
102
|
-
color: var(--privy-color-foreground);
|
|
103
|
-
`;export{N as AwaitingPasswordlessCodeScreen,b as AwaitingPasswordlessCodeScreenView,N as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t,Fragment as r}from"react/jsx-runtime";import o from"@heroicons/react/24/outline/CheckCircleIcon";import{useRef as n,useState as a,useMemo as i,useEffect as s}from"react";import{parseEther as d}from"viem";import{ConnectedStandardSolanaWallet as c}from"@privy-io/js-sdk-core";import{b as l,c as m,R as u}from"./Layouts-BlFm53ED.mjs";import{B as p}from"./ModalHeader-cnW8OaHH.mjs";import{C as f}from"./ScreenHeader-CHmc4-Lu.mjs";import{t as h}from"./FundWalletMethodHeader-B3nAPYAR.mjs";import{N as g}from"./index-Dq_xe9dz.mjs";import{a as v,t as w}from"./context-i_OKSUqt.mjs";import{u as I,P as y,a as T}from"./internal-context-D4S2Sfvt.mjs";import{af as C,a5 as S,ab as j,a$ as b,b0 as A}from"./private-privy-provider-B2_rZ8aq.mjs";import{a as N}from"./get-is-unified-wallet-Bon2jknh.mjs";import{O as F}from"./analytics-mkkvFRju.mjs";import{g as U,t as E,d as k,a as x,b as R,u as W}from"./reservoir-DNdkSA7R.mjs";import{T as L}from"./TransferOrBridgeLoadingScreen-DZ1diPi7.mjs";import"styled-components";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"tinycolor2";import"ofetch";import"mipd";import"react-device-detect";import"viem/utils";import"@privy-io/popup";import"./paths-BzM95ysC.mjs";import"@scure/base";import"uuid";import"jose";import"eventemitter3";import"zustand";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"js-cookie";import"./events-context-CI0iqAXA.mjs";import"@headlessui/react";import"@privy-io/ethereum";import"@privy-io/urls";import"./InjectedWalletIcon-DLcYOGDj.mjs";import"@heroicons/react/24/outline/WalletIcon";import"./Row-C9vrS4Zi.mjs";import"./Value-tcJV9e0L.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"./Address-CDF4d_Ha.mjs";import"lucide-react";import"./NetworkIcon-B48ilzF8.mjs";import"@heroicons/react/24/outline/GlobeAltIcon";const $={component:function(){let $=v(),{closePrivyModal:B,createAnalyticsEvent:D,connectors:H}=I(),{navigate:M,setModalData:P,data:O}=N(),_=v(),q=n(!1),Q=C(),[V,z]=a(!1),[G,X]=a(!1),[Y,J]=a(null),[K,Z]=a(),[ee,te]=a();if(!O?.funding||"ethereum"!==O.funding.chainType)throw Error("Invalid funding data");let{amount:re,connectedWallet:oe,chain:ne,solanaChain:ae,isUSDC:ie}=O.funding,se=O.funding.address,de=O.funding.erc20Address,ce=O.funding.isUSDC?"USDC":ne.nativeCurrency.symbol,le=i((()=>"solana"===oe?.type?oe.provider:function({connectors:e,connectedWalletAddress:t}){let r=e.find((e=>"solana"===e.chainType&&e.wallets.some((e=>e.address===t)))),o=r?.wallet.accounts.find((e=>e.address===t));if(!r||!o)throw new y("Unable to find source wallet connector");return new c({wallet:r.wallet,account:o})}({connectors:H,connectedWalletAddress:oe?.address||""})),[oe,H]),me=i((()=>{let e=Q(S);if(!e)throw new y("Unable to load solana plugin");let t=$.solanaRpcs["solana:mainnet"];if(!t)throw new y("Unable to load mainnet RPC");return e.getSolanaRpcClient({rpc:t.rpc,rpcSubscriptions:t.rpcSubscriptions,chain:"solana:mainnet",blockExplorerUrl:t.blockExplorerUrl??"https://explorer.solana.com"})}),[]),ue=j(b(le?.standardWallet.name||"unknown")),pe=ue?.name||"wallet";return s((()=>{(async function(){if(!le||!ne||q.current)return;let e=Q(S);if(!e)return void J(new y("Unable to solana plugin"));q.current=!0,ne?.testnet&&console.warn("Solana testnets are not supported for bridging");let t=ie?1e6*parseFloat(re):d(re),r=await U({isTestnet:!!ne.testnet,input:E({appId:_.id,amount:t.toString(),user:le.address,recipient:se,destinationChainId:ne.id,originChainId:R,originCurrency:ie?k:x,destinationCurrency:ie?de:void 0})}).catch(console.error);if(!r)return void J(new y(`Unable to fetch quotes for bridging. Wallet ${A(le.address)} does not have enough funds.`,void 0,T.INSUFFICIENT_BALANCE));let o=await e.createTransactionFromRelayQuote({quote:r,source:le.address,solanaClient:me});if(o)try{z(!0);let t=await e.simulateTransaction({solanaClient:me,tx:o});if(t.hasError)return t.hasFunds?(console.error("Transaction failed:",t.error),void J(new y("Something went wrong",void 0,T.TRANSACTION_FAILURE))):void J(new y(`Wallet ${A(le?.address)} does not have enough funds. ${r.details.currencyIn.amountFormatted} ${ce} are needed to complete the transaction.`,void 0,T.INSUFFICIENT_BALANCE));let{signature:n}=await le.signAndSendTransaction({chain:"solana:mainnet",transaction:o}),a=e.getAddressFromBuffer(n);Z(a),te("pending")}catch(e){if(console.error(e),/user rejected the request/gi.test(e.message||""))return void J(new y("Transaction was rejected by the user",void 0,T.TRANSACTION_FAILURE));J(new y("Something went wrong",void 0,T.TRANSACTION_FAILURE))}else J(new y(`Unable to select bridge option from quotes. Wallet ${A(le.address)} does not have enough funds.`,void 0,T.INSUFFICIENT_BALANCE))})().catch(console.error)}),[]),W({transactionHash:K,isTestnet:!1,bridgingStatus:ee,setBridgingStatus:te,onSuccess({transactionHash:e}){z(!1),X(!0),D({eventName:F,payload:{provider:"external",status:"success",txHash:e,address:le.address,chainType:"solana",clusterName:ae,token:"SOL",destinationAddress:se,destinationChainId:ne.id,destinationChainType:"ethereum",destinationValue:re,destinationToken:ie?"USDC":"ETH"}})},onFailure({error:e}){z(!1),J(e)}}),s((()=>{if(!G)return;let e=setTimeout(B,w);return()=>clearTimeout(e)}),[G]),s((()=>{Y&&(P({funding:O?.funding,solanaFundingData:O?.solanaFundingData,sendTransaction:O?.sendTransaction,errorModalData:{error:Y,previousScreen:"TransferFromWalletScreen"}}),M("ErrorScreen",!1))}),[Y]),G?/*#__PURE__*/e(r,{children:[/*#__PURE__*/t(h,{}),/*#__PURE__*/t(l,{}),/*#__PURE__*/e(m,{children:[/*#__PURE__*/t(o,{color:"var(--privy-color-success)",width:"64px",height:"64px"}),/*#__PURE__*/t(f,{title:"Success!",description:`You’ve successfully added ${re} ${ce} to your ${_.name} wallet. It may take a minute before the funds are available to use.`})]}),/*#__PURE__*/t(u,{}),/*#__PURE__*/t(p,{})]}):V&&le?/*#__PURE__*/t(L,{walletClientType:b(le?.standardWallet.name||"unknown"),displayName:pe,addressToFund:se,isBridging:V,isErc20Flow:!1,chainId:ne.id,chainName:ne.name,totalPriceInUsd:void 0,totalPriceInNativeCurrency:void 0,gasPriceInUsd:void 0,gasPriceInNativeCurrency:void 0}):
|
|
2
|
-
/*#__PURE__*/e(r,{children:[/*#__PURE__*/t(h,{}),/*#__PURE__*/t(g,{}),/*#__PURE__*/t("div",{style:{marginTop:"1rem"}}),/*#__PURE__*/t(p,{})]})}};export{$ as AwaitingSolToEvmBridgingScreen,$ as default};
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import{createPublicClient as e,http as r}from"viem";import{UsdcAddressMap as a,formatWalletAddress as o}from"@privy-io/js-sdk-core";import{q as i}from"./private-privy-provider-B2_rZ8aq.mjs";import{g as n}from"./getErc20Balance-BDNkB-EL.mjs";import{jsx as t,jsxs as s,Fragment as c}from"react/jsx-runtime";import{useRef as m}from"react";import{c as l,B as d}from"./ModalHeader-cnW8OaHH.mjs";import{b as h,R as p}from"./Layouts-BlFm53ED.mjs";import{t as u}from"./FundWalletMethodHeader-B3nAPYAR.mjs";import{R as f}from"./Row-C9vrS4Zi.mjs";import{E as g}from"./ErrorMessage-D8VaAP5m.mjs";import{V as b,L as y}from"./Value-tcJV9e0L.mjs";import{S as v}from"./Subtitle-CV-2yKE4.mjs";import{T as j}from"./Title-BnzYV3Is.mjs";import w from"@heroicons/react/24/outline/WalletIcon";import{styled as C}from"styled-components";import{g as k}from"./getChainName-DjpPdUSc.mjs";import{C as x}from"./Chip-D2-wZOHJ.mjs";import{N}from"./NetworkIcon-B48ilzF8.mjs";import{B as T,a as B}from"./shared-FM0rljBt.mjs";import{Menu as $,MenuButton as I,MenuItems as S,MenuItem as A}from"@headlessui/react";import E from"@heroicons/react/24/outline/ChevronDownIcon";import{f as F}from"./formatErc20TokenAmount-BuPk9xcy.mjs";import{g as M}from"./ethers-Cr0T35kS.mjs";import{F as P,a as L,b as R,c as W,d as H}from"./styles-Fji1ReGu.mjs";const Q=({chains:o,appId:t,address:s,rpcConfig:c,includeUsdc:m})=>Promise.all(o.map((async o=>{let l=e({chain:o,transport:r(i(o,c,t))}),d=await l.getBalance({address:s}).catch((()=>0n)),h=null,p=a[o.id];if(m&&p){let{balance:e}=await n({address:s,chain:o,rpcConfig:c,appId:t,erc20Address:p});h=e}return{balance:d,erc20Balance:h,erc20Address:p,chain:o}}))),U=({balance:e,className:r,chain:a})=>/*#__PURE__*/t(T,{className:r,$state:void 0,children:/*#__PURE__*/t(V,{balance:e,chain:a})}),V=({balance:e,chain:r})=>/*#__PURE__*/s(c,{children:[/*#__PURE__*/s(q,{children:[/*#__PURE__*/t(D,{chainId:"object"==typeof r?r.id:"solana"}),/*#__PURE__*/t(b,{children:"object"==typeof r?r.name:k(r)})]}),/*#__PURE__*/s(x,{isLoading:!1,isPulsing:!1,color:"gray",children:[/*#__PURE__*/t(z,{children:/*#__PURE__*/t(w,{})}),e]})]});let q=C.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
`,z=C.div`
|
|
5
|
-
height: 0.75rem;
|
|
6
|
-
width: 0.75rem;
|
|
7
|
-
margin-right: 0.2rem;
|
|
8
|
-
`,D=C(N)`
|
|
9
|
-
height: 1.25rem;
|
|
10
|
-
width: 1.25rem;
|
|
11
|
-
display: inline-block;
|
|
12
|
-
margin-right: 0.5rem;
|
|
13
|
-
border-radius: 4px;
|
|
14
|
-
`;const G=({options:e,onSelect:r,selected:a,className:o})=>/*#__PURE__*/s($,{as:O,children:[/*#__PURE__*/s(I,{as:X,children:[/*#__PURE__*/t(V,{balance:a.balance,chain:a.chain}),/*#__PURE__*/t(K,{height:16})]}),/*#__PURE__*/t(S,{as:Y,className:o,children:e.map(((e,a)=>/*#__PURE__*/t(A,{as:J,onClick:()=>r(a),children:/*#__PURE__*/t(V,{balance:e.balance,chain:e.chain})},a)))})]});let O=C.div`
|
|
15
|
-
width: 100%;
|
|
16
|
-
position: relative;
|
|
17
|
-
`,Y=C.div`
|
|
18
|
-
width: 100%;
|
|
19
|
-
margin-top: 0.5rem;
|
|
20
|
-
position: absolute;
|
|
21
|
-
background-color: var(--privy-color-background);
|
|
22
|
-
border-radius: var(--privy-border-radius-md);
|
|
23
|
-
overflow-x: hidden;
|
|
24
|
-
overflow-y: auto;
|
|
25
|
-
box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
|
|
26
|
-
max-height: 11.75rem;
|
|
27
|
-
|
|
28
|
-
&& {
|
|
29
|
-
border: solid 1px var(--privy-color-foreground-4);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
z-index: 1;
|
|
33
|
-
`,J=C.button`
|
|
34
|
-
width: 100%;
|
|
35
|
-
display: flex;
|
|
36
|
-
justify-content: space-between;
|
|
37
|
-
|
|
38
|
-
&& {
|
|
39
|
-
padding: 1rem;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
:not(:last-child) {
|
|
43
|
-
border-bottom: solid 1px var(--privy-color-foreground-4);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
:hover {
|
|
47
|
-
background: var(--privy-color-background-2);
|
|
48
|
-
}
|
|
49
|
-
`,K=C(E)`
|
|
50
|
-
height: 1rem;
|
|
51
|
-
margin-left: 0.5rem;
|
|
52
|
-
`,X=C.button`
|
|
53
|
-
${B}
|
|
54
|
-
|
|
55
|
-
/* Push the chip all the way to the right */
|
|
56
|
-
span {
|
|
57
|
-
margin-left: auto;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
${K} {
|
|
61
|
-
transition: rotate 100ms ease-in;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
&[aria-expanded='true'] {
|
|
65
|
-
${K} {
|
|
66
|
-
rotate: -180deg;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
`;const Z=({displayName:e,errorMessage:r,configuredFundingChain:a,formattedBalance:i,fundingAmount:n,fundingCurrency:b,fundingAmountInUsd:w,options:C,selectedOption:x,isPreparing:N,isSubmitting:T,addressToFund:B,fundingWalletAddress:$,onSubmit:I,onSelect:S,onAmountChange:A,erc20ContractInfo:E})=>{let Q=m(null);/*#__PURE__*/return s(c,{children:[/*#__PURE__*/t(u,{}),/*#__PURE__*/t(h,{}),/*#__PURE__*/t(j,{children:"Transfer from another network"}),/*#__PURE__*/s(v,{children:["You need more funds on the"," ","object"==typeof a?a.name:k(a)," ","network. Bridge from another blockchain network."]}),/*#__PURE__*/s(P,{style:{marginTop:"2rem"},children:[/*#__PURE__*/s(L,{onClick:()=>Q.current?.focus(),children:[/*#__PURE__*/t(R,{ref:Q,value:n,onChange:e=>{let r=e.target.value;if(/^[0-9.]*$/.test(r)&&r.split(".").length-1<=1){let e=/\.$/.test(r)?".":"",a=Number(r.replace(/\.$/,"")||"0");if(Number.isNaN(a))return void A("0");A(a.toString()+e)}}}),/*#__PURE__*/t(W,{children:b})]}),w&&/*#__PURE__*/t(H,{children:w})]}),/*#__PURE__*/s(f,{style:{marginTop:"1.5rem"},children:[/*#__PURE__*/t(y,{children:"From"}),/*#__PURE__*/t(y,{children:o($)})]}),/*#__PURE__*/t(G,{selected:{chain:x.chain,balance:x.isErc20Quote?F({amount:x.erc20Balance??0n,decimals:E?.decimals??6})+` ${E?.symbol||""}`:M(x.balance,x.chain.nativeCurrency.symbol,3,!0)},options:C.map((({chain:e,balance:r,isErc20Quote:a,erc20Balance:o})=>({chain:e,balance:a?F({amount:o??0n,decimals:E?.decimals??6})+` ${E?.symbol||""}`:M(r,e.nativeCurrency.symbol,3,!0)}))),onSelect:S}),/*#__PURE__*/s(f,{style:{marginTop:"1.5rem"},children:[/*#__PURE__*/t(y,{children:"To"}),/*#__PURE__*/t(y,{children:o(B)})]}),/*#__PURE__*/t(U,{chain:a,balance:i}),/*#__PURE__*/t(g,{style:{marginTop:"1rem"},children:r}),/*#__PURE__*/s(l,{style:{marginTop:"1rem"},loading:T||N,disabled:N||T,onClick:I,children:["Confirm with ",e]}),/*#__PURE__*/t(p,{}),/*#__PURE__*/t(d,{})]})};export{Z as B,Q as g};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{CheckCircle as t,XCircle as r}from"lucide-react";import{useMemo as i,useRef as o,useState as a,useEffect as n}from"react";import{f as s,C as c}from"./private-privy-provider-B2_rZ8aq.mjs";import{a as u}from"./get-is-unified-wallet-Bon2jknh.mjs";import{S as m}from"./ScreenLayout-x3-Xgy2E.mjs";import"mipd";import"react-device-detect";import"viem/utils";import"@privy-io/js-sdk-core";import"@privy-io/popup";import"./internal-context-D4S2Sfvt.mjs";import"ofetch";import"./paths-BzM95ysC.mjs";import"@scure/base";import"viem";import"uuid";import"jose";import"eventemitter3";import"zustand";import"./context-i_OKSUqt.mjs";import"tinycolor2";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"js-cookie";import"styled-components";import"./events-context-CI0iqAXA.mjs";import"@headlessui/react";import"@privy-io/ethereum";import"@privy-io/urls";import"./ModalHeader-cnW8OaHH.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-DgjLPjok.mjs";import"./index-Dq_xe9dz.mjs";const l=({status:o,title:a,description:n,userIntentRequired:s,retriesRemaining:c,hasSelectedCta:u,onContinue:l,onRetry:p})=>{let d=i((()=>{switch(o){case"loading":default:return;case"success":return s?{label:u?"Continuing...":"Continue",onClick:l,disabled:u,loading:u}:void 0;case"error":return c>0?{label:"Retry",onClick:p}:void 0}}),[o,u,l,p]),y=i((()=>({loading:"loading",ready:"subtle",disabled:"subtle",success:"success",error:"error"}[o]||"loading")),[o]);/*#__PURE__*/return e(m,{icon:"loading"===o||"ready"===o?void 0:"success"===o?t:r,iconVariant:y,title:a,subtitle:n,primaryCta:d,watermark:!0})},p={component:()=>{let{lastScreen:t,data:r,navigate:i,setModalData:m}=u(),{status:p,token:d,waitForResult:y,reset:g,execute:h}=s(),v=o([]),f=e=>{v.current=[e,...v.current]},[C,j]=a(!0);n((()=>(f(setTimeout(j,1e3,!1)),()=>{v.current.forEach((e=>clearTimeout(e))),v.current=[]})),[]);let[k,b]=a(""),[w,R]=a("Checking that you are a human..."),[S,I]=a(!1),[T,x]=a(3),q=r?.captchaModalData,A=async e=>{try{await(q?.callback(e)),q?.onSuccessNavigateTo&&i(q?.onSuccessNavigateTo,!1)}catch(e){if(e instanceof c)return;m({errorModalData:{error:e,previousScreen:t||"LandingScreen"}}),i(q?.onErrorNavigateTo||"ErrorScreen",!1)}};n((()=>{"success"===p?f(setTimeout((async()=>{let e=await y();!e||q?.userIntentRequired||A(e)}),1e3)):"ready"===p&&f(setTimeout((()=>{"ready"===p&&h()}),500))}),[p]),n((()=>{if(!C)switch(p){case"success":b("Success!"),R("CAPTCHA passed successfully."),q?.userIntentRequired||setTimeout((()=>{I(!0),A(d)}),2e3);break;case"loading":b(""),R("Checking that you are a human...");break;case"error":b("Something went wrong"),R(T<=0?"If you use an adblocker or VPN, try disabling and re-attempting.":"You did not pass CAPTCHA. Please try again.")}}),[p,C,S]);/*#__PURE__*/return e(l,{status:p,title:k,description:w,userIntentRequired:q?.userIntentRequired,retriesRemaining:T,hasSelectedCta:S,onContinue:()=>{I(!0),A(d)},onRetry:async()=>{if(T<=0)return;x((e=>e-1)),g(),h();let e=await y();!e||q?.userIntentRequired||A(e)}})}};export{p as CaptchaScreen,l as CaptchaScreenView,p as default};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import{jsxs as e,Fragment as r,jsx as t}from"react/jsx-runtime";import o from"@heroicons/react/24/solid/ArrowsRightLeftIcon";import i from"@heroicons/react/24/solid/CheckCircleIcon";import{useState as n,useRef as a,useEffect as s,useMemo as c}from"react";import{styled as l}from"styled-components";import{M as m,B as d,P as u}from"./ModalHeader-cnW8OaHH.mjs";import{a as p}from"./Layouts-BlFm53ED.mjs";import{ao as f,b2 as g,ba as h}from"./private-privy-provider-B2_rZ8aq.mjs";import{u as v}from"./internal-context-D4S2Sfvt.mjs";import{a as y}from"./get-is-unified-wallet-Bon2jknh.mjs";import{O as b}from"./analytics-mkkvFRju.mjs";import"./context-i_OKSUqt.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";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"mipd";import"react-device-detect";import"viem/utils";import"@privy-io/popup";import"./paths-BzM95ysC.mjs";import"@scure/base";import"viem";import"uuid";import"jose";import"eventemitter3";import"zustand";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"ofetch";import"js-cookie";import"./events-context-CI0iqAXA.mjs";import"@headlessui/react";import"@privy-io/ethereum";import"@privy-io/urls";const w={component:()=>{let{data:o,setModalData:i,navigate:c,navigateBack:l}=y(),{closePrivyModal:u,createAnalyticsEvent:p,client:f}=v(),[g,h]=n("pending-in-flow"),w=a(0),C={...o?.funding,showAlternateFundingMethod:!0};C.usingDefaultFundingMethod&&(C.usingDefaultFundingMethod=!1);let{partnerUserId:k,popup:I}=o?.coinbaseOnrampStatus??{};return s((()=>{if("pending-in-flow"===g||"pending-after-flow"===g){let e=setInterval((async()=>{if(k)try{let{status:e}=await f.getCoinbaseOnRampStatus({partnerUserId:k});if("success"===e)return void h("success");if("failure"===e)throw Error("There was an error completing Coinbase Onramp flow.");if(w.current>=3)return i({funding:C,solanaFundingData:o?.solanaFundingData}),void c("FundingMethodSelectionScreen");I?.closed&&(w.current=w.current+1,h("pending-after-flow"))}catch(e){console.error(e),h("error"),p({eventName:b,payload:{status:"failure",provider:"coinbase-onramp",error:e.message}}),i({funding:{...C,errorMessage:"Something went wrong adding funds. Please try again or use another method."},solanaFundingData:o?.solanaFundingData}),c("FundingMethodSelectionScreen")}}),1500);return()=>clearInterval(e)}}),[k,I,g]),/*#__PURE__*/e(r,{children:[/*#__PURE__*/t(m,{title:"Fund account",backFn:()=>{i({funding:C,solanaFundingData:o?.solanaFundingData}),l()}},"header"),/*#__PURE__*/t(j,{status:g,onClickCta:u}),/*#__PURE__*/t(d,{})]})}};let j=({status:o,onClickCta:i})=>{let{title:n,body:a,cta:s}=c((()=>(e=>{switch(e){case"success":return{title:"You've funded your account!",body:"It may take a few minutes for the assets to appear.",cta:"Continue"};case"pending-after-flow":return{title:"In Progress",body:"Almost done. Retrieving transaction status from Coinbase",cta:""};case"error":case"pending-in-flow":return{title:"In Progress",body:"Go back to Coinbase Onramp to finish funding your account.",cta:""}}})(o)),[o]);/*#__PURE__*/return e(r,{children:[/*#__PURE__*/e(I,{children:[/*#__PURE__*/t(C,{isSucccess:"success"===o}),/*#__PURE__*/e(p,{children:[/*#__PURE__*/t("h3",{children:n}),/*#__PURE__*/t(k,{children:a})]})]}),s&&/*#__PURE__*/t(u,{onClick:i,children:s})]})},C=({isSucccess:r})=>{if(!r){let r="var(--privy-color-foreground-4)";/*#__PURE__*/return e("div",{style:{position:"relative"},children:[/*#__PURE__*/t(f,{color:r,style:{position:"absolute"}}),/*#__PURE__*/t(g,{color:r}),/*#__PURE__*/t(h,{style:{position:"absolute",width:"2.8rem",height:"2.8rem",top:"1.2rem",left:"1.2rem"}})]})}let n=r?i:()=>/*#__PURE__*/t(o,{width:"3rem",height:"3rem",style:{backgroundColor:"var(--privy-color-foreground-4)",color:"var(--privy-color-background)",borderRadius:"100%",padding:"0.5rem",margin:"0.5rem"}}),a=r?"var(--privy-color-success)":"var(--privy-color-foreground-4)";/*#__PURE__*/return t("div",{style:{borderColor:a,display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"100%",borderWidth:2,padding:"0.5rem",marginBottom:"0.5rem"},children:n&&/*#__PURE__*/t(n,{width:"4rem",height:"4rem",color:a})})},k=l.p`
|
|
2
|
-
font-size: 1rem;
|
|
3
|
-
color: var(--privy-color-foreground-3);
|
|
4
|
-
margin-bottom: 1rem;
|
|
5
|
-
display: flex;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
gap: 1rem;
|
|
8
|
-
`,I=l.div`
|
|
9
|
-
display: flex;
|
|
10
|
-
flex-direction: column;
|
|
11
|
-
align-items: center;
|
|
12
|
-
justify-content: center;
|
|
13
|
-
margin-left: 1.75rem;
|
|
14
|
-
margin-right: 1.75rem;
|
|
15
|
-
padding: 2rem 0;
|
|
16
|
-
`;export{w as CoinbaseOnrampStatusScreen,w as default};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{jsxs as e,Fragment as r,jsx as a}from"react/jsx-runtime";import{Mail as i}from"lucide-react";import{forwardRef as t,useState as o,useEffect as n}from"react";import{styled as l}from"styled-components";import{a as s}from"./context-i_OKSUqt.mjs";import{u as c,c as m,a as d}from"./internal-context-D4S2Sfvt.mjs";import{f as p,V as u,aH as h,ar as g}from"./private-privy-provider-B2_rZ8aq.mjs";import{u as f,a as y}from"./get-is-unified-wallet-Bon2jknh.mjs";import{E,P as S}from"./ModalHeader-cnW8OaHH.mjs";import{C as v}from"./Chip-D2-wZOHJ.mjs";import{I as b,a as k}from"./EmailInputForm-Dgoii4vf.mjs";import{E as C}from"./ErrorMessage-D8VaAP5m.mjs";const j=/*#__PURE__*/t(((t,l)=>{let[g,b]=o(t.defaultValue||""),[k,j]=o(""),[T,A]=o(!1),{authenticated:L}=f(),{initLoginWithEmail:M}=c(),{navigate:D,setModalData:I,currentScreen:U,data:N}=y(),{enabled:F,token:H}=p(),[R,V]=o(!1),{accountType:W}=u(),$=s();n((()=>{!g&&$.disablePlusEmails&&N?.inlineError?.error instanceof m&&N?.inlineError?.error.privyErrorCode===d.DISALLOWED_PLUS_EMAIL&&!k&&j("Please enter a valid email address without a '+'."),k&&j("")}),[g]);let _=h(g),q=T||!_,B=()=>{var e;I({login:N?.login,inlineError:void 0}),!F||H||L?(e=H,A(!0),M({email:g,captchaToken:e,disableSignup:N?.login?.disableSignup,withPrivyUi:!0}).then((()=>{D("AwaitingPasswordlessCodeScreen")})).catch((e=>{I({errorModalData:{error:e,previousScreen:U||"LandingScreen"}}),D("ErrorScreen")})).finally((()=>{A(!1)}))):(I({captchaModalData:{callback:e=>M({email:g,captchaToken:e,withPrivyUi:!0}),userIntentRequired:!1,onSuccessNavigateTo:"AwaitingPasswordlessCodeScreen",onErrorNavigateTo:"ErrorScreen"}}),D("CaptchaScreen"))};/*#__PURE__*/return e(r,{children:[/*#__PURE__*/e(w,{children:[k&&/*#__PURE__*/a(C,{style:{display:"block",marginTop:"0.25rem",textAlign:"left"},children:k}),/*#__PURE__*/e(P,{stacked:t.stacked,$error:!!k,children:[/*#__PURE__*/a(x,{children:/*#__PURE__*/a(i,{})}),/*#__PURE__*/a("input",{ref:l,id:"email-input",className:"login-method-button",type:"email",placeholder:"your@email.com",onFocus:()=>V(!0),onChange:e=>b(e.target.value),onKeyUp:e=>{"Enter"===e.key&&B()},value:g,autoComplete:"email"}),"email"!==W||R?t.stacked?/*#__PURE__*/a("span",{}):/*#__PURE__*/a(E,{isSubmitting:T,onClick:B,disabled:q,children:"Submit"}):/*#__PURE__*/a(v,{color:"gray",children:"Recent"})]})]}),t.stacked?/*#__PURE__*/a(S,{loadingText:null,loading:T,disabled:q,onClick:B,style:{width:"100%"},children:"Submit"}):null]})}));let w=b,P=k,x=l(g)`
|
|
2
|
-
display: inline-flex;
|
|
3
|
-
`;export{j as C};
|
|
@@ -1,9 +0,0 @@
|
|
|
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-Bon2jknh.mjs";import{S as n}from"./ScreenLayout-x3-Xgy2E.mjs";import{b9 as p}from"./private-privy-provider-B2_rZ8aq.mjs";import"viem";import"react";import"./context-i_OKSUqt.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./internal-context-D4S2Sfvt.mjs";import"ofetch";import"./ModalHeader-cnW8OaHH.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-DgjLPjok.mjs";import"./index-Dq_xe9dz.mjs";import"mipd";import"react-device-detect";import"viem/utils";import"@privy-io/popup";import"./paths-BzM95ysC.mjs";import"@scure/base";import"uuid";import"jose";import"eventemitter3";import"zustand";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"js-cookie";import"./events-context-CI0iqAXA.mjs";import"@headlessui/react";import"@privy-io/ethereum";import"@privy-io/urls";const a=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"})})}),m=({onContinueWithLedger:o,onContinueWithoutLedger:r,title:m="Phantom supports Ledger",subtitle:s="Are you using a Ledger hardware wallet?\nContinue to sign with Ledger"})=>/*#__PURE__*/t(n,{title:m,subtitle:/*#__PURE__*/t(d,{children:s}),primaryCta:{label:"Continue with Ledger",onClick:o},secondaryCta:{label:"Continue without Ledger",onClick:r},watermark:!0,children:/*#__PURE__*/e(l,{children:[/*#__PURE__*/t(p,{style:{width:"48px",height:"48px"}}),/*#__PURE__*/t(i,{strokeWidth:2,color:"var(--privy-color-icon-subtle)",width:22,height:22}),/*#__PURE__*/t(a,{style:{width:"48px",height:"48px"}})]})});function s(){let{data:e,setModalData:i,navigate:o}=r();/*#__PURE__*/return t(m,{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:s};let l=o.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
justify-content: center;
|
|
5
|
-
gap: 8px;
|
|
6
|
-
margin-bottom: var(--screen-space);
|
|
7
|
-
`,d=o.span`
|
|
8
|
-
white-space: pre-wrap;
|
|
9
|
-
`;export{c as ConnectLedgerScreen,s as ConnectLedgerScreenComponent,m as ConnectLedgerScreenView,c as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{useRef as t}from"react";import{a as o}from"./context-i_OKSUqt.mjs";import{u as r,c as i,a as n}from"./internal-context-D4S2Sfvt.mjs";import{a}from"./events-context-CI0iqAXA.mjs";import{a as l}from"./get-is-unified-wallet-Bon2jknh.mjs";import{i as c}from"./ConnectWalletView-BtuPwm-c.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"./ModalHeader-cnW8OaHH.mjs";import"./private-privy-provider-B2_rZ8aq.mjs";import"mipd";import"viem/utils";import"@privy-io/popup";import"./paths-BzM95ysC.mjs";import"@scure/base";import"uuid";import"jose";import"eventemitter3";import"zustand";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"js-cookie";import"@headlessui/react";import"@privy-io/ethereum";import"@privy-io/urls";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"@heroicons/react/24/outline/CheckIcon";import"./copy-Bx2Jwc5_.mjs";import"./Link-DJ5gq9Di.mjs";import"./QrCode-BVe4kf2z.mjs";import"qrcode";import"./EmailInputForm-Dgoii4vf.mjs";import"./ErrorMessage-D8VaAP5m.mjs";import"./useI18n-DleS41MU.mjs";import"./WalletCards-DH1rqayz.mjs";import"./state-BG13el3v.mjs";import"./Screen-DgjLPjok.mjs";import"./index-Dq_xe9dz.mjs";const m={component:()=>{let{closePrivyModal:m}=r(),{data:p,navigate:s}=l(),d=o(),u=a(),C=p?.externalConnectWallet?.description,h=t(p?.externalConnectWallet?.walletList??d.appearance.walletList),j=t(p?.externalConnectWallet?.walletChainType??d.appearance.walletChainType);/*#__PURE__*/return e(c,{walletList:h.current,walletChainType:j.current,preSelectedWalletId:p?.externalConnectWallet?.preSelectedWalletId,hideHeader:p?.externalConnectWallet?.hideHeader,onBack:p?.funding?()=>s("FundingMethodSelectionScreen"):void 0,onClose:()=>{u("connectWallet","onError",n.GENERIC_CONNECT_WALLET_ERROR),m()},onConnect:({connector:e,wallet:t})=>{u("connectWallet","onSuccess",{wallet:t});let o=p?.externalConnectWallet?.onCompleteNavigateTo;o?s(o({address:t.address,walletClientType:e?.walletClientType,walletChainType:e?.chainType})):m()},onConnectError:e=>{e instanceof i?(console.warn(e.cause?e.cause:e.message),u("connectWallet","onError",e.privyErrorCode||n.GENERIC_CONNECT_WALLET_ERROR)):(console.warn(e),u("connectWallet","onError",n.UNKNOWN_CONNECT_WALLET_ERROR))},customDescription:C,app:d,connectOnly:!0})},isUnauthenticatedScreem:!0};export{m as ConnectOnlyLandingScreen,m as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{useState as t,useEffect as o}from"react";import{isMobile as n}from"react-device-detect";import{aa as r,ab as i,ac as a}from"./private-privy-provider-B2_rZ8aq.mjs";import{q as l}from"./context-i_OKSUqt.mjs";import{u as c}from"./internal-context-D4S2Sfvt.mjs";import{a as s}from"./get-is-unified-wallet-Bon2jknh.mjs";import{S as m}from"./ScreenLayout-x3-Xgy2E.mjs";import{getErrorDetails as p}from"./ConnectionStatusScreen-d8tOwFAz.mjs";import"mipd";import"viem/utils";import"@privy-io/js-sdk-core";import"@privy-io/popup";import"./paths-BzM95ysC.mjs";import"@scure/base";import"viem";import"uuid";import"jose";import"eventemitter3";import"zustand";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"ofetch";import"js-cookie";import"styled-components";import"./events-context-CI0iqAXA.mjs";import"@headlessui/react";import"@privy-io/ethereum";import"@privy-io/urls";import"tinycolor2";import"./ModalHeader-cnW8OaHH.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-DgjLPjok.mjs";import"./index-Dq_xe9dz.mjs";import"./Link-DJ5gq9Di.mjs";import"./useI18n-DleS41MU.mjs";import"./shouldProceedtoEmbeddedWalletCreationFlow-CDHNJbN9.mjs";const u=({walletLogo:t,success:o,errorMessage:n,title:i,subtitle:a,onRetry:l,onUseDifferentWallet:c,onBack:s,numRetries:p,maxRetries:u})=>/*#__PURE__*/e(m,{title:i,subtitle:a,icon:t,iconVariant:"loading",iconLoadingStatus:{success:o,fail:!!n},primaryCta:n===r.ERROR_USER_EXISTS?{label:"Use a different wallet",onClick:c}:!o&&n?.retryable&&p<u?{label:"Retry",onClick:l,disabled:!n?.retryable||p>=u}:!o&&n&&p>=u?{label:"Use a different wallet",onClick:c}:void 0,onBack:s,watermark:!0}),d={component:()=>{let r,{navigateBack:m,navigate:d,lastScreen:w,currentScreen:f,data:y,setModalData:g}=s(),{walletConnectionStatus:h,closePrivyModal:v}=c(),[k,C]=t(void 0),[j,b]=t(0),S=i(h?.connector?.walletClientType||"unknown"),x="connected"===h?.status,R="switching_to_supported_chain"===h?.status;o((()=>{if(x){let e;if(y?.externalConnectWallet?.onCompleteNavigateTo){let t=y.externalConnectWallet.onCompleteNavigateTo,o=h.connectedWallet?.address;e=setTimeout((()=>{if(y.funding&&h.connector){let e=h.connector.wallets.find((e=>e.address===o));g({...y,funding:{...y.funding,connectedWallet:e}})}d(t({address:o,walletClientType:h.connector?.walletClientType,walletChainType:h.connector?.chainType}))}),l)}else e=setTimeout(v,l);return()=>clearTimeout(e)}}),[x]);o((()=>{var e;h?.connectError&&(e=h?.connectError,C(p(e)))}),[h]);let T=h?.connector?.connectorType||"injected",E=h?.connector?.walletClientType||"unknown",M=S?.metadata?.shortName||S?.name||h?.connector?.walletBranding.name||"Browser Extension",_=S?.image_url?.md||h?.connector?.walletBranding.icon||(t=>/*#__PURE__*/e(a,{...t})),B="Browser Extension"===M?M.toLowerCase():M;r=x?`Successfully connected with ${B}`:k?k.message:R?"Switching networks":`Waiting for ${B}`;let W="Don’t see your wallet? Check your other browser windows.";return x?W="You’re good to go!":j>=2&&k?W="Unable to connect wallet":k?W=k.detail:R?W="Switch your wallet to the requested network.":"metamask"===E&&n?W="Click to continue to open and connect MetaMask.":"metamask"===E?W="For the best experience, connect only one wallet at a time.":"wallet_connect_v2"===T?W="Open your mobile wallet app to continue":"coinbase_wallet"===T&&(W="Confirm in the Coinbase app/popup to continue."),/*#__PURE__*/e(u,{walletName:M,walletLogo:_,success:x,errorMessage:k,title:r,subtitle:W,onRetry:()=>{b(j+1),C(void 0),h?.connectRetry()},onUseDifferentWallet:m,onBack:f===w?void 0:m,numRetries:j,maxRetries:2})}};export{d as ConnectOnlyStatusScreen,u as ConnectOnlyStatusScreenView,d as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{a as o}from"./context-i_OKSUqt.mjs";import{C as r,L as i}from"./CustomLandingScreenView-82pnUZOi.mjs";import"react";import"@privy-io/js-sdk-core";import"tinycolor2";import"@heroicons/react/24/outline/UserCircleIcon";import"styled-components";import"./ModalHeader-cnW8OaHH.mjs";import"./private-privy-provider-B2_rZ8aq.mjs";import"mipd";import"react-device-detect";import"viem/utils";import"@privy-io/popup";import"./internal-context-D4S2Sfvt.mjs";import"ofetch";import"./paths-BzM95ysC.mjs";import"@scure/base";import"viem";import"uuid";import"jose";import"./get-is-unified-wallet-Bon2jknh.mjs";import"eventemitter3";import"zustand";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"js-cookie";import"./events-context-CI0iqAXA.mjs";import"@headlessui/react";import"@privy-io/ethereum";import"@privy-io/urls";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"./ConnectWalletView-BtuPwm-c.mjs";import"@heroicons/react/24/outline";import"@tanstack/react-virtual";import"@heroicons/react/24/outline/CheckIcon";import"./copy-Bx2Jwc5_.mjs";import"./Link-DJ5gq9Di.mjs";import"./QrCode-BVe4kf2z.mjs";import"qrcode";import"./EmailInputForm-Dgoii4vf.mjs";import"./ErrorMessage-D8VaAP5m.mjs";import"./useI18n-DleS41MU.mjs";import"./WalletCards-DH1rqayz.mjs";import"./state-BG13el3v.mjs";import"./Screen-DgjLPjok.mjs";import"./index-Dq_xe9dz.mjs";import"lucide-react";import"./ConnectEmailForm-c2xnQzqc.mjs";import"./Chip-D2-wZOHJ.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"./farcaster-DPlSjvF5.mjs";import"@heroicons/react/24/outline/FingerPrintIcon";import"./ConnectPhoneForm-C1eL0VZH.mjs";import"./twitter-BoAxhlj6.mjs";import"./twitch-5IOe4sIQ.mjs";import"./telegram-B-JqnkqZ.mjs";import"./WalletOverflowButton-i2nGLvV0.mjs";import"./ScreenLayout-x3-Xgy2E.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};
|