@privy-io/react-auth 3.16.0 → 3.17.0-snapshot-20260316162155
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-CwdzzEXy.js +1 -0
- package/dist/cjs/{Address-DTfphH3Q.js → Address-LoABcDN2.js} +1 -1
- package/dist/cjs/AffirmativeConsentScreen-DmmZQ1sk.js +6 -0
- package/dist/cjs/AllowlistRejectionScreen-zz2ccy4w.js +1 -0
- package/dist/cjs/AuthenticateWithWalletScreen-Czvq09k3.js +1 -0
- package/dist/cjs/AwaitingEvmToSolBridgingScreen-Du2AUYJm.js +2 -0
- package/dist/cjs/AwaitingExternalEthereumTransferScreen-BB6Hvskb.js +2 -0
- package/dist/cjs/AwaitingPasswordlessCodeScreen-Cx2okNvo.js +103 -0
- package/dist/cjs/AwaitingSolToEvmBridgingScreen-SZWzchnl.js +2 -0
- package/dist/cjs/{BridgeNetworkSelectionView-xdYr4mxx.js → BridgeNetworkSelectionView-MQxeBaNe.js} +1 -1
- package/dist/cjs/CaptchaScreen-DW7EenvZ.js +1 -0
- package/dist/cjs/CoinbaseOnrampStatusScreen-D5RD7It_.js +16 -0
- package/dist/cjs/ConnectEmailForm-vo9fqKEz.js +3 -0
- package/dist/cjs/ConnectLedgerScreen-D8iSTRW8.js +9 -0
- package/dist/cjs/ConnectOnlyLandingScreen-cr2IzL9D.js +1 -0
- package/dist/cjs/ConnectOnlyStatusScreen-D0wfwzBX.js +1 -0
- package/dist/cjs/ConnectOrCreateScreen-BYeXIW8Z.js +1 -0
- package/dist/cjs/{ConnectPhoneForm-BYX8kgCj.js → ConnectPhoneForm-Fi9YeZhy.js} +1 -1
- package/dist/cjs/{ConnectWalletView-QyJORAZG.js → ConnectWalletView-5ye8dFgc.js} +1 -1
- package/dist/cjs/ConnectionStatusScreen-CSRdMfVR.js +7 -0
- package/dist/cjs/CrossAppAuthScreen-CJFlLgpK.js +1 -0
- package/dist/cjs/{CustomLandingScreenView-Cx9QR2CX.js → CustomLandingScreenView-BtwRswsv.js} +6 -6
- package/dist/cjs/DelegatedActionsConsentScreen-DF8Sc_HK.js +1 -0
- package/dist/cjs/DelegatedActionsRevokeScreen-CL9jefJ1.js +1 -0
- package/dist/cjs/EmbeddedWalletConnectingScreen-zaop20tB.js +1 -0
- package/dist/cjs/EmbeddedWalletCreatedScreen-Dhe-a0kv.js +1 -0
- package/dist/cjs/{EmbeddedWalletKeyExportScreen-wfa1ho1-.js → EmbeddedWalletKeyExportScreen-BBN8qZii.js} +4 -4
- package/dist/cjs/EmbeddedWalletOnAccountCreateScreen-bCdFxWHi.js +1 -0
- package/dist/cjs/EmbeddedWalletPasswordUpdateScreen-CEJb_sQt.js +1 -0
- package/dist/cjs/EmbeddedWalletPasswordUpdateSplashScreen-aCheIy49.js +1 -0
- package/dist/cjs/{EnrollTotp-BzmjXzYC.js → EnrollTotp-CflAJviu.js} +1 -1
- package/dist/cjs/ErrorScreen-Bi5k_Sjg.js +4 -0
- package/dist/cjs/{FarcasterConnectStatusScreen-s3pS-ZH-.js → FarcasterConnectStatusScreen-Ci5w4QiX.js} +1 -1
- package/dist/cjs/FarcasterSignerStatusScreen-D_MQvu4m.js +29 -0
- package/dist/cjs/FundSolWalletWithExternalSolanaWallet-CSgOmmfz.js +2 -0
- package/dist/cjs/FundWalletMethodHeader-DKhpGbB_.js +1 -0
- package/dist/cjs/{FundWithBankDepositScreen-DUQAuyf5.js → FundWithBankDepositScreen-Dg07ySds.js} +3 -3
- package/dist/cjs/FundingEditAmountScreen-2cLAUxXk.js +1 -0
- package/dist/cjs/FundingMethodSelectionScreen-B7A8b8Zr.js +1 -0
- package/dist/cjs/InAppBrowserLoginNotPossible-9bla-3q6.js +1 -0
- package/dist/cjs/InstallWalletScreen-CwDyMFAp.js +1 -0
- package/dist/cjs/LandingScreen-Dubaxn5q.js +1 -0
- package/dist/cjs/{LinkConflictScreen-DnHf7IMX.js → LinkConflictScreen-Drbf_NwQ.js} +1 -1
- package/dist/cjs/LinkEmailScreen-CpSuii3Q.js +1 -0
- package/dist/cjs/{LinkPasskeyScreen-CTN6f7yX.js → LinkPasskeyScreen-CnQD9Uk7.js} +12 -12
- package/dist/cjs/LinkPhoneScreen-ntD0MGue.js +1 -0
- package/dist/cjs/LoginFailedScreen-Cr84lRK6.js +1 -0
- package/dist/cjs/ManualTransferScreen-BVQ6TTpl.js +1 -0
- package/dist/cjs/MfaAuthEnrollmentFlowScreen-C_VvcFPV.js +1 -0
- package/dist/cjs/MfaAuthVerifyFlowScreen-DS_5Kbyx.js +1 -0
- package/dist/cjs/MfaEnrollmentFlowScreen-DUXHByYX.js +1 -0
- package/dist/cjs/MfaVerifyFlowScreen-DcjydnRO.js +1 -0
- package/dist/cjs/{ModalHeader-CakS8Dcu.js → ModalHeader-CSc17xPp.js} +1 -1
- package/dist/cjs/MoonpayStatusScreen-CLC5rfIy.js +16 -0
- package/dist/cjs/OAuthStatusScreen-Cc7Q4CDA.js +1 -0
- package/dist/cjs/PasskeySelectSignupOrLogin-C6SuJGP7.js +1 -0
- package/dist/cjs/PasskeyStatusScreen-CFR4vHsn.js +3 -0
- package/dist/cjs/PasswordRecoveryScreen-BpR2oaTz.js +20 -0
- package/dist/cjs/{QrCode-C-Mk5-26.js → QrCode-DgSaqC0q.js} +1 -1
- package/dist/cjs/RecoveryOAuthStatusScreen-BkbE7aGR.js +1 -0
- package/dist/cjs/RecoveryPasswordCreateScreen-rCKKxWO_.js +1 -0
- package/dist/cjs/{RecoverySelectionScreen-BAJ1nLeO.js → RecoverySelectionScreen-DZ61qdLo.js} +2 -2
- package/dist/cjs/{Screen-Dp9-H_S8.js → Screen-BcsJqsVd.js} +1 -1
- package/dist/cjs/{ScreenLayout-DANQ0V5E.js → ScreenLayout-DyEyA7A5.js} +1 -1
- package/dist/cjs/SetAutomaticRecoveryScreen-BleU8FUI.js +14 -0
- package/dist/cjs/{SetWalletPasswordForm-B7bBDQ8N.js → SetWalletPasswordForm-C8yNbL_5.js} +4 -4
- package/dist/cjs/{SignRequestScreen-BUvgSx9X.js → SignRequestScreen-BPqwS4r3.js} +2 -2
- package/dist/cjs/{StandardSignAndSendTransactionScreen-CzfhyIDP.js → StandardSignAndSendTransactionScreen-3pYKF2t4.js} +1 -1
- package/dist/cjs/TelegramAuthScreen-BIOvHaZW.js +1 -0
- package/dist/cjs/{TransactionDetails-BlPOqfEn.js → TransactionDetails-QfVYPGbU.js} +1 -1
- package/dist/cjs/{TransactionErrorView-BpXI1X_G.js → TransactionErrorView-BLwOc9N2.js} +1 -1
- package/dist/cjs/{TransferFromWalletScreen-Ds1sknGn.js → TransferFromWalletScreen-DgG_TT1f.js} +2 -2
- package/dist/cjs/{TransferOrBridgeLoadingScreen-CAYUlR4u.js → TransferOrBridgeLoadingScreen-CN_VlxUC.js} +1 -1
- package/dist/cjs/UpdateEmailScreen-CkT3mFji.js +1 -0
- package/dist/cjs/UpdatePhoneScreen-MtkPdjsi.js +1 -0
- package/dist/cjs/UserLimitReachedScreen-kN4nnRM_.js +1 -0
- package/dist/cjs/{WalletInfoCard-CRZt0t3t.js → WalletInfoCard-n_BoIOic.js} +1 -1
- package/dist/cjs/WalletInterstitialScreen-BR__AmNx.js +1 -0
- package/dist/cjs/{WalletLink-Cx_Zda0m.js → WalletLink-CuO09G-O.js} +1 -1
- package/dist/cjs/{WalletOverflowButton-cnlzyqcK.js → WalletOverflowButton-CgWvmdmC.js} +1 -1
- package/dist/cjs/abstract-smart-wallets.js +1 -1
- package/dist/cjs/{context-BAmjgwZ7.js → context-CNQxiH4A.js} +1 -1
- package/dist/cjs/{ethers-D8g2mvSK.js → ethers-DWH-h922.js} +1 -1
- package/dist/cjs/extended-chains.js +1 -1
- package/dist/cjs/{getErc20Balance-C6ZUC_1B.js → getErc20Balance-DBQPPbnK.js} +1 -1
- package/dist/cjs/{getErc20TokenInfo-DprFN1Dj.js → getErc20TokenInfo-Dl9FAxqA.js} +1 -1
- package/dist/cjs/index-8yj4NkHF.js +174 -0
- package/dist/cjs/{index-DIKBRogK.js → index-Bhi2b4Wz.js} +2 -2
- package/dist/cjs/index-DOqRGT6m.js +1 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/internal.js +1 -1
- package/dist/cjs/privy-context-BUPa46TW.js +1 -0
- package/dist/cjs/{shared-C-w7sNT2.js → shared-C6iMgJGT.js} +1 -1
- package/dist/cjs/{shouldProceedtoEmbeddedWalletCreationFlow-DAiUXgPZ.js → shouldProceedtoEmbeddedWalletCreationFlow-Qter_tq0.js} +1 -1
- package/dist/cjs/smart-wallets-Dd1dBbU0.js +1 -0
- package/dist/cjs/smart-wallets.js +1 -1
- package/dist/cjs/solana.js +1 -1
- package/dist/cjs/{styles-s2f3dL_6.js → styles-DNyswYeR.js} +1 -1
- package/dist/cjs/{to-ui-error-CqnwRcKJ.js → to-ui-error-BHpURyav.js} +1 -1
- package/dist/cjs/ui.js +1 -1
- package/dist/cjs/use-export-wallet-3J5BDtFL.js +1 -0
- package/dist/cjs/use-export-wallet-Dy66dCnh.js +1 -0
- package/dist/cjs/{useActiveWallet-CYUR_x0A.js → useActiveWallet-B2ZGQOqD.js} +1 -1
- package/dist/cjs/{useGetTokenPrice-X3dW0I3y.js → useGetTokenPrice-DSz2_ndW.js} +1 -1
- package/dist/cjs/{useI18n-BsableMs.js → useI18n-Covg9gU-.js} +1 -1
- package/dist/cjs/usePrivy-BgdIKexA.js +1 -0
- package/dist/cjs/{useSolanaRpcClient-BhX1Bzre.js → useSolanaRpcClient-DFziJZx0.js} +1 -1
- package/dist/cjs/{useWalletBalance-CcicA-jd.js → useWalletBalance-RkLvAARN.js} +1 -1
- package/dist/cjs/useWallets-CePTM2iC.js +1 -0
- package/dist/cjs/useWallets-LhNz5bUC.js +1 -0
- package/dist/dts/index.d.mts +38 -1
- package/dist/dts/index.d.ts +38 -1
- package/dist/esm/AccountNotFoundScreen-DVFOItI9.mjs +1 -0
- package/dist/esm/{Address-Cbulz6Wu.mjs → Address-CPCEzwZf.mjs} +1 -1
- package/dist/esm/AffirmativeConsentScreen-DOdcSwXi.mjs +6 -0
- package/dist/esm/AllowlistRejectionScreen-CW-4iFe3.mjs +1 -0
- package/dist/esm/AuthenticateWithWalletScreen-B82BbMWX.mjs +1 -0
- package/dist/esm/AwaitingEvmToSolBridgingScreen-DrRQ8jx6.mjs +2 -0
- package/dist/esm/AwaitingExternalEthereumTransferScreen-DMa82XoT.mjs +2 -0
- package/dist/esm/AwaitingPasswordlessCodeScreen-B6XB-azJ.mjs +103 -0
- package/dist/esm/AwaitingSolToEvmBridgingScreen-AG9YC4Po.mjs +2 -0
- package/dist/esm/{BridgeNetworkSelectionView-nrYQOGZA.mjs → BridgeNetworkSelectionView-BpGLl4Km.mjs} +1 -1
- package/dist/esm/CaptchaScreen-DpeO3tbc.mjs +1 -0
- package/dist/esm/CoinbaseOnrampStatusScreen-BLz4G4Ps.mjs +16 -0
- package/dist/esm/ConnectEmailForm-BHbXRWOx.mjs +3 -0
- package/dist/esm/ConnectLedgerScreen-Cm9Maid3.mjs +9 -0
- package/dist/esm/ConnectOnlyLandingScreen-DgW6x1--.mjs +1 -0
- package/dist/esm/ConnectOnlyStatusScreen-DJjV2n2X.mjs +1 -0
- package/dist/esm/ConnectOrCreateScreen-S9fCBz6I.mjs +1 -0
- package/dist/esm/{ConnectPhoneForm-D8SHd_ge.mjs → ConnectPhoneForm-tJp8qUlN.mjs} +1 -1
- package/dist/esm/{ConnectWalletView-By6eXfKl.mjs → ConnectWalletView-DxWxjOjC.mjs} +1 -1
- package/dist/esm/ConnectionStatusScreen-ApbD7KFS.mjs +7 -0
- package/dist/esm/CrossAppAuthScreen-Bhfdy_gi.mjs +1 -0
- package/dist/esm/{CustomLandingScreenView-Co0nHKPw.mjs → CustomLandingScreenView-B3SypvcL.mjs} +1 -1
- package/dist/esm/DelegatedActionsConsentScreen-DjbqeAEg.mjs +1 -0
- package/dist/esm/DelegatedActionsRevokeScreen-Brl_FYla.mjs +1 -0
- package/dist/esm/EmbeddedWalletConnectingScreen-B56updgF.mjs +1 -0
- package/dist/esm/EmbeddedWalletCreatedScreen-Dq2kZg2T.mjs +1 -0
- package/dist/esm/{EmbeddedWalletKeyExportScreen-CVflSsvz.mjs → EmbeddedWalletKeyExportScreen-Cz9BshyG.mjs} +3 -3
- package/dist/esm/EmbeddedWalletOnAccountCreateScreen-CuBtEhf9.mjs +1 -0
- package/dist/esm/EmbeddedWalletPasswordUpdateScreen-CLLfj2dW.mjs +1 -0
- package/dist/esm/EmbeddedWalletPasswordUpdateSplashScreen-Cs3Iaprt.mjs +1 -0
- package/dist/esm/{EnrollTotp-nZPSS3Ux.mjs → EnrollTotp-BT_-h_0Y.mjs} +1 -1
- package/dist/esm/ErrorScreen-CZY1qK53.mjs +4 -0
- package/dist/esm/{FarcasterConnectStatusScreen-BdwUuSkv.mjs → FarcasterConnectStatusScreen-C6zmKfBj.mjs} +2 -2
- package/dist/esm/FarcasterSignerStatusScreen-Dvz9h1zE.mjs +28 -0
- package/dist/esm/FundSolWalletWithExternalSolanaWallet-DkS_xMkO.mjs +1 -0
- package/dist/esm/FundWalletMethodHeader-BZ3UxTwI.mjs +1 -0
- package/dist/esm/{FundWithBankDepositScreen-HyqTUpLq.mjs → FundWithBankDepositScreen-DAH8GGVT.mjs} +1 -1
- package/dist/esm/FundingEditAmountScreen-CZoruo9l.mjs +1 -0
- package/dist/esm/FundingMethodSelectionScreen-BGZZNugd.mjs +1 -0
- package/dist/esm/InAppBrowserLoginNotPossible-DfyMyaFh.mjs +1 -0
- package/dist/esm/InstallWalletScreen-_DQi1B5T.mjs +1 -0
- package/dist/esm/LandingScreen-CjU3MGir.mjs +1 -0
- package/dist/esm/{LinkConflictScreen-DNGVg8dW.mjs → LinkConflictScreen-o65O1oJ_.mjs} +1 -1
- package/dist/esm/LinkEmailScreen-BsdMCjtQ.mjs +1 -0
- package/dist/esm/{LinkPasskeyScreen-CTYGeo1r.mjs → LinkPasskeyScreen-DHCCysKA.mjs} +2 -2
- package/dist/esm/LinkPhoneScreen-Bmd4jv7M.mjs +1 -0
- package/dist/esm/LoginFailedScreen-xa-3Q1Dl.mjs +1 -0
- package/dist/esm/ManualTransferScreen-B8JFrKJ2.mjs +1 -0
- package/dist/esm/MfaAuthEnrollmentFlowScreen-ByT7H0E_.mjs +1 -0
- package/dist/esm/MfaAuthVerifyFlowScreen-Dfr4vUQN.mjs +1 -0
- package/dist/esm/MfaEnrollmentFlowScreen-DAi4CFJZ.mjs +1 -0
- package/dist/esm/MfaVerifyFlowScreen-Danwy2Qw.mjs +1 -0
- package/dist/esm/{ModalHeader-DfHxv9fE.mjs → ModalHeader-B3hf8Gf5.mjs} +1 -1
- package/dist/esm/MoonpayStatusScreen-Ci5Oi6Ec.mjs +16 -0
- package/dist/esm/OAuthStatusScreen-rN88I9Yr.mjs +1 -0
- package/dist/esm/PasskeySelectSignupOrLogin-ByI-NM15.mjs +1 -0
- package/dist/esm/PasskeyStatusScreen-s25IPE-D.mjs +3 -0
- package/dist/esm/PasswordRecoveryScreen-Bvc12Phr.mjs +20 -0
- package/dist/esm/{QrCode-D4XZQrgi.mjs → QrCode-DXutpDmP.mjs} +1 -1
- package/dist/esm/RecoveryOAuthStatusScreen-JkYUmAdb.mjs +1 -0
- package/dist/esm/RecoveryPasswordCreateScreen-CSr1zpHY.mjs +1 -0
- package/dist/esm/{RecoverySelectionScreen-DVBTi436.mjs → RecoverySelectionScreen-BQtnEuQN.mjs} +2 -2
- package/dist/esm/{Screen-CDEd4p2a.mjs → Screen-C-LEnZLL.mjs} +1 -1
- package/dist/esm/{ScreenLayout-BdRrZJd_.mjs → ScreenLayout-C5tqY0au.mjs} +1 -1
- package/dist/esm/{SetAutomaticRecoveryScreen-DBcSNU6R.mjs → SetAutomaticRecoveryScreen-CxBT3GM6.mjs} +2 -2
- package/dist/esm/{SetWalletPasswordForm-DdWjdu2s.mjs → SetWalletPasswordForm-CmSpUP06.mjs} +4 -4
- package/dist/esm/{SignRequestScreen-CxAuntSd.mjs → SignRequestScreen-DDQHSSe2.mjs} +2 -2
- package/dist/esm/{StandardSignAndSendTransactionScreen-DIJRS8NR.mjs → StandardSignAndSendTransactionScreen-DfXITIWD.mjs} +1 -1
- package/dist/esm/TelegramAuthScreen-L0mUPKLc.mjs +1 -0
- package/dist/esm/{TransactionDetails-Ce_Cnzo2.mjs → TransactionDetails-n9RsmJQY.mjs} +1 -1
- package/dist/esm/{TransactionErrorView-JiZmO7NJ.mjs → TransactionErrorView-DwgBt1il.mjs} +1 -1
- package/dist/esm/{TransferFromWalletScreen-ad5b7GV7.mjs → TransferFromWalletScreen-DsqvsKwk.mjs} +2 -2
- package/dist/esm/{TransferOrBridgeLoadingScreen-Cwzefd9j.mjs → TransferOrBridgeLoadingScreen-CrM8LyTn.mjs} +1 -1
- package/dist/esm/UpdateEmailScreen-BbZC4Ce_.mjs +1 -0
- package/dist/esm/UpdatePhoneScreen-Chrnlpvk.mjs +1 -0
- package/dist/esm/UserLimitReachedScreen-DCDtmBML.mjs +1 -0
- package/dist/esm/{WalletInfoCard-D2dCT7_H.mjs → WalletInfoCard-9E_M4KpE.mjs} +1 -1
- package/dist/esm/WalletInterstitialScreen-Dwwg2p0u.mjs +1 -0
- package/dist/esm/{WalletLink-DNraFqEC.mjs → WalletLink-CGkyFW_c.mjs} +1 -1
- package/dist/esm/{WalletOverflowButton-Cn_nKCBf.mjs → WalletOverflowButton-BDgrWJ32.mjs} +1 -1
- package/dist/esm/abstract-smart-wallets.mjs +1 -1
- package/dist/esm/context-CTvHGnoI.mjs +1 -0
- package/dist/esm/{ethers-5oa3ZKLD.mjs → ethers-D_pXdGwy.mjs} +1 -1
- package/dist/esm/extended-chains.mjs +1 -1
- package/dist/esm/{getErc20Balance-sCX8nL1s.mjs → getErc20Balance-BTMqTvue.mjs} +1 -1
- package/dist/esm/{getErc20TokenInfo-CwiO-mOs.mjs → getErc20TokenInfo-C3J46mR7.mjs} +1 -1
- package/dist/esm/index-DAEL2fAA.mjs +1 -0
- package/dist/esm/{index-B5B9f4U9.mjs → index-DPtolW6e.mjs} +2 -2
- package/dist/esm/index-ldG7uF5Z.mjs +174 -0
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal.mjs +1 -1
- package/dist/esm/privy-context-DjQaHYWB.mjs +1 -0
- package/dist/esm/{shared-Bw0pXSOO.mjs → shared-Dj3rRmjE.mjs} +1 -1
- package/dist/esm/{shouldProceedtoEmbeddedWalletCreationFlow-BkTDxfME.mjs → shouldProceedtoEmbeddedWalletCreationFlow-B2ygR6ax.mjs} +1 -1
- package/dist/esm/smart-wallets-Y6_E73RM.mjs +1 -0
- package/dist/esm/smart-wallets.mjs +1 -1
- package/dist/esm/solana.mjs +1 -1
- package/dist/esm/{styles-D5Jf27-u.mjs → styles-DNw1LY6I.mjs} +1 -1
- package/dist/esm/{to-ui-error-DnDY_33E.mjs → to-ui-error-iAm6GRH_.mjs} +1 -1
- package/dist/esm/ui.mjs +1 -1
- package/dist/esm/use-export-wallet-DQk47ipd.mjs +1 -0
- package/dist/esm/use-export-wallet-DyWwXiCx.mjs +1 -0
- package/dist/esm/{useActiveWallet-CwS7ik68.mjs → useActiveWallet-jEsJB3LX.mjs} +1 -1
- package/dist/esm/{useGetTokenPrice-oI6b3gPZ.mjs → useGetTokenPrice-CAeZUPHp.mjs} +1 -1
- package/dist/esm/{useI18n-bIQlZhkW.mjs → useI18n-BWVpc1Y-.mjs} +1 -1
- package/dist/esm/usePrivy-MdJeWwyN.mjs +1 -0
- package/dist/esm/{useSolanaRpcClient-C2WlA-Ah.mjs → useSolanaRpcClient-BpNT8e8E.mjs} +1 -1
- package/dist/esm/{useWalletBalance-DopZXXwh.mjs → useWalletBalance-BTQ4EtcY.mjs} +1 -1
- package/dist/esm/useWallets-DoJmA9i9.mjs +1 -0
- package/dist/esm/useWallets-MCga77FD.mjs +1 -0
- package/package.json +1 -1
- package/dist/cjs/AccountNotFoundScreen-Bqh-CYrp.js +0 -1
- package/dist/cjs/AffirmativeConsentScreen-uogZ44HQ.js +0 -6
- package/dist/cjs/AllowlistRejectionScreen-3OKwgh23.js +0 -1
- package/dist/cjs/AuthenticateWithWalletScreen-DXy5TnZj.js +0 -1
- package/dist/cjs/AwaitingEvmToSolBridgingScreen-DR1RiU-S.js +0 -2
- package/dist/cjs/AwaitingExternalEthereumTransferScreen-DgQ9z_ck.js +0 -2
- package/dist/cjs/AwaitingPasswordlessCodeScreen-Bah7kXAV.js +0 -103
- package/dist/cjs/AwaitingSolToEvmBridgingScreen-HSwPZmzZ.js +0 -2
- package/dist/cjs/CaptchaScreen-BLoD3u63.js +0 -1
- package/dist/cjs/CoinbaseOnrampStatusScreen-CoSS2KfY.js +0 -16
- package/dist/cjs/ConnectEmailForm-BjXzo_T8.js +0 -3
- package/dist/cjs/ConnectLedgerScreen-Brfd_c8H.js +0 -9
- package/dist/cjs/ConnectOnlyLandingScreen-C41qgoJf.js +0 -1
- package/dist/cjs/ConnectOnlyStatusScreen-DPsh3aXI.js +0 -1
- package/dist/cjs/ConnectOrCreateScreen-Dpv9J_eC.js +0 -1
- package/dist/cjs/ConnectionStatusScreen-DfKCyYnE.js +0 -7
- package/dist/cjs/CrossAppAuthScreen-CAmbPQb0.js +0 -1
- package/dist/cjs/DelegatedActionsConsentScreen-DOvRMKf-.js +0 -1
- package/dist/cjs/DelegatedActionsRevokeScreen-5ecaxQ0D.js +0 -1
- package/dist/cjs/EmbeddedWalletConnectingScreen-B31DzW7n.js +0 -1
- package/dist/cjs/EmbeddedWalletCreatedScreen-BXEozrA_.js +0 -1
- package/dist/cjs/EmbeddedWalletOnAccountCreateScreen-DSrn-F5R.js +0 -1
- package/dist/cjs/EmbeddedWalletPasswordUpdateScreen-DGlv7LlS.js +0 -1
- package/dist/cjs/EmbeddedWalletPasswordUpdateSplashScreen-Byr5dLg5.js +0 -1
- package/dist/cjs/ErrorScreen-DJwJwrGn.js +0 -4
- package/dist/cjs/FarcasterSignerStatusScreen--CVrZRE9.js +0 -29
- package/dist/cjs/FundSolWalletWithExternalSolanaWallet-3Fn4CnSA.js +0 -2
- package/dist/cjs/FundWalletMethodHeader-D2fapeXN.js +0 -1
- package/dist/cjs/FundingEditAmountScreen-B3wEw9xm.js +0 -1
- package/dist/cjs/FundingMethodSelectionScreen-ChQNeyi6.js +0 -1
- package/dist/cjs/InAppBrowserLoginNotPossible-XFkxHwKR.js +0 -1
- package/dist/cjs/InstallWalletScreen-Cp3ZRRYf.js +0 -1
- package/dist/cjs/LandingScreen-DwFs0lRf.js +0 -1
- package/dist/cjs/LinkEmailScreen-_sfK6ECC.js +0 -1
- package/dist/cjs/LinkPhoneScreen-BjMfF3Kz.js +0 -1
- package/dist/cjs/LoginFailedScreen-BUnuwN-5.js +0 -1
- package/dist/cjs/ManualTransferScreen-D2hHGf6p.js +0 -1
- package/dist/cjs/MfaAuthEnrollmentFlowScreen-VFaXkogp.js +0 -1
- package/dist/cjs/MfaAuthVerifyFlowScreen-CVBdW4Cw.js +0 -1
- package/dist/cjs/MfaEnrollmentFlowScreen-DxkzCr5s.js +0 -1
- package/dist/cjs/MfaVerifyFlowScreen-AFZc7liT.js +0 -1
- package/dist/cjs/MoonpayStatusScreen-C66Eq4G4.js +0 -16
- package/dist/cjs/OAuthStatusScreen-NKl6SLvR.js +0 -1
- package/dist/cjs/PasskeySelectSignupOrLogin-D9VfPofR.js +0 -1
- package/dist/cjs/PasskeyStatusScreen-CBC-60D2.js +0 -3
- package/dist/cjs/PasswordRecoveryScreen-BSUhAJ63.js +0 -20
- package/dist/cjs/RecoveryOAuthStatusScreen-y2Z3cphT.js +0 -1
- package/dist/cjs/RecoveryPasswordCreateScreen-CoDYHaJk.js +0 -1
- package/dist/cjs/SetAutomaticRecoveryScreen-BLiDEmlE.js +0 -14
- package/dist/cjs/TelegramAuthScreen-BGB40HSe.js +0 -1
- package/dist/cjs/UpdateEmailScreen-Bgn5JxGJ.js +0 -1
- package/dist/cjs/UpdatePhoneScreen-DPAxfLv5.js +0 -1
- package/dist/cjs/UserLimitReachedScreen-BG8gj4ah.js +0 -1
- package/dist/cjs/WalletInterstitialScreen-CBH05HpE.js +0 -1
- package/dist/cjs/get-is-unified-wallet-DitrQ4hx.js +0 -1
- package/dist/cjs/index-BohqOluI.js +0 -174
- package/dist/cjs/index-CCY3tkwt.js +0 -1
- package/dist/cjs/smart-wallets-BtILJe_K.js +0 -1
- package/dist/cjs/use-export-wallet-C6DaLOxp.js +0 -1
- package/dist/cjs/use-export-wallet-eDTOzHRt.js +0 -1
- package/dist/cjs/usePrivy-CHcu9hX8.js +0 -1
- package/dist/cjs/useWallets-CbvzYOqg.js +0 -1
- package/dist/cjs/useWallets-Cy6axcvW.js +0 -1
- package/dist/esm/AccountNotFoundScreen-BSYd-8_2.mjs +0 -1
- package/dist/esm/AffirmativeConsentScreen-C_uGmdSa.mjs +0 -6
- package/dist/esm/AllowlistRejectionScreen-DBdNYwS-.mjs +0 -1
- package/dist/esm/AuthenticateWithWalletScreen-D-Aw0iYo.mjs +0 -1
- package/dist/esm/AwaitingEvmToSolBridgingScreen-BMr5CXgX.mjs +0 -2
- package/dist/esm/AwaitingExternalEthereumTransferScreen-aOEMTW-b.mjs +0 -2
- package/dist/esm/AwaitingPasswordlessCodeScreen-CjPJ7IMM.mjs +0 -103
- package/dist/esm/AwaitingSolToEvmBridgingScreen-xrFngED1.mjs +0 -2
- package/dist/esm/CaptchaScreen-BOKElE1r.mjs +0 -1
- package/dist/esm/CoinbaseOnrampStatusScreen-CTV5uUn3.mjs +0 -16
- package/dist/esm/ConnectEmailForm-Dp85JvZj.mjs +0 -3
- package/dist/esm/ConnectLedgerScreen-rxzesP5N.mjs +0 -9
- package/dist/esm/ConnectOnlyLandingScreen-CmImF7oZ.mjs +0 -1
- package/dist/esm/ConnectOnlyStatusScreen-Bo90w6P9.mjs +0 -1
- package/dist/esm/ConnectOrCreateScreen-Dc2VQF-B.mjs +0 -1
- package/dist/esm/ConnectionStatusScreen-C_fxSXJ2.mjs +0 -7
- package/dist/esm/CrossAppAuthScreen-DU0FD2ep.mjs +0 -1
- package/dist/esm/DelegatedActionsConsentScreen-Dr-DeIXC.mjs +0 -1
- package/dist/esm/DelegatedActionsRevokeScreen-kXOJxXu-.mjs +0 -1
- package/dist/esm/EmbeddedWalletConnectingScreen-tFedaOj3.mjs +0 -1
- package/dist/esm/EmbeddedWalletCreatedScreen-DCx4NdAp.mjs +0 -1
- package/dist/esm/EmbeddedWalletOnAccountCreateScreen-vSzXa62f.mjs +0 -1
- package/dist/esm/EmbeddedWalletPasswordUpdateScreen-B4szV9Hg.mjs +0 -1
- package/dist/esm/EmbeddedWalletPasswordUpdateSplashScreen-BOBLnE_O.mjs +0 -1
- package/dist/esm/ErrorScreen-BGE6wldq.mjs +0 -4
- package/dist/esm/FarcasterSignerStatusScreen-C-crikPv.mjs +0 -28
- package/dist/esm/FundSolWalletWithExternalSolanaWallet-BX4gYmzv.mjs +0 -1
- package/dist/esm/FundWalletMethodHeader-CdXWChwL.mjs +0 -1
- package/dist/esm/FundingEditAmountScreen--ffFSUmf.mjs +0 -1
- package/dist/esm/FundingMethodSelectionScreen-Djr0jY03.mjs +0 -1
- package/dist/esm/InAppBrowserLoginNotPossible-D6wMCuzD.mjs +0 -1
- package/dist/esm/InstallWalletScreen-B6VSXUWR.mjs +0 -1
- package/dist/esm/LandingScreen-BV0xq-oc.mjs +0 -1
- package/dist/esm/LinkEmailScreen-CtMuCZvp.mjs +0 -1
- package/dist/esm/LinkPhoneScreen-2nnXZB2B.mjs +0 -1
- package/dist/esm/LoginFailedScreen-hHvIsH81.mjs +0 -1
- package/dist/esm/ManualTransferScreen-C0xJ3si8.mjs +0 -1
- package/dist/esm/MfaAuthEnrollmentFlowScreen-CznUpkq5.mjs +0 -1
- package/dist/esm/MfaAuthVerifyFlowScreen-DUmOZHGX.mjs +0 -1
- package/dist/esm/MfaEnrollmentFlowScreen-DeoSfYAS.mjs +0 -1
- package/dist/esm/MfaVerifyFlowScreen-JJ1crW_8.mjs +0 -1
- package/dist/esm/MoonpayStatusScreen-BIzQZK9f.mjs +0 -16
- package/dist/esm/OAuthStatusScreen-DhmaZBTY.mjs +0 -1
- package/dist/esm/PasskeySelectSignupOrLogin-BmiJnukl.mjs +0 -1
- package/dist/esm/PasskeyStatusScreen-BStwA1_J.mjs +0 -3
- package/dist/esm/PasswordRecoveryScreen-DyBDQADG.mjs +0 -20
- package/dist/esm/RecoveryOAuthStatusScreen-BfcxgkUL.mjs +0 -1
- package/dist/esm/RecoveryPasswordCreateScreen-CBfvjxht.mjs +0 -1
- package/dist/esm/TelegramAuthScreen-BRDG8b6x.mjs +0 -1
- package/dist/esm/UpdateEmailScreen-C5lQJUiA.mjs +0 -1
- package/dist/esm/UpdatePhoneScreen-BwkzWVHl.mjs +0 -1
- package/dist/esm/UserLimitReachedScreen-ComDV9kj.mjs +0 -1
- package/dist/esm/WalletInterstitialScreen-riBB51NH.mjs +0 -1
- package/dist/esm/context-Cw2-86-G.mjs +0 -1
- package/dist/esm/get-is-unified-wallet-CQc-E5dS.mjs +0 -1
- package/dist/esm/index-Bvw5OxHl.mjs +0 -174
- package/dist/esm/index-yxF2V6XY.mjs +0 -1
- package/dist/esm/smart-wallets-Dl42tBUP.mjs +0 -1
- package/dist/esm/use-export-wallet-Bd5Sg5V-.mjs +0 -1
- package/dist/esm/use-export-wallet-NF9h_lS_.mjs +0 -1
- package/dist/esm/usePrivy-DAnfSvB5.mjs +0 -1
- package/dist/esm/useWallets-2_uCkhA8.mjs +0 -1
- package/dist/esm/useWallets-DpbBw4Vl.mjs +0 -1
package/dist/esm/{SetAutomaticRecoveryScreen-DBcSNU6R.mjs → SetAutomaticRecoveryScreen-CxBT3GM6.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as e,Fragment as r,jsx as o}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/ExclamationTriangleIcon";import i from"@heroicons/react/24/outline/LockClosedIcon";import{useState as n}from"react";import{u as l,a,j as s}from"./
|
|
1
|
+
import{jsxs as e,Fragment as r,jsx as o}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/ExclamationTriangleIcon";import i from"@heroicons/react/24/outline/LockClosedIcon";import{useState as n}from"react";import{u as l,a,j as s}from"./privy-context-DjQaHYWB.mjs";import{M as c,c as m,B as d}from"./ModalHeader-B3hf8Gf5.mjs";import{styled as p}from"styled-components";import{S as u}from"./Subtitle-CV-2yKE4.mjs";import{T as y}from"./Title-BnzYV3Is.mjs";import{q as h}from"./context-CTvHGnoI.mjs";import{u as f}from"./internal-context-Z-fyxadS.mjs";import{G as v}from"./useActiveWallet-jEsJB3LX.mjs";import"@privy-io/are-addresses-equal";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"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"zustand";import"react-device-detect";import"./use-export-wallet-DQk47ipd.mjs";import"./useWallets-DoJmA9i9.mjs";import"viem";import"eventemitter3";import"viem/utils";import"./events-context-CI0iqAXA.mjs";const g=p.div`
|
|
2
2
|
&& {
|
|
3
3
|
border-width: 4px;
|
|
4
4
|
}
|
|
@@ -11,4 +11,4 @@ import{jsxs as e,Fragment as r,jsx as o}from"react/jsx-runtime";import t from"@h
|
|
|
11
11
|
border-style: solid;
|
|
12
12
|
border-color: ${e=>e.$color??"var(--privy-color-accent)"};
|
|
13
13
|
border-radius: 50%;
|
|
14
|
-
`,w={component:()=>{let{user:p}=l(),{client:w,walletProxy:j,refreshSessionAndUser:x,closePrivyModal:I}=
|
|
14
|
+
`,w={component:()=>{let{user:p}=l(),{client:w,walletProxy:j,refreshSessionAndUser:x,closePrivyModal:I}=f(),b=a(),{entropyId:T,entropyIdVerifier:k}=b.data?.recoverWallet,[C,M]=n(!1),[S,W]=n(null),[A,U]=n(null);function E(){if(!C){if(A)return b.data?.setWalletPassword?.onFailure(A),void I();if(!S)return b.data?.setWalletPassword?.onFailure(Error("User exited set recovery flow")),void I()}}b.onUserCloseViaDialogOrKeybindRef.current=E;let P=!(!C&&!S);/*#__PURE__*/return e(r,A?{children:[/*#__PURE__*/o(c,{onClose:E},"header"),/*#__PURE__*/o(g,{$color:"var(--privy-color-error)",style:{alignSelf:"center"},children:/*#__PURE__*/o(t,{height:38,width:38,stroke:"var(--privy-color-error)"})}),/*#__PURE__*/o(y,{style:{marginTop:"0.5rem"},children:"Something went wrong"}),/*#__PURE__*/o(v,{style:{minHeight:"2rem"}}),/*#__PURE__*/o(m,{onClick:()=>U(null),children:"Try again"}),/*#__PURE__*/o(d,{})]}:{children:[/*#__PURE__*/o(c,{onClose:E},"header"),/*#__PURE__*/o(i,{style:{width:"3rem",height:"3rem",alignSelf:"center"}}),/*#__PURE__*/o(y,{style:{marginTop:"0.5rem"},children:"Automatically secure your account"}),/*#__PURE__*/o(u,{style:{marginTop:"1rem"},children:"When you log into a new device, you’ll only need to authenticate to access your account. Never get logged out if you forget your password."}),/*#__PURE__*/o(v,{style:{minHeight:"2rem"}}),/*#__PURE__*/o(m,{loading:C,disabled:P,onClick:()=>async function(){M(!0);try{let e=await w.getAccessToken(),r=s(p,T);if(!e||!j||!r)return;if(!(await j.setRecovery({accessToken:e,entropyId:T,entropyIdVerifier:k,existingRecoveryMethod:r.recoveryMethod,recoveryMethod:"privy"})).entropyId)throw Error("Unable to set recovery on wallet");let o=await x();if(!o)throw Error("Unable to set recovery on wallet");let t=s(o,r.address);if(!t)throw Error("Unabled to set recovery on wallet");W(!!o),setTimeout((()=>{b.data?.setWalletPassword?.onSuccess(t),I()}),h)}catch(e){U(e)}finally{M(!1)}}(),children:S?"Success":"Confirm"}),/*#__PURE__*/o(d,{})]})}};export{w as SetAutomaticRecoveryScreen,w as default};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import{jsxs as e,Fragment as r,jsx as o}from"react/jsx-runtime";import{useState as n,useEffect as i,useMemo as t,useCallback as a,useReducer as l}from"react";import{q as c}from"./context-
|
|
2
|
-
/*#__PURE__*/o($,{"aria-hidden":!v||I,error:!0,children:"Passwords do not match"})]}),/*#__PURE__*/o(B,{onClick:c,loading:a,disabled:!I,$hideAnimations:t,children:"Continue"}),/*#__PURE__*/o(
|
|
1
|
+
import{jsxs as e,Fragment as r,jsx as o}from"react/jsx-runtime";import{useState as n,useEffect as i,useMemo as t,useCallback as a,useReducer as l}from"react";import{q as c}from"./context-CTvHGnoI.mjs";import{a as s}from"./privy-context-DjQaHYWB.mjs";import d from"@heroicons/react/24/outline/ExclamationTriangleIcon";import{b as h,R as p,c as u}from"./Layouts-BlFm53ED.mjs";import{M as m,B as g,S as y,P as v}from"./ModalHeader-B3hf8Gf5.mjs";import{E as f,b as w,P as b,a as k,I as C,H as S,S as x,c as $,N as B,D as R,d as P,R as A,e as I,f as j,g as L}from"./shared-Dj3rRmjE.mjs";import{styled as E}from"styled-components";import{C as T}from"./Checkbox-BhNoOKjX.mjs";import z from"@heroicons/react/24/outline/KeyIcon";import D from"@heroicons/react/24/solid/CheckCircleIcon";import H from"fast-password-entropy";import*as U from"secure-password-utilities";import{DEFAULT_WORDLIST as F}from"secure-password-utilities/wordlists";import M from"@heroicons/react/24/outline/ArrowDownTrayIcon";import K from"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import O from"@heroicons/react/24/outline/DocumentDuplicateIcon";import N from"@heroicons/react/24/solid/XCircleIcon";import{C as W}from"./ScreenHeader-CHmc4-Lu.mjs";const Y=({buttonHideAnimations:t,buttonLoading:a,password:l,onSubmit:c,onBack:s})=>{let[u,y]=n(!0),[v,R]=n(!1),[P,A]=n(""),I=l===P;return i((()=>{P&&!v&&R(!0)}),[P]),/*#__PURE__*/e(r,{children:[/*#__PURE__*/o(m,{closeable:!1,backFn:s}),/*#__PURE__*/o(h,{}),/*#__PURE__*/e(f,{children:[/*#__PURE__*/e(w,{children:[/*#__PURE__*/o(d,{height:48,width:48,stroke:"var(--privy-color-background)",fill:"var(--privy-color-accent)"}),/*#__PURE__*/o("h3",{style:{color:"var(--privy-color-foreground)"},children:"Confirm your password"}),/*#__PURE__*/o("p",{style:{color:"var(--privy-color-foreground-2)"},children:"Please re-enter your password below to continue."})]}),/*#__PURE__*/e(b,{children:[/*#__PURE__*/o(k,{value:P,onChange:e=>A(e.target.value),onKeyUp:e=>{"Enter"===e.key&&c()},onBlur:()=>R(!0),placeholder:"confirm your password",type:u?"password":"text",style:{paddingRight:"2.3rem"}}),/*#__PURE__*/o(C,{style:{right:"0.75rem"},children:u?/*#__PURE__*/o(S,{onClick:()=>y(!1)}):/*#__PURE__*/o(x,{onClick:()=>y(!0)})})]}),
|
|
2
|
+
/*#__PURE__*/o($,{"aria-hidden":!v||I,error:!0,children:"Passwords do not match"})]}),/*#__PURE__*/o(B,{onClick:c,loading:a,disabled:!I,$hideAnimations:t,children:"Continue"}),/*#__PURE__*/o(p,{}),/*#__PURE__*/o(g,{})]})},Z=({buttonHideAnimations:i,buttonLoading:t,onSubmit:a,onBack:l,config:c})=>{let[s,u]=n(!1);/*#__PURE__*/return e(r,{children:[/*#__PURE__*/o(m,{closeable:!1,backFn:l}),/*#__PURE__*/o(h,{}),/*#__PURE__*/e(f,{children:[/*#__PURE__*/e(w,{children:[/*#__PURE__*/o(d,{height:48,width:48,stroke:"var(--privy-color-background)",fill:"var(--privy-color-error)"}),/*#__PURE__*/o("h3",{style:{color:"var(--privy-color-foreground)"},children:"Confirm you have saved"}),/*#__PURE__*/o("p",{style:{color:"var(--privy-color-foreground-2)"},children:"Losing access to your password means you will lose access to your account."})]}),/*#__PURE__*/o(R,{children:/*#__PURE__*/e(P,{style:{color:"var(--privy-color-error)",cursor:"pointer"},onClick:e=>{e.preventDefault(),u((e=>!e))},children:[/*#__PURE__*/o(T,{color:"var(--privy-color-error)",readOnly:!0,checked:s}),/*#__PURE__*/o(r,{children:"I understand that if I lose my password and device, I will lose access to my account and my assets."})]})})]}),/*#__PURE__*/e(_,{children:["user"===c.initiatedBy&&/*#__PURE__*/o(y,{onClick:c.onCancel,disabled:t,children:"Cancel"}),/*#__PURE__*/o(B,{onClick:a,loading:t,$hideAnimations:i,disabled:!s,children:"Set Password"})]}),/*#__PURE__*/o(p,{}),/*#__PURE__*/o(g,{})]})};let _=E.div`
|
|
3
3
|
display: flex;
|
|
4
4
|
gap: 10px;
|
|
5
|
-
`,q=/[a-z]/,G=/[A-Z]/,X=/[0-9]/,J="!@#$%^&*()\\-_+.",Q=`a-zA-Z0-9${J}`,V=RegExp(`[${J}]`),ee=RegExp(`[${Q}]`);const re=RegExp(`^[${Q}]{6,}$`),oe=()=>U.generatePassphrase(4,F);function ne(e){return e>.9?"Strong":e>.5?"Medium":"Weak"}function ie(e=""){return(.3*function(e){if(e.length<8)return 0;let r=0;return q.test(e)&&(r+=1),G.test(e)&&(r+=1),X.test(e)&&(r+=1),V.test(e)&&(r+=1),Math.max(0,Math.min(1,r/3))}(e)+H(e)/95)/2}const te=({buttonHideAnimations:a,buttonLoading:l,password:c="",config:s,isResettingPassword:d,onSubmit:
|
|
5
|
+
`,q=/[a-z]/,G=/[A-Z]/,X=/[0-9]/,J="!@#$%^&*()\\-_+.",Q=`a-zA-Z0-9${J}`,V=RegExp(`[${J}]`),ee=RegExp(`[${Q}]`);const re=RegExp(`^[${Q}]{6,}$`),oe=()=>U.generatePassphrase(4,F);function ne(e){return e>.9?"Strong":e>.5?"Medium":"Weak"}function ie(e=""){return(.3*function(e){if(e.length<8)return 0;let r=0;return q.test(e)&&(r+=1),G.test(e)&&(r+=1),X.test(e)&&(r+=1),V.test(e)&&(r+=1),Math.max(0,Math.min(1,r/3))}(e)+H(e)/95)/2}const te=({buttonHideAnimations:a,buttonLoading:l,password:c="",config:s,isResettingPassword:d,onSubmit:u,onClose:y,onBack:v,onPasswordChange:j,onPasswordGenerate:L})=>{let[E,T]=n(!1),[H,U]=n(!1);i((()=>{c&&!H&&U(!0)}),[c]);let F=t((()=>H?6>(c?.length||0)?"Password must be at least 6 characters":re.test(c||"")?null:`Invalid characters used ( ${((e="")=>[...new Set(e.split("").filter((e=>!ee.test(e))).map((e=>e.replace(" ","SPACE"))))])(c).join(" ")} )`:null),[c,H]),M=t((()=>F?{value:0,label:"Weak"}:function(e=""){let r=ie(e);return{value:r,label:ne(r)}}(c)),[c,F]),K=t((()=>!c?.length||!!F),[F,c]);/*#__PURE__*/return e(r,{children:[/*#__PURE__*/o(m,{onClose:y,closeable:"user"===s.initiatedBy,backFn:v}),/*#__PURE__*/o(h,{}),/*#__PURE__*/e(f,{children:[/*#__PURE__*/e(w,{children:[/*#__PURE__*/o(z,{height:48,width:48,stroke:"var(--privy-color-accent)"}),/*#__PURE__*/e("h3",{style:{color:"var(--privy-color-foreground)"},children:[d?"Reset":"Set"," your password"]}),/*#__PURE__*/o("p",{style:{color:"var(--privy-color-foreground-2)"},children:"Select a strong, memorable password to secure your account."})]}),/*#__PURE__*/e(b,{children:[/*#__PURE__*/o(k,{value:c,onChange:e=>j(e.target.value),onKeyUp:e=>{"Enter"===e.key&&u()},placeholder:"enter or generate a strong password",type:E?"password":"text",style:{paddingRight:"3.8rem"}}),/*#__PURE__*/e(C,{style:{width:"3.5rem"},children:[E?/*#__PURE__*/o(S,{onClick:()=>T(!1)}):/*#__PURE__*/o(x,{onClick:()=>T(!0)}),/*#__PURE__*/o(A,{onClick:L})]})]}),/*#__PURE__*/o(I,{value:0===M.value?.01:M.value,label:M.label}),/*#__PURE__*/o($,{error:!!F,children:F||`Password Strength: ${H?M.label:"--"}`}),/*#__PURE__*/e(le,{children:[/*#__PURE__*/o(ae,{children:/*#__PURE__*/e(R,{children:[/*#__PURE__*/e(P,{children:[/*#__PURE__*/o(D,{width:24,height:24,fill:"var(--privy-color-accent)"}),"This password is used to secure your account."]}),/*#__PURE__*/e(P,{children:[/*#__PURE__*/o(D,{width:24,height:24,fill:"var(--privy-color-accent)"}),"Use it to log in on a new environment, like another browser or device."]})]})}),/*#__PURE__*/o(B,{onClick:u,loading:l,disabled:K,$hideAnimations:a,children:"Continue"})]})]}),/*#__PURE__*/o(p,{}),/*#__PURE__*/o(g,{})]})};let ae=E(R)`
|
|
6
6
|
flex: 1;
|
|
7
7
|
padding-top: 1rem;
|
|
8
8
|
`,le=E.div`
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
height: 100%;
|
|
12
|
-
`;const ce=({buttonHideAnimations:i,buttonLoading:t,appName:l,password:c,onSubmit:s,onBack:
|
|
12
|
+
`;const ce=({buttonHideAnimations:i,buttonLoading:t,appName:l,password:c,onSubmit:s,onBack:u})=>{let[y,v]=n(!1),[k,$]=n(!0),R=a((()=>{v(!0),c&&navigator.clipboard.writeText(c)}),[c]),P=a((()=>{let e=document.createElement("a"),r=l.toLowerCase().replace(/[^a-z\s]/g,"").replace(/\s/g,"-"),o=new Blob([se(l,c)],{type:"text/plain"}),n=URL.createObjectURL(o);e.href=n,e.target="_blank",e.download=`${r}-privy-wallet-recovery.txt`,document.body.appendChild(e),e.click(),setTimeout((()=>{e.remove(),URL.revokeObjectURL(n)}),5e3)}),[c]);/*#__PURE__*/return e(r,{children:[/*#__PURE__*/o(m,{backFn:u,closeable:!1}),/*#__PURE__*/o(h,{}),/*#__PURE__*/e(f,{children:[/*#__PURE__*/e(w,{children:[/*#__PURE__*/o(d,{height:48,width:48,stroke:"var(--privy-color-background)",fill:"var(--privy-color-accent)"}),/*#__PURE__*/o("h3",{style:{color:"var(--privy-color-foreground)"},children:"Save your password"}),/*#__PURE__*/o("p",{style:{color:"var(--privy-color-foreground-2)"},children:"For your security, this password cannot be reset, so keep it somewhere safe."})]}),/*#__PURE__*/e(b,{centered:!0,children:[/*#__PURE__*/o(j,{children:k?"•".repeat(c.length):c}),/*#__PURE__*/o(C,{style:{right:"0.75rem"},children:k?/*#__PURE__*/o(S,{onClick:()=>$(!1)}):/*#__PURE__*/o(x,{onClick:()=>$(!0)})})]}),/*#__PURE__*/e("div",{style:{display:"flex",margin:"12px 0",gap:"12px"},children:[/*#__PURE__*/o(L,{onClick:R,children:/*#__PURE__*/e(r,y?{children:[/*#__PURE__*/o(K,{style:{width:24,height:24},stroke:"var(--privy-color-accent)"}),"Copied"]}:{children:[/*#__PURE__*/o(O,{style:{width:24,height:24},stroke:"var(--privy-color-accent)"}),"Copy"]})}),/*#__PURE__*/e(L,{onClick:P,children:[/*#__PURE__*/o(M,{style:{width:24,height:24},stroke:"var(--privy-color-accent)"}),"Download"]})]})]}),/*#__PURE__*/o(B,{onClick:s,loading:t,$hideAnimations:i,children:"Continue"}),/*#__PURE__*/o(p,{}),/*#__PURE__*/o(g,{})]})};let se=(e,r)=>`Your wallet recovery password for ${e} is\n\n${r}\n\nYou will need this password to access your ${e} wallet on a new device. Please keep it somewhere safe.`;const de=({error:n,onClose:i})=>/*#__PURE__*/e(r,{children:[/*#__PURE__*/o(m,{closeable:!1}),/*#__PURE__*/o(h,{}),/*#__PURE__*/e(u,n?{children:[/*#__PURE__*/o(N,{fill:"var(--privy-color-error)",width:"64px",height:"64px"}),/*#__PURE__*/o(W,{title:"Something went wrong",description:n})]}:{children:[/*#__PURE__*/o(D,{fill:"var(--privy-color-success)",width:"64px",height:"64px"}),/*#__PURE__*/o(W,{title:"Success"})]}),/*#__PURE__*/o(v,{onClick:i,children:"Close"}),/*#__PURE__*/o(p,{}),/*#__PURE__*/o(g,{})]});let he=(e,r)=>{switch(e){case"creating":return"back"===r?e:"saving";case"saving":return"back"===r?"creating":"confirming";case"confirming":return"back"===r?"saving":"finalizing";case"finalizing":return"back"===r?"confirming":"done";default:return e}};const pe=({onSubmit:e,...r})=>{let{lastScreen:n,navigate:t}=s(),{send:d,state:h}=(()=>{let[e,r]=l(he,"creating");return{send:r,state:e}})(),p=a((async()=>{"finalizing"===h&&await e(),d("next")}),[h,d,e]);i((()=>{let e;return"done"===h&&"automatic"===r.config.initiatedBy&&(e=setTimeout((()=>r.onClose?.()),c)),()=>{e&&clearTimeout(e)}}),[h,r.config.initiatedBy,r.onClose]);let u=a((()=>{d("back")}),[d]),m=a((()=>{t("RecoverySelectionScreen")}),[n,t]);return"creating"===h?/*#__PURE__*/o(te,{...r,onSubmit:p,onBack:"RecoverySelectionScreen"===n?m:void 0}):"saving"===h?/*#__PURE__*/o(ce,{...r,onSubmit:p,onBack:u}):"confirming"===h?/*#__PURE__*/o(Y,{...r,onSubmit:p,onBack:u}):"finalizing"===h?/*#__PURE__*/o(Z,{...r,onSubmit:p,onBack:u}):"done"===h?/*#__PURE__*/o(de,{...r,onSubmit:p}):null};export{pe as S,oe as g};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as o}from"react/jsx-runtime";import{base64 as r}from"@scure/base";import{Edit as i}from"lucide-react";import{useState as n,useEffect as a}from"react";import{styled as s}from"styled-components";import{isHex as l,hexToString as c}from"viem";import{ProviderErrors as m}from"@privy-io/js-sdk-core";import{C as p}from"./CopyToClipboard-DSTf_eKU.mjs";import{a as d}from"./Layouts-BlFm53ED.mjs";import{M as u,D as g}from"./JsonTree-aPaJmPx7.mjs";import{P as
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as o}from"react/jsx-runtime";import{base64 as r}from"@scure/base";import{Edit as i}from"lucide-react";import{useState as n,useEffect as a}from"react";import{styled as s}from"styled-components";import{isHex as l,hexToString as c}from"viem";import{ProviderErrors as m}from"@privy-io/js-sdk-core";import{C as p}from"./CopyToClipboard-DSTf_eKU.mjs";import{a as d}from"./Layouts-BlFm53ED.mjs";import{M as u,D as g}from"./JsonTree-aPaJmPx7.mjs";import{P as y,G as h}from"./use-export-wallet-DQk47ipd.mjs";import{W as f,q as x}from"./context-CTvHGnoI.mjs";import{u as C}from"./internal-context-Z-fyxadS.mjs";import{u as v,a as w}from"./privy-context-DjQaHYWB.mjs";import{S as T}from"./ScreenLayout-C5tqY0au.mjs";import"./useWallets-DoJmA9i9.mjs";import"eventemitter3";import"viem/utils";import"tinycolor2";import"ofetch";import"@privy-io/are-addresses-equal";import"./ModalHeader-B3hf8Gf5.mjs";import"./useActiveWallet-jEsJB3LX.mjs";import"zustand";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-C-LEnZLL.mjs";import"./index-Dq_xe9dz.mjs";const b=s.img`
|
|
2
2
|
&& {
|
|
3
3
|
height: ${e=>"sm"===e.size?"65px":"140px"};
|
|
4
4
|
width: ${e=>"sm"===e.size?"65px":"140px"};
|
|
5
5
|
border-radius: 16px;
|
|
6
6
|
margin-bottom: 12px;
|
|
7
7
|
}
|
|
8
|
-
`;let j=e=>{if(!l(e))return e;try{let t=c(e);return t.includes("�")?e:t}catch{return e}},E=e=>{try{let t=r.decode(e),o=(new TextDecoder).decode(t);return o.includes("�")?e:o}catch{return e}},S=r=>{let{types:i,primaryType:n,...a}=r.typedData;/*#__PURE__*/return t(o,{children:[/*#__PURE__*/e(A,{data:a}),/*#__PURE__*/e(p,{text:(s=r.typedData,JSON.stringify(s,null,2)),itemName:"full payload to clipboard"})," "]});var s};const R=({method:o,messageData:r,copy:n,iconUrl:a,isLoading:s,success:l,walletProxyIsLoading:c,errorMessage:m,isCancellable:p,onSign:u,onCancel:g,onClose:
|
|
8
|
+
`;let j=e=>{if(!l(e))return e;try{let t=c(e);return t.includes("�")?e:t}catch{return e}},E=e=>{try{let t=r.decode(e),o=(new TextDecoder).decode(t);return o.includes("�")?e:o}catch{return e}},S=r=>{let{types:i,primaryType:n,...a}=r.typedData;/*#__PURE__*/return t(o,{children:[/*#__PURE__*/e(A,{data:a}),/*#__PURE__*/e(p,{text:(s=r.typedData,JSON.stringify(s,null,2)),itemName:"full payload to clipboard"})," "]});var s};const R=({method:o,messageData:r,copy:n,iconUrl:a,isLoading:s,success:l,walletProxyIsLoading:c,errorMessage:m,isCancellable:p,onSign:u,onCancel:g,onClose:y})=>/*#__PURE__*/e(T,{title:n.title,subtitle:n.description,showClose:!0,onClose:y,icon:i,iconVariant:"subtle",helpText:m?/*#__PURE__*/e(L,{children:m}):void 0,primaryCta:{label:n.buttonText,onClick:u,disabled:s||l||c,loading:s},secondaryCta:p?{label:"Not now",onClick:g,disabled:s||l||c}:void 0,watermark:!0,children:/*#__PURE__*/t(d,{children:[a?/*#__PURE__*/e(b,{style:{alignSelf:"center"},size:"sm",src:a,alt:"app image"}):null,/*#__PURE__*/t(D,{children:["personal_sign"===o&&/*#__PURE__*/e(U,{children:j(r)}),"eth_signTypedData_v4"===o&&/*#__PURE__*/e(S,{typedData:r}),"solana_signMessage"===o&&/*#__PURE__*/e(U,{children:E(r)})]})]})}),_={component:()=>{let{authenticated:t}=v(),{initializeWalletProxy:o,closePrivyModal:r}=C(),{navigate:i,data:s,onUserCloseViaDialogOrKeybindRef:l}=w(),[c,p]=n(!0),[d,u]=n(""),[g,T]=n(),[b,j]=n(null),[E,S]=n(!1);a((()=>{t||i("LandingScreen")}),[t]),a((()=>{o(f).then((e=>{p(!1),e||(u("An error has occurred, please try again."),T(new y(new h(d,m.E32603_DEFAULT_INTERNAL_ERROR.eipCode))))}))}),[]);let{method:_,data:D,confirmAndSign:L,onSuccess:A,onFailure:U,uiOptions:M}=s.signMessage,I={title:M?.title||"Sign message",description:M?.description||"Signing this message will not cost you any fees.",buttonText:M?.buttonText||"Sign and continue"},k=e=>{e?A(e):U(g||new y(new h("The user rejected the request.",m.E4001_USER_REJECTED_REQUEST.eipCode))),r({shouldCallAuthOnSuccess:!1}),setTimeout((()=>{j(null),u(""),T(void 0)}),200)};l.current=()=>{k(b)};/*#__PURE__*/return e(R,{method:_,messageData:D,copy:I,iconUrl:M?.iconUrl&&"string"==typeof M.iconUrl?M.iconUrl:void 0,isLoading:E,success:null!==b,walletProxyIsLoading:c,errorMessage:d,isCancellable:M?.isCancellable,onSign:async()=>{S(!0),u("");try{let e=await L();j(e),S(!1),setTimeout((()=>{k(e)}),x)}catch(e){console.error(e),u("An error has occurred, please try again."),T(new y(new h(d,m.E32603_DEFAULT_INTERNAL_ERROR.eipCode))),S(!1)}},onCancel:()=>k(null),onClose:()=>k(b)})}};let D=s.div`
|
|
9
9
|
flex: 1;
|
|
10
10
|
display: flex;
|
|
11
11
|
flex-direction: column;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as t,jsx as n,Fragment as e}from"react/jsx-runtime";import{useState as a,useMemo as r,useEffect as o}from"react";import{formatTokenAmount as i}from"@privy-io/js-sdk-core";import{a as s,u as c,f as l,g as d}from"./
|
|
1
|
+
import{jsxs as t,jsx as n,Fragment as e}from"react/jsx-runtime";import{useState as a,useMemo as r,useEffect as o}from"react";import{formatTokenAmount as i}from"@privy-io/js-sdk-core";import{a as s,u as c,f as l,g as d}from"./privy-context-DjQaHYWB.mjs";import{u}from"./context-CTvHGnoI.mjs";import{u as m}from"./internal-context-Z-fyxadS.mjs";import{u as p}from"./useGetSolPrice-DwwjjGbd.mjs";import{ErrorScreenView as f}from"./ErrorScreen-CZY1qK53.mjs";import g from"@heroicons/react/24/outline/CheckCircleIcon";import{styled as h}from"styled-components";import{M as y,B as w,P as k}from"./ModalHeader-B3hf8Gf5.mjs";import{R as v}from"./Layouts-BlFm53ED.mjs";import{C as b}from"./ScreenHeader-CHmc4-Lu.mjs";import{a as A,R as I}from"./Row-C9vrS4Zi.mjs";import{L as S,V as j}from"./Value-tcJV9e0L.mjs";import{S as C,W as T}from"./WalletLink-CGkyFW_c.mjs";import{e as O}from"./StackedContainer-B2vaEl56.mjs";import{G as x}from"./useActiveWallet-jEsJB3LX.mjs";import{T as $,a as L}from"./TransactionErrorView-DwgBt1il.mjs";import{g as E}from"./transaction-CnfuREWo.mjs";import{pipe as _,getCompiledTransactionMessageDecoder as F,decompileTransactionMessage as P,setTransactionMessageLifetimeUsingBlockhash as B,compileTransaction as W,getTransactionEncoder as J,getBase58Decoder as M,fetchAddressesForLookupTables as R}from"@solana/kit";import{a as D,f as q,s as U,b as V,u as H}from"./useSolanaRpcClient-BpNT8e8E.mjs";import{D as z,T as G,a as K,S as Q,A as X,R as Y,J as N,g as Z}from"./getFormattedUsdFromLamports-B6EqSEho.mjs";import"@privy-io/are-addresses-equal";import"tinycolor2";import"ofetch";import"lucide-react";import"./index-ldG7uF5Z.mjs";import"uuid";import"jose";import"eventemitter3";import"./useWallets-DoJmA9i9.mjs";import"viem";import"./use-export-wallet-DQk47ipd.mjs";import"viem/utils";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"react-device-detect";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-MdJeWwyN.mjs";import"./events-context-CI0iqAXA.mjs";import"@scure/base";import"zustand";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./reservoir-0wfhnc0j.mjs";import"./ScreenLayout-C5tqY0au.mjs";import"./Screen-C-LEnZLL.mjs";import"./index-Dq_xe9dz.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"./LoadingSkeleton-U6-3yFwI.mjs";import"./ethers-D_pXdGwy.mjs";import"@heroicons/react/24/outline";import"./ErrorMessage-D8VaAP5m.mjs";import"./LabelXs-oqZNqbm_.mjs";import"./Subtitle-CV-2yKE4.mjs";import"./Title-BnzYV3Is.mjs";import"./Address-CPCEzwZf.mjs";import"./WalletInfoCard-9E_M4KpE.mjs";import"./shared-FM0rljBt.mjs";import"./Checkbox-BhNoOKjX.mjs";import"./ErrorBanner-CQERa7bL.mjs";import"@heroicons/react/24/outline/ExclamationCircleIcon";import"./WarningBanner-c8L53pJ2.mjs";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import"@heroicons/react/24/outline/ClipboardDocumentIcon";const tt=h.span`
|
|
2
2
|
&& {
|
|
3
3
|
width: 82px;
|
|
4
4
|
height: 82px;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useState as t,useEffect as r}from"react";import{a as o,m as i,C as a}from"./index-ldG7uF5Z.mjs";import{u as s,q as n}from"./context-CTvHGnoI.mjs";import{u as m,b as l,k as c}from"./internal-context-Z-fyxadS.mjs";import{u as d,a as u}from"./privy-context-DjQaHYWB.mjs";import{s as p}from"./shouldProceedtoEmbeddedWalletCreationFlow-B2ygR6ax.mjs";import{S as v}from"./ScreenLayout-C5tqY0au.mjs";import{T as y}from"./telegram-B-JqnkqZ.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-jEsJB3LX.mjs";import"zustand";import"styled-components";import"react-device-detect";import"./use-export-wallet-DQk47ipd.mjs";import"./useWallets-DoJmA9i9.mjs";import"viem";import"viem/utils";import"./events-context-CI0iqAXA.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-MdJeWwyN.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"@privy-io/are-addresses-equal";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"tinycolor2";import"./ModalHeader-B3hf8Gf5.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-C-LEnZLL.mjs";import"./index-Dq_xe9dz.mjs";const g=({success:t,errorMessage:r,onRetry:o})=>{let i=t?"Successfully connected with Telegram":r?r.message:"Verifying connection to Telegram";/*#__PURE__*/return e(v,{title:i,subtitle:t?"You're good to go!":r?r.detail:"Just a few moments more",icon:y,iconVariant:"loading",iconLoadingStatus:{success:t,fail:!!r},secondaryCta:r?.retryable&&o?{label:"Retry",onClick:o}:void 0,watermark:!0})},h={component:()=>{let{authenticated:v,logout:y,ready:h,user:f}=d(),{setModalData:A,navigate:b,resetNavigation:j,data:T}=u(),S=s(),{initLoginWithTelegram:C,loginWithTelegram:w,updateWallets:E,setReadyToTrue:R,closePrivyModal:W,createAnalyticsEvent:_,getAuthMeta:x}=m(),[k,L]=t(!1),[M,I]=t(void 0),U=o();async function D(){try{let e=await async function(){let e;if(!v){if(U.enabled&&"error"===U.status)throw new a(U.error,null,l.CAPTCHA_FAILURE);return U.enabled&&"success"!==U.status&&(U.execute(),e=await U.waitForResult()),e}}();await w({captchaToken:e}),L(!0),R(!0)}catch(e){if(e?.privyErrorCode===l.ALLOWLIST_REJECTED)return I(void 0),j(),void b("AllowlistRejectionScreen");if(e?.privyErrorCode===l.USER_LIMIT_REACHED)return console.error(new c(e).toString()),I(void 0),j(),void b("UserLimitReachedScreen");if(e?.privyErrorCode===l.USER_DOES_NOT_EXIST)return I(void 0),j(),void b("AccountNotFoundScreen");if(e?.privyErrorCode===l.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce)return I(void 0),j(),A({accountTransfer:{nonce:e.data?.data?.nonce,account:e.data?.data?.subject,telegramAuthResult:x()?.telegramAuthResult,telegramWebAppData:x()?.telegramWebAppData,displayName:e.data?.data?.account?.displayName,linkMethod:"telegram",embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress}}),void b("LinkConflictScreen");let{retryable:t,detail:r}=i(e);I({retryable:t,detail:r,message:"Authentication failed"})}}r((()=>{D()}),[]),r((()=>{if(!(h&&v&&k&&f))return;if(S?.legal.requireUsersAcceptTerms&&!f.hasAcceptedTerms){let e=setTimeout((()=>{b("AffirmativeConsentScreen")}),n);return()=>clearTimeout(e)}if(p(f,S.embeddedWallets)){let e=setTimeout((()=>{A({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),_({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,provider:"telegram",screen:"TelegramAuthScreen"}}),y()},callAuthOnSuccessOnClose:!0}}),b("EmbeddedWalletOnAccountCreateScreen")}),n);return()=>clearTimeout(e)}E();let e=setTimeout((()=>W({shouldCallAuthOnSuccess:!0,isSuccess:!0})),n);return()=>clearTimeout(e)}),[h,v,k,f]);/*#__PURE__*/return e(g,{success:k,errorMessage:M,onRetry:M?.retryable?async()=>{try{I(void 0),T?.telegramAuthModalData?.seamlessAuth||await C(void 0,T?.login?.disableSignup),await D()}catch(e){let{retryable:t,detail:r}=i(e);I({retryable:t,detail:r,message:"Authentication failed"})}}:void 0})},isCaptchaRequired:!0,isShownBeforeReady:!0};export{h as TelegramAuthScreen,g as TelegramAuthScreenView,h as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as e,jsx as i,Fragment as t}from"react/jsx-runtime";import{styled as n}from"styled-components";import{P as r,H as l,W as o}from"./WalletLink-
|
|
1
|
+
import{jsxs as e,jsx as i,Fragment as t}from"react/jsx-runtime";import{styled as n}from"styled-components";import{P as r,H as l,W as o}from"./WalletLink-CGkyFW_c.mjs";import{g as d}from"./ethers-D_pXdGwy.mjs";import{F as a}from"./Layouts-BlFm53ED.mjs";import c from"@heroicons/react/24/outline/ChevronDownIcon";import{createContext as s,useState as h,useContext as p}from"react";import{s as v,u}from"./context-CTvHGnoI.mjs";const g=({label:t,children:n,valueStyles:r})=>/*#__PURE__*/e(f,{children:[/*#__PURE__*/i("div",{children:t}),/*#__PURE__*/i(x,{style:{...r},children:n})]});let f=n.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: space-between;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as e,jsxs as r,Fragment as n}from"react/jsx-runtime";import{BoltIcon as i,ArrowRightIcon as o,ChevronDownIcon as t}from"@heroicons/react/24/outline";import{useState as l}from"react";import{styled as a}from"styled-components";import{formatTokenAmount as s}from"@privy-io/js-sdk-core";import{M as c,P as d,E as h,B as m,b as u}from"./ModalHeader-
|
|
1
|
+
import{jsx as e,jsxs as r,Fragment as n}from"react/jsx-runtime";import{BoltIcon as i,ArrowRightIcon as o,ChevronDownIcon as t}from"@heroicons/react/24/outline";import{useState as l}from"react";import{styled as a}from"styled-components";import{formatTokenAmount as s}from"@privy-io/js-sdk-core";import{M as c,P as d,E as h,B as m,b as u}from"./ModalHeader-B3hf8Gf5.mjs";import{L as p,V as g,a as f}from"./Value-tcJV9e0L.mjs";import{a as y,R as x}from"./Row-C9vrS4Zi.mjs";import{E as k}from"./ErrorMessage-D8VaAP5m.mjs";import{L as v}from"./LabelXs-oqZNqbm_.mjs";import{S as b}from"./Subtitle-CV-2yKE4.mjs";import{T as w}from"./Title-BnzYV3Is.mjs";import{A as T}from"./Address-CPCEzwZf.mjs";import{W as I}from"./WalletInfoCard-9E_M4KpE.mjs";import{u as A}from"./context-CTvHGnoI.mjs";import{G as S}from"./useActiveWallet-jEsJB3LX.mjs";import{L as C}from"./LoadingSkeleton-U6-3yFwI.mjs";import{isAddress as $}from"viem";import{B as j}from"./shared-FM0rljBt.mjs";import{C as M}from"./Checkbox-BhNoOKjX.mjs";import{E}from"./ErrorBanner-CQERa7bL.mjs";import{W as O}from"./WarningBanner-c8L53pJ2.mjs";import D from"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import N from"@heroicons/react/24/outline/ClipboardDocumentIcon";import F from"@heroicons/react/24/outline/ExclamationCircleIcon";import{u as L}from"./internal-context-Z-fyxadS.mjs";const P=a(p)`
|
|
2
2
|
cursor: pointer;
|
|
3
3
|
display: inline-flex;
|
|
4
4
|
gap: 8px;
|
package/dist/esm/{TransferFromWalletScreen-ad5b7GV7.mjs → TransferFromWalletScreen-DsqvsKwk.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as e,jsx as n,Fragment as t}from"react/jsx-runtime";import{useState as l,useEffect as a}from"react";import{M as o,B as i}from"./ModalHeader-
|
|
1
|
+
import{jsxs as e,jsx as n,Fragment as t}from"react/jsx-runtime";import{useState as l,useEffect as a}from"react";import{M as o,B as i}from"./ModalHeader-B3hf8Gf5.mjs";import{C as r}from"./ScreenHeader-CHmc4-Lu.mjs";import{t as c}from"./FundWalletMethodHeader-BZ3UxTwI.mjs";import{C as s}from"./Chip-D2-wZOHJ.mjs";import{S as p}from"./Subtitle-CV-2yKE4.mjs";import{u as d}from"./context-CTvHGnoI.mjs";import{r as m,z as y,e as u,A as h,j as w,Q as f}from"./useActiveWallet-jEsJB3LX.mjs";import{u as T}from"./internal-context-Z-fyxadS.mjs";import{a as C}from"./privy-context-DjQaHYWB.mjs";import{u as g}from"./useWallets-DoJmA9i9.mjs";import{W as v}from"./WalletOverflowButton-BDgrWJ32.mjs";import{A as _,D as j,E as x}from"./index-ldG7uF5Z.mjs";import{isMobile as S}from"react-device-detect";import{styled as W}from"styled-components";import{I as b}from"./InjectedWalletIcon-DLcYOGDj.mjs";import{y as $}from"./use-export-wallet-DQk47ipd.mjs";import{I as k}from"./styles-DNw1LY6I.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"./LoadingSkeleton-U6-3yFwI.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"zustand";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"ofetch";import"@privy-io/are-addresses-equal";import"lucide-react";import"uuid";import"jose";import"eventemitter3";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-MdJeWwyN.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"@heroicons/react/24/outline/WalletIcon";import"./LinkPasskeyScreen-DHCCysKA.mjs";import"./TodoList-CgrU7uwu.mjs";import"./ScreenLayout-C5tqY0au.mjs";import"./Screen-C-LEnZLL.mjs";import"./index-Dq_xe9dz.mjs";const O=({provider:t,displayName:l,logo:a,connectOnly:o,connector:i})=>{let r,{navigate:c,setModalData:s}=C(),{connectWallet:p}=T(),d=m(),h=y(t),w="wallet_connect_v2"===i.connectorType?t:i.walletClientType,f=window.matchMedia("(display-mode: standalone)").matches,g=u({connectorType:i.connectorType,walletClientType:w});r=g&&g.chainTypes.includes(i.chainType)?()=>{g.isInstalled||"solana"===i.chainType&&"isInstalled"in i&&i.isInstalled?(p(i,w),c(o?"ConnectOnlyStatusScreen":"ConnectionStatusScreen")):S?(s({installWalletModalData:{walletConfig:g,chainType:i.chainType,connectOnly:o}}),c("WalletInterstitialScreen")):(s({installWalletModalData:{walletConfig:g,chainType:i.chainType,connectOnly:o}}),c("InstallWalletScreen"))}:"coinbase_wallet"!==i.connectorType||"eoaOnly"!==i.coinbaseWalletConfig.preference?.options||!S||f||$()?()=>{(!_(window.navigator.userAgent)||event?.isTrusted)&&(p(i,w),o?"wallet_connect_v2"===i.connectorType?(s((e=>({...e,externalConnectWallet:{...e?.externalConnectWallet,preSelectedWalletId:"wallet_connect_qr"}}))),c("ConnectOnlyLandingScreen")):c("ConnectOnlyStatusScreen"):c("ConnectionStatusScreen"))}:()=>{window.location.href=`https://go.cb-w.com/dapp?cb_url=${encodeURI(window.location.href)}`};let v=l||h?.metadata?.shortName||h?.name||i.walletClientType;/*#__PURE__*/return e(D,{onClick:r,children:[/*#__PURE__*/n(b,{icon:a||h?.image_url?.md,name:v}),/*#__PURE__*/n("span",{children:v}),/*#__PURE__*/e(M,{id:"chip-container",children:[d?.walletClientType===w&&d?.chainType===i.chainType?/*#__PURE__*/n(I,{color:"gray",children:"Recent"}):/*#__PURE__*/n("span",{id:"connect-text",children:"Connect"}),"solana"===i.chainType&&/*#__PURE__*/n(I,{color:"gray",children:"Solana"})]})]})};let D=W(h)`
|
|
2
2
|
/* Wallet name text color */
|
|
3
3
|
> span {
|
|
4
4
|
color: var(--privy-color-foreground);
|
|
@@ -28,4 +28,4 @@ import{jsxs as e,jsx as n,Fragment as t}from"react/jsx-runtime";import{useState
|
|
|
28
28
|
flex-wrap: wrap;
|
|
29
29
|
gap: 8px;
|
|
30
30
|
margin-left: auto;
|
|
31
|
-
`;const E=["coinbase_wallet","base_account"];let F=["metamask","okx_wallet","rainbow","uniswap","bybit_wallet","ronin_wallet","haha_wallet","uniswap_extension","zerion","rabby_wallet","cryptocom","binance","kraken_wallet"];const A=["safe"],B=["phantom","backpack","solflare","jupiter","universal_profile"],L={component:()=>{let s,{connectors:m}=T(),{setModalData:y,data:u,navigate:h}=
|
|
31
|
+
`;const E=["coinbase_wallet","base_account"];let F=["metamask","okx_wallet","rainbow","uniswap","bybit_wallet","ronin_wallet","haha_wallet","uniswap_extension","zerion","rabby_wallet","cryptocom","binance","kraken_wallet"];const A=["safe"],B=["phantom","backpack","solflare","jupiter","universal_profile"],L={component:()=>{let s,{connectors:m}=T(),{setModalData:y,data:u,navigate:h}=C(),_=d(),{wallets:S}=g(),W=m.filter(w).flatMap((e=>e.wallets)),[b,$]=l("default"),k="solana"===u?.funding?.chainType,D=!!u?.funding?.crossChainBridgingEnabled;s="ethereum"===u?.funding?.chainType?u.funding.erc20Address&&!u.funding.isUSDC?"ethereum-only":D&&!u.funding.chain.testnet?"ethereum-and-solana":"ethereum-only":D&&!u.funding?.isUSDC?"ethereum-and-solana":"solana-only";let I=S.filter((e=>"privy"!==e.walletClientType)),M=I.map((e=>e.walletClientType)),L=W.filter((e=>"privy"!==e.walletClientType)),P=L.map((e=>e.walletClientType)),z=[],H={...u.funding};H.usingDefaultFundingMethod&&(H.usingDefaultFundingMethod=!1);let R=({wallet:e,walletChainType:n})=>{y({...u,funding:{...H,connectedWallet:e,onContinueWithExternalWallet:()=>h(q({destChainType:k?"solana":"ethereum",sourceChainType:n}))},solanaFundingData:u?.solanaFundingData?{...u.solanaFundingData,sourceWalletData:{address:e.address,walletClientType:e.walletClientType}}:void 0}),h("FundingAmountEditScreen")};"solana-only"!==s&&z.push(...I.map(((e,t)=>/*#__PURE__*/n(N,{onClick:()=>R({wallet:e,walletChainType:"ethereum"}),icon:e.meta.icon,name:e.meta.name,chainType:e.type},t)))),"ethereum-only"!==s&&z.push(...L.map(((e,t)=>/*#__PURE__*/n(N,{onClick:()=>R({wallet:e,walletChainType:"solana"}),icon:e.meta.icon,name:e.meta.name,chainType:e.type},t)))),z.push(...(({walletList:e,walletChainType:t,connectors:l,connectOnly:a,ignore:o,walletConnectEnabled:i,forceWallet:r})=>{let c=[],s=[],p=[],d=l.filter((e=>"ethereum-only"===t?"ethereum"===e.chainType:"solana-only"!==t||"solana"===e.chainType)),m=d.find((e=>"wallet_connect_v2"===e.connectorType));for(let[l,y]of(r?[r.wallet]:e).entries()){if("detected_ethereum_wallets"===y)for(let[e,t]of d.filter((({chainType:e,connectorType:n,walletClientType:t})=>"solana"!==e&&("uniswap_wallet_extension"===t||"uniswap_extension"===t?!o.includes("uniswap"):"crypto.com_wallet_extension"===t||"crypto.com_onchain"===t?!o.includes("cryptocom"):"injected"===n&&!o.includes(t)))).entries()){let{walletClientType:o,walletBranding:i,chainType:r}=t;("unknown"===o?s:c).push(/*#__PURE__*/n(O,{connectOnly:a,provider:o,logo:i.icon,displayName:i.name,connector:t},`${l}-${y}-${o}-${r}-${e}`))}if("detected_solana_wallets"===y)for(let[e,i]of d.filter((({chainType:e,walletClientType:n})=>{if("solana"===e)return"ethereum-only"!==t&&!o.includes(n)})).entries()){let{walletClientType:t,walletBranding:o,chainType:r}=i;("unknown"===t?s:c).push(/*#__PURE__*/n(O,{connectOnly:a,provider:t,logo:o.icon,displayName:o.name,connector:i},`${l}-${y}-${t}-${r}-${e}`))}if(B.includes(y)){let e=d.find((e=>"injected"===e.connectorType&&e.walletClientType===y||e.connectorType===y));if(e&&c.push(/*#__PURE__*/n(O,{connectOnly:a,provider:y,connector:e},`${l}-${y}`)),"solana-only"===t||"ethereum-and-solana"===t){let e=d.find((({chainType:e,walletClientType:n})=>"solana"===e&&n===y));e&&c.push(/*#__PURE__*/n(O,{connectOnly:a,provider:y,connector:e},`${y}-solana`))}}else if(F.includes(y)){let e=d.find((e=>"uniswap"===y?"uniswap_wallet_extension"===e.walletClientType||"uniswap_extension"===e.walletClientType:"cryptocom"===y?"crypto.com_wallet_extension"===e.walletClientType||"crypto.com_onchain"===e.walletClientType:"injected"===e.connectorType&&e.walletClientType===y));if(i&&!e&&(e=m),e&&c.push(/*#__PURE__*/n(O,{connectOnly:a,provider:y,connector:e,logo:"injected"===e.connectorType?e.walletBranding.icon:void 0,displayName:"injected"===e.connectorType?e.walletBranding.name:void 0},`${l}-${y}`)),"solana-only"===t||"ethereum-and-solana"===t){let e=d.find((({chainType:e,walletClientType:n})=>"solana"===e&&n===y));e&&c.push(/*#__PURE__*/n(O,{connectOnly:a,provider:y,connector:e},`${y}-solana`))}}else if(E.includes(y)){let e=d.find((({connectorType:e})=>e===y));e&&c.push(/*#__PURE__*/n(O,{connectOnly:a,provider:y,connector:e,displayName:"coinbase_wallet"===e.walletClientType?"Coinbase":"Base",logo:"coinbase_wallet"===e.walletClientType?j:x},`${l}-${y}`))}else if(A.includes(y))m&&p.push(/*#__PURE__*/n(O,{connectOnly:a,provider:y,connector:m},`${l}-${y}`));else if("wallet_connect"===y)m&&p.push(/*#__PURE__*/n(O,{connectOnly:a,provider:y,connector:m,logo:m.walletBranding.icon,displayName:"WalletConnect"},`${l}-${y}`));else if(y===r?.wallet){let t="ethereum"===r.chainType&&e.includes("detected_ethereum_wallets"),o="solana"===r.chainType&&e.includes("detected_solana_wallets");if(t||o){let e=d.find((({walletClientType:e})=>e===y));e&&c.push(/*#__PURE__*/n(O,{connectOnly:a,provider:y,displayName:e.walletBranding?.name,logo:e.walletBranding?.icon,connector:e},`${l}-${y}`))}}}return[...s,...c,...p]})({walletList:_.appearance.walletList.filter((e=>!I.some((n=>n.walletClientType===e))&&!L.some((n=>n.walletClientType===e)))),walletChainType:s,connectors:m,connectOnly:!0,ignore:[..._.appearance.walletList,...M,...P],walletConnectEnabled:_.externalWallets.walletConnect.enabled}));let U=/*#__PURE__*/n(v,{text:"More wallets",onClick:()=>$("overflow")}),q=({sourceChainType:e,destChainType:n})=>"ethereum"===e&&"solana"===n?"AwaitingEvmToSolBridgingScreen":"ethereum"===e&&"ethereum"===n?"AwaitingExternalEthereumTransferScreen":"solana"===e&&"ethereum"===n?"AwaitingSolToEvmBridgingScreen":H.externalSolanaFundingScreen;return a((()=>{y({...u,externalConnectWallet:{onCompleteNavigateTo:({address:e,walletClientType:n,walletChainType:t})=>{let l=t??"ethereum",a="ethereum"===l?I.find((t=>t.address===e&&t.walletClientType===n)):L.find((t=>t.address===e&&t.walletClientType===n));return y({...u,funding:{...H,connectedWallet:a,onContinueWithExternalWallet:()=>{h(q({destChainType:k?"solana":"ethereum",sourceChainType:l}))}},solanaFundingData:u?.solanaFundingData?{...u.solanaFundingData,sourceWalletData:{address:e||"",walletClientType:n||""}}:void 0}),"FundingAmountEditScreen"}}})}),[]),/*#__PURE__*/e(t,"overflow"===b?{children:[/*#__PURE__*/n(o,{backFn:()=>$("default")},"header"),/*#__PURE__*/e(f,{children:[/*#__PURE__*/n(p,{style:{color:"var(--privy-color-foreground-3)",textAlign:"left"},children:"More wallets"}),z]}),/*#__PURE__*/n(i,{})]}:{children:[/*#__PURE__*/n(c,{}),/*#__PURE__*/n(r,{title:"Transfer from wallet",description:"Connect a wallet to deposit funds or send funds manually to your wallet address."}),/*#__PURE__*/e(f,{children:[z.length>4?z.slice(0,3):z,z.length>4&&U]}),/*#__PURE__*/n(i,{})]})}};let N=({onClick:t,icon:l,name:a,chainType:o})=>/*#__PURE__*/e(h,{onClick:t,children:[/*#__PURE__*/n(k,{style:{width:20},children:/*#__PURE__*/n("img",{src:l})}),a,/*#__PURE__*/n(s,{color:"gray",style:{marginLeft:"auto"},children:"Connected"}),"solana"===o&&/*#__PURE__*/n(s,{color:"gray",children:"Solana"})]});export{L as TransferFromWalletScreen,L as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as e,Fragment as r,jsx as i}from"react/jsx-runtime";import{styled as t}from"styled-components";import{d as o}from"./Layouts-BlFm53ED.mjs";import{B as n}from"./ModalHeader-
|
|
1
|
+
import{jsxs as e,Fragment as r,jsx as i}from"react/jsx-runtime";import{styled as t}from"styled-components";import{d as o}from"./Layouts-BlFm53ED.mjs";import{B as n}from"./ModalHeader-B3hf8Gf5.mjs";import{C as m}from"./ScreenHeader-CHmc4-Lu.mjs";import{t as s}from"./FundWalletMethodHeader-BZ3UxTwI.mjs";import{I as a}from"./InjectedWalletIcon-DLcYOGDj.mjs";import{N as d}from"./index-Dq_xe9dz.mjs";import{a as l,R as c}from"./Row-C9vrS4Zi.mjs";import{L as h,V as p}from"./Value-tcJV9e0L.mjs";import{A as f}from"./Address-CPCEzwZf.mjs";import{N as g}from"./NetworkIcon-B48ilzF8.mjs";import{z as j}from"./useActiveWallet-jEsJB3LX.mjs";const I=({walletClientType:t,displayName:I,addressToFund:w,chainId:y,chainName:x,isBridging:N,isErc20Flow:T,totalPriceInNativeCurrency:C,totalPriceInUsd:v,gasPriceInNativeCurrency:B,gasPriceInUsd:F})=>{let P=j(t);/*#__PURE__*/return e(r,{children:[/*#__PURE__*/i(s,{}),/*#__PURE__*/i(d,{centerIcon:/*#__PURE__*/i(a,{icon:P?.image_url?.md,name:t})}),/*#__PURE__*/i(m,{style:{marginTop:"8px",marginBottom:"12px"},title:`${N?"Bridging":"Confirming"} with ${I}`}),!N&&!T&&/*#__PURE__*/e(l,{children:[/*#__PURE__*/e(c,{children:[/*#__PURE__*/i(h,{children:"Total"}),/*#__PURE__*/i(p,{children:v||C})]}),/*#__PURE__*/e(c,{children:[/*#__PURE__*/i(h,{children:"To"}),/*#__PURE__*/i(p,{children:/*#__PURE__*/i(f,{address:w,showCopyIcon:!1})})]}),/*#__PURE__*/e(c,{children:[/*#__PURE__*/i(h,{children:"Network"}),/*#__PURE__*/i(p,{children:/*#__PURE__*/e(u,{children:[/*#__PURE__*/i(g,{chainId:y,height:16,width:16})," ",x]})})]}),B&&/*#__PURE__*/e(c,{children:[/*#__PURE__*/i(h,{children:"Estimated fee"}),/*#__PURE__*/i(p,{children:F||B})]})]}),/*#__PURE__*/i(o,{height:24}),/*#__PURE__*/i(n,{})]})};let u=t.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: row;
|
|
4
4
|
align-items: center;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsxs as e,Fragment as r,jsx as t}from"react/jsx-runtime";import i from"@heroicons/react/24/outline/EnvelopeIcon";import{B as o}from"./Layouts-BlFm53ED.mjs";import{Mail as a}from"lucide-react";import{forwardRef as s,useState as m}from"react";import{u as n}from"./context-CTvHGnoI.mjs";import{a as l}from"./index-ldG7uF5Z.mjs";import{u as c}from"./internal-context-Z-fyxadS.mjs";import{u as d,a as p}from"./privy-context-DjQaHYWB.mjs";import{C as u}from"./useActiveWallet-jEsJB3LX.mjs";import{B as h}from"./use-export-wallet-DQk47ipd.mjs";import{E as v,P as f}from"./ModalHeader-B3hf8Gf5.mjs";import{I as j,E as y}from"./EmailInputForm-Dgoii4vf.mjs";import{E as g}from"./ErrorMessage-D8VaAP5m.mjs";import{S as w}from"./ScreenLayout-C5tqY0au.mjs";import"styled-components";import"@privy-io/js-sdk-core";import"tinycolor2";import"uuid";import"jose";import"eventemitter3";import"./useWallets-DoJmA9i9.mjs";import"viem";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"react-device-detect";import"viem/utils";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-MdJeWwyN.mjs";import"./events-context-CI0iqAXA.mjs";import"@scure/base";import"zustand";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"@privy-io/are-addresses-equal";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-C-LEnZLL.mjs";import"./index-Dq_xe9dz.mjs";const k=/*#__PURE__*/s(((i,o)=>{let[s,j]=m(""),[y,w]=m(""),[k,S]=m(!1),{authenticated:x,user:C}=d(),{initUpdateEmail:A}=c(),{navigate:I,setModalData:P,currentScreen:M}=p(),{enabled:T,token:U}=l(),q=n(),L=h(s)&&(q.disablePlusEmails&&s.includes("+")?(y||w("Please enter a valid email address without a '+'."),!1):(y&&w(""),!0)),W=k||!L,D=()=>{!T||U||x?(async e=>{if(!C?.email)throw Error("User is required to have an email address to update it.");S(!0);try{await A({oldAddress:C.email.address,newAddress:s,captchaToken:e}),I("AwaitingPasswordlessCodeScreen")}catch(e){P({errorModalData:{error:e,previousScreen:M||"LandingScreen"}}),I("ErrorScreen")}S(!1)})(U):(P({captchaModalData:{callback:e=>{if(!C?.email)throw Error("User is required to have an email address to update it.");return A({oldAddress:C.email.address,newAddress:s,captchaToken:e})},userIntentRequired:!1,onSuccessNavigateTo:"AwaitingPasswordlessCodeScreen",onErrorNavigateTo:"ErrorScreen"}}),I("CaptchaScreen"))};/*#__PURE__*/return e(r,{children:[/*#__PURE__*/e(E,{children:[y&&/*#__PURE__*/t(g,{style:{marginTop:"0.25rem",textAlign:"left"},children:y}),/*#__PURE__*/e(b,{$error:!!y,children:[/*#__PURE__*/t(u,{children:/*#__PURE__*/t(a,{})}),/*#__PURE__*/t("input",{ref:o,id:"email-input",type:"email",placeholder:"your@email.com",onChange:e=>j(e.target.value),onKeyUp:e=>{"Enter"===e.key&&D()},value:s,autoComplete:"email"}),i.stacked?null:/*#__PURE__*/t(v,{isSubmitting:k,onClick:D,disabled:W,children:"Submit"})]})]}),i.stacked?/*#__PURE__*/t(f,{loadingText:null,loading:k,disabled:W,onClick:D,style:{width:"100%"},children:"Submit"}):null]})}));let E=j,b=y;const S=({title:e="Update your email",subtitle:r="Add the email address you'd like to use going forward. We'll send you a confirmation code"})=>/*#__PURE__*/t(w,{title:e,subtitle:r,icon:i,watermark:!0,children:/*#__PURE__*/t(o,{children:/*#__PURE__*/t(k,{stacked:!0})})}),x={component:()=>/*#__PURE__*/t(S,{})};export{x as UpdateEmailScreen,S as UpdateEmailScreenView,x as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/PhoneIcon";import{useState as o}from"react";import{C as r}from"./ConnectPhoneForm-tJp8qUlN.mjs";import{u as i}from"./internal-context-Z-fyxadS.mjs";import{a as n,u as m}from"./privy-context-DjQaHYWB.mjs";import{S as a}from"./ScreenLayout-C5tqY0au.mjs";import"styled-components";import"@privy-io/js-sdk-core";import"./context-CTvHGnoI.mjs";import"tinycolor2";import"./useActiveWallet-jEsJB3LX.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-DQk47ipd.mjs";import"./useWallets-DoJmA9i9.mjs";import"viem";import"eventemitter3";import"viem/utils";import"./events-context-CI0iqAXA.mjs";import"./ModalHeader-B3hf8Gf5.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Chip-D2-wZOHJ.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"ofetch";import"@privy-io/are-addresses-equal";import"./Screen-C-LEnZLL.mjs";import"./index-Dq_xe9dz.mjs";const s=({title:i="Update your phone number",subtitle:n="Add the phone number you'd like to use going forward. We'll send you a confirmation code",onSubmit:m,isSubmitting:s=!1})=>{let[c,p]=o(null);/*#__PURE__*/return e(a,{title:i,subtitle:n,icon:t,primaryCta:{label:s?"Submitting":"Update",onClick:async()=>{c?.qualifiedPhoneNumber&&await m(c)},disabled:!c?.isValid||s},watermark:!0,children:/*#__PURE__*/e(r,{onChange:e=>{p(e)},onSubmit:async()=>{},noIncludeSubmitButton:!0,hideRecent:!0})})},c={component:()=>{let{currentScreen:t,data:r,navigate:a,setModalData:c}=n(),{user:p}=m(),{initUpdatePhone:u}=i(),[l,d]=o(!1);/*#__PURE__*/return e(s,{onSubmit:async e=>{d(!0);try{if(!p?.phone?.number)throw Error("User is required to have an phone number to update it.");await u(p?.phone?.number,e.qualifiedPhoneNumber),a("AwaitingPasswordlessCodeScreen")}catch(e){c({errorModalData:{error:e,previousScreen:r?.errorModalData?.previousScreen||t||"LinkPhoneScreen"}}),a("ErrorScreen")}finally{d(!1)}},isSubmitting:l})}};export{c as UpdatePhoneScreen,s as UpdatePhoneScreenView,c as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{a as e}from"./privy-context-DjQaHYWB.mjs";import{S as o}from"./ScreenLayout-C5tqY0au.mjs";import"@privy-io/are-addresses-equal";import"react";import"./context-CTvHGnoI.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"./ModalHeader-B3hf8Gf5.mjs";import"styled-components";import"./useActiveWallet-jEsJB3LX.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-DQk47ipd.mjs";import"./useWallets-DoJmA9i9.mjs";import"viem";import"eventemitter3";import"viem/utils";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-C-LEnZLL.mjs";import"./index-Dq_xe9dz.mjs";const r=({style:e,...o})=>/*#__PURE__*/t("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"38px",width:"38px",...e},...o,children:/*#__PURE__*/t("path",{d:"M20 13.6V20M20 26.4H20.016M36 20C36 28.8365 28.8366 36 20 36C11.1635 36 4.00001 28.8365 4.00001 20C4.00001 11.1634 11.1635 3.99999 20 3.99999C28.8366 3.99999 36 11.1634 36 20Z",stroke:"currentColor",strokeWidth:"3.2",strokeLinecap:"round",strokeLinejoin:"round"})}),i=({title:e="Unable to sign in",subtitle:i="This is a test application that has reached its user limit. To allow more users, this app needs to be upgraded to production.",onGoBack:n})=>/*#__PURE__*/t(o,{title:e,subtitle:i,icon:r,iconVariant:"subtle",primaryCta:{label:"Go back",onClick:n},showBack:!0,onBack:n,watermark:!0}),n={component:()=>{let{navigate:o}=e();/*#__PURE__*/return t(i,{onGoBack:()=>{o("LandingScreen")}})}};export{n as UserLimitReachedScreen,i as UserLimitReachedScreenView,n as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as e,jsx as r,Fragment as o}from"react/jsx-runtime";import{Check as i,Copy as t}from"lucide-react";import{useState as s,useEffect as a}from"react";import{styled as n}from"styled-components";import{S as m}from"./ModalHeader-
|
|
1
|
+
import{jsxs as e,jsx as r,Fragment as o}from"react/jsx-runtime";import{Check as i,Copy as t}from"lucide-react";import{useState as s,useEffect as a}from"react";import{styled as n}from"styled-components";import{S as m}from"./ModalHeader-B3hf8Gf5.mjs";import{E as l}from"./ErrorMessage-D8VaAP5m.mjs";import{L as d}from"./LabelXs-oqZNqbm_.mjs";import{A as c}from"./Address-CPCEzwZf.mjs";import{B as p}from"./shared-FM0rljBt.mjs";let h=n(p)`
|
|
2
2
|
&& {
|
|
3
3
|
padding: 0.75rem;
|
|
4
4
|
height: 56px;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{useState as e}from"react";import{u as o,a as i}from"./privy-context-DjQaHYWB.mjs";import{S as r}from"./ScreenLayout-C5tqY0au.mjs";import"@privy-io/are-addresses-equal";import"./context-CTvHGnoI.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"./ModalHeader-B3hf8Gf5.mjs";import"styled-components";import"./useActiveWallet-jEsJB3LX.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-DQk47ipd.mjs";import"./useWallets-DoJmA9i9.mjs";import"viem";import"eventemitter3";import"viem/utils";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-C-LEnZLL.mjs";import"./index-Dq_xe9dz.mjs";const n=({title:e,subtitle:o,buttonText:i,buttonHref:n,isLoading:l=!1,helpText:a,onButtonClick:s})=>/*#__PURE__*/t(r,{title:e,subtitle:o,primaryCta:{label:i,onClick:()=>{n&&window.open(n,"_self"),s?.()},disabled:l},helpText:a,watermark:!0}),l={component:()=>{let{ready:r}=o(),{data:l}=i(),[a,s]=e(!1);if(!l?.installWalletModalData)throw Error("Wallet data is missing");let{walletConfig:m,connectOnly:c,chainType:p}=l.installWalletModalData,u=m.getMobileRedirect({useUniversalLink:!a,isSolana:"solana"===p,connectOnly:c}),d=m.name.replace(/ wallet/gi,""),h={title:`Redirecting to ${d} Mobile Wallet`,description:`We'll take you to the ${d} Mobile Wallet app to continue your login experience.`,footnote:""};return r&&(h.description=`For the best experience, we'll automatically log you into the ${d} Mobile Wallet in-app browser.`,h.footnote="You can always return here to login via other methods."),a&&(h.title="Still here?",h.description=`You may need to install the ${m.name} mobile app.`,h.footnote=`Once you're done, you can connect with ${m.name} wallet to complete the login.`),/*#__PURE__*/t(n,{title:h.title,subtitle:h.description,buttonText:a?"Go to App Store":"Continue",buttonHref:u,isLoading:r&&!u,helpText:h.footnote||void 0,onButtonClick:()=>{setTimeout((()=>s(!0)),1e3)}})}};export{l as WalletInterstitialScreen,n as WalletInterstitialScreenView,l as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import{styled as n}from"styled-components";import{formatUnits as i}from"viem";import{s as o,a as s,g as a,b as l}from"./ethers-
|
|
1
|
+
import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import{styled as n}from"styled-components";import{formatUnits as i}from"viem";import{s as o,a as s,g as a,b as l}from"./ethers-D_pXdGwy.mjs";import{g as c}from"./getFormattedUsdFromLamports-B6EqSEho.mjs";import{g as m}from"./transaction-CnfuREWo.mjs";import{v as d}from"./use-export-wallet-DQk47ipd.mjs";const p=({weiQuantities:t,tokenPrice:r,tokenSymbol:n})=>{let i=o(t),l=r?s(i,r):void 0,c=a(i,n);/*#__PURE__*/return e(u,{children:l||c})},h=({weiQuantities:n,tokenPrice:i,tokenSymbol:l})=>{let c=o(n),m=i?s(c,i):void 0,d=a(c,l);/*#__PURE__*/return e(u,{children:m?/*#__PURE__*/r(t,{children:[/*#__PURE__*/e(x,{children:"USD"}),"<$0.01"===m?
|
|
2
2
|
/*#__PURE__*/r(S,{children:[/*#__PURE__*/e(g,{children:"<"}),"$0.01"]}):m]}):d})},f=({quantities:n,tokenPrice:o,tokenSymbol:s="SOL",tokenDecimals:a=9})=>{let l=n.reduce(((e,t)=>e+t),0n),d=o&&"SOL"===s&&9===a?c(l,o):void 0,p="SOL"===s&&9===a?m(l):`${i(l,a)} ${s}`;/*#__PURE__*/return e(u,{children:d?/*#__PURE__*/e(t,{children:"<$0.01"===d?
|
|
3
3
|
/*#__PURE__*/r(S,{children:[/*#__PURE__*/e(g,{children:"<"}),"$0.01"]}):d}):p})};let u=n.span`
|
|
4
4
|
font-size: 14px;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as r,jsx as e}from"react/jsx-runtime";import{Wallet as t}from"lucide-react";import{A as i,C as c,G as o}from"./useActiveWallet-
|
|
1
|
+
import{jsxs as r,jsx as e}from"react/jsx-runtime";import{Wallet as t}from"lucide-react";import{A as i,C as c,G as o}from"./useActiveWallet-jEsJB3LX.mjs";const l=({onClick:l,text:m})=>/*#__PURE__*/r(i,{onClick:l,children:[/*#__PURE__*/e(c,{children:/*#__PURE__*/e(t,{})}),/*#__PURE__*/e(o,{children:m})]});export{l as W};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createAbstractClient as e}from"@abstract-foundation/agw-client";import{getBatchTransactionObject as a}from"@abstract-foundation/agw-client/actions";import{hexToNumber as n,createWalletClient as t,custom as r,http as s}from"viem";import{toAccount as i}from"viem/accounts";import{abstractTestnet as o,zksync as c}from"viem/chains";import{u as d,a as l,c as p,b as m}from"./
|
|
1
|
+
import{createAbstractClient as e}from"@abstract-foundation/agw-client";import{getBatchTransactionObject as a}from"@abstract-foundation/agw-client/actions";import{hexToNumber as n,createWalletClient as t,custom as r,http as s}from"viem";import{toAccount as i}from"viem/accounts";import{abstractTestnet as o,zksync as c}from"viem/chains";import{u as d,a as l,c as p,b as m}from"./privy-context-DjQaHYWB.mjs";import{u}from"./context-CTvHGnoI.mjs";import{u as y}from"./internal-context-Z-fyxadS.mjs";import{u as g,g as f,b as h}from"./useWallets-DoJmA9i9.mjs";import{g as v}from"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import{c as I}from"./smart-wallets-Y6_E73RM.mjs";import"@privy-io/are-addresses-equal";import"react/jsx-runtime";import"react";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"./PrivyPluginContext-2QN2dVUw.mjs";import"permissionless";import"permissionless/accounts";import"permissionless/clients/pimlico";import"viem/account-abstraction";function T(){let{user:T}=d(),{hideWalletUIs:S,openPrivyModal:w,chains:P,appId:W,rpcConfig:b,client:C}=y(),x=u(),{wallets:F}=g(),{setModalData:M}=l(),_=p(T),q=!!_&&m(_),A=async(a=o.id)=>{let d=v(F);if(!d)throw Error("No connected wallet found");let l="string"==typeof a?n(a):a;if(![o.id,2741,c.id].includes(l))throw Error("Error, only Abstract and ZKSync Era chains are supported");let p=P.find((e=>e.id===l));if(!p)throw Error("Chain not configured");await d.switchChain(p.id);let m=await d.getEthereumProvider(),u=t({account:d.address,transport:r(m)}),y=i({address:d.address,signMessage:u.signMessage,signTransaction:u.signTransaction,signTypedData:u.signTypedData});return await e({chain:p,transport:s(h(p,b,W)),publicTransport:s(h(p,b,W)),signer:y})};return{signMessage:async({message:e},a)=>{let n=await A(a);return new Promise((async(a,t)=>{let{entropyId:r,entropyIdVerifier:s}=f(T);S.current=!0,M({connectWallet:{recoveryMethod:_.recoveryMethod,connectingWalletAddress:_.address,isUnifiedWallet:q,entropyId:r,entropyIdVerifier:s,onCompleteNavigateTo:"SignRequestScreen",onFailure:()=>{}},signMessage:{method:"personal_sign",data:e,confirmAndSign:()=>n.signMessage({message:e}),onSuccess:e=>a(e),onFailure:t,uiOptions:{isCancellable:!0}}}),w("EmbeddedWalletConnectingScreen")})).finally((()=>{S.current=!1}))},signTypedData:async(e,a)=>{let n=await A(a);return new Promise((async(a,t)=>{S.current=!0;let{entropyId:r,entropyIdVerifier:s}=f(T);M({connectWallet:{recoveryMethod:_.recoveryMethod,connectingWalletAddress:_.address,isUnifiedWallet:q,entropyId:r,entropyIdVerifier:s,onCompleteNavigateTo:"SignRequestScreen",onFailure:()=>{}},signMessage:{method:"eth_signTypedData_v4",data:e,confirmAndSign:()=>n.signTypedData(e),onSuccess:e=>a(e),onFailure:t,uiOptions:{isCancellable:!0}}}),w("EmbeddedWalletConnectingScreen")})).finally((()=>{S.current=!1}))},sendTransaction:async e=>{let n=await A(e.chainId),t=[],r="calls"in e&&void 0!==e.calls;return t=r?[...e.calls]:[e],new Promise((async(s,i)=>{S.current=!0;let{entropyId:o,entropyIdVerifier:c}=f(T);M({connectWallet:{recoveryMethod:_.recoveryMethod,connectingWalletAddress:_.address,isUnifiedWallet:q,entropyId:o,entropyIdVerifier:c,onCompleteNavigateTo:"SendTransactionScreen",onFailure:()=>{}},sendTransaction:{transactionRequests:I({calls:t,chain:n.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:o,entropyIdVerifier:c,transactingWalletAddress:n.account.address,transactingWalletIndex:void 0,prepareTransactionRequest:async()=>{let t=r?a(n.account.address,e):e;return await n.prepareAbstractTransactionRequest(t)},scanTransaction:async()=>{if(!C)throw Error("Privy client not found");let t=r?a(n.account.address,e):e,s=await n.prepareAbstractTransactionRequest(t);return await C.scanTransaction({metadata:{domain:x.embeddedWallets.transactionScanning.domain},chain_id:e.chainId.toString(),request:{method:"eth_sendTransaction",params:[{from:s.from,to:s.to,value:s.value?.toString(),gas:s.gas?.toString(),gasPrice:s.gasPrice?.toString(),nonce:s.nonce?.toString(),data:s.data,eip_712_meta:{paymaster_params:{paymaster:s.paymaster,paymaster_input:s.paymasterInput}}}]}})},signOnly:!1,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:()=>r?n.sendTransactionBatch(e):n.sendTransaction(e),onSuccess:e=>s(e.hash),onFailure:i,uiOptions:{isCancellable:!0}}}),w("EmbeddedWalletConnectingScreen")})).finally((()=>{S.current=!1}))},signTransaction:async e=>{let n=await A(e.chainId),t=[],r="calls"in e&&void 0!==e.calls;return t=r?[...e.calls]:[e],new Promise((async(s,i)=>{S.current=!0;let{entropyId:o,entropyIdVerifier:c}=f(T);M({connectWallet:{recoveryMethod:_.recoveryMethod,connectingWalletAddress:_.address,isUnifiedWallet:q,entropyId:o,entropyIdVerifier:c,onCompleteNavigateTo:"SendTransactionScreen",onFailure:()=>{}},sendTransaction:{transactionRequests:I({calls:t,chain:n.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:o,entropyIdVerifier:c,transactingWalletAddress:n.account.address,transactingWalletIndex:void 0,prepareTransactionRequest:async()=>{let t=r?a(n.account.address,e):e;return await n.prepareAbstractTransactionRequest(t)},scanTransaction:async()=>{if(!C)throw Error("Privy client not found");let t=r?a(n.account.address,e):e,s=await n.prepareAbstractTransactionRequest(t);return await C.scanTransaction({metadata:{domain:x.embeddedWallets.transactionScanning.domain},chain_id:e.chainId.toString(),request:{method:"eth_sendTransaction",params:[{from:s.from,to:s.to,value:s.value?.toString(),gas:s.gas?.toString(),gasPrice:s.gasPrice?.toString(),nonce:s.nonce?.toString(),data:s.data,eip_712_meta:{paymaster_params:{paymaster:s.paymaster,paymaster_input:s.paymasterInput}}}]}})},signOnly:!0,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:async()=>{let t=r?a(n.account.address,e):e,s=await n.prepareAbstractTransactionRequest(t);return n.signTransaction(s)},onSuccess:e=>s(e.hash),onFailure:i,uiOptions:{isCancellable:!0}}}),w("EmbeddedWalletConnectingScreen")})).finally((()=>{S.current=!1}))}}}export{T as useAbstractSmartWallets};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useState as t,useMemo as a,useEffect as n,createContext as o,useContext as l}from"react";import{dedupeSupportedChains as r,DEFAULT_SUPPORTED_CHAINS as i,mainnet as s}from"@privy-io/js-sdk-core";import c from"tinycolor2";const d="https://auth.privy.io",u=2e4,g=1400,h=2500,f=4e3,p="3.17.0-snapshot-20260316162155",_="privy:token",b="privy-token",m="privy:refresh_token",v="privy-refresh-token",w="privy:pat",k="privy:id_token",y="privy-id-token",F="privy-session",C="privy:caid",M=e=>`privy:guest:${e}`,A=e=>`privy:cross-app:${e}`,E="privy:state_code",x="privy:code_verifier",D="privy:headless_oauth",B="privy:oauth_disable_signup",W=e=>`privy:wallet:${e}`,L="privy:connections",S=12e4,H=1,I="0x1",O=3e4,U="https://api.moonpay.com/v1",P="https://api.moonpay.com/v1",q="pk_live_hirbpu0cVcLHrjktC9l7fbc9ctjv0SL",j="pk_test_fqWjXZMSFwloh7orvJsRfjiUHXJqFzI",R="deprecated",T={appearance:{landingHeader:"Log in or sign up",theme:"light",walletList:["detected_ethereum_wallets","detected_solana_wallets","metamask","coinbase_wallet","rainbow","base_account","wallet_connect","phantom"]},walletConnectCloudProjectId:"34357d3c125c2bcf2ce2bc3309d98715",_render:{standalone:!1},fundingMethodConfig:{moonpay:{useSandbox:!1}}};let N=new Set(["coinbase_wallet","base_account","cryptocom","metamask","okx_wallet","phantom","rainbow","uniswap","zerion","universal_profile","bybit_wallet","ronin_wallet","haha_wallet","wallet_connect","wallet_connect_qr","wallet_connect_qr_solana","detected_solana_wallets","detected_ethereum_wallets","rabby_wallet","safe","solflare","backpack","jupiter","binance","binanceus","bitget_wallet","kraken_wallet"]),$=e=>N.has(e),z=(e,t,a)=>a.indexOf(e)===t;const Y=({input:e,overrides:t})=>t?t.primary.concat(t.overflow??[]).filter($).filter(z):e?e.filter($).filter(z):T.appearance.walletList;let G=/paymaster\.biconomy\.io\/api/i,J={mode:"SPONSORED",calculateGasLimits:!0,expiryDuration:300,sponsorshipInfo:{webhookData:{},smartAccountInfo:{name:"BICONOMY",version:"2.0.0"}}};const V=(e,t)=>e&&G.test(e)?J:t&&t.policy_id?{policyId:t.policy_id}:void 0;function K(e,t){let a=Math.max(0,Math.min(1,e.toHsl().l+t));return c({...e.toHsl(),l:a})}function X(e,t){let a=e.getLuminance(),n=t.getLuminance();return(Math.max(a,n)+.05)/(Math.min(a,n)+.05)}function Z(e,t){if(!e){let e=t?ee:te;return{accent:c(e.background.interactive),accentLight:c(e.background.interactive),accentHover:c(e.background["interactive-hover"]),accentDark:c(e.background["interactive-clicked"]),accentDarkest:c(e.background["interactive-disabled"])}}let a=c(e);return{accent:a,accentLight:K(a,.15),accentHover:K(a,.3),accentDark:K(a,-.06),accentDarkest:K(a,-.6)}}function Q({backgroundTheme:e,accentHex:t}){let a,n;"light"===e?a=!1:"dark"===e?a=!0:(a=.5>=c(e).getLuminance(),n=c(e).toHslString());let o=a?"dark":"light",l=a?ee:te,{accent:r,accentLight:i,accentHover:s,accentDark:d,accentDarkest:u}=Z(t,a),g=function(e){let t=c(te.text.default),a=c(ee.text.default),n=X(e,t),o=X(e,a),l=e.toHsl();return l.h>=220&&l.h<=300&&o>=3?ee.text.default:n>o?te.text.default:ee.text.default}(r),h=c(g),f=X(r,c(l.background.default))>=3;return{colorScheme:o,background:n||l.background.default,background2:l.background.elevated,background3:l.background.interactive,foreground:l.text.default,foreground2:l.text.muted,foreground3:l.text.placeholder,foreground4:l.border.default,accent:r.toHslString(),accentLight:i.toHslString(),accentHover:s.toHslString(),accentDark:d.toHslString(),accentDarkest:u.toHslString(),foregroundAccent:h.toHslString(),success:l.background.success,successDark:l.text.success,successLight:l.background.success,error:l.text.error,errorLight:l.background.error,warn:l.background.warning,warnLight:l.background.warning,warningDark:l.text.warning,errorDark:l.text.error,successBg:l.background.success,errorBg:l.background.error,errorBgHover:l.background["error-hover"],warnBg:l.background.warning,infoBg:l.background.info,infoBgHover:l.background["info-hover"],borderDefault:l.border.default,borderHover:l.border["default-hover"],borderFocus:l.border.focused,borderError:l.border.error,borderSuccess:l.border.success,borderWarning:l.border.warning,borderInfo:l.border.info,borderInteractive:l.border.interactive,borderInteractiveHover:l.border["interactive-hover"],backgroundHover:l.background["default-hover"],backgroundClicked:l.background["default-clicked"],backgroundDisabled:l.background["default-disabled"],backgroundInteractive:l.background.interactive,backgroundInteractiveHover:l.background["interactive-hover"],backgroundInteractiveClicked:l.background["interactive-clicked"],backgroundInteractiveDisabled:l.background["interactive-disabled"],foregroundHover:l.text.default,foregroundClicked:l.text.default,foregroundDisabled:l.text["default-disabled"],foregroundInteractive:l.text.interactive,foregroundInteractiveHover:l.text["interactive-hover"],accentHasGoodContrast:f?"1":"0",linkNavigationColor:f?r.toHslString():l.text.default,linkNavigationDecoration:f?"none":"underline",iconDefault:l.icon.default,iconMuted:l.icon.muted,iconSubtle:l.icon.subtle,iconInverse:l.icon.inverse,iconSuccess:l.icon.success,iconWarning:l.icon.warning,iconError:l.icon.error,iconInteractive:l.icon.interactive,iconDefaultHover:l.icon["default-hover"],iconMutedHover:l.icon["muted-hover"],iconSubtleHover:l.icon["subtle-hover"],iconDefaultClicked:l.icon["default-clicked"],iconMutedClicked:l.icon["muted-clicked"],iconSubtleClicked:l.icon["subtle-clicked"],iconDefaultDisabled:l.icon["default-disabled"],iconMutedDisabled:l.icon["muted-disabled"],iconSubtleDisabled:l.icon["subtle-disabled"],iconErrorHover:l.icon["error-hover"],iconInteractiveHover:l.icon["interactive-hover"],iconErrorClicked:l.icon["error-clicked"],iconInteractiveClicked:l.icon["interactive-clicked"],iconMutedDisabledAlt:l.icon["muted-disabled"],iconSubtleDisabledAlt:l.icon["subtle-disabled"]}}const ee={background:{default:"#020713",elevated:"#1A2230","default-hover":"#101724","default-clicked":"#1A2230","default-disabled":"#020713",success:"#0E3E2D",warning:"#373827",error:"#2E0C18",interactive:"#8B86FF","error-hover":"#441821","interactive-hover":"#7B73E5","interactive-clicked":"#6560CC","interactive-disabled":"#141824",info:"#1F2937","info-hover":"#141824"},icon:{default:"#F8F8F8",muted:"#9BA2AE",subtle:"#7B8491",inverse:"#020713",success:"#88E3B5",warning:"#FDF27B",error:"#EF4444",interactive:"#88B6FF","default-hover":"#F8F8F8","muted-hover":"#AEB3BD","subtle-hover":"#8B939E","default-clicked":"#F8F8F8","muted-clicked":"#9097A5","subtle-clicked":"#78818E","default-disabled":"#404452","muted-disabled":"#404452","subtle-disabled":"#404452","error-hover":"#F05555","interactive-hover":"#7B73E5","error-clicked":"#EF4444","interactive-clicked":"#6560CC"},text:{default:"#F8F8F8",muted:"#9BA2AE",placeholder:"#7B8491",success:"#ACEECB",warning:"#FEF9A0",error:"#FCA5A5",interactive:"#A29EFF","default-disabled":"#404452","interactive-hover":"#8C88E5"},border:{default:"#1F2937",interactive:"#88B0FF",focused:"#F8F8FC",info:"#5B83D3",success:"#317056",warning:"#FBBF24",error:"#F87171","default-hover":"#34304A","interactive-hover":"#88B0FF"}},te={background:{default:"#FFFFFF",elevated:"#F1F2F9","default-hover":"#F8F9FC","default-clicked":"#F1F2F9","default-disabled":"#FFFFFF",success:"#DCFCE7",warning:"#FEF3C7",error:"#FEE2E2",interactive:"#5B4FFF","error-hover":"#FECACA","interactive-hover":"#4F46E5","interactive-clicked":"#4338CA","interactive-disabled":"#F1F2F9",info:"#E0E7FF","info-hover":"#EEF2FF"},icon:{default:"#110F2A",muted:"#64668B",subtle:"#9498B8",inverse:"#FFFFFF",success:"#33B287",warning:"#F59E0B",error:"#EF4444",interactive:"#564FFF","default-hover":"#1D1B35","muted-hover":"#64668B","subtle-hover":"#888AAE","default-clicked":"#060C23","muted-clicked":"#64668B","subtle-clicked":"#788804","default-disabled":"#CBCDE1","muted-disabled":"#CBCDE1","subtle-disabled":"#CBCDE1","error-hover":"#F06060","interactive-hover":"#4F46E5","error-clicked":"#DC3838","interactive-clicked":"#2BA482"},text:{default:"#040217",muted:"#64668B",placeholder:"#9498B8",success:"#135638",warning:"#906218",error:"#991B1B",interactive:"#5B4FFF","default-disabled":"#CBCDE1","interactive-hover":"#5B4FFF"},border:{default:"#E2E3F0",interactive:"#5B4FFF",focused:"#949DF9",info:"#F1F2F9",success:"#87D7B7",warning:"#FACD63",error:"#F69393","default-hover":"#E2E3F0","interactive-hover":"#5B4FFF"}};function ae(e,t,a,n,o){let l,c,d,u,g,h,f,p,_,b,m,v,w,k,y,F,C,M,A=a?console.warn:()=>{},E=[];if(t?.loginMethods)for(let e of(l=t.loginMethods.includes("email"),c=t.loginMethods.includes("sms"),u=t.loginMethods.includes("wallet"),g=t.loginMethods.includes("google"),h=t.loginMethods.includes("twitter"),f=t.loginMethods.includes("discord"),m=t.loginMethods.includes("spotify"),v=t.loginMethods.includes("instagram"),p=t.loginMethods.includes("tiktok"),_=t.loginMethods.includes("line"),b=t.loginMethods.includes("twitch"),k=t.loginMethods.includes("github"),w=t.loginMethods.includes("linkedin"),y=t.loginMethods.includes("apple"),F=t.loginMethods.includes("farcaster"),C=t.loginMethods.includes("telegram"),d=t.loginMethods.includes("passkey"),t.loginMethods))"string"==typeof e&&e.startsWith("privy:")&&E.push(e);else l=e.email_auth,c=e.sms_auth,u=e.wallet_auth||e.solana_wallet_auth,g=e.google_oauth,h=e.twitter_oauth,f=e.discord_oauth,k=e.github_oauth,m=e.spotify_oauth,v=e.instagram_oauth,p=e.tiktok_oauth,_=e.line_oauth,b=e.twitch_oauth,w=e.linkedin_oauth,y=e.apple_oauth,F=e.farcaster_auth,C=e.telegram_auth,d=e.passkey_auth,M=e.custom_jwt_auth;e.passkey_auth&&(d=!0),"undefined"!=typeof window&&"function"!=typeof window.PublicKeyCredential&&(d=!1);let x=[l,c].filter(Boolean),D=[g,h,f,k,m,v,p,_,b,w,y,F,C].filter(Boolean),B=[u].filter(Boolean),W=t?.loginMethods?.includes("passkey")??!1,L=e.passkeys_for_signup_enabled??!1,S=[d&&(L||W)].filter(Boolean),H=[M].filter(Boolean);if(x.length+D.length+B.length+S.length+H.length+E.length===0)throw Error("You must enable at least one login method");let I=void 0!==t?.appearance?.showWalletLoginFirst?t?.appearance?.showWalletLoginFirst:e.show_wallet_login_first;I&&0===B.length?(A("You should only enable `showWalletLoginFirst` when `wallet` logins are also enabled. `showWalletLoginFirst` has been set to false"),I=!1):I||D.length+x.length!==0||(A("You should only disable `showWalletLoginFirst` when `email`, `sms`, or social logins are also enabled. `showWalletLoginFirst` has been set to true"),I=!0);let O=t?.externalWallets?.walletConnect?.enabled??!0;t?.loginMethods&&t.loginMethodsAndOrder&&A("You should only configure one of `loginMethods` or `loginMethodsAndOrder`");let U=Y({input:t?.appearance?.walletList,overrides:t?.loginMethodsAndOrder});if((U.includes("wallet_connect_qr")||U.includes("wallet_connect"))&&U.includes("wallet_connect_qr_solana"))throw Error("wallet_connect_qr and wallet_connect_qr_solana cannot both be present in walletList due to WalletConnect session conflicts.");let P=(({input:e})=>{if(!e||!e.primary[0])return;let t=[e.primary[0]],a=[];for(let a of(e.primary.length>4&&console.warn("You should not specify greater than 4 login methods in `loginMethodsAndOrder.primary`"),e.primary.slice(1)))t.includes(a)?console.warn(`Duplicated login method: ${a}`):t.push(a);for(let n of e.overflow??[])t.includes(n)||a.includes(n)?console.warn(`Duplicated login method: ${n}`):a.push(n);return{primary:t,overflow:a}})({input:t?.loginMethodsAndOrder}),q=t?.intl?.defaultCountry??"US",{chains:j,defaultChain:R}=function({supportedChains:e,defaultChainFromConfig:t}){let a;if(e){if(0===e.length)throw Error("`supportedChains` must contain at least one chain");a=r(e)}else a=[...i];let n=e?a[0]:s,o=t??n;if(!a.find((e=>e.id===o.id)))throw Error("`defaultChain` must be included in `supportedChains`");return{chains:a,defaultChain:o}}({supportedChains:t?.supportedChains,defaultChainFromConfig:t?.defaultChain}),N=!!t?.defaultChain,$=t?.customAuth?.getCustomAccessToken&&!1!==t?.customAuth?.enabled,z=$?"all-users":e.embedded_wallet_config.ethereum.create_on_login,G=e.embedded_wallet_config.solana.create_on_login;e.solana_wallet_auth&&!t?.externalWallets?.solana?.connectors&&console.warn("App configuration has Solana wallet login enabled, but no Solana wallet connectors have been passed to Privy. Make sure to pass Solana connectors to the `config.externalWallets.solana.connectors` field of the `PrivyProvider`");let J=e.telegram_auth_config?{botId:e.telegram_auth_config.bot_id,botName:e.telegram_auth_config.bot_name,linkEnabled:e.telegram_auth_config.link_enabled,seamlessAuthEnabled:e.telegram_auth_config.seamless_auth_enabled}:void 0,K=e.funding_config?{methods:e.funding_config.methods,options:e.funding_config.options,defaultRecommendedAmount:e.funding_config.default_recommended_amount,defaultRecommendedCurrency:e.funding_config.default_recommended_currency,promptFundingOnWalletCreation:e.funding_config.prompt_funding_on_wallet_creation,crossChainBridgingEnabled:e.funding_config.cross_chain_bridging_enabled}:void 0,X=e.smart_wallet_config;return{id:e.id,appClientId:o,name:e.name,allowlistConfig:{errorTitle:e.allowlist_config.error_title,errorDetail:e.allowlist_config.error_detail,errorCtaText:e.allowlist_config.cta_text,errorCtaLink:e.allowlist_config.cta_link},legacyWalletUiConfig:e.legacy_wallet_ui_config,appearance:{logo:t?.appearance?.logo??e.logo_url??void 0,landingHeader:t?.appearance?.landingHeader??T.appearance.landingHeader,loginMessage:"string"==typeof t?.appearance?.loginMessage?t?.appearance?.loginMessage.slice(0,100):t?.appearance?.loginMessage,footerLogo:t?.appearance?.footerLogo,palette:Q({backgroundTheme:t?.appearance?.theme??T.appearance.theme,accentHex:t?.appearance?.accentColor??e.accent_color}),loginGroupPriority:I?"web3-first":"web2-first",hideDirectWeb2Inputs:!!t?.appearance?.hideDirectWeb2Inputs,walletList:U,walletChainType:t?.appearance?.walletChainType??(({evmWalletAuth:e,solanaWalletAuth:t})=>e&&t?"ethereum-and-solana":e?"ethereum-only":t?"solana-only":"ethereum-only")({evmWalletAuth:e.wallet_auth??!1,solanaWalletAuth:e.solana_wallet_auth??!1})},loginMethods:{wallet:u,email:l,sms:c,passkey:d,google:g,twitter:h,discord:f,github:k,spotify:m,instagram:v,tiktok:p,line:_,twitch:b,linkedin:w,apple:y,farcaster:F,telegram:C},globalDisablePasskeys:t?.globalDisablePasskeys??!1,customOAuthProviders:(e.custom_oauth_providers??[]).filter((e=>!1!==e.enabled)),crossAppProviders:E,disablePlusEmails:e.disable_plus_emails,loginMethodsAndOrder:P,legal:{termsAndConditionsUrl:t?.legal?.termsAndConditionsUrl??e.terms_and_conditions_url,privacyPolicyUrl:t?.legal?.privacyPolicyUrl??e.privacy_policy_url,requireUsersAcceptTerms:e.require_users_accept_terms??!1},walletConnectCloudProjectId:t?.walletConnectCloudProjectId??e.wallet_connect_cloud_project_id??T.walletConnectCloudProjectId,rpcConfig:{rpcUrls:{},rpcTimeouts:t?.externalWallets?.signatureRequestTimeouts??{}},chains:j,defaultChain:R,intl:{defaultCountry:q,textLocalization:t?.intl?.textLocalization},shouldEnforceDefaultChainOnConnect:N,captcha:{enabledProvider:e.enabled_captcha_provider??null,siteKey:e.captcha_site_key},externalWallets:{coinbaseWallet:{config:{appName:e.name,appLogoUrl:e.logo_url,preference:{options:"all",...t?.externalWallets?.coinbaseWallet?.config?.preference},...t?.externalWallets?.coinbaseWallet?.config}},baseAccount:{config:{appName:e.name,appLogoUrl:e.logo_url,...t?.externalWallets?.baseAccount?.config,preference:{...t?.externalWallets?.baseAccount?.config?.preference,telemetry:!1}}},walletConnect:{enabled:O},solana:{connectors:t?.externalWallets?.solana?.connectors},disableAllExternalWallets:t?.externalWallets?.disableAllExternalWallets??!1},embeddedWallets:{requireUserOwnedRecoveryOnCreate:!$&&(e.embedded_wallet_config.require_user_owned_recovery_on_create??!1),userOwnedRecoveryOptions:$?["user-passcode"]:e.embedded_wallet_config.user_owned_recovery_options,priceDisplay:t?.embeddedWallets?.priceDisplay??{primary:"fiat-currency",secondary:"native-token"},ethereum:{createOnLogin:t?.embeddedWallets?.ethereum?.createOnLogin??z},solana:{createOnLogin:t?.embeddedWallets?.solana?.createOnLogin??G},disableAutomaticMigration:t?.embeddedWallets?.disableAutomaticMigration??!1,mode:e.embedded_wallet_config.mode,showWalletUIs:t?.embeddedWallets?.showWalletUIs??e.enforce_wallet_uis??!0,extendedCalldataDecoding:t?.embeddedWallets?.extendedCalldataDecoding??!1,transactionScanning:{enabled:t?.embeddedWallets?.transactionScanning?.enabled??!1,domain:t?.embeddedWallets?.transactionScanning?.domain??n??"https://auth.privy.io"}},mfa:{methods:e.mfa_methods??[],noPromptOnMfaRequired:t?.mfa?.noPromptOnMfaRequired??!1},passkeys:{shouldUnlinkOnUnenrollMfa:t?.passkeys?.shouldUnlinkOnUnenrollMfa,shouldUnenrollMfaOnUnlink:t?.passkeys?.shouldUnenrollMfaOnUnlink,registration:t?.passkeys?.registration},customAuth:$?{enabled:!0,...t.customAuth}:void 0,loginConfig:{telegramAuthConfiguration:J,passkeysForSignupEnabled:e.passkeys_for_signup_enabled},headless:!!t?.headless,render:{standalone:t?._render?.standalone??T._render.standalone},fundingConfig:K,fundingMethodConfig:{...t?.fundingMethodConfig??T.fundingMethodConfig,moonpay:{...t?.fundingMethodConfig?.moonpay??T.fundingMethodConfig.moonpay,useSandbox:t?.fundingMethodConfig?.moonpay.useSandbox??T.fundingMethodConfig.moonpay.useSandbox}},whatsAppEnabled:!!e.whatsapp_enabled,customOAuthRedirectUrl:t?.customOAuthRedirectUrl,allowOAuthInEmbeddedBrowsers:t?.allowOAuthInEmbeddedBrowsers??!1,solanaRpcs:{"solana:mainnet":t?.solana?.rpcs?.["solana:mainnet"]??null,"solana:devnet":t?.solana?.rpcs?.["solana:devnet"]??null,"solana:testnet":t?.solana?.rpcs?.["solana:testnet"]??null},smartWallets:X?.enabled?{enabled:X.enabled,smartWalletVersion:X.smart_wallet_version,smartWalletType:X.smart_wallet_type,configuredNetworks:X.configured_networks.map((e=>({chainId:e.chain_id,bundlerUrl:e.bundler_url,paymasterUrl:e.paymaster_url,paymasterContext:V(e.paymaster_url,e.paymaster_context)})))}:{enabled:X?.enabled??!1},connectorsDebugLogs:t?.connectorsDebugLogs??!1}}const ne={show_wallet_login_first:!0,allowlist_config:{error_title:null,error_detail:null,cta_text:null,cta_link:null},wallet_auth:!0,email_auth:!0,sms_auth:!1,google_oauth:!1,twitter_oauth:!1,discord_oauth:!1,github_oauth:!1,linkedin_oauth:!1,apple_oauth:!1,disable_plus_emails:!1,terms_and_conditions_url:null,privacy_policy_url:null,embedded_wallet_config:{create_on_login:"off",ethereum:{create_on_login:"off"},solana:{create_on_login:"off"},require_user_owned_recovery_on_create:!1,user_owned_recovery_options:["user-passcode"],mode:"user-controlled-server-wallets-only"},captcha_site_key:"",enforce_wallet_uis:!1,legacy_wallet_ui_config:!1,id:"",name:"",passkeys_for_signup_enabled:!1,whatsapp_enabled:!1};let oe=/*#__PURE__*/o({appConfig:ae(ne,void 0,!1),isServerConfigLoaded:!1});const le=({children:o,client:l,legacyClient:r,clientConfig:i,appClientId:s})=>{let[c,d]=t(null),u=a((()=>ae(c??ne,i,!!c,"undefined"!=typeof window?window.location.origin:void 0,s)),[c,i,s]);return n((()=>{if(!c)return;let e=function(e){if(!e)return{};let{appearance:t,supportedChains:a,defaultChain:n,externalWallets:o,...l}=e;return{...l,...a?{supportedChains:a.map((e=>e.id))}:void 0,...n?{defaultChain:n.id}:void 0,...o?{walletConnect:o.walletConnect?{enabled:o.walletConnect.enabled}:void 0,coinbaseWallet:o.coinbaseWallet,solana:{connectors:o.solana?.connectors?.get().map((e=>e.walletClientType))}}:void 0}}(i),t=function(e,t=0){let a=3735928559^t,n=1103547991^t;for(let t,o=0;o<e.length;o++)a=Math.imul(a^(t=e.charCodeAt(o)),2654435761),n=Math.imul(n^t,1597334677);return a=Math.imul(a^a>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),4294967296*(2097151&(n=Math.imul(n^n>>>16,2246822507)^Math.imul(a^a>>>13,3266489909)))+(a>>>0)}(JSON.stringify(e)).toString(),a=`privy:sent:${c.id}:${t}`;localStorage.getItem(a)||(r.createAnalyticsEvent({eventName:"sdk_initialize",payload:e}),localStorage.setItem(a,"t"))}),[i,c]),n((()=>{c||(async()=>{try{await l.initialize();let e=l.app.getConfig();e.custom_api_url&&r.updateApiUrl(e.custom_api_url),d(e)}catch(e){console.warn("Error generating app config: ",e)}})()}),[]),/*#__PURE__*/e(oe.Provider,{value:{appConfig:u,isServerConfigLoaded:!!c},children:o})},re=()=>{let{appConfig:e}=l(oe);return e},ie=()=>{let{isServerConfigLoaded:e}=l(oe);return e};export{_ as C,d as D,D as H,k as I,P as M,B as O,w as P,m as R,E as S,p as V,O as W,x as a,L as b,ie as c,C as d,A as e,F as f,M as g,R as h,b as i,v as j,y as k,u as l,le as m,S as n,W as o,I as p,g as q,h as r,H as s,f as t,re as u,U as v,j as w,q as x};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{formatEther as r}from"viem";import{u as e}from"./internal-context-Z-fyxadS.mjs";import{F as t}from"./use-export-wallet-
|
|
1
|
+
import{formatEther as r}from"viem";import{u as e}from"./internal-context-Z-fyxadS.mjs";import{F as t}from"./use-export-wallet-DQk47ipd.mjs";let a=new Intl.NumberFormat(void 0,{style:"currency",currency:"USD",maximumFractionDigits:2}),s=r=>a.format(r);const n=(r,e)=>{let t=s(e*parseFloat(r));return"$0.00"!==t?t:"<$0.01"},o=(e,t)=>{let a=s(t*parseFloat(r(e)));return"$0.00"===a?"<$0.01":a},c=(r,e,t=6,a=!1)=>`${l(r,t,a)} ${e}`,l=(e,t=6,a=!1)=>{let s=parseFloat(r(e)).toFixed(t).replace(/0+$/,"").replace(/\.$/,"");return a?s:`${"0"===s?"<0.001":s}`},m=r=>r.reduce(((r,e)=>r+e),0n),i=(r,a)=>{let{chains:s}=e(),n=`https://etherscan.io/address/${a}`,o=`${t(r,s)}/address/${a}`;if(!o)return n;try{new URL(o)}catch{return n}return o};export{o as a,i as b,n as c,c as g,l as p,m as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useMemo as e}from"react";import{create as t,rawSign as r}from"@privy-io/js-sdk-core";import{u as a,a as i}from"./internal-context-Z-fyxadS.mjs";import{u as s,a as n,j as o,b as d,m as l}from"./
|
|
1
|
+
import{useMemo as e}from"react";import{create as t,rawSign as r}from"@privy-io/js-sdk-core";import{u as a,a as i}from"./internal-context-Z-fyxadS.mjs";import{u as s,a as n,j as o,b as d,m as l}from"./privy-context-DjQaHYWB.mjs";import{u as c}from"./context-CTvHGnoI.mjs";import{u as p}from"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"ofetch";import"@privy-io/are-addresses-equal";import"react/jsx-runtime";import"tinycolor2";const u=()=>{let{refreshSessionAndUser:r,privy:i}=a();return e((()=>({async createWallet(e){let a=await t(i,{request:{chain_type:e.chainType}}),s=await r();if(!s)throw Error("User must be authenticated before creating a Privy wallet");return{user:s,wallet:a}}})),[r,i])};function m(){let{user:t,getAccessToken:r}=s(),{walletProxy:l,openModal:p,client:u}=a(),{setModalData:m}=n(),h=c();return e((()=>({exportWallet:e=>new Promise((async(a,s)=>{if(!t)return void s(new i("User must be authenticated before exporting their Privy wallet"));let n=o(t,e.address);n?d(n)?await r()?l?(m({connectWallet:{recoveryMethod:n.recoveryMethod,connectingWalletAddress:n.address,isUnifiedWallet:!0,onCompleteNavigateTo:"EmbeddedWalletKeyExportScreen",onFailure:s,shouldForceMFA:!0},keyExport:{appId:h.id,appClientId:h.appClientId,origin:u.apiUrl,address:n.address,hdWalletIndex:n.walletIndex,chainType:n.chainType,walletId:n.id,isUnifiedWallet:!0,imported:n.imported,onSuccess:a,onFailure:s}}),p("EmbeddedWalletConnectingScreen")):s(new i("Wallet not ready for export")):s(new i("Must have valid access token.")):s(Error("Export via extended-chains is only supported for unified stack wallets")):s(new i("User must have an embedded wallet."))}))})),[t,r,l,p,u,m,h])}const h=()=>{let{user:t}=s(),{privy:i}=a(),{signWithUserSigner:n}=p();return e((()=>({async signRawHash({address:e,chainType:a,hash:s}){if(!t)throw Error("User must be authenticated before signing");let o=l(t,a).filter((e=>d(e))).find((t=>t.address===e));if(!o)throw Error("Wallet not found");let c=await r(i,n,{wallet_id:o.id,params:{hash:s}});if(c.data&&"signature"in c.data&&"hex"===c.data.encoding)return{signature:c.data.signature};throw Error("Failed to sign")}})),[i,n,t])};export{u as useCreateWallet,m as useExportWallet,h as useSignRawHash};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createPublicClient as a,http as t}from"viem";import{b as e}from"./useWallets-
|
|
1
|
+
import{createPublicClient as a,http as t}from"viem";import{b as e}from"./useWallets-DoJmA9i9.mjs";const n=async({chain:n,address:r,appId:c,rpcConfig:i,erc20Address:o})=>{let p=a({chain:n,transport:t(e(n,i,c))});return{balance:await p.readContract({address:o,abi:s,functionName:"balanceOf",args:[r]}).catch((()=>0n)),chain:n}};let s=[{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"}];export{n as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createPublicClient as t,http as e}from"viem";import{b as a}from"./useWallets-
|
|
1
|
+
import{createPublicClient as t,http as e}from"viem";import{b as a}from"./useWallets-DoJmA9i9.mjs";const n=async({address:n,chain:s,rpcConfig:r,privyAppId:o})=>{try{let l=t({chain:s,transport:e(a(s,r,o))}),[m,p]=await Promise.all([l.readContract({abi:i,address:n,functionName:"symbol"}),l.readContract({abi:i,address:n,functionName:"decimals"})]);return{decimals:p,symbol:m}}catch(t){return console.log(t),null}};let i=[{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];export{n as g};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ofetch as e}from"ofetch";import{useState as t,useRef as n,useEffect as a}from"react";import{M as r,v as o,w as u,x as i}from"./context-CTvHGnoI.mjs";import{u as s}from"./internal-context-Z-fyxadS.mjs";import{a as c}from"./privy-context-DjQaHYWB.mjs";import{O as d}from"./analytics-mkkvFRju.mjs";const m="moonpay";function l(e){return parseFloat(e)}function y(l,y=!1){let[f,p]=t(null),{createAnalyticsEvent:g}=s(),{data:h,navigate:v,setModalData:A}=c(),F=h?.funding,w=n(0);return a((()=>{let t=setInterval((async()=>{if(l)try{let[n]=await async function(t,n){return e(`${n?r:o}/transactions/ext/${t}`,{query:{apiKey:n?u:i}})}(l,y),a="waitingAuthorization"===n.status&&"credit_debit_card"===n.paymentMethod?"pending":n.status;if(["failed","completed","awaitingAuthorization"].includes(a)&&(g({eventName:d,payload:{status:a,provider:m,paymentMethod:n.paymentMethod,cardPaymentType:n.cardPaymentType,currency:n.currency?.code,baseCurrencyAmount:n.baseCurrencyAmount,quoteCurrencyAmount:n.quoteCurrencyAmount,feeAmount:n.feeAmount,extraFeeAmount:n.extraFeeAmount,networkFeeAmount:n.networkFeeAmount,isSandbox:y}}),clearInterval(t)),"failed"===a||"serviceFailure"===a)return A({funding:{...F,errorMessage:"Something went wrong adding funds from Moonpay. Please try again or use another method to fund your wallet."},solanaFundingData:h?.solanaFundingData}),void v("FundingMethodSelectionScreen");p(a)}catch(e){404!==e.response?.status&&(w.current+=1),w.current>=3&&(g({eventName:d,payload:{status:"serviceFailure",provider:m}}),clearInterval(t),A({funding:{...F,errorMessage:"Something went wrong adding funds from Moonpay. Please try again or use another method to fund your wallet."},solanaFundingData:h?.solanaFundingData}),v("FundingMethodSelectionScreen"))}}),3e3);return()=>clearInterval(t)}),[l,w]),f}export{l as a,y as u};
|