@privy-io/react-auth 3.19.0-beta-20260327145607 → 3.19.0-beta-20260328154708
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-BGWhw5JF.js → AccountNotFoundScreen-DVNyPmsv.js} +1 -1
- package/dist/cjs/{Address-Ccb_vB_O.js → Address-DS8jr4KC.js} +1 -1
- package/dist/cjs/{AffirmativeConsentScreen-BeNpA8vg.js → AffirmativeConsentScreen-DyJJyib-.js} +1 -1
- package/dist/cjs/{AllowlistRejectionScreen-DiQ106Je.js → AllowlistRejectionScreen-BA5CtMhJ.js} +1 -1
- package/dist/cjs/{AuthenticateWithWalletScreen-fOZ6wpNr.js → AuthenticateWithWalletScreen-C9AjdT7D.js} +1 -1
- package/dist/cjs/{AwaitingEvmToSolBridgingScreen-5zCafWqh.js → AwaitingEvmToSolBridgingScreen-DhBnzI7i.js} +1 -1
- package/dist/cjs/{AwaitingExternalEthereumTransferScreen-BCDcDb5e.js → AwaitingExternalEthereumTransferScreen-CErFwU8W.js} +1 -1
- package/dist/cjs/{AwaitingPasswordlessCodeScreen-9ZGMTuto.js → AwaitingPasswordlessCodeScreen-DwygNK8c.js} +1 -1
- package/dist/cjs/{AwaitingSolToEvmBridgingScreen-DrU5HjJs.js → AwaitingSolToEvmBridgingScreen-BDbp4VVX.js} +1 -1
- package/dist/cjs/{BridgeNetworkSelectionView-ByOqmqhr.js → BridgeNetworkSelectionView-QbDzAkBf.js} +1 -1
- package/dist/cjs/{CaptchaScreen-CpC_t_wY.js → CaptchaScreen-25cmBeXd.js} +1 -1
- package/dist/cjs/{CoinbaseOnrampStatusScreen-BED_Uc3M.js → CoinbaseOnrampStatusScreen-B4O76TSW.js} +1 -1
- package/dist/cjs/{ConnectEmailForm-CkOZyqGm.js → ConnectEmailForm-TUr_nIXO.js} +1 -1
- package/dist/cjs/{ConnectLedgerScreen-BRRli2qt.js → ConnectLedgerScreen-C56HhWZ4.js} +1 -1
- package/dist/cjs/{ConnectOnlyLandingScreen-Cb8nxLme.js → ConnectOnlyLandingScreen-C6zMfgKT.js} +1 -1
- package/dist/cjs/{ConnectOnlyStatusScreen-BH3D3Vhb.js → ConnectOnlyStatusScreen-BW4GRWjY.js} +1 -1
- package/dist/cjs/{ConnectOrCreateScreen-DrwTfZH8.js → ConnectOrCreateScreen-BOXNG4xb.js} +1 -1
- package/dist/cjs/{ConnectPhoneForm-j-Cyd_qm.js → ConnectPhoneForm-C64ut2YA.js} +1 -1
- package/dist/cjs/{ConnectWalletView-CTLd5C6n.js → ConnectWalletView-CxT8A3PO.js} +5 -5
- package/dist/cjs/{ConnectionStatusScreen-Z01aygJs.js → ConnectionStatusScreen-D5ml_1JB.js} +1 -1
- package/dist/cjs/{CrossAppAuthScreen-piMA7do8.js → CrossAppAuthScreen-BUgwjQEo.js} +1 -1
- package/dist/cjs/{CustomLandingScreenView-CheZxCX8.js → CustomLandingScreenView-DpZylDys.js} +1 -1
- package/dist/cjs/{DelegatedActionsConsentScreen-Cw3Fo8gM.js → DelegatedActionsConsentScreen-vjp34amr.js} +1 -1
- package/dist/cjs/{DelegatedActionsRevokeScreen-BDzCEVqg.js → DelegatedActionsRevokeScreen-BRnymqb4.js} +1 -1
- package/dist/cjs/{EmbeddedWalletConnectingScreen-VUzY2VsQ.js → EmbeddedWalletConnectingScreen-CJImT0xn.js} +1 -1
- package/dist/cjs/{EmbeddedWalletCreatedScreen-DYU_efvf.js → EmbeddedWalletCreatedScreen-olFu2XaK.js} +1 -1
- package/dist/cjs/{EmbeddedWalletKeyExportScreen-BZtOjZpV.js → EmbeddedWalletKeyExportScreen-fUNftcl9.js} +1 -1
- package/dist/cjs/{EmbeddedWalletOnAccountCreateScreen-BduYIHj0.js → EmbeddedWalletOnAccountCreateScreen-3gQ_ueMW.js} +1 -1
- package/dist/cjs/{EmbeddedWalletPasswordUpdateScreen-CfehwM23.js → EmbeddedWalletPasswordUpdateScreen-BwR98GME.js} +1 -1
- package/dist/cjs/{EmbeddedWalletPasswordUpdateSplashScreen-cYsDDghn.js → EmbeddedWalletPasswordUpdateSplashScreen-Cq3Q12cU.js} +1 -1
- package/dist/cjs/{EnrollTotp-Ol5CsgOA.js → EnrollTotp-gb2ZD1OP.js} +1 -1
- package/dist/cjs/{ErrorScreen-BLknI5mu.js → ErrorScreen-8lum7GuV.js} +1 -1
- package/dist/cjs/{FarcasterConnectStatusScreen-Bp5BSNvP.js → FarcasterConnectStatusScreen-HjVUl4T8.js} +1 -1
- package/dist/cjs/{FarcasterSignerStatusScreen-CQcKmS-B.js → FarcasterSignerStatusScreen-DM8JCOtc.js} +1 -1
- package/dist/cjs/{FiatOnrampScreen-dUYsHWAv.js → FiatOnrampScreen-CssEDddD.js} +1 -1
- package/dist/cjs/{FundSolWalletWithExternalSolanaWallet-BrB3MaI7.js → FundSolWalletWithExternalSolanaWallet-Cd6aE4Ez.js} +1 -1
- package/dist/cjs/{FundWalletMethodHeader-Dp0qK8-s.js → FundWalletMethodHeader-B2m4qoMl.js} +1 -1
- package/dist/cjs/{FundWithBankDepositScreen-B7jC-0EU.js → FundWithBankDepositScreen-Bd3qwIja.js} +1 -1
- package/dist/cjs/{FundingEditAmountScreen-CHIv-Klg.js → FundingEditAmountScreen-CpH4uW9e.js} +1 -1
- package/dist/cjs/{FundingMethodSelectionScreen-wXU7ZFOV.js → FundingMethodSelectionScreen-oPLywPNT.js} +1 -1
- package/dist/cjs/{InAppBrowserLoginNotPossible-BFWIzrVG.js → InAppBrowserLoginNotPossible-CNMLB23G.js} +1 -1
- package/dist/cjs/{InstallWalletScreen-vRXPRhOy.js → InstallWalletScreen-DCflfk0L.js} +1 -1
- package/dist/cjs/{LandingScreen-6YsWMMj3.js → LandingScreen-DpcaJnN8.js} +1 -1
- package/dist/cjs/{LinkConflictScreen-DC4hgB0t.js → LinkConflictScreen-qwJetI_-.js} +1 -1
- package/dist/cjs/{LinkEmailScreen-BbDbprJy.js → LinkEmailScreen-a5if5KVZ.js} +1 -1
- package/dist/cjs/{LinkPasskeyScreen-DP4u6Lgj.js → LinkPasskeyScreen-CIH1emcH.js} +1 -1
- package/dist/cjs/{LinkPhoneScreen-B6D_a4Ej.js → LinkPhoneScreen-D5CEG6v7.js} +1 -1
- package/dist/cjs/{LoginFailedScreen-BDDXHvvn.js → LoginFailedScreen-BaCiZhaf.js} +1 -1
- package/dist/cjs/{ManualTransferScreen-DQTp_iKx.js → ManualTransferScreen-DrrYyEWA.js} +1 -1
- package/dist/cjs/{MfaAuthEnrollmentFlowScreen-CIbZ0xIA.js → MfaAuthEnrollmentFlowScreen-CxGPcI3e.js} +1 -1
- package/dist/cjs/{MfaAuthVerifyFlowScreen-DCG37dVx.js → MfaAuthVerifyFlowScreen-DLG-BVQm.js} +1 -1
- package/dist/cjs/{MfaEnrollmentFlowScreen-BMvFxN4m.js → MfaEnrollmentFlowScreen-DN5QEHfD.js} +1 -1
- package/dist/cjs/{MfaVerifyFlowScreen-A1ir9y_A.js → MfaVerifyFlowScreen-DFkfpD5B.js} +1 -1
- package/dist/cjs/{ModalHeader-DIWI7Qd8.js → ModalHeader-D-XonahD.js} +1 -1
- package/dist/cjs/{MoonpayStatusScreen-DJIqzTLu.js → MoonpayStatusScreen-4U5kZOj_.js} +1 -1
- package/dist/cjs/{OAuthStatusScreen-3YsQvDT2.js → OAuthStatusScreen-Dh3Q2rRA.js} +1 -1
- package/dist/cjs/{PasskeySelectSignupOrLogin-CPzx0bS6.js → PasskeySelectSignupOrLogin-DukRCiqA.js} +1 -1
- package/dist/cjs/{PasskeyStatusScreen-Y0HfrSs0.js → PasskeyStatusScreen-3qjN5wk9.js} +1 -1
- package/dist/cjs/{PasswordRecoveryScreen-DnBSIkCR.js → PasswordRecoveryScreen-Bu7cI0ZC.js} +1 -1
- package/dist/cjs/{QrCode-DgJWNtET.js → QrCode-Cic3j7zf.js} +1 -1
- package/dist/cjs/{RecoveryOAuthStatusScreen-O90TAb-V.js → RecoveryOAuthStatusScreen-CrjCmmBP.js} +1 -1
- package/dist/cjs/{RecoveryPasswordCreateScreen-CSEj-YHC.js → RecoveryPasswordCreateScreen-4iIWUlG8.js} +1 -1
- package/dist/cjs/{RecoverySelectionScreen-ASIhYmAi.js → RecoverySelectionScreen-BtfJrsxz.js} +1 -1
- package/dist/cjs/{Screen-QiXdkVhj.js → Screen-B544esap.js} +1 -1
- package/dist/cjs/{ScreenLayout-BKim1Ivq.js → ScreenLayout-Ct2ArhVz.js} +1 -1
- package/dist/cjs/{SelectSourceAsset-Bvvzhx1z.js → SelectSourceAsset-DavDKcHK.js} +1 -1
- package/dist/cjs/{SetAutomaticRecoveryScreen-xWSOwMal.js → SetAutomaticRecoveryScreen-Ca7Woguz.js} +1 -1
- package/dist/cjs/{SetWalletPasswordForm-If1qCSys.js → SetWalletPasswordForm-CI4cOM1Z.js} +1 -1
- package/dist/cjs/{SignRequestScreen-BsqcuRPT.js → SignRequestScreen-fvlO4Zbo.js} +1 -1
- package/dist/cjs/{StandardSignAndSendTransactionScreen-CwrOUIqL.js → StandardSignAndSendTransactionScreen-B5NbB4UA.js} +1 -1
- package/dist/cjs/{TelegramAuthScreen-CCy2dkrp.js → TelegramAuthScreen-Bxwk45I6.js} +1 -1
- package/dist/cjs/{TransactionDetails-6PDseXbG.js → TransactionDetails-CF3pWzeu.js} +1 -1
- package/dist/cjs/{TransactionErrorView-kWt_0R3I.js → TransactionErrorView-ijhsEu6z.js} +1 -1
- package/dist/cjs/{TransferFromWalletScreen-0TLfcjLe.js → TransferFromWalletScreen-BvbRgShb.js} +1 -1
- package/dist/cjs/{TransferOrBridgeLoadingScreen-BkGgll1g.js → TransferOrBridgeLoadingScreen-Bk38xeKC.js} +1 -1
- package/dist/cjs/{UpdateEmailScreen-Bk2OG5C2.js → UpdateEmailScreen-BFdQGPVR.js} +1 -1
- package/dist/cjs/{UpdatePhoneScreen-BBSNlATd.js → UpdatePhoneScreen-D7Y31sc6.js} +1 -1
- package/dist/cjs/{UserLimitReachedScreen-CI5im3l3.js → UserLimitReachedScreen-CYEaYgHR.js} +1 -1
- package/dist/cjs/{WalletInfoCard-BkhIxyu0.js → WalletInfoCard-BFqk5nx-.js} +1 -1
- package/dist/cjs/{WalletInterstitialScreen-DVj91uDW.js → WalletInterstitialScreen-DIxj_CfT.js} +1 -1
- package/dist/cjs/{WalletLink-BNAUeqsj.js → WalletLink-Bn2Sg1t5.js} +1 -1
- package/dist/cjs/{WalletOverflowButton-CYOV-_Ot.js → WalletOverflowButton-GNSOyAYk.js} +1 -1
- package/dist/cjs/abstract-smart-wallets.js +1 -1
- package/dist/cjs/{context-RXM4aLoW.js → context-CxOMsWEC.js} +1 -1
- package/dist/cjs/{ethers-1Tcci65u.js → ethers-BLM3stsp.js} +1 -1
- package/dist/cjs/extended-chains.js +1 -1
- package/dist/cjs/{get-entropy-details-for-user-CfpHdOOL.js → get-entropy-details-for-user-DvVkUB6X.js} +1 -1
- package/dist/cjs/{getErc20Balance-D3GMY7bi.js → getErc20Balance-CQ9xkgw_.js} +1 -1
- package/dist/cjs/{getErc20TokenInfo-D7Op14dW.js → getErc20TokenInfo-RGU5DUkq.js} +1 -1
- package/dist/cjs/{index-D31YtUmO.js → index-B6Hq5QIl.js} +1 -1
- package/dist/cjs/{index-Cg7lD262.js → index-BSLfxEzu.js} +3 -3
- package/dist/cjs/{index-ChrxGj1W.js → index-BxxiFBfO.js} +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/internal.js +1 -1
- package/dist/cjs/{privy-context-CJMUK9qU.js → privy-context-DhB5mzyL.js} +1 -1
- package/dist/cjs/{shared-CX36Xo8K.js → shared-DiCZ9TOS.js} +1 -1
- package/dist/cjs/{shouldProceedtoEmbeddedWalletCreationFlow-CPd-uKKS.js → shouldProceedtoEmbeddedWalletCreationFlow-Clzt7zrv.js} +1 -1
- package/dist/cjs/{smart-wallets-W-C3-7mX.js → smart-wallets-CtIyBfrY.js} +1 -1
- package/dist/cjs/smart-wallets.js +1 -1
- package/dist/cjs/solana.js +1 -1
- package/dist/cjs/{styles-CZ7NmfYl.js → styles-BTg5229F.js} +1 -1
- package/dist/cjs/{to-ui-error-waPPZTE3.js → to-ui-error-xMaiBclO.js} +1 -1
- package/dist/cjs/ui.js +1 -1
- package/dist/cjs/{use-export-wallet-w7BPerzn.js → use-export-wallet-C6g3tNhp.js} +1 -1
- package/dist/cjs/{use-export-wallet-D-UqGx7Q.js → use-export-wallet-CxvMZkka.js} +1 -1
- package/dist/cjs/{useActiveWallet-mN0aJ9Aw.js → useActiveWallet-Ca1F42NZ.js} +1 -1
- package/dist/cjs/{useGetTokenPrice-DYrgDlJ6.js → useGetTokenPrice-fI9ARjVI.js} +1 -1
- package/dist/cjs/{useI18n-B652ZmJJ.js → useI18n-DipOTna5.js} +1 -1
- package/dist/cjs/usePrivy-U6wMbctH.js +1 -0
- package/dist/cjs/{useSolanaRpcClient-H6-9qxr1.js → useSolanaRpcClient-aKVbP2JU.js} +1 -1
- package/dist/cjs/{useWalletBalance-BoqIc-xj.js → useWalletBalance-p7qfqjRC.js} +1 -1
- package/dist/cjs/{useWallets-TGALIhje.js → useWallets-gb9Umiju.js} +1 -1
- package/dist/esm/{AccountNotFoundScreen-iWb1klHB.mjs → AccountNotFoundScreen-C7To-5vI.mjs} +1 -1
- package/dist/esm/{Address-PwZSXm9b.mjs → Address-DFhsL61i.mjs} +1 -1
- package/dist/esm/{AffirmativeConsentScreen-TmfMGlOl.mjs → AffirmativeConsentScreen-Dl7lWml4.mjs} +1 -1
- package/dist/esm/{AllowlistRejectionScreen-Bg7x1RNv.mjs → AllowlistRejectionScreen-CQz_DxeI.mjs} +1 -1
- package/dist/esm/{AuthenticateWithWalletScreen-Bfceh8Ep.mjs → AuthenticateWithWalletScreen-BJfgl_9b.mjs} +1 -1
- package/dist/esm/{AwaitingEvmToSolBridgingScreen-CPok6C1U.mjs → AwaitingEvmToSolBridgingScreen-CPK1mbrP.mjs} +1 -1
- package/dist/esm/{AwaitingExternalEthereumTransferScreen-DJ5AqFjU.mjs → AwaitingExternalEthereumTransferScreen-C2Ic-wWl.mjs} +1 -1
- package/dist/esm/{AwaitingPasswordlessCodeScreen-BFhcvo2a.mjs → AwaitingPasswordlessCodeScreen-CKhOpauy.mjs} +1 -1
- package/dist/esm/{AwaitingSolToEvmBridgingScreen-yiXjF4aq.mjs → AwaitingSolToEvmBridgingScreen-0silAflP.mjs} +1 -1
- package/dist/esm/{BridgeNetworkSelectionView-DTgXCOhN.mjs → BridgeNetworkSelectionView-P9DT3N3B.mjs} +1 -1
- package/dist/esm/{CaptchaScreen-BPixv0U9.mjs → CaptchaScreen-BxWtZF1r.mjs} +1 -1
- package/dist/esm/{CoinbaseOnrampStatusScreen-BYIZM_n_.mjs → CoinbaseOnrampStatusScreen-kfdMBs7p.mjs} +1 -1
- package/dist/esm/{ConnectEmailForm-BCqawfO-.mjs → ConnectEmailForm-MZhtYjvT.mjs} +1 -1
- package/dist/esm/{ConnectLedgerScreen-0WQeyQIz.mjs → ConnectLedgerScreen--Er5X0K2.mjs} +1 -1
- package/dist/esm/{ConnectOnlyLandingScreen-BHOEo5M4.mjs → ConnectOnlyLandingScreen-O42h34bB.mjs} +1 -1
- package/dist/esm/{ConnectOnlyStatusScreen-CCxiAXex.mjs → ConnectOnlyStatusScreen-BCXAj_gW.mjs} +1 -1
- package/dist/esm/{ConnectOrCreateScreen-BnN5Eocd.mjs → ConnectOrCreateScreen-vbXuI2JY.mjs} +1 -1
- package/dist/esm/{ConnectPhoneForm-DCm_Nfv1.mjs → ConnectPhoneForm-DptByaXA.mjs} +1 -1
- package/dist/esm/{ConnectWalletView-DSry6Xg-.mjs → ConnectWalletView-rdXlInEf.mjs} +3 -3
- package/dist/esm/{ConnectionStatusScreen-CS1PwenJ.mjs → ConnectionStatusScreen-BsUwbpes.mjs} +1 -1
- package/dist/esm/{CrossAppAuthScreen-XZ2iPEDY.mjs → CrossAppAuthScreen-XgfNqS_E.mjs} +1 -1
- package/dist/esm/{CustomLandingScreenView-l2CDbRP5.mjs → CustomLandingScreenView-C5YFt-eX.mjs} +1 -1
- package/dist/esm/{DelegatedActionsConsentScreen-C0Dc6Xjx.mjs → DelegatedActionsConsentScreen-BArG2a2j.mjs} +1 -1
- package/dist/esm/{DelegatedActionsRevokeScreen-uqLZgEZY.mjs → DelegatedActionsRevokeScreen-D4iRvuQE.mjs} +1 -1
- package/dist/esm/{EmbeddedWalletConnectingScreen-Ber6xBu2.mjs → EmbeddedWalletConnectingScreen-BsMOU99D.mjs} +1 -1
- package/dist/esm/{EmbeddedWalletCreatedScreen-Cf2s9crl.mjs → EmbeddedWalletCreatedScreen-zesLpyMv.mjs} +1 -1
- package/dist/esm/{EmbeddedWalletKeyExportScreen-DTqkrVOj.mjs → EmbeddedWalletKeyExportScreen-DqAsv8gU.mjs} +1 -1
- package/dist/esm/{EmbeddedWalletOnAccountCreateScreen-CRJF2oQX.mjs → EmbeddedWalletOnAccountCreateScreen-DdyATYUI.mjs} +1 -1
- package/dist/esm/{EmbeddedWalletPasswordUpdateScreen-BnFOssqj.mjs → EmbeddedWalletPasswordUpdateScreen-CxnIbTsV.mjs} +1 -1
- package/dist/esm/{EmbeddedWalletPasswordUpdateSplashScreen-CypdEeoF.mjs → EmbeddedWalletPasswordUpdateSplashScreen-D5vd3wxy.mjs} +1 -1
- package/dist/esm/{EnrollTotp-BMGn5sqG.mjs → EnrollTotp-DdrqF-3H.mjs} +1 -1
- package/dist/esm/{ErrorScreen-DYZatCfj.mjs → ErrorScreen-D11us51W.mjs} +1 -1
- package/dist/esm/{FarcasterConnectStatusScreen-DDm7pIDd.mjs → FarcasterConnectStatusScreen-fyZcmQgu.mjs} +1 -1
- package/dist/esm/{FarcasterSignerStatusScreen-DlCt0kxK.mjs → FarcasterSignerStatusScreen-Dk_lmMg7.mjs} +1 -1
- package/dist/esm/{FiatOnrampScreen-isedatpo.mjs → FiatOnrampScreen-CCjWM9Ur.mjs} +1 -1
- package/dist/esm/{FundSolWalletWithExternalSolanaWallet-gBuJgt9U.mjs → FundSolWalletWithExternalSolanaWallet-BcWESWy7.mjs} +1 -1
- package/dist/esm/{FundWalletMethodHeader-dEfQKUIt.mjs → FundWalletMethodHeader-y6GQmPN-.mjs} +1 -1
- package/dist/esm/{FundWithBankDepositScreen-CslZ9KKD.mjs → FundWithBankDepositScreen-KmI-NyT-.mjs} +1 -1
- package/dist/esm/{FundingEditAmountScreen-x1Yf2Eyo.mjs → FundingEditAmountScreen-39sxv4-N.mjs} +1 -1
- package/dist/esm/{FundingMethodSelectionScreen-CsMVaK3F.mjs → FundingMethodSelectionScreen-C9T6oLOo.mjs} +1 -1
- package/dist/esm/{InAppBrowserLoginNotPossible-BdS_u6t4.mjs → InAppBrowserLoginNotPossible-DmQye6Pk.mjs} +1 -1
- package/dist/esm/{InstallWalletScreen-BeYedfev.mjs → InstallWalletScreen-UxD8rNul.mjs} +1 -1
- package/dist/esm/{LandingScreen-DUDImYql.mjs → LandingScreen-DmPu0MPZ.mjs} +1 -1
- package/dist/esm/{LinkConflictScreen-ClUq6bHA.mjs → LinkConflictScreen-Dk3MkQpa.mjs} +1 -1
- package/dist/esm/{LinkEmailScreen-DXSe8U9d.mjs → LinkEmailScreen-CfRqXrNI.mjs} +1 -1
- package/dist/esm/{LinkPasskeyScreen-C1QMXwHt.mjs → LinkPasskeyScreen-BTtF-B9N.mjs} +1 -1
- package/dist/esm/{LinkPhoneScreen-CRXA4Hy0.mjs → LinkPhoneScreen-DrNHNW0i.mjs} +1 -1
- package/dist/esm/{LoginFailedScreen-BWx9URVV.mjs → LoginFailedScreen-CRidKWt0.mjs} +1 -1
- package/dist/esm/{ManualTransferScreen-CGq7L0Ci.mjs → ManualTransferScreen-CaeG3gSm.mjs} +1 -1
- package/dist/esm/{MfaAuthEnrollmentFlowScreen-CDtJNWv8.mjs → MfaAuthEnrollmentFlowScreen-QNnZztPK.mjs} +1 -1
- package/dist/esm/{MfaAuthVerifyFlowScreen-DT0vQYdD.mjs → MfaAuthVerifyFlowScreen-CxnNg5C5.mjs} +1 -1
- package/dist/esm/{MfaEnrollmentFlowScreen-DoVI0gRh.mjs → MfaEnrollmentFlowScreen-DzgC_f-O.mjs} +1 -1
- package/dist/esm/{MfaVerifyFlowScreen-p8IPHVQN.mjs → MfaVerifyFlowScreen-B1GNo8Xm.mjs} +1 -1
- package/dist/esm/{ModalHeader-Duq1Izpl.mjs → ModalHeader-DnjCPU3j.mjs} +1 -1
- package/dist/esm/{MoonpayStatusScreen-C1Z_6gNn.mjs → MoonpayStatusScreen-CklNYEWb.mjs} +1 -1
- package/dist/esm/{OAuthStatusScreen-BTVsCmCg.mjs → OAuthStatusScreen-B6GSPYhl.mjs} +1 -1
- package/dist/esm/{PasskeySelectSignupOrLogin-B-onsqZo.mjs → PasskeySelectSignupOrLogin-MBv2tZo-.mjs} +1 -1
- package/dist/esm/{PasskeyStatusScreen-B1umlQqV.mjs → PasskeyStatusScreen-BPWbs5Nw.mjs} +1 -1
- package/dist/esm/{PasswordRecoveryScreen-I3ZUDm0-.mjs → PasswordRecoveryScreen-CZCj98I8.mjs} +1 -1
- package/dist/esm/{QrCode-DZ4mEmXc.mjs → QrCode-BHbLI4rX.mjs} +1 -1
- package/dist/esm/{RecoveryOAuthStatusScreen-GJOLz9Qg.mjs → RecoveryOAuthStatusScreen-DVsqHDmE.mjs} +1 -1
- package/dist/esm/{RecoveryPasswordCreateScreen-BnvmaEYh.mjs → RecoveryPasswordCreateScreen-C89EWiuO.mjs} +1 -1
- package/dist/esm/{RecoverySelectionScreen-iOlIYqRe.mjs → RecoverySelectionScreen-1Vlp8fVi.mjs} +1 -1
- package/dist/esm/{Screen-Ce8BE24H.mjs → Screen-BHWyivgu.mjs} +1 -1
- package/dist/esm/{ScreenLayout-B6n5Feil.mjs → ScreenLayout-D7WpqBtE.mjs} +1 -1
- package/dist/esm/{SelectSourceAsset-zsEmZ5td.mjs → SelectSourceAsset-CiSao4AW.mjs} +1 -1
- package/dist/esm/{SetAutomaticRecoveryScreen-BS08blBS.mjs → SetAutomaticRecoveryScreen-DietkZKW.mjs} +1 -1
- package/dist/esm/{SetWalletPasswordForm-Dptwfaam.mjs → SetWalletPasswordForm-DTi1Jbtw.mjs} +1 -1
- package/dist/esm/{SignRequestScreen-DSZ9BlSE.mjs → SignRequestScreen-B_Ox6MOX.mjs} +1 -1
- package/dist/esm/{StandardSignAndSendTransactionScreen-BxF1ai6w.mjs → StandardSignAndSendTransactionScreen-CrVpHuvN.mjs} +1 -1
- package/dist/esm/{TelegramAuthScreen-BgAQJBxJ.mjs → TelegramAuthScreen-CZZaAiYq.mjs} +1 -1
- package/dist/esm/{TransactionDetails-CVClqqlA.mjs → TransactionDetails-DUAqjI_O.mjs} +1 -1
- package/dist/esm/{TransactionErrorView-B_dlkXgb.mjs → TransactionErrorView-BehNZVCh.mjs} +1 -1
- package/dist/esm/{TransferFromWalletScreen-7dBrxdtu.mjs → TransferFromWalletScreen-BCEzW4SH.mjs} +1 -1
- package/dist/esm/{TransferOrBridgeLoadingScreen-CknmH__D.mjs → TransferOrBridgeLoadingScreen-BfVr4ZWB.mjs} +1 -1
- package/dist/esm/{UpdateEmailScreen-COQBeTV_.mjs → UpdateEmailScreen-Ci2FSOkW.mjs} +1 -1
- package/dist/esm/{UpdatePhoneScreen-SH0ZMLhy.mjs → UpdatePhoneScreen-DCaxJSCD.mjs} +1 -1
- package/dist/esm/{UserLimitReachedScreen-Bbjr58Rh.mjs → UserLimitReachedScreen-CsD_fKH1.mjs} +1 -1
- package/dist/esm/{WalletInfoCard-CSqr9o--.mjs → WalletInfoCard-DkYb13at.mjs} +1 -1
- package/dist/esm/{WalletInterstitialScreen-C62appnM.mjs → WalletInterstitialScreen-a-o6jPKb.mjs} +1 -1
- package/dist/esm/{WalletLink-WeWEMb7C.mjs → WalletLink-BRkUlo2K.mjs} +1 -1
- package/dist/esm/{WalletOverflowButton-XkatV0nc.mjs → WalletOverflowButton-DSPUFJ5T.mjs} +1 -1
- package/dist/esm/abstract-smart-wallets.mjs +1 -1
- package/dist/esm/{context-aGvo4MVQ.mjs → context-DanhWeBg.mjs} +1 -1
- package/dist/esm/{ethers-BNftJuZG.mjs → ethers-iL-1LJcq.mjs} +1 -1
- package/dist/esm/extended-chains.mjs +1 -1
- package/dist/esm/{get-entropy-details-for-user-DkZdXKpr.mjs → get-entropy-details-for-user-BGqBIfqR.mjs} +1 -1
- package/dist/esm/{getErc20Balance-B5YTRX0-.mjs → getErc20Balance-gArwSiSB.mjs} +1 -1
- package/dist/esm/{getErc20TokenInfo-Dx_e_xiA.mjs → getErc20TokenInfo-CagSRUvz.mjs} +1 -1
- package/dist/esm/{index-6ULxuXBn.mjs → index-B9BAjdI3.mjs} +1 -1
- package/dist/esm/{index-D23O4czL.mjs → index-cnyso2Fp.mjs} +3 -3
- package/dist/esm/{index-BmQvaRvI.mjs → index-vGEfIWzb.mjs} +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal.mjs +1 -1
- package/dist/esm/{privy-context-CkPtrpbt.mjs → privy-context-pimLCE3L.mjs} +1 -1
- package/dist/esm/{shared-BivH4vdQ.mjs → shared-DkAMLjm5.mjs} +1 -1
- package/dist/esm/{shouldProceedtoEmbeddedWalletCreationFlow-BSnOzrud.mjs → shouldProceedtoEmbeddedWalletCreationFlow-CvbohbW6.mjs} +1 -1
- package/dist/esm/{smart-wallets-BhZ-uX3v.mjs → smart-wallets-Bp1oklP0.mjs} +1 -1
- package/dist/esm/smart-wallets.mjs +1 -1
- package/dist/esm/solana.mjs +1 -1
- package/dist/esm/{styles--34ZnZR_.mjs → styles-DMbxOKl7.mjs} +1 -1
- package/dist/esm/{to-ui-error-DgTXOCnh.mjs → to-ui-error-S-MThHnv.mjs} +1 -1
- package/dist/esm/ui.mjs +1 -1
- package/dist/esm/{use-export-wallet-Db8GdSAT.mjs → use-export-wallet-9if9oowB.mjs} +1 -1
- package/dist/esm/{use-export-wallet-BqvE_ud1.mjs → use-export-wallet-BdeWv8ke.mjs} +1 -1
- package/dist/esm/{useActiveWallet-By6UNJY1.mjs → useActiveWallet-DFp38Dx-.mjs} +1 -1
- package/dist/esm/{useGetTokenPrice-CveNETyP.mjs → useGetTokenPrice-CwmlFVt_.mjs} +1 -1
- package/dist/esm/{useI18n-D3p37xc_.mjs → useI18n-BpRybzwE.mjs} +1 -1
- package/dist/esm/usePrivy-ChZSTtn2.mjs +1 -0
- package/dist/esm/{useSolanaRpcClient-DgxuhW6A.mjs → useSolanaRpcClient-C7No0-0C.mjs} +1 -1
- package/dist/esm/{useWalletBalance-DyK680KW.mjs → useWalletBalance-BFMUBOkj.mjs} +1 -1
- package/dist/esm/{useWallets-DHM1PNtl.mjs → useWallets-QiqVPxAb.mjs} +1 -1
- package/package.json +7 -7
- package/dist/cjs/usePrivy-NgERWVoo.js +0 -1
- package/dist/esm/usePrivy-DPZ1iMmn.mjs +0 -1
|
@@ -1 +1 @@
|
|
|
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 s,useEffect as a}from"react";import{a as n,C as c}from"./index-
|
|
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 s,useEffect as a}from"react";import{a as n,C as c}from"./index-cnyso2Fp.mjs";import{a as m}from"./privy-context-pimLCE3L.mjs";import{S as u}from"./ScreenLayout-D7WpqBtE.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-DFp38Dx-.mjs";import"zustand";import"./context-DanhWeBg.mjs";import"tinycolor2";import"viem";import"viem/utils";import"./internal-context-C4ZqP8IF.mjs";import"ofetch";import"./use-export-wallet-9if9oowB.mjs";import"./get-entropy-details-for-user-BGqBIfqR.mjs";import"react-device-detect";import"styled-components";import"./events-context-CI0iqAXA.mjs";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"./usePrivy-ChZSTtn2.mjs";import"./paths-BzM95ysC.mjs";import"js-cookie";import"./PrivyPluginContext-2QN2dVUw.mjs";import"mipd";import"@privy-io/popup";import"@scure/base";import"@headlessui/react";import"@privy-io/urls";import"@privy-io/ethereum";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./frame-CjhCpycO.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"@privy-io/are-addresses-equal";import"viem/accounts";import"./use-sign-with-user-signer-BYctG7hm.mjs";import"./ModalHeader-DnjCPU3j.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-BHWyivgu.mjs";import"./index-Dq_xe9dz.mjs";const p=({status:o,title:s,description:a,userIntentRequired:n,retriesRemaining:c,hasSelectedCta:m,onContinue:p,onRetry:l})=>{let d=i((()=>{switch(o){case"loading":default:return;case"success":return n?{label:m?"Continuing...":"Continue",onClick:p,disabled:m,loading:m}:void 0;case"error":return c>0?{label:"Retry",onClick:l}:void 0}}),[o,m,p,l]),y=i((()=>({loading:"loading",ready:"subtle",disabled:"subtle",success:"success",error:"error"}[o]||"loading")),[o]);/*#__PURE__*/return e(u,{icon:"loading"===o||"ready"===o?void 0:"success"===o?t:r,iconVariant:y,title:s,subtitle:a,primaryCta:d,watermark:!0})},l={component:()=>{let{lastScreen:t,data:r,navigate:i,setModalData:u}=m(),{status:l,token:d,waitForResult:y,reset:g,execute:v}=n(),h=o([]),j=e=>{h.current=[e,...h.current]},[f,C]=s(!0);a((()=>(j(setTimeout(C,1e3,!1)),()=>{h.current.forEach((e=>clearTimeout(e))),h.current=[]})),[]);let[b,k]=s(""),[w,R]=s("Checking that you are a human..."),[S,x]=s(!1),[I,T]=s(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;u({errorModalData:{error:e,previousScreen:t||"LandingScreen"}}),i(q?.onErrorNavigateTo||"ErrorScreen",!1)}};a((()=>{"success"===l?j(setTimeout((async()=>{let e=await y();!e||q?.userIntentRequired||A(e)}),1e3)):"ready"===l&&j(setTimeout((()=>{"ready"===l&&v()}),500))}),[l]),a((()=>{if(!f)switch(l){case"success":k("Success!"),R("CAPTCHA passed successfully."),q?.userIntentRequired||setTimeout((()=>{x(!0),A(d)}),2e3);break;case"loading":k(""),R("Checking that you are a human...");break;case"error":k("Something went wrong"),R(I<=0?"If you use an adblocker or VPN, try disabling and re-attempting.":"You did not pass CAPTCHA. Please try again.")}}),[l,f,S]);/*#__PURE__*/return e(p,{status:l,title:b,description:w,userIntentRequired:q?.userIntentRequired,retriesRemaining:I,hasSelectedCta:S,onContinue:()=>{x(!0),A(d)},onRetry:async()=>{if(I<=0)return;T((e=>e-1)),g(),v();let e=await y();!e||q?.userIntentRequired||A(e)}})}};export{l as CaptchaScreen,p as CaptchaScreenView,l as default};
|
package/dist/esm/{CoinbaseOnrampStatusScreen-BYIZM_n_.mjs → CoinbaseOnrampStatusScreen-kfdMBs7p.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
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 m}from"styled-components";import{M as l,B as d,P as p}from"./ModalHeader-
|
|
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 m}from"styled-components";import{M as l,B as d,P as p}from"./ModalHeader-DnjCPU3j.mjs";import{a as u}from"./Layouts-BlFm53ED.mjs";import{L as g,O as f}from"./useActiveWallet-DFp38Dx-.mjs";import{u as h}from"./internal-context-C4ZqP8IF.mjs";import{a as v}from"./privy-context-pimLCE3L.mjs";import{O as y}from"./analytics-mkkvFRju.mjs";import{I as b}from"./index-cnyso2Fp.mjs";import"./context-DanhWeBg.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"zustand";import"viem";import"viem/utils";import"./use-export-wallet-9if9oowB.mjs";import"./get-entropy-details-for-user-BGqBIfqR.mjs";import"eventemitter3";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";import"ofetch";import"@privy-io/are-addresses-equal";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"./usePrivy-ChZSTtn2.mjs";import"./paths-BzM95ysC.mjs";import"js-cookie";import"./PrivyPluginContext-2QN2dVUw.mjs";import"mipd";import"@privy-io/popup";import"@scure/base";import"@headlessui/react";import"@privy-io/urls";import"@privy-io/ethereum";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./frame-CjhCpycO.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-BYctG7hm.mjs";const w={component:()=>{let{data:o,setModalData:i,navigate:c,navigateBack:m}=v(),{closePrivyModal:p,createAnalyticsEvent:u,client:g}=h(),[f,b]=n("pending-in-flow"),w=a(0),C={...o?.funding,showAlternateFundingMethod:!0};C.usingDefaultFundingMethod&&(C.usingDefaultFundingMethod=!1);let{partnerUserId:k,popup:x}=o?.coinbaseOnrampStatus??{};return s((()=>{if("pending-in-flow"===f||"pending-after-flow"===f){let e=setInterval((async()=>{if(k)try{let{status:e}=await g.getCoinbaseOnRampStatus({partnerUserId:k});if("success"===e)return void b("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");x?.closed&&(w.current=w.current+1,b("pending-after-flow"))}catch(e){console.error(e),b("error"),u({eventName:y,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,x,f]),/*#__PURE__*/e(r,{children:[/*#__PURE__*/t(l,{title:"Fund account",backFn:()=>{i({funding:C,solanaFundingData:o?.solanaFundingData}),m()}},"header"),/*#__PURE__*/t(j,{status:f,onClickCta:p}),/*#__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(x,{children:[/*#__PURE__*/t(C,{isSucccess:"success"===o}),/*#__PURE__*/e(u,{children:[/*#__PURE__*/t("h3",{children:n}),/*#__PURE__*/t(k,{children:a})]})]}),s&&/*#__PURE__*/t(p,{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(g,{color:r,style:{position:"absolute"}}),/*#__PURE__*/t(f,{color:r}),/*#__PURE__*/t(b,{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=m.p`
|
|
2
2
|
font-size: 1rem;
|
|
3
3
|
color: var(--privy-color-foreground-3);
|
|
4
4
|
margin-bottom: 1rem;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{jsxs as e,Fragment as a,jsx as r}from"react/jsx-runtime";import{Mail as i}from"lucide-react";import{forwardRef as t,useState as o}from"react";import{styled as l}from"styled-components";import{u as n}from"./context-
|
|
1
|
+
import{jsxs as e,Fragment as a,jsx as r}from"react/jsx-runtime";import{Mail as i}from"lucide-react";import{forwardRef as t,useState as o}from"react";import{styled as l}from"styled-components";import{u as n}from"./context-DanhWeBg.mjs";import{a as s}from"./index-cnyso2Fp.mjs";import{u as m}from"./internal-context-C4ZqP8IF.mjs";import{u as c,a as d}from"./privy-context-pimLCE3L.mjs";import{r as p,C as u}from"./useActiveWallet-DFp38Dx-.mjs";import{B as h}from"./use-export-wallet-9if9oowB.mjs";import{E as g,P as f}from"./ModalHeader-DnjCPU3j.mjs";import{C as y}from"./Chip-D2-wZOHJ.mjs";import{I as S,a as v}from"./EmailInputForm-Dgoii4vf.mjs";import{E as b}from"./ErrorMessage-D8VaAP5m.mjs";const j=/*#__PURE__*/t(((t,l)=>{let[u,S]=o(t.defaultValue||""),[v,j]=o(""),[x,w]=o(!1),{authenticated:P}=c(),{initLoginWithEmail:T}=m(),{navigate:M,setModalData:A,currentScreen:D,data:I}=d(),{enabled:N,token:U}=s(),[F,L]=o(!1),{accountType:R}=p(),W=n(),q=h(u)&&(W.disablePlusEmails&&u.includes("+")?(v||j("Please enter a valid email address without a '+'."),!1):(v&&j(""),!0)),B=x||!q,H=()=>{var e;A({login:I?.login,inlineError:void 0}),!N||U||P?(e=U,w(!0),T({email:u,captchaToken:e,disableSignup:I?.login?.disableSignup,withPrivyUi:!0}).then((()=>{M("AwaitingPasswordlessCodeScreen")})).catch((e=>{A({errorModalData:{error:e,previousScreen:D||"LandingScreen"}}),M("ErrorScreen")})).finally((()=>{w(!1)}))):(A({captchaModalData:{callback:e=>T({email:u,captchaToken:e,withPrivyUi:!0}),userIntentRequired:!1,onSuccessNavigateTo:"AwaitingPasswordlessCodeScreen",onErrorNavigateTo:"ErrorScreen"}}),M("CaptchaScreen"))};/*#__PURE__*/return e(a,{children:[/*#__PURE__*/e(k,{children:[v&&/*#__PURE__*/r(b,{style:{display:"block",marginTop:"0.25rem",textAlign:"left"},children:v}),/*#__PURE__*/e(C,{stacked:t.stacked,$error:!!v,children:[/*#__PURE__*/r(E,{children:/*#__PURE__*/r(i,{})}),/*#__PURE__*/r("input",{ref:l,id:"email-input",className:"login-method-button",type:"email",placeholder:"your@email.com",onFocus:()=>L(!0),onChange:e=>S(e.target.value),onKeyUp:e=>{"Enter"===e.key&&H()},value:u,autoComplete:"email"}),"email"!==R||F?t.stacked?/*#__PURE__*/r("span",{}):/*#__PURE__*/r(g,{isSubmitting:x,onClick:H,disabled:B,children:"Submit"}):/*#__PURE__*/r(y,{color:"gray",children:"Recent"})]})]}),t.stacked?/*#__PURE__*/r(f,{loadingText:null,loading:x,disabled:B,onClick:H,style:{width:"100%"},children:"Submit"}):null]})}));let k=S,C=v,E=l(u)`
|
|
2
2
|
display: inline-flex;
|
|
3
3
|
`;export{j as C};
|
|
@@ -1,4 +1,4 @@
|
|
|
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"./privy-context-
|
|
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"./privy-context-pimLCE3L.mjs";import{S as n}from"./ScreenLayout-D7WpqBtE.mjs";import{H as m}from"./index-cnyso2Fp.mjs";import"@privy-io/are-addresses-equal";import"react";import"./context-DanhWeBg.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./internal-context-C4ZqP8IF.mjs";import"ofetch";import"./ModalHeader-DnjCPU3j.mjs";import"./useActiveWallet-DFp38Dx-.mjs";import"zustand";import"viem";import"viem/utils";import"./use-export-wallet-9if9oowB.mjs";import"./get-entropy-details-for-user-BGqBIfqR.mjs";import"eventemitter3";import"react-device-detect";import"./events-context-CI0iqAXA.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-BHWyivgu.mjs";import"./index-Dq_xe9dz.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"./usePrivy-ChZSTtn2.mjs";import"./paths-BzM95ysC.mjs";import"js-cookie";import"./PrivyPluginContext-2QN2dVUw.mjs";import"mipd";import"@privy-io/popup";import"@scure/base";import"@headlessui/react";import"@privy-io/urls";import"@privy-io/ethereum";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./frame-CjhCpycO.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-BYctG7hm.mjs";const p=e=>/*#__PURE__*/t("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"-0.625 12.48 397.647 399.546",width:"2500",height:"674",preserveAspectRatio:"none",...e,children:/*#__PURE__*/t("g",{children:/*#__PURE__*/t("path",{fill:"#333745",d:"M 333.9 12.8 L 150.9 12.8 L 150.9 258.4 L 396.5 258.4 L 396.5 76.7 C 396.6 42.2 368.4 12.8 333.9 12.8 Z M 94.7 12.8 L 64 12.8 C 29.5 12.8 0 40.9 0 76.8 L 0 107.5 L 94.7 107.5 L 94.7 12.8 Z M 0 165 L 94.7 165 L 94.7 259.7 L 0 259.7 L 0 165 Z M 301.9 410.6 L 332.6 410.6 C 367.1 410.6 396.6 382.5 396.6 346.6 L 396.6 316 L 301.9 316 L 301.9 410.6 Z M 150.9 316 L 245.6 316 L 245.6 410.7 L 150.9 410.7 L 150.9 316 Z M 0 316 L 0 346.7 C 0 381.2 28.1 410.7 64 410.7 L 94.7 410.7 L 94.7 316 L 0 316 Z"})})}),s=({onContinueWithLedger:o,onContinueWithoutLedger:r,title:s="Phantom supports Ledger",subtitle:a="Are you using a Ledger hardware wallet?\nContinue to sign with Ledger"})=>/*#__PURE__*/t(n,{title:s,subtitle:/*#__PURE__*/t(d,{children:a}),primaryCta:{label:"Continue with Ledger",onClick:o},secondaryCta:{label:"Continue without Ledger",onClick:r},watermark:!0,children:/*#__PURE__*/e(l,{children:[/*#__PURE__*/t(m,{style:{width:"48px",height:"48px"}}),/*#__PURE__*/t(i,{strokeWidth:2,color:"var(--privy-color-icon-subtle)",width:22,height:22}),/*#__PURE__*/t(p,{style:{width:"48px",height:"48px"}})]})});function a(){let{data:e,setModalData:i,navigate:o}=r();/*#__PURE__*/return t(s,{onContinueWithLedger:function(){i({...e,login:{...e?.login,isSigningInWithLedgerSolana:!0}}),o("ConnectionStatusScreen")},onContinueWithoutLedger:function(){i({...e,login:{...e?.login,isSigningInWithLedgerSolana:!1}}),o("ConnectionStatusScreen")}})}const c={component:a};let l=o.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: center;
|
package/dist/esm/{ConnectOnlyLandingScreen-BHOEo5M4.mjs → ConnectOnlyLandingScreen-O42h34bB.mjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{useRef as t}from"react";import{u as o}from"./context-
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useRef as t}from"react";import{u as o}from"./context-DanhWeBg.mjs";import{u as r,g as n,c as a}from"./internal-context-C4ZqP8IF.mjs";import{a as i}from"./events-context-CI0iqAXA.mjs";import{a as l}from"./privy-context-pimLCE3L.mjs";import{i as c}from"./ConnectWalletView-rdXlInEf.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"@privy-io/are-addresses-equal";import"@heroicons/react/24/outline";import"@tanstack/react-virtual";import"react-device-detect";import"styled-components";import"./ModalHeader-DnjCPU3j.mjs";import"./useActiveWallet-DFp38Dx-.mjs";import"zustand";import"viem";import"viem/utils";import"./use-export-wallet-9if9oowB.mjs";import"./get-entropy-details-for-user-BGqBIfqR.mjs";import"eventemitter3";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"./CopyableText-BCytXyJL.mjs";import"lucide-react";import"./Link-DJ5gq9Di.mjs";import"./QrCode-BHbLI4rX.mjs";import"qrcode";import"./EmailInputForm-Dgoii4vf.mjs";import"./ErrorMessage-D8VaAP5m.mjs";import"./useI18n-BpRybzwE.mjs";import"./WalletCards-DH1rqayz.mjs";import"./Screen-BHWyivgu.mjs";import"./index-Dq_xe9dz.mjs";const m={component:()=>{let{closePrivyModal:m}=r(),{data:s,navigate:p}=l(),d=o(),C=i(),u=s?.externalConnectWallet?.description,j=t(s?.externalConnectWallet?.walletList??d.appearance.walletList),E=t(s?.externalConnectWallet?.walletChainType??d.appearance.walletChainType);/*#__PURE__*/return e(c,{walletList:j.current,walletChainType:E.current,preSelectedWalletId:s?.externalConnectWallet?.preSelectedWalletId,hideHeader:s?.externalConnectWallet?.hideHeader,onBack:s?.funding?()=>p("FundingMethodSelectionScreen"):void 0,onClose:()=>{C("connectWallet","onError",a.GENERIC_CONNECT_WALLET_ERROR),m()},onConnect:({connector:e,wallet:t})=>{C("connectWallet","onSuccess",{wallet:t});let o=s?.externalConnectWallet?.onCompleteNavigateTo;o?p(o({address:t.address,walletClientType:e?.walletClientType,walletChainType:e?.chainType})):m()},onConnectError:e=>{e instanceof n?(console.warn(e.cause?e.cause:e.message),C("connectWallet","onError",e.privyErrorCode||a.GENERIC_CONNECT_WALLET_ERROR)):(console.warn(e),C("connectWallet","onError",a.UNKNOWN_CONNECT_WALLET_ERROR))},customDescription:u,app:d,connectOnly:!0})},isUnauthenticatedScreem:!0};export{m as ConnectOnlyLandingScreen,m as default};
|
package/dist/esm/{ConnectOnlyStatusScreen-CCxiAXex.mjs → ConnectOnlyStatusScreen-BCXAj_gW.mjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{useState as t,useEffect as o}from"react";import{isMobile as r}from"react-device-detect";import{C as i}from"./use-export-wallet-
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useState as t,useEffect as o}from"react";import{isMobile as r}from"react-device-detect";import{C as i}from"./use-export-wallet-9if9oowB.mjs";import{q as n}from"./context-DanhWeBg.mjs";import{z as a}from"./useActiveWallet-DFp38Dx-.mjs";import{u as s}from"./internal-context-C4ZqP8IF.mjs";import{a as l}from"./privy-context-pimLCE3L.mjs";import{S as c}from"./ScreenLayout-D7WpqBtE.mjs";import{B as m}from"./index-cnyso2Fp.mjs";import{getErrorDetails as p}from"./ConnectionStatusScreen-BsUwbpes.mjs";import"./get-entropy-details-for-user-BGqBIfqR.mjs";import"viem";import"zustand";import"@privy-io/js-sdk-core";import"eventemitter3";import"viem/utils";import"tinycolor2";import"styled-components";import"./events-context-CI0iqAXA.mjs";import"ofetch";import"@privy-io/are-addresses-equal";import"./ModalHeader-DnjCPU3j.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-BHWyivgu.mjs";import"./index-Dq_xe9dz.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"./usePrivy-ChZSTtn2.mjs";import"./paths-BzM95ysC.mjs";import"js-cookie";import"./PrivyPluginContext-2QN2dVUw.mjs";import"mipd";import"@privy-io/popup";import"@scure/base";import"@headlessui/react";import"@privy-io/urls";import"@privy-io/ethereum";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./frame-CjhCpycO.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-BYctG7hm.mjs";import"./Link-DJ5gq9Di.mjs";import"./useI18n-BpRybzwE.mjs";import"./shouldProceedtoEmbeddedWalletCreationFlow-CvbohbW6.mjs";const u=({walletLogo:t,success:o,errorMessage:r,title:n,subtitle:a,onRetry:s,onUseDifferentWallet:l,onBack:m,numRetries:p,maxRetries:u})=>/*#__PURE__*/e(c,{title:n,subtitle:a,icon:t,iconVariant:"loading",iconLoadingStatus:{success:o,fail:!!r},primaryCta:r===i.ERROR_USER_EXISTS?{label:"Use a different wallet",onClick:l}:!o&&r?.retryable&&p<u?{label:"Retry",onClick:s,disabled:!r?.retryable||p>=u}:!o&&r&&p>=u?{label:"Use a different wallet",onClick:l}:void 0,onBack:m,watermark:!0}),d={component:()=>{let i,{navigateBack:c,navigate:d,lastScreen:w,currentScreen:f,data:y,setModalData:v}=l(),{walletConnectionStatus:g,closePrivyModal:j}=s(),[h,C]=t(void 0),[k,b]=t(0),x=a(g?.connector?.walletClientType||"unknown"),S="connected"===g?.status,R="switching_to_supported_chain"===g?.status;o((()=>{if(S){let e;if(y?.externalConnectWallet?.onCompleteNavigateTo){let t=y.externalConnectWallet.onCompleteNavigateTo,o=g.connectedWallet?.address;e=setTimeout((()=>{if(y.funding&&g.connector){let e=g.connector.wallets.find((e=>e.address===o));v({...y,funding:{...y.funding,connectedWallet:e}})}d(t({address:o,walletClientType:g.connector?.walletClientType,walletChainType:g.connector?.chainType}))}),n)}else e=setTimeout(j,n);return()=>clearTimeout(e)}}),[S]);o((()=>{var e;g?.connectError&&(e=g?.connectError,C(p(e)))}),[g]);let T=g?.connector?.connectorType||"injected",B=g?.connector?.walletClientType||"unknown",E=x?.metadata?.shortName||x?.name||g?.connector?.walletBranding.name||"Browser Extension",W=x?.image_url?.md||g?.connector?.walletBranding.icon||(t=>/*#__PURE__*/e(m,{...t})),M="Browser Extension"===E?E.toLowerCase():E;i=S?`Successfully connected with ${M}`:h?h.message:R?"Switching networks":`Waiting for ${M}`;let _="Don’t see your wallet? Check your other browser windows.";return S?_="You’re good to go!":k>=2&&h?_="Unable to connect wallet":h?_=h.detail:R?_="Switch your wallet to the requested network.":"metamask"===B&&r?_="Click to continue to open and connect MetaMask.":"metamask"===B?_="For the best experience, connect only one wallet at a time.":"wallet_connect_v2"===T?_="Open your mobile wallet app to continue":"coinbase_wallet"===T&&(_="Confirm in the Coinbase app/popup to continue."),/*#__PURE__*/e(u,{walletName:E,walletLogo:W,success:S,errorMessage:h,title:i,subtitle:_,onRetry:()=>{b(k+1),C(void 0),g?.connectRetry()},onUseDifferentWallet:c,onBack:f===w?void 0:c,numRetries:k,maxRetries:2})}};export{d as ConnectOnlyStatusScreen,u as ConnectOnlyStatusScreenView,d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{u as o}from"./context-
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{u as o}from"./context-DanhWeBg.mjs";import{C as r,L as i}from"./CustomLandingScreenView-C5YFt-eX.mjs";import"react";import"@privy-io/js-sdk-core";import"tinycolor2";import"@heroicons/react/24/outline/UserCircleIcon";import"styled-components";import"./ModalHeader-DnjCPU3j.mjs";import"./useActiveWallet-DFp38Dx-.mjs";import"zustand";import"viem";import"viem/utils";import"./internal-context-C4ZqP8IF.mjs";import"ofetch";import"./use-export-wallet-9if9oowB.mjs";import"./get-entropy-details-for-user-BGqBIfqR.mjs";import"./privy-context-pimLCE3L.mjs";import"@privy-io/are-addresses-equal";import"eventemitter3";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./index-cnyso2Fp.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"./usePrivy-ChZSTtn2.mjs";import"./paths-BzM95ysC.mjs";import"js-cookie";import"./PrivyPluginContext-2QN2dVUw.mjs";import"mipd";import"@privy-io/popup";import"@scure/base";import"@headlessui/react";import"@privy-io/urls";import"@privy-io/ethereum";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./frame-CjhCpycO.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-BYctG7hm.mjs";import"./ConnectWalletView-rdXlInEf.mjs";import"@heroicons/react/24/outline";import"@tanstack/react-virtual";import"./CopyableText-BCytXyJL.mjs";import"lucide-react";import"./Link-DJ5gq9Di.mjs";import"./QrCode-BHbLI4rX.mjs";import"qrcode";import"./EmailInputForm-Dgoii4vf.mjs";import"./ErrorMessage-D8VaAP5m.mjs";import"./useI18n-BpRybzwE.mjs";import"./WalletCards-DH1rqayz.mjs";import"./Screen-BHWyivgu.mjs";import"./index-Dq_xe9dz.mjs";import"./ConnectEmailForm-MZhtYjvT.mjs";import"./Chip-D2-wZOHJ.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"./farcaster-DPlSjvF5.mjs";import"@heroicons/react/24/outline/FingerPrintIcon";import"./ConnectPhoneForm-DptByaXA.mjs";import"./twitter-BoAxhlj6.mjs";import"./twitch-5IOe4sIQ.mjs";import"./telegram-B-JqnkqZ.mjs";import"./WalletOverflowButton-DSPUFJ5T.mjs";import"./ScreenLayout-D7WpqBtE.mjs";const e={component:()=>{let e=o();return e.loginMethodsAndOrder&&e.loginMethodsAndOrder.primary.length>0?/*#__PURE__*/t(r,{connectOnly:!0}):/*#__PURE__*/t(i,{connectOnly:!0})}};export{e as ConnectOrCreateScreen,e as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as o,jsxs as e,Fragment as r}from"react/jsx-runtime";import{forwardRef as n,useState as t,useEffect as i}from"react";import{styled as a}from"styled-components";import{countryCodesAndNumbers as d,validatePhoneNumber as l,phoneNumberTypingFormatter as c,getPlaceholderPhoneNumber as p,getCountryCallingCode as u,getPhoneCountryCodeAndNumber as h,formatPhoneNumber as s}from"@privy-io/js-sdk-core";import{u as g}from"./context-
|
|
1
|
+
import{jsx as o,jsxs as e,Fragment as r}from"react/jsx-runtime";import{forwardRef as n,useState as t,useEffect as i}from"react";import{styled as a}from"styled-components";import{countryCodesAndNumbers as d,validatePhoneNumber as l,phoneNumberTypingFormatter as c,getPlaceholderPhoneNumber as p,getCountryCallingCode as u,getPhoneCountryCodeAndNumber as h,formatPhoneNumber as s}from"@privy-io/js-sdk-core";import{u as g}from"./context-DanhWeBg.mjs";import{r as m}from"./useActiveWallet-DFp38Dx-.mjs";import{E as b,P as x}from"./ModalHeader-DnjCPU3j.mjs";import{C as v}from"./Chip-D2-wZOHJ.mjs";const f=({value:r,onChange:n})=>/*#__PURE__*/o("select",{value:r,onChange:n,children:d.map((o=>/*#__PURE__*/e("option",{value:o.code,children:[o.code," +",o.callCode]},o.code)))}),w=/*#__PURE__*/n(((n,a)=>{let d=g(),[w,k]=t(!1),{accountType:$}=m(),[j,N]=t(""),[P,S]=t(d?.intl.defaultCountry??"US"),V=l(j,P),z=c(P),T=p(P),U=u(P),L=!V,[q,E]=t(!1),B=U.length,D=o=>{let e=o.target.value;S(e),N(""),n.onChange&&n.onChange({rawPhoneNumber:j,qualifiedPhoneNumber:s(j,e),countryCode:e,isValid:l(j,P)})},I=(o,e)=>{try{let r=o.replace(/\D/g,"")===j.replace(/\D/g,"")?o:z.input(o);N(r),n.onChange&&n.onChange({rawPhoneNumber:r,qualifiedPhoneNumber:s(o,e),countryCode:e,isValid:l(o,e)})}catch(o){console.error("Error processing phone number:",o)}},R=()=>{E(!0);let o=s(j,P);n.onSubmit({rawPhoneNumber:j,qualifiedPhoneNumber:o,countryCode:P,isValid:l(j,P)}).finally((()=>E(!1)))};return i((()=>{if(n.defaultValue){let o=h(n.defaultValue);z.reset(),D({target:{value:o.countryCode}}),I(o.phone,o.countryCode)}}),[n.defaultValue]),/*#__PURE__*/e(r,{children:[/*#__PURE__*/o(y,{children:/*#__PURE__*/e(C,{$callingCodeLength:B,$stacked:n.stacked,children:[/*#__PURE__*/o(f,{value:P,onChange:D}),/*#__PURE__*/o("input",{ref:a,id:"phone-number-input",className:"login-method-button",type:"tel",placeholder:T,onFocus:()=>k(!0),onChange:o=>{I(o.target.value,P)},onKeyUp:o=>{"Enter"===o.key&&R()},value:j,autoComplete:"tel"}),"phone"!==$||w||n.hideRecent?n.stacked||n.noIncludeSubmitButton?/*#__PURE__*/o("span",{}):/*#__PURE__*/o(b,{isSubmitting:q,onClick:R,disabled:L,children:"Submit"}):/*#__PURE__*/o(v,{color:"gray",children:"Recent"})]})}),n.stacked&&!n.noIncludeSubmitButton?/*#__PURE__*/o(x,{loading:q,loadingText:null,onClick:R,disabled:L,children:"Submit"}):null]})}));let y=a.div`
|
|
2
2
|
width: 100%;
|
|
3
3
|
`,C=a.label`
|
|
4
4
|
--country-code-dropdown-width: calc(54px + calc(12 * ${o=>o.$callingCodeLength}px));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as e,jsx as n,Fragment as t}from"react/jsx-runtime";import{MagnifyingGlassIcon as l}from"@heroicons/react/24/outline";import{useVirtualizer as i}from"@tanstack/react-virtual";import{useMemo as a,useState as o,useCallback as r,useRef as c,useEffect as s}from"react";import{isMobile as d}from"react-device-detect";import{styled as h}from"styled-components";import{a as
|
|
1
|
+
import{jsxs as e,jsx as n,Fragment as t}from"react/jsx-runtime";import{MagnifyingGlassIcon as l}from"@heroicons/react/24/outline";import{useVirtualizer as i}from"@tanstack/react-virtual";import{useMemo as a,useState as o,useCallback as r,useRef as c,useEffect as s}from"react";import{isMobile as d}from"react-device-detect";import{styled as h}from"styled-components";import{a as m,T as u}from"./ModalHeader-DnjCPU3j.mjs";import{C as p}from"./CopyableText-BCytXyJL.mjs";import{L as g}from"./Link-DJ5gq9Di.mjs";import{Q as w}from"./QrCode-BHbLI4rX.mjs";import{E as f}from"./EmailInputForm-Dgoii4vf.mjs";import{u as y,q as v}from"./context-DanhWeBg.mjs";import{u as b}from"./useI18n-BpRybzwE.mjs";import{M as C,m as x,f as T,s as _,w as W,C as L,d as k,S as z}from"./useActiveWallet-DFp38Dx-.mjs";import{W as S,c as A,A as E}from"./use-export-wallet-9if9oowB.mjs";import{u as j,P as B,c as K}from"./internal-context-C4ZqP8IF.mjs";import{W as O}from"./WalletCards-DH1rqayz.mjs";import{S as q}from"./Screen-BHWyivgu.mjs";const N={phantom:{mobile:{native:"phantom://",universal:"https://phantom.app/ul/"}},solflare:{mobile:{native:void 0,universal:"https://solflare.com/ul/v1/"}},metamask:{image_url:{sm:C,md:C}}};class I{static normalize(e){return e.replace(/[-_]wallet$/,"").replace(/[-_]extension$/,"").toLowerCase()}isEth(e){return e.chains.some((e=>e.includes("eip155:")))}isSol(e){return e.chains.some((e=>e.includes("solana:")))}inAllowList(e,n){if(!this.normalizedAllowList||0===this.normalizedAllowList.length||"listing"===n&&this.includeWalletConnect)return!0;let t=I.normalize(e);return this.normalizedAllowList.some((e=>t===I.normalize(e)))}inDenyList(e,n){return"listing"===n&&"rabby"===e||"agw"===I.normalize(e)}chainMatches(e){return"ethereum-only"===this.chainFilter?"ethereum"===e:"solana-only"!==this.chainFilter||"solana"===e}getAllowListKey(e,n,t,l){let i=I.normalize(e);for(let e of this.normalizedAllowList||[])if(i===I.normalize(e))return e;if("connector"===n){if(("injected"===t||"solana_adapter"===t)&&"ethereum"===l&&this.detectedEth)return"detected_ethereum_wallets";if(("injected"===t||"solana_adapter"===t)&&"solana"===l&&this.detectedSol)return"detected_solana_wallets"}if("listing"===n&&this.includeWalletConnect)return"wallet_connect"}connectorOk(e){return!!("null"!==e.connectorType&&"walletconnect_solana"!==e.walletBranding.id&&this.chainMatches(e.chainType)&&(this.inAllowList(e.walletClientType,"connector")||("injected"===e.connectorType||"solana_adapter"===e.connectorType)&&("ethereum"===e.chainType&&this.detectedEth||"solana"===e.chainType&&this.detectedSol)))}listingOk(e){if(e.slug.includes("coinbase"))return!1;if("ethereum-only"===this.chainFilter){if(!this.isEth(e))return!1}else if("solana-only"===this.chainFilter&&!this.isSol(e))return!1;return!(!this.inAllowList(e.slug,"listing")||this.inDenyList(e.slug,"listing"))}getWallets(e,n){let t=new Map,l=e=>{let n=t.get(e.id);if(n){n.chainType!==e.chainType&&(n.chainType="multi");let t=new Set(n.chains);e.chains.forEach((e=>t.add(e))),n.chains=Array.from(t),!n.icon&&e.icon&&(n.icon=e.icon),!n.url&&e.url&&(n.url=e.url),!n.listing&&e.listing&&(n.listing=e.listing),!n.allowListKey&&e.allowListKey&&(n.allowListKey=e.allowListKey)}else t.set(e.id,e)};e.filter((e=>this.connectorOk(e))).forEach((e=>{let n=I.normalize(e.walletClientType);l({id:n,label:e.walletBranding?.name??n,source:"connector",connector:e,chainType:e.chainType,icon:e.walletBranding?.icon,url:void 0,chains:["ethereum"===e.chainType?"eip155":"solana"],allowListKey:this.getAllowListKey(e.walletClientType,"connector",e.connectorType,e.chainType)})}));let i=e.find((e=>"wallet_connect_v2"===e.connectorType)),a=e.find((e=>"walletconnect_solana"===e.walletBranding.id));n.filter((e=>this.listingOk(e))).forEach((n=>{let t=[...n.chains].filter((e=>e.includes("eip155:")||e.includes("solana:")));if(e.some((e=>I.normalize(e.walletClientType)===I.normalize(n.slug)&&"ethereum"===e.chainType&&"null"!==e.connectorType))||i||n.mobile.native||n.mobile.universal||x[n.slug]?.chainTypes.includes("ethereum")||(t=t.filter((e=>!e.includes("eip155:")))),e.some((e=>I.normalize(e.walletClientType)===I.normalize(n.slug)&&"solana"===e.chainType&&"null"!==e.connectorType))||a||n.mobile.native||n.mobile.universal||x[n.slug]?.chainTypes.includes("solana")||(t=t.filter((e=>!e.includes("solana:")))),!t.length)return;let o=I.normalize(n.slug),r=N[n.slug],c=r?.image_url?.sm||n.image_url?.sm;t.some((e=>e.includes("eip155:")))&&l({id:o,label:n.name||o,source:"listing",listing:n,chainType:"ethereum",icon:c,url:n.homepage,chains:t,allowListKey:this.getAllowListKey(n.slug,"listing")}),t.some((e=>e.includes("solana:")))&&l({id:o,label:n.name||o,source:"listing",listing:n,chainType:"solana",icon:c,url:n.homepage,chains:t,allowListKey:this.getAllowListKey(n.slug,"listing")})})),this.includeWalletConnectQr&&i&&l({id:"wallet_connect_qr",label:"WalletConnect",source:"connector",connector:i,chainType:"ethereum",icon:S,url:void 0,chains:["eip155"],allowListKey:"wallet_connect_qr"}),this.includeWalletConnectQrSolana&&a&&l({id:"wallet_connect_qr_solana",label:"WalletConnect",source:"connector",connector:a,chainType:"solana",icon:S,url:void 0,chains:["solana"],allowListKey:"wallet_connect_qr_solana"});let o=Array.from(t.values());o.forEach((e=>{let n=N[e.listing?.slug||e.id];n?.image_url?.sm&&(e.icon=n.image_url.sm)}));let r=new Map;return this.normalizedAllowList?.forEach(((e,n)=>{r.set(I.normalize(e),n)})),{wallets:o.slice().sort(((e,n)=>{if(e.allowListKey&&n.allowListKey){let t=this.normalizedAllowList?.findIndex((n=>I.normalize(n)===I.normalize(e.allowListKey)))??-1,l=this.normalizedAllowList?.findIndex((e=>I.normalize(e)===I.normalize(n.allowListKey)))??-1;if(t!==l&&t>=0&&l>=0)return t-l}if(e.allowListKey&&!n.allowListKey)return-1;if(!e.allowListKey&&n.allowListKey)return 1;let t=I.normalize(e.id),l=I.normalize(n.id);"binance-defi"===t?t="binance":"universalprofiles"===t?t="universal_profile":"cryptocom-defi"===t?t="cryptocom":"bitkeep"===t&&(t="bitget_wallet"),"binance-defi"===l?l="binance":"universalprofiles"===l?l="universal_profile":"cryptocom-defi"===l?l="cryptocom":"bitkeep"===l&&(l="bitget_wallet");let i=r.has(t),a=r.has(l);return i&&a?r.get(t)-r.get(l):i?-1:a?1:"connector"===e.source&&"listing"===n.source?-1:"listing"===e.source&&"connector"===n.source?1:e.label.toLowerCase().localeCompare(n.label.toLowerCase())})),walletCount:o.length}}constructor(e,n){if(this.chainFilter=e,n&&n.length>0){if(this.normalizedAllowList=n.map(String),this.normalizedAllowList.includes("binance")){let e=this.normalizedAllowList.indexOf("binance");this.normalizedAllowList.splice(e+1,0,"binance-defi-wallet")}if(this.normalizedAllowList.includes("bitget_wallet")){let e=this.normalizedAllowList.indexOf("bitget_wallet");this.normalizedAllowList.splice(e+1,0,"bitkeep")}}this.detectedEth=this.normalizedAllowList?.includes("detected_ethereum_wallets")??!1,this.detectedSol=this.normalizedAllowList?.includes("detected_solana_wallets")??!1,this.includeWalletConnect=this.normalizedAllowList?.includes("wallet_connect")??!1,this.includeWalletConnectQr=this.normalizedAllowList?.includes("wallet_connect_qr")??!1,this.includeWalletConnectQrSolana=this.normalizedAllowList?.includes("wallet_connect_qr_solana")??!1}}var U=t=>/*#__PURE__*/e("svg",{viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...t,children:[/*#__PURE__*/n("path",{d:"m0 0h32v32h-32z",fill:"#5469d4"}),/*#__PURE__*/n("path",{d:"m15.997 5.333-.143.486v14.106l.143.143 6.548-3.87z",fill:"#c2ccf4"}),/*#__PURE__*/n("path",{d:"m15.996 5.333-6.548 10.865 6.548 3.87z",fill:"#fff"}),/*#__PURE__*/n("path",{d:"m15.997 21.306-.08.098v5.025l.08.236 6.552-9.227z",fill:"#c2ccf4"}),/*#__PURE__*/n("path",{d:"m15.996 26.665v-5.36l-6.548-3.867z",fill:"#fff"}),/*#__PURE__*/n("path",{d:"m15.995 20.07 6.548-3.87-6.548-2.976v6.847z",fill:"#8698e8"}),/*#__PURE__*/n("path",{d:"m9.448 16.2 6.548 3.87v-6.846z",fill:"#c2ccf4"})]}),$=t=>/*#__PURE__*/e("svg",{viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...t,children:[/*#__PURE__*/e("linearGradient",{id:"a",gradientUnits:"userSpaceOnUse",x1:"7.233",x2:"24.766",y1:"24.766",y2:"7.234",children:[/*#__PURE__*/n("stop",{offset:"0",stopColor:"#9945ff"}),/*#__PURE__*/n("stop",{offset:".2",stopColor:"#7962e7"}),/*#__PURE__*/n("stop",{offset:"1",stopColor:"#00d18c"})]}),/*#__PURE__*/n("path",{d:"m0 0h32v32h-32z",fill:"#10111a"}),/*#__PURE__*/n("path",{clipRule:"evenodd",d:"m9.873 20.41a.645.645 0 0 1 .476-.21l14.662.012a.323.323 0 0 1 .238.54l-3.123 3.438a.643.643 0 0 1 -.475.21l-14.662-.012a.323.323 0 0 1 -.238-.54zm15.376-2.862a.322.322 0 0 1 -.238.54l-14.662.012a.642.642 0 0 1 -.476-.21l-3.122-3.44a.323.323 0 0 1 .238-.54l14.662-.012a.644.644 0 0 1 .475.21zm-15.376-9.738a.644.644 0 0 1 .476-.21l14.662.012a.322.322 0 0 1 .238.54l-3.123 3.438a.643.643 0 0 1 -.475.21l-14.662-.012a.323.323 0 0 1 -.238-.54z",fill:"url(#a)",fillRule:"evenodd"})]});const F=h.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
justify-content: space-between;
|
|
4
4
|
align-items: center;
|
|
@@ -71,7 +71,7 @@ import{jsxs as e,jsx as n,Fragment as t}from"react/jsx-runtime";import{Magnifyin
|
|
|
71
71
|
100% 32px,
|
|
72
72
|
100% 16px;
|
|
73
73
|
background-attachment: local, scroll;
|
|
74
|
-
`;function V({enabled:e=!0,walletList:n,walletChainType:t}){let l=f(),{connectors:i}=j(),{listings:r,loading:c}=x(e),s=t??l.appearance.walletChainType,d=n??l.appearance?.walletList,h=a((()=>new O(s,d)),[s,d]),{wallets:u,walletCount:m}=a((()=>h.getWallets(i,r)),[h,i,r]),[p,g]=o(""),w=a((()=>p?u.filter((e=>e.label.toLowerCase().includes(p.toLowerCase()))):u),[p,u]),[y,v]=o();return{selected:y,setSelected:v,search:p,setSearch:g,loadingListings:c,wallets:w,walletCount:m}}let R=e=>!e||"string"!=typeof e&&(e instanceof L||e instanceof z);const Y=({index:l,style:i,data:a,recent:o})=>{let r=a.wallets[l],{walletChainType:c,handleWalletClick:s}=a,{t:d}=b(),h={...i,boxSizing:"border-box"};return r?/*#__PURE__*/e(Z,{style:h,onClick:()=>s(r),children:[r.icon&&(r.connector&&!R(r.connector)?/*#__PURE__*/n(M,{children:"string"==typeof r.icon?/*#__PURE__*/n(P,{src:r.icon}):/*#__PURE__*/n(r.icon,{style:{width:"32px",height:"32px"}})}):"string"==typeof r.icon?/*#__PURE__*/n(P,{src:r.icon}):/*#__PURE__*/n(r.icon,{style:{width:"32px",height:"32px"}})),/*#__PURE__*/n(te,{children:r.label}),o?/*#__PURE__*/e(t,{children:[/*#__PURE__*/n(Q,{children:d("connectWallet.lastUsed")}),/*#__PURE__*/n(ee,{children:/*#__PURE__*/e(t,{children:["ethereum-only"===c&&/*#__PURE__*/n(U,{}),"solana-only"===c&&/*#__PURE__*/n($,{})]})})]}):/*#__PURE__*/n(ee,{children:!("ethereum-only"===c||"solana-only"===c)&&/*#__PURE__*/e(t,{children:[r.chains?.some((e=>e.startsWith("eip155")))&&/*#__PURE__*/n(U,{}),r.chains?.some((e=>e.startsWith("solana")))&&/*#__PURE__*/n($,{})]})})]}):null};var G=({className:h,customDescription:p,connectOnly:C,preSelectedWalletId:x,hideHeader:S,...F})=>{let D=f(),{t:M}=b(),{connectors:Q}=j(),H=F.walletChainType||D.appearance.walletChainType,G=F.walletList||D.appearance?.walletList,{onBack:ae,onClose:oe,app:re}=F,{selected:ce,setSelected:se,qrUrl:de,setQrUrl:he,connecting:ue,uiState:me,errorCode:pe,wallets:ge,walletCount:we,handleConnect:ye,handleBack:fe,showSearchBar:ve,isInitialConnectView:be,title:Ce,search:Te,setSearch:xe}=function({onConnect:e,onBack:n,onClose:t,onConnectError:l,walletList:i,walletChainType:c,app:s}){let h=f(),{connectors:u}=j(),{t:m}=b(),{wallets:p,walletCount:g,search:w,setSearch:y,selected:C,setSelected:T}=V({enabled:_(i??[]),walletList:i,walletChainType:c}),[x,k]=o(),[L,z]=o(),[S,E]=o(),[K,q]=o(),N=!C&&!S&&!K,I=N&&(g>6||w.length>0),O=u.find((e=>"wallet_connect_v2"===e.connectorType)),U=r((async(n,t)=>{if(!n)return;let i=t?.name??"Wallet";if(K?.connector!==n||"loading"!==x){if(k("loading"),"string"==typeof n)return A.debug("Connecting wallet via deeplink",{wallet:i,url:n.length>80?`${n.slice(0,80)}...`:n}),q({connector:n,name:i,icon:t?.icon,id:t?.id,url:t?.url}),void window.open(n,"_blank");A.debug("Connecting wallet via connector",{wallet:i,connectorType:n.connectorType}),q({connector:n,name:t?.name??n.walletBranding.name??"Wallet",icon:t?.icon??n.walletBranding.icon,id:t?.id,url:t?.url});try{let t=await n.connect({showPrompt:!0});if(!t)return A.warn("Wallet connection returned null",{wallet:i,connectorType:n.connectorType}),k("error"),z(void 0),void l?.(new B("Unable to connect wallet"));A.debug("Wallet connection successful",{wallet:i,connectorType:n.connectorType}),k("success"),z(void 0),W({address:t.address,client:t.walletClientType,appId:h.id}),setTimeout((()=>{e({connector:n,wallet:t})}),v)}catch(e){if(e?.message?.includes("already pending for origin")||e?.message?.includes("wallet_requestPermissions"))return void A.debug("Connection request already pending, maintaining loading state",{wallet:i});let t=e instanceof Error?e.message:String(e?.message||"Unknown error");A.error("Wallet connection failed",e,{wallet:i,connectorType:n.connectorType,errorCode:e?.privyErrorCode}),k("error"),z(e?.privyErrorCode),l?.(e instanceof Error?e:new B(t||"Unable to connect wallet"))}}else A.debug("Duplicate connection attempt prevented",{wallet:i})}),[h.id,e,K,x]),$=r((()=>S?(k(void 0),z(void 0),q(void 0),void E(void 0)):K?(k(void 0),z(void 0),void q(void 0)):C?(k(void 0),z(void 0),q(void 0),void T(void 0)):"error"===x||"loading"===x?(k(void 0),z(void 0),void q(void 0)):void n?.()),[S,K,C,x,n]),F=a((()=>K?.connector===O&&S&&d&&K?.name?m("connectWallet.goToWallet",{walletName:K.name}):K?.connector===O&&S&&K?.name?m("connectWallet.scanToConnect",{walletName:K.name}):S&&K?.name?m(d?"connectWallet.goToWallet":"connectWallet.scanToConnect",{walletName:K.name}):"string"==typeof K?.connector?m("connectWallet.openOrInstall",{walletName:K.name}):C&&!K?m("connectWallet.selectNetwork"):K?null:m("connectWallet.selectYourWallet")),[K,S,C,O,m]);return{selected:C,setSelected:T,qrUrl:S,setQrUrl:E,connecting:K,uiState:x,errorCode:L,search:w,setSearch:y,wallets:p,walletCount:g,wc:O,isInitialConnectView:N,showSearchBar:I,title:F,handleConnect:U,handleBack:$,onClose:t,onConnect:e,app:s}}({...F,walletList:G,walletChainType:H}),_e=Q.find((e=>"wallet_connect_v2"===e.connectorType)),We=Q.find((e=>"walletconnect_solana"===e.walletBranding.id)),ke=c(null),Le=i({count:ge.length,getScrollElement:()=>ke.current,estimateSize:()=>56,overscan:6,gap:5}),ze=r((async e=>{let n="solana-only"!==H&&e.chains?.some((e=>e.startsWith("eip155"))),t="ethereum-only"!==H&&e.chains?.some((e=>e.startsWith("solana"))),l=()=>{let n=e.id;return T[n]||T[`${n}_wallet`]},i=n=>{let t=O.normalize(e.id);return Q.find((e=>O.normalize(e.walletClientType)===t&&e.chainType===n&&"wallet_connect_v2"!==e.connectorType&&!("ethereum"===e.chainType&&e instanceof L||"solana"===e.chainType&&e instanceof z)))},a=async()=>{if(!_e||!e.listing)return!1;let n=I[e.listing.slug]?{...e.listing,...I[e.listing.slug]}:e.listing;return _e.setWalletEntry(n,he),await _e.resetConnection(e.id),await ye(_e,{name:e.label,icon:e.icon,id:e.id,url:e.url}),!0},o=async()=>!!We&&!!e.listing&&(await We.disconnect(),We.wallet.setWalletEntry(e.listing,he),await new Promise((e=>setTimeout(e,100))),await ye(We,{name:e.label,icon:e.icon,id:e.id,url:e.url}),!0),r=async n=>{let t=(e=>{let n=l();if(n)return n.getMobileRedirect({isSolana:e,connectOnly:!!C,useUniversalLink:!1})})(n);return!!t&&(await ye(t,{name:e.label,icon:e.icon,id:e.id,url:e.url}),!0)};if(n&&t)se(e);else{if(n&&!t){let n=i("ethereum");if(n&&!R(n))return A.debug("Attempting injected EVM connection",{wallet:e.id,connectorType:n.connectorType}),void await ye(n,{name:e.label,icon:e.icon,id:e.id,url:e.url});if(d&&l()){if(await r(!1)||await a())return}else if(await a()||await r(!1))return}if(t&&!n){let n=i("solana");if(n&&!R(n))return A.debug("Attempting injected Solana connection",{wallet:e.id,connectorType:n.connectorType}),void await ye(n,{name:e.label,icon:e.icon,id:e.id,url:e.url});if(d){if(await r(!0)||await o())return}else if(await o()||await r(!0))return}if(!R(e.connector)){if(A.debug("Using fallback direct connector",{wallet:e.id,connectorType:e.connector?.connectorType}),_e&&"wallet_connect_v2"===e.connector?.connectorType)if(await _e.resetConnection(e.id),"wallet_connect_qr"!==e.id&&e.listing){let n=I[e.listing.slug]?{...e.listing,...I[e.listing.slug]}:e.listing;_e.setWalletEntry(n,he)}else _e.setWalletEntry({id:"wallet_connect_qr",name:"WalletConnect",rdns:"",slug:"wallet-connect",homepage:"",chains:["eip155"],mobile:{native:"",universal:void 0}},he);return We&&"walletconnect_solana"===e.connector?.walletBranding.id&&(await We.disconnect(),"wallet_connect_qr_solana"!==e.id&&e.listing?We.wallet.setWalletEntry(e.listing,he):We.wallet.setWalletEntry({id:"wallet_connect_solana_qr",name:"WalletConnect",rdns:"",slug:"wallet-connect-solana",homepage:"",chains:["solana"],mobile:{native:"",universal:void 0}},he),await new Promise((e=>setTimeout(e,100)))),void await ye(e.connector,{name:e.label,icon:e.icon,id:e.id,url:e.url})}e.url?await ye(e.url,{name:e.label,icon:e.icon,id:e.id,url:e.url}):A.warn("No available connection method for wallet",{wallet:e.id})}}),[_e,We,ye,se,he,H,C,Q]);return s((()=>{if(!x)return;let e=ge.find((({id:e})=>e===x));e&&ze(e).catch(console.error)}),[x]),/*#__PURE__*/e(N,{className:h,children:[/*#__PURE__*/n(N.Header,{icon:S&&be?void 0:ue&&!de||de&&d&&ue?.icon?ue.icon:ue?void 0:q,iconVariant:ue&&!de||de&&d?"loading":void 0,iconLoadingStatus:ue&&!de||de&&d?{success:"success"===me,fail:"error"===me}:void 0,title:S&&be?void 0:ue&&!de?M("connectWallet.waitingForWallet",{walletName:ue.name}):de&&d?M("connectWallet.waitingForWallet",{walletName:ue?.name??"connection"}):Ce,subtitle:S&&be?void 0:ue&&!de&&"string"==typeof ue.connector?M("connectWallet.installAndConnect",{walletName:ue.name}):ue&&!de&&"string"!=typeof ue.connector?"error"===me?pe===K.NO_SOLANA_ACCOUNTS?`The connected wallet has no Solana accounts. Please add a Solana account in ${ue.name} and try again.`:M("connectWallet.tryConnectingAgain"):M("connectionStatus.connectOneWallet"):be?p??(re?M("connectWallet.connectToAccount",{appName:re.name}):null):null,showBack:!!ae||!be,showClose:!0,onBack:ae||fe,onClose:oe}),/*#__PURE__*/e(N.Body,{ref:ke,$colorScheme:D.appearance.palette.colorScheme,style:{marginBottom:de?"0.5rem":void 0},children:[ve&&/*#__PURE__*/n(J,{children:/*#__PURE__*/e(y,{style:{background:"transparent"},children:[/*#__PURE__*/n(k,{children:/*#__PURE__*/n(l,{})}),/*#__PURE__*/n("input",{className:"login-method-button",type:"text",placeholder:M("connectWallet.searchPlaceholder",{count:String(we)}),onChange:e=>xe(e.target.value),value:Te})]})}),de&&d&&"loading"===me&&/*#__PURE__*/e("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"1rem"},children:[/*#__PURE__*/n(u,{variant:"primary",onClick:()=>window.open(de.universal??de.native,"_blank"),style:{width:"100%"},children:M("connectWallet.openInApp")}),/*#__PURE__*/n(le,{value:de.universal??de.native,iconOnly:!0,children:"Copy link"})]}),de&&!d&&"loading"===me&&/*#__PURE__*/n("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"1rem"},children:/*#__PURE__*/n(le,{value:de.universal??de.native,iconOnly:!0,children:M("connectWallet.copyLink")})}),de&&!d&&/*#__PURE__*/n(w,{size:280,url:de.universal??de.native,squareLogoElement:ue?.icon?"string"==typeof ue.icon?e=>/*#__PURE__*/n("svg",{...e,children:/*#__PURE__*/n("image",{href:ue.icon,height:e.height,width:e.width})}):ue.icon:E}),de&&!d&&ue?.url&&("binance"===ue.id||"binanceus"===ue.id||"binance-defi"===ue.id)&&/*#__PURE__*/e(ie,{children:[/*#__PURE__*/e("span",{children:["Don't have ",ue.name,"? "]}),/*#__PURE__*/n(g,{href:ue.url,target:"_blank",size:"sm",children:"Download here"})]}),/*#__PURE__*/e(X,{children:[ue&&!de&&"string"==typeof ue.connector&&/*#__PURE__*/e(Z,{onClick:()=>window.open(ue.connector,"_blank"),children:[ue.icon&&("string"==typeof ue.icon?/*#__PURE__*/n(P,{src:ue.icon}):/*#__PURE__*/n(ue.icon,{})),/*#__PURE__*/n(te,{children:ue.name})]}),ce?.chains.some((e=>e.startsWith("eip155")))&&!ue&&/*#__PURE__*/e(Z,{onClick:()=>ze({...ce,chains:ce.chains.filter((e=>e.startsWith("eip155")))}),children:[ce.icon&&("string"==typeof ce.icon?/*#__PURE__*/n(P,{src:ce.icon}):/*#__PURE__*/n(ce.icon,{})),/*#__PURE__*/n(te,{children:ce.label}),/*#__PURE__*/n(ee,{children:/*#__PURE__*/n(U,{})})]}),ce?.chains.some((e=>e.startsWith("solana")))&&!ue&&/*#__PURE__*/e(Z,{onClick:()=>ze({...ce,chains:ce.chains.filter((e=>e.startsWith("solana")))}),children:[ce.icon&&("string"==typeof ce.icon?/*#__PURE__*/n(P,{src:ce.icon}):/*#__PURE__*/n(ce.icon,{})),/*#__PURE__*/n(te,{children:ce.label}),/*#__PURE__*/n(ee,{children:/*#__PURE__*/n($,{})})]}),be&&/*#__PURE__*/e(t,{children:[!(we>0)&&/*#__PURE__*/n(ne,{children:M("connectWallet.noWalletsFound")}),we>0&&!de&&/*#__PURE__*/n("div",{style:{maxHeight:56*Math.min(ge.length,5)+5,width:"100%"},children:/*#__PURE__*/n("div",{style:{height:`${Le.getTotalSize()}px`,width:"100%",position:"relative"},children:Le.getVirtualItems().map((e=>/*#__PURE__*/n(Y,{index:e.index,style:{position:"absolute",top:0,left:0,height:`${e.size}px`,transform:`translateY(${e.start}px)`},data:{wallets:ge,walletChainType:H,handleWalletClick:ze}},e.key)))})})]})]})]}),/*#__PURE__*/e(N.Footer,{children:[ue&&!de&&"string"!=typeof ue.connector&&"error"===me&&/*#__PURE__*/n(N.Actions,{children:/*#__PURE__*/n(u,{style:{width:"100%",alignItems:"center"},variant:"error",onClick:()=>ye(ue.connector,{name:ue.name,icon:ue.icon,id:ue.id,url:ue.url}),children:M("connectWallet.retry")})}),!!(re&&re.legal.privacyPolicyUrl&&re.legal.termsAndConditionsUrl)&&/*#__PURE__*/n(m,{app:re,alwaysShowImplicitConsent:!0}),/*#__PURE__*/n(N.Watermark,{})]})]})};let J=h.div`
|
|
74
|
+
`;function V({enabled:e=!0,walletList:n,walletChainType:t}){let l=y(),{connectors:i}=j(),{listings:r,loading:c}=T(e),s=t??l.appearance.walletChainType,d=n??l.appearance?.walletList,h=a((()=>new I(s,d)),[s,d]),{wallets:m,walletCount:u}=a((()=>h.getWallets(i,r)),[h,i,r]),[p,g]=o(""),w=a((()=>p?m.filter((e=>e.label.toLowerCase().includes(p.toLowerCase()))):m),[p,m]),[f,v]=o();return{selected:f,setSelected:v,search:p,setSearch:g,loadingListings:c,wallets:w,walletCount:u}}let R=e=>!e||"string"!=typeof e&&(e instanceof k||e instanceof z);const Y=({index:l,style:i,data:a,recent:o})=>{let r=a.wallets[l],{walletChainType:c,handleWalletClick:s}=a,{t:d}=b(),h={...i,boxSizing:"border-box"};return r?/*#__PURE__*/e(Z,{style:h,onClick:()=>s(r),children:[r.icon&&(r.connector&&!R(r.connector)?/*#__PURE__*/n(M,{children:"string"==typeof r.icon?/*#__PURE__*/n(P,{src:r.icon}):/*#__PURE__*/n(r.icon,{style:{width:"32px",height:"32px"}})}):"string"==typeof r.icon?/*#__PURE__*/n(P,{src:r.icon}):/*#__PURE__*/n(r.icon,{style:{width:"32px",height:"32px"}})),/*#__PURE__*/n(te,{children:r.label}),o?/*#__PURE__*/e(t,{children:[/*#__PURE__*/n(Q,{children:d("connectWallet.lastUsed")}),/*#__PURE__*/n(ee,{children:/*#__PURE__*/e(t,{children:["ethereum-only"===c&&/*#__PURE__*/n(U,{}),"solana-only"===c&&/*#__PURE__*/n($,{})]})})]}):/*#__PURE__*/n(ee,{children:!("ethereum-only"===c||"solana-only"===c)&&/*#__PURE__*/e(t,{children:[r.chains?.some((e=>e.startsWith("eip155")))&&/*#__PURE__*/n(U,{}),r.chains?.some((e=>e.startsWith("solana")))&&/*#__PURE__*/n($,{})]})})]}):null};var G=({className:h,customDescription:p,connectOnly:C,preSelectedWalletId:T,hideHeader:S,...F})=>{let D=y(),{t:M}=b(),{connectors:Q}=j(),H=F.walletChainType||D.appearance.walletChainType,G=F.walletList||D.appearance?.walletList,{onBack:ae,onClose:oe,app:re}=F,{selected:ce,setSelected:se,qrUrl:de,setQrUrl:he,connecting:me,uiState:ue,errorCode:pe,wallets:ge,walletCount:we,handleConnect:fe,handleBack:ye,showSearchBar:ve,isInitialConnectView:be,title:Ce,search:xe,setSearch:Te}=function({onConnect:e,onBack:n,onClose:t,onConnectError:l,walletList:i,walletChainType:c,app:s}){let h=y(),{connectors:m}=j(),{t:u}=b(),{wallets:p,walletCount:g,search:w,setSearch:f,selected:C,setSelected:x}=V({enabled:_(i??[]),walletList:i,walletChainType:c}),[T,L]=o(),[k,z]=o(),[S,E]=o(),[K,O]=o(),q=!C&&!S&&!K,N=q&&(g>6||w.length>0),I=m.find((e=>"wallet_connect_v2"===e.connectorType)),U=r((async(n,t)=>{if(!n)return;let i=t?.name??"Wallet";if(K?.connector!==n||"loading"!==T){if(L("loading"),"string"==typeof n)return A.debug("Connecting wallet via deeplink",{wallet:i,url:n.length>80?`${n.slice(0,80)}...`:n}),O({connector:n,name:i,icon:t?.icon,id:t?.id,url:t?.url}),void window.open(n,"_blank");A.debug("Connecting wallet via connector",{wallet:i,connectorType:n.connectorType}),O({connector:n,name:t?.name??n.walletBranding.name??"Wallet",icon:t?.icon??n.walletBranding.icon,id:t?.id,url:t?.url});try{let t=await n.connect({showPrompt:!0});if(!t)return A.warn("Wallet connection returned null",{wallet:i,connectorType:n.connectorType}),L("error"),z(void 0),void l?.(new B("Unable to connect wallet"));A.debug("Wallet connection successful",{wallet:i,connectorType:n.connectorType}),L("success"),z(void 0),W({address:t.address,client:t.walletClientType,appId:h.id}),setTimeout((()=>{e({connector:n,wallet:t})}),v)}catch(e){if(e?.message?.includes("already pending for origin")||e?.message?.includes("wallet_requestPermissions"))return void A.debug("Connection request already pending, maintaining loading state",{wallet:i});let t=e instanceof Error?e.message:String(e?.message||"Unknown error");A.error("Wallet connection failed",e,{wallet:i,connectorType:n.connectorType,errorCode:e?.privyErrorCode}),L("error"),z(e?.privyErrorCode),l?.(e instanceof Error?e:new B(t||"Unable to connect wallet"))}}else A.debug("Duplicate connection attempt prevented",{wallet:i})}),[h.id,e,K,T]),$=r((()=>S?(L(void 0),z(void 0),O(void 0),void E(void 0)):K?(L(void 0),z(void 0),void O(void 0)):C?(L(void 0),z(void 0),O(void 0),void x(void 0)):"error"===T||"loading"===T?(L(void 0),z(void 0),void O(void 0)):void n?.()),[S,K,C,T,n]),F=a((()=>K?.connector===I&&S&&d&&K?.name?u("connectWallet.goToWallet",{walletName:K.name}):K?.connector===I&&S&&K?.name?u("connectWallet.scanToConnect",{walletName:K.name}):S&&K?.name?u(d?"connectWallet.goToWallet":"connectWallet.scanToConnect",{walletName:K.name}):"string"==typeof K?.connector?u("connectWallet.openOrInstall",{walletName:K.name}):C&&!K?u("connectWallet.selectNetwork"):K?null:u("connectWallet.selectYourWallet")),[K,S,C,I,u]);return{selected:C,setSelected:x,qrUrl:S,setQrUrl:E,connecting:K,uiState:T,errorCode:k,search:w,setSearch:f,wallets:p,walletCount:g,wc:I,isInitialConnectView:q,showSearchBar:N,title:F,handleConnect:U,handleBack:$,onClose:t,onConnect:e,app:s}}({...F,walletList:G,walletChainType:H}),_e=Q.find((e=>"wallet_connect_v2"===e.connectorType)),We=Q.find((e=>"walletconnect_solana"===e.walletBranding.id)),Le=c(null),ke=i({count:ge.length,getScrollElement:()=>Le.current,estimateSize:()=>56,overscan:6,gap:5}),ze=r((async e=>{let n="solana-only"!==H&&e.chains?.some((e=>e.startsWith("eip155"))),t="ethereum-only"!==H&&e.chains?.some((e=>e.startsWith("solana"))),l=()=>{let n=e.id;return x[n]||x[`${n}_wallet`]},i=n=>{let t=I.normalize(e.id);return Q.find((e=>I.normalize(e.walletClientType)===t&&e.chainType===n&&"wallet_connect_v2"!==e.connectorType&&!("ethereum"===e.chainType&&e instanceof k||"solana"===e.chainType&&e instanceof z)))},a=async()=>{if(!_e||!e.listing)return!1;let n=N[e.listing.slug]?{...e.listing,...N[e.listing.slug]}:e.listing;return _e.setWalletEntry(n,he),await _e.resetConnection(e.id),await fe(_e,{name:e.label,icon:e.icon,id:e.id,url:e.url}),!0},o=async()=>!!We&&!!e.listing&&(await We.disconnect(),We.wallet.setWalletEntry(e.listing,he),await new Promise((e=>setTimeout(e,100))),await fe(We,{name:e.label,icon:e.icon,id:e.id,url:e.url}),!0),r=async n=>{let t=(e=>{let n=l();if(n)return n.getMobileRedirect({isSolana:e,connectOnly:!!C,useUniversalLink:!1})})(n);return!!t&&(await fe(t,{name:e.label,icon:e.icon,id:e.id,url:e.url}),!0)};if(n&&t)se(e);else{if(n&&!t){let n=i("ethereum");if(n&&!R(n))return A.debug("Attempting injected EVM connection",{wallet:e.id,connectorType:n.connectorType}),void await fe(n,{name:e.label,icon:e.icon,id:e.id,url:e.url});if(d&&l()){if(await r(!1)||await a())return}else if(await a()||await r(!1))return}if(t&&!n){let n=i("solana");if(n&&!R(n))return A.debug("Attempting injected Solana connection",{wallet:e.id,connectorType:n.connectorType}),void await fe(n,{name:e.label,icon:e.icon,id:e.id,url:e.url});if(d){if(await r(!0)||await o())return}else if(await o()||await r(!0))return}if(!R(e.connector)){if(A.debug("Using fallback direct connector",{wallet:e.id,connectorType:e.connector?.connectorType}),_e&&"wallet_connect_v2"===e.connector?.connectorType)if(await _e.resetConnection(e.id),"wallet_connect_qr"!==e.id&&e.listing){let n=N[e.listing.slug]?{...e.listing,...N[e.listing.slug]}:e.listing;_e.setWalletEntry(n,he)}else _e.setWalletEntry({id:"wallet_connect_qr",name:"WalletConnect",rdns:"",slug:"wallet-connect",homepage:"",chains:["eip155"],mobile:{native:"",universal:void 0}},he);return We&&"walletconnect_solana"===e.connector?.walletBranding.id&&(await We.disconnect(),"wallet_connect_qr_solana"!==e.id&&e.listing?We.wallet.setWalletEntry(e.listing,he):We.wallet.setWalletEntry({id:"wallet_connect_solana_qr",name:"WalletConnect",rdns:"",slug:"wallet-connect-solana",homepage:"",chains:["solana"],mobile:{native:"",universal:void 0}},he),await new Promise((e=>setTimeout(e,100)))),void await fe(e.connector,{name:e.label,icon:e.icon,id:e.id,url:e.url})}e.url?await fe(e.url,{name:e.label,icon:e.icon,id:e.id,url:e.url}):A.warn("No available connection method for wallet",{wallet:e.id})}}),[_e,We,fe,se,he,H,C,Q]);return s((()=>{if(!T)return;let e=ge.find((({id:e})=>e===T));e&&ze(e).catch(console.error)}),[T]),/*#__PURE__*/e(q,{className:h,children:[/*#__PURE__*/n(q.Header,{icon:S&&be?void 0:me&&!de||de&&d&&me?.icon?me.icon:me?void 0:O,iconVariant:me&&!de||de&&d?"loading":void 0,iconLoadingStatus:me&&!de||de&&d?{success:"success"===ue,fail:"error"===ue}:void 0,title:S&&be?void 0:me&&!de?M("connectWallet.waitingForWallet",{walletName:me.name}):de&&d?M("connectWallet.waitingForWallet",{walletName:me?.name??"connection"}):Ce,subtitle:S&&be?void 0:me&&!de&&"string"==typeof me.connector?M("connectWallet.installAndConnect",{walletName:me.name}):me&&!de&&"string"!=typeof me.connector?"error"===ue?pe===K.NO_SOLANA_ACCOUNTS?`The connected wallet has no Solana accounts. Please add a Solana account in ${me.name} and try again.`:M("connectWallet.tryConnectingAgain"):M("connectionStatus.connectOneWallet"):be?p??(re?M("connectWallet.connectToAccount",{appName:re.name}):null):null,showBack:!!ae||!be,showClose:!0,onBack:ae||ye,onClose:oe}),/*#__PURE__*/e(q.Body,{ref:Le,$colorScheme:D.appearance.palette.colorScheme,style:{marginBottom:de?"0.5rem":void 0},children:[ve&&/*#__PURE__*/n(J,{children:/*#__PURE__*/e(f,{style:{background:"transparent"},children:[/*#__PURE__*/n(L,{children:/*#__PURE__*/n(l,{})}),/*#__PURE__*/n("input",{className:"login-method-button",type:"text",placeholder:M("connectWallet.searchPlaceholder",{count:String(we)}),onChange:e=>Te(e.target.value),value:xe})]})}),de&&d&&"loading"===ue&&/*#__PURE__*/e("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"1rem"},children:[/*#__PURE__*/n(m,{variant:"primary",onClick:()=>window.open(de.universal??de.native,"_blank"),style:{width:"100%"},children:M("connectWallet.openInApp")}),/*#__PURE__*/n(le,{value:de.universal??de.native,iconOnly:!0,children:"Copy link"})]}),de&&!d&&"loading"===ue&&/*#__PURE__*/n("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"1rem"},children:/*#__PURE__*/n(le,{value:de.universal??de.native,iconOnly:!0,children:M("connectWallet.copyLink")})}),de&&!d&&/*#__PURE__*/n(w,{size:280,url:de.universal??de.native,squareLogoElement:me?.icon?"string"==typeof me.icon?e=>/*#__PURE__*/n("svg",{...e,children:/*#__PURE__*/n("image",{href:me.icon,height:e.height,width:e.width})}):me.icon:E}),de&&!d&&me?.url&&("binance"===me.id||"binanceus"===me.id||"binance-defi"===me.id)&&/*#__PURE__*/e(ie,{children:[/*#__PURE__*/e("span",{children:["Don't have ",me.name,"? "]}),/*#__PURE__*/n(g,{href:me.url,target:"_blank",size:"sm",children:"Download here"})]}),/*#__PURE__*/e(X,{children:[me&&!de&&"string"==typeof me.connector&&/*#__PURE__*/e(Z,{onClick:()=>window.open(me.connector,"_blank"),children:[me.icon&&("string"==typeof me.icon?/*#__PURE__*/n(P,{src:me.icon}):/*#__PURE__*/n(me.icon,{})),/*#__PURE__*/n(te,{children:me.name})]}),ce?.chains.some((e=>e.startsWith("eip155")))&&!me&&/*#__PURE__*/e(Z,{onClick:()=>ze({...ce,chains:ce.chains.filter((e=>e.startsWith("eip155")))}),children:[ce.icon&&("string"==typeof ce.icon?/*#__PURE__*/n(P,{src:ce.icon}):/*#__PURE__*/n(ce.icon,{})),/*#__PURE__*/n(te,{children:ce.label}),/*#__PURE__*/n(ee,{children:/*#__PURE__*/n(U,{})})]}),ce?.chains.some((e=>e.startsWith("solana")))&&!me&&/*#__PURE__*/e(Z,{onClick:()=>ze({...ce,chains:ce.chains.filter((e=>e.startsWith("solana")))}),children:[ce.icon&&("string"==typeof ce.icon?/*#__PURE__*/n(P,{src:ce.icon}):/*#__PURE__*/n(ce.icon,{})),/*#__PURE__*/n(te,{children:ce.label}),/*#__PURE__*/n(ee,{children:/*#__PURE__*/n($,{})})]}),be&&/*#__PURE__*/e(t,{children:[!(we>0)&&/*#__PURE__*/n(ne,{children:M("connectWallet.noWalletsFound")}),we>0&&!de&&/*#__PURE__*/n("div",{style:{maxHeight:56*Math.min(ge.length,5)+5,width:"100%"},children:/*#__PURE__*/n("div",{style:{height:`${ke.getTotalSize()}px`,width:"100%",position:"relative"},children:ke.getVirtualItems().map((e=>/*#__PURE__*/n(Y,{index:e.index,style:{position:"absolute",top:0,left:0,height:`${e.size}px`,transform:`translateY(${e.start}px)`},data:{wallets:ge,walletChainType:H,handleWalletClick:ze}},e.key)))})})]})]})]}),/*#__PURE__*/e(q.Footer,{children:[me&&!de&&"string"!=typeof me.connector&&"error"===ue&&/*#__PURE__*/n(q.Actions,{children:/*#__PURE__*/n(m,{style:{width:"100%",alignItems:"center"},variant:"error",onClick:()=>fe(me.connector,{name:me.name,icon:me.icon,id:me.id,url:me.url}),children:M("connectWallet.retry")})}),!!(re&&re.legal.privacyPolicyUrl&&re.legal.termsAndConditionsUrl)&&/*#__PURE__*/n(u,{app:re,alwaysShowImplicitConsent:!0}),/*#__PURE__*/n(q.Watermark,{})]})]})};let J=h.div`
|
|
75
75
|
position: sticky;
|
|
76
76
|
// Offset by negative margin to account for focus outline
|
|
77
77
|
margin-top: -3px;
|
|
@@ -144,4 +144,4 @@ import{jsxs as e,jsx as n,Fragment as t}from"react/jsx-runtime";import{Magnifyin
|
|
|
144
144
|
font-size: 0.875rem;
|
|
145
145
|
font-weight: 400;
|
|
146
146
|
color: var(--privy-color-foreground-3);
|
|
147
|
-
`;export{Q as C,F as H,H as S,P as W,D as a,
|
|
147
|
+
`;export{Q as C,F as H,H as S,P as W,D as a,I as b,Y as c,G as i,V as u};
|
package/dist/esm/{ConnectionStatusScreen-CS1PwenJ.mjs → ConnectionStatusScreen-BsUwbpes.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import{useRef as o,useEffect as i,useState as a,useCallback as r}from"react";import{isMobile as c}from"react-device-detect";import{styled as l}from"styled-components";import{a as s,S as d,W as m,B as u,b as p}from"./index-
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import{useRef as o,useEffect as i,useState as a,useCallback as r}from"react";import{isMobile as c}from"react-device-detect";import{styled as l}from"styled-components";import{a as s,S as d,W as m,B as u,b as p}from"./index-cnyso2Fp.mjs";import{L as g}from"./Link-DJ5gq9Di.mjs";import{u as w,q as y}from"./context-DanhWeBg.mjs";import{u as h}from"./useI18n-BpRybzwE.mjs";import{C as S,P as f,w as C,n as v,y as b}from"./use-export-wallet-9if9oowB.mjs";import{isHex as T,getAddress as _}from"viem";import{c as E,u as R,k}from"./internal-context-C4ZqP8IF.mjs";import{z as A}from"./useActiveWallet-DFp38Dx-.mjs";import{u as L,a as W}from"./privy-context-pimLCE3L.mjs";import{s as I}from"./shouldProceedtoEmbeddedWalletCreationFlow-CvbohbW6.mjs";import{u as j}from"./PrivyPluginContext-2QN2dVUw.mjs";import{e as U}from"./usePrivy-ChZSTtn2.mjs";import{S as O}from"./ScreenLayout-D7WpqBtE.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"zustand";import"ofetch";import"./paths-BzM95ysC.mjs";import"js-cookie";import"mipd";import"viem/utils";import"@privy-io/popup";import"@scure/base";import"./events-context-CI0iqAXA.mjs";import"@headlessui/react";import"./get-entropy-details-for-user-BGqBIfqR.mjs";import"@privy-io/urls";import"@privy-io/ethereum";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./frame-CjhCpycO.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"@privy-io/are-addresses-equal";import"viem/accounts";import"./use-sign-with-user-signer-BYctG7hm.mjs";import"tinycolor2";import"./ModalHeader-DnjCPU3j.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-BHWyivgu.mjs";import"./index-Dq_xe9dz.mjs";const N=e=>{let t=localStorage.getItem("-walletlink:https://www.walletlink.org:Addresses")?.split(" ").filter((e=>T(e,{strict:!0}))).map((e=>_(e)));return!!t?.length&&!!e?.linkedAccounts.filter((e=>"wallet"==e.type&&t.includes(e.address))).length};const x=e=>e?.privyErrorCode===E.LINKED_TO_ANOTHER_USER?S.ERROR_USER_EXISTS:e instanceof f&&!e.details.default?e.details:e instanceof C?S.ERROR_TIMED_OUT:e?.privyErrorCode===E.CANNOT_LINK_MORE_OF_TYPE?S.ERROR_USER_LIMIT_REACHED:S.ERROR_WALLET_CONNECTION,M=({walletLogo:o,title:i,subtitle:a,signSuccess:r,errorMessage:c,connectSuccess:l,separateConnectAndSign:s,signing:d,walletConnectRedirectUri:m,walletConnectFallbackUniversalUri:u,hasTabbedAway:p,showCoinbaseWalletResetCta:w,numRetries:y,onBack:f,onSign:C,onRetry:v,onCoinbaseReset:b,onDifferentWallet:T})=>{let{t:_}=h(),E=w?{label:"Use a different wallet",onClick:b,disabled:r}:c===S.ERROR_USER_EXISTS&&f?{label:"Use a different wallet",onClick:T}:l&&!r&&s?{label:d?"Signing":"Sign with your wallet",onClick:C,disabled:d}:!r&&c?.retryable&&y<2?{label:"Retry",onClick:v,disabled:!1}:r||c?void 0:{label:_("connectionStatus.connecting"),onClick:()=>{},disabled:!0};/*#__PURE__*/return e(O,{title:i,subtitle:a,icon:o,iconVariant:"loading",iconLoadingStatus:{success:r,fail:!!c},primaryCta:E,onBack:f,watermark:!0,children:!l&&m&&!p&&/*#__PURE__*/t(B,{children:[_("connectionStatus.stillHere")," ",/*#__PURE__*/e(g,{href:m,target:"_blank",variant:"underlined",size:"sm",children:_("connectionStatus.tryConnectingAgain")}),u&&/*#__PURE__*/t(n,{children:[" ",_("connectionStatus.or")," ",/*#__PURE__*/e(g,{href:u,target:"_blank",variant:"underlined",size:"sm",children:_("connectionStatus.useDifferentLink")})]})]})})},D={component:()=>{let t,[n,l]=a(!1),[g,f]=a(!1),[C,T]=a(void 0),{authenticated:_,logout:O}=L(),{navigate:D,navigateBack:B,lastScreen:F,currentScreen:P,setModalData:q,data:z}=W(),H=w(),{t:X}=h(),{getAuthFlow:Y,walletConnectionStatus:K,closePrivyModal:Q,initLoginWithWallet:V,loginWithWallet:G,updateWallets:J,createAnalyticsEvent:$}=R(),{walletConnectors:Z}=L(),[ee,te]=a(0),{user:ne}=L(),oe=j(),[ie]=a(ne?.linkedAccounts.length||0),[ae,re]=a(""),[ce,le]=a(""),[se,de]=a(!1),{hasTabbedAway:me}=function(){let[e,t]=a(!1),n=r((()=>{document.hidden&&t(!0)}),[]);return i((()=>(document.addEventListener("visibilitychange",n),()=>document.removeEventListener("visibilitychange",n))),[n]),{hasTabbedAway:e,reset:()=>t(!1)}}(),{enabled:ue,token:pe}=s(),ge=A(K?.connector?.walletClientType||"unknown"),we=c&&"wallet_connect_v2"===K?.connector?.connectorType||c&&"coinbase_wallet"===K?.connector?.connectorType||c&&"base_account"===K?.connector?.connectorType||c&&"injected"===K?.connector?.connectorType&&"phantom"===K?.connector?.walletClientType||c&&"solana_adapter"===K?.connector?.connectorType&&"mobile_wallet_adapter"===K.connector.walletClientType,ye="connected"===K?.status,he="switching_to_supported_chain"===K?.status;i((()=>{let e=Y(),t=e instanceof p||e instanceof d?e:void 0;ye&&"solana"===K.connector?.chainType&&"phantom"===K.connector?.walletClientType&&oe(U)&&void 0===z?.login?.isSigningInWithLedgerSolana?D("ConnectLedgerScreen",!1):(ye&&!t&&(!ue||pe||_?V(K.connectedWallet,pe,z?.login?.disableSignup,z?.login?.isSigningInWithLedgerSolana?"transaction":"plain").then((()=>{de(!0)})):(q({captchaModalData:{callback:e=>V(K.connectedWallet,e,z?.login?.disableSignup,z?.login?.isSigningInWithLedgerSolana?"transaction":"plain").then((()=>{de(!0)})),userIntentRequired:!1,onSuccessNavigateTo:"ConnectionStatusScreen",onErrorNavigateTo:"ErrorScreen"}}),D("CaptchaScreen",!1))),t instanceof d&&z?.login?.isSigningInWithLedgerSolana&&(t.messageType="transaction"),t&&we&&ye&&!t.preparedMessage?t.buildMessage():t&&!we&&ye&&(g||(async()=>{f(!0),T(void 0);try{"wallet_connect_v2"===K?.connector?.connectorType&&"metamask"===K?.connector?.walletClientType&&await v(2500),await fe()}catch(e){console.warn("Auto-prompted signature failed",e)}finally{f(!1)}})()))}),[ee,ye,se]),i((()=>{if(ne&&n){let e=y-500;if(H?.legal.requireUsersAcceptTerms&&!ne.hasAcceptedTerms){let t=setTimeout((()=>{D("AffirmativeConsentScreen")}),e);return()=>clearTimeout(t)}if(I(ne,H.embeddedWallets)){let t=setTimeout((()=>{q({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),$({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"ConnectionStatusScreen"}}),O()},callAuthOnSuccessOnClose:!0}}),D("EmbeddedWalletOnAccountCreateScreen")}),e);return()=>clearTimeout(t)}J();let t=setTimeout((()=>Q({shouldCallAuthOnSuccess:!0,isSuccess:!0})),y);return()=>clearTimeout(t)}}),[ne,n]);let Se=e=>{if(e?.privyErrorCode!==E.ALLOWLIST_REJECTED){if(e?.privyErrorCode===E.USER_LIMIT_REACHED)return console.error(new k(e).toString()),void D("UserLimitReachedScreen");if(e?.privyErrorCode!==E.USER_DOES_NOT_EXIST)return e?.privyErrorCode===E.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce?(q({accountTransfer:{nonce:e.data?.data?.nonce,account:Y()?.meta.address,displayName:e.data?.data?.account?.displayName,externalWalletMetadata:{walletClientType:Y()?.meta.walletClientType,chainId:Y()?.meta.chainId,connectorType:Y()?.meta.connectorType},linkMethod:Y()instanceof p?"siwe":"siws",embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress}}),void D("LinkConflictScreen")):void T(x(e));D("AccountNotFoundScreen")}else D("AllowlistRejectionScreen")};async function fe(){try{await G(),l(!0)}catch(e){Se(e)}finally{f(!1)}}i((()=>{K?.connectError&&Se(K?.connectError)}),[K]),((e,t)=>{let n=o((()=>{}));i((()=>{n.current=e})),i((()=>{if(null!==t){let e=setInterval((()=>n.current()),t||0);return()=>clearInterval(e)}}),[t])})((()=>{let e="wallet_connect_v2"===Ce&&K?.connector instanceof m?K.connector.redirectUri:void 0;e&&re(e);let t="wallet_connect_v2"===Ce&&K?.connector instanceof m?K.connector.fallbackUniversalRedirectUri:void 0;t&&le(t)}),K?.connector instanceof m&&!ae?500:null);let Ce=K?.connector?.connectorType||"injected",ve=K?.connector?.walletClientType||"unknown",be=ge?.metadata?.shortName||ge?.name||K?.connector?.walletBranding.name||"Browser Extension",Te=ge?.image_url?.md||K?.connector?.walletBranding.icon||(t=>/*#__PURE__*/e(u,{...t})),_e="Browser Extension"===be?be.toLowerCase():be;t=n?X("connectionStatus.successfullyConnected",{walletName:_e}):C?X("connectionStatus.errorTitle",{errorMessage:C.message}):he?"Switching networks":ye?g&&we?"Signing":"Sign to verify":`Waiting for ${_e}`;let Ee=X("connectionStatus.checkOtherWindows");n?Ee=ie===(ne?.linkedAccounts.length||0)?"Wallet was already linked.":"You're good to go!":ee>=2&&C?Ee="Unable to connect wallet":C?Ee=C.detail:he?Ee="Switch your wallet to the requested network.":ye&&we?Ee="Sign the message in your wallet to verify it belongs to you.":"metamask"===ve&&c?Ee="Click continue to open and connect MetaMask.":"metamask"===ve?Ee="For the best experience, connect only one wallet at a time.":"wallet_connect"===Ce?Ee="Open your mobile wallet app to continue":"coinbase_wallet"===Ce?b()||(Ee=N(ne)?"Continue with the Coinbase app. Not the right wallet? Reset your connection below.":"Confirm in the Coinbase app/popup to continue."):z?.login?.isSigningInWithLedgerSolana&&(Ee="Ledger requires a transaction to verify your identity. You'll sign a transaction that performs no onchain action.");let Re=Z?.walletConnectors?.find((e=>"coinbase_wallet"===e.walletClientType)),ke="coinbase_wallet"===ve&&(N(ne)||C===S.ERROR_USER_EXISTS);/*#__PURE__*/return e(M,{walletLogo:Te,title:t,subtitle:Ee,signSuccess:n,errorMessage:C,connectSuccess:ye,separateConnectAndSign:we,signing:g,walletConnectRedirectUri:ae,walletConnectFallbackUniversalUri:ce,hasTabbedAway:me,showCoinbaseWalletResetCta:ke,numRetries:ee,onBack:F&&P!==F?B:void 0,onSign:()=>{f(!0),fe()},onRetry:()=>{te(ee+1),T(void 0),ye?(f(!0),fe()):K?.connectRetry()},onCoinbaseReset:()=>{Re&&Re?.disconnect()},onDifferentWallet:B})}};let B=l.p`
|
|
2
2
|
text-align: center;
|
|
3
3
|
color: var(--privy-color-foreground-2);
|
|
4
4
|
font-size: 14px;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{useMemo as t,useState as o,useEffect as r}from"react";import{u as i,q as a}from"./context-
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useMemo as t,useState as o,useEffect as r}from"react";import{u as i,q as a}from"./context-DanhWeBg.mjs";import{R as s}from"./index-cnyso2Fp.mjs";import{u as n,b as c,e as p,c as l}from"./internal-context-C4ZqP8IF.mjs";import{a as m}from"./privy-context-pimLCE3L.mjs";import{o as d}from"./useActiveWallet-DFp38Dx-.mjs";import{s as u}from"./shouldProceedtoEmbeddedWalletCreationFlow-CvbohbW6.mjs";import{S as f}from"./ScreenLayout-D7WpqBtE.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"uuid";import"jose";import"eventemitter3";import"./use-export-wallet-9if9oowB.mjs";import"./get-entropy-details-for-user-BGqBIfqR.mjs";import"viem";import"zustand";import"viem/utils";import"@coinbase/wallet-sdk";import"react-device-detect";import"@walletconnect/ethereum-provider";import"./usePrivy-ChZSTtn2.mjs";import"./events-context-CI0iqAXA.mjs";import"ofetch";import"./paths-BzM95ysC.mjs";import"js-cookie";import"./PrivyPluginContext-2QN2dVUw.mjs";import"mipd";import"@privy-io/popup";import"@scure/base";import"styled-components";import"@headlessui/react";import"@privy-io/urls";import"@privy-io/ethereum";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./frame-CjhCpycO.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"@privy-io/are-addresses-equal";import"viem/accounts";import"./use-sign-with-user-signer-BYctG7hm.mjs";import"./ModalHeader-DnjCPU3j.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-BHWyivgu.mjs";import"./index-Dq_xe9dz.mjs";const h=({providerApp:o,success:r,error:i,onClose:a})=>{let{title:s,subtitle:n}=t((()=>r?{title:`Successfully connected with ${o.name}`,subtitle:"You're good to go!"}:i?{title:"Authentication failed",subtitle:i.message}:{title:`Connecting to ${o.name}`,subtitle:`Please check the pop-up from ${o.name} to continue`}),[r,i,o.name]);/*#__PURE__*/return e(f,{title:s,subtitle:n,icon:o.logoUrl,iconVariant:"loading",iconLoadingStatus:{success:r,fail:!!i},onBack:a,watermark:!0})},v={component:()=>{let t=i(),{data:f,navigate:v,setModalData:y,onUserCloseViaDialogOrKeybindRef:g}=m(),{crossAppAuthFlow:A,updateWallets:j,closePrivyModal:b,createAnalyticsEvent:S}=n(),{logout:w}=d(),[C,I]=o({}),x=f?.crossAppAuth,T=new c(`There was an issue connecting your ${x?.name} account. Please try again.`),U=new s((async e=>{if(x?.popup)try{let t=await A({appId:e,popup:x.popup,action:x.action,disableSignup:x.disableSignup});I({data:t})}catch(e){if(e instanceof c)I({error:e});else if(e instanceof p){if(e.privyErrorCode===l.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce)return y({accountTransfer:{nonce:e.data?.data?.nonce,account:e.data?.data?.subject,displayName:e.data?.data?.account?.displayName,linkMethod:`privy:${x.appId}`,embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress,oAuthUserInfo:e.data?.data?.otherUser?.oAuthUserInfo}}),void v("LinkConflictScreen");x.popup&&x.popup.close(),I({error:T})}else I({error:T})}else I({error:T})})),k=()=>{C.data&&(j(),x?.onSuccess(C.data),b({shouldCallAuthOnSuccess:!0,isSuccess:!0})),x?.onError(C.error??new c("User canceled flow")),b({shouldCallAuthOnSuccess:!1,isSuccess:!1})};return g.current=k,r((()=>{x?.appId?.length&&U.execute(x.appId)}),[x?.appId]),r((()=>{if(!C.data)return;let e=C.data;if(t.legal.requireUsersAcceptTerms&&!e.hasAcceptedTerms){let e=setTimeout((()=>{v("AffirmativeConsentScreen")}),a);return()=>clearTimeout(e)}if(u(e,t.embeddedWallets)){let e=setTimeout((()=>{y({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),S({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,provider:`privy:${x?.appId}`,screen:"CrossAppAuthScreen"}}),w()},callAuthOnSuccessOnClose:!0}}),v("EmbeddedWalletOnAccountCreateScreen")}),a);return()=>clearTimeout(e)}let o=setTimeout(k,a);return()=>clearTimeout(o)}),[C.data]),x?.appId?/*#__PURE__*/e(h,{providerApp:{id:x?.appId,logoUrl:x?.logoUrl,name:x?.name},success:!!C.data,error:C.error,onClose:k}):(console.warn("Missing data for Screen"),null)},isShownBeforeReady:!0};export{v as CrossAppAuthScreen,h as CrossAppAuthScreenView,v as default};
|
package/dist/esm/{CustomLandingScreenView-l2CDbRP5.mjs → CustomLandingScreenView-C5YFt-eX.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as i}from"react/jsx-runtime";import a from"@heroicons/react/24/outline/UserCircleIcon";import l,{useState as r,useEffect as n,useRef as o,useMemo as s}from"react";import{styled as c}from"styled-components";import{T as d,M as p,B as h}from"./ModalHeader-
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as i}from"react/jsx-runtime";import a from"@heroicons/react/24/outline/UserCircleIcon";import l,{useState as r,useEffect as n,useRef as o,useMemo as s}from"react";import{styled as c}from"styled-components";import{T as d,M as p,B as h}from"./ModalHeader-DnjCPU3j.mjs";import{u}from"./context-DanhWeBg.mjs";import{A as g,C as m,B as f,H as y,r as w,D as v,F as C,G as b,s as k,I as S,f as T,J as M,K as x}from"./useActiveWallet-DFp38Dx-.mjs";import{u as A}from"./internal-context-C4ZqP8IF.mjs";import{u as L,a as W,i as I}from"./privy-context-pimLCE3L.mjs";import{a as E,t as P}from"./index-cnyso2Fp.mjs";import{u as N,b as j,c as D}from"./ConnectWalletView-rdXlInEf.mjs";import{z as O}from"./use-export-wallet-9if9oowB.mjs";import{Mail as R,Smartphone as V,UserCircle as _}from"lucide-react";import{C as F}from"./ConnectEmailForm-MZhtYjvT.mjs";import{C as U}from"./Chip-D2-wZOHJ.mjs";import{F as $}from"./farcaster-DPlSjvF5.mjs";import{toObjectKeys as z}from"@privy-io/js-sdk-core";import H from"@heroicons/react/24/outline/QuestionMarkCircleIcon";import G from"@heroicons/react/24/outline/FingerPrintIcon";import{L as B}from"./Link-DJ5gq9Di.mjs";import{C as q}from"./ConnectPhoneForm-DptByaXA.mjs";import{T as K,a as J,I as Q,S as Y,L as Z,G as X,b as ee,D as te,A as ie}from"./twitter-BoAxhlj6.mjs";import{T as ae,L as le}from"./twitch-5IOe4sIQ.mjs";import{T as re}from"./telegram-B-JqnkqZ.mjs";import{W as ne}from"./WalletOverflowButton-DSPUFJ5T.mjs";import{S as oe}from"./ScreenLayout-D7WpqBtE.mjs";const se=()=>{let t=u(),i=t?.appearance?.logo,a=`${t?.name} logo`,r={maxHeight:"90px",maxWidth:"180px"};return i?"string"==typeof i?/*#__PURE__*/e("img",{src:i,alt:a,style:r}):"svg"===i.type||"img"===i.type?/*#__PURE__*/l.cloneElement(i,{alt:a,style:r}):(console.warn("`config.appearance.logo` must be a string, or an SVG / IMG element. Nothing will be rendered."),null):null},ce=c.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
align-items: center;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{AlertCircle as t,CheckCircle as o,CloudUpload as r}from"lucide-react";import{useState as s,useEffect as i}from"react";import{W as a}from"./WalletInfoCard-
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{AlertCircle as t,CheckCircle as o,CloudUpload as r}from"lucide-react";import{useState as s,useEffect as i}from"react";import{W as a}from"./WalletInfoCard-DkYb13at.mjs";import{u as n,r as c}from"./context-DanhWeBg.mjs";import{u as m,b as l}from"./internal-context-C4ZqP8IF.mjs";import{a as p}from"./privy-context-pimLCE3L.mjs";import{S as u}from"./ScreenLayout-D7WpqBtE.mjs";import"styled-components";import"./ModalHeader-DnjCPU3j.mjs";import"./useActiveWallet-DFp38Dx-.mjs";import"zustand";import"viem";import"viem/utils";import"./use-export-wallet-9if9oowB.mjs";import"./get-entropy-details-for-user-BGqBIfqR.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"react-device-detect";import"./events-context-CI0iqAXA.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"./ErrorMessage-D8VaAP5m.mjs";import"./LabelXs-oqZNqbm_.mjs";import"./Address-DFhsL61i.mjs";import"./shared-FM0rljBt.mjs";import"tinycolor2";import"ofetch";import"@privy-io/are-addresses-equal";import"./Screen-BHWyivgu.mjs";import"./index-Dq_xe9dz.mjs";const d=({appName:s,address:i,success:n,error:c,onAccept:m,onDecline:l,onClose:p})=>/*#__PURE__*/e(u,n||c?{title:c?"Something went wrong":"Success!",subtitle:c?"Please try again.":`You've successfully granted delegated action permissions to ${s}.`,icon:c?t:o,iconVariant:c?"error":"success",onBack:p,watermark:!0}:{title:"Enable offline access",subtitle:`By confirming, ${s} will be able to use your wallet for you even when you're not around. You can revoke this later.`,icon:r,primaryCta:{label:"Accept",onClick:m},secondaryCta:{label:"Not now",onClick:l},onBack:p,watermark:!0,children:/*#__PURE__*/e(a,{address:i,title:"Wallet"})}),y={component:()=>{let{data:t}=p(),o=n(),{closePrivyModal:r}=m(),[a,u]=s(!1),[y,f]=s(),{address:j,onDelegate:h,onSuccess:g,onError:v}=t.delegatedActions.consent,w=async()=>{a?g():v(y??new l("User declined delegating actions.")),r({shouldCallAuthOnSuccess:!1})};return i((()=>{if(!a&&!y)return;let e=setTimeout(w,c);return()=>clearTimeout(e)}),[a,y]),/*#__PURE__*/e(d,{appName:o.name,address:j,success:a,error:y,onAccept:async()=>{try{await h(),u(!0)}catch(e){f(e)}},onDecline:()=>{w()},onClose:w})}};export{y as DelegatedActionsConsentScreen,d as DelegatedActionsConsentScreenView,y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{AlertCircle as o,CheckCircle as t,Ban as r}from"lucide-react";import{useState as i,useEffect as n}from"react";import{u as s,r as a}from"./context-
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{AlertCircle as o,CheckCircle as t,Ban as r}from"lucide-react";import{useState as i,useEffect as n}from"react";import{u as s,r as a}from"./context-DanhWeBg.mjs";import{u as c,b as m}from"./internal-context-C4ZqP8IF.mjs";import{a as l}from"./privy-context-pimLCE3L.mjs";import{S as p}from"./ScreenLayout-D7WpqBtE.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"@privy-io/are-addresses-equal";import"./ModalHeader-DnjCPU3j.mjs";import"styled-components";import"./useActiveWallet-DFp38Dx-.mjs";import"zustand";import"viem";import"viem/utils";import"./use-export-wallet-9if9oowB.mjs";import"./get-entropy-details-for-user-BGqBIfqR.mjs";import"eventemitter3";import"react-device-detect";import"./events-context-CI0iqAXA.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-BHWyivgu.mjs";import"./index-Dq_xe9dz.mjs";const u=({appName:i,success:n,error:s,onRevoke:a,onDeny:c,onClose:m})=>/*#__PURE__*/e(p,n||s?{title:s?"Something went wrong":"Success!",subtitle:s?"Please try again.":"You've successfully revoked permissions.",icon:s?o:t,iconVariant:s?"error":"success",onBack:m,watermark:!0}:{title:"Revoke offline access to wallet",subtitle:`By confirming, ${i} will no longer be able to use this wallet on your behalf when you are not online.`,icon:r,primaryCta:{label:"Confirm",onClick:a},secondaryCta:{label:"Deny",onClick:c},onBack:m,watermark:!0}),d={component:()=>{let{data:o}=l(),t=s(),{closePrivyModal:r}=c(),[p,d]=i(!1),[y,f]=i(),{onRevoke:v,onSuccess:k,onError:h}=o.delegatedActions.revoke,j=async()=>{p?k():h(y??new m("User declined revoking access to their delegated wallet.")),r({shouldCallAuthOnSuccess:!1})};return n((()=>{if(!p&&!y)return;let e=setTimeout(j,a);return()=>clearTimeout(e)}),[p,y]),/*#__PURE__*/e(u,{appName:t.name,success:p,error:y,onRevoke:async()=>{try{await v(),d(!0)}catch(e){f(e)}},onDeny:()=>{j()},onClose:j})}};export{d as DelegatedActionsRevokeScreen,u as DelegatedActionsRevokeScreenView,d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{XCircle as t}from"lucide-react";import{useMemo as r,useState as o,useEffect as i}from"react";import{e as a,c as n}from"./index-
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{XCircle as t}from"lucide-react";import{useMemo as r,useState as o,useEffect as i}from"react";import{e as a,c as n}from"./index-cnyso2Fp.mjs";import{u as s}from"./internal-context-C4ZqP8IF.mjs";import{u as c,a as l}from"./privy-context-pimLCE3L.mjs";import{S as m}from"./ScreenLayout-D7WpqBtE.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-DFp38Dx-.mjs";import"zustand";import"./context-DanhWeBg.mjs";import"tinycolor2";import"viem";import"viem/utils";import"./use-export-wallet-9if9oowB.mjs";import"./get-entropy-details-for-user-BGqBIfqR.mjs";import"react-device-detect";import"styled-components";import"./events-context-CI0iqAXA.mjs";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"./usePrivy-ChZSTtn2.mjs";import"ofetch";import"./paths-BzM95ysC.mjs";import"js-cookie";import"./PrivyPluginContext-2QN2dVUw.mjs";import"mipd";import"@privy-io/popup";import"@scure/base";import"@headlessui/react";import"@privy-io/urls";import"@privy-io/ethereum";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./frame-CjhCpycO.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"@privy-io/are-addresses-equal";import"viem/accounts";import"./use-sign-with-user-signer-BYctG7hm.mjs";import"./ModalHeader-DnjCPU3j.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-BHWyivgu.mjs";import"./index-Dq_xe9dz.mjs";const p=({connectionFailed:r,onClose:o})=>/*#__PURE__*/e(m,r?{title:"Something went wrong",subtitle:"We're on it. Please try again later.",icon:t,iconVariant:"error",primaryCta:{label:"Close",onClick:o},watermark:!0}:{title:"Connecting to your wallet",subtitle:"Please wait...",iconVariant:"loading",showClose:!0,onClose:o,watermark:!1}),d={component:()=>{let{authenticated:t,user:m}=c(),{client:d,closePrivyModal:u,createAnalyticsEvent:y,walletProxy:v}=s(),{navigate:h,data:f,setModalData:w,onUserCloseViaDialogOrKeybindRef:b}=l(),j=r((()=>Date.now()),[]),[g,C]=o(!1),{onCompleteNavigateTo:A,onFailure:I,shouldForceMFA:x,entropyId:k,entropyIdVerifier:P,recoveryMethod:S,connectingWalletAddress:F,isUnifiedWallet:T=!1}=f?.connectWallet,M=e=>{g||(C(!0),I("string"==typeof e?Error(e):e))};return i((()=>{let e;return t?v?((async()=>{let t=await d.getAccessToken();if(!t)return M("User must be authenticated and have a Privy wallet before it can be connected");try{if(!T){if(!k||!P)return M("For on-device first-class chain wallets, entropyId and entropyIdVerifier are required");await v.connect({accessToken:t,entropyId:k,entropyIdVerifier:P})}x&&await v.verifyMfa({accessToken:t});let r=(Date.now()-j)/1e3;"EmbeddedWalletKeyExportScreen"===A&&r<1?e=setTimeout((()=>{h(A,!1)}),1e3*(1-r)):h(A,!1)}catch(e){if(a(e)&&"privy"===S){let e=await d.getAccessToken();if(!e)return M("User must be authenticated and have a Privy wallet before it can be recovered");try{y({eventName:"embedded_wallet_pinless_recovery_started",payload:{walletAddress:F}});let t=await(v?.recover({accessToken:e,entropyId:k,entropyIdVerifier:P}));t?.entropyId||M(Error("Unable to recover wallet")),A?h(A):u({shouldCallAuthOnSuccess:!1}),y({eventName:"embedded_wallet_recovery_completed",payload:{walletAddress:F}}),h(A)}catch(e){M("An error has occurred, please try again.")}}else a(e)&&"privy"!==S&&"privy-v2"!==S?(w({...f,recoverWallet:{entropyId:k,entropyIdVerifier:P,onCompleteNavigateTo:A,onFailure:I},recoveryOAuthStatus:{provider:S,action:"recover",isInAccountCreateFlow:!1,shouldCreateEth:!1,shouldCreateSol:!1}}),h(n(S))):M(e)}})(),()=>clearTimeout(e)):void 0:M("User must be authenticated and have a Privy wallet before it can be connected")}),[t,m,v]),b.current=()=>{M("User exited before wallet could be connected"),u({shouldCallAuthOnSuccess:!1})},/*#__PURE__*/e(p,{connectionFailed:g,onClose:()=>u({shouldCallAuthOnSuccess:!1})})}};export{d as EmbeddedWalletConnectingScreen,p as EmbeddedWalletConnectingView,d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{CheckCircle as t}from"lucide-react";import{useEffect as o}from"react";import{u as r,a as i,d as s,f as c}from"./privy-context-
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{CheckCircle as t}from"lucide-react";import{useEffect as o}from"react";import{u as r,a as i,d as s,f as c}from"./privy-context-pimLCE3L.mjs";import{u as n,r as a}from"./context-DanhWeBg.mjs";import{u as m}from"./internal-context-C4ZqP8IF.mjs";import{S as l}from"./ScreenLayout-D7WpqBtE.mjs";import"@privy-io/are-addresses-equal";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"./ModalHeader-DnjCPU3j.mjs";import"styled-components";import"./useActiveWallet-DFp38Dx-.mjs";import"zustand";import"viem";import"viem/utils";import"./use-export-wallet-9if9oowB.mjs";import"./get-entropy-details-for-user-BGqBIfqR.mjs";import"eventemitter3";import"react-device-detect";import"./events-context-CI0iqAXA.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-BHWyivgu.mjs";import"./index-Dq_xe9dz.mjs";const u=({title:o,description:r,onClose:i})=>/*#__PURE__*/e(l,{title:o,subtitle:r,icon:t,iconVariant:"success",watermark:!0,onBack:i}),p={component:()=>{let{user:t}=r(),{closePrivyModal:l,isNewUserThisSession:p,updateWallets:d}=m(),{data:f,onUserCloseViaDialogOrKeybindRef:j}=i(),h=n(),{onSuccess:v,onFailure:y,callAuthOnSuccessOnClose:x}=f.createWallet,A=()=>{let e=s(t)??c(t);t&&e?(d(),v({user:t,account:e})):y(Error("Failed to create wallet")),l({shouldCallAuthOnSuccess:x})};o((()=>{let e=setTimeout(A,a);return()=>clearTimeout(e)}),[]),j.current=A;let S=p&&!((t?.linkedAccounts?.length??0)>1);/*#__PURE__*/return e(u,{title:S?"Welcome"+(h?.name?` to ${h?.name}`:""):"All set!",description:S?"You've successfully created an account.":"Your account is secured.",onClose:A})}};export{p as EmbeddedWalletCreatedScreen,u as EmbeddedWalletCreatedScreenView,p as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import{useState as o,useEffect as i,useRef as n}from"react";import{styled as a}from"styled-components";import{constructURL as l}from"@privy-io/urls";import{W as s}from"./WarningBanner-D5LqDt95.mjs";import{W as c}from"./WalletInfoCard-
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import{useState as o,useEffect as i,useRef as n}from"react";import{styled as a}from"styled-components";import{constructURL as l}from"@privy-io/urls";import{W as s}from"./WarningBanner-D5LqDt95.mjs";import{W as c}from"./WalletInfoCard-DkYb13at.mjs";import{u as d}from"./context-DanhWeBg.mjs";import{u as p}from"./internal-context-C4ZqP8IF.mjs";import{u as m,a as u}from"./privy-context-pimLCE3L.mjs";import{S as h}from"./ScreenLayout-D7WpqBtE.mjs";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"lucide-react";import"./ModalHeader-DnjCPU3j.mjs";import"./useActiveWallet-DFp38Dx-.mjs";import"zustand";import"viem";import"viem/utils";import"./use-export-wallet-9if9oowB.mjs";import"./get-entropy-details-for-user-BGqBIfqR.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"react-device-detect";import"./events-context-CI0iqAXA.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"./ErrorMessage-D8VaAP5m.mjs";import"./LabelXs-oqZNqbm_.mjs";import"./Address-DFhsL61i.mjs";import"./shared-FM0rljBt.mjs";import"tinycolor2";import"ofetch";import"@privy-io/are-addresses-equal";import"./Screen-BHWyivgu.mjs";import"./index-Dq_xe9dz.mjs";const y=({address:o,accessToken:i,appConfigTheme:n,onClose:a,exportButtonProps:l,onBack:d})=>/*#__PURE__*/e(h,{title:"Export wallet",subtitle:/*#__PURE__*/t(r,{children:["Copy either your private key or seed phrase to export your wallet."," ",/*#__PURE__*/e("a",{href:"https://privy-io.notion.site/Transferring-your-account-9dab9e16c6034a7ab1ff7fa479b02828",target:"blank",rel:"noopener noreferrer",children:"Learn more"})]}),onClose:a,onBack:d,showBack:!!d,watermark:!0,children:/*#__PURE__*/t(f,{children:[/*#__PURE__*/e(s,{theme:n,children:"Never share your private key or seed phrase with anyone."}),/*#__PURE__*/e(c,{title:"Your wallet",address:o,showCopyButton:!0}),/*#__PURE__*/e("div",{style:{width:"100%"},children:i&&l&&/*#__PURE__*/e(g,{accessToken:i,dimensions:{height:"44px"},...l})})]})});let f=a.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 1.25rem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{XCircle as t}from"lucide-react";import{useState as r,useEffect as o}from"react";import{generateWalletIdempotencyKey as i}from"@privy-io/js-sdk-core";import{u as a}from"./context-
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{XCircle as t}from"lucide-react";import{useState as r,useEffect as o}from"react";import{generateWalletIdempotencyKey as i}from"@privy-io/js-sdk-core";import{u as a}from"./context-DanhWeBg.mjs";import{F as s,s as l,k as n,v as m,G as c,R as d}from"./index-cnyso2Fp.mjs";import{u as p,m as u}from"./internal-context-C4ZqP8IF.mjs";import{a as y,u as h}from"./privy-context-pimLCE3L.mjs";import{u as w}from"./PrivyPluginContext-2QN2dVUw.mjs";import{S as v}from"./ScreenLayout-D7WpqBtE.mjs";import"tinycolor2";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-DFp38Dx-.mjs";import"zustand";import"viem";import"viem/utils";import"./use-export-wallet-9if9oowB.mjs";import"./get-entropy-details-for-user-BGqBIfqR.mjs";import"react-device-detect";import"styled-components";import"./events-context-CI0iqAXA.mjs";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"./usePrivy-ChZSTtn2.mjs";import"ofetch";import"./paths-BzM95ysC.mjs";import"js-cookie";import"mipd";import"@privy-io/popup";import"@scure/base";import"@headlessui/react";import"@privy-io/urls";import"@privy-io/ethereum";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./frame-CjhCpycO.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"@privy-io/are-addresses-equal";import"viem/accounts";import"./use-sign-with-user-signer-BYctG7hm.mjs";import"./ModalHeader-DnjCPU3j.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-BHWyivgu.mjs";import"./index-Dq_xe9dz.mjs";const C=({errorMessage:r,onClose:o})=>/*#__PURE__*/e(v,r?{title:"Something went wrong",subtitle:r,icon:t,iconVariant:"error",primaryCta:{label:"Close",onClick:o},watermark:!0}:{title:"Creating your wallet",subtitle:"Please wait...",iconVariant:"loading",watermark:!1}),f={component:()=>{let{setModalData:t,navigate:v,data:f,onUserCloseViaDialogOrKeybindRef:g}=y(),j=a(),[b,x]=r(""),{embeddedWallets:S}=a(),{authenticated:W,user:O}=h(),{closePrivyModal:A,walletProxy:k,client:I}=p(),{onSuccess:P,onFailure:M,callAuthOnSuccessOnClose:R,shouldCreateEth:U,shouldCreateSol:E}=f.createWallet,L=w(),F=O?L(s)?.shouldCreateWallet({user:O}):void 0,K=!!O&&l(O,j.embeddedWallets.ethereum.createOnLogin,F),T=!!O&&n(O,j.embeddedWallets.solana.createOnLogin,F),V="legacy-embedded-wallets-only"===j.embeddedWallets.mode&&!0===j?.embeddedWallets.requireUserOwnedRecoveryOnCreate,[q,D]=r(null),{create:G}=m(),z=U??K,H=E??T,Q=new d((async()=>{let e=await I.getAccessToken();if(O&&e&&k)try{let e,t=await i(O.id,"ethereum"),r=await i(O.id,"solana");if(z&&H)e=await G({chainType:"ethereum",walletIndex:0,latestUser:O,idempotencyKey:t}),e=await G({chainType:"solana",walletIndex:0,latestUser:e.user,idempotencyKey:r});else if(H)e=await G({chainType:"solana",walletIndex:0,latestUser:O,idempotencyKey:r});else{if(!z)return void A({shouldCallAuthOnSuccess:R});e=await G({chainType:"ethereum",walletIndex:0,latestUser:O,idempotencyKey:t})}D(e),v("EmbeddedWalletCreatedScreen")}catch(e){x(e.message)}}));return o((()=>W&&O?V?(t({...f,createWallet:{...f.createWallet,shouldCreateEth:z,shouldCreateSol:H},recoverySelection:{...f?.recoverySelection,isInAccountCreateFlow:!0,shouldCreateEth:z,shouldCreateSol:H}}),v(c({walletAction:"create",showAutomaticRecovery:!1,availableRecoveryMethods:S.userOwnedRecoveryOptions,legacySetWalletPasswordFlow:!1,isResettingPassword:!1}))):void Q.execute():(v("LandingScreen"),void M(Error("User must be authenticated before creating a Privy wallet")))),[V,W]),g.current=()=>null/*#__PURE__*/,e(C,{errorMessage:b||void 0,onClose:()=>{q?(P(q),A({shouldCallAuthOnSuccess:R})):(M(new u("User wallet creation failed")),A({shouldCallAuthOnSuccess:!1}))}})}};export{f as EmbeddedWalletOnAccountCreateScreen,C as EmbeddedWalletOnAccountCreateView,f as default};
|