@privy-io/react-auth 3.13.1 → 3.14.0-beta-20260213175842
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-5vIT9Vj5.js +1 -0
- package/dist/cjs/{Address-BAzd87pQ.js → Address-CSvwjtZr.js} +1 -1
- package/dist/cjs/AffirmativeConsentScreen-CkZG9t3r.js +6 -0
- package/dist/cjs/AllowlistRejectionScreen-BIpHpSsP.js +1 -0
- package/dist/cjs/AuthenticateWithWalletScreen-DxE4Mo3e.js +1 -0
- package/dist/cjs/AwaitingEvmToSolBridgingScreen-C4cZT6jZ.js +2 -0
- package/dist/cjs/AwaitingExternalEthereumTransferScreen-DysfSqRu.js +2 -0
- package/dist/cjs/AwaitingPasswordlessCodeScreen-BKgo7WSz.js +103 -0
- package/dist/cjs/AwaitingSolToEvmBridgingScreen-By2XqcuD.js +2 -0
- package/dist/cjs/{BridgeNetworkSelectionView-BBifxbuQ.js → BridgeNetworkSelectionView-Cbcwjeju.js} +7 -7
- package/dist/cjs/CaptchaScreen-DLafB2fk.js +1 -0
- package/dist/cjs/CoinbaseOnrampStatusScreen-BOecfziJ.js +16 -0
- package/dist/cjs/{ConnectEmailForm-DSB_ECav.js → ConnectEmailForm-DxGEbc_v.js} +1 -1
- package/dist/cjs/ConnectLedgerScreen-Bt6fqaYQ.js +9 -0
- package/dist/cjs/ConnectOnlyLandingScreen-Drw33dcK.js +1 -0
- package/dist/cjs/ConnectOnlyStatusScreen-Bo8cxqDk.js +1 -0
- package/dist/cjs/ConnectOrCreateScreen-L6lv1fMf.js +1 -0
- package/dist/cjs/{ConnectPhoneForm-lBXP5nI1.js → ConnectPhoneForm-H8tbcWjZ.js} +1 -1
- package/dist/cjs/ConnectWalletView-C90zRo3A.js +147 -0
- package/dist/cjs/ConnectionStatusScreen-B0xQfUL_.js +7 -0
- package/dist/cjs/CopyToClipboard-CC0DCGEH.js +39 -0
- package/dist/cjs/CopyableText-DbFeIZI0.js +23 -0
- package/dist/cjs/CrossAppAuthScreen-DmbfWG4K.js +1 -0
- package/dist/cjs/{CustomLandingScreenView-CQqBEerN.js → CustomLandingScreenView-F5WyUe3t.js} +3 -3
- package/dist/cjs/DelegatedActionsConsentScreen-DaARlIlY.js +1 -0
- package/dist/cjs/DelegatedActionsRevokeScreen-Ckwh9Fde.js +1 -0
- package/dist/cjs/EmbeddedWalletConnectingScreen-Dt0qglpB.js +1 -0
- package/dist/cjs/EmbeddedWalletCreatedScreen-D-U2qhvc.js +1 -0
- package/dist/cjs/{EmbeddedWalletKeyExportScreen-CLwKZG9l.js → EmbeddedWalletKeyExportScreen-DHAE6n6A.js} +3 -3
- package/dist/cjs/EmbeddedWalletOnAccountCreateScreen-BLM0P_Et.js +1 -0
- package/dist/cjs/EmbeddedWalletPasswordUpdateScreen-DDwEP_VK.js +1 -0
- package/dist/cjs/EmbeddedWalletPasswordUpdateSplashScreen-xcFuRZ6Q.js +1 -0
- package/dist/cjs/{EnrollTotp-Dzazx21f.js → EnrollTotp-BrTAAhHi.js} +8 -8
- package/dist/cjs/ErrorScreen-CDPwlNzs.js +4 -0
- package/dist/cjs/{FarcasterConnectStatusScreen-B7w0TBzB.js → FarcasterConnectStatusScreen-DbxK9gJn.js} +6 -6
- package/dist/cjs/FarcasterSignerStatusScreen-BOMNzi1f.js +29 -0
- package/dist/cjs/FundSolWalletWithExternalSolanaWallet-Dmqm7veU.js +2 -0
- package/dist/cjs/{FundWalletMethodHeader-2kXHTrGK.js → FundWalletMethodHeader-DJyBd0Vy.js} +1 -1
- package/dist/cjs/FundWithBankDepositScreen-Czy1E-yH.js +175 -0
- package/dist/cjs/FundingEditAmountScreen-6frvmbbd.js +1 -0
- package/dist/cjs/FundingMethodSelectionScreen-yOWUZZMX.js +1 -0
- package/dist/cjs/InAppBrowserLoginNotPossible-B4w2nX7Y.js +1 -0
- package/dist/cjs/{InfoBanner-C15hE_sj.js → InfoBanner-D5_XYHKY.js} +9 -6
- package/dist/cjs/InstallWalletScreen-CzTSvUdl.js +1 -0
- package/dist/cjs/LandingScreen-DNxGiYzs.js +1 -0
- package/dist/cjs/{LinkConflictScreen-CQiPRZsR.js → LinkConflictScreen-BPOi68lz.js} +3 -3
- package/dist/cjs/LinkEmailScreen-DhYoI9Vx.js +1 -0
- package/dist/cjs/{LinkPasskeyScreen-DR1inEW4.js → LinkPasskeyScreen-BVFUwWQG.js} +11 -11
- package/dist/cjs/LinkPhoneScreen-BqHYoNzR.js +1 -0
- package/dist/cjs/LoginFailedScreen-D0WLbTBb.js +1 -0
- package/dist/cjs/ManualTransferScreen-CRJmPuoR.js +1 -0
- package/dist/cjs/MfaAuthEnrollmentFlowScreen-BOZc_N-x.js +1 -0
- package/dist/cjs/MfaAuthVerifyFlowScreen-CN0qs3DP.js +1 -0
- package/dist/cjs/MfaEnrollmentFlowScreen-BpP8OUm7.js +1 -0
- package/dist/cjs/MfaVerifyFlowScreen-B8ij23uJ.js +1 -0
- package/dist/cjs/{ModalHeader-CabvEpAG.js → ModalHeader-CSz_JC8Q.js} +18 -12
- package/dist/cjs/MoonpayStatusScreen-CBADlt11.js +16 -0
- package/dist/cjs/OAuthStatusScreen-DQ5Tw8M1.js +1 -0
- package/dist/cjs/PasskeySelectSignupOrLogin-DsjVGCMc.js +1 -0
- package/dist/cjs/PasskeyStatusScreen-l2rYZ1IG.js +3 -0
- package/dist/cjs/PasswordRecoveryScreen-V3DheMKe.js +20 -0
- package/dist/cjs/{QrCode-B5K0VLPw.js → QrCode-CeAi1LRZ.js} +1 -1
- package/dist/cjs/RecoveryOAuthStatusScreen-tu_yyjoG.js +1 -0
- package/dist/cjs/RecoveryPasswordCreateScreen-Z7ucSNLS.js +1 -0
- package/dist/cjs/{RecoverySelectionScreen-C2tuntn9.js → RecoverySelectionScreen-DWqGXp3l.js} +2 -2
- package/dist/cjs/{Screen-BXzBiTIN.js → Screen-D6ig-IDr.js} +20 -10
- package/dist/cjs/ScreenLayout-Dkt0mrht.js +1 -0
- package/dist/cjs/{SetAutomaticRecoveryScreen-DDVOX064.js → SetAutomaticRecoveryScreen-DHNuiSgK.js} +2 -2
- package/dist/cjs/{SetWalletPasswordForm-CjifRxS3.js → SetWalletPasswordForm-R9Somnyp.js} +2 -2
- package/dist/cjs/{SignRequestScreen-B6fS5qTS.js → SignRequestScreen-ZokQxsYU.js} +2 -2
- package/dist/cjs/{StandardSignAndSendTransactionScreen-B5BX6LFZ.js → StandardSignAndSendTransactionScreen-wTGPTlgg.js} +2 -2
- package/dist/cjs/TelegramAuthScreen-BFDvy3uz.js +1 -0
- package/dist/cjs/{TransactionDetails-CGZ0hDXd.js → TransactionDetails-ddaXz8YV.js} +1 -1
- package/dist/cjs/{TransactionErrorView-C5-4kCDL.js → TransactionErrorView-CrjFmgNv.js} +5 -5
- package/dist/cjs/{TransferFromWalletScreen-Be_N5MeO.js → TransferFromWalletScreen-Rt6vEVf4.js} +2 -2
- package/dist/cjs/{TransferOrBridgeLoadingScreen-BGp5x3h8.js → TransferOrBridgeLoadingScreen-Dp_vpEYG.js} +2 -2
- package/dist/cjs/UpdateEmailScreen-6gNNAUvB.js +1 -0
- package/dist/cjs/UpdatePhoneScreen-C7qjXMNn.js +1 -0
- package/dist/cjs/UserLimitReachedScreen-DWgXgQyy.js +1 -0
- package/dist/cjs/{WalletInfoCard-BYZGsWwj.js → WalletInfoCard-CO7fOCNd.js} +4 -4
- package/dist/cjs/WalletInterstitialScreen-C05fMGUR.js +1 -0
- package/dist/cjs/{WalletLink-Bj02lEf9.js → WalletLink-Bldwftgh.js} +5 -5
- package/dist/cjs/{WalletOverflowButton-p3vpo0QR.js → WalletOverflowButton-D6xV7e4O.js} +1 -1
- package/dist/cjs/abstract-smart-wallets.js +1 -1
- package/dist/cjs/{context-CuNnvCIL.js → context-6PrkFAzG.js} +1 -1
- package/dist/cjs/{ethers-C_dhPYcC.js → ethers-_hdpXGqQ.js} +1 -1
- package/dist/cjs/extended-chains.js +1 -1
- package/dist/cjs/{get-is-unified-wallet-C2yi08Zy.js → get-is-unified-wallet-Cd_IhZS9.js} +1 -1
- package/dist/cjs/{getErc20Balance-CJvcxOe9.js → getErc20Balance-D2jXMvJ8.js} +1 -1
- package/dist/cjs/{getErc20TokenInfo-DqY-nDYo.js → getErc20TokenInfo-DxDd_HN6.js} +1 -1
- package/dist/cjs/{index-CKUeuhfu.js → index-BlUF144d.js} +1 -1
- package/dist/cjs/index-CaGJR6Wm.js +174 -0
- package/dist/cjs/{index-TUET0BYX.js → index-rArQaM8n.js} +3 -3
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/internal.js +1 -1
- package/dist/cjs/{shared-AII0g-d1.js → shared-hn3VMWc8.js} +1 -1
- package/dist/cjs/{shouldProceedtoEmbeddedWalletCreationFlow-DE4oGpYl.js → shouldProceedtoEmbeddedWalletCreationFlow-KizljXLw.js} +1 -1
- package/dist/cjs/{smart-wallets-BypZdOsC.js → smart-wallets-B7Oeb874.js} +1 -1
- package/dist/cjs/smart-wallets.js +1 -1
- package/dist/cjs/solana.js +1 -1
- package/dist/cjs/{styles-D7QQZERY.js → styles-Dthqo7lh.js} +4 -4
- package/dist/cjs/{to-ui-error-DNNop_FY.js → to-ui-error-DfSSp7Nk.js} +2 -2
- package/dist/cjs/ui.js +40 -40
- package/dist/cjs/{use-export-wallet-B7CUqWdP.js → use-export-wallet-Ce_CCutn.js} +1 -1
- package/dist/cjs/use-export-wallet-DZ-GzASy.js +1 -0
- package/dist/cjs/{useActiveWallet-D5qqs3GS.js → useActiveWallet-B-qt_lhr.js} +1 -1
- package/dist/cjs/{useGetTokenPrice-BRQnbdi2.js → useGetTokenPrice-C8Me29xD.js} +1 -1
- package/dist/cjs/{useI18n-DKrZl8KW.js → useI18n-Bffg27Cp.js} +1 -1
- package/dist/cjs/{usePrivy-BKHhRZMn.js → usePrivy-CLwa9i8X.js} +1 -1
- package/dist/cjs/{useSolanaRpcClient-DXykrMtX.js → useSolanaRpcClient-COyhHAzq.js} +1 -1
- package/dist/cjs/{useWallets-CP2-zXxW.js → useWallets-C3RaxJM1.js} +1 -1
- package/dist/cjs/{useWallets-Bv9SU-di.js → useWallets-DMj2ztZn.js} +1 -1
- package/dist/dts/{events-context-CV9PiG6M.d.ts → events-context-JU6EgMXK.d.mts} +1 -1
- package/dist/dts/{events-context-CV9PiG6M.d.mts → events-context-JU6EgMXK.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 +27 -7
- package/dist/dts/index.d.ts +27 -7
- 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-xIUh0rN4.d.mts → types-BVn8nTiQ.d.mts} +48 -2
- package/dist/dts/{types-xIUh0rN4.d.ts → types-BVn8nTiQ.d.ts} +48 -2
- package/dist/dts/ui.d.mts +1 -1
- package/dist/dts/ui.d.ts +1 -1
- package/dist/esm/AccountNotFoundScreen-C2pbqBG5.mjs +1 -0
- package/dist/esm/{Address-BmCgxKQR.mjs → Address-BUuQgiKx.mjs} +1 -1
- package/dist/esm/AffirmativeConsentScreen-Dzep5iOm.mjs +6 -0
- package/dist/esm/AllowlistRejectionScreen-BsdZulEI.mjs +1 -0
- package/dist/esm/AuthenticateWithWalletScreen-CsJMj128.mjs +1 -0
- package/dist/esm/AwaitingEvmToSolBridgingScreen-DLbhkxwX.mjs +2 -0
- package/dist/esm/AwaitingExternalEthereumTransferScreen-DnC6EHU3.mjs +2 -0
- package/dist/esm/AwaitingPasswordlessCodeScreen-C7ijDazf.mjs +103 -0
- package/dist/esm/AwaitingSolToEvmBridgingScreen-Dyj2FHsc.mjs +2 -0
- package/dist/esm/{BridgeNetworkSelectionView-tyz86GlM.mjs → BridgeNetworkSelectionView-BxMqN8K9.mjs} +2 -2
- package/dist/esm/CaptchaScreen-whJmro23.mjs +1 -0
- package/dist/esm/CoinbaseOnrampStatusScreen-BUQ33EPn.mjs +16 -0
- package/dist/esm/ConnectEmailForm-7WKXyLIX.mjs +3 -0
- package/dist/esm/ConnectLedgerScreen-0KV09asJ.mjs +9 -0
- package/dist/esm/ConnectOnlyLandingScreen-zmLwJak1.mjs +1 -0
- package/dist/esm/ConnectOnlyStatusScreen-1icMWuif.mjs +1 -0
- package/dist/esm/ConnectOrCreateScreen-2TykrLcn.mjs +1 -0
- package/dist/esm/{ConnectPhoneForm-nVYECWzo.mjs → ConnectPhoneForm-Bww6OFqd.mjs} +1 -1
- package/dist/esm/ConnectWalletView-DQNMKorC.mjs +147 -0
- package/dist/esm/ConnectionStatusScreen-VsYDFXuf.mjs +7 -0
- package/dist/esm/CopyToClipboard-DSTf_eKU.mjs +39 -0
- package/dist/esm/CopyableText-BCytXyJL.mjs +23 -0
- package/dist/esm/CrossAppAuthScreen-C--90PAJ.mjs +1 -0
- package/dist/esm/{CustomLandingScreenView-B4a5Rc9z.mjs → CustomLandingScreenView-By1LM9_0.mjs} +4 -4
- package/dist/esm/DelegatedActionsConsentScreen-8g9H15c_.mjs +1 -0
- package/dist/esm/DelegatedActionsRevokeScreen-zc8PZT7I.mjs +1 -0
- package/dist/esm/EmbeddedWalletConnectingScreen-BGVioYgV.mjs +1 -0
- package/dist/esm/EmbeddedWalletCreatedScreen-Mhhj67RG.mjs +1 -0
- package/dist/esm/{EmbeddedWalletKeyExportScreen-B-6Lfc6D.mjs → EmbeddedWalletKeyExportScreen-yqPvQfdO.mjs} +3 -3
- package/dist/esm/EmbeddedWalletOnAccountCreateScreen-BOhuDYCL.mjs +1 -0
- package/dist/esm/EmbeddedWalletPasswordUpdateScreen-X518ZR44.mjs +1 -0
- package/dist/esm/EmbeddedWalletPasswordUpdateSplashScreen-DC4MfkYK.mjs +1 -0
- package/dist/esm/{EnrollTotp-D6VGtjIL.mjs → EnrollTotp-BcCG_2JB.mjs} +5 -5
- package/dist/esm/ErrorScreen-CfvFq4SG.mjs +4 -0
- package/dist/esm/{FarcasterConnectStatusScreen-BN_wRxNV.mjs → FarcasterConnectStatusScreen-BOCl_7jx.mjs} +6 -6
- package/dist/esm/FarcasterSignerStatusScreen-u4I-WK_R.mjs +28 -0
- package/dist/esm/FundSolWalletWithExternalSolanaWallet-BUIK74Vs.mjs +1 -0
- package/dist/esm/{FundWalletMethodHeader-Ce0vLrUa.mjs → FundWalletMethodHeader-CIBx6zhp.mjs} +1 -1
- package/dist/esm/FundWithBankDepositScreen-3QErhg-G.mjs +175 -0
- package/dist/esm/FundingEditAmountScreen-BgoXDEQJ.mjs +1 -0
- package/dist/esm/FundingMethodSelectionScreen-DtehXUD4.mjs +1 -0
- package/dist/esm/InAppBrowserLoginNotPossible-CQh8AsKB.mjs +1 -0
- package/dist/esm/{InfoBanner-Dk1KghcK.mjs → InfoBanner-DkQEPd77.mjs} +7 -4
- package/dist/esm/InstallWalletScreen-DM3c8LSP.mjs +1 -0
- package/dist/esm/LandingScreen-YPDnWhWL.mjs +1 -0
- package/dist/esm/{LinkConflictScreen-B-yRqIRn.mjs → LinkConflictScreen-hKT_zmu4.mjs} +3 -3
- package/dist/esm/LinkEmailScreen-Df1znKnY.mjs +1 -0
- package/dist/esm/{LinkPasskeyScreen-BfGROb2f.mjs → LinkPasskeyScreen-bcve9Yp2.mjs} +5 -5
- package/dist/esm/LinkPhoneScreen-o7rW47jd.mjs +1 -0
- package/dist/esm/LoginFailedScreen-C0I8TCwN.mjs +1 -0
- package/dist/esm/ManualTransferScreen-BvZ-uUht.mjs +1 -0
- package/dist/esm/MfaAuthEnrollmentFlowScreen-DK5SBNG1.mjs +1 -0
- package/dist/esm/MfaAuthVerifyFlowScreen-uFMuo7rY.mjs +1 -0
- package/dist/esm/MfaEnrollmentFlowScreen-D5btQxJc.mjs +1 -0
- package/dist/esm/MfaVerifyFlowScreen-DJVq1as_.mjs +1 -0
- package/dist/esm/{ModalHeader-CvLNEZ0F.mjs → ModalHeader-D0p4fONI.mjs} +31 -25
- package/dist/esm/MoonpayStatusScreen-Cfm8Qiby.mjs +16 -0
- package/dist/esm/OAuthStatusScreen-5eCQuPjc.mjs +1 -0
- package/dist/esm/PasskeySelectSignupOrLogin-Cv5Q8ywD.mjs +1 -0
- package/dist/esm/PasskeyStatusScreen-BvG8ib-c.mjs +3 -0
- package/dist/esm/PasswordRecoveryScreen-DxqMp8Jc.mjs +20 -0
- package/dist/esm/{QrCode-AKgpho6r.mjs → QrCode-DZulv1E7.mjs} +1 -1
- package/dist/esm/RecoveryOAuthStatusScreen-CAgXyVJk.mjs +1 -0
- package/dist/esm/RecoveryPasswordCreateScreen-DKt0Ntjx.mjs +1 -0
- package/dist/esm/{RecoverySelectionScreen-CJG-J3Aj.mjs → RecoverySelectionScreen-DCrjjtfj.mjs} +2 -2
- package/dist/esm/{Screen-DnEl8dVF.mjs → Screen-BVipC9vr.mjs} +21 -11
- package/dist/esm/ScreenLayout-jvcCZKF1.mjs +1 -0
- package/dist/esm/{SetAutomaticRecoveryScreen-CXNCqRU4.mjs → SetAutomaticRecoveryScreen-BfeoWlEq.mjs} +1 -1
- package/dist/esm/{SetWalletPasswordForm-Bns8qtXn.mjs → SetWalletPasswordForm-A8PITZIA.mjs} +4 -4
- package/dist/esm/{SignRequestScreen-7t8KCRXP.mjs → SignRequestScreen-BeJ09qE0.mjs} +4 -4
- package/dist/esm/{StandardSignAndSendTransactionScreen-BIJeFjT1.mjs → StandardSignAndSendTransactionScreen-D7QXH5p4.mjs} +2 -2
- package/dist/esm/TelegramAuthScreen-I0g5mHaE.mjs +1 -0
- package/dist/esm/{TransactionDetails-DhYW2qjK.mjs → TransactionDetails-JIdNJKup.mjs} +4 -4
- package/dist/esm/{TransactionErrorView-DtnhZ5P5.mjs → TransactionErrorView-UHPbTcc8.mjs} +8 -8
- package/dist/esm/{TransferFromWalletScreen-BdIo62Cg.mjs → TransferFromWalletScreen-DtSbt6rX.mjs} +3 -3
- package/dist/esm/{TransferOrBridgeLoadingScreen-C9hX5Ost.mjs → TransferOrBridgeLoadingScreen-bbU-Tw1f.mjs} +1 -1
- package/dist/esm/UpdateEmailScreen-B4t4yIw5.mjs +1 -0
- package/dist/esm/UpdatePhoneScreen-BeYLqIY0.mjs +1 -0
- package/dist/esm/UserLimitReachedScreen-Bj4M7xcN.mjs +1 -0
- package/dist/esm/{WalletInfoCard-CVCh-Z5E.mjs → WalletInfoCard-B-r0es4h.mjs} +2 -2
- package/dist/esm/WalletInterstitialScreen-CWc04MMh.mjs +1 -0
- package/dist/esm/{WalletLink-xufwYyQh.mjs → WalletLink-DlGvmqW7.mjs} +1 -1
- package/dist/esm/{WalletOverflowButton-qXN0KcGe.mjs → WalletOverflowButton-DHr4glN7.mjs} +1 -1
- package/dist/esm/abstract-smart-wallets.mjs +1 -1
- package/dist/esm/context-Drt9FC1y.mjs +1 -0
- package/dist/esm/{ethers-DGsvPPEp.mjs → ethers-UlIaNUWW.mjs} +1 -1
- package/dist/esm/extended-chains.mjs +1 -1
- package/dist/esm/get-is-unified-wallet-BC-7_b8O.mjs +1 -0
- package/dist/esm/{getErc20Balance-D0MGUaOw.mjs → getErc20Balance-DA4dGV9O.mjs} +1 -1
- package/dist/esm/{getErc20TokenInfo-CZJTqd4c.mjs → getErc20TokenInfo-1Q6w1Ibq.mjs} +1 -1
- package/dist/esm/{index-BMpFxPbi.mjs → index-B7hLnfAQ.mjs} +1 -1
- package/dist/esm/index-BZ6FAPh7.mjs +174 -0
- package/dist/esm/{index--X7RfrXS.mjs → index-Df3Phxz2.mjs} +3 -3
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal.mjs +1 -1
- package/dist/esm/{shared-CSN6-8CF.mjs → shared-BpuV-mxk.mjs} +1 -1
- package/dist/esm/{shouldProceedtoEmbeddedWalletCreationFlow-BdpCzEJT.mjs → shouldProceedtoEmbeddedWalletCreationFlow-COZ-_baJ.mjs} +1 -1
- package/dist/esm/{smart-wallets-DjBZWleC.mjs → smart-wallets-EqV3QCuS.mjs} +1 -1
- package/dist/esm/smart-wallets.mjs +1 -1
- package/dist/esm/solana.mjs +1 -1
- package/dist/esm/{styles-aArPlAod.mjs → styles-Dl341B8G.mjs} +15 -15
- package/dist/esm/{to-ui-error-DKeOToXI.mjs → to-ui-error-DvLMlZKC.mjs} +2 -2
- package/dist/esm/ui.mjs +16 -16
- package/dist/esm/use-export-wallet-BlKa-i97.mjs +1 -0
- package/dist/esm/{use-export-wallet-BcHSx5WT.mjs → use-export-wallet-CqWaIkKU.mjs} +1 -1
- package/dist/esm/{useActiveWallet-36SuARye.mjs → useActiveWallet-DGV02YBT.mjs} +1 -1
- package/dist/esm/useGetTokenPrice-CyEyHBvW.mjs +1 -0
- package/dist/esm/{useI18n-CbESkJQ7.mjs → useI18n-De-HiNn7.mjs} +1 -1
- package/dist/esm/usePrivy-pdKy_IjS.mjs +1 -0
- package/dist/esm/{useSolanaRpcClient-DajzMnxc.mjs → useSolanaRpcClient-DlKLUp1h.mjs} +1 -1
- package/dist/esm/{useWalletBalance-BDrbQBDX.mjs → useWalletBalance-CDyi5_iR.mjs} +1 -1
- package/dist/esm/{useWallets-BwdySlks.mjs → useWallets-BAZolsyf.mjs} +1 -1
- package/dist/esm/{useWallets-02TRgRMN.mjs → useWallets-CV3WTwML.mjs} +1 -1
- package/package.json +4 -3
- package/dist/cjs/AccountNotFoundScreen-iNQ-eJ82.js +0 -1
- package/dist/cjs/AffirmativeConsentScreen-Ba1XAxqh.js +0 -6
- package/dist/cjs/AllowlistRejectionScreen-CMZahkkw.js +0 -1
- package/dist/cjs/AuthenticateWithWalletScreen-BpfHRQ17.js +0 -1
- package/dist/cjs/AwaitingEvmToSolBridgingScreen-BWaBsau9.js +0 -2
- package/dist/cjs/AwaitingExternalEthereumTransferScreen-DN7h9ETe.js +0 -2
- package/dist/cjs/AwaitingPasswordlessCodeScreen-D2KbYvKF.js +0 -103
- package/dist/cjs/AwaitingSolToEvmBridgingScreen-C06q4jjQ.js +0 -2
- package/dist/cjs/CaptchaScreen-Bj5yik5Q.js +0 -1
- package/dist/cjs/CoinbaseOnrampStatusScreen-CP5PYZBV.js +0 -16
- package/dist/cjs/ConnectLedgerScreen-BazfRtiX.js +0 -9
- package/dist/cjs/ConnectOnlyLandingScreen-CsbSt3la.js +0 -1
- package/dist/cjs/ConnectOnlyStatusScreen-5aAg7ONz.js +0 -1
- package/dist/cjs/ConnectOrCreateScreen-C0t-tK0s.js +0 -1
- package/dist/cjs/ConnectWalletView-EuTf-6Vt.js +0 -171
- package/dist/cjs/ConnectionStatusScreen-BL6n6Ct-.js +0 -7
- package/dist/cjs/CopyToClipboard-BCe_l6_D.js +0 -39
- package/dist/cjs/CrossAppAuthScreen-fjiTzpoh.js +0 -1
- package/dist/cjs/DelegatedActionsConsentScreen-C2DG4aoM.js +0 -1
- package/dist/cjs/DelegatedActionsRevokeScreen-CCr2Kw57.js +0 -1
- package/dist/cjs/EmbeddedWalletConnectingScreen-BW3TLACZ.js +0 -1
- package/dist/cjs/EmbeddedWalletCreatedScreen-yTh0CETA.js +0 -1
- package/dist/cjs/EmbeddedWalletOnAccountCreateScreen-BJ9tuKSI.js +0 -1
- package/dist/cjs/EmbeddedWalletPasswordUpdateScreen-C3Pu2FvV.js +0 -1
- package/dist/cjs/EmbeddedWalletPasswordUpdateSplashScreen-Dzvq3GAs.js +0 -1
- package/dist/cjs/ErrorScreen-Dbie0wkk.js +0 -4
- package/dist/cjs/FarcasterSignerStatusScreen-CTZRoFL3.js +0 -29
- package/dist/cjs/FundSolWalletWithExternalSolanaWallet-Czi1l_qS.js +0 -2
- package/dist/cjs/FundingEditAmountScreen-xtC8kXZ9.js +0 -1
- package/dist/cjs/FundingMethodSelectionScreen-CwORHNKY.js +0 -1
- package/dist/cjs/InAppBrowserLoginNotPossible-D9m4nJvR.js +0 -1
- package/dist/cjs/InstallWalletScreen-D2iE62NY.js +0 -1
- package/dist/cjs/LandingScreen-Cclv1lfx.js +0 -1
- package/dist/cjs/LinkEmailScreen-DaTzx7Fk.js +0 -1
- package/dist/cjs/LinkPhoneScreen-Den2l7u5.js +0 -1
- package/dist/cjs/LoginFailedScreen-CG5VpqB1.js +0 -1
- package/dist/cjs/ManualTransferScreen-QVz0bbM4.js +0 -1
- package/dist/cjs/MfaAuthEnrollmentFlowScreen-CgEdqCAi.js +0 -1
- package/dist/cjs/MfaAuthVerifyFlowScreen-BmhIWVUg.js +0 -1
- package/dist/cjs/MfaEnrollmentFlowScreen-BSALpHSu.js +0 -1
- package/dist/cjs/MfaVerifyFlowScreen-NBi3M6EX.js +0 -1
- package/dist/cjs/MoonpayStatusScreen-DQCYOZ0M.js +0 -16
- package/dist/cjs/OAuthStatusScreen-Dzo0z0tK.js +0 -1
- package/dist/cjs/PasskeySelectSignupOrLogin-D6KxIann.js +0 -1
- package/dist/cjs/PasskeyStatusScreen-DfcsZHZm.js +0 -3
- package/dist/cjs/PasswordRecoveryScreen-DfpNr526.js +0 -20
- package/dist/cjs/RecoveryOAuthStatusScreen-CaoYW19J.js +0 -1
- package/dist/cjs/RecoveryPasswordCreateScreen-BEEpGGv7.js +0 -1
- package/dist/cjs/ScreenLayout-SSjax2iq.js +0 -1
- package/dist/cjs/TelegramAuthScreen-CrpOhr2m.js +0 -1
- package/dist/cjs/UpdateEmailScreen-GKUeQDLE.js +0 -1
- package/dist/cjs/UpdatePhoneScreen-BUA9FZ9k.js +0 -1
- package/dist/cjs/UserLimitReachedScreen-ByQxJS_K.js +0 -1
- package/dist/cjs/WalletInterstitialScreen-t0tp0uiQ.js +0 -1
- package/dist/cjs/copy-BiZ7dtqy.js +0 -1
- package/dist/cjs/index-DyCLWLpL.js +0 -174
- package/dist/cjs/use-export-wallet-COKs2yxH.js +0 -1
- package/dist/esm/AccountNotFoundScreen-Dty9AII6.mjs +0 -1
- package/dist/esm/AffirmativeConsentScreen-CZ3QtNmP.mjs +0 -6
- package/dist/esm/AllowlistRejectionScreen-DUd4GJIK.mjs +0 -1
- package/dist/esm/AuthenticateWithWalletScreen-Fa-n1Sey.mjs +0 -1
- package/dist/esm/AwaitingEvmToSolBridgingScreen-DCpcHpQX.mjs +0 -2
- package/dist/esm/AwaitingExternalEthereumTransferScreen-D1V2_vDk.mjs +0 -2
- package/dist/esm/AwaitingPasswordlessCodeScreen-DGAxwdL6.mjs +0 -103
- package/dist/esm/AwaitingSolToEvmBridgingScreen-B6Xv92AB.mjs +0 -2
- package/dist/esm/CaptchaScreen-BL1nWi7c.mjs +0 -1
- package/dist/esm/CoinbaseOnrampStatusScreen-DhIZ3gwP.mjs +0 -16
- package/dist/esm/ConnectEmailForm-DvQJmoTc.mjs +0 -3
- package/dist/esm/ConnectLedgerScreen-CURsQoYz.mjs +0 -9
- package/dist/esm/ConnectOnlyLandingScreen-CBjbbuDg.mjs +0 -1
- package/dist/esm/ConnectOnlyStatusScreen-VM7nNu6X.mjs +0 -1
- package/dist/esm/ConnectOrCreateScreen-8FxDiOyl.mjs +0 -1
- package/dist/esm/ConnectWalletView-BXqs6pWG.mjs +0 -171
- package/dist/esm/ConnectionStatusScreen-SAx7YO5y.mjs +0 -7
- package/dist/esm/CopyToClipboard-BGTSFnT3.mjs +0 -39
- package/dist/esm/CrossAppAuthScreen-V6LW9fie.mjs +0 -1
- package/dist/esm/DelegatedActionsConsentScreen-0_shAgnh.mjs +0 -1
- package/dist/esm/DelegatedActionsRevokeScreen-olNf5JQw.mjs +0 -1
- package/dist/esm/EmbeddedWalletConnectingScreen-Dleo6nTw.mjs +0 -1
- package/dist/esm/EmbeddedWalletCreatedScreen-Dx0eaEaV.mjs +0 -1
- package/dist/esm/EmbeddedWalletOnAccountCreateScreen-DbiGNXpt.mjs +0 -1
- package/dist/esm/EmbeddedWalletPasswordUpdateScreen-fA9JGXuz.mjs +0 -1
- package/dist/esm/EmbeddedWalletPasswordUpdateSplashScreen-CTPO_C5V.mjs +0 -1
- package/dist/esm/ErrorScreen-Ba4Ml9CI.mjs +0 -4
- package/dist/esm/FarcasterSignerStatusScreen-B8IyPJhe.mjs +0 -28
- package/dist/esm/FundSolWalletWithExternalSolanaWallet-B3Y84dbg.mjs +0 -1
- package/dist/esm/FundingEditAmountScreen-DeM_ClwN.mjs +0 -1
- package/dist/esm/FundingMethodSelectionScreen-Be8LIw6i.mjs +0 -1
- package/dist/esm/InAppBrowserLoginNotPossible-7kqa69SP.mjs +0 -1
- package/dist/esm/InstallWalletScreen-EfqvUoSZ.mjs +0 -1
- package/dist/esm/LandingScreen-DPaqiLpx.mjs +0 -1
- package/dist/esm/LinkEmailScreen-CQ5mnYS9.mjs +0 -1
- package/dist/esm/LinkPhoneScreen-CVNSbTfD.mjs +0 -1
- package/dist/esm/LoginFailedScreen-B2KtCyAw.mjs +0 -1
- package/dist/esm/ManualTransferScreen-C2Rl54K3.mjs +0 -1
- package/dist/esm/MfaAuthEnrollmentFlowScreen-D6ujM0kh.mjs +0 -1
- package/dist/esm/MfaAuthVerifyFlowScreen-zG9ps8-7.mjs +0 -1
- package/dist/esm/MfaEnrollmentFlowScreen-gELi8Ppl.mjs +0 -1
- package/dist/esm/MfaVerifyFlowScreen-6eccLZxg.mjs +0 -1
- package/dist/esm/MoonpayStatusScreen-u9OjnVb2.mjs +0 -16
- package/dist/esm/OAuthStatusScreen-C4KNGm-v.mjs +0 -1
- package/dist/esm/PasskeySelectSignupOrLogin-DM959Ikc.mjs +0 -1
- package/dist/esm/PasskeyStatusScreen-BfUHTu2T.mjs +0 -3
- package/dist/esm/PasswordRecoveryScreen-BnkB7Xwe.mjs +0 -20
- package/dist/esm/RecoveryOAuthStatusScreen-DaP1Oh1u.mjs +0 -1
- package/dist/esm/RecoveryPasswordCreateScreen-B-dLBQVH.mjs +0 -1
- package/dist/esm/ScreenLayout-kyRBwF5n.mjs +0 -1
- package/dist/esm/TelegramAuthScreen-D-cJY_dj.mjs +0 -1
- package/dist/esm/UpdateEmailScreen-0TGU13Qv.mjs +0 -1
- package/dist/esm/UpdatePhoneScreen-C7fQ2ohl.mjs +0 -1
- package/dist/esm/UserLimitReachedScreen-dLjGUBN-.mjs +0 -1
- package/dist/esm/WalletInterstitialScreen-C8UPLmif.mjs +0 -1
- package/dist/esm/context-CwMpvKNV.mjs +0 -1
- package/dist/esm/copy-Bx2Jwc5_.mjs +0 -1
- package/dist/esm/get-is-unified-wallet-C6sEzDpG.mjs +0 -1
- package/dist/esm/index-C47JxA4c.mjs +0 -174
- package/dist/esm/use-export-wallet-CwQ5-CS4.mjs +0 -1
- package/dist/esm/useGetTokenPrice-CgGm0Ecu.mjs +0 -1
- package/dist/esm/usePrivy-D_kd_mMH.mjs +0 -1
package/dist/dts/solana.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { g as SessionSignerInput, W as Wallet, f as SignMessageModalUIOptions, S as SolanaChain, h as SolanaStandardWallet, C as CreateWalletOptions, e as SendTransactionModalUIOptions, i as SolanaFundingConfig } from './types-
|
|
2
|
-
export { j as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-
|
|
1
|
+
import { g as SessionSignerInput, W as Wallet, f as SignMessageModalUIOptions, S as SolanaChain, h as SolanaStandardWallet, C as CreateWalletOptions, e as SendTransactionModalUIOptions, i as SolanaFundingConfig } from './types-BVn8nTiQ.js';
|
|
2
|
+
export { j as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-BVn8nTiQ.js';
|
|
3
3
|
import { SolanaSignAndSendTransactionFeature, SolanaSignTransactionFeature, SolanaSignMessageFeature } from '@solana/wallet-standard-features';
|
|
4
4
|
import { WalletAccount, WalletIcon, WalletVersion } from '@wallet-standard/base';
|
|
5
5
|
import { StandardConnectFeature, StandardDisconnectFeature, StandardEventsFeature } from '@wallet-standard/features';
|
|
6
6
|
import EventEmitter from 'eventemitter3';
|
|
7
7
|
import { SolanaSignAndSendTransactionOptions, SolanaSignTransactionOptions, ConnectedStandardSolanaWallet } from '@privy-io/js-sdk-core';
|
|
8
8
|
export { ConnectedStandardSolanaWallet } from '@privy-io/js-sdk-core';
|
|
9
|
-
import { P as PrivyEvents } from './events-context-
|
|
9
|
+
import { P as PrivyEvents } from './events-context-JU6EgMXK.js';
|
|
10
10
|
import '@coinbase/wallet-sdk';
|
|
11
11
|
import '@simplewebauthn/browser';
|
|
12
12
|
import '@solana/kit';
|
|
@@ -553,6 +553,32 @@ type AlchemyPaymasterContextClient = {
|
|
|
553
553
|
policyId: string;
|
|
554
554
|
};
|
|
555
555
|
|
|
556
|
+
/**
|
|
557
|
+
* Plugin that keeps user state in sync across browser tabs using BroadcastChannel.
|
|
558
|
+
*
|
|
559
|
+
* @experimental This plugin is experimental and may change or be removed in future versions.
|
|
560
|
+
*/
|
|
561
|
+
type CrossTabUserSyncPlugin = {
|
|
562
|
+
readonly id: typeof CROSS_TAB_USER_SYNC_PLUGIN_ID;
|
|
563
|
+
};
|
|
564
|
+
/**
|
|
565
|
+
* Creates a cross-tab user sync plugin.
|
|
566
|
+
*
|
|
567
|
+
* @experimental This plugin is experimental and may change or be removed in future versions.
|
|
568
|
+
*
|
|
569
|
+
* @param options.channelId - A unique channel ID for your app.
|
|
570
|
+
*
|
|
571
|
+
* @example
|
|
572
|
+
* ```tsx
|
|
573
|
+
* createCrossTabUserSyncPlugin({
|
|
574
|
+
* channelId: process.env.NEXT_PUBLIC_PRIVY_SYNC_CHANNEL_ID
|
|
575
|
+
* })
|
|
576
|
+
* ```
|
|
577
|
+
*/
|
|
578
|
+
declare function createCrossTabUserSyncPlugin(options: {
|
|
579
|
+
channelId: string;
|
|
580
|
+
}): CrossTabUserSyncPlugin;
|
|
581
|
+
|
|
556
582
|
/**
|
|
557
583
|
* Plugin that adds data suffix support to the SDK.
|
|
558
584
|
*/
|
|
@@ -1600,7 +1626,7 @@ interface PrivyClientConfig {
|
|
|
1600
1626
|
* >
|
|
1601
1627
|
* ```
|
|
1602
1628
|
*/
|
|
1603
|
-
plugins?: Array<DataSuffixPlugin>;
|
|
1629
|
+
plugins?: Array<DataSuffixPlugin | CrossTabUserSyncPlugin>;
|
|
1604
1630
|
/**
|
|
1605
1631
|
* Custom redirect URL for OAuth flows, useful for mobile applications.
|
|
1606
1632
|
* If not provided, defaults to window.location.href.
|
|
@@ -2383,6 +2409,26 @@ type LoginModalOptions = RuntimeLoginOverridableOptions & {
|
|
|
2383
2409
|
isSigningInWithLedgerSolana?: boolean;
|
|
2384
2410
|
};
|
|
2385
2411
|
type ConnectWalletModalOptions = ExternalConnectWalletModalOptions;
|
|
2412
|
+
type FundWithBankDepositScreenOpts = {
|
|
2413
|
+
source?: {
|
|
2414
|
+
/**
|
|
2415
|
+
* FIAT lowercase (e.g. usd or eur)
|
|
2416
|
+
*/
|
|
2417
|
+
asset: 'usd' | 'eur' | 'mxn' | 'brl' | 'gbp';
|
|
2418
|
+
};
|
|
2419
|
+
destination: {
|
|
2420
|
+
/**
|
|
2421
|
+
* Token symbol (e.g. usdc or usdh)
|
|
2422
|
+
*/
|
|
2423
|
+
asset: 'usdc';
|
|
2424
|
+
/**
|
|
2425
|
+
* CAIP2 (e.g. eip155:1 or solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1)
|
|
2426
|
+
*/
|
|
2427
|
+
chain: `${string}:${string}`;
|
|
2428
|
+
address: string;
|
|
2429
|
+
};
|
|
2430
|
+
provider: 'bridge' | 'bridge-sandbox';
|
|
2431
|
+
};
|
|
2386
2432
|
type PrivyFarcasterSignerInitResponse = {
|
|
2387
2433
|
public_key: string;
|
|
2388
2434
|
status: 'pending_approval';
|
|
@@ -2492,4 +2538,4 @@ type SessionSignerInput = {
|
|
|
2492
2538
|
}[];
|
|
2493
2539
|
type SignerInput = SessionSignerInput;
|
|
2494
2540
|
|
|
2495
|
-
export { type ExternalWalletMetadata as $, type WalletListEntry as A, type BaseConnectedEthereumWallet as B, type CreateWalletOptions as C, type AppConfig as D, type EthereumRpcRequestType as E, type FundingMethod as F, type BaseConnectedWallet as G, type HDWalletWithMetadata as H, type ConnectWalletModalOptions as I, type LoginModalOptions as J, type SetWalletRecoveryOptions as K, type LoginMethod as L, type MfaMethod as M, type SignTypedDataParams as N, type OAuthTokens as O, PrivyErrorCode as P, type UnsignedTransactionRequest as Q, type RuntimeLoginOverridableOptions as R, type SolanaChain as S, type FundWalletConfig as T, type User as U, type ConnectedWallet as V, type Wallet as W, type CrossAppProviderDetails as X, type MoonpaySignRequest as Y, type MoonpaySignResponse as Z, type SiwsMessageType as _, type LinkedAccountWithMetadata as a, type TelegramAuthResult as a0, type TelegramWebAppData as a1, type OAuthUserInfo as a2, type OAuthFlowState as a3, type LoginWithCode as a4, type OtpFlowState as a5, type PasskeyFlowState as a6, type SiweFlowState as a7, type
|
|
2541
|
+
export { type ExternalWalletMetadata as $, type WalletListEntry as A, type BaseConnectedEthereumWallet as B, type CreateWalletOptions as C, type AppConfig as D, type EthereumRpcRequestType as E, type FundingMethod as F, type BaseConnectedWallet as G, type HDWalletWithMetadata as H, type ConnectWalletModalOptions as I, type LoginModalOptions as J, type SetWalletRecoveryOptions as K, type LoginMethod as L, type MfaMethod as M, type SignTypedDataParams as N, type OAuthTokens as O, PrivyErrorCode as P, type UnsignedTransactionRequest as Q, type RuntimeLoginOverridableOptions as R, type SolanaChain as S, type FundWalletConfig as T, type User as U, type ConnectedWallet as V, type Wallet as W, type CrossAppProviderDetails as X, type MoonpaySignRequest as Y, type MoonpaySignResponse as Z, type SiwsMessageType as _, type LinkedAccountWithMetadata as a, createDataSuffixPlugin as a$, type TelegramAuthResult as a0, type TelegramWebAppData as a1, type OAuthUserInfo as a2, type OAuthFlowState as a3, type LoginWithCode as a4, type OtpFlowState as a5, type PasskeyFlowState as a6, type SiweFlowState as a7, type FundWithBankDepositScreenOpts as a8, type FundingResult as a9, type Telegram as aA, type CrossAppAccount as aB, type LinkedAccountType as aC, type GoogleOAuthWithMetadata as aD, type TwitterOAuthWithMetadata as aE, type DiscordOAuthWithMetadata as aF, type GithubOAuthWithMetadata as aG, type TiktokOAuthWithMetadata as aH, type LineOAuthWithMetadata as aI, type LinkedInOAuthWithMetadata as aJ, type AppleOAuthWithMetadata as aK, type FarcasterWithMetadata as aL, type TelegramWithMetadata as aM, type CrossAppAccountWithMetadata as aN, type PasskeyWithMetadata as aO, type Email as aP, type Phone as aQ, type TransactionUIOptions as aR, type ContractUIOptions as aS, type FundingStatus as aT, type NativeFundingConfig as aU, type PriceDisplayOptions as aV, type Farcaster as aW, type Passkey as aX, type LoginMethodOrderOption as aY, type SiwsFlowState as aZ, type PrivyI18nStrings as a_, type BaseAccountSdkType as aa, type UnsignedTransactionRequestWithChainId as ab, type BaseConnectedWalletType as ac, type SignerInput as ad, type TelegramAuthFlowState as ae, createCrossTabUserSyncPlugin as af, type TypedMessage as ag, type MessageTypes as ah, type SmartWallet as ai, type MoonpayCurrencyCode as aj, type MoonpayPaymentMethod as ak, type Quantity as al, type TransactionLog as am, type TransactionReceipt as an, type NonEmptyArray as ao, type EmailWithMetadata as ap, type PhoneWithMetadata as aq, type WalletWithMetadata as ar, type Google as as, type Twitter as at, type Discord as au, type Github as av, type LinkedIn as aw, type Apple as ax, type Tiktok as ay, type Line as az, type BaseConnectedSolanaWallet as b, type UserRecoveryMethod as c, type LoginToMiniApp as d, type SendTransactionModalUIOptions as e, type SignMessageModalUIOptions as f, type SessionSignerInput as g, type SolanaStandardWallet as h, type SolanaFundingConfig as i, SolanaWalletConnector as j, type MfaSubmitArgs as k, type SolanaRpcRequestType as l, type EthereumRpcResponseType as m, type SolanaRpcResponseType as n, type PrivyFarcasterSignerInitResponse as o, type EIP1193Provider as p, type EntropyIdVerifier as q, type RequestArguments as r, WalletConnector as s, toSolanaWalletConnectors as t, PrivyProxyProvider as u, type WalletClientType as v, type ConnectedWalletMetadata as w, type PrivyClientConfig as x, type ConnectorType as y, type SetBaseAccountSdkType as z };
|
|
@@ -553,6 +553,32 @@ type AlchemyPaymasterContextClient = {
|
|
|
553
553
|
policyId: string;
|
|
554
554
|
};
|
|
555
555
|
|
|
556
|
+
/**
|
|
557
|
+
* Plugin that keeps user state in sync across browser tabs using BroadcastChannel.
|
|
558
|
+
*
|
|
559
|
+
* @experimental This plugin is experimental and may change or be removed in future versions.
|
|
560
|
+
*/
|
|
561
|
+
type CrossTabUserSyncPlugin = {
|
|
562
|
+
readonly id: typeof CROSS_TAB_USER_SYNC_PLUGIN_ID;
|
|
563
|
+
};
|
|
564
|
+
/**
|
|
565
|
+
* Creates a cross-tab user sync plugin.
|
|
566
|
+
*
|
|
567
|
+
* @experimental This plugin is experimental and may change or be removed in future versions.
|
|
568
|
+
*
|
|
569
|
+
* @param options.channelId - A unique channel ID for your app.
|
|
570
|
+
*
|
|
571
|
+
* @example
|
|
572
|
+
* ```tsx
|
|
573
|
+
* createCrossTabUserSyncPlugin({
|
|
574
|
+
* channelId: process.env.NEXT_PUBLIC_PRIVY_SYNC_CHANNEL_ID
|
|
575
|
+
* })
|
|
576
|
+
* ```
|
|
577
|
+
*/
|
|
578
|
+
declare function createCrossTabUserSyncPlugin(options: {
|
|
579
|
+
channelId: string;
|
|
580
|
+
}): CrossTabUserSyncPlugin;
|
|
581
|
+
|
|
556
582
|
/**
|
|
557
583
|
* Plugin that adds data suffix support to the SDK.
|
|
558
584
|
*/
|
|
@@ -1600,7 +1626,7 @@ interface PrivyClientConfig {
|
|
|
1600
1626
|
* >
|
|
1601
1627
|
* ```
|
|
1602
1628
|
*/
|
|
1603
|
-
plugins?: Array<DataSuffixPlugin>;
|
|
1629
|
+
plugins?: Array<DataSuffixPlugin | CrossTabUserSyncPlugin>;
|
|
1604
1630
|
/**
|
|
1605
1631
|
* Custom redirect URL for OAuth flows, useful for mobile applications.
|
|
1606
1632
|
* If not provided, defaults to window.location.href.
|
|
@@ -2383,6 +2409,26 @@ type LoginModalOptions = RuntimeLoginOverridableOptions & {
|
|
|
2383
2409
|
isSigningInWithLedgerSolana?: boolean;
|
|
2384
2410
|
};
|
|
2385
2411
|
type ConnectWalletModalOptions = ExternalConnectWalletModalOptions;
|
|
2412
|
+
type FundWithBankDepositScreenOpts = {
|
|
2413
|
+
source?: {
|
|
2414
|
+
/**
|
|
2415
|
+
* FIAT lowercase (e.g. usd or eur)
|
|
2416
|
+
*/
|
|
2417
|
+
asset: 'usd' | 'eur' | 'mxn' | 'brl' | 'gbp';
|
|
2418
|
+
};
|
|
2419
|
+
destination: {
|
|
2420
|
+
/**
|
|
2421
|
+
* Token symbol (e.g. usdc or usdh)
|
|
2422
|
+
*/
|
|
2423
|
+
asset: 'usdc';
|
|
2424
|
+
/**
|
|
2425
|
+
* CAIP2 (e.g. eip155:1 or solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1)
|
|
2426
|
+
*/
|
|
2427
|
+
chain: `${string}:${string}`;
|
|
2428
|
+
address: string;
|
|
2429
|
+
};
|
|
2430
|
+
provider: 'bridge' | 'bridge-sandbox';
|
|
2431
|
+
};
|
|
2386
2432
|
type PrivyFarcasterSignerInitResponse = {
|
|
2387
2433
|
public_key: string;
|
|
2388
2434
|
status: 'pending_approval';
|
|
@@ -2492,4 +2538,4 @@ type SessionSignerInput = {
|
|
|
2492
2538
|
}[];
|
|
2493
2539
|
type SignerInput = SessionSignerInput;
|
|
2494
2540
|
|
|
2495
|
-
export { type ExternalWalletMetadata as $, type WalletListEntry as A, type BaseConnectedEthereumWallet as B, type CreateWalletOptions as C, type AppConfig as D, type EthereumRpcRequestType as E, type FundingMethod as F, type BaseConnectedWallet as G, type HDWalletWithMetadata as H, type ConnectWalletModalOptions as I, type LoginModalOptions as J, type SetWalletRecoveryOptions as K, type LoginMethod as L, type MfaMethod as M, type SignTypedDataParams as N, type OAuthTokens as O, PrivyErrorCode as P, type UnsignedTransactionRequest as Q, type RuntimeLoginOverridableOptions as R, type SolanaChain as S, type FundWalletConfig as T, type User as U, type ConnectedWallet as V, type Wallet as W, type CrossAppProviderDetails as X, type MoonpaySignRequest as Y, type MoonpaySignResponse as Z, type SiwsMessageType as _, type LinkedAccountWithMetadata as a, type TelegramAuthResult as a0, type TelegramWebAppData as a1, type OAuthUserInfo as a2, type OAuthFlowState as a3, type LoginWithCode as a4, type OtpFlowState as a5, type PasskeyFlowState as a6, type SiweFlowState as a7, type
|
|
2541
|
+
export { type ExternalWalletMetadata as $, type WalletListEntry as A, type BaseConnectedEthereumWallet as B, type CreateWalletOptions as C, type AppConfig as D, type EthereumRpcRequestType as E, type FundingMethod as F, type BaseConnectedWallet as G, type HDWalletWithMetadata as H, type ConnectWalletModalOptions as I, type LoginModalOptions as J, type SetWalletRecoveryOptions as K, type LoginMethod as L, type MfaMethod as M, type SignTypedDataParams as N, type OAuthTokens as O, PrivyErrorCode as P, type UnsignedTransactionRequest as Q, type RuntimeLoginOverridableOptions as R, type SolanaChain as S, type FundWalletConfig as T, type User as U, type ConnectedWallet as V, type Wallet as W, type CrossAppProviderDetails as X, type MoonpaySignRequest as Y, type MoonpaySignResponse as Z, type SiwsMessageType as _, type LinkedAccountWithMetadata as a, createDataSuffixPlugin as a$, type TelegramAuthResult as a0, type TelegramWebAppData as a1, type OAuthUserInfo as a2, type OAuthFlowState as a3, type LoginWithCode as a4, type OtpFlowState as a5, type PasskeyFlowState as a6, type SiweFlowState as a7, type FundWithBankDepositScreenOpts as a8, type FundingResult as a9, type Telegram as aA, type CrossAppAccount as aB, type LinkedAccountType as aC, type GoogleOAuthWithMetadata as aD, type TwitterOAuthWithMetadata as aE, type DiscordOAuthWithMetadata as aF, type GithubOAuthWithMetadata as aG, type TiktokOAuthWithMetadata as aH, type LineOAuthWithMetadata as aI, type LinkedInOAuthWithMetadata as aJ, type AppleOAuthWithMetadata as aK, type FarcasterWithMetadata as aL, type TelegramWithMetadata as aM, type CrossAppAccountWithMetadata as aN, type PasskeyWithMetadata as aO, type Email as aP, type Phone as aQ, type TransactionUIOptions as aR, type ContractUIOptions as aS, type FundingStatus as aT, type NativeFundingConfig as aU, type PriceDisplayOptions as aV, type Farcaster as aW, type Passkey as aX, type LoginMethodOrderOption as aY, type SiwsFlowState as aZ, type PrivyI18nStrings as a_, type BaseAccountSdkType as aa, type UnsignedTransactionRequestWithChainId as ab, type BaseConnectedWalletType as ac, type SignerInput as ad, type TelegramAuthFlowState as ae, createCrossTabUserSyncPlugin as af, type TypedMessage as ag, type MessageTypes as ah, type SmartWallet as ai, type MoonpayCurrencyCode as aj, type MoonpayPaymentMethod as ak, type Quantity as al, type TransactionLog as am, type TransactionReceipt as an, type NonEmptyArray as ao, type EmailWithMetadata as ap, type PhoneWithMetadata as aq, type WalletWithMetadata as ar, type Google as as, type Twitter as at, type Discord as au, type Github as av, type LinkedIn as aw, type Apple as ax, type Tiktok as ay, type Line as az, type BaseConnectedSolanaWallet as b, type UserRecoveryMethod as c, type LoginToMiniApp as d, type SendTransactionModalUIOptions as e, type SignMessageModalUIOptions as f, type SessionSignerInput as g, type SolanaStandardWallet as h, type SolanaFundingConfig as i, SolanaWalletConnector as j, type MfaSubmitArgs as k, type SolanaRpcRequestType as l, type EthereumRpcResponseType as m, type SolanaRpcResponseType as n, type PrivyFarcasterSignerInitResponse as o, type EIP1193Provider as p, type EntropyIdVerifier as q, type RequestArguments as r, WalletConnector as s, toSolanaWalletConnectors as t, PrivyProxyProvider as u, type WalletClientType as v, type ConnectedWalletMetadata as w, type PrivyClientConfig as x, type ConnectorType as y, type SetBaseAccountSdkType as z };
|
package/dist/dts/ui.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { R as RuntimeLoginOverridableOptions, S as SolanaChain } from './types-
|
|
2
|
+
import { R as RuntimeLoginOverridableOptions, S as SolanaChain } from './types-BVn8nTiQ.js';
|
|
3
3
|
import { Hex } from 'viem';
|
|
4
4
|
import { Chain } from '@privy-io/js-sdk-core';
|
|
5
5
|
import '@coinbase/wallet-sdk';
|
package/dist/dts/ui.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { R as RuntimeLoginOverridableOptions, S as SolanaChain } from './types-
|
|
2
|
+
import { R as RuntimeLoginOverridableOptions, S as SolanaChain } from './types-BVn8nTiQ.js';
|
|
3
3
|
import { Hex } from 'viem';
|
|
4
4
|
import { Chain } from '@privy-io/js-sdk-core';
|
|
5
5
|
import '@coinbase/wallet-sdk';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{HelpCircle as e}from"lucide-react";import{u as o}from"./context-Drt9FC1y.mjs";import{u as i}from"./internal-context-Z-fyxadS.mjs";import{a as r}from"./get-is-unified-wallet-BC-7_b8O.mjs";import{S as a}from"./ScreenLayout-jvcCZKF1.mjs";import"react";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"@privy-io/are-addresses-equal";import"./ModalHeader-D0p4fONI.mjs";import"styled-components";import"./useActiveWallet-DGV02YBT.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-BlKa-i97.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-CV3WTwML.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-BVipC9vr.mjs";import"./index-Dq_xe9dz.mjs";const n=({title:o="Account not found",subtitle:i,appName:r="this app",ctaText:n="Try logging in again",onRetry:m})=>/*#__PURE__*/t(a,{title:o,subtitle:i||`Please try logging in again or go to ${r} to create an account.`,icon:e,iconVariant:"warning",primaryCta:{label:n,onClick:m},watermark:!0}),m={component:()=>{let{navigate:e,setModalData:a,data:m}=r(),s=o(),{getAuthMeta:c,client:p}=i();/*#__PURE__*/return t(n,{appName:s?.name,onRetry:()=>{let t=c();a({...m,login:{...m?.login,...t?.disableSignup?{disableSignup:!0}:{}}}),p?.authFlow&&(p.authFlow=void 0),e("LandingScreen")}})}};export{m as AccountNotFoundScreen,n as AccountNotFoundScreenView,m as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as e,jsx as r,Fragment as o}from"react/jsx-runtime";import{Check as i,Copy as t}from"lucide-react";import{useState as n,useEffect as l}from"react";import{styled as s}from"styled-components";import{D as a}from"./useActiveWallet-
|
|
1
|
+
import{jsxs as e,jsx as r,Fragment as o}from"react/jsx-runtime";import{Check as i,Copy as t}from"lucide-react";import{useState as n,useEffect as l}from"react";import{styled as s}from"styled-components";import{D as a}from"./useActiveWallet-DGV02YBT.mjs";import{S as c}from"./ModalHeader-D0p4fONI.mjs";const d=({address:s,showCopyIcon:d,url:h,className:u})=>{let[g,x]=n(!1);function y(e){e.stopPropagation(),navigator.clipboard.writeText(s).then((()=>x(!0))).catch(console.error)}return l((()=>{if(g){let e=setTimeout((()=>x(!1)),3e3);return()=>clearTimeout(e)}}),[g]),/*#__PURE__*/e(m,h?{children:[/*#__PURE__*/r(f,{title:s,className:u,href:`${h}/address/${s}`,target:"_blank",children:a(s)}),d&&/*#__PURE__*/r(c,{onClick:y,size:"sm",style:{gap:"0.375rem"},children:/*#__PURE__*/e(o,g?{children:["Copied",/*#__PURE__*/r(i,{size:16})]}:{children:["Copy",/*#__PURE__*/r(t,{size:16})]})})]}:{children:[/*#__PURE__*/r(p,{title:s,className:u,children:a(s)}),d&&/*#__PURE__*/r(c,{onClick:y,size:"sm",style:{gap:"0.375rem",fontSize:"14px"},children:/*#__PURE__*/e(o,g?{children:["Copied",/*#__PURE__*/r(i,{size:14})]}:{children:["Copy",/*#__PURE__*/r(t,{size:14})]})})]})};let m=s.span`
|
|
2
2
|
display: inline-flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
gap: 0.5rem;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{FileCheck as r,ExternalLink as i}from"lucide-react";import"react";import{styled as o}from"styled-components";import{a as s}from"./ModalHeader-D0p4fONI.mjs";import{u as a}from"./context-Drt9FC1y.mjs";import{u as n}from"./internal-context-Z-fyxadS.mjs";import{u as m,a as l}from"./get-is-unified-wallet-BC-7_b8O.mjs";import{s as c}from"./shouldProceedtoEmbeddedWalletCreationFlow-COZ-_baJ.mjs";import{S as p}from"./ScreenLayout-jvcCZKF1.mjs";import"./useActiveWallet-DGV02YBT.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-BlKa-i97.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"viem/utils";import"./useWallets-CV3WTwML.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"tinycolor2";import"ofetch";import"@privy-io/are-addresses-equal";import"./index-BZ6FAPh7.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-pdKy_IjS.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-BVipC9vr.mjs";import"./index-Dq_xe9dz.mjs";const d={component:()=>{let{user:t,logout:r}=m(),{onUserCloseViaDialogOrKeybindRef:i,setModalData:o,navigate:s}=l(),p=a(),{acceptTerms:d,closePrivyModal:y,createAnalyticsEvent:v}=n(),h=e=>{e?.preventDefault(),y({shouldCallAuthOnSuccess:!1}),r()};i.current=h;/*#__PURE__*/return e(u,{termsAndConditionsUrl:p?.legal.termsAndConditionsUrl,privacyPolicyUrl:p?.legal.privacyPolicyUrl,onAccept:async e=>{e?.preventDefault(),await d(),t&&c(t,p.embeddedWallets)?(o({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),v({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"AffirmativeConsentScreen"}}),r()},callAuthOnSuccessOnClose:!0}}),s("EmbeddedWalletOnAccountCreateScreen")):y()},onDecline:h})}},u=({termsAndConditionsUrl:o,privacyPolicyUrl:a,onAccept:n,onDecline:m,title:l="One last step",subtitle:c="By signing up, you agree to our terms and privacy policy."})=>/*#__PURE__*/e(p,{title:l,subtitle:c,icon:r,primaryCta:{label:"Accept",onClick:n},secondaryCta:{label:"No thanks",onClick:m},watermark:!0,children:(o||a)&&/*#__PURE__*/t(y,{children:[o&&/*#__PURE__*/t(s,{variant:"muted",href:o,target:"_blank",size:"lg",style:{justifyContent:"space-between"},as:"a",children:["View Terms",/*#__PURE__*/e(i,{width:16,height:16,strokeWidth:2.25})]}),a&&/*#__PURE__*/t(s,{variant:"muted",href:a,target:"_blank",size:"lg",style:{justifyContent:"space-between"},as:"a",children:["View Privacy Policy",/*#__PURE__*/e(i,{width:16,height:16,strokeWidth:2.25})]})]})});let y=o.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: 12px;
|
|
5
|
+
margin-top: var(--screen-space);
|
|
6
|
+
`;export{d as AffirmativeConsentScreen,u as AffirmativeConsentScreenView,d as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{Lock as e}from"lucide-react";import"react";import{u as o}from"./context-Drt9FC1y.mjs";import{a as i}from"./get-is-unified-wallet-BC-7_b8O.mjs";import{S as r}from"./ScreenLayout-jvcCZKF1.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"@privy-io/are-addresses-equal";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"./ModalHeader-D0p4fONI.mjs";import"styled-components";import"./useActiveWallet-DGV02YBT.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-BlKa-i97.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-CV3WTwML.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-BVipC9vr.mjs";import"./index-Dq_xe9dz.mjs";const a=({title:o="You don't have access to this app",subtitle:i="Have you been invited?",ctaText:a="Try another account",ctaLink:n,onCtaClick:m})=>/*#__PURE__*/t(r,{title:o,subtitle:i,icon:e,iconVariant:"warning",primaryCta:{label:a,onClick:()=>{n?window.open(n,"_blank"):m?.()}},watermark:!0}),n={component:()=>{let{navigate:e}=i(),r=o(),n=r?.allowlistConfig.errorTitle||"You don't have access to this app",m=r?.allowlistConfig.errorDetail||"Have you been invited?",c=r?.allowlistConfig.errorCtaText||"Try another account",s=r?.allowlistConfig.errorCtaLink;/*#__PURE__*/return t(a,{title:n,subtitle:m,ctaText:c,ctaLink:s??void 0,onCtaClick:()=>{e("LandingScreen")}})}};export{n as AllowlistRejectionScreen,a as AllowlistRejectionScreenView,n as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useRef as t,useCallback as o}from"react";import{u as r}from"./context-Drt9FC1y.mjs";import{u as n,c as a,b as i}from"./internal-context-Z-fyxadS.mjs";import{a as l}from"./events-context-CI0iqAXA.mjs";import{a as c}from"./get-is-unified-wallet-BC-7_b8O.mjs";import{i as s}from"./ConnectWalletView-DQNMKorC.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"@privy-io/are-addresses-equal";import"@heroicons/react/24/outline";import"@tanstack/react-virtual";import"react-device-detect";import"styled-components";import"./ModalHeader-D0p4fONI.mjs";import"./useActiveWallet-DGV02YBT.mjs";import"zustand";import"./use-export-wallet-BlKa-i97.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-CV3WTwML.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"./CopyableText-BCytXyJL.mjs";import"lucide-react";import"./Link-DJ5gq9Di.mjs";import"./QrCode-DZulv1E7.mjs";import"qrcode";import"./EmailInputForm-Dgoii4vf.mjs";import"./ErrorMessage-D8VaAP5m.mjs";import"./useI18n-De-HiNn7.mjs";import"./WalletCards-DH1rqayz.mjs";import"./Screen-BVipC9vr.mjs";import"./index-Dq_xe9dz.mjs";const m={component:()=>{let{setWalletConnectionStatus:m,closePrivyModal:p,inProgressAuthFlowRef:u}=n(),{data:d,navigate:C}=c(),j=r(),W=l(),w=d?.externalConnectWallet?.description,E=t(d?.externalConnectWallet?.walletList??j.appearance.walletList),x=t(d?.externalConnectWallet?.walletChainType??j.appearance.walletChainType),f=E.current,h=x.current,v="link"===u.current?void 0:()=>C("LandingScreen");/*#__PURE__*/return e(s,{walletList:f,walletChainType:h,onClose:p,onConnect:o((({connector:e,wallet:t})=>{W("connectWallet","onSuccess",{wallet:t}),m({status:"connected",connectedWallet:t,connector:e,connectError:null,connectRetry:()=>null}),C("ConnectionStatusScreen",!d?.externalConnectWallet?.preSelectedWalletId)}),[m,C,d?.login?.disableSignup,d?.externalConnectWallet?.preSelectedWalletId]),onConnectError:e=>{e instanceof a?(console.warn(e.cause?e.cause:e.message),W("connectWallet","onError",e.privyErrorCode||i.GENERIC_CONNECT_WALLET_ERROR)):(console.warn(e),W("connectWallet","onError",i.UNKNOWN_CONNECT_WALLET_ERROR))},onBack:v,customDescription:w||"",preSelectedWalletId:d?.externalConnectWallet?.preSelectedWalletId,app:j})},isUnauthenticatedScreem:!0};export{m as AuthenticateWithWalletScreen,m as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsxs as e,Fragment as t,jsx as i}from"react/jsx-runtime";import a from"@heroicons/react/24/outline/CheckCircleIcon";import{useState as r,useEffect as n}from"react";import{createWalletClient as o,custom as s,publicActions as d,createPublicClient as c,http as m,formatUnits as l}from"viem";import{addToDefaultChains as u}from"@privy-io/js-sdk-core";import{b as p,c as h,R as g}from"./Layouts-BlFm53ED.mjs";import{B as f}from"./ModalHeader-D0p4fONI.mjs";import{C as v}from"./ScreenHeader-CHmc4-Lu.mjs";import{t as j}from"./FundWalletMethodHeader-CIBx6zhp.mjs";import{N as y}from"./index-Dq_xe9dz.mjs";import{u as w,t as I}from"./context-Drt9FC1y.mjs";import{u as T,a as C,b}from"./internal-context-Z-fyxadS.mjs";import{Q as S,D as x}from"./useActiveWallet-DGV02YBT.mjs";import{a as N}from"./get-is-unified-wallet-BC-7_b8O.mjs";import{u as A}from"./useGetTokenPrice-CyEyHBvW.mjs";import{u as k}from"./useWallets-CV3WTwML.mjs";import{O as E}from"./analytics-mkkvFRju.mjs";import{g as F,t as L,a as P,b as U,c as B,u as M}from"./reservoir-0wfhnc0j.mjs";import{x as W}from"./index-BZ6FAPh7.mjs";import{g as q}from"./getChainName-DjpPdUSc.mjs";import{g as H,a as O}from"./transaction-CnfuREWo.mjs";import{g as R,B as D}from"./BridgeNetworkSelectionView-BxMqN8K9.mjs";import{a as $}from"./getPublicClient-B4uPLKn-.mjs";import{T as _}from"./TransferOrBridgeLoadingScreen-bbU-Tw1f.mjs";import"styled-components";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"tinycolor2";import"ofetch";import"zustand";import"react-device-detect";import"./use-export-wallet-BlKa-i97.mjs";import"eventemitter3";import"viem/utils";import"./events-context-CI0iqAXA.mjs";import"@privy-io/are-addresses-equal";import"./useGetSolPrice-DwwjjGbd.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-pdKy_IjS.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"./getFormattedUsdFromLamports-B6EqSEho.mjs";import"./getErc20Balance-DA4dGV9O.mjs";import"./Row-C9vrS4Zi.mjs";import"./ErrorMessage-D8VaAP5m.mjs";import"./Value-tcJV9e0L.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"./Subtitle-CV-2yKE4.mjs";import"./Title-BnzYV3Is.mjs";import"@heroicons/react/24/outline/WalletIcon";import"./Chip-D2-wZOHJ.mjs";import"./NetworkIcon-B48ilzF8.mjs";import"@heroicons/react/24/outline/GlobeAltIcon";import"./shared-FM0rljBt.mjs";import"@heroicons/react/24/outline/ChevronDownIcon";import"./formatErc20TokenAmount-BuPk9xcy.mjs";import"./ethers-UlIaNUWW.mjs";import"./styles-Dl341B8G.mjs";import"./LinkPasskeyScreen-bcve9Yp2.mjs";import"lucide-react";import"./TodoList-CgrU7uwu.mjs";import"./ScreenLayout-jvcCZKF1.mjs";import"./Screen-BVipC9vr.mjs";import"./InjectedWalletIcon-DLcYOGDj.mjs";import"./Address-BUuQgiKx.mjs";const G={component:()=>{let G=w(),{rpcConfig:V,appId:Q,closePrivyModal:z,createAnalyticsEvent:X}=T(),{navigate:Y,setModalData:J,data:K}=N(),Z=w(),{wallets:ee}=k(),[te,ie]=r(null),[ae,re]=r(null),[ne,oe]=r([]),[se,de]=r(0),[ce,me]=r(!1),[le,ue]=r(!1),[pe,he]=r(!1),[ge,fe]=r(!1),[ve,je]=r(),[ye,we]=r();if(!K?.funding||"solana"!==K.funding.chainType)throw Error("Invalid funding data");let{address:Ie,chain:Te,connectedWallet:Ce}=K.funding,[be,Se]=r(K.funding.amount),xe=("ethereum"===Ce?.type?Ce:void 0)??ee[0],Ne=S(xe?.walletClientType||"unknown"),Ae=Ne?.name||"wallet",[ke,Ee]=r(null);n((()=>{(async()=>{if(!xe)return;let e=await xe.getEthereumProvider();Ee(o({account:xe.address,transport:s(e)}).extend(d))})().catch(console.error)}),[xe]);let[Fe,Le]=r(0n),Pe=H(Fe);n((()=>{let e=G.solanaRpcs[Te];e?W({rpc:e.rpc,address:Ie}).then((e=>Le(BigInt(e)))).catch(console.error):console.warn("Unable to load solana rpc, skipping balance")}),[]);let[Ue,Be]=r(),{tokenPrice:Me}=A("solana"),{fundingAmountInBaseUnit:We,fundingAmountInUsd:qe}=O({amount:be,fee:0n,tokenPrice:Me,isUsdc:K.funding.isUSDC});if(n((()=>{(async()=>{if(!ke||!xe)return;let e=["solana:testnet","solana:devnet"].includes(Te);e&&console.warn("Solana testnets are not supported for bridging");let t=u(Z.chains).filter((({testnet:t})=>!!t===e)),i=(await R({chains:t,address:xe.address,appId:Q,rpcConfig:V})).filter((e=>e.balance>0n));if(i.length<1)return void ie(new C(`Wallet ${x(xe.address)} does not have enough funds.`,void 0,b.INSUFFICIENT_BALANCE));i.sort(((e,t)=>Number(t.balance-e.balance)));let a=(await Promise.allSettled(i.map((async e=>({...e,quote:await F({isTestnet:!1,input:L({appId:Q,amount:We.toString(),user:xe.address,recipient:Ie,destinationChainId:U,destinationCurrency:P,originChainId:e.chain.id})})}))))).filter((e=>"fulfilled"===e.status)).map((e=>e.value));if(a.length<1)return void ie(new C(`Unable to fetch quotes for bridging. Wallet ${x(xe.address)} does not have enough funds.`,void 0,b.INSUFFICIENT_BALANCE));let r=a.map((({quote:e,balance:t,chain:i})=>({bridgeTx:B(e),balance:t,chain:i,isErc20Quote:!1}))).filter((({bridgeTx:e})=>!!e));if(r.length>1)return void oe(r);let n=r.at(0);n?(ue(!0),Be({data:n.bridgeTx.data,to:n.bridgeTx.to,value:n.bridgeTx.value,chain:n.chain})):ie(new C(`Unable to select bridge option from quotes. Wallet ${x(xe.address)} does not have enough funds.`,void 0,b.INSUFFICIENT_BALANCE))})().catch(console.error)}),[ke]),n((()=>{(async()=>{let e,t;if(!ke||!xe||ce||pe||!Ue)return;me(!0);let i=c({chain:Ue.chain,transport:m($(Ue.chain,V,Q))});try{e=await i.prepareTransactionRequest({account:xe.address,to:Ue.to,chain:Ue.chain,data:Ue.data,value:BigInt(Ue.value??0)})}catch(e){console.error(e),ne.length>1&&re(e.shortMessage??"Something went wrong")}if(e){me(!1),he(!0);try{await ke.switchChain({id:Ue.chain.id})}catch(e){await ke.addChain({chain:Ue.chain}),await ke.switchChain({id:Ue.chain.id})}try{t=await ke.sendTransaction(e)}catch(e){console.error(e),"TransactionExecutionError"===e.name&&(ne.length<1?ie(new C(e.shortMessage,void 0,b.TRANSACTION_FAILURE)):re(e.shortMessage??"Something went wrong"))}if(t)return await ke.waitForTransactionReceipt({hash:t}),le?(we("pending"),void je(t)):(he(!1),fe(!0),void X({eventName:E,payload:{provider:"external",status:"success",txHash:t,address:xe.address,chainId:Ue.chain.id,chainType:"ethereum",value:Ue.value?l(BigInt(Ue.value),18):void 0,token:"ETH",destination:Ie,destinationClusterName:"mainnet-beta",destinationChainType:"solana",destinationValue:l(We,9),destinationToken:"SOL"}}));he(!1)}else me(!1)})().catch(console.error)}),[ke,Ue]),M({transactionHash:ve,isTestnet:!1,bridgingStatus:ye,setBridgingStatus:we,onSuccess({transactionHash:e}){ue(!1),fe(!0),X({eventName:E,payload:{provider:"external",status:"success",txHash:e,address:xe?.address,chainId:Ue?.chain.id,chainType:"ethereum",value:Ue?.value?l(BigInt(Ue.value),18):void 0,token:"ETH",destination:Ie,destinationClusterName:"mainnet-beta",destinationChainType:"solana",destinationValue:l(We,9),destinationToken:"SOL"}})},onFailure({error:e}){ue(!1),ie(e)}}),n((()=>{te&&(J({funding:K?.funding,solanaFundingData:K?.solanaFundingData,sendTransaction:K?.sendTransaction,errorModalData:{error:te,previousScreen:"TransferFromWalletScreen"}}),Y("ErrorScreen",!1))}),[te]),n((()=>{if(!ge)return;let e=setTimeout(z,I);return()=>clearTimeout(e)}),[ge]),ge/*#__PURE__*/)return e(t,{children:[/*#__PURE__*/i(j,{}),/*#__PURE__*/i(p,{}),/*#__PURE__*/e(h,{children:[/*#__PURE__*/i(a,{color:"var(--privy-color-success)",width:"64px",height:"64px"}),/*#__PURE__*/i(v,{title:"Success!",description:`You’ve successfully added ${be} SOL to your ${Z.name} wallet. It may take a minute before the funds are available to use.`})]}),/*#__PURE__*/i(g,{}),/*#__PURE__*/i(f,{})]});let He=ne[se];return ne.length>1&&He?/*#__PURE__*/i(D,{displayName:Ae,configuredFundingChain:Te,formattedBalance:Pe,fundingAmount:be,fundingCurrency:"SOL",fundingAmountInUsd:qe,options:ne,selectedOption:He,isPreparing:ce,isSubmitting:pe,addressToFund:Ie,fundingWalletAddress:xe?.address||"",errorMessage:ae,onSubmit:()=>{K.funding?.amount!==be?async function(){if(xe&&He)try{let e=await F({isTestnet:!1,input:L({appId:Q,amount:We.toString(),user:xe.address,recipient:Ie,destinationChainId:U,destinationCurrency:P,originChainId:He.chain.id})}),t=B(e);if(!t)throw Error("Invalid transaction request");ue(!0),Be({data:t.data,to:t.to,value:t.value,chain:He.chain})}catch(e){console.error(e),ie(new C("Unable to fetch quotes for bridging",e,b.INSUFFICIENT_BALANCE))}}().catch(console.error):Be({to:He.bridgeTx.to,data:He.bridgeTx.data,value:He.bridgeTx.value,chain:He.chain})},onSelect:e=>{e!==se&&(re(null),de(e))},onAmountChange:Se}):pe&&xe?/*#__PURE__*/i(_,{walletClientType:xe?.walletClientType||"unknown",displayName:Ae,addressToFund:Ie,isBridging:le,isErc20Flow:!1,chainId:"solana",chainName:q(Te),totalPriceInUsd:void 0,totalPriceInNativeCurrency:void 0,gasPriceInUsd:void 0,gasPriceInNativeCurrency:void 0}):
|
|
2
|
+
/*#__PURE__*/e(t,{children:[/*#__PURE__*/i(j,{}),/*#__PURE__*/i(y,{}),/*#__PURE__*/i("div",{style:{marginTop:"1rem"}}),/*#__PURE__*/i(f,{})]})}};export{G as AwaitingEvmToSolBridgingScreen,G as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsxs as e,Fragment as t,jsx as r}from"react/jsx-runtime";import a from"@heroicons/react/24/outline/CheckCircleIcon";import{useState as i,useEffect as n}from"react";import{parseEther as o,createWalletClient as s,custom as d,publicActions as c,createPublicClient as l,http as m,encodeFunctionData as u,formatUnits as p}from"viem";import{addToDefaultChains as h}from"@privy-io/js-sdk-core";import{b as f,c as g,R as v}from"./Layouts-BlFm53ED.mjs";import{B as y}from"./ModalHeader-D0p4fONI.mjs";import{C}from"./ScreenHeader-CHmc4-Lu.mjs";import{t as I}from"./FundWalletMethodHeader-CIBx6zhp.mjs";import{N as w}from"./index-Dq_xe9dz.mjs";import{u as j,t as T}from"./context-Drt9FC1y.mjs";import{u as b,a as E,b as S}from"./internal-context-Z-fyxadS.mjs";import{Q as N,D as A}from"./useActiveWallet-DGV02YBT.mjs";import{a as x}from"./get-is-unified-wallet-BC-7_b8O.mjs";import{u as k}from"./useGetTokenPrice-CyEyHBvW.mjs";import{u as F}from"./useWallets-CV3WTwML.mjs";import{E as B,a as P}from"./transfer-6YztDh-t.mjs";import{f as U}from"./formatErc20TokenAmount-BuPk9xcy.mjs";import{c as L,a as M,g as W,s as H}from"./ethers-UlIaNUWW.mjs";import{O as q}from"./analytics-mkkvFRju.mjs";import{t as $,g as D,c as R,u as Q}from"./reservoir-0wfhnc0j.mjs";import{y as _}from"./index-BZ6FAPh7.mjs";import{g as O,B as G}from"./BridgeNetworkSelectionView-BxMqN8K9.mjs";import{g as V}from"./getErc20Balance-DA4dGV9O.mjs";import{a as z}from"./getPublicClient-B4uPLKn-.mjs";import{T as X}from"./TransferOrBridgeLoadingScreen-bbU-Tw1f.mjs";import"styled-components";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"tinycolor2";import"ofetch";import"zustand";import"react-device-detect";import"./use-export-wallet-BlKa-i97.mjs";import"eventemitter3";import"viem/utils";import"./events-context-CI0iqAXA.mjs";import"@privy-io/are-addresses-equal";import"./useGetSolPrice-DwwjjGbd.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-pdKy_IjS.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"./Row-C9vrS4Zi.mjs";import"./ErrorMessage-D8VaAP5m.mjs";import"./Value-tcJV9e0L.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"./Subtitle-CV-2yKE4.mjs";import"./Title-BnzYV3Is.mjs";import"@heroicons/react/24/outline/WalletIcon";import"./getChainName-DjpPdUSc.mjs";import"./Chip-D2-wZOHJ.mjs";import"./NetworkIcon-B48ilzF8.mjs";import"@heroicons/react/24/outline/GlobeAltIcon";import"./shared-FM0rljBt.mjs";import"@heroicons/react/24/outline/ChevronDownIcon";import"./styles-Dl341B8G.mjs";import"./LinkPasskeyScreen-bcve9Yp2.mjs";import"lucide-react";import"./TodoList-CgrU7uwu.mjs";import"./ScreenLayout-jvcCZKF1.mjs";import"./Screen-BVipC9vr.mjs";import"./InjectedWalletIcon-DLcYOGDj.mjs";import"./Address-BUuQgiKx.mjs";const Y={component:()=>{let{rpcConfig:Y,appId:Z,closePrivyModal:J,createAnalyticsEvent:K}=b(),{navigate:ee,setModalData:te,data:re}=x(),ae=j(),{wallets:ie}=F(),[ne,oe]=i(!1),[se,de]=i(0n),[ce,le]=i(!1),[me,ue]=i(null),[pe,he]=i(null),[fe,ge]=i([]),[ve,ye]=i(0),[Ce,Ie]=i(!1),[we,je]=i(!1),[Te,be]=i(!1),[Ee,Se]=i(!1),[Ne,Ae]=i(),[xe,ke]=i();if(!re?.funding||"ethereum"!==re.funding.chainType)throw Error("Invalid funding data");let{erc20ContractInfo:Fe,chain:Be,connectedWallet:Pe}=re.funding,Ue=re.funding.address,Le=re.funding.erc20Address,[Me,We]=i(re.funding.amount);n((()=>{Le&&!Fe&&ue(Error("Unable to fetch token details"))}),[]);let He=!!Le&&!!Fe,qe=He?BigInt(parseFloat(Me)*10**Fe.decimals):o(Me),$e=("ethereum"===Pe?.type?Pe:void 0)??ie[0],De=N($e?.walletClientType||"unknown"),Re=De?.name||"wallet",[Qe,_e]=i(null);n((()=>{(async()=>{if(!$e)return;let e=await $e.getEthereumProvider();_e(s({account:$e.address,transport:d(e)}).extend(c))})().catch(console.error)}),[$e]);let[Oe,Ge]=i(0n);n((()=>{l({chain:Be,transport:m(z(Be,Y,Z))}).getBalance({address:Ue}).then(Ge).catch(console.error)}),[]);let[Ve,ze]=i(0n);n((()=>{He&&V({chain:Be,address:Ue,appId:Z,rpcConfig:Y,erc20Address:Le}).then((e=>ze(e.balance))).catch(console.error)}),[]);let{tokenPrice:Xe}=k(Be.id),[Ye,Ze]=i({to:Ue,chain:Be,value:qe,data:void 0});n((()=>{(async()=>{let e,t;if(!Qe||!$e||Ce||Te)return;Ie(!0);let r=l({chain:Ye.chain,transport:m(z(Ye.chain,Y,Z))});if(He&&!Ye.data)return await r.simulateContract({address:Le,chain:Ye.chain,abi:B,functionName:"transfer",args:[Ue,qe],account:$e.address}).catch((e=>{if("ContractFunctionZeroDataError"===e?.cause?.name||e?.message?.includes("returned no data"))return r.simulateContract({address:Le,chain:Ye.chain,abi:P,functionName:"transfer",args:[Ue,qe],account:$e.address}).catch((e=>{console.warn("Simulated token transfer failed with error, fetching bridge options.",e)}));console.warn("Simulated token transfer failed with error, fetching bridge options.",e)}))?(Ie(!1),void Ze({to:Le,chain:Ye.chain,data:u({abi:B,functionName:"transfer",args:[Ue,qe]}),value:"0x0"})):(Ie(!1),void le(!0));try{e=await r.prepareTransactionRequest({account:$e.address,to:Ye.to,chain:Ye.chain,data:Ye.data,value:BigInt(Ye.value??0)})}catch(e){if(console.error(e),fe.length>1)he(e.shortMessage??"Something went wrong");else if(we&&0===fe.length)return void ue(new E(`Wallet ${A($e.address)} does not have enough funds.`,void 0,S.INSUFFICIENT_BALANCE))}if(!e)return Ie(!1),void le(!0);Ie(!1),be(!0),oe(!0),de(e.gas);try{await Qe.switchChain({id:Ye.chain.id})}catch(e){await Qe.addChain({chain:Ye.chain}),await Qe.switchChain({id:Ye.chain.id})}try{t=await Qe.sendTransaction(e)}catch(e){if(console.error(e),"TransactionExecutionError"===e.name)if(fe.length<1){let t=e.shortMessage;(e.shortMessage.includes("rejected the request")||e.details.includes("rejected the request"))&&(t="User rejected the request."),ue(new E(t,void 0,S.TRANSACTION_FAILURE))}else he(e.shortMessage??"Something went wrong")}if(t)return await Qe.waitForTransactionReceipt({hash:t}),be(!1),we?(Ae(t),void ke("pending")):(Se(!0),te(_(re,"completed",t,$e?.walletClientType,He,Fe,Be)),void K({eventName:q,payload:{provider:"external",status:"success",txHash:t,address:$e.address,chainId:Ye.chain.id,chainType:"ethereum",value:Ye.value?p(BigInt(Ye.value),Fe?.decimals??18):void 0,token:Fe?.symbol??Le??"ETH",destinationAddress:Ue,destinationChainId:Be.id,destinationChainType:"ethereum",destinationValue:qe?p(qe,Fe?.decimals??18):void 0,destinationToken:Fe?.symbol??Le??Be.nativeCurrency.name}}));be(!1)})().catch(console.error)}),[Qe,Ye]),n((()=>{(async()=>{if(!ce||!Qe||!$e)return;let e=h(ae.chains).filter((e=>e.id!==Be.id&&!!e.testnet==!!Be.testnet));He&&e.unshift(Be);let t=await O({chains:e,address:$e.address,appId:Z,rpcConfig:Y,includeUsdc:re.funding?.isUSDC}),r=He?t.filter((e=>e.balance>0n)):t.filter((e=>e.balance>qe)),a=He&&t.every((e=>0n===e.balance));if(r.length<1)return void ue(new E(a?`Wallet ${A($e.address)} doesn't have enough funds to cover gas fees. Top up your wallet and try again.`:`Wallet ${A($e.address)} does not have enough funds.`,void 0,S.INSUFFICIENT_BALANCE));r.sort(((e,t)=>Number(He?(t.erc20Balance??0n)-(e.erc20Balance??0n):t.balance-e.balance)));let i=r.flatMap((e=>{let t=[{...e,isErc20Quote:!1,isTestnet:!!Be.testnet,input:$({appId:Z,amount:qe.toString(),user:$e.address,recipient:Ue,destinationChainId:Be.id,destinationCurrency:Le,originChainId:e.chain.id})}];return He&&Le&&(e.erc20Balance??0n)>=qe&&t.push({...e,isErc20Quote:!0,isTestnet:!!Be.testnet,input:$({appId:Z,amount:qe.toString(),user:$e.address,recipient:Ue,destinationChainId:Be.id,destinationCurrency:Le,originChainId:e.chain.id,originCurrency:e.erc20Address})}),t})),n=(await Promise.allSettled(i.map((async e=>({...e,quote:await D(e)}))))).filter((e=>"fulfilled"===e.status)).map((e=>e.value));if(n.length<1)return void ue(new E(`Wallet ${A($e.address)} does not have enough funds.`,void 0,S.INSUFFICIENT_BALANCE));let o=n.map((e=>({bridgeTx:R(e.quote),balance:e.balance,chain:e.chain,erc20Balance:e.erc20Balance,isErc20Quote:e.isErc20Quote}))).filter((e=>!!e.bridgeTx));if(o.length>1)return void ge(o);let s=o[0];s?(je(!0),Ze({data:s.bridgeTx.data,to:s.bridgeTx.to,value:s.bridgeTx.value,chain:s.chain})):ue(new E(`Wallet ${A($e.address)} does not have enough funds.`,void 0,S.INSUFFICIENT_BALANCE))})().catch(console.error)}),[ce]),Q({transactionHash:Ne,isTestnet:!!Be.testnet,bridgingStatus:xe,setBridgingStatus:ke,onSuccess({transactionHash:e}){je(!1),Se(!0),te(_(re,"completed",e,$e?.walletClientType,He,Fe,Be)),K({eventName:q,payload:{provider:"external",status:"success",txHash:e,address:$e?.address,chainId:Ye.chain.id,chainType:"ethereum",value:Ye.value?p(BigInt(Ye.value),Fe?.decimals??18):void 0,token:Fe?.symbol??Le??"ETH",destinationAddress:Ue,destinationChainId:Be.id,destinationChainType:"ethereum",destinationValue:qe?p(qe,Fe?.decimals??18):void 0,destinationToken:Fe?.symbol??Le??Be.nativeCurrency.name}})},onFailure({error:e}){je(!1),ue(e)}}),n((()=>{me&&(te({funding:re?.funding,solanaFundingData:re?.solanaFundingData,sendTransaction:re?.sendTransaction,errorModalData:{error:me,previousScreen:"TransferFromWalletScreen"}}),ee("ErrorScreen",!1))}),[me]);let Je=!He&&Xe?L(Me??"0",Xe):void 0,Ke=He?se:H([se,qe]),et=Ke&&Xe?M(Ke,Xe):void 0,tt=Ke?W(Ke,re?.funding?.erc20Address?re?.funding?.erc20ContractInfo?.symbol||"ETH":re?.funding?.chain.nativeCurrency.symbol||"ETH"):void 0,rt=se&&Xe?M(se,Xe):void 0,at=se?W(se,Be?.nativeCurrency?.symbol||"ETH"):void 0;if(n((()=>{if(!Ee)return;let e=setTimeout(J,T);return()=>clearTimeout(e)}),[Ee]),Ee/*#__PURE__*/)return e(t,{children:[/*#__PURE__*/r(I,{}),/*#__PURE__*/r(f,{}),/*#__PURE__*/e(g,{children:[/*#__PURE__*/r(a,{color:"var(--privy-color-success)",width:"64px",height:"64px"}),/*#__PURE__*/r(C,{title:"Success!",description:`You’ve successfully added ${Me} ${He?Fe.symbol:Be.nativeCurrency.symbol} to your ${ae.name} wallet. It may take a minute before the funds are available to use.`})]}),/*#__PURE__*/r(v,{}),/*#__PURE__*/r(y,{})]});let it=He?`${U({amount:Ve,decimals:Fe.decimals})} ${Fe.symbol}`:W(Oe,Be.nativeCurrency.symbol,3,!0),nt=fe[ve];return fe.length>1&&nt?/*#__PURE__*/r(G,{displayName:Re,configuredFundingChain:Be,erc20ContractInfo:Fe,formattedBalance:it,fundingAmount:Me,fundingCurrency:He?Fe.symbol:Be.nativeCurrency.symbol,fundingAmountInUsd:Je,options:fe,selectedOption:nt,isPreparing:Ce,isSubmitting:Te,addressToFund:Ue,fundingWalletAddress:$e?.address||"",errorMessage:pe,onSubmit:()=>{re.funding?.amount!==Me?async function(){if($e&&nt)try{let e=await D({isTestnet:!!Be.testnet,input:$({appId:Z,amount:qe.toString(),user:$e.address,recipient:Ue,destinationChainId:Be.id,destinationCurrency:Le,originChainId:nt.chain.id})}),t=R(e);if(!t)throw Error("Invalid transaction request");je(!0),Ze({data:t.data,to:t.to,value:t.value,chain:nt.chain})}catch(e){console.error(e),ue(new E("Unable to fetch quotes for bridging",e,S.INSUFFICIENT_BALANCE))}}().catch(console.error):Ze({to:nt.bridgeTx.to,data:nt.bridgeTx.data,value:nt.bridgeTx.value,chain:nt.chain})},onSelect:e=>{e!==ve&&(he(null),ye(e))},onAmountChange:We}):ne&&se&&$e&&re?.funding?/*#__PURE__*/r(X,{walletClientType:$e?.walletClientType||"unknown",displayName:Re,addressToFund:Ue,isBridging:we,isErc20Flow:He,totalPriceInUsd:et,totalPriceInNativeCurrency:tt,gasPriceInUsd:rt,gasPriceInNativeCurrency:at,chainId:Be.id,chainName:Be.name}):
|
|
2
|
+
/*#__PURE__*/e(t,{children:[/*#__PURE__*/r(I,{}),/*#__PURE__*/r(w,{}),/*#__PURE__*/r("div",{style:{marginTop:"1rem"}}),/*#__PURE__*/r(y,{})]})}};export{Y as AwaitingExternalEthereumTransferScreen,Y as default};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import{jsx as e,jsxs as r}from"react/jsx-runtime";import o from"@heroicons/react/20/solid/CheckIcon";import t from"@heroicons/react/24/outline/EnvelopeIcon";import i from"@heroicons/react/24/outline/PhoneIcon";import{useState as n,useEffect as a}from"react";import{isMobile as s}from"react-device-detect";import{styled as c}from"styled-components";import{H as l}from"./Layouts-BlFm53ED.mjs";import{L as d}from"./Link-DJ5gq9Di.mjs";import{u as p,q as m}from"./context-Drt9FC1y.mjs";import{u,e as f,b as v,k as h}from"./internal-context-Z-fyxadS.mjs";import{a as y,u as g}from"./get-is-unified-wallet-BC-7_b8O.mjs";import{s as x}from"./shouldProceedtoEmbeddedWalletCreationFlow-COZ-_baJ.mjs";import{S as b}from"./ScreenLayout-jvcCZKF1.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"@privy-io/are-addresses-equal";import"./index-BZ6FAPh7.mjs";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-DGV02YBT.mjs";import"zustand";import"./use-export-wallet-BlKa-i97.mjs";import"viem/utils";import"./useWallets-CV3WTwML.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-pdKy_IjS.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-D0p4fONI.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-BVipC9vr.mjs";import"./index-Dq_xe9dz.mjs";const E=({contactMethod:c,authFlow:p,appName:m="Privy",whatsAppEnabled:u=!1,onBack:f,onCodeSubmit:v,onResend:h,errorMessage:y,success:g=!1,resendCountdown:x=0,onInvalidInput:E,onClearError:w})=>{let[A,T]=n(S);a((()=>{y||T(S)}),[y]);let k=async e=>{e.preventDefault();let r=e.currentTarget.value.replace(" ","");if(""===r)return;if(isNaN(Number(r)))return void E?.("Code should be numeric");w?.();let o=Number(e.currentTarget.name?.charAt(5)),t=[...r||[""]].slice(0,C-o),i=[...A.slice(0,o),...t,...A.slice(o+t.length)];T(i);let n=Math.min(Math.max(o+t.length,0),C-1);if(!isNaN(Number(e.currentTarget.value))){let e=document.querySelector(`input[name=code-${n}]`);e?.focus()}if(i.every((e=>e&&!isNaN(+e)))){let e=document.querySelector(`input[name=code-${n}]`);e?.blur(),await(v?.(i.join("")))}};/*#__PURE__*/return e(b,{title:"Enter confirmation code",subtitle:/*#__PURE__*/r("span","email"===p?{children:["Please check ",/*#__PURE__*/e(M,{children:c})," for an email from privy.io and enter your code below."]}:{children:["Please check ",/*#__PURE__*/e(M,{children:c})," for a",u?" WhatsApp":""," message from ",m," and enter your code below."]}),icon:"email"===p?t:i,onBack:f,showBack:!0,helpText:/*#__PURE__*/r(L,{children:[/*#__PURE__*/r("span",{children:["Didn't get ","email"===p?"an email":"a message","?"]}),x?/*#__PURE__*/r(R,{children:[/*#__PURE__*/e(o,{color:"var(--privy-color-foreground)",strokeWidth:1.33,height:"12px",width:"12px"}),/*#__PURE__*/e("span",{children:"Code sent"})]}):/*#__PURE__*/e(d,{as:"button",size:"sm",onClick:h,children:"Resend code"})]}),children:/*#__PURE__*/e(N,{children:/*#__PURE__*/e(l,{children:/*#__PURE__*/r(_,{children:[/*#__PURE__*/e("div",{children:A.map(((r,o)=>/*#__PURE__*/e("input",{name:`code-${o}`,type:"text",value:A[o],onChange:k,onKeyUp:e=>{"Backspace"===e.key&&(e=>{if(w?.(),T([...A.slice(0,e),"",...A.slice(e+1)]),e>0){let r=document.querySelector(`input[name=code-${e-1}]`);r?.focus()}})(o)},inputMode:"numeric",autoFocus:0===o,pattern:"[0-9]",className:`${g?"success":""} ${y?"fail":""}`,autoComplete:s?"one-time-code":"off"},o)))}),/*#__PURE__*/e(I,{$fail:!!y,$success:g,children:/*#__PURE__*/e("span",{children:"Invalid or expired verification code"===y?"Incorrect code":y||(g?"Success!":"")})})]})})})})};let C=6,S=Array(6).fill("");var w,A,T=((w=T||{})[w.RESET_AFTER_DELAY=0]="RESET_AFTER_DELAY",w[w.CLEAR_ON_NEXT_VALID_INPUT=1]="CLEAR_ON_NEXT_VALID_INPUT",w),k=((A=k||{})[A.EMAIL=0]="EMAIL",A[A.SMS=1]="SMS",A);const j={component:()=>{let{navigate:r,lastScreen:o,navigateBack:t,setModalData:i,onUserCloseViaDialogOrKeybindRef:s}=y(),c=p(),{closePrivyModal:l,resendEmailCode:d,resendSmsCode:b,getAuthMeta:C,loginWithCode:S,updateWallets:w,createAnalyticsEvent:A}=u(),{authenticated:T,logout:k,user:j}=g(),{whatsAppEnabled:N}=p(),[_,I]=n(!1),[L,R]=n(null),[M,D]=n(null),[O,P]=n(0);s.current=()=>null;let U=C()?.email?0:1,W=0===U?C()?.email||"":C()?.phoneNumber||"",F=m-500;a((()=>{if(O){let e=setTimeout((()=>{P(O-1)}),1e3);return()=>clearTimeout(e)}}),[O]),a((()=>{if(T&&_&&j){if(c?.legal.requireUsersAcceptTerms&&!j.hasAcceptedTerms){let e=setTimeout((()=>{r("AffirmativeConsentScreen")}),F);return()=>clearTimeout(e)}if(x(j,c.embeddedWallets)){let e=setTimeout((()=>{i({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),A({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"AwaitingPasswordlessCodeScreen"}}),k()},callAuthOnSuccessOnClose:!0}}),r("EmbeddedWalletOnAccountCreateScreen")}),F);return()=>clearTimeout(e)}{w();let e=setTimeout((()=>l({shouldCallAuthOnSuccess:!0,isSuccess:!0})),m);return()=>clearTimeout(e)}}}),[T,_,j]),a((()=>{if(L&&0===M){let e=setTimeout((()=>{R(null),D(null);let e=document.querySelector("input[name=code-0]");e?.focus()}),1400);return()=>clearTimeout(e)}}),[L,M]);/*#__PURE__*/return e(E,{contactMethod:W,authFlow:0===U?"email":"sms",appName:c?.name,whatsAppEnabled:N,onBack:()=>t(),onCodeSubmit:async e=>{try{await S(e),I(!0)}catch(e){if(e instanceof f&&e.privyErrorCode===v.INVALID_CREDENTIALS)R("Invalid or expired verification code"),D(0);else if(e instanceof f&&e.privyErrorCode===v.CANNOT_LINK_MORE_OF_TYPE)R(e.message);else{if(e instanceof f&&e.privyErrorCode===v.USER_LIMIT_REACHED)return console.error(new h(e).toString()),void r("UserLimitReachedScreen");if(e instanceof f&&e.privyErrorCode===v.USER_DOES_NOT_EXIST)return void r("AccountNotFoundScreen");if(e instanceof f&&e.privyErrorCode===v.LINKED_TO_ANOTHER_USER)return i({errorModalData:{error:e,previousScreen:o??"AwaitingPasswordlessCodeScreen"}}),void r("ErrorScreen",!1);if(e instanceof f&&e.privyErrorCode===v.DISALLOWED_PLUS_EMAIL)return i({inlineError:{error:e}}),void r("ConnectOrCreateScreen",!1);if(e instanceof f&&e.privyErrorCode===v.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce)return i({accountTransfer:{nonce:e.data?.data?.nonce,account:W,displayName:e.data?.data?.account?.displayName,linkMethod:0===U?"email":"sms",embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress}}),void r("LinkConflictScreen");R("Issue verifying code"),D(0)}}},onResend:async()=>{P(30),0===U?await d():await b()},errorMessage:L||void 0,success:_,resendCountdown:O,onInvalidInput:e=>{R(e),D(1)},onClearError:()=>{1===M&&(R(null),D(null))}})}};let N=c.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
align-items: center;
|
|
5
|
+
justify-content: center;
|
|
6
|
+
margin: auto;
|
|
7
|
+
gap: 16px;
|
|
8
|
+
flex-grow: 1;
|
|
9
|
+
width: 100%;
|
|
10
|
+
`,_=c.div`
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
width: 100%;
|
|
14
|
+
gap: 12px;
|
|
15
|
+
|
|
16
|
+
> div:first-child {
|
|
17
|
+
display: flex;
|
|
18
|
+
justify-content: center;
|
|
19
|
+
gap: 0.5rem;
|
|
20
|
+
width: 100%;
|
|
21
|
+
border-radius: var(--privy-border-radius-sm);
|
|
22
|
+
|
|
23
|
+
> input {
|
|
24
|
+
border: 1px solid var(--privy-color-foreground-4);
|
|
25
|
+
background: var(--privy-color-background);
|
|
26
|
+
border-radius: var(--privy-border-radius-sm);
|
|
27
|
+
padding: 8px 10px;
|
|
28
|
+
height: 48px;
|
|
29
|
+
width: 40px;
|
|
30
|
+
text-align: center;
|
|
31
|
+
font-size: 18px;
|
|
32
|
+
font-weight: 600;
|
|
33
|
+
color: var(--privy-color-foreground);
|
|
34
|
+
transition: all 0.2s ease;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
> input:focus {
|
|
38
|
+
border: 1px solid var(--privy-color-foreground);
|
|
39
|
+
box-shadow: 0 0 0 1px var(--privy-color-foreground);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
> input:invalid {
|
|
43
|
+
border: 1px solid var(--privy-color-error);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
> input.success {
|
|
47
|
+
border: 1px solid var(--privy-color-border-success);
|
|
48
|
+
background: var(--privy-color-success-bg);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
> input.fail {
|
|
52
|
+
border: 1px solid var(--privy-color-border-error);
|
|
53
|
+
background: var(--privy-color-error-bg);
|
|
54
|
+
animation: shake 180ms;
|
|
55
|
+
animation-iteration-count: 2;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@keyframes shake {
|
|
60
|
+
0% {
|
|
61
|
+
transform: translate(1px, 0px);
|
|
62
|
+
}
|
|
63
|
+
33% {
|
|
64
|
+
transform: translate(-1px, 0px);
|
|
65
|
+
}
|
|
66
|
+
67% {
|
|
67
|
+
transform: translate(-1px, 0px);
|
|
68
|
+
}
|
|
69
|
+
100% {
|
|
70
|
+
transform: translate(1px, 0px);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
`,I=c.div`
|
|
74
|
+
line-height: 20px;
|
|
75
|
+
min-height: 20px;
|
|
76
|
+
font-size: 14px;
|
|
77
|
+
font-weight: 400;
|
|
78
|
+
color: ${e=>e.$success?"var(--privy-color-success-dark)":e.$fail?"var(--privy-color-error-dark)":"transparent"};
|
|
79
|
+
display: flex;
|
|
80
|
+
justify-content: center;
|
|
81
|
+
width: 100%;
|
|
82
|
+
text-align: center;
|
|
83
|
+
`,L=c.div`
|
|
84
|
+
display: flex;
|
|
85
|
+
gap: 8px;
|
|
86
|
+
align-items: center;
|
|
87
|
+
justify-content: center;
|
|
88
|
+
width: 100%;
|
|
89
|
+
color: var(--privy-color-foreground-2);
|
|
90
|
+
`,R=c.div`
|
|
91
|
+
display: flex;
|
|
92
|
+
align-items: center;
|
|
93
|
+
justify-content: center;
|
|
94
|
+
border-radius: var(--privy-border-radius-sm);
|
|
95
|
+
padding: 2px 8px;
|
|
96
|
+
gap: 4px;
|
|
97
|
+
background: var(--privy-color-background-2);
|
|
98
|
+
color: var(--privy-color-foreground-2);
|
|
99
|
+
`,M=c.span`
|
|
100
|
+
font-weight: 500;
|
|
101
|
+
word-break: break-all;
|
|
102
|
+
color: var(--privy-color-foreground);
|
|
103
|
+
`;export{j as AwaitingPasswordlessCodeScreen,E as AwaitingPasswordlessCodeScreenView,j as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import r from"@heroicons/react/24/outline/CheckCircleIcon";import{useRef as o,useState as a,useMemo as i,useEffect as s}from"react";import{parseEther as l}from"viem";import{ConnectedStandardSolanaWallet as d}from"@privy-io/js-sdk-core";import{b as c,c as m,R as u}from"./Layouts-BlFm53ED.mjs";import{B as p}from"./ModalHeader-D0p4fONI.mjs";import{C as f}from"./ScreenHeader-CHmc4-Lu.mjs";import{t as h}from"./FundWalletMethodHeader-CIBx6zhp.mjs";import{N as g}from"./index-Dq_xe9dz.mjs";import{u as v,t as w}from"./context-Drt9FC1y.mjs";import{u as I,a as y,b as C}from"./internal-context-Z-fyxadS.mjs";import{Q as T,a6 as j}from"./useActiveWallet-DGV02YBT.mjs";import{a as S}from"./get-is-unified-wallet-BC-7_b8O.mjs";import{O as A}from"./analytics-mkkvFRju.mjs";import{g as b,t as N,d as F,a as U,b as E,u as x}from"./reservoir-0wfhnc0j.mjs";import{u as k}from"./PrivyPluginContext-2QN2dVUw.mjs";import{S as W}from"./usePrivy-pdKy_IjS.mjs";import{T as R}from"./TransferOrBridgeLoadingScreen-bbU-Tw1f.mjs";import{t as L}from"./use-export-wallet-BlKa-i97.mjs";import"styled-components";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"tinycolor2";import"ofetch";import"zustand";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-CV3WTwML.mjs";import"@privy-io/are-addresses-equal";import"./InjectedWalletIcon-DLcYOGDj.mjs";import"@heroicons/react/24/outline/WalletIcon";import"./Row-C9vrS4Zi.mjs";import"./Value-tcJV9e0L.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"./Address-BUuQgiKx.mjs";import"lucide-react";import"./NetworkIcon-B48ilzF8.mjs";import"@heroicons/react/24/outline/GlobeAltIcon";import"eventemitter3";const P={component:function(){let P=v(),{closePrivyModal:B,createAnalyticsEvent:D,connectors:$}=I(),{navigate:H,setModalData:M,data:q}=S(),O=v(),_=o(!1),Q=k(),[G,V]=a(!1),[z,X]=a(!1),[Y,J]=a(null),[K,Z]=a(),[ee,te]=a();if(!q?.funding||"ethereum"!==q.funding.chainType)throw Error("Invalid funding data");let{amount:ne,connectedWallet:re,chain:oe,solanaChain:ae,isUSDC:ie}=q.funding,se=q.funding.address,le=q.funding.erc20Address,de=q.funding.isUSDC?"USDC":oe.nativeCurrency.symbol,ce=i((()=>"solana"===re?.type?re.provider:function({connectors:e,connectedWalletAddress:t}){let n=e.find((e=>"solana"===e.chainType&&e.wallets.some((e=>e.address===t)))),r=n?.wallet.accounts.find((e=>e.address===t));if(!n||!r)throw new y("Unable to find source wallet connector");return new d({wallet:n.wallet,account:r})}({connectors:$,connectedWalletAddress:re?.address||""})),[re,$]),me=i((()=>{let e=Q(W);if(!e)throw new y("Unable to load solana plugin");let t=P.solanaRpcs["solana:mainnet"];if(!t)throw new y("Unable to load mainnet RPC");return e.getSolanaRpcClient({rpc:t.rpc,rpcSubscriptions:t.rpcSubscriptions,chain:"solana:mainnet",blockExplorerUrl:t.blockExplorerUrl??"https://explorer.solana.com"})}),[]),ue=T(L(ce?.standardWallet.name||"unknown")),pe=ue?.name||"wallet";return s((()=>{(async function(){if(!ce||!oe||_.current)return;let e=Q(W);if(!e)return void J(new y("Unable to solana plugin"));_.current=!0,oe?.testnet&&console.warn("Solana testnets are not supported for bridging");let t=ie?1e6*parseFloat(ne):l(ne),n=await b({isTestnet:!!oe.testnet,input:N({appId:O.id,amount:t.toString(),user:ce.address,recipient:se,destinationChainId:oe.id,originChainId:E,originCurrency:ie?F:U,destinationCurrency:ie?le:void 0})}).catch(console.error);if(!n)return void J(new y(`Unable to fetch quotes for bridging. Wallet ${j(ce.address)} does not have enough funds.`,void 0,C.INSUFFICIENT_BALANCE));let r=await e.createTransactionFromRelayQuote({quote:n,source:ce.address,solanaClient:me});if(r)try{V(!0);let t=await e.simulateTransaction({solanaClient:me,tx:r});if(t.hasError)return t.hasFunds?(console.error("Transaction failed:",t.error),void J(new y("Something went wrong",void 0,C.TRANSACTION_FAILURE))):void J(new y(`Wallet ${j(ce?.address)} does not have enough funds. ${n.details.currencyIn.amountFormatted} ${de} are needed to complete the transaction.`,void 0,C.INSUFFICIENT_BALANCE));let{signature:o}=await ce.signAndSendTransaction({chain:"solana:mainnet",transaction:r}),a=e.getAddressFromBuffer(o);Z(a),te("pending")}catch(e){if(console.error(e),/user rejected the request/gi.test(e.message||""))return void J(new y("Transaction was rejected by the user",void 0,C.TRANSACTION_FAILURE));J(new y("Something went wrong",void 0,C.TRANSACTION_FAILURE))}else J(new y(`Unable to select bridge option from quotes. Wallet ${j(ce.address)} does not have enough funds.`,void 0,C.INSUFFICIENT_BALANCE))})().catch(console.error)}),[]),x({transactionHash:K,isTestnet:!1,bridgingStatus:ee,setBridgingStatus:te,onSuccess({transactionHash:e}){V(!1),X(!0),D({eventName:A,payload:{provider:"external",status:"success",txHash:e,address:ce.address,chainType:"solana",clusterName:ae,token:"SOL",destinationAddress:se,destinationChainId:oe.id,destinationChainType:"ethereum",destinationValue:ne,destinationToken:ie?"USDC":"ETH"}})},onFailure({error:e}){V(!1),J(e)}}),s((()=>{if(!z)return;let e=setTimeout(B,w);return()=>clearTimeout(e)}),[z]),s((()=>{Y&&(M({funding:q?.funding,solanaFundingData:q?.solanaFundingData,sendTransaction:q?.sendTransaction,errorModalData:{error:Y,previousScreen:"TransferFromWalletScreen"}}),H("ErrorScreen",!1))}),[Y]),z?/*#__PURE__*/e(n,{children:[/*#__PURE__*/t(h,{}),/*#__PURE__*/t(c,{}),/*#__PURE__*/e(m,{children:[/*#__PURE__*/t(r,{color:"var(--privy-color-success)",width:"64px",height:"64px"}),/*#__PURE__*/t(f,{title:"Success!",description:`You’ve successfully added ${ne} ${de} to your ${O.name} wallet. It may take a minute before the funds are available to use.`})]}),/*#__PURE__*/t(u,{}),/*#__PURE__*/t(p,{})]}):G&&ce?/*#__PURE__*/t(R,{walletClientType:L(ce?.standardWallet.name||"unknown"),displayName:pe,addressToFund:se,isBridging:G,isErc20Flow:!1,chainId:oe.id,chainName:oe.name,totalPriceInUsd:void 0,totalPriceInNativeCurrency:void 0,gasPriceInUsd:void 0,gasPriceInNativeCurrency:void 0}):
|
|
2
|
+
/*#__PURE__*/e(n,{children:[/*#__PURE__*/t(h,{}),/*#__PURE__*/t(g,{}),/*#__PURE__*/t("div",{style:{marginTop:"1rem"}}),/*#__PURE__*/t(p,{})]})}};export{P as AwaitingSolToEvmBridgingScreen,P as default};
|
package/dist/esm/{BridgeNetworkSelectionView-tyz86GlM.mjs → BridgeNetworkSelectionView-BxMqN8K9.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createPublicClient as e,http as r}from"viem";import{UsdcAddressMap as a,formatWalletAddress as o}from"@privy-io/js-sdk-core";import{a as i}from"./getPublicClient-B4uPLKn-.mjs";import{g as n}from"./getErc20Balance-
|
|
1
|
+
import{createPublicClient as e,http as r}from"viem";import{UsdcAddressMap as a,formatWalletAddress as o}from"@privy-io/js-sdk-core";import{a as i}from"./getPublicClient-B4uPLKn-.mjs";import{g as n}from"./getErc20Balance-DA4dGV9O.mjs";import{jsx as t,jsxs as s,Fragment as c}from"react/jsx-runtime";import{useRef as m}from"react";import{c as l,B as d}from"./ModalHeader-D0p4fONI.mjs";import{b as h,R as p}from"./Layouts-BlFm53ED.mjs";import{t as u}from"./FundWalletMethodHeader-CIBx6zhp.mjs";import{R as f}from"./Row-C9vrS4Zi.mjs";import{E as g}from"./ErrorMessage-D8VaAP5m.mjs";import{V as b,L as y}from"./Value-tcJV9e0L.mjs";import{S as v}from"./Subtitle-CV-2yKE4.mjs";import{T as j}from"./Title-BnzYV3Is.mjs";import w from"@heroicons/react/24/outline/WalletIcon";import{styled as C}from"styled-components";import{g as x}from"./getChainName-DjpPdUSc.mjs";import{C as k}from"./Chip-D2-wZOHJ.mjs";import{N}from"./NetworkIcon-B48ilzF8.mjs";import{B as T,a as B}from"./shared-FM0rljBt.mjs";import{Menu as $,MenuButton as A,MenuItems as I,MenuItem as S}from"@headlessui/react";import E from"@heroicons/react/24/outline/ChevronDownIcon";import{f as F}from"./formatErc20TokenAmount-BuPk9xcy.mjs";import{g as P}from"./ethers-UlIaNUWW.mjs";import{F as M,a as L,b as R,c as U,d as W}from"./styles-Dl341B8G.mjs";const H=({chains:o,appId:t,address:s,rpcConfig:c,includeUsdc:m})=>Promise.all(o.map((async o=>{let l=e({chain:o,transport:r(i(o,c,t))}),d=await l.getBalance({address:s}).catch((()=>0n)),h=null,p=a[o.id];if(m&&p){let{balance:e}=await n({address:s,chain:o,rpcConfig:c,appId:t,erc20Address:p});h=e}return{balance:d,erc20Balance:h,erc20Address:p,chain:o}}))),Q=({balance:e,className:r,chain:a})=>/*#__PURE__*/t(T,{className:r,$state:void 0,children:/*#__PURE__*/t(V,{balance:e,chain:a})}),V=({balance:e,chain:r})=>/*#__PURE__*/s(c,{children:[/*#__PURE__*/s(q,{children:[/*#__PURE__*/t(D,{chainId:"object"==typeof r?r.id:"solana"}),/*#__PURE__*/t(b,{children:"object"==typeof r?r.name:x(r)})]}),/*#__PURE__*/s(k,{isLoading:!1,isPulsing:!1,color:"gray",children:[/*#__PURE__*/t(z,{children:/*#__PURE__*/t(w,{})}),e]})]});let q=C.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
`,z=C.div`
|
|
@@ -66,4 +66,4 @@ import{createPublicClient as e,http as r}from"viem";import{UsdcAddressMap as a,f
|
|
|
66
66
|
rotate: -180deg;
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
-
`;const Z=({displayName:e,errorMessage:r,configuredFundingChain:a,formattedBalance:i,fundingAmount:n,fundingCurrency:b,fundingAmountInUsd:w,options:C,selectedOption:k,isPreparing:N,isSubmitting:T,addressToFund:B,fundingWalletAddress:$,onSubmit:A,onSelect:I,onAmountChange:S,erc20ContractInfo:E})=>{let
|
|
69
|
+
`;const Z=({displayName:e,errorMessage:r,configuredFundingChain:a,formattedBalance:i,fundingAmount:n,fundingCurrency:b,fundingAmountInUsd:w,options:C,selectedOption:k,isPreparing:N,isSubmitting:T,addressToFund:B,fundingWalletAddress:$,onSubmit:A,onSelect:I,onAmountChange:S,erc20ContractInfo:E})=>{let H=m(null);/*#__PURE__*/return s(c,{children:[/*#__PURE__*/t(u,{}),/*#__PURE__*/t(h,{}),/*#__PURE__*/t(j,{children:"Transfer from another network"}),/*#__PURE__*/s(v,{children:["You need more funds on the"," ","object"==typeof a?a.name:x(a)," ","network. Bridge from another blockchain network."]}),/*#__PURE__*/s(M,{style:{marginTop:"2rem"},children:[/*#__PURE__*/s(L,{onClick:()=>H.current?.focus(),children:[/*#__PURE__*/t(R,{ref:H,value:n,onChange:e=>{let r=e.target.value;if(/^[0-9.]*$/.test(r)&&r.split(".").length-1<=1){let e=/\.$/.test(r)?".":"",a=Number(r.replace(/\.$/,"")||"0");if(Number.isNaN(a))return void S("0");S(a.toString()+e)}}}),/*#__PURE__*/t(U,{children:b})]}),w&&/*#__PURE__*/t(W,{children:w})]}),/*#__PURE__*/s(f,{style:{marginTop:"1.5rem"},children:[/*#__PURE__*/t(y,{children:"From"}),/*#__PURE__*/t(y,{children:o($)})]}),/*#__PURE__*/t(O,{selected:{chain:k.chain,balance:k.isErc20Quote?F({amount:k.erc20Balance??0n,decimals:E?.decimals??6})+` ${E?.symbol||""}`:P(k.balance,k.chain.nativeCurrency.symbol,3,!0)},options:C.map((({chain:e,balance:r,isErc20Quote:a,erc20Balance:o})=>({chain:e,balance:a?F({amount:o??0n,decimals:E?.decimals??6})+` ${E?.symbol||""}`:P(r,e.nativeCurrency.symbol,3,!0)}))),onSelect:I}),/*#__PURE__*/s(f,{style:{marginTop:"1.5rem"},children:[/*#__PURE__*/t(y,{children:"To"}),/*#__PURE__*/t(y,{children:o(B)})]}),/*#__PURE__*/t(Q,{chain:a,balance:i}),/*#__PURE__*/t(g,{style:{marginTop:"1rem"},children:r}),/*#__PURE__*/s(l,{style:{marginTop:"1rem"},loading:T||N,disabled:N||T,onClick:A,children:["Confirm with ",e]}),/*#__PURE__*/t(p,{}),/*#__PURE__*/t(d,{})]})};export{Z as B,H as g};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{CheckCircle as t,XCircle as r}from"lucide-react";import{useMemo as i,useRef as o,useState as s,useEffect as a}from"react";import{a as n,C as c}from"./index-BZ6FAPh7.mjs";import{a as m}from"./get-is-unified-wallet-BC-7_b8O.mjs";import{S as u}from"./ScreenLayout-jvcCZKF1.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-DGV02YBT.mjs";import"zustand";import"./context-Drt9FC1y.mjs";import"tinycolor2";import"styled-components";import"react-device-detect";import"./use-export-wallet-BlKa-i97.mjs";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"viem/utils";import"./useWallets-CV3WTwML.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-pdKy_IjS.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"@privy-io/are-addresses-equal";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./ModalHeader-D0p4fONI.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-BVipC9vr.mjs";import"./index-Dq_xe9dz.mjs";const p=({status:o,title:s,description:a,userIntentRequired:n,retriesRemaining:c,hasSelectedCta:m,onContinue:p,onRetry:l})=>{let d=i((()=>{switch(o){case"loading":default:return;case"success":return n?{label:m?"Continuing...":"Continue",onClick:p,disabled:m,loading:m}:void 0;case"error":return c>0?{label:"Retry",onClick:l}:void 0}}),[o,m,p,l]),y=i((()=>({loading:"loading",ready:"subtle",disabled:"subtle",success:"success",error:"error"}[o]||"loading")),[o]);/*#__PURE__*/return e(u,{icon:"loading"===o||"ready"===o?void 0:"success"===o?t:r,iconVariant:y,title:s,subtitle:a,primaryCta:d,watermark:!0})},l={component:()=>{let{lastScreen:t,data:r,navigate:i,setModalData:u}=m(),{status:l,token:d,waitForResult:y,reset:g,execute:h}=n(),v=o([]),j=e=>{v.current=[e,...v.current]},[f,C]=s(!0);a((()=>(j(setTimeout(C,1e3,!1)),()=>{v.current.forEach((e=>clearTimeout(e))),v.current=[]})),[]);let[b,w]=s(""),[k,R]=s("Checking that you are a human..."),[S,x]=s(!1),[I,T]=s(3),P=r?.captchaModalData,q=async e=>{try{await(P?.callback(e)),P?.onSuccessNavigateTo&&i(P?.onSuccessNavigateTo,!1)}catch(e){if(e instanceof c)return;u({errorModalData:{error:e,previousScreen:t||"LandingScreen"}}),i(P?.onErrorNavigateTo||"ErrorScreen",!1)}};a((()=>{"success"===l?j(setTimeout((async()=>{let e=await y();!e||P?.userIntentRequired||q(e)}),1e3)):"ready"===l&&j(setTimeout((()=>{"ready"===l&&h()}),500))}),[l]),a((()=>{if(!f)switch(l){case"success":w("Success!"),R("CAPTCHA passed successfully."),P?.userIntentRequired||setTimeout((()=>{x(!0),q(d)}),2e3);break;case"loading":w(""),R("Checking that you are a human...");break;case"error":w("Something went wrong"),R(I<=0?"If you use an adblocker or VPN, try disabling and re-attempting.":"You did not pass CAPTCHA. Please try again.")}}),[l,f,S]);/*#__PURE__*/return e(p,{status:l,title:b,description:k,userIntentRequired:P?.userIntentRequired,retriesRemaining:I,hasSelectedCta:S,onContinue:()=>{x(!0),q(d)},onRetry:async()=>{if(I<=0)return;T((e=>e-1)),g(),h();let e=await y();!e||P?.userIntentRequired||q(e)}})}};export{l as CaptchaScreen,p as CaptchaScreenView,l as default};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{jsxs as e,Fragment as r,jsx as t}from"react/jsx-runtime";import o from"@heroicons/react/24/solid/ArrowsRightLeftIcon";import i from"@heroicons/react/24/solid/CheckCircleIcon";import{useState as n,useRef as a,useEffect as s,useMemo as c}from"react";import{styled as m}from"styled-components";import{M as l,B as d,P as p}from"./ModalHeader-D0p4fONI.mjs";import{a as u}from"./Layouts-BlFm53ED.mjs";import{L as g,a7 as f}from"./useActiveWallet-DGV02YBT.mjs";import{u as h}from"./internal-context-Z-fyxadS.mjs";import{a as v}from"./get-is-unified-wallet-BC-7_b8O.mjs";import{O as y}from"./analytics-mkkvFRju.mjs";import{H as b}from"./index-BZ6FAPh7.mjs";import"./context-Drt9FC1y.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"zustand";import"react-device-detect";import"./use-export-wallet-BlKa-i97.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-CV3WTwML.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"ofetch";import"@privy-io/are-addresses-equal";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-pdKy_IjS.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";const w={component:()=>{let{data:o,setModalData:i,navigate:c,navigateBack:m}=v(),{closePrivyModal:p,createAnalyticsEvent:u,client:g}=h(),[f,b]=n("pending-in-flow"),w=a(0),C={...o?.funding,showAlternateFundingMethod:!0};C.usingDefaultFundingMethod&&(C.usingDefaultFundingMethod=!1);let{partnerUserId:k,popup:x}=o?.coinbaseOnrampStatus??{};return s((()=>{if("pending-in-flow"===f||"pending-after-flow"===f){let e=setInterval((async()=>{if(k)try{let{status:e}=await g.getCoinbaseOnRampStatus({partnerUserId:k});if("success"===e)return void b("success");if("failure"===e)throw Error("There was an error completing Coinbase Onramp flow.");if(w.current>=3)return i({funding:C,solanaFundingData:o?.solanaFundingData}),void c("FundingMethodSelectionScreen");x?.closed&&(w.current=w.current+1,b("pending-after-flow"))}catch(e){console.error(e),b("error"),u({eventName:y,payload:{status:"failure",provider:"coinbase-onramp",error:e.message}}),i({funding:{...C,errorMessage:"Something went wrong adding funds. Please try again or use another method."},solanaFundingData:o?.solanaFundingData}),c("FundingMethodSelectionScreen")}}),1500);return()=>clearInterval(e)}}),[k,x,f]),/*#__PURE__*/e(r,{children:[/*#__PURE__*/t(l,{title:"Fund account",backFn:()=>{i({funding:C,solanaFundingData:o?.solanaFundingData}),m()}},"header"),/*#__PURE__*/t(j,{status:f,onClickCta:p}),/*#__PURE__*/t(d,{})]})}};let j=({status:o,onClickCta:i})=>{let{title:n,body:a,cta:s}=c((()=>(e=>{switch(e){case"success":return{title:"You've funded your account!",body:"It may take a few minutes for the assets to appear.",cta:"Continue"};case"pending-after-flow":return{title:"In Progress",body:"Almost done. Retrieving transaction status from Coinbase",cta:""};case"error":case"pending-in-flow":return{title:"In Progress",body:"Go back to Coinbase Onramp to finish funding your account.",cta:""}}})(o)),[o]);/*#__PURE__*/return e(r,{children:[/*#__PURE__*/e(x,{children:[/*#__PURE__*/t(C,{isSucccess:"success"===o}),/*#__PURE__*/e(u,{children:[/*#__PURE__*/t("h3",{children:n}),/*#__PURE__*/t(k,{children:a})]})]}),s&&/*#__PURE__*/t(p,{onClick:i,children:s})]})},C=({isSucccess:r})=>{if(!r){let r="var(--privy-color-foreground-4)";/*#__PURE__*/return e("div",{style:{position:"relative"},children:[/*#__PURE__*/t(g,{color:r,style:{position:"absolute"}}),/*#__PURE__*/t(f,{color:r}),/*#__PURE__*/t(b,{style:{position:"absolute",width:"2.8rem",height:"2.8rem",top:"1.2rem",left:"1.2rem"}})]})}let n=r?i:()=>/*#__PURE__*/t(o,{width:"3rem",height:"3rem",style:{backgroundColor:"var(--privy-color-foreground-4)",color:"var(--privy-color-background)",borderRadius:"100%",padding:"0.5rem",margin:"0.5rem"}}),a=r?"var(--privy-color-success)":"var(--privy-color-foreground-4)";/*#__PURE__*/return t("div",{style:{borderColor:a,display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"100%",borderWidth:2,padding:"0.5rem",marginBottom:"0.5rem"},children:n&&/*#__PURE__*/t(n,{width:"4rem",height:"4rem",color:a})})},k=m.p`
|
|
2
|
+
font-size: 1rem;
|
|
3
|
+
color: var(--privy-color-foreground-3);
|
|
4
|
+
margin-bottom: 1rem;
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
gap: 1rem;
|
|
8
|
+
`,x=m.div`
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
align-items: center;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
margin-left: 1.75rem;
|
|
14
|
+
margin-right: 1.75rem;
|
|
15
|
+
padding: 2rem 0;
|
|
16
|
+
`;export{w as CoinbaseOnrampStatusScreen,w as default};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{jsxs as e,Fragment as r,jsx as a}from"react/jsx-runtime";import{Mail as i}from"lucide-react";import{forwardRef as t,useState as o,useEffect as n}from"react";import{styled as l}from"styled-components";import{u as s}from"./context-Drt9FC1y.mjs";import{u as m,c,b as d}from"./internal-context-Z-fyxadS.mjs";import{a as p}from"./index-BZ6FAPh7.mjs";import{u,a as h}from"./get-is-unified-wallet-BC-7_b8O.mjs";import{F as g,a1 as f,V as y}from"./useActiveWallet-DGV02YBT.mjs";import{E,P as S}from"./ModalHeader-D0p4fONI.mjs";import{C as b}from"./Chip-D2-wZOHJ.mjs";import{I as v,a as k}from"./EmailInputForm-Dgoii4vf.mjs";import{E as j}from"./ErrorMessage-D8VaAP5m.mjs";const C=/*#__PURE__*/t(((t,l)=>{let[y,v]=o(t.defaultValue||""),[k,C]=o(""),[T,A]=o(!1),{authenticated:D}=u(),{initLoginWithEmail:L}=m(),{navigate:M,setModalData:I,currentScreen:U,data:F}=h(),{enabled:N,token:W}=p(),[R,V]=o(!1),{accountType:_}=g(),q=s();n((()=>{!y&&q.disablePlusEmails&&F?.inlineError?.error instanceof c&&F?.inlineError?.error.privyErrorCode===d.DISALLOWED_PLUS_EMAIL&&!k&&C("Please enter a valid email address without a '+'."),k&&C("")}),[y]);let H=f(y),K=T||!H,O=()=>{var e;I({login:F?.login,inlineError:void 0}),!N||W||D?(e=W,A(!0),L({email:y,captchaToken:e,disableSignup:F?.login?.disableSignup,withPrivyUi:!0}).then((()=>{M("AwaitingPasswordlessCodeScreen")})).catch((e=>{I({errorModalData:{error:e,previousScreen:U||"LandingScreen"}}),M("ErrorScreen")})).finally((()=>{A(!1)}))):(I({captchaModalData:{callback:e=>L({email:y,captchaToken:e,withPrivyUi:!0}),userIntentRequired:!1,onSuccessNavigateTo:"AwaitingPasswordlessCodeScreen",onErrorNavigateTo:"ErrorScreen"}}),M("CaptchaScreen"))};/*#__PURE__*/return e(r,{children:[/*#__PURE__*/e(w,{children:[k&&/*#__PURE__*/a(j,{style:{display:"block",marginTop:"0.25rem",textAlign:"left"},children:k}),/*#__PURE__*/e(x,{stacked:t.stacked,$error:!!k,children:[/*#__PURE__*/a(P,{children:/*#__PURE__*/a(i,{})}),/*#__PURE__*/a("input",{ref:l,id:"email-input",className:"login-method-button",type:"email",placeholder:"your@email.com",onFocus:()=>V(!0),onChange:e=>v(e.target.value),onKeyUp:e=>{"Enter"===e.key&&O()},value:y,autoComplete:"email"}),"email"!==_||R?t.stacked?/*#__PURE__*/a("span",{}):/*#__PURE__*/a(E,{isSubmitting:T,onClick:O,disabled:K,children:"Submit"}):/*#__PURE__*/a(b,{color:"gray",children:"Recent"})]})]}),t.stacked?/*#__PURE__*/a(S,{loadingText:null,loading:T,disabled:K,onClick:O,style:{width:"100%"},children:"Submit"}):null]})}));let w=v,x=k,P=l(y)`
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
`;export{C};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{jsx as t,jsxs as e}from"react/jsx-runtime";import{ArrowRightLeft as i}from"lucide-react";import{styled as o}from"styled-components";import{a as r}from"./get-is-unified-wallet-BC-7_b8O.mjs";import{S as n}from"./ScreenLayout-jvcCZKF1.mjs";import{G as m}from"./index-BZ6FAPh7.mjs";import"@privy-io/are-addresses-equal";import"react";import"./context-Drt9FC1y.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"./ModalHeader-D0p4fONI.mjs";import"./useActiveWallet-DGV02YBT.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-BlKa-i97.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-CV3WTwML.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-BVipC9vr.mjs";import"./index-Dq_xe9dz.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-pdKy_IjS.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";const s=e=>/*#__PURE__*/t("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"-0.625 12.48 397.647 399.546",width:"2500",height:"674",preserveAspectRatio:"none",...e,children:/*#__PURE__*/t("g",{children:/*#__PURE__*/t("path",{fill:"#333745",d:"M 333.9 12.8 L 150.9 12.8 L 150.9 258.4 L 396.5 258.4 L 396.5 76.7 C 396.6 42.2 368.4 12.8 333.9 12.8 Z M 94.7 12.8 L 64 12.8 C 29.5 12.8 0 40.9 0 76.8 L 0 107.5 L 94.7 107.5 L 94.7 12.8 Z M 0 165 L 94.7 165 L 94.7 259.7 L 0 259.7 L 0 165 Z M 301.9 410.6 L 332.6 410.6 C 367.1 410.6 396.6 382.5 396.6 346.6 L 396.6 316 L 301.9 316 L 301.9 410.6 Z M 150.9 316 L 245.6 316 L 245.6 410.7 L 150.9 410.7 L 150.9 316 Z M 0 316 L 0 346.7 C 0 381.2 28.1 410.7 64 410.7 L 94.7 410.7 L 94.7 316 L 0 316 Z"})})}),p=({onContinueWithLedger:o,onContinueWithoutLedger:r,title:p="Phantom supports Ledger",subtitle:a="Are you using a Ledger hardware wallet?\nContinue to sign with Ledger"})=>/*#__PURE__*/t(n,{title:p,subtitle:/*#__PURE__*/t(u,{children:a}),primaryCta:{label:"Continue with Ledger",onClick:o},secondaryCta:{label:"Continue without Ledger",onClick:r},watermark:!0,children:/*#__PURE__*/e(l,{children:[/*#__PURE__*/t(m,{style:{width:"48px",height:"48px"}}),/*#__PURE__*/t(i,{strokeWidth:2,color:"var(--privy-color-icon-subtle)",width:22,height:22}),/*#__PURE__*/t(s,{style:{width:"48px",height:"48px"}})]})});function a(){let{data:e,setModalData:i,navigate:o}=r();/*#__PURE__*/return t(p,{onContinueWithLedger:function(){i({...e,login:{...e?.login,isSigningInWithLedgerSolana:!0}}),o("ConnectionStatusScreen")},onContinueWithoutLedger:function(){i({...e,login:{...e?.login,isSigningInWithLedgerSolana:!1}}),o("ConnectionStatusScreen")}})}const c={component:a};let l=o.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
gap: 8px;
|
|
6
|
+
margin-bottom: var(--screen-space);
|
|
7
|
+
`,u=o.span`
|
|
8
|
+
white-space: pre-wrap;
|
|
9
|
+
`;export{c as ConnectLedgerScreen,a as ConnectLedgerScreenComponent,p as ConnectLedgerScreenView,c as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useRef as t}from"react";import{u as o}from"./context-Drt9FC1y.mjs";import{u as r,c as n,b as a}from"./internal-context-Z-fyxadS.mjs";import{a as i}from"./events-context-CI0iqAXA.mjs";import{a as l}from"./get-is-unified-wallet-BC-7_b8O.mjs";import{i as c}from"./ConnectWalletView-DQNMKorC.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"@privy-io/are-addresses-equal";import"@heroicons/react/24/outline";import"@tanstack/react-virtual";import"react-device-detect";import"styled-components";import"./ModalHeader-D0p4fONI.mjs";import"./useActiveWallet-DGV02YBT.mjs";import"zustand";import"./use-export-wallet-BlKa-i97.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-CV3WTwML.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"./CopyableText-BCytXyJL.mjs";import"lucide-react";import"./Link-DJ5gq9Di.mjs";import"./QrCode-DZulv1E7.mjs";import"qrcode";import"./EmailInputForm-Dgoii4vf.mjs";import"./ErrorMessage-D8VaAP5m.mjs";import"./useI18n-De-HiNn7.mjs";import"./WalletCards-DH1rqayz.mjs";import"./Screen-BVipC9vr.mjs";import"./index-Dq_xe9dz.mjs";const m={component:()=>{let{closePrivyModal:m}=r(),{data:s,navigate:p}=l(),d=o(),u=i(),C=s?.externalConnectWallet?.description,j=t(s?.externalConnectWallet?.walletList??d.appearance.walletList),E=t(s?.externalConnectWallet?.walletChainType??d.appearance.walletChainType);/*#__PURE__*/return e(c,{walletList:j.current,walletChainType:E.current,preSelectedWalletId:s?.externalConnectWallet?.preSelectedWalletId,hideHeader:s?.externalConnectWallet?.hideHeader,onBack:s?.funding?()=>p("FundingMethodSelectionScreen"):void 0,onClose:()=>{u("connectWallet","onError",a.GENERIC_CONNECT_WALLET_ERROR),m()},onConnect:({connector:e,wallet:t})=>{u("connectWallet","onSuccess",{wallet:t});let o=s?.externalConnectWallet?.onCompleteNavigateTo;o?p(o({address:t.address,walletClientType:e?.walletClientType,walletChainType:e?.chainType})):m()},onConnectError:e=>{e instanceof n?(console.warn(e.cause?e.cause:e.message),u("connectWallet","onError",e.privyErrorCode||a.GENERIC_CONNECT_WALLET_ERROR)):(console.warn(e),u("connectWallet","onError",a.UNKNOWN_CONNECT_WALLET_ERROR))},customDescription:C,app:d,connectOnly:!0})},isUnauthenticatedScreem:!0};export{m as ConnectOnlyLandingScreen,m as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useState as t,useEffect as o}from"react";import{isMobile as r}from"react-device-detect";import{C as i}from"./use-export-wallet-BlKa-i97.mjs";import{q as n}from"./context-Drt9FC1y.mjs";import{Q as a}from"./useActiveWallet-DGV02YBT.mjs";import{u as s}from"./internal-context-Z-fyxadS.mjs";import{a as l}from"./get-is-unified-wallet-BC-7_b8O.mjs";import{S as c}from"./ScreenLayout-jvcCZKF1.mjs";import{B as m}from"./index-BZ6FAPh7.mjs";import{getErrorDetails as p}from"./ConnectionStatusScreen-VsYDFXuf.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"viem/utils";import"./useWallets-CV3WTwML.mjs";import"tinycolor2";import"zustand";import"styled-components";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"ofetch";import"@privy-io/are-addresses-equal";import"./ModalHeader-D0p4fONI.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-BVipC9vr.mjs";import"./index-Dq_xe9dz.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-pdKy_IjS.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"./Link-DJ5gq9Di.mjs";import"./useI18n-De-HiNn7.mjs";import"./shouldProceedtoEmbeddedWalletCreationFlow-COZ-_baJ.mjs";const u=({walletLogo:t,success:o,errorMessage:r,title:n,subtitle:a,onRetry:s,onUseDifferentWallet:l,onBack:m,numRetries:p,maxRetries:u})=>/*#__PURE__*/e(c,{title:n,subtitle:a,icon:t,iconVariant:"loading",iconLoadingStatus:{success:o,fail:!!r},primaryCta:r===i.ERROR_USER_EXISTS?{label:"Use a different wallet",onClick:l}:!o&&r?.retryable&&p<u?{label:"Retry",onClick:s,disabled:!r?.retryable||p>=u}:!o&&r&&p>=u?{label:"Use a different wallet",onClick:l}:void 0,onBack:m,watermark:!0}),d={component:()=>{let i,{navigateBack:c,navigate:d,lastScreen:w,currentScreen:f,data:y,setModalData:g}=l(),{walletConnectionStatus:j,closePrivyModal:v}=s(),[C,h]=t(void 0),[k,b]=t(0),x=a(j?.connector?.walletClientType||"unknown"),S="connected"===j?.status,R="switching_to_supported_chain"===j?.status;o((()=>{if(S){let e;if(y?.externalConnectWallet?.onCompleteNavigateTo){let t=y.externalConnectWallet.onCompleteNavigateTo,o=j.connectedWallet?.address;e=setTimeout((()=>{if(y.funding&&j.connector){let e=j.connector.wallets.find((e=>e.address===o));g({...y,funding:{...y.funding,connectedWallet:e}})}d(t({address:o,walletClientType:j.connector?.walletClientType,walletChainType:j.connector?.chainType}))}),n)}else e=setTimeout(v,n);return()=>clearTimeout(e)}}),[S]);o((()=>{var e;j?.connectError&&(e=j?.connectError,h(p(e)))}),[j]);let T=j?.connector?.connectorType||"injected",W=j?.connector?.walletClientType||"unknown",B=x?.metadata?.shortName||x?.name||j?.connector?.walletBranding.name||"Browser Extension",E=x?.image_url?.md||j?.connector?.walletBranding.icon||(t=>/*#__PURE__*/e(m,{...t})),M="Browser Extension"===B?B.toLowerCase():B;i=S?`Successfully connected with ${M}`:C?C.message:R?"Switching networks":`Waiting for ${M}`;let _="Don’t see your wallet? Check your other browser windows.";return S?_="You’re good to go!":k>=2&&C?_="Unable to connect wallet":C?_=C.detail:R?_="Switch your wallet to the requested network.":"metamask"===W&&r?_="Click to continue to open and connect MetaMask.":"metamask"===W?_="For the best experience, connect only one wallet at a time.":"wallet_connect_v2"===T?_="Open your mobile wallet app to continue":"coinbase_wallet"===T&&(_="Confirm in the Coinbase app/popup to continue."),/*#__PURE__*/e(u,{walletName:B,walletLogo:E,success:S,errorMessage:C,title:i,subtitle:_,onRetry:()=>{b(k+1),h(void 0),j?.connectRetry()},onUseDifferentWallet:c,onBack:f===w?void 0:c,numRetries:k,maxRetries:2})}};export{d as ConnectOnlyStatusScreen,u as ConnectOnlyStatusScreenView,d as default};
|