@privy-io/react-auth 3.14.0 → 3.14.2-beta-20260225204743
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-B2BwM9IL.js → AccountNotFoundScreen-Da9qA-56.js} +1 -1
- package/dist/cjs/{Address-CMUXgM3h.js → Address-BqWF0i-J.js} +1 -1
- package/dist/cjs/{AffirmativeConsentScreen-B7nTfKFs.js → AffirmativeConsentScreen-BClNt_0J.js} +1 -1
- package/dist/cjs/{AllowlistRejectionScreen-C0ubkz2f.js → AllowlistRejectionScreen-zV6NXsBd.js} +1 -1
- package/dist/cjs/{AuthenticateWithWalletScreen-DHRXcjT5.js → AuthenticateWithWalletScreen-BoREWQDU.js} +1 -1
- package/dist/cjs/{AwaitingEvmToSolBridgingScreen-D6MB0SW8.js → AwaitingEvmToSolBridgingScreen-CTZe2U-l.js} +1 -1
- package/dist/cjs/{AwaitingExternalEthereumTransferScreen-BcnofXQv.js → AwaitingExternalEthereumTransferScreen-CWgaBnmf.js} +1 -1
- package/dist/cjs/{AwaitingPasswordlessCodeScreen-CMMIM_Pj.js → AwaitingPasswordlessCodeScreen-CWWgEkCs.js} +1 -1
- package/dist/cjs/{AwaitingSolToEvmBridgingScreen-C2Op_A4L.js → AwaitingSolToEvmBridgingScreen-B3hSbpSm.js} +1 -1
- package/dist/cjs/{BridgeNetworkSelectionView-BU5hxQ4Z.js → BridgeNetworkSelectionView-BJ4HU7kS.js} +1 -1
- package/dist/cjs/{CaptchaScreen-TVUbEsJK.js → CaptchaScreen-CuPGvzuE.js} +1 -1
- package/dist/cjs/{CoinbaseOnrampStatusScreen-_mCdKOIM.js → CoinbaseOnrampStatusScreen-BYh_mtXY.js} +1 -1
- package/dist/cjs/{ConnectEmailForm-BgS2Yn3u.js → ConnectEmailForm-Cw7gmFFy.js} +1 -1
- package/dist/cjs/{ConnectLedgerScreen-DjDvgzxV.js → ConnectLedgerScreen-JGZIZrO9.js} +1 -1
- package/dist/cjs/{ConnectOnlyLandingScreen-CbUMwYrO.js → ConnectOnlyLandingScreen-BEyo7yCb.js} +1 -1
- package/dist/cjs/{ConnectOnlyStatusScreen-DyoV_8V9.js → ConnectOnlyStatusScreen-CHQLiEij.js} +1 -1
- package/dist/cjs/{ConnectOrCreateScreen-DpR4OmSO.js → ConnectOrCreateScreen-BLz6pmTF.js} +1 -1
- package/dist/cjs/{ConnectPhoneForm-CdRNa4Lg.js → ConnectPhoneForm-BY1-1V8g.js} +1 -1
- package/dist/cjs/{ConnectWalletView-Bb4271wb.js → ConnectWalletView-CWrY-kEt.js} +1 -1
- package/dist/cjs/{ConnectionStatusScreen-B8TxWdVC.js → ConnectionStatusScreen-DKwnv7_i.js} +1 -1
- package/dist/cjs/{CrossAppAuthScreen-By4i5UqT.js → CrossAppAuthScreen-COXktzZ_.js} +1 -1
- package/dist/cjs/{CustomLandingScreenView-C0Vky31_.js → CustomLandingScreenView-BBBb_pIa.js} +1 -1
- package/dist/cjs/{DelegatedActionsConsentScreen-CjUYU339.js → DelegatedActionsConsentScreen-BXuRbdhT.js} +1 -1
- package/dist/cjs/{DelegatedActionsRevokeScreen-BGATOJGL.js → DelegatedActionsRevokeScreen-Bi79TDY8.js} +1 -1
- package/dist/cjs/{EmbeddedWalletConnectingScreen-GZ8nOvWq.js → EmbeddedWalletConnectingScreen-BAdYnWdp.js} +1 -1
- package/dist/cjs/{EmbeddedWalletCreatedScreen-Be8AYwZh.js → EmbeddedWalletCreatedScreen-CWkg3irZ.js} +1 -1
- package/dist/cjs/{EmbeddedWalletKeyExportScreen-DXa54jFw.js → EmbeddedWalletKeyExportScreen-ClvfSZ4d.js} +1 -1
- package/dist/cjs/{EmbeddedWalletOnAccountCreateScreen-C8-LkEhs.js → EmbeddedWalletOnAccountCreateScreen-ZGVRCKAf.js} +1 -1
- package/dist/cjs/{EmbeddedWalletPasswordUpdateScreen-B7N8Noqf.js → EmbeddedWalletPasswordUpdateScreen-D9-AY8aF.js} +1 -1
- package/dist/cjs/{EmbeddedWalletPasswordUpdateSplashScreen-kiTrvJ2h.js → EmbeddedWalletPasswordUpdateSplashScreen-CX3MNNni.js} +1 -1
- package/dist/cjs/{EnrollTotp-Bxzun51r.js → EnrollTotp-oC6vnm7x.js} +1 -1
- package/dist/cjs/{ErrorScreen-BsvL8i4R.js → ErrorScreen-Ci7dzQ7X.js} +1 -1
- package/dist/cjs/{FarcasterConnectStatusScreen-DMnzjTAV.js → FarcasterConnectStatusScreen-DnrqDPpm.js} +1 -1
- package/dist/cjs/{FarcasterSignerStatusScreen-Xb4KBH8f.js → FarcasterSignerStatusScreen-m-EKHgqe.js} +1 -1
- package/dist/cjs/{FundSolWalletWithExternalSolanaWallet-BT4nT21N.js → FundSolWalletWithExternalSolanaWallet-CL5Jl0zy.js} +1 -1
- package/dist/cjs/{FundWalletMethodHeader-D_l3529h.js → FundWalletMethodHeader-BncLLS1i.js} +1 -1
- package/dist/cjs/FundWithBankDepositScreen-DV41ZeH_.js +176 -0
- package/dist/cjs/{FundingEditAmountScreen-CBp--May.js → FundingEditAmountScreen-C1fCTPJJ.js} +1 -1
- package/dist/cjs/FundingMethodSelectionScreen-CQt7Dklt.js +1 -0
- package/dist/cjs/{InAppBrowserLoginNotPossible-fTc3VwS8.js → InAppBrowserLoginNotPossible-Cnr9M3gC.js} +1 -1
- package/dist/cjs/{InstallWalletScreen-Bm_jzHEL.js → InstallWalletScreen-33F7RRlP.js} +1 -1
- package/dist/cjs/{LandingScreen-D6094d73.js → LandingScreen-C8pFLR7T.js} +1 -1
- package/dist/cjs/{LinkConflictScreen-Bic4pZUv.js → LinkConflictScreen-Byy8LnZZ.js} +1 -1
- package/dist/cjs/{LinkEmailScreen-BuuqcFAa.js → LinkEmailScreen-CM-irais.js} +1 -1
- package/dist/cjs/{LinkPasskeyScreen-CbuNym_z.js → LinkPasskeyScreen-ovk6Ez-d.js} +1 -1
- package/dist/cjs/{LinkPhoneScreen-ZIe5uzPN.js → LinkPhoneScreen-v6zm1YHw.js} +1 -1
- package/dist/cjs/{LoginFailedScreen-JnBtBxi1.js → LoginFailedScreen-DgYbc_LC.js} +1 -1
- package/dist/cjs/{ManualTransferScreen-B4TkbelL.js → ManualTransferScreen-BA6n3GUi.js} +1 -1
- package/dist/cjs/{MfaAuthEnrollmentFlowScreen-CmLIp9Ll.js → MfaAuthEnrollmentFlowScreen-ZiVEcykS.js} +1 -1
- package/dist/cjs/{MfaAuthVerifyFlowScreen-B3ATEO7f.js → MfaAuthVerifyFlowScreen-CdT_6UHO.js} +1 -1
- package/dist/cjs/{MfaEnrollmentFlowScreen-COciRqP3.js → MfaEnrollmentFlowScreen-t1tyDWZQ.js} +1 -1
- package/dist/cjs/{MfaVerifyFlowScreen-BuljrcdS.js → MfaVerifyFlowScreen-B6fjUQhB.js} +1 -1
- package/dist/cjs/{ModalHeader-C45fdSY0.js → ModalHeader-C4VvvcJI.js} +1 -1
- package/dist/cjs/{MoonpayStatusScreen-zWJq589Z.js → MoonpayStatusScreen-mQ_glqMp.js} +1 -1
- package/dist/cjs/{OAuthStatusScreen-ecJqpiHx.js → OAuthStatusScreen-DjGxQpVS.js} +1 -1
- package/dist/cjs/{PasskeySelectSignupOrLogin-B-0EIFsW.js → PasskeySelectSignupOrLogin-CxmbNK8J.js} +1 -1
- package/dist/cjs/{PasskeyStatusScreen-DzuiIFq2.js → PasskeyStatusScreen-DvQuDzXU.js} +1 -1
- package/dist/cjs/{PasswordRecoveryScreen-DQEy0Nqy.js → PasswordRecoveryScreen-CkRGgvXb.js} +1 -1
- package/dist/cjs/{QrCode-BKnLFoFt.js → QrCode-BhyIQUmQ.js} +1 -1
- package/dist/cjs/{RecoveryOAuthStatusScreen-06xKXwi8.js → RecoveryOAuthStatusScreen-DPR9CgJE.js} +1 -1
- package/dist/cjs/{RecoveryPasswordCreateScreen-yfl_af11.js → RecoveryPasswordCreateScreen-CxU7NBwk.js} +1 -1
- package/dist/cjs/{RecoverySelectionScreen-BdHkBTuB.js → RecoverySelectionScreen-DdNob--S.js} +1 -1
- package/dist/cjs/{Screen-ChnafgL7.js → Screen-CCE-b3Bs.js} +1 -1
- package/dist/cjs/{ScreenLayout-CpclvUVQ.js → ScreenLayout-CIucWNBD.js} +1 -1
- package/dist/cjs/{SetAutomaticRecoveryScreen-JwwwXok0.js → SetAutomaticRecoveryScreen-DboKNW8C.js} +1 -1
- package/dist/cjs/{SetWalletPasswordForm-ByGHfNqH.js → SetWalletPasswordForm-BXVDxfaR.js} +1 -1
- package/dist/cjs/{SignRequestScreen-Bcr25XmN.js → SignRequestScreen-B6eHE2B5.js} +1 -1
- package/dist/cjs/{StandardSignAndSendTransactionScreen-D-63yMIJ.js → StandardSignAndSendTransactionScreen-DcqaQHy5.js} +1 -1
- package/dist/cjs/{TelegramAuthScreen-DxZS64fR.js → TelegramAuthScreen-DyPX_iGV.js} +1 -1
- package/dist/cjs/{TransactionDetails-DBFsWnn1.js → TransactionDetails-B1h6EeBW.js} +1 -1
- package/dist/cjs/{TransactionErrorView-nUOKizXV.js → TransactionErrorView-B5sT73Ba.js} +1 -1
- package/dist/cjs/{TransferFromWalletScreen-CYPZmSPV.js → TransferFromWalletScreen-BMOX1MK_.js} +1 -1
- package/dist/cjs/{TransferOrBridgeLoadingScreen-DiPwnn60.js → TransferOrBridgeLoadingScreen-Cfn5rlzi.js} +1 -1
- package/dist/cjs/{UpdateEmailScreen-Bwxxqz1k.js → UpdateEmailScreen-3BTc4v0E.js} +1 -1
- package/dist/cjs/{UpdatePhoneScreen-DU7RGenX.js → UpdatePhoneScreen-CmsYMIzD.js} +1 -1
- package/dist/cjs/{UserLimitReachedScreen-fuIfecOX.js → UserLimitReachedScreen-I9UUK49o.js} +1 -1
- package/dist/cjs/{WalletInfoCard-DmD26XB9.js → WalletInfoCard-ChY3FD9q.js} +1 -1
- package/dist/cjs/{WalletInterstitialScreen-Bn8l3kCq.js → WalletInterstitialScreen-BUlgDZh5.js} +1 -1
- package/dist/cjs/{WalletLink-D7Q4z7WW.js → WalletLink-C7ZIDy-A.js} +1 -1
- package/dist/cjs/{WalletOverflowButton-fU7XMRV1.js → WalletOverflowButton-Dc59wfc3.js} +1 -1
- package/dist/cjs/abstract-smart-wallets.js +1 -1
- package/dist/cjs/{context-DK3qW12H.js → context-DuuxPOa_.js} +1 -1
- package/dist/cjs/{ethers-DpiO5t5F.js → ethers-zYuc0hQo.js} +1 -1
- package/dist/cjs/extended-chains.js +1 -1
- package/dist/cjs/{get-is-unified-wallet-CMHZpDfE.js → get-is-unified-wallet-BLVPD3_u.js} +1 -1
- package/dist/cjs/{index-VgEQ4kaA.js → index-BLtm61jZ.js} +1 -1
- package/dist/cjs/{index-DhmrMcn2.js → index-C_DdsmQ1.js} +1 -1
- package/dist/cjs/index-nm4KctZS.js +174 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/internal.js +1 -1
- package/dist/cjs/{shared-BTeM_5HJ.js → shared-B3lDvuTo.js} +1 -1
- package/dist/cjs/{shouldProceedtoEmbeddedWalletCreationFlow-eB6IctoD.js → shouldProceedtoEmbeddedWalletCreationFlow-BWLhx4le.js} +1 -1
- package/dist/cjs/{smart-wallets-DPXIV14D.js → smart-wallets-DVpUjsHG.js} +1 -1
- package/dist/cjs/smart-wallets.js +1 -1
- package/dist/cjs/solana.js +1 -1
- package/dist/cjs/{styles-BfCR4pAO.js → styles-ClNz-IKw.js} +1 -1
- package/dist/cjs/{to-ui-error-CQ9FNFg-.js → to-ui-error-DK3jeQuM.js} +1 -1
- package/dist/cjs/ui.js +1 -1
- package/dist/cjs/{use-export-wallet-Ddpx0kgg.js → use-export-wallet-BIKY-giO.js} +1 -1
- package/dist/cjs/use-export-wallet-CTQ2_-Js.js +1 -0
- package/dist/cjs/{useActiveWallet-BgdIZtS6.js → useActiveWallet-Dkf84FVu.js} +1 -1
- package/dist/cjs/{useGetTokenPrice-CouzWOSt.js → useGetTokenPrice-BarE9ei-.js} +1 -1
- package/dist/cjs/{useI18n-DDbtkfuB.js → useI18n-BhKJoNb2.js} +1 -1
- package/dist/cjs/{usePrivy-DUT7RIf5.js → usePrivy-DhBaXRgr.js} +1 -1
- package/dist/cjs/{useSolanaRpcClient-CefJOh8Z.js → useSolanaRpcClient-ugDx2qoe.js} +1 -1
- package/dist/cjs/{useWallets-XTVLGZyz.js → useWallets-BTiaq6pw.js} +1 -1
- package/dist/cjs/{useWallets-DXWvKTyb.js → useWallets-BWoRnKwk.js} +1 -1
- package/dist/dts/{events-context-Fks6josE.d.ts → events-context-rAo2eQMj.d.mts} +1 -1
- package/dist/dts/{events-context-Fks6josE.d.mts → events-context-rAo2eQMj.d.ts} +1 -1
- package/dist/dts/extended-chains.d.mts +1 -1
- package/dist/dts/extended-chains.d.ts +1 -1
- package/dist/dts/farcaster.d.mts +1 -1
- package/dist/dts/farcaster.d.ts +1 -1
- package/dist/dts/index.d.mts +46 -5
- package/dist/dts/index.d.ts +46 -5
- package/dist/dts/internal.d.mts +1 -1
- package/dist/dts/internal.d.ts +1 -1
- package/dist/dts/smart-wallets.d.mts +1 -1
- package/dist/dts/smart-wallets.d.ts +1 -1
- package/dist/dts/solana.d.mts +3 -3
- package/dist/dts/solana.d.ts +3 -3
- package/dist/dts/{types-CjDYScKX.d.mts → types-CDJGb3Hz.d.mts} +2 -22
- package/dist/dts/{types-CjDYScKX.d.ts → types-CDJGb3Hz.d.ts} +2 -22
- package/dist/dts/ui.d.mts +1 -1
- package/dist/dts/ui.d.ts +1 -1
- package/dist/esm/{AccountNotFoundScreen-DzQ8Ded6.mjs → AccountNotFoundScreen-Bl7G6bA0.mjs} +1 -1
- package/dist/esm/{Address-ClnXOtX_.mjs → Address-CYplVOfb.mjs} +1 -1
- package/dist/esm/{AffirmativeConsentScreen-CGLpvQm4.mjs → AffirmativeConsentScreen-DM4TcGfm.mjs} +1 -1
- package/dist/esm/{AllowlistRejectionScreen-0T0W1npW.mjs → AllowlistRejectionScreen-DVLzrq3E.mjs} +1 -1
- package/dist/esm/{AuthenticateWithWalletScreen-aIIbB44q.mjs → AuthenticateWithWalletScreen-Dpv6YNie.mjs} +1 -1
- package/dist/esm/{AwaitingEvmToSolBridgingScreen-Bcx6oRJE.mjs → AwaitingEvmToSolBridgingScreen-DZeUe4U5.mjs} +1 -1
- package/dist/esm/{AwaitingExternalEthereumTransferScreen-BlmM5W1W.mjs → AwaitingExternalEthereumTransferScreen-C0pxxksh.mjs} +1 -1
- package/dist/esm/{AwaitingPasswordlessCodeScreen-DxV44L8v.mjs → AwaitingPasswordlessCodeScreen-dIOkXMLZ.mjs} +1 -1
- package/dist/esm/{AwaitingSolToEvmBridgingScreen-C_VwI_Sw.mjs → AwaitingSolToEvmBridgingScreen-Bnd2OljW.mjs} +1 -1
- package/dist/esm/{BridgeNetworkSelectionView-F7koQMl8.mjs → BridgeNetworkSelectionView-BxiyBV8x.mjs} +1 -1
- package/dist/esm/{CaptchaScreen-BeoBh2yB.mjs → CaptchaScreen-DQDC7JzN.mjs} +1 -1
- package/dist/esm/{CoinbaseOnrampStatusScreen-h359lw0u.mjs → CoinbaseOnrampStatusScreen-DXWKfYnS.mjs} +1 -1
- package/dist/esm/{ConnectEmailForm-D96RP15S.mjs → ConnectEmailForm-BPL4v6UQ.mjs} +1 -1
- package/dist/esm/{ConnectLedgerScreen-DlzVqbV7.mjs → ConnectLedgerScreen-D-YZA4pE.mjs} +1 -1
- package/dist/esm/{ConnectOnlyLandingScreen-wbu-70B6.mjs → ConnectOnlyLandingScreen-BG56JKfT.mjs} +1 -1
- package/dist/esm/{ConnectOnlyStatusScreen-CbWmfcm8.mjs → ConnectOnlyStatusScreen-BqVQKn1g.mjs} +1 -1
- package/dist/esm/{ConnectOrCreateScreen-CSKKpNhC.mjs → ConnectOrCreateScreen-C8u98p86.mjs} +1 -1
- package/dist/esm/{ConnectPhoneForm-Cfdo1Hxx.mjs → ConnectPhoneForm-CvRD6txR.mjs} +1 -1
- package/dist/esm/{ConnectWalletView-D9FJQoQd.mjs → ConnectWalletView-DMF1481Z.mjs} +1 -1
- package/dist/esm/{ConnectionStatusScreen-BCZOSVuo.mjs → ConnectionStatusScreen-BqtmBBAM.mjs} +1 -1
- package/dist/esm/{CrossAppAuthScreen-C9Y8UmMT.mjs → CrossAppAuthScreen-CNTOhQXE.mjs} +1 -1
- package/dist/esm/{CustomLandingScreenView-C9zIdEBy.mjs → CustomLandingScreenView-BDZmrAgq.mjs} +1 -1
- package/dist/esm/{DelegatedActionsConsentScreen-CRlv1sFS.mjs → DelegatedActionsConsentScreen-CRl17MGE.mjs} +1 -1
- package/dist/esm/{DelegatedActionsRevokeScreen-CfOOZLtD.mjs → DelegatedActionsRevokeScreen-cOpjsU01.mjs} +1 -1
- package/dist/esm/{EmbeddedWalletConnectingScreen-DuSxBQbx.mjs → EmbeddedWalletConnectingScreen-DC36YcCz.mjs} +1 -1
- package/dist/esm/EmbeddedWalletCreatedScreen-B1DDJTYV.mjs +1 -0
- package/dist/esm/{EmbeddedWalletKeyExportScreen-CSJq1Sik.mjs → EmbeddedWalletKeyExportScreen-BoFnx_RO.mjs} +1 -1
- package/dist/esm/{EmbeddedWalletOnAccountCreateScreen-DOSya90v.mjs → EmbeddedWalletOnAccountCreateScreen-D_4FNOwi.mjs} +1 -1
- package/dist/esm/{EmbeddedWalletPasswordUpdateScreen-C_es2EpS.mjs → EmbeddedWalletPasswordUpdateScreen-D6Uuy-A9.mjs} +1 -1
- package/dist/esm/{EmbeddedWalletPasswordUpdateSplashScreen-DhwnqiCK.mjs → EmbeddedWalletPasswordUpdateSplashScreen-BF8d9FtJ.mjs} +1 -1
- package/dist/esm/{EnrollTotp-YxZ_oitd.mjs → EnrollTotp-BFVbJMub.mjs} +1 -1
- package/dist/esm/{ErrorScreen-DZ153hPv.mjs → ErrorScreen-Gt5V4pQE.mjs} +1 -1
- package/dist/esm/{FarcasterConnectStatusScreen-CwQhh_aC.mjs → FarcasterConnectStatusScreen-CIOdHs1x.mjs} +1 -1
- package/dist/esm/{FarcasterSignerStatusScreen-D1SKEl4x.mjs → FarcasterSignerStatusScreen-AvZdT50N.mjs} +1 -1
- package/dist/esm/{FundSolWalletWithExternalSolanaWallet-CH85fmbL.mjs → FundSolWalletWithExternalSolanaWallet-Bd6oLp6j.mjs} +1 -1
- package/dist/esm/{FundWalletMethodHeader-D0DhWPu0.mjs → FundWalletMethodHeader-DhUicNAG.mjs} +1 -1
- package/dist/esm/FundWithBankDepositScreen-Ct4tNUuQ.mjs +176 -0
- package/dist/esm/{FundingEditAmountScreen-C_YGQD1r.mjs → FundingEditAmountScreen-DVXEtSrh.mjs} +1 -1
- package/dist/esm/FundingMethodSelectionScreen-BmMfVAl1.mjs +1 -0
- package/dist/esm/{InAppBrowserLoginNotPossible-BiwxWFju.mjs → InAppBrowserLoginNotPossible-C9mhGZgZ.mjs} +1 -1
- package/dist/esm/{InstallWalletScreen-DHPONpNA.mjs → InstallWalletScreen-D0Z6ZDpC.mjs} +1 -1
- package/dist/esm/{LandingScreen-DBZbonr_.mjs → LandingScreen-J2lzt1oF.mjs} +1 -1
- package/dist/esm/{LinkConflictScreen-D0TlabXV.mjs → LinkConflictScreen-Bug434v0.mjs} +1 -1
- package/dist/esm/{LinkEmailScreen-D9zKrb4E.mjs → LinkEmailScreen-B0OLiefL.mjs} +1 -1
- package/dist/esm/{LinkPasskeyScreen-3_thbT6t.mjs → LinkPasskeyScreen-D9SIq3bj.mjs} +1 -1
- package/dist/esm/{LinkPhoneScreen-BwBdaLqt.mjs → LinkPhoneScreen-D__kO_fD.mjs} +1 -1
- package/dist/esm/{LoginFailedScreen-Dxi-7tx8.mjs → LoginFailedScreen-qfmnt41u.mjs} +1 -1
- package/dist/esm/{ManualTransferScreen-e347H8JC.mjs → ManualTransferScreen-BFCyDGSu.mjs} +1 -1
- package/dist/esm/{MfaAuthEnrollmentFlowScreen-BUF154dJ.mjs → MfaAuthEnrollmentFlowScreen-D0w3-vdh.mjs} +1 -1
- package/dist/esm/{MfaAuthVerifyFlowScreen-BJ4ZNRWe.mjs → MfaAuthVerifyFlowScreen-CRYURiDv.mjs} +1 -1
- package/dist/esm/{MfaEnrollmentFlowScreen-B5DfdOkM.mjs → MfaEnrollmentFlowScreen-DdMNW5I5.mjs} +1 -1
- package/dist/esm/{MfaVerifyFlowScreen-fjVmi3M8.mjs → MfaVerifyFlowScreen-Cp4spBFc.mjs} +1 -1
- package/dist/esm/{ModalHeader-DBfMXKy4.mjs → ModalHeader-o3NBflPS.mjs} +1 -1
- package/dist/esm/{MoonpayStatusScreen-BeZtoeAo.mjs → MoonpayStatusScreen-DEh0wNk6.mjs} +1 -1
- package/dist/esm/{OAuthStatusScreen-BVLexXQC.mjs → OAuthStatusScreen-C7AX6T_8.mjs} +1 -1
- package/dist/esm/{PasskeySelectSignupOrLogin-CejGrqSb.mjs → PasskeySelectSignupOrLogin-rWeNAlAx.mjs} +1 -1
- package/dist/esm/{PasskeyStatusScreen-BrDLZfaA.mjs → PasskeyStatusScreen-B787hD8-.mjs} +1 -1
- package/dist/esm/{PasswordRecoveryScreen-Bks4ITku.mjs → PasswordRecoveryScreen-Cg8bsXya.mjs} +1 -1
- package/dist/esm/{QrCode-CKNL79V_.mjs → QrCode-rl0SJEeD.mjs} +1 -1
- package/dist/esm/{RecoveryOAuthStatusScreen-TsrFc2KU.mjs → RecoveryOAuthStatusScreen-gxcHRbq0.mjs} +1 -1
- package/dist/esm/{RecoveryPasswordCreateScreen--aWRhenB.mjs → RecoveryPasswordCreateScreen-BA_D-kAG.mjs} +1 -1
- package/dist/esm/{RecoverySelectionScreen-DJ33E1hd.mjs → RecoverySelectionScreen-CRGkO5yf.mjs} +1 -1
- package/dist/esm/{Screen-omroCwTV.mjs → Screen-Olwu6khI.mjs} +1 -1
- package/dist/esm/{ScreenLayout-z1I4hafk.mjs → ScreenLayout-C8IaXeHq.mjs} +1 -1
- package/dist/esm/{SetAutomaticRecoveryScreen-DelsQl1S.mjs → SetAutomaticRecoveryScreen-DvKhJA06.mjs} +1 -1
- package/dist/esm/{SetWalletPasswordForm-DyVubYdV.mjs → SetWalletPasswordForm-J_hFHP-B.mjs} +1 -1
- package/dist/esm/{SignRequestScreen-C6XvfvXV.mjs → SignRequestScreen-CL1SQeYq.mjs} +1 -1
- package/dist/esm/{StandardSignAndSendTransactionScreen-FQcyAQoq.mjs → StandardSignAndSendTransactionScreen-DJMqA41z.mjs} +1 -1
- package/dist/esm/{TelegramAuthScreen-LB2IdLqW.mjs → TelegramAuthScreen-DpKMNMVv.mjs} +1 -1
- package/dist/esm/{TransactionDetails-CLHEcWFe.mjs → TransactionDetails-D9-ndAu8.mjs} +1 -1
- package/dist/esm/{TransactionErrorView-D7uZmR_V.mjs → TransactionErrorView-yLqUT7Rl.mjs} +1 -1
- package/dist/esm/{TransferFromWalletScreen-BLLYNl1T.mjs → TransferFromWalletScreen-5nMASUt-.mjs} +1 -1
- package/dist/esm/{TransferOrBridgeLoadingScreen-DgS9Jr0v.mjs → TransferOrBridgeLoadingScreen-MqSi9Eb8.mjs} +1 -1
- package/dist/esm/{UpdateEmailScreen-DGAco54E.mjs → UpdateEmailScreen-Cu56W559.mjs} +1 -1
- package/dist/esm/{UpdatePhoneScreen-CLCixHYj.mjs → UpdatePhoneScreen-55t_PLxV.mjs} +1 -1
- package/dist/esm/{UserLimitReachedScreen-ClahBH0m.mjs → UserLimitReachedScreen-CizlxFDa.mjs} +1 -1
- package/dist/esm/{WalletInfoCard-BURM3rIP.mjs → WalletInfoCard-CDrk5VVS.mjs} +1 -1
- package/dist/esm/{WalletInterstitialScreen-CBzg1He2.mjs → WalletInterstitialScreen-C0EzB23i.mjs} +1 -1
- package/dist/esm/{WalletLink-BXlPbPVx.mjs → WalletLink-CZavxRCS.mjs} +1 -1
- package/dist/esm/{WalletOverflowButton-CWeBF-Wv.mjs → WalletOverflowButton-CkCL3wvE.mjs} +1 -1
- package/dist/esm/abstract-smart-wallets.mjs +1 -1
- package/dist/esm/context-BeiVf64h.mjs +1 -0
- package/dist/esm/{ethers-B0Y3_-Pp.mjs → ethers-CJf4V9xJ.mjs} +1 -1
- package/dist/esm/extended-chains.mjs +1 -1
- package/dist/esm/{get-is-unified-wallet-j2fzd2YE.mjs → get-is-unified-wallet-CyC08yWM.mjs} +1 -1
- package/dist/esm/index-BAl9y5La.mjs +174 -0
- package/dist/esm/{index-Dk-s5iXx.mjs → index-DCaoh7wM.mjs} +1 -1
- package/dist/esm/{index-CIjObncO.mjs → index-M8HqoPUl.mjs} +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal.mjs +1 -1
- package/dist/esm/{shared-B_TYFBiH.mjs → shared-DWMbzbT_.mjs} +1 -1
- package/dist/esm/{shouldProceedtoEmbeddedWalletCreationFlow-DjxNSuIS.mjs → shouldProceedtoEmbeddedWalletCreationFlow-_LduuU-p.mjs} +1 -1
- package/dist/esm/{smart-wallets-DL1EjW8i.mjs → smart-wallets-69e9jC8u.mjs} +1 -1
- package/dist/esm/smart-wallets.mjs +1 -1
- package/dist/esm/solana.mjs +1 -1
- package/dist/esm/{styles-BeQ5nIO3.mjs → styles-DOOmqCS1.mjs} +1 -1
- package/dist/esm/{to-ui-error-DR840l8Y.mjs → to-ui-error-Crh1yzND.mjs} +1 -1
- package/dist/esm/ui.mjs +1 -1
- package/dist/esm/use-export-wallet-5ZtAXJqT.mjs +1 -0
- package/dist/esm/{use-export-wallet-AwUSjJIc.mjs → use-export-wallet-CmiZHDwY.mjs} +1 -1
- package/dist/esm/{useActiveWallet-Dqi9nNxj.mjs → useActiveWallet-CdOTNCcL.mjs} +1 -1
- package/dist/esm/{useGetTokenPrice-Djb6UHOW.mjs → useGetTokenPrice-TFzNln4c.mjs} +1 -1
- package/dist/esm/{useI18n-BK0a87xw.mjs → useI18n-MsO3QTRN.mjs} +1 -1
- package/dist/esm/{usePrivy-D9f62ILp.mjs → usePrivy-D6pEtdwq.mjs} +1 -1
- package/dist/esm/{useSolanaRpcClient-DizarIU5.mjs → useSolanaRpcClient-Re4dIYnK.mjs} +1 -1
- package/dist/esm/{useWallets-DQOA0__U.mjs → useWallets-AiuOd29U.mjs} +1 -1
- package/dist/esm/{useWallets-BKPOCKnv.mjs → useWallets-BCEKqhGq.mjs} +1 -1
- package/package.json +3 -3
- package/dist/cjs/FundWithBankDepositScreen-C1BRYtc8.js +0 -175
- package/dist/cjs/FundingMethodSelectionScreen-CL9xLuBR.js +0 -1
- package/dist/cjs/index-CgsQCH2r.js +0 -174
- package/dist/cjs/use-export-wallet-BEW54Ynq.js +0 -1
- package/dist/esm/EmbeddedWalletCreatedScreen--ZpH1G0k.mjs +0 -1
- package/dist/esm/FundWithBankDepositScreen-BJk-wxSq.mjs +0 -175
- package/dist/esm/FundingMethodSelectionScreen-gGZKP4LD.mjs +0 -1
- package/dist/esm/context-CCRnMB8L.mjs +0 -1
- package/dist/esm/index-BgGYO9kN.mjs +0 -174
- package/dist/esm/use-export-wallet-Voe8hSb9.mjs +0 -1
package/dist/esm/{CustomLandingScreenView-C9zIdEBy.mjs → CustomLandingScreenView-BDZmrAgq.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as i}from"react/jsx-runtime";import a from"@heroicons/react/24/outline/UserCircleIcon";import l,{useState as r,useEffect as n,useRef as o,useMemo as s}from"react";import{styled as c}from"styled-components";import{T as d,M as p,B as h}from"./ModalHeader-
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as i}from"react/jsx-runtime";import a from"@heroicons/react/24/outline/UserCircleIcon";import l,{useState as r,useEffect as n,useRef as o,useMemo as s}from"react";import{styled as c}from"styled-components";import{T as d,M as p,B as h}from"./ModalHeader-o3NBflPS.mjs";import{u}from"./context-BeiVf64h.mjs";import{U as g,G as m,H as f,V as y,F as w,W as v,X as C,Y as b,e as k,Z as S,d as T,_ as M,$ as x,a0 as A}from"./useActiveWallet-CdOTNCcL.mjs";import{u as L}from"./internal-context-Z-fyxadS.mjs";import{u as W,a as E,i as I}from"./get-is-unified-wallet-CyC08yWM.mjs";import{a as P,t as N}from"./index-BAl9y5La.mjs";import{u as j,b as D,c as O}from"./ConnectWalletView-DMF1481Z.mjs";import{Mail as R,Smartphone as V,UserCircle as _}from"lucide-react";import{C as U}from"./ConnectEmailForm-BPL4v6UQ.mjs";import{C as F}from"./Chip-D2-wZOHJ.mjs";import{F as $}from"./farcaster-DPlSjvF5.mjs";import{toObjectKeys as z}from"@privy-io/js-sdk-core";import H from"@heroicons/react/24/outline/QuestionMarkCircleIcon";import G from"@heroicons/react/24/outline/FingerPrintIcon";import{L as q}from"./Link-DJ5gq9Di.mjs";import{C as B}from"./ConnectPhoneForm-CvRD6txR.mjs";import{T as K,a as Y,I as Z,S as Q,L as X,G as J,b as ee,D as te,A as ie}from"./twitter-BoAxhlj6.mjs";import{T as ae,L as le}from"./twitch-5IOe4sIQ.mjs";import{T as re}from"./telegram-B-JqnkqZ.mjs";import{W as ne}from"./WalletOverflowButton-CkCL3wvE.mjs";import{S as oe}from"./ScreenLayout-C8IaXeHq.mjs";const se=()=>{let t=u(),i=t?.appearance?.logo,a=`${t?.name} logo`,r={maxHeight:"90px",maxWidth:"180px"};return i?"string"==typeof i?/*#__PURE__*/e("img",{src:i,alt:a,style:r}):"svg"===i.type||"img"===i.type?/*#__PURE__*/l.cloneElement(i,{alt:a,style:r}):(console.warn("`config.appearance.logo` must be a string, or an SVG / IMG element. Nothing will be rendered."),null):null},ce=c.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
align-items: center;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{AlertCircle as t,CheckCircle as o,CloudUpload as r}from"lucide-react";import{useState as s,useEffect as i}from"react";import{W as a}from"./WalletInfoCard-
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{AlertCircle as t,CheckCircle as o,CloudUpload as r}from"lucide-react";import{useState as s,useEffect as i}from"react";import{W as a}from"./WalletInfoCard-CDrk5VVS.mjs";import{u as n,r as c}from"./context-BeiVf64h.mjs";import{u as m,a as l}from"./internal-context-Z-fyxadS.mjs";import{a as p}from"./get-is-unified-wallet-CyC08yWM.mjs";import{S as u}from"./ScreenLayout-C8IaXeHq.mjs";import"styled-components";import"./ModalHeader-o3NBflPS.mjs";import"./useActiveWallet-CdOTNCcL.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-5ZtAXJqT.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"viem/utils";import"./useWallets-BCEKqhGq.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./ErrorMessage-D8VaAP5m.mjs";import"./LabelXs-oqZNqbm_.mjs";import"./Address-CYplVOfb.mjs";import"./shared-FM0rljBt.mjs";import"tinycolor2";import"ofetch";import"@privy-io/are-addresses-equal";import"./Screen-Olwu6khI.mjs";import"./index-Dq_xe9dz.mjs";const d=({appName:s,address:i,success:n,error:c,onAccept:m,onDecline:l,onClose:p})=>/*#__PURE__*/e(u,n||c?{title:c?"Something went wrong":"Success!",subtitle:c?"Please try again.":`You've successfully granted delegated action permissions to ${s}.`,icon:c?t:o,iconVariant:c?"error":"success",onBack:p,watermark:!0}:{title:"Enable offline access",subtitle:`By confirming, ${s} will be able to use your wallet for you even when you're not around. You can revoke this later.`,icon:r,primaryCta:{label:"Accept",onClick:m},secondaryCta:{label:"Not now",onClick:l},onBack:p,watermark:!0,children:/*#__PURE__*/e(a,{address:i,title:"Wallet"})}),j={component:()=>{let{data:t}=p(),o=n(),{closePrivyModal:r}=m(),[a,u]=s(!1),[j,f]=s(),{address:y,onDelegate:g,onSuccess:h,onError:w}=t.delegatedActions.consent,v=async()=>{a?h():w(j??new l("User declined delegating actions.")),r({shouldCallAuthOnSuccess:!1})};return i((()=>{if(!a&&!j)return;let e=setTimeout(v,c);return()=>clearTimeout(e)}),[a,j]),/*#__PURE__*/e(d,{appName:o.name,address:y,success:a,error:j,onAccept:async()=>{try{await g(),u(!0)}catch(e){f(e)}},onDecline:()=>{v()},onClose:v})}};export{j as DelegatedActionsConsentScreen,d as DelegatedActionsConsentScreenView,j as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{AlertCircle as o,CheckCircle as t,Ban as r}from"lucide-react";import{useState as i,useEffect as n}from"react";import{u as s,r as a}from"./context-
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{AlertCircle as o,CheckCircle as t,Ban as r}from"lucide-react";import{useState as i,useEffect as n}from"react";import{u as s,r as a}from"./context-BeiVf64h.mjs";import{u as c,a as m}from"./internal-context-Z-fyxadS.mjs";import{a as l}from"./get-is-unified-wallet-CyC08yWM.mjs";import{S as p}from"./ScreenLayout-C8IaXeHq.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"@privy-io/are-addresses-equal";import"./ModalHeader-o3NBflPS.mjs";import"styled-components";import"./useActiveWallet-CdOTNCcL.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-5ZtAXJqT.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-BCEKqhGq.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-Olwu6khI.mjs";import"./index-Dq_xe9dz.mjs";const u=({appName:i,success:n,error:s,onRevoke:a,onDeny:c,onClose:m})=>/*#__PURE__*/e(p,n||s?{title:s?"Something went wrong":"Success!",subtitle:s?"Please try again.":"You've successfully revoked permissions.",icon:s?o:t,iconVariant:s?"error":"success",onBack:m,watermark:!0}:{title:"Revoke offline access to wallet",subtitle:`By confirming, ${i} will no longer be able to use this wallet on your behalf when you are not online.`,icon:r,primaryCta:{label:"Confirm",onClick:a},secondaryCta:{label:"Deny",onClick:c},onBack:m,watermark:!0}),d={component:()=>{let{data:o}=l(),t=s(),{closePrivyModal:r}=c(),[p,d]=i(!1),[y,f]=i(),{onRevoke:v,onSuccess:k,onError:j}=o.delegatedActions.revoke,w=async()=>{p?k():j(y??new m("User declined revoking access to their delegated wallet.")),r({shouldCallAuthOnSuccess:!1})};return n((()=>{if(!p&&!y)return;let e=setTimeout(w,a);return()=>clearTimeout(e)}),[p,y]),/*#__PURE__*/e(u,{appName:t.name,success:p,error:y,onRevoke:async()=>{try{await v(),d(!0)}catch(e){f(e)}},onDeny:()=>{w()},onClose:w})}};export{d as DelegatedActionsRevokeScreen,u as DelegatedActionsRevokeScreenView,d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{XCircle as t}from"lucide-react";import{useMemo as r,useState as o,useEffect as i}from"react";import{e as a,c as n}from"./index-
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{XCircle as t}from"lucide-react";import{useMemo as r,useState as o,useEffect as i}from"react";import{e as a,c as n}from"./index-BAl9y5La.mjs";import{u as s}from"./internal-context-Z-fyxadS.mjs";import{u as l,a as c}from"./get-is-unified-wallet-CyC08yWM.mjs";import{S as m}from"./ScreenLayout-C8IaXeHq.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-CdOTNCcL.mjs";import"zustand";import"./context-BeiVf64h.mjs";import"tinycolor2";import"styled-components";import"react-device-detect";import"./use-export-wallet-5ZtAXJqT.mjs";import"viem/utils";import"./useWallets-BCEKqhGq.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-D6pEtdwq.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"./ModalHeader-o3NBflPS.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-Olwu6khI.mjs";import"./index-Dq_xe9dz.mjs";const p=({connectionFailed:r,onClose:o})=>/*#__PURE__*/e(m,r?{title:"Something went wrong",subtitle:"We're on it. Please try again later.",icon:t,iconVariant:"error",primaryCta:{label:"Close",onClick:o},watermark:!0}:{title:"Connecting to your wallet",subtitle:"Please wait...",iconVariant:"loading",showClose:!0,onClose:o,watermark:!1}),d={component:()=>{let{authenticated:t,user:m}=l(),{client:d,closePrivyModal:u,createAnalyticsEvent:y,walletProxy:v}=s(),{navigate:h,data:f,setModalData:w,onUserCloseViaDialogOrKeybindRef:b}=c(),j=r((()=>Date.now()),[]),[g,C]=o(!1),{onCompleteNavigateTo:A,onFailure:I,shouldForceMFA:k,entropyId:x,entropyIdVerifier:P,recoveryMethod:S,connectingWalletAddress:F,isUnifiedWallet:T=!1}=f?.connectWallet,W=e=>{g||(C(!0),I("string"==typeof e?Error(e):e))};return i((()=>{let e;return t?v?((async()=>{let t=await d.getAccessToken();if(!t)return W("User must be authenticated and have a Privy wallet before it can be connected");try{if(!T){if(!x||!P)return W("For on-device first-class chain wallets, entropyId and entropyIdVerifier are required");await v.connect({accessToken:t,entropyId:x,entropyIdVerifier:P})}k&&await v.verifyMfa({accessToken:t});let r=(Date.now()-j)/1e3;"EmbeddedWalletKeyExportScreen"===A&&r<1?e=setTimeout((()=>{h(A,!1)}),1e3*(1-r)):h(A,!1)}catch(e){if(a(e)&&"privy"===S){let e=await d.getAccessToken();if(!e)return W("User must be authenticated and have a Privy wallet before it can be recovered");try{y({eventName:"embedded_wallet_pinless_recovery_started",payload:{walletAddress:F}});let t=await(v?.recover({accessToken:e,entropyId:x,entropyIdVerifier:P}));t?.entropyId||W(Error("Unable to recover wallet")),A?h(A):u({shouldCallAuthOnSuccess:!1}),y({eventName:"embedded_wallet_recovery_completed",payload:{walletAddress:F}}),h(A)}catch(e){W("An error has occurred, please try again.")}}else a(e)&&"privy"!==S&&"privy-v2"!==S?(w({...f,recoverWallet:{entropyId:x,entropyIdVerifier:P,onCompleteNavigateTo:A,onFailure:I},recoveryOAuthStatus:{provider:S,action:"recover",isInAccountCreateFlow:!1,shouldCreateEth:!1,shouldCreateSol:!1}}),h(n(S))):W(e)}})(),()=>clearTimeout(e)):void 0:W("User must be authenticated and have a Privy wallet before it can be connected")}),[t,m,v]),b.current=()=>{W("User exited before wallet could be connected"),u({shouldCallAuthOnSuccess:!1})},/*#__PURE__*/e(p,{connectionFailed:g,onClose:()=>u({shouldCallAuthOnSuccess:!1})})}};export{d as EmbeddedWalletConnectingScreen,p as EmbeddedWalletConnectingView,d as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{CheckCircle as t}from"lucide-react";import{useEffect as o}from"react";import{u as r,a as i,c as s,d as c}from"./get-is-unified-wallet-CyC08yWM.mjs";import{u as a,r as n}from"./context-BeiVf64h.mjs";import{u as m}from"./internal-context-Z-fyxadS.mjs";import{S as l}from"./ScreenLayout-C8IaXeHq.mjs";import"@privy-io/are-addresses-equal";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"./ModalHeader-o3NBflPS.mjs";import"styled-components";import"./useActiveWallet-CdOTNCcL.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-5ZtAXJqT.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-BCEKqhGq.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-Olwu6khI.mjs";import"./index-Dq_xe9dz.mjs";const u=({title:o,description:r,onClose:i})=>/*#__PURE__*/e(l,{title:o,subtitle:r,icon:t,iconVariant:"success",watermark:!0,onBack:i}),p={component:()=>{let{user:t}=r(),{closePrivyModal:l,isNewUserThisSession:p,updateWallets:d}=m(),{data:j,onUserCloseViaDialogOrKeybindRef:f}=i(),h=a(),{onSuccess:v,onFailure:y,callAuthOnSuccessOnClose:w}=j.createWallet,x=()=>{let e=s(t)??c(t);t&&e?(d(),v({user:t,account:e})):y(Error("Failed to create wallet")),l({shouldCallAuthOnSuccess:w})};o((()=>{let e=setTimeout(x,n);return()=>clearTimeout(e)}),[]),f.current=x;let A=p&&!((t?.linkedAccounts?.length??0)>1);/*#__PURE__*/return e(u,{title:A?"Welcome"+(h?.name?` to ${h?.name}`:""):"All set!",description:A?"You've successfully created an account.":"Your account is secured.",onClose:x})}};export{p as EmbeddedWalletCreatedScreen,u as EmbeddedWalletCreatedScreenView,p as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as e,jsxs as r,Fragment as t}from"react/jsx-runtime";import{useState as o,useEffect as i,useRef as n}from"react";import{styled as a}from"styled-components";import{constructURL as l}from"@privy-io/urls";import{W as d}from"./WarningBanner-c8L53pJ2.mjs";import{W as c}from"./WalletInfoCard-
|
|
1
|
+
import{jsx as e,jsxs as r,Fragment as t}from"react/jsx-runtime";import{useState as o,useEffect as i,useRef as n}from"react";import{styled as a}from"styled-components";import{constructURL as l}from"@privy-io/urls";import{W as d}from"./WarningBanner-c8L53pJ2.mjs";import{W as c}from"./WalletInfoCard-CDrk5VVS.mjs";import{u as s}from"./context-BeiVf64h.mjs";import{u as p}from"./internal-context-Z-fyxadS.mjs";import{u as m,a as u}from"./get-is-unified-wallet-CyC08yWM.mjs";import{S as h}from"./ScreenLayout-C8IaXeHq.mjs";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"lucide-react";import"./ModalHeader-o3NBflPS.mjs";import"./useActiveWallet-CdOTNCcL.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-5ZtAXJqT.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"viem/utils";import"./useWallets-BCEKqhGq.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./ErrorMessage-D8VaAP5m.mjs";import"./LabelXs-oqZNqbm_.mjs";import"./Address-CYplVOfb.mjs";import"./shared-FM0rljBt.mjs";import"tinycolor2";import"ofetch";import"@privy-io/are-addresses-equal";import"./Screen-Olwu6khI.mjs";import"./index-Dq_xe9dz.mjs";const y=({address:o,accessToken:i,appConfigTheme:n,onClose:a,isLoading:l=!1,exportButtonProps:s,onBack:p})=>/*#__PURE__*/e(h,{title:"Export wallet",subtitle:/*#__PURE__*/r(t,{children:["Copy either your private key or seed phrase to export your wallet."," ",/*#__PURE__*/e("a",{href:"https://privy-io.notion.site/Transferring-your-account-9dab9e16c6034a7ab1ff7fa479b02828",target:"blank",rel:"noopener noreferrer",children:"Learn more"})]}),onClose:a,onBack:p,showBack:!!p,watermark:!0,children:/*#__PURE__*/r(g,{children:[/*#__PURE__*/e(d,{theme:n,children:"Never share your private key or seed phrase with anyone."}),/*#__PURE__*/e(c,{title:"Your wallet",address:o,showCopyButton:!0}),/*#__PURE__*/e("div",{style:{width:"100%"},children:l?/*#__PURE__*/e(f,{}):i&&s&&/*#__PURE__*/e(w,{accessToken:i,dimensions:{height:"44px"},...s})})]})});let g=a.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 1.25rem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{XCircle as t}from"lucide-react";import{useState as r,useEffect as o}from"react";import{generateWalletIdempotencyKey as i}from"@privy-io/js-sdk-core";import{u as a}from"./context-
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{XCircle as t}from"lucide-react";import{useState as r,useEffect as o}from"react";import{generateWalletIdempotencyKey as i}from"@privy-io/js-sdk-core";import{u as a}from"./context-BeiVf64h.mjs";import{v as s,s as l,k as n,F as m,R as c}from"./index-BAl9y5La.mjs";import{u as d,m as p}from"./internal-context-Z-fyxadS.mjs";import{a as u,u as h}from"./get-is-unified-wallet-CyC08yWM.mjs";import{S as y}from"./ScreenLayout-C8IaXeHq.mjs";import"tinycolor2";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-CdOTNCcL.mjs";import"zustand";import"styled-components";import"react-device-detect";import"./use-export-wallet-5ZtAXJqT.mjs";import"viem/utils";import"./useWallets-BCEKqhGq.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-D6pEtdwq.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"./ModalHeader-o3NBflPS.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-Olwu6khI.mjs";import"./index-Dq_xe9dz.mjs";const w=({errorMessage:r,onClose:o})=>/*#__PURE__*/e(y,r?{title:"Something went wrong",subtitle:r,icon:t,iconVariant:"error",primaryCta:{label:"Close",onClick:o},watermark:!0}:{title:"Creating your wallet",subtitle:"Please wait...",iconVariant:"loading",watermark:!1}),v={component:()=>{let{setModalData:t,navigate:y,data:v,onUserCloseViaDialogOrKeybindRef:g}=u(),j=a(),[C,f]=r(""),{embeddedWallets:b}=a(),{authenticated:S,user:x}=h(),{closePrivyModal:W,walletProxy:O,client:A}=d(),{onSuccess:k,onFailure:P,callAuthOnSuccessOnClose:I,shouldCreateEth:M,shouldCreateSol:R}=v.createWallet,U="legacy-embedded-wallets-only"===j.embeddedWallets.mode&&!0===j?.embeddedWallets.requireUserOwnedRecoveryOnCreate,[E,L]=r(null),{create:F}=s(),K=M??(!!x&&l(x,j.embeddedWallets.ethereum.createOnLogin)),T=R??(!!x&&n(x,j.embeddedWallets.solana.createOnLogin)),V=new c((async()=>{let e=await A.getAccessToken();if(x&&e&&O)try{let e,t=await i(x.id,"ethereum"),r=await i(x.id,"solana");if(K&&T)e=await F({chainType:"ethereum",walletIndex:0,latestUser:x,idempotencyKey:t}),e=await F({chainType:"solana",walletIndex:0,latestUser:e.user,idempotencyKey:r});else if(T)e=await F({chainType:"solana",walletIndex:0,latestUser:x,idempotencyKey:r});else{if(!K)return void W({shouldCallAuthOnSuccess:I});e=await F({chainType:"ethereum",walletIndex:0,latestUser:x,idempotencyKey:t})}L(e),y("EmbeddedWalletCreatedScreen")}catch(e){f(e.message)}}));return o((()=>S&&x?U?(t({...v,createWallet:{...v.createWallet,shouldCreateEth:K,shouldCreateSol:T},recoverySelection:{...v?.recoverySelection,isInAccountCreateFlow:!0,shouldCreateEth:K,shouldCreateSol:T}}),y(m({walletAction:"create",showAutomaticRecovery:!1,availableRecoveryMethods:b.userOwnedRecoveryOptions,legacySetWalletPasswordFlow:!1,isResettingPassword:!1}))):void V.execute():(y("LandingScreen"),void P(Error("User must be authenticated before creating a Privy wallet")))),[U,S]),g.current=()=>null/*#__PURE__*/,e(w,{errorMessage:C||void 0,onClose:()=>{E?(k(E),W({shouldCallAuthOnSuccess:I})):(P(new p("User wallet creation failed")),W({shouldCallAuthOnSuccess:!1}))}})}};export{v as EmbeddedWalletOnAccountCreateScreen,w as EmbeddedWalletOnAccountCreateView,v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{useState as o,useEffect as r}from"react";import{u as t,a as s,g as a}from"./get-is-unified-wallet-
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useState as o,useEffect as r}from"react";import{u as t,a as s,g as a}from"./get-is-unified-wallet-CyC08yWM.mjs";import{u as i}from"./context-BeiVf64h.mjs";import{u as n,o as d,m as c}from"./internal-context-Z-fyxadS.mjs";import{g as l}from"./useWallets-BCEKqhGq.mjs";import{S as m,g as p}from"./SetWalletPasswordForm-J_hFHP-B.mjs";import"@privy-io/are-addresses-equal";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"./Layouts-BlFm53ED.mjs";import"styled-components";import"./ModalHeader-o3NBflPS.mjs";import"./useActiveWallet-CdOTNCcL.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-5ZtAXJqT.mjs";import"eventemitter3";import"viem/utils";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./shared-DWMbzbT_.mjs";import"@heroicons/react/24/outline/ArrowPathIcon";import"@heroicons/react/24/outline/EyeIcon";import"@heroicons/react/24/outline/EyeSlashIcon";import"./Checkbox-BhNoOKjX.mjs";import"@heroicons/react/24/outline/KeyIcon";import"@heroicons/react/24/solid/CheckCircleIcon";import"fast-password-entropy";import"secure-password-utilities";import"secure-password-utilities/wordlists";import"@heroicons/react/24/outline/ArrowDownTrayIcon";import"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import"@heroicons/react/24/outline/DocumentDuplicateIcon";import"@heroicons/react/24/solid/XCircleIcon";import"./ScreenHeader-CHmc4-Lu.mjs";const u={component:()=>{let[u,w]=o(null),[y,h]=o(!1),[v,g]=o(null),[f,_]=o(""),{authenticated:A,user:I}=t(),{client:M,walletProxy:j,refreshSessionAndUser:C,closePrivyModal:R,createAnalyticsEvent:b}=n(),{navigate:P,data:x,onUserCloseViaDialogOrKeybindRef:S}=s(),E=i(),{onSuccess:k,onFailure:N}=x.setWalletPassword,D=a(I),O="user-passcode"===u?.recoveryMethod,L="user-passcode"===D?.recoveryMethod;r((()=>{A||(P("LandingScreen"),N(new d("User must be authenticated before setting a password on a Privy wallet")))}),[A]);let T=()=>v?(N(v),void R({shouldCallAuthOnSuccess:!1})):O?(k(u),void R({shouldCallAuthOnSuccess:!1})):(N(new c("Exited before password was added to wallet")),void R({shouldCallAuthOnSuccess:!1}));S.current=T;/*#__PURE__*/return e(m,{appName:E?.name||"privy",config:{initiatedBy:"user",onCancel:T},error:v?"An error has occurred, please try again.":void 0,buttonLoading:y,buttonHideAnimations:!1,password:f,isResettingPassword:L,onPasswordGenerate:()=>_(p()),onPasswordChange:_,onSubmit:async()=>{O?(k(u),R({shouldCallAuthOnSuccess:!1})):(h(!0),g(null),await(async()=>{let e=await M.getAccessToken();if(e&&I&&D?.address&&f&&j)try{b({eventName:"embedded_wallet_set_recovery_started",payload:{walletAddress:D.address,existingRecoveryMethod:D.recoveryMethod,targetRecoveryMethod:"user-passcode",isResettingPassword:L}});let{entropyId:o,entropyIdVerifier:r}=l(I);if(!(await j.setRecovery({accessToken:e,entropyId:o,entropyIdVerifier:r,recoveryPassword:f,recoveryMethod:"user-passcode"})).entropyId)return g(new c("Error setting password on privy wallet")),void b({eventName:"embedded_wallet_set_recovery_failed",payload:{walletAddress:D.address,existingRecoveryMethod:D.recoveryMethod,targetRecoveryMethod:"user-passcode",isResettingPassword:L,reason:"error setting password"}});let t=await C(),s=a(t);if(!s)return g(new c("Error setting password on privy wallet")),void b({eventName:"embedded_wallet_set_recovery_failed",payload:{walletAddress:D.address,existingRecoveryMethod:D.recoveryMethod,targetRecoveryMethod:"user-passcode",isResettingPassword:L,reason:"wallet disconnected"}});w(s),b({eventName:"embedded_wallet_set_recovery_completed",payload:{walletAddress:D.address,existingRecoveryMethod:D.recoveryMethod,targetRecoveryMethod:"user-passcode",isResettingPassword:L}})}catch(e){console.warn(e),g(e instanceof Error?e:Error("Error setting password on privy wallet")),b({eventName:"embedded_wallet_set_password_failed",payload:{walletAddress:D.address,reason:e}})}})(),h(!1))},onClose:T})}};export{u as EmbeddedWalletPasswordUpdateScreen,u as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as o,Fragment as t}from"react/jsx-runtime";import{Lock as r}from"lucide-react";import{u as i,m as s}from"./internal-context-Z-fyxadS.mjs";import{a}from"./get-is-unified-wallet-
|
|
1
|
+
import{jsx as e,jsxs as o,Fragment as t}from"react/jsx-runtime";import{Lock as r}from"lucide-react";import{u as i,m as s}from"./internal-context-Z-fyxadS.mjs";import{a}from"./get-is-unified-wallet-CyC08yWM.mjs";import{S as m}from"./ScreenLayout-C8IaXeHq.mjs";import"ofetch";import"react";import"@privy-io/are-addresses-equal";import"./context-BeiVf64h.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./ModalHeader-o3NBflPS.mjs";import"styled-components";import"./useActiveWallet-CdOTNCcL.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-5ZtAXJqT.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-BCEKqhGq.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-Olwu6khI.mjs";import"./index-Dq_xe9dz.mjs";const c=({onClose:i,onProceed:s})=>/*#__PURE__*/e(m,{title:"Secure Your Account",subtitle:/*#__PURE__*/o(t,{children:["Please set a password to secure your account.",/*#__PURE__*/e("br",{}),"Losing access to this password and this device will make your account inaccessible."]}),icon:r,primaryCta:{label:"Add password",onClick:s},onClose:i,watermark:!0}),n={component:()=>{let{closePrivyModal:o}=i(),{data:t,navigate:r,onUserCloseViaDialogOrKeybindRef:m}=a(),{onFailure:n}=t.setWalletPassword,l=()=>{n(new s("Exited before password was added to wallet")),o({shouldCallAuthOnSuccess:!1})};return m.current=l,/*#__PURE__*/e(c,{onClose:l,onProceed:()=>{r("EmbeddedWalletPasswordUpdateScreen")}})}};export{n as EmbeddedWalletPasswordUpdateSplashScreen,c as EmbeddedWalletPasswordUpdateSplashView,n as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as e,jsx as r,Fragment as t}from"react/jsx-runtime";import{styled as o}from"styled-components";import i from"@heroicons/react/24/outline/ChevronRightIcon";import n from"@heroicons/react/24/outline/DevicePhoneMobileIcon";import s from"@heroicons/react/24/outline/FingerPrintIcon";import a from"@heroicons/react/24/outline/MinusCircleIcon";import l from"@heroicons/react/24/outline/PhoneIcon";import C from"@heroicons/react/24/outline/ShieldCheckIcon";import{U as c,L as d}from"./useActiveWallet-
|
|
1
|
+
import{jsxs as e,jsx as r,Fragment as t}from"react/jsx-runtime";import{styled as o}from"styled-components";import i from"@heroicons/react/24/outline/ChevronRightIcon";import n from"@heroicons/react/24/outline/DevicePhoneMobileIcon";import s from"@heroicons/react/24/outline/FingerPrintIcon";import a from"@heroicons/react/24/outline/MinusCircleIcon";import l from"@heroicons/react/24/outline/PhoneIcon";import C from"@heroicons/react/24/outline/ShieldCheckIcon";import{U as c,L as d}from"./useActiveWallet-CdOTNCcL.mjs";import{M as h,b as m,P as p}from"./ModalHeader-o3NBflPS.mjs";import{C as u}from"./Chip-D2-wZOHJ.mjs";import{I as y,T as f,S as g,E as k,M as w,d as v,e as b,f as M,g as x,R as Z,a as j,A as L,F as E,L as I,b as S,c as P,C as T,N as A}from"./PinInput-3SLvbnQa.mjs";import R from"@heroicons/react/24/outline/ArrowRightEndOnRectangleIcon";import W from"@heroicons/react/24/outline/ClockIcon";import{useState as F,useMemo as B}from"react";import{u as U}from"./context-BeiVf64h.mjs";import{u as z}from"./internal-context-Z-fyxadS.mjs";import{u as $}from"./get-is-unified-wallet-CyC08yWM.mjs";import{ErrorScreenView as N}from"./ErrorScreen-Gt5V4pQE.mjs";import{DoubleIconWrapper as O}from"./LinkPasskeyScreen-D9SIq3bj.mjs";import{C as D}from"./CopyToClipboard-DSTf_eKU.mjs";import{C as V}from"./Layouts-BlFm53ED.mjs";import{C as _}from"./Column-C2X2MHYX.mjs";import{L as q}from"./LabelXs-oqZNqbm_.mjs";import{S as H}from"./Subtitle-CV-2yKE4.mjs";import{T as Q}from"./Title-BnzYV3Is.mjs";import{B as Y}from"./shared-FM0rljBt.mjs";import{f as X,g as G,h as J,i as K}from"./index-BAl9y5La.mjs";import ee from"@heroicons/react/24/solid/ShieldCheckIcon";import{Q as re}from"./QrCode-rl0SJEeD.mjs";const te=t=>/*#__PURE__*/e(oe,{xmlns:"http://www.w3.org/2000/svg",fill:"none",width:"88",height:"89",viewBox:"0 0 88 89",...t,children:[/*#__PURE__*/r("rect",{y:"0.666016",width:"88",height:"88",rx:"44"}),/*#__PURE__*/r("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M45.2463 20.9106C44.5473 20.2486 43.4527 20.2486 42.7537 20.9106C37.8798 25.5263 31.3034 28.3546 24.0625 28.3546C23.9473 28.3546 23.8323 28.3539 23.7174 28.3525C22.9263 28.3427 22.2202 28.8471 21.9731 29.5987C20.9761 32.6311 20.4375 35.8693 20.4375 39.2297C20.4375 53.5896 30.259 65.651 43.5482 69.0714C43.8446 69.1477 44.1554 69.1477 44.4518 69.0714C57.741 65.651 67.5625 53.5896 67.5625 39.2297C67.5625 35.8693 67.0239 32.6311 66.0269 29.5987C65.7798 28.8471 65.0737 28.3427 64.2826 28.3525C64.1677 28.3539 64.0527 28.3546 63.9375 28.3546C56.6966 28.3546 50.1202 25.5263 45.2463 20.9106ZM52.7249 40.2829C53.3067 39.4683 53.1181 38.3363 52.3035 37.7545C51.4889 37.1726 50.3569 37.3613 49.7751 38.1759L41.9562 49.1223L38.0316 45.1977C37.3238 44.4899 36.1762 44.4899 35.4684 45.1977C34.7605 45.9056 34.7605 47.0532 35.4684 47.761L40.9059 53.1985C41.2826 53.5752 41.806 53.7671 42.337 53.7232C42.868 53.6792 43.3527 53.4039 43.6624 52.9704L52.7249 40.2829Z"})]});let oe=o.svg`
|
|
2
2
|
height: 90px;
|
|
3
3
|
width: 90px;
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as t,jsxs as e,Fragment as r}from"react/jsx-runtime";import{AlertTriangle as i,Phone as a,Lock as o}from"lucide-react";import{styled as n}from"styled-components";import{u as s}from"./context-
|
|
1
|
+
import{jsx as t,jsxs as e,Fragment as r}from"react/jsx-runtime";import{AlertTriangle as i,Phone as a,Lock as o}from"lucide-react";import{styled as n}from"styled-components";import{u as s}from"./context-BeiVf64h.mjs";import{a as c,P as l}from"./index-BAl9y5La.mjs";import{c as m,b as p,a as d,e as u}from"./internal-context-Z-fyxadS.mjs";import{a as T}from"./get-is-unified-wallet-CyC08yWM.mjs";import{R as g}from"./reservoir-0wfhnc0j.mjs";import{S as y}from"./ScreenLayout-C8IaXeHq.mjs";import"react";import"@privy-io/js-sdk-core";import"tinycolor2";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-CdOTNCcL.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-5ZtAXJqT.mjs";import"viem/utils";import"./useWallets-BCEKqhGq.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-D6pEtdwq.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"./ModalHeader-o3NBflPS.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-Olwu6khI.mjs";import"./index-Dq_xe9dz.mjs";const h=({error:n,allowlistConfig:s,onRetry:c,onCaptchaReset:T,onBack:h})=>{let f=((n,s)=>{if(n instanceof g)return{title:"Transaction failed",detail:/*#__PURE__*/e(r,{children:[/*#__PURE__*/t("span",{children:n.message}),/*#__PURE__*/e("span",{children:[" ","Check the"," ",/*#__PURE__*/t(w,{href:n.relayLink,target:"_blank",children:"refund status"}),"."]})]}),ctaText:"Try again",icon:i};if(n instanceof d)switch(n.privyErrorCode){case p.CLIENT_REQUEST_TIMEOUT:return{title:"Timed out",detail:n.message,ctaText:"Try again",icon:i};case p.INSUFFICIENT_BALANCE:return{title:"Insufficient balance",detail:n.message,ctaText:"Try again",icon:i};case p.TRANSACTION_FAILURE:return{title:"Transaction failure",detail:n.message,ctaText:"Try again",icon:i};default:return{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:i}}else{if(n instanceof l&&"twilio_verification_failed"===n.type)return{title:"Something went wrong",detail:n.message,ctaText:"Try again",icon:a};if(!(n instanceof m))return n instanceof u&&n.status&&[400,422].includes(n.status)?{title:"Something went wrong",detail:n.message,ctaText:"Try again",icon:i}:{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:i};switch(n.privyErrorCode){case p.INVALID_CAPTCHA:return{title:"Something went wrong",detail:"Please try again.",ctaText:"Try again",icon:i};case p.DISALLOWED_LOGIN_METHOD:return{title:"Not allowed",detail:n.message,ctaText:"Try another method",icon:i};case p.ALLOWLIST_REJECTED:return{title:s.errorTitle||"You don't have access to this app",detail:s.errorDetail||"Have you been invited?",ctaText:s.errorCtaText||"Try another account",icon:o};case p.CAPTCHA_FAILURE:return{title:"Something went wrong",detail:"You did not pass CAPTCHA. Please try again.",ctaText:"Try again",icon:null};case p.CAPTCHA_TIMEOUT:return{title:"Something went wrong",detail:"Something went wrong! Please try again later.",ctaText:"Try again",icon:null};case p.LINKED_TO_ANOTHER_USER:return{title:"Authentication failed",detail:"This account has already been linked to another user.",ctaText:"Try again",icon:i};case p.NOT_SUPPORTED:return{title:"This region is not supported",detail:"SMS authentication from this region is not available",ctaText:"Try another method",icon:i};case p.TOO_MANY_REQUESTS:return{title:"Request failed",detail:"Too many attempts.",ctaText:"Try again later",icon:i};default:return{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:i}}}})(n,s);/*#__PURE__*/return t(y,{title:f.title,subtitle:f.detail,icon:f.icon,onBack:h,iconVariant:"error",primaryCta:{label:f.ctaText,onClick:()=>{n instanceof m&&(n.privyErrorCode===p.INVALID_CAPTCHA&&T?.(),n.privyErrorCode===p.ALLOWLIST_REJECTED&&s.errorCtaLink)?window.location.href=s.errorCtaLink:c?.()},variant:"error"},watermark:!0})},f={component:()=>{let{navigate:e,data:r,lastScreen:i,currentScreen:a}=T(),o=s(),{reset:n}=c(),l=r?.errorModalData?.previousScreen||(i===a?void 0:i);/*#__PURE__*/return t(h,{error:r?.errorModalData?.error||Error(),allowlistConfig:o.allowlistConfig,onRetry:()=>{e(l||"LandingScreen",!1)},onCaptchaReset:n})}};let w=n.a`
|
|
2
2
|
color: var(--privy-color-accent) !important;
|
|
3
3
|
font-weight: 600;
|
|
4
4
|
`;export{f as ErrorScreen,h as ErrorScreenView,f as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as e,jsx as r,Fragment as t}from"react/jsx-runtime";import{useState as i,useEffect as o,useRef as a}from"react";import{isMobile as n,isIOS as s}from"react-device-detect";import{styled as l}from"styled-components";import{L as c}from"./useActiveWallet-
|
|
1
|
+
import{jsxs as e,jsx as r,Fragment as t}from"react/jsx-runtime";import{useState as i,useEffect as o,useRef as a}from"react";import{isMobile as n,isIOS as s}from"react-device-detect";import{styled as l}from"styled-components";import{L as c}from"./useActiveWallet-CdOTNCcL.mjs";import{O as d}from"./OpenLink-DZHy38vr.mjs";import{Q as m}from"./QrCode-rl0SJEeD.mjs";import{Check as p,Copy as u}from"lucide-react";import{S as h}from"./ModalHeader-o3NBflPS.mjs";import{L as v}from"./LabelXs-oqZNqbm_.mjs";import{u as f,q as g}from"./context-BeiVf64h.mjs";import{u as y,b,k as w}from"./internal-context-Z-fyxadS.mjs";import{u as x,a as C}from"./get-is-unified-wallet-CyC08yWM.mjs";import{s as S}from"./shouldProceedtoEmbeddedWalletCreationFlow-_LduuU-p.mjs";import{S as k}from"./ScreenLayout-C8IaXeHq.mjs";import{F as E}from"./farcaster-DPlSjvF5.mjs";import"zustand";import"./use-export-wallet-5ZtAXJqT.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"viem/utils";import"./useWallets-BCEKqhGq.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"qrcode";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"tinycolor2";import"ofetch";import"@privy-io/are-addresses-equal";import"./index-BAl9y5La.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-D6pEtdwq.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"./Screen-Olwu6khI.mjs";import"./index-Dq_xe9dz.mjs";let j=l.div`
|
|
2
2
|
width: 100%;
|
|
3
3
|
`,T=l.div`
|
|
4
4
|
display: flex;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useState as r,useRef as o,useEffect as a}from"react";import{isMobile as i,isIOS as s}from"react-device-detect";import{styled as n}from"styled-components";import{C as l}from"./CopyToClipboard-DSTf_eKU.mjs";import{L as c}from"./useActiveWallet-
|
|
1
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useState as r,useRef as o,useEffect as a}from"react";import{isMobile as i,isIOS as s}from"react-device-detect";import{styled as n}from"styled-components";import{C as l}from"./CopyToClipboard-DSTf_eKU.mjs";import{L as c}from"./useActiveWallet-CdOTNCcL.mjs";import{O as m}from"./OpenLink-DZHy38vr.mjs";import{Q as p}from"./QrCode-rl0SJEeD.mjs";import{u as d,q as u}from"./context-BeiVf64h.mjs";import{u as g}from"./internal-context-Z-fyxadS.mjs";import{a as f}from"./get-is-unified-wallet-CyC08yWM.mjs";import{S as h}from"./ScreenLayout-C8IaXeHq.mjs";import{F as v}from"./farcaster-DPlSjvF5.mjs";import"zustand";import"./use-export-wallet-5ZtAXJqT.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"viem/utils";import"./useWallets-BCEKqhGq.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"qrcode";import"tinycolor2";import"ofetch";import"@privy-io/are-addresses-equal";import"./ModalHeader-o3NBflPS.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-Olwu6khI.mjs";import"./index-Dq_xe9dz.mjs";let y="#8a63d2";const k=({appName:r,loading:o,success:a,errorMessage:n,connectUri:d,onBack:u,onClose:g,onOpenFarcaster:f})=>/*#__PURE__*/e(h,i||o?s?{title:n?n.message:"Add a signer to Farcaster",subtitle:n?n.detail:`This will allow ${r} to add casts, likes, follows, and more on your behalf.`,icon:v,iconVariant:"loading",iconLoadingStatus:{success:a,fail:!!n},primaryCta:d&&f?{label:"Open Farcaster app",onClick:f}:void 0,onBack:u,onClose:g,watermark:!0}:{title:n?n.message:"Requesting signer from Farcaster",subtitle:n?n.detail:"This should only take a moment",icon:v,iconVariant:"loading",iconLoadingStatus:{success:a,fail:!!n},onBack:u,onClose:g,watermark:!0,children:d&&i&&/*#__PURE__*/e(w,{children:/*#__PURE__*/e(m,{text:"Take me to Farcaster",url:d,color:y})})}:{title:"Add a signer to Farcaster",subtitle:`This will allow ${r} to add casts, likes, follows, and more on your behalf.`,onBack:u,onClose:g,watermark:!0,children:/*#__PURE__*/t(j,{children:[/*#__PURE__*/e(x,{children:d?/*#__PURE__*/e(p,{url:d,size:275,squareLogoElement:v}):/*#__PURE__*/e(S,{children:/*#__PURE__*/e(c,{})})}),/*#__PURE__*/t(C,{children:[/*#__PURE__*/e(b,{children:"Or copy this link and paste it into a phone browser to open the Farcaster app."}),d&&/*#__PURE__*/e(l,{text:d,itemName:"link",color:y})]})]})});let w=n.div`
|
|
2
2
|
margin-top: 24px;
|
|
3
3
|
`,j=n.div`
|
|
4
4
|
display: flex;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as a}from"react/jsx-runtime";import n from"@heroicons/react/24/outline/CheckCircleIcon";import{useState as o,useEffect as r}from"react";import{formatWalletAddress as s}from"@privy-io/js-sdk-core";import{B as i,P as l}from"./ModalHeader-
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as a}from"react/jsx-runtime";import n from"@heroicons/react/24/outline/CheckCircleIcon";import{useState as o,useEffect as r}from"react";import{formatWalletAddress as s}from"@privy-io/js-sdk-core";import{B as i,P as l}from"./ModalHeader-o3NBflPS.mjs";import{b as m,c,R as d,e as u}from"./Layouts-BlFm53ED.mjs";import{C as p}from"./ScreenHeader-CHmc4-Lu.mjs";import{t as f}from"./FundWalletMethodHeader-DhUicNAG.mjs";import{I as g}from"./InjectedWalletIcon-DLcYOGDj.mjs";import{N as h}from"./index-Dq_xe9dz.mjs";import{L as I,V as w}from"./Value-tcJV9e0L.mjs";import{a as v,R as S}from"./Row-C9vrS4Zi.mjs";import{u as j,t as C}from"./context-BeiVf64h.mjs";import{u as y,a as L,b as x}from"./internal-context-Z-fyxadS.mjs";import{a as k}from"./get-is-unified-wallet-CyC08yWM.mjs";import{u as F,g as U}from"./useWallets-AiuOd29U.mjs";import{u as T}from"./useGetTokenPrice-TFzNln4c.mjs";import{O as A}from"./analytics-mkkvFRju.mjs";import{getTransferSolInstruction as W}from"@solana-program/system";import{pipe as b,createTransactionMessage as P,setTransactionMessageFeePayerSigner as D,setTransactionMessageLifetimeUsingBlockhash as N,appendTransactionMessageInstruction as O,compileTransaction as E,getTransactionEncoder as M}from"@solana/kit";import{findAssociatedTokenPda as B,getCreateAssociatedTokenIdempotentInstruction as $,getTransferInstruction as R}from"@solana-program/token";import{T as H,L as G,g as V}from"./getFormattedUsdFromLamports-B6EqSEho.mjs";import{g as q}from"./getUsdcMintAddress-DFI1hv05.mjs";import{u as _,f as z,s as Q,w as X}from"./useSolanaRpcClient-Re4dIYnK.mjs";import{g as Y}from"./getChainName-DjpPdUSc.mjs";import{t as J}from"./use-export-wallet-5ZtAXJqT.mjs";import"styled-components";import"./useActiveWallet-CdOTNCcL.mjs";import"zustand";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-BCEKqhGq.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"@heroicons/react/24/outline/WalletIcon";import"./LoadingSkeleton-U6-3yFwI.mjs";import"tinycolor2";import"ofetch";import"@privy-io/are-addresses-equal";import"./usePrivy-D6pEtdwq.mjs";import"eventemitter3";import"@scure/base";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./useGetSolPrice-DwwjjGbd.mjs";function K({rows:a}){/*#__PURE__*/return e(v,{children:a.filter((e=>!!e)).map(((a,n)=>null!=a.value||a.isLoading?/*#__PURE__*/t(S,{children:[/*#__PURE__*/e(I,{children:a.label}),/*#__PURE__*/e(w,{$isLoading:a.isLoading,children:a.value})]},n):null))})}function Z(e){return BigInt(Math.floor(1e9*parseFloat(e)))}function ee(e){return+te.format(parseFloat(e.toString())/1e9)}let te=Intl.NumberFormat(void 0,{maximumFractionDigits:8});async function ae({tx:e,solanaClient:t,amount:a,asset:n,tokenPrice:o}){if(!e)return null;if("SOL"===n&&o){let n=Z(a),r=V(n,o),s=await z({solanaClient:t,tx:e});return{amountInUsd:r,feeInUsd:o?V(s,o):void 0,totalInUsd:V(n+s,o)}}if("USDC"===n&&o){let n="$"+a,r=await z({solanaClient:t,tx:e}),s=function(e,t){let a=parseFloat(e.toString())/G*t;return a<.01?0:a}(r,o);return{amountInUsd:n,feeInUsd:V(r,o),totalInUsd:"$"+(parseFloat(a)+s).toFixed(2)}}if("SOL"===n){let n=Z(a),o=await z({solanaClient:t,tx:e});return{amountInSol:a+" SOL",feeInSol:ee(o)+" SOL",totalInSol:ee(n+o)+" SOL"}}return{amountInUsdc:a+" USDC",feeInSol:ee(await z({solanaClient:t,tx:e}))+" SOL"}}const ne={component:function(){let I=j(),{closePrivyModal:w,createAnalyticsEvent:v}=y(),{data:S,setModalData:G,navigate:z}=k(),{wallets:ee}=F(),[te,ne]=o("preparing"),[oe,re]=o(),[se,ie]=o(),[le,me]=o();if(!S?.solanaFundingData)throw Error("Funding config is missing");if(!S.solanaFundingData.sourceWalletData)throw Error("Funding config is missing source wallet data");let{amount:ce,asset:de,chain:ue,sourceWalletData:pe,destinationAddress:fe,afterSuccessScreen:ge}=S.solanaFundingData,he=ee.find((e=>e.address===pe.address&&J(pe.walletClientType)===J(e.standardWallet.name))),Ie=_()(ue),{tokenPrice:we,isTokenPriceLoading:ve}=T("solana");return r((()=>{if("preparing"!==te||ve||!he)return;let e="SOL"===de?Z(ce):function(e){return BigInt(Math.floor(1e6*parseFloat(e)))}(ce);ie({amount:("SOL"===de&&we?V(e,we):ce)??ce}),("SOL"===de?async function({solanaClient:e,source:t,destination:a,amountInLamports:n}){let{value:o}=await e.rpc.getLatestBlockhash().send(),r={address:t},s=b(P({version:0}),(e=>D(r,e)),(e=>N(o,e)),(e=>O(W({amount:n,source:r,destination:a}),e)),(e=>E(e)));return new Uint8Array(M().encode(s))}({solanaClient:Ie,source:he.address,destination:fe,amountInLamports:e}):async function({solanaClient:e,source:t,destination:a,amountInBaseUnits:n}){let o=q(e.chain),{value:r}=await e.rpc.getLatestBlockhash().send(),s={address:t},[i]=await B({mint:o,owner:t,tokenProgram:H}),[l]=await B({mint:o,owner:a,tokenProgram:H}),[m,c]=await Promise.all([e.rpc.getAccountInfo(i,{commitment:"confirmed",encoding:"jsonParsed"}).send().catch((()=>null)),e.rpc.getAccountInfo(l,{commitment:"confirmed",encoding:"jsonParsed"}).send().catch((()=>null))]);if(!m?.value)throw Error(`Source token account does not exist for address: ${t}`);let d=$({payer:s,ata:l,owner:a,mint:o}),u=b(P({version:0}),(e=>D(s,e)),(e=>N(r,e)),(e=>c?.value?e:O(d,e)),(e=>O(R({source:i,destination:l,authority:s,amount:n}),e)),(e=>E(e)));return new Uint8Array(M().encode(u))}({solanaClient:Ie,source:he.address,destination:fe,amountInBaseUnits:e})).then(re).catch((e=>{ne("error"),me(e)}))}),[te,ce,de,ue,he,fe,ve,we]),r((()=>{"preparing"===te&&oe&&ae({tx:oe,solanaClient:Ie,amount:ce,asset:de,tokenPrice:we}).then((e=>{ne("loaded"),ie({amount:e?.amountInUsd??e?.amountInUsdc??e?.amountInSol??ce,fee:e?.feeInUsd??e?.feeInSol,total:e?.totalInUsd??e?.totalInSol})})).catch((e=>{ne("error"),me(e)}))}),[oe,ce,de,te,we]),r((()=>{"error"===te&&le&&(G({errorModalData:{error:le,previousScreen:"FundSolWalletWithExternalSolanaWallet"},solanaFundingData:S.solanaFundingData}),z("ErrorScreen",!1))}),[te,z]),r((()=>{if("success"!==te)return;let e=setTimeout(ge?()=>z(ge):w,C);return()=>clearTimeout(e)}),[te]),/*#__PURE__*/t(a,"success"===te?{children:[/*#__PURE__*/e(f,{}),/*#__PURE__*/e(m,{}),/*#__PURE__*/t(c,{children:[/*#__PURE__*/e(n,{color:"var(--privy-color-success)",width:"64px",height:"64px"}),/*#__PURE__*/e(p,{title:"Success!",description:`You’ve successfully added ${ce} ${de} to your ${I.name} wallet. It may take a minute before the funds are available to use.`})]}),/*#__PURE__*/e(d,{}),/*#__PURE__*/e(i,{})]}:"preparing"===te||"loaded"===te||"sending"===te?{children:[/*#__PURE__*/e(f,{}),/*#__PURE__*/e(u,{style:{marginTop:"16px"},children:/*#__PURE__*/e(g,{icon:he?.standardWallet.icon,name:he?.standardWallet.name})}),/*#__PURE__*/e(p,{style:{marginTop:"8px",marginBottom:"12px"},title:"sending"===te&&he?`Confirming with ${he.standardWallet.name}`:"Confirm transaction"}),/*#__PURE__*/e(K,{rows:[{label:"Source",value:s(pe.address)},{label:"Destination",value:s(fe)},{label:"Network",value:Y(ue)},{label:"Amount",value:se?.amount,isLoading:"preparing"===te},{label:"Estimated fee",value:se?.fee,isLoading:"preparing"===te},{label:"Total",value:se?.total,isLoading:"preparing"===te}]}),/*#__PURE__*/e(l,{style:{marginTop:"1rem"},loading:"preparing"===te||"sending"===te,onClick:function(){"loaded"===te&&oe&&he&&(ne("sending"),async function({transaction:e,chain:t,sourceWallet:a,solanaClient:n}){let{hasFunds:o}=await Q({solanaClient:n,tx:e});if(!o)throw new L(`Wallet ${s(a.address)} does not have enough funds.`,void 0,x.INSUFFICIENT_BALANCE);let r=U((await a.signAndSendTransaction({transaction:e,chain:t}).catch((e=>{throw new L("Transaction was rejected by the user",e,x.TRANSACTION_FAILURE)}))).signature);return await X({rpcSubscriptions:n.rpcSubscriptions,signature:r,timeout:2e4}),r}({solanaClient:Ie,transaction:oe,chain:ue,sourceWallet:he}).then((e=>{ne("success"),v({eventName:A,payload:{provider:"external",status:"success",txHash:e,address:he.address,value:ce,chainType:"solana",clusterName:ue,token:de,destinationAddress:fe,destinationValue:ce,destinationChainType:"solana",destinationClusterName:ue,destinationToken:de}})})).catch((e=>{ne("error"),me(e)})))},children:"Confirm"}),/*#__PURE__*/e(i,{})]}:{children:[/*#__PURE__*/e(f,{}),/*#__PURE__*/e(h,{}),/*#__PURE__*/e("div",{style:{marginTop:"1rem"}}),/*#__PURE__*/e(i,{})]})}};export{ne as FundSolWalletWithExternalSolanaWallet,ne as default};
|
package/dist/esm/{FundWalletMethodHeader-D0DhWPu0.mjs → FundWalletMethodHeader-DhUicNAG.mjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as n}from"react/jsx-runtime";import{a as e}from"./get-is-unified-wallet-
|
|
1
|
+
import{jsx as n}from"react/jsx-runtime";import{a as e}from"./get-is-unified-wallet-CyC08yWM.mjs";import{M as a}from"./ModalHeader-o3NBflPS.mjs";function t({title:t}){let{currentScreen:i,navigateBack:r,navigate:d,data:o,setModalData:u}=e();/*#__PURE__*/return n(a,{title:t,backFn:"ManualTransferScreen"===i?r:i===o?.funding?.methodScreen?o.funding.comingFromSendTransactionScreen?()=>d("SendTransactionScreen"):void 0:o?.funding?.methodScreen?()=>{let n=o.funding;n.usingDefaultFundingMethod&&(n.usingDefaultFundingMethod=!1),u({funding:n,solanaFundingData:o?.solanaFundingData}),d(n.methodScreen)}:void 0})}export{t};
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import{useState as o,useRef as i,useCallback as s,useMemo as n}from"react";import{trigger as a}from"@privy-io/popup";import{u as l,a as c}from"./get-is-unified-wallet-CyC08yWM.mjs";import{k as u}from"./useActiveWallet-CdOTNCcL.mjs";import{isMobile as d}from"react-device-detect";import{styled as m}from"styled-components";import{a as p}from"./CopyableText-BCytXyJL.mjs";import{I as f,J as y}from"./index-BAl9y5La.mjs";import{S as h}from"./ScreenLayout-C8IaXeHq.mjs";import{XCircle as g,Hourglass as v,UserCheck as w,Check as b,ChevronDown as C}from"lucide-react";import{I as k}from"./InfoBanner-DkQEPd77.mjs";import"@privy-io/are-addresses-equal";import"./context-BeiVf64h.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"zustand";import"./use-export-wallet-5ZtAXJqT.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-BCEKqhGq.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"./paths-3HW55qZg.mjs";import"./usePrivy-D6pEtdwq.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./ModalHeader-o3NBflPS.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-Olwu6khI.mjs";import"./index-Dq_xe9dz.mjs";import"@heroicons/react/24/outline/InformationCircleIcon";const x=async({operation:e,until:t,delay:r,interval:o,attempts:i,signal:s})=>{let n,a=0;for(;a<i;){if(s?.aborted)return{status:"aborted",result:n,attempts:a};a++;try{if(n=await e(),t(n))return{status:"success",result:n,attempts:a};a<i&&await u(o)}catch(e){a<i&&await u(o)}}return{status:"max_attempts",result:n,attempts:a}},j=({data:r,onClose:o})=>/*#__PURE__*/e(h,{showClose:!0,onClose:o,title:"Initiate bank transfer",subtitle:"Use the details below to complete a bank transfer from your bank.",primaryCta:{label:"Done",onClick:o},watermark:!1,footerText:"Exchange rates and fees are set when you authorize and determine the amount you receive. You'll see the applicable rates and fees for your transaction separately",children:/*#__PURE__*/e(A,{children:(f[r.deposit_instructions.asset]||[]).map((([o,i],s)=>{let n=r.deposit_instructions[o];if(!n)return null;let a="asset"===o?n.toUpperCase():n,l=a.length>100?`${a.slice(0,9)}...${a.slice(-9)}`:a;/*#__PURE__*/return t(S,{children:[/*#__PURE__*/e(U,{children:i}),/*#__PURE__*/e(p,{value:a,includeChildren:d,children:/*#__PURE__*/e(L,{children:l})})]},s)}))})});let A=m.ol`
|
|
2
|
+
border-color: var(--privy-color-border-default);
|
|
3
|
+
border-width: 1px;
|
|
4
|
+
border-radius: var(--privy-border-radius-mdlg);
|
|
5
|
+
border-style: solid;
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
|
|
9
|
+
&& {
|
|
10
|
+
padding: 0 1rem;
|
|
11
|
+
}
|
|
12
|
+
`,S=m.li`
|
|
13
|
+
display: flex;
|
|
14
|
+
justify-content: space-between;
|
|
15
|
+
align-items: center;
|
|
16
|
+
padding: 1rem 0;
|
|
17
|
+
|
|
18
|
+
&:not(:first-of-type) {
|
|
19
|
+
border-top: 1px solid var(--privy-color-border-default);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
& > {
|
|
23
|
+
:nth-child(1) {
|
|
24
|
+
flex-basis: 30%;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
:nth-child(2) {
|
|
28
|
+
flex-basis: 60%;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
`,U=m.span`
|
|
32
|
+
color: var(--privy-color-foreground);
|
|
33
|
+
font-kerning: none;
|
|
34
|
+
font-variant-numeric: lining-nums proportional-nums;
|
|
35
|
+
font-feature-settings: 'calt' off;
|
|
36
|
+
|
|
37
|
+
/* text-xs/font-regular */
|
|
38
|
+
font-size: 0.75rem;
|
|
39
|
+
font-style: normal;
|
|
40
|
+
font-weight: 400;
|
|
41
|
+
line-height: 1.125rem; /* 150% */
|
|
42
|
+
|
|
43
|
+
text-align: left;
|
|
44
|
+
flex-shrink: 0;
|
|
45
|
+
`,L=m.span`
|
|
46
|
+
color: var(--privy-color-foreground);
|
|
47
|
+
font-kerning: none;
|
|
48
|
+
font-feature-settings: 'calt' off;
|
|
49
|
+
|
|
50
|
+
/* text-sm/font-medium */
|
|
51
|
+
font-size: 0.875rem;
|
|
52
|
+
font-style: normal;
|
|
53
|
+
font-weight: 500;
|
|
54
|
+
line-height: 1.375rem; /* 157.143% */
|
|
55
|
+
|
|
56
|
+
text-align: right;
|
|
57
|
+
word-break: break-all;
|
|
58
|
+
`;const I=({onClose:t})=>/*#__PURE__*/e(h,{showClose:!0,onClose:t,icon:g,iconVariant:"error",title:"Something went wrong",subtitle:"We couldn't complete account setup. This isn't caused by anything you did.",primaryCta:{label:"Close",onClick:t},watermark:!0}),E=({onClose:t,reason:r})=>{let o=r?r.charAt(0).toLowerCase()+r.slice(1):void 0;/*#__PURE__*/return e(h,{showClose:!0,onClose:t,icon:g,iconVariant:"error",title:"Identity verification failed",subtitle:o?`We can't complete identity verification because ${o}. Please try again or contact support for assistance.`:"We couldn't verify your identity. Please try again or contact support for assistance.",primaryCta:{label:"Close",onClick:t},watermark:!0})},T=({onClose:r,email:o})=>/*#__PURE__*/e(h,{showClose:!0,onClose:r,icon:v,title:"Identity verification in progress",subtitle:"We're waiting for Persona to approve your identity verification. This usually takes a few minutes, but may take up to 24 hours.",primaryCta:{label:"Done",onClick:r},watermark:!0,children:/*#__PURE__*/t(k,{theme:"light",children:["You'll receive an email at ",o," once approved with instructions for completing your deposit."]})}),z=({onClose:o,onAcceptTerms:i,isLoading:s})=>/*#__PURE__*/e(h,{showClose:!0,onClose:o,icon:w,title:"Verify your identity to continue",subtitle:"Finish verification with Persona — it takes just a few minutes and requires a government ID.",helpText:/*#__PURE__*/t(r,{children:['This app uses Bridge to securely connect accounts and move funds. By clicking "Accept," you agree to Bridge\'s'," ",/*#__PURE__*/e("a",{href:"https://www.bridge.xyz/legal",target:"_blank",rel:"noopener noreferrer",children:"Terms of Service"})," ","and"," ",/*#__PURE__*/e("a",{href:"https://www.bridge.xyz/legal/row-privacy-policy/bridge-building-limited",target:"_blank",rel:"noopener noreferrer",children:"Privacy Policy"}),"."]}),primaryCta:{label:"Accept and continue",onClick:i,loading:s},watermark:!0}),_=({onClose:t})=>/*#__PURE__*/e(h,{showClose:!0,onClose:t,icon:b,iconVariant:"success",title:"Identity verified successfully",subtitle:"We've successfully verified your identity. Now initiate a bank transfer to view instructions.",primaryCta:{label:"Initiate bank transfer",onClick:()=>{},loading:!0},watermark:!0}),B=({opts:r,onClose:o,onEditSourceAsset:i,onSelectAmount:s,isLoading:n})=>{let{icon:a}=y[r.source.selectedAsset];/*#__PURE__*/return t(h,{showClose:!0,onClose:o,headerTitle:`Buy ${r.destination.asset.toLocaleUpperCase()}`,primaryCta:{label:"Continue",onClick:s,loading:n},watermark:!0,children:[/*#__PURE__*/e(V,{currency:r.source.selectedAsset,inputMode:"decimal",autoFocus:!0}),/*#__PURE__*/t(P,{onClick:i,children:[/*#__PURE__*/e(W,{children:a}),/*#__PURE__*/e($,{children:r.source.selectedAsset.toLocaleUpperCase()}),/*#__PURE__*/e(F,{children:/*#__PURE__*/e(C,{})})]})]})};let P=m.button`
|
|
59
|
+
display: flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
justify-content: space-between;
|
|
62
|
+
width: auto;
|
|
63
|
+
gap: 0.5rem;
|
|
64
|
+
border: 1px solid var(--privy-color-border-default);
|
|
65
|
+
border-radius: var(--privy-border-radius-full);
|
|
66
|
+
|
|
67
|
+
&& {
|
|
68
|
+
margin: auto;
|
|
69
|
+
padding: 0.5rem 1rem;
|
|
70
|
+
}
|
|
71
|
+
`,W=m.div`
|
|
72
|
+
svg {
|
|
73
|
+
width: 1rem;
|
|
74
|
+
height: 1rem;
|
|
75
|
+
border-radius: var(--privy-border-radius-full);
|
|
76
|
+
overflow: hidden;
|
|
77
|
+
}
|
|
78
|
+
`,$=m.span`
|
|
79
|
+
color: var(--privy-color-foreground);
|
|
80
|
+
font-kerning: none;
|
|
81
|
+
font-feature-settings: 'calt' off;
|
|
82
|
+
|
|
83
|
+
/* text-sm/font-medium */
|
|
84
|
+
font-size: 0.875rem;
|
|
85
|
+
font-style: normal;
|
|
86
|
+
font-weight: 500;
|
|
87
|
+
line-height: 1.375rem; /* 157.143% */
|
|
88
|
+
`,F=m.div`
|
|
89
|
+
color: var(--privy-color-foreground);
|
|
90
|
+
|
|
91
|
+
svg {
|
|
92
|
+
width: 1.25rem;
|
|
93
|
+
height: 1.25rem;
|
|
94
|
+
}
|
|
95
|
+
`,K={usd:"$",eur:"€",gbp:"£",mxn:"$",brl:"R$"},D=m.span`
|
|
96
|
+
background-color: var(--privy-color-background);
|
|
97
|
+
width: 100%;
|
|
98
|
+
text-align: center;
|
|
99
|
+
border: none;
|
|
100
|
+
|
|
101
|
+
font-kerning: none;
|
|
102
|
+
font-feature-settings: 'calt' off;
|
|
103
|
+
|
|
104
|
+
display: flex;
|
|
105
|
+
justify-content: center;
|
|
106
|
+
align-items: flex-start;
|
|
107
|
+
cursor: pointer;
|
|
108
|
+
|
|
109
|
+
&:focus {
|
|
110
|
+
outline: none !important;
|
|
111
|
+
border: none !important;
|
|
112
|
+
box-shadow: none !important;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
&& {
|
|
116
|
+
color: var(--privy-color-foreground);
|
|
117
|
+
/* text-6xl/font-semiBold */
|
|
118
|
+
font-size: 3.75rem;
|
|
119
|
+
font-style: normal;
|
|
120
|
+
font-weight: 600;
|
|
121
|
+
line-height: 5.375rem; /* 143.333% */
|
|
122
|
+
}
|
|
123
|
+
`,M=m.span`
|
|
124
|
+
color: var(--privy-color-foreground);
|
|
125
|
+
font-kerning: none;
|
|
126
|
+
font-feature-settings: 'calt' off;
|
|
127
|
+
|
|
128
|
+
font-size: 1rem;
|
|
129
|
+
font-style: normal;
|
|
130
|
+
font-weight: 600;
|
|
131
|
+
line-height: 1.5rem; /* 150% */
|
|
132
|
+
|
|
133
|
+
margin-top: 0.75rem;
|
|
134
|
+
`,V=({currency:a="usd",value:l,onChange:c,inputMode:u="decimal",autoFocus:d})=>{let[m,p]=o("0"),f=i(null),y=l??m,h=K[a.toLowerCase()]||"$",g=s((e=>{let t=e.target.value,r=(t=t.replace(/[^\d.]/g,"")).split(".");r.length>2&&(t=r[0]+"."+r.slice(1).join("")),2===r.length&&r[1].length>2&&(t=`${r[0]}.${r[1].slice(0,2)}`),t.length>1&&"0"===t[0]&&"."!==t[1]&&(t=t.slice(1)),(""===t||"."===t)&&(t="0"),c?c(t):p(t)}),[c]),v=s((e=>{-1===[46,8,9,27,13,110,190].indexOf(e.keyCode)&&(65!==e.keyCode||!0!==e.ctrlKey)&&(67!==e.keyCode||!0!==e.ctrlKey)&&(86!==e.keyCode||!0!==e.ctrlKey)&&(88!==e.keyCode||!0!==e.ctrlKey)&&(!(e.keyCode>=35)||!(e.keyCode<=39))&&(e.shiftKey||e.keyCode<48||e.keyCode>57)&&(e.keyCode<96||e.keyCode>105)&&e.preventDefault()}),[]),w=n((()=>(y.includes("."),y)),[y]);/*#__PURE__*/return e(r,{children:/*#__PURE__*/t(D,{onClick:()=>f.current?.focus(),children:[/*#__PURE__*/e(M,{children:h}),w,/*#__PURE__*/e("input",{ref:f,type:"text",inputMode:u,value:w,onChange:g,onKeyDown:v,autoFocus:d,placeholder:"0",style:{width:1,height:"1rem",opacity:0,alignSelf:"center",fontSize:"1rem"}}),/*#__PURE__*/e(M,{style:{opacity:0},children:h})]})})};const R=({opts:r,isLoading:o,onSelectSource:i})=>/*#__PURE__*/e(h,{showClose:!1,showBack:!0,onBack:()=>i(r.source.selectedAsset),title:"Select currency",children:/*#__PURE__*/e(Y,{children:r.source.assets.map((r=>{let{icon:s,name:n}=y[r];/*#__PURE__*/return e(O,{onClick:()=>i(r),disabled:o,children:/*#__PURE__*/t(q,{children:[/*#__PURE__*/e(G,{children:s}),/*#__PURE__*/t(H,{children:[/*#__PURE__*/e(J,{children:n}),/*#__PURE__*/e(N,{children:r.toLocaleUpperCase()})]})]})},r)}))})});let Y=m.div`
|
|
135
|
+
display: flex;
|
|
136
|
+
flex-direction: column;
|
|
137
|
+
gap: 0.75rem;
|
|
138
|
+
width: 100%;
|
|
139
|
+
`,O=m.button`
|
|
140
|
+
border-color: var(--privy-color-border-default);
|
|
141
|
+
border-width: 1px;
|
|
142
|
+
border-radius: var(--privy-border-radius-mdlg);
|
|
143
|
+
border-style: solid;
|
|
144
|
+
display: flex;
|
|
145
|
+
|
|
146
|
+
&& {
|
|
147
|
+
padding: 0.75rem 1rem;
|
|
148
|
+
}
|
|
149
|
+
`,q=m.div`
|
|
150
|
+
display: flex;
|
|
151
|
+
align-items: center;
|
|
152
|
+
gap: 1rem;
|
|
153
|
+
width: 100%;
|
|
154
|
+
`,G=m.div`
|
|
155
|
+
svg {
|
|
156
|
+
width: 2.25rem;
|
|
157
|
+
height: 2.25rem;
|
|
158
|
+
border-radius: var(--privy-border-radius-full);
|
|
159
|
+
overflow: hidden;
|
|
160
|
+
}
|
|
161
|
+
`,H=m.div`
|
|
162
|
+
display: flex;
|
|
163
|
+
flex-direction: column;
|
|
164
|
+
align-items: flex-start;
|
|
165
|
+
gap: 0.125rem;
|
|
166
|
+
`,J=m.span`
|
|
167
|
+
color: var(--privy-color-foreground);
|
|
168
|
+
font-size: 0.875rem;
|
|
169
|
+
font-weight: 600;
|
|
170
|
+
line-height: 1.25rem;
|
|
171
|
+
`,N=m.span`
|
|
172
|
+
color: var(--privy-color-foreground-3);
|
|
173
|
+
font-size: 0.75rem;
|
|
174
|
+
font-weight: 400;
|
|
175
|
+
line-height: 1.125rem;
|
|
176
|
+
`;const Q=({onClose:t,onAcceptTerms:r,onSelectAmount:o,onSelectSource:i,onEditSourceAsset:s,opts:n,state:a,email:l,isLoading:c})=>"select-amount"===a.status?/*#__PURE__*/e(B,{onClose:t,onSelectAmount:o,onEditSourceAsset:s,opts:n,isLoading:c}):"select-source-asset"===a.status?/*#__PURE__*/e(R,{onSelectSource:i,opts:n,isLoading:c}):"kyc-prompt"===a.status?/*#__PURE__*/e(z,{onClose:t,onAcceptTerms:r,opts:n,isLoading:c}):"kyc-incomplete"===a.status?/*#__PURE__*/e(T,{onClose:t,email:l}):"kyc-success"===a.status?/*#__PURE__*/e(_,{onClose:t}):"kyc-error"===a.status?/*#__PURE__*/e(E,{onClose:t,reason:a.reason}):"account-details"===a.status?/*#__PURE__*/e(j,{onClose:t,data:a.data}):"create-customer-error"===a.status||"get-customer-error"===a.status?/*#__PURE__*/e(I,{onClose:t}):null,X={component:()=>{let{user:t}=l(),r=c().data;if(!r?.FundWithBankDepositScreen)throw Error("Missing data");let{onSuccess:n,onFailure:u,opts:d,createOrUpdateCustomer:m,getCustomer:p,getOrCreateVirtualAccount:f}=r.FundWithBankDepositScreen,[y,h]=o(d),[g,v]=o({status:"select-amount"}),[w,b]=o(null),[C,k]=o(!1),j=i(null),A=s((async()=>{let e;k(!0),b(null);try{e=await p({kycRedirectUrl:window.location.origin})}catch(e){if(!e||"object"!=typeof e||!("status"in e)||404!==e.status)return v({status:"get-customer-error"}),b(e),void k(!1)}if(!e)try{e=await m({hasAcceptedTerms:!1,kycRedirectUrl:window.location.origin})}catch(e){return v({status:"create-customer-error"}),b(e),void k(!1)}if(!e)return v({status:"create-customer-error"}),b(Error("Unable to create customer")),void k(!1);if("not_started"===e.status&&e.kyc_url)return v({status:"kyc-prompt",kycUrl:e.kyc_url}),void k(!1);if("not_started"===e.status)return v({status:"get-customer-error"}),b(Error("Unexpected user state")),void k(!1);if("rejected"===e.status)return v({status:"kyc-error",reason:e.rejection_reasons?.[0]?.reason}),b(Error("User KYC rejected.")),void k(!1);if("incomplete"===e.status)return v({status:"kyc-incomplete"}),void k(!1);if("active"!==e.status)return v({status:"get-customer-error"}),b(Error("Unexpected user state")),void k(!1);e.status;try{let e=await f({destination:y.destination,provider:y.provider,source:{asset:y.source.selectedAsset}});v({status:"account-details",data:e})}catch(e){return v({status:"create-customer-error"}),b(e),void k(!1)}}),[y]),S=s((async()=>{if(b(null),k(!0),"kyc-prompt"!==g.status)return b(Error("Unexpected state")),void k(!1);let e=a({location:g.kycUrl});if(await m({hasAcceptedTerms:!0}),!e)return b(Error("Unable to begin kyc flow.")),k(!1),void v({status:"create-customer-error"});j.current=new AbortController;let t=await x({operation:async()=>({done:e.location.origin===window.location.origin,closed:e.closed}),until:({done:e,closed:t})=>e||t,delay:0,interval:100,attempts:18e3,signal:j.current.signal});if("aborted"===t.status)return void e.close();if("success"===t.status&&t.result.closed)return void k(!1);"success"===t.status&&t.result.done&&e.close();let r=await x({operation:()=>p({}),until:e=>"active"===e.status||"rejected"===e.status,delay:0,interval:2e3,attempts:60,signal:j.current.signal});if("aborted"!==r.status){if("max_attempts"===r.status)return v({status:"kyc-incomplete"}),void k(!1);if(r.status,"rejected"===r.result.status)return v({status:"kyc-error",reason:r.result.rejection_reasons?.[0]?.reason}),b(Error("User KYC rejected.")),void k(!1);if("active"!==r.result.status)return v({status:"kyc-incomplete"}),void k(!1);e.closed||e.close(),r.result.status;try{v({status:"kyc-success"});let e=await f({destination:y.destination,provider:y.provider,source:{asset:y.source.selectedAsset}});v({status:"account-details",data:e})}catch(e){v({status:"create-customer-error"}),b(e)}finally{k(!1)}}}),[v,b,k,m,f,g,y,j]),U=s((e=>{v({status:"select-amount"}),h({...y,source:{...y.source,selectedAsset:e}})}),[v,h]),L=s((()=>{v({status:"select-source-asset"})}),[v]);/*#__PURE__*/return e(Q,{onClose:s((async()=>{j.current?.abort(),w?u(w):await n()}),[w,j]),opts:y,state:g,isLoading:C,email:t.email.address,onAcceptTerms:S,onSelectAmount:A,onSelectSource:U,onEditSourceAsset:L})}};export{X as FundWithBankDepositScreen,X as default};
|
package/dist/esm/{FundingEditAmountScreen-C_YGQD1r.mjs → FundingEditAmountScreen-DVXEtSrh.mjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as t,Fragment as e,jsx as o}from"react/jsx-runtime";import{useRef as r}from"react";import{c as i,B as n}from"./ModalHeader-
|
|
1
|
+
import{jsxs as t,Fragment as e,jsx as o}from"react/jsx-runtime";import{useRef as r}from"react";import{c as i,B as n}from"./ModalHeader-o3NBflPS.mjs";import{F as s}from"./Layouts-BlFm53ED.mjs";import{t as a}from"./FundWalletMethodHeader-DhUicNAG.mjs";import{N as m}from"./index-Dq_xe9dz.mjs";import{T as c}from"./Title-BnzYV3Is.mjs";import{a as l}from"./get-is-unified-wallet-CyC08yWM.mjs";import{u as p}from"./useGetTokenPrice-TFzNln4c.mjs";import{c as d}from"./ethers-CJf4V9xJ.mjs";import{F as u,a as h,h as j,c as f,d as v}from"./styles-DOOmqCS1.mjs";import"styled-components";import"./context-BeiVf64h.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./useActiveWallet-CdOTNCcL.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-5ZtAXJqT.mjs";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"eventemitter3";import"viem/utils";import"./useWallets-BCEKqhGq.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"@privy-io/are-addresses-equal";import"./useGetSolPrice-DwwjjGbd.mjs";import"./LinkPasskeyScreen-D9SIq3bj.mjs";import"lucide-react";import"./TodoList-CgrU7uwu.mjs";import"./ScreenLayout-C8IaXeHq.mjs";import"./Screen-Olwu6khI.mjs";const y={component:()=>{let{data:y,setModalData:C}=l(),g=y?.funding,k="solana"===g.chainType,x=r(null),{tokenPrice:S}=p(k?"solana":g.chain.id),D=k?void 0:g,F=!(!D?.erc20Address||D?.erc20ContractInfo),T=k?g.isUSDC?"USDC":"SOL":g.erc20Address?g.erc20ContractInfo?.symbol:g.chain.nativeCurrency.symbol||"ETH",L=parseFloat(g.amount),A=!isNaN(L)&&L>0,I=S?d(g.amount,S):void 0;/*#__PURE__*/return t(e,{children:[/*#__PURE__*/o(a,{}),/*#__PURE__*/o(c,{children:"Confirm or edit amount"}),/*#__PURE__*/t(s,{style:{marginTop:"32px"},children:[/*#__PURE__*/o(u,{children:F?/*#__PURE__*/o(m,{size:"50px"}):/*#__PURE__*/t(e,{children:[/*#__PURE__*/t(h,{onClick:()=>x.current?.focus(),children:[/*#__PURE__*/o(j,{ref:x,value:g.amount,onChange:t=>{let e=t.target.value;/^[0-9.]*$/.test(e)&&e.split(".").length-1<=1&&C({...y,funding:{...g,amount:e},solanaFundingData:y?.solanaFundingData?{...y.solanaFundingData,amount:e}:void 0})}}),/*#__PURE__*/o(f,{children:T})]}),!D?.erc20Address&&!(k&&g.isUSDC)&&/*#__PURE__*/o(v,{children:I&&A?`${I} USD`:""})]})}),/*#__PURE__*/o(i,{style:{marginTop:"1rem"},disabled:!A,onClick:g.onContinueWithExternalWallet,children:"Continue"})]}),/*#__PURE__*/o(n,{})]})}};export{y as FundingAmountEditScreen,y as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import a from"@heroicons/react/24/outline/CreditCardIcon";import i from"@heroicons/react/24/outline/QrCodeIcon";import o from"@heroicons/react/24/solid/ArrowsRightLeftIcon";import{useState as r,useEffect as c,useMemo as d}from"react";import{getAddress as s}from"viem/utils";import{B as l}from"./ModalHeader-o3NBflPS.mjs";import{t as p}from"./FundWalletMethodHeader-DhUicNAG.mjs";import{E as h}from"./ErrorBanner-CQERa7bL.mjs";import{I as m}from"./InfoBanner-DkQEPd77.mjs";import{u}from"./context-BeiVf64h.mjs";import{v as f,Q as g,U as y}from"./useActiveWallet-CdOTNCcL.mjs";import{a as v,u as C}from"./internal-context-Z-fyxadS.mjs";import{a as w}from"./get-is-unified-wallet-CyC08yWM.mjs";import{u as F}from"./useWallets-BCEKqhGq.mjs";import{W as M}from"./WalletCards-DH1rqayz.mjs";import{g as b}from"./getErc20TokenInfo-1Q6w1Ibq.mjs";import{monadMainnet as S,avalanche as W,arbitrum as x,polygon as I,optimism as j,base as T,mainnet as D,toCoinbaseAssetId as k,getCoinbaseOnRampUrl as A,chainToMoonpayCurrency as L,isSupportedChainIdForMoonpay as z,isSupportedChainIdForCoinbaseOnramp as E}from"@privy-io/js-sdk-core";import{trigger as U}from"@privy-io/popup";import{a as O}from"./index-DCaoh7wM.mjs";import{e as _,I as H,f as P,g as B}from"./styles-DOOmqCS1.mjs";import"styled-components";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"@heroicons/react/24/outline/ExclamationCircleIcon";import"@heroicons/react/24/outline/InformationCircleIcon";import"tinycolor2";import"zustand";import"react-device-detect";import"./use-export-wallet-5ZtAXJqT.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"ofetch";import"@privy-io/are-addresses-equal";import"./analytics-mkkvFRju.mjs";import"./LinkPasskeyScreen-D9SIq3bj.mjs";import"lucide-react";import"./TodoList-CgrU7uwu.mjs";import"./ScreenLayout-C8IaXeHq.mjs";import"./Screen-Olwu6khI.mjs";import"./index-Dq_xe9dz.mjs";const R=n=>/*#__PURE__*/e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 210.2",xmlSpace:"preserve",...n,children:/*#__PURE__*/e("path",{d:"M93.6,27.1C87.6,34.2,78,39.8,68.4,39c-1.2-9.6,3.5-19.8,9-26.1c6-7.3,16.5-12.5,25-12.9 C103.4,10,99.5,19.8,93.6,27.1 M102.3,40.9c-13.9-0.8-25.8,7.9-32.4,7.9c-6.7,0-16.8-7.5-27.8-7.3c-14.3,0.2-27.6,8.3-34.9,21.2 c-15,25.8-3.9,64,10.6,85c7.1,10.4,15.6,21.8,26.8,21.4c10.6-0.4,14.8-6.9,27.6-6.9c12.9,0,16.6,6.9,27.8,6.7 c11.6-0.2,18.9-10.4,26-20.8c8.1-11.8,11.4-23.3,11.6-23.9c-0.2-0.2-22.4-8.7-22.6-34.3c-0.2-21.4,17.5-31.6,18.3-32.2 C123.3,42.9,107.7,41.3,102.3,40.9 M182.6,11.9v155.9h24.2v-53.3h33.5c30.6,0,52.1-21,52.1-51.4c0-30.4-21.1-51.2-51.3-51.2H182.6z M206.8,32.3h27.9c21,0,33,11.2,33,30.9c0,19.7-12,31-33.1,31h-27.8V32.3z M336.6,169c15.2,0,29.3-7.7,35.7-19.9h0.5v18.7h22.4V90.2 c0-22.5-18-37-45.7-37c-25.7,0-44.7,14.7-45.4,34.9h21.8c1.8-9.6,10.7-15.9,22.9-15.9c14.8,0,23.1,6.9,23.1,19.6v8.6l-30.2,1.8 c-28.1,1.7-43.3,13.2-43.3,33.2C298.4,155.6,314.1,169,336.6,169z M343.1,150.5c-12.9,0-21.1-6.2-21.1-15.7c0-9.8,7.9-15.5,23-16.4 l26.9-1.7v8.8C371.9,140.1,359.5,150.5,343.1,150.5z M425.1,210.2c23.6,0,34.7-9,44.4-36.3L512,54.7h-24.6l-28.5,92.1h-0.5 l-28.5-92.1h-25.3l41,113.5l-2.2,6.9c-3.7,11.7-9.7,16.2-20.4,16.2c-1.9,0-5.6-0.2-7.1-0.4v18.7C417.3,210,423.3,210.2,425.1,210.2z"})}),V=t=>/*#__PURE__*/n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 80 38.1",xmlSpace:"preserve",...t,children:[/*#__PURE__*/e("path",{style:{fill:"#5F6368"},d:"M37.8,19.7V29h-3V6h7.8c1.9,0,3.7,0.7,5.1,2c1.4,1.2,2.1,3,2.1,4.9c0,1.9-0.7,3.6-2.1,4.9c-1.4,1.3-3.1,2-5.1,2 L37.8,19.7L37.8,19.7z M37.8,8.8v8h5c1.1,0,2.2-0.4,2.9-1.2c1.6-1.5,1.6-4,0.1-5.5c0,0-0.1-0.1-0.1-0.1c-0.8-0.8-1.8-1.3-2.9-1.2 L37.8,8.8L37.8,8.8z"}),/*#__PURE__*/e("path",{style:{fill:"#5F6368"},d:"M56.7,12.8c2.2,0,3.9,0.6,5.2,1.8s1.9,2.8,1.9,4.8V29H61v-2.2h-0.1c-1.2,1.8-2.9,2.7-4.9,2.7 c-1.7,0-3.2-0.5-4.4-1.5c-1.1-1-1.8-2.4-1.8-3.9c0-1.6,0.6-2.9,1.8-3.9c1.2-1,2.9-1.4,4.9-1.4c1.8,0,3.2,0.3,4.3,1v-0.7 c0-1-0.4-2-1.2-2.6c-0.8-0.7-1.8-1.1-2.9-1.1c-1.7,0-3,0.7-3.9,2.1l-2.6-1.6C51.8,13.8,53.9,12.8,56.7,12.8z M52.9,24.2 c0,0.8,0.4,1.5,1,1.9c0.7,0.5,1.5,0.8,2.3,0.8c1.2,0,2.4-0.5,3.3-1.4c1-0.9,1.5-2,1.5-3.2c-0.9-0.7-2.2-1.1-3.9-1.1 c-1.2,0-2.2,0.3-3,0.9C53.3,22.6,52.9,23.3,52.9,24.2z"}),/*#__PURE__*/e("path",{style:{fill:"#5F6368"},d:"M80,13.3l-9.9,22.7h-3l3.7-7.9l-6.5-14.7h3.2l4.7,11.3h0.1l4.6-11.3H80z"}),/*#__PURE__*/e("path",{style:{fill:"#4285F4"},d:"M25.9,17.7c0-0.9-0.1-1.8-0.2-2.7H13.2v5.1h7.1c-0.3,1.6-1.2,3.1-2.6,4v3.3H22C24.5,25.1,25.9,21.7,25.9,17.7z"}),/*#__PURE__*/e("path",{style:{fill:"#34A853"},d:"M13.2,30.6c3.6,0,6.6-1.2,8.8-3.2l-4.3-3.3c-1.2,0.8-2.7,1.3-4.5,1.3c-3.4,0-6.4-2.3-7.4-5.5H1.4v3.4 C3.7,27.8,8.2,30.6,13.2,30.6z"}),/*#__PURE__*/e("path",{style:{fill:"#FBBC04"},d:"M5.8,19.9c-0.6-1.6-0.6-3.4,0-5.1v-3.4H1.4c-1.9,3.7-1.9,8.1,0,11.9L5.8,19.9z"}),/*#__PURE__*/e("path",{style:{fill:"#EA4335"},d:"M13.2,9.4c1.9,0,3.7,0.7,5.1,2l0,0l3.8-3.8c-2.4-2.2-5.6-3.5-8.8-3.4c-5,0-9.6,2.8-11.8,7.3l4.4,3.4 C6.8,11.7,9.8,9.4,13.2,9.4z"})]}),q=e=>{let[n,t]=r();return c((()=>{e().then((e=>{t(e)})).catch((()=>{}))}),[]),n};function N(e){let n=Q[e];if(!n)throw new v(`Unsupported chainId: ${e} for Coinbase Onramp`);return n}let Q={[D.id]:"ethereum",[T.id]:"base",[j.id]:"optimism",[I.id]:"polygon",[x.id]:"arbitrum",[W.id]:"avacchain",[S.id]:"monad"};const $=(e,n,t,a,i,o)=>new Promise((async(r,c)=>{let d=U();if(!d)return void c(Error("Unable to initialize flow"));let s="ethereum"===n.chainType?N(n.chain.id):"solana",l=n.isUSDC?"USDC":"ethereum"===n.chainType?k(n.chain.id,"native-currency"):"SOL",p=await e.initCoinbaseOnRamp({addresses:[{address:n.address,blockchains:[s]}],assets:[l]}),{url:h}=A({appId:e.getAppId(),input:p,amount:n.amount,blockchain:s,asset:l,experience:o});d.location=h.toString();let m={...i?.funding,showAlternateFundingMethod:!0};n.usingDefaultFundingMethod&&(m.usingDefaultFundingMethod=!1),t({funding:m,solanaFundingData:i?.solanaFundingData,coinbaseOnrampStatus:{popup:d}}),a("CoinbaseOnrampStatusScreen"),e.createAnalyticsEvent({eventName:"sdk_fiat_on_ramp_started",payload:{provider:"coinbase-onramp",value:n.amount,chainType:n.chainType,chainId:"ethereum"===n.chainType?n.chain.id:n.chain}}),setTimeout((()=>{t({funding:m,solanaFundingData:i?.solanaFundingData,coinbaseOnrampStatus:{partnerUserId:p.partner_user_id,popup:d}})}),5e3),r()})),G=async(e,n,t,a,i,o,r,c)=>{let d=U();if(!d)throw Error("Unable to initialize flow");let s="ethereum"===n.chainType?L(n.chain.id,a):n.isUSDC?"USDC_SOL":"SOL",{signedUrl:l,externalTransactionId:p}=await e.signMoonpayOnRampUrl({address:n.address,useSandbox:t.fundingMethodConfig.moonpay.useSandbox??!1,config:{uiConfig:{accentColor:t.appearance.palette.accent,theme:t.appearance.palette.colorScheme},paymentMethod:c,currencyCode:s,quoteCurrencyAmount:O(n.amount)}});e.createAnalyticsEvent({eventName:"sdk_fiat_on_ramp_started",payload:{provider:"moonpay",value:n.amount,chainType:n.chainType,chainId:"ethereum"===n.chainType?n.chain.id:n.chain}}),d.location=l;let h={...r?.funding,showAlternateFundingMethod:!0};n.usingDefaultFundingMethod&&(h.usingDefaultFundingMethod=!1),i({moonpayStatus:{},funding:h,solanaFundingData:r?.solanaFundingData}),o("MoonpayStatusScreen"),setTimeout((()=>{i({moonpayStatus:{externalTransactionId:p},funding:h,solanaFundingData:r?.solanaFundingData})}),8e3)};let X=async e=>"undefined"!=typeof window&&"PaymentRequest"in window&&await new window.PaymentRequest([{supportedMethods:e}],{id:"0",total:{label:"Item",amount:{currency:"USD",value:"1.00"}}}).canMakePayment();const J=()=>X("https://apple.com/apple-pay"),K=()=>X("https://google.com/pay"),Y={component:()=>{let{wallets:r}=F(),{connectors:v}=C(),S=v.filter(f).flatMap((e=>e.wallets)),{navigate:W,data:x,setModalData:I}=w(),{client:j}=C(),T=u(),D=x?.funding,k=q(J),A=q(K),L="solana"===D.chainType,U=L?void 0:D,O=d((()=>((e,n,t,a,i,o)=>{let r,c,d="solana"===t.chainType,s=d?void 0:t,l=t.isUSDC?"USDC":s?.erc20Address?void 0:"native-currency",p=!!d||l&&z(Number(t.chain.id),l),h=!!d||l&&E(Number(t.chain.id),l),m=[];for(let r of(t.preferredCardProvider&&t.supportedOptions.sort((e=>e.provider===t.preferredCardProvider?-1:1)),t.supportedOptions))"card"===r.method&&"coinbase"===r.provider&&h&&m.push((()=>$(n,t,a,i,o,"buy"))),"card"===r.method&&"moonpay"===r.provider&&p&&l&&m.push((()=>G(n,t,e,l,a,i,o,"credit_debit_card")));for(let e of t.supportedOptions)"exchange"===e.method&&"coinbase"===e.provider&&h&&(r=()=>$(n,t,a,i,o,"buy"));for(let e of o?.funding?.supportedOptions??[])"wallets"===e.method&&(c=()=>i("TransferFromWalletScreen"));return{onFundWithCard:m,onFundWithExchange:r,onFundWithWallet:c}})(T,j,D,I,W,x)),[T,j,D,x,I,W]),N=L?S.find((({address:e})=>e===D.address)):r.find((({address:e})=>s(e)===s(D.address))),Q=g(N?.walletClientType||"unknown"),X=Q?.name||"wallet",Y=N&&"privy"!==N.walletClientType?X:T.name,Z=d((()=>D.uiConfig?.landing?.title?D.uiConfig?.landing?.title:`Add funds to your ${Y?.toLowerCase().endsWith("wallet")?Y:Y+" wallet"}`),[D.uiConfig?.landing?.title,Y]);c((()=>{if(D?.defaultFundingMethod&&D.usingDefaultFundingMethod)switch(I({funding:{...D,usingDefaultFundingMethod:!1},solanaFundingData:x?.solanaFundingData}),D?.defaultFundingMethod){case"card":O.onFundWithCard[0]&&O.onFundWithCard[0]();break;case"exchange":O.onFundWithExchange&&O.onFundWithExchange();break;case"wallet":O.onFundWithWallet&&O.onFundWithWallet();break;case"manual":W("ManualTransferScreen")}}),[]),c((()=>{U?.erc20Address&&!U.erc20ContractInfo&&b({address:U.erc20Address,chain:U.chain,rpcConfig:T.rpcConfig,privyAppId:T.id}).then((e=>{I({...x,funding:{...U,erc20ContractInfo:e?{symbol:e.symbol,decimals:e.decimals}:void 0}})})).catch(console.error)}),[U?.erc20Address,U?.chain]);let ee=!(!U?.erc20Address||U?.erc20ContractInfo);/*#__PURE__*/return n(t,{children:[/*#__PURE__*/e(p,{}),/*#__PURE__*/e("h3",{children:Z}),/*#__PURE__*/n(_,{children:[D.errorMessage&&/*#__PURE__*/e(h,{theme:T.appearance.palette.colorScheme,children:D.errorMessage}),O.onFundWithCard?.[0]&&/*#__PURE__*/n(y,{disabled:ee,onClick:O.onFundWithCard[0],children:[/*#__PURE__*/e(H,{children:/*#__PURE__*/e(a,{style:{width:24}})}),"Pay with card",k?/*#__PURE__*/e(R,{style:{marginLeft:"auto",maxWidth:"100%",width:"auto",height:"0.875rem"}}):A?/*#__PURE__*/e(V,{style:{marginLeft:"auto",maxWidth:"100%",width:"auto",height:"0.875rem"}}):null]}),O.onFundWithExchange&&/*#__PURE__*/n(y,{disabled:ee,onClick:O.onFundWithExchange,children:[/*#__PURE__*/e(H,{children:/*#__PURE__*/e(o,{style:{width:24}})}),"Transfer from an exchange"]}),O.onFundWithWallet&&/*#__PURE__*/n(y,{disabled:ee,onClick:O.onFundWithWallet,children:[/*#__PURE__*/e(H,{children:/*#__PURE__*/e(M,{style:{width:24}})}),"Transfer from wallet"]}),/*#__PURE__*/n(y,{disabled:ee,onClick:()=>W("ManualTransferScreen"),children:[/*#__PURE__*/e(H,{children:/*#__PURE__*/e(i,{style:{width:24}})}),"Receive funds"]}),D?.showAlternateFundingMethod&&O.onFundWithCard?.[1]&&/*#__PURE__*/e(m,{theme:T.appearance.palette.colorScheme,children:/*#__PURE__*/n(P,{children:["Having trouble or facing location restrictions?"," ",/*#__PURE__*/e(B,{onClick:O.onFundWithCard[1],children:"Try a different provider."})]})})]}),/*#__PURE__*/e(l,{})]})}};export{Y as FundingMethodSelectionScreen,Y as default};
|