@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{FingerprintIcon as e}from"lucide-react";import{a as i}from"./index-BZ6FAPh7.mjs";import{u as o}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"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"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"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"@privy-io/are-addresses-equal";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./ModalHeader-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 s=({title:i="Log in or create a new account?",subtitle:o="Create a new account with a passkey or use a passkey to log in to an existing account.",onSignup:r,onLogin:s})=>/*#__PURE__*/t(a,{title:i,subtitle:o,icon:e,primaryCta:{label:"Create new account",onClick:r},secondaryCta:{label:"Log in with a passkey",onClick:s},watermark:!0}),n={component:()=>{let{enabled:e,token:a}=i(),{navigate:n,setModalData:p}=r(),{initSignupWithPasskey:m,initLoginWithPasskey:c}=o();/*#__PURE__*/return t(s,{onSignup:async()=>{e&&!a?(p({passkeyAuthModalData:{passkeySignupFlow:!0},captchaModalData:{callback:t=>m({captchaToken:t,withPrivyUi:!0}),userIntentRequired:!1,onSuccessNavigateTo:"PasskeyStatusScreen",onErrorNavigateTo:"ErrorScreen"}}),n("CaptchaScreen")):(await m({withPrivyUi:!0,captchaToken:a}),p({passkeyAuthModalData:{passkeySignupFlow:!0}}),n("PasskeyStatusScreen"))},onLogin:async()=>{e&&!a?(p({passkeyAuthModalData:{passkeySignupFlow:!1},captchaModalData:{callback:t=>c({captchaToken:t,withPrivyUi:!0}),userIntentRequired:!1,onSuccessNavigateTo:"PasskeyStatusScreen",onErrorNavigateTo:"ErrorScreen"}}),n("CaptchaScreen")):(await c({withPrivyUi:!0,captchaToken:a}),p({passkeyAuthModalData:{passkeySignupFlow:!1}}),n("PasskeyStatusScreen"))}})}};export{n as PasskeySelectSignupOrLogin,s as PasskeySelectSignupOrLoginView,n as default};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{FingerprintIcon as r}from"lucide-react";import{useState as t,useRef as o,useEffect as s}from"react";import{styled as i}from"styled-components";import{u as a,q as n}from"./context-Drt9FC1y.mjs";import{c,b as m,u}from"./internal-context-Z-fyxadS.mjs";import{a as l,u as p}from"./get-is-unified-wallet-BC-7_b8O.mjs";import{s as d}from"./shouldProceedtoEmbeddedWalletCreationFlow-COZ-_baJ.mjs";import{S as y}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"react-device-detect";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 h=({status:t,passkeySignupFlow:o=!1,error:s,onRetry:i})=>/*#__PURE__*/e(y,{title:(()=>{switch(t){case"loading":return"Waiting for passkey";case"success":return"Success";case"error":return"Something went wrong"}})(),subtitle:/*#__PURE__*/e(g,{children:(()=>{switch(t){case"loading":return o?"Please follow prompts to register your passkey.":"Please follow prompts to verify your passkey.\nYou will have to sign up with another method first to register a passkey for your account.";case"success":return"You've successfully logged in with your passkey.";case"error":if(s instanceof c){if(s.privyErrorCode===m.CANNOT_LINK_MORE_OF_TYPE)return"Cannot link more passkeys to account.";if(s.privyErrorCode===m.PASSKEY_NOT_ALLOWED)return"Passkey request timed out or rejected by user.\nYou will have to sign up with another method first to register a passkey for your account."}return"An unknown error occurred.\nYou will have to sign up with another method first to register a passkey for your account."}})()}),icon:r,iconVariant:"loading",iconLoadingStatus:{success:"success"===t,fail:"error"===t},primaryCta:"error"===t&&i?{label:"Retry",onClick:i}:"success"===t?{label:"Continue",disabled:!0}:void 0,watermark:!0}),f={component:()=>{let{data:r,setModalData:i,navigate:c}=l(),m=a(),{loginWithPasskey:y,signupWithPasskey:f,closePrivyModal:g,createAnalyticsEvent:v}=u(),{user:w,logout:j}=p(),{passkeySignupFlow:k}=r?.passkeyAuthModalData??{},S=n-500,[b,C]=t("loading"),[A,P]=t(null),E=o([]),W=e=>{E.current=[e,...E.current]};s((()=>()=>{E.current.forEach((e=>clearTimeout(e))),E.current=[]}),[]);let x=async()=>{C("loading");try{k?await f():await y(),C("success")}catch(e){P(e),C("error")}};return s((()=>{if("success"===b&&w){if(m?.legal.requireUsersAcceptTerms&&!w.hasAcceptedTerms)return void W(setTimeout((()=>{c("AffirmativeConsentScreen")}),S));if(!d(w,m?.embeddedWallets))return void W(setTimeout((()=>{g({shouldCallAuthOnSuccess:!0,isSuccess:!0})}),n));W(setTimeout((()=>{i({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),v({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"PasskeyStatusScreen"}}),j()},callAuthOnSuccessOnClose:!0}}),c("EmbeddedWalletOnAccountCreateScreen")}),S))}}),[w,b]),s((()=>{x()}),[]),/*#__PURE__*/e(h,{status:b,passkeySignupFlow:k,error:A,onRetry:x})}};let g=i.span`
|
|
2
|
+
white-space: pre-wrap;
|
|
3
|
+
`;export{f as PasskeyStatusScreen,h as PasskeyStatusScreenView,f as default};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import{jsxs as e,jsx as r}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/ShieldCheckIcon";import{useState as o,useEffect as i}from"react";import{styled as s,css as a}from"styled-components";import{u as n,a as l,h as c}from"./get-is-unified-wallet-BC-7_b8O.mjs";import{P as m}from"./ModalHeader-D0p4fONI.mjs";import{S as d}from"./Layouts-BlFm53ED.mjs";import{P as p,a as u,I as h,H as y,S as v}from"./shared-BpuV-mxk.mjs";import{n as f}from"./index-BZ6FAPh7.mjs";import{u as w,m as g}from"./internal-context-Z-fyxadS.mjs";import{S as j}from"./Screen-BVipC9vr.mjs";import"@privy-io/are-addresses-equal";import"./context-Drt9FC1y.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";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"@heroicons/react/24/outline/ArrowPathIcon";import"@heroicons/react/24/outline/EyeIcon";import"@heroicons/react/24/outline/EyeSlashIcon";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"ofetch";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"./index-Dq_xe9dz.mjs";const b={component:()=>{let[s,a]=o(!0),{authenticated:m,user:b}=n(),{walletProxy:A,closePrivyModal:I,createAnalyticsEvent:P,client:S}=w(),{navigate:W,data:T,onUserCloseViaDialogOrKeybindRef:_}=l(),[E,R]=o(void 0),[U,H]=o(""),[M,F]=o(!1),{entropyId:N,entropyIdVerifier:O,onCompleteNavigateTo:V,onSuccess:$,onFailure:z}=T.recoverWallet,L=(e="User exited before their wallet could be recovered")=>{I({shouldCallAuthOnSuccess:!1}),z("string"==typeof e?new g(e):e)};_.current=L,i((()=>{if(!m)return L("User must be authenticated and have a Privy wallet before it can be recovered")}),[m]);/*#__PURE__*/return e(j,{children:[/*#__PURE__*/r(j.Header,{icon:t,title:"Enter your password",subtitle:"Please provision your account on this new device. To continue, enter your recovery password.",showClose:!0,onClose:L}),/*#__PURE__*/r(j.Body,{children:/*#__PURE__*/r(x,{children:/*#__PURE__*/e("div",{children:[/*#__PURE__*/e(p,{children:[/*#__PURE__*/r(u,{type:s?"password":"text",onChange:e=>(e=>{e&&R(e)})(e.target.value),disabled:M,style:{paddingRight:"2.3rem"}}),/*#__PURE__*/r(h,{style:{right:"0.75rem"},children:s?/*#__PURE__*/r(y,{onClick:()=>a(!1)}):/*#__PURE__*/r(v,{onClick:()=>a(!0)})})]}),!!U&&/*#__PURE__*/r(k,{children:U})]})})}),/*#__PURE__*/e(j.Footer,{children:[/*#__PURE__*/r(j.HelpText,{children:/*#__PURE__*/e(d,{children:[/*#__PURE__*/r("h4",{children:"Why is this necessary?"}),/*#__PURE__*/r("p",{children:"You previously set a password for this wallet. This helps ensure only you can access it"})]})}),/*#__PURE__*/r(j.Actions,{children:/*#__PURE__*/r(C,{loading:M||!A,disabled:!E,onClick:async()=>{F(!0);let e=await S.getAccessToken(),r=c(b,N);if(!e||!r||null===E)return L("User must be authenticated and have a Privy wallet before it can be recovered");try{P({eventName:"embedded_wallet_recovery_started",payload:{walletAddress:r.address}}),await(A?.recover({accessToken:e,entropyId:N,entropyIdVerifier:O,recoveryPassword:E})),H(""),V?W(V):I({shouldCallAuthOnSuccess:!1}),$?.(r),P({eventName:"embedded_wallet_recovery_completed",payload:{walletAddress:r.address}})}catch(e){f(e)?H("Invalid recovery password, please try again."):H("An error has occurred, please try again.")}finally{F(!1)}},$hideAnimations:!N&&M,children:"Recover your account"})}),/*#__PURE__*/r(j.Watermark,{})]})]})}};let x=s.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: 1.5rem;
|
|
5
|
+
`,k=s.div`
|
|
6
|
+
line-height: 20px;
|
|
7
|
+
height: 20px;
|
|
8
|
+
font-size: 13px;
|
|
9
|
+
color: var(--privy-color-error);
|
|
10
|
+
text-align: left;
|
|
11
|
+
margin-top: 0.5rem;
|
|
12
|
+
`,C=s(m)`
|
|
13
|
+
${({$hideAnimations:e})=>e&&a`
|
|
14
|
+
&& {
|
|
15
|
+
// Remove animations because the recoverWallet task on the iframe partially
|
|
16
|
+
// blocks the renderer, so the animation stutters and doesn't look good
|
|
17
|
+
transition: none;
|
|
18
|
+
}
|
|
19
|
+
`}
|
|
20
|
+
`;export{b as PasswordRecoveryScreen,b as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as e,jsxs as r,Fragment as o}from"react/jsx-runtime";import t from"qrcode";import l from"react";import{styled as i}from"styled-components";import{u as c}from"./context-
|
|
1
|
+
import{jsx as e,jsxs as r,Fragment as o}from"react/jsx-runtime";import t from"qrcode";import l from"react";import{styled as i}from"styled-components";import{u as c}from"./context-Drt9FC1y.mjs";import{a2 as n,a3 as a}from"./useActiveWallet-DGV02YBT.mjs";const g=()=>/*#__PURE__*/e("svg",{width:"200",height:"200",viewBox:"-77 -77 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px"},children:/*#__PURE__*/e("rect",{width:"50",height:"50",fill:"black",rx:10,ry:10})});let h=(e,r,o,t,l)=>{for(let i=r;i<r+t;i++)for(let r=o;r<o+l;r++){let o=e?.[r];o&&o[i]&&(o[i]=0)}return e},m=(e,r)=>{let o=t.create(e,{errorCorrectionLevel:r}).modules,l=a(Array.from(o.data),o.size);return l=h(l,0,0,7,7),l=h(l,l.length-7,0,7,7),h(l,0,l.length-7,7,7)},d=({x:r,y:t,cellSize:l,bgColor:i,fgColor:c})=>
|
|
2
2
|
/*#__PURE__*/e(o,{children:[0,1,2].map((o=>/*#__PURE__*/e("circle",{r:l*(7-2*o)/2,cx:r+7*l/2,cy:t+7*l/2,fill:o%2!=0?i:c},`finder-${r}-${t}-${o}`)))}),s=({cellSize:r,matrixSize:t,bgColor:l,fgColor:i})=>/*#__PURE__*/e(o,{children:[[0,0],[(t-7)*r,0],[0,(t-7)*r]].map((([o,t])=>/*#__PURE__*/e(d,{x:o,y:t,cellSize:r,bgColor:l,fgColor:i},`finder-${o}-${t}`)))}),p=({matrix:r,cellSize:t,color:i})=>/*#__PURE__*/e(o,{children:r.map(((r,o)=>r.map(((r,c)=>r?/*#__PURE__*/e("rect",{height:t-.4,width:t-.4,x:o*t+.1*t,y:c*t+.1*t,rx:.5*t,ry:.5*t,fill:i},`cell-${o}-${c}`):/*#__PURE__*/e(l.Fragment,{},`circle-${o}-${c}`)))))}),u=({cellSize:t,matrixSize:l,element:i,sizePercentage:c,bgColor:n})=>{if(!i)/*#__PURE__*/return e(o,{});let a=l*(c||.14),g=Math.floor(l/2-a/2),h=Math.floor(l/2+a/2);(h-g)%2!=l%2&&(h+=1);let m=(h-g)*t,d=m-.2*m,s=g*t;/*#__PURE__*/return r(o,{children:[/*#__PURE__*/e("rect",{x:g*t,y:g*t,width:m,height:m,fill:n}),/*#__PURE__*/e(i,{x:s+.1*m,y:s+.1*m,height:d,width:d})]})},f=o=>{let t=o.outputSize,l=m(o.url,o.errorCorrectionLevel),i=t/l.length,c=n(2*i,{min:.025*t,max:.036*t});/*#__PURE__*/return r("svg",{height:o.outputSize,width:o.outputSize,viewBox:`0 0 ${o.outputSize} ${o.outputSize}`,style:{height:"100%",width:"100%",padding:`${c}px`},children:[/*#__PURE__*/e(p,{matrix:l,cellSize:i,color:o.fgColor}),/*#__PURE__*/e(s,{cellSize:i,matrixSize:l.length,fgColor:o.fgColor,bgColor:o.bgColor}),/*#__PURE__*/e(u,{cellSize:i,element:o.logo?.element,bgColor:o.bgColor,matrixSize:l.length})]})},x=i.div.attrs({className:"ph-no-capture"})`
|
|
3
3
|
display: flex;
|
|
4
4
|
justify-content: center;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsxs as e,Fragment as t,jsx as r}from"react/jsx-runtime";import{useState as o,useEffect as a,useCallback as i}from"react";import{M as c,P as s,B as l}from"./ModalHeader-D0p4fONI.mjs";import{C as n}from"./ScreenHeader-CHmc4-Lu.mjs";import{q as d}from"./context-Drt9FC1y.mjs";import{o as p,q as u,r as m,v,R as h,l as w}from"./index-BZ6FAPh7.mjs";import{a as y,f,b as _,u as A}from"./internal-context-Z-fyxadS.mjs";import{a as E,u as g,g as C}from"./get-is-unified-wallet-BC-7_b8O.mjs";import{a8 as b,a9 as R,aa as k}from"./paths-3HW55qZg.mjs";import{g as T}from"./useWallets-CV3WTwML.mjs";import{a as O}from"./events-context-CI0iqAXA.mjs";import{A as N,G as S,R as x}from"./styles-BsotlekN.mjs";import"styled-components";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"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"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";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"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"@privy-io/are-addresses-equal";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";async function I({url:e,popup:t,provider:r}){return t.location=e,new Promise(((e,r)=>{function o(){t?.close(),window.removeEventListener("message",a)}function a(t){t.data&&("PRIVY_OAUTH_RESPONSE"===t.data.type&&t.data.stateCode&&t.data.authorizationCode&&(e(t.data),o()),"https://cdn.apple-cloudkit.com"===t.origin&&t.data.ckSession&&(e({type:"PRIVY_OAUTH_RESPONSE",ckWebAuthToken:t.data.ckSession}),o()),"PRIVY_OAUTH_ERROR"===t.data.type&&(r(t.data.error),o()))}window.addEventListener("message",a)}))}async function j({api:e,provider:t,stateCode:r,codeVerifier:o,authorizationCode:a}){if(!a||!r)throw new y("[OAuth AuthFlow] Authorization and state codes code must be set prior to calling authenicate.");if("undefined"===a)throw new y("User denied confirmation during OAuth flow");try{return(await e.post(b,{authorization_code:a,state_code:r,code_verifier:o,provider:t})).access_token}catch(e){let t=f(e);if(t.privyErrorCode)throw new y(t.message||"Invalid code during OAuth flow.",void 0,t.privyErrorCode);if("User denied confirmation during OAuth flow"===t.message)throw new y("Invalid code during oauth flow.",void 0,_.OAUTH_USER_DENIED);throw new y("Invalid code during OAuth flow.",void 0,_.UNKNOWN_AUTH_ERROR)}}async function M({api:e,provider:t}){let r=p(),o=u(),a=await m(r);try{return"icloud"===t?{url:(await e.post(R,{client_type:"web"})).url}:{url:(await e.post(k,{redirect_to:window.location.href,code_challenge:a,state_code:o})).url,codeVerifier:r,stateCode:o,provider:t}}catch(e){throw f(e)}}let U={"google-drive":{name:"Google Drive",component:S},icloud:{name:"iCloud",component:N}};const W={component:()=>{let{logout:p}=g(),{navigate:u,setModalData:m,data:f}=E(),{closePrivyModal:b,createAnalyticsEvent:R}=A(),{execute:k}=(()=>{let{client:e,walletProxy:t,refreshSessionAndUser:r}=A(),{data:o}=E(),{user:a}=g(),i=O(),{create:c}=v();return{execute:async({provider:s,action:l,popup:n,shouldCreateEth:d,shouldCreateSol:p})=>{let u,m;if(!e)throw new y("Missing client");function v(t){if(!t&&e)throw e.createAnalyticsEvent({eventName:"recovery_oauth_error",payload:{error:"Unable to open recovery OAuth popup",provider:s}}),new y("Recovery OAuth failed")}switch(s){case"google-drive":{let t,r,{url:o,codeVerifier:a,stateCode:i}=await M({api:e.api,provider:s});v(o);try{let a=await I({url:o,popup:n,provider:s});if(t=a.stateCode,r=a.authorizationCode,t!==i)throw e.createAnalyticsEvent({eventName:"possible_phishing_attempt",payload:{provider:s,storedStateCode:i??"",returnedStateCode:t??""}}),new y("Unexpected auth flow. This may be a phishing attempt.",void 0,_.OAUTH_UNEXPECTED)}catch(t){throw e.createAnalyticsEvent({eventName:"recovery_oauth_error",payload:{error:t.toString(),provider:s}}),new y("Recovery OAuth failed")}[u,m]=await Promise.all([e.getAccessToken(),j({api:e.api,provider:s,codeVerifier:a,stateCode:t,authorizationCode:r})]);break}case"icloud":{let{url:t}=await M({api:e.api,provider:s});v(t);let{ckWebAuthToken:r}=await I({url:t,popup:n,provider:s});m=r,u=await e.getAccessToken()}}if(!t)throw new y("Cannot connect to wallet proxy");if(!u)throw new y("Unable to authorize user");switch(l){case"recover":{let r=o?.recoverWallet?.entropyId,a=o?.recoverWallet?.entropyIdVerifier;if(!r||!a)throw new y("Recovery OAuth failed");e.createAnalyticsEvent({eventName:"embedded_wallet_recovery_started",payload:{walletAddress:r,recoveryMethod:s}}),await t.recover({accessToken:u,entropyId:r,entropyIdVerifier:a,recoveryAccessToken:m}),e.createAnalyticsEvent({eventName:"embedded_wallet_recovery_completed",payload:{walletAddress:r,recoveryMethod:s}});break}case"create-wallet":{let t;if(e.createAnalyticsEvent({eventName:"embedded_wallet_creation_started"}),d&&p)t=await c({recoveryMethod:s,recoveryAccessToken:m,chainType:"ethereum",walletIndex:0,latestUser:a}),t=await c({chainType:"solana",walletIndex:0,latestUser:t.user});else if(p)t=await c({recoveryMethod:s,recoveryAccessToken:m,chainType:"solana",walletIndex:0,latestUser:a});else{if(!d)throw Error("Invalid args to create wallet");t=await c({recoveryMethod:s,recoveryAccessToken:m,chainType:"ethereum",walletIndex:0,latestUser:a})}if(!t)throw i("createWallet","onError",_.UNKNOWN_EMBEDDED_WALLET_ERROR),Error("Failed to create wallet");e.createAnalyticsEvent({eventName:"embedded_wallet_creation_completed",payload:{walletAddress:t.account.address}}),i("createWallet","onSuccess",{wallet:t.account});break}case"set-recovery":{let o=C(a);if(!o)throw i("setWalletRecovery","onError",_.EMBEDDED_WALLET_NOT_FOUND),Error("Embedded wallet not found");e.createAnalyticsEvent({eventName:"embedded_wallet_set_recovery_started",payload:{walletAddress:o.address,existingRecoveryMethod:o.recoveryMethod,targetRecoveryMethod:s}});let{entropyId:c,entropyIdVerifier:l}=T(a);await t.setRecovery({accessToken:u,entropyId:c,entropyIdVerifier:l,recoveryMethod:s,recoveryAccessToken:m});let n=C(await r());if(!n)throw i("createWallet","onError",_.UNKNOWN_EMBEDDED_WALLET_ERROR),Error("Failed to set recovery on wallet");e.createAnalyticsEvent({eventName:"embedded_wallet_set_recovery_completed",payload:{walletAddress:o.address,existingRecoveryMethod:o.recoveryMethod,targetRecoveryMethod:s}}),i("setWalletRecovery","onSuccess",{method:s,wallet:n});break}default:throw new y("Unsupported recovery action")}}}})(),[N,S]=o(!1),{provider:W,action:P,isInAccountCreateFlow:D,shouldCreateEth:V,shouldCreateSol:L}=f?.recoveryOAuthStatus,[z,H]=o(void 0),[$,B]=o("create-wallet"===P);if("user-passcode"===W)throw Error("RecoveryOAuthScreen should never be called with a wallet that specifies recoveryMethod: `user-passcode`");let F=U[W].name,q=U[W].component,G=f?.recoverWallet?.onCompleteNavigateTo,K=new h((async(e="create-wallet")=>(B(!0),new Promise(((t,r)=>{setTimeout((async()=>{try{let r=window.open();await k({provider:W,action:e,popup:r,shouldCreateEth:V,shouldCreateSol:L}),S(!0),t()}catch(t){H({message:`${"recover"===e?"Recovery":"Back up"} with ${F} unsuccessful`,detail:"recover"===P?`Please verify that you are selecting the ${F} account associated with your backup.`:"",retryable:!0}),r()}}),0)})))));a((()=>{"recover"!==P&&K.execute(D?"create-wallet":"set-recovery")}),[]),a((()=>{if(!N)return;let e=setTimeout((()=>{D?(m({createWallet:{onSuccess:()=>{},onFailure:e=>{R({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"RecoveryOAuthScreen"}}),p()},callAuthOnSuccessOnClose:!0,shouldCreateEth:!1,shouldCreateSol:!1}}),u("EmbeddedWalletCreatedScreen")):b({shouldCallAuthOnSuccess:!1})}),d);return()=>clearTimeout(e)}),[N]);let Y=i((async()=>{await K.execute("recover"),G?u(G):S(!0)}),[]),X="google-drive"===W?"Google Drive":"Apple iCloud",Q=N&&`Successfully ${"recover"===P?"recovered":"backed up"} with ${X}.`||z&&z.message||`${"recover"===P?"Recovering":"Backing up"} with ${X}...`,J=z?z.detail:"";/*#__PURE__*/return e(t,{children:[/*#__PURE__*/r(c,{}),$?/*#__PURE__*/r(t,{children:/*#__PURE__*/e(x,{children:[/*#__PURE__*/r(n,{title:Q,icon:/*#__PURE__*/r(q,{style:{width:"38px",height:"38px"}}),description:J}),z&&z?.retryable?/*#__PURE__*/r(s,{onClick:()=>{w(),H(void 0),"create-wallet"===P?K.execute("create-wallet"):Y()},disabled:!N&&!z?.retryable,children:"Try again"}):null]})}):/*#__PURE__*/e(x,{children:[/*#__PURE__*/r(n,{title:"Confirm it's really you",icon:/*#__PURE__*/r(q,{style:{height:42,width:48}}),description:`To confirm your identity, please log in to ${X} where your account is backed up.`}),/*#__PURE__*/e(s,{onClick:Y,children:["Confirm with ",X]})]}),/*#__PURE__*/r(l,{})]})}};export{W as RecoveryOAuthScreen,W as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useState as o,useEffect as t}from"react";import{u as r}from"./context-Drt9FC1y.mjs";import{v as i,R as s}from"./index-BZ6FAPh7.mjs";import{u as a,m as n}from"./internal-context-Z-fyxadS.mjs";import{a as c,u as l}from"./get-is-unified-wallet-BC-7_b8O.mjs";import{S as m,g as p}from"./SetWalletPasswordForm-A8PITZIA.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-DGV02YBT.mjs";import"zustand";import"styled-components";import"react-device-detect";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"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"@privy-io/are-addresses-equal";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"./Layouts-BlFm53ED.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"./shared-BpuV-mxk.mjs";import"@heroicons/react/24/outline/ArrowPathIcon";import"@heroicons/react/24/outline/EyeIcon";import"@heroicons/react/24/outline/EyeSlashIcon";import"./Checkbox-BhNoOKjX.mjs";import"@heroicons/react/24/outline/KeyIcon";import"@heroicons/react/24/solid/CheckCircleIcon";import"fast-password-entropy";import"secure-password-utilities";import"secure-password-utilities/wordlists";import"@heroicons/react/24/outline/ArrowDownTrayIcon";import"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import"@heroicons/react/24/outline/DocumentDuplicateIcon";import"@heroicons/react/24/solid/XCircleIcon";import"./ScreenHeader-CHmc4-Lu.mjs";const u={component:()=>{let{navigate:u,data:d,onUserCloseViaDialogOrKeybindRef:h}=c(),w=r(),[y,v]=o(""),[j,f]=o(!1),[C,g]=o(),[I,x]=o(null),{create:b}=i(),{authenticated:P,user:S}=l(),{closePrivyModal:A,isNewUserThisSession:U,initializeWalletProxy:k}=a(),{onSuccess:E,onFailure:M,callAuthOnSuccessOnClose:T,shouldCreateEth:O,shouldCreateSol:W}=d.createWallet,[D,L]=o(null),R=new s((async()=>{try{let e;if(O&&W)e=await b({recoveryMethod:"user-passcode",recoveryPassword:C,chainType:"ethereum",walletIndex:0,latestUser:S}),e=await b({chainType:"solana",walletIndex:0,latestUser:e.user});else if(W)e=await b({recoveryMethod:"user-passcode",recoveryPassword:C,chainType:"solana",walletIndex:0,latestUser:S});else{if(!O)throw Error("Invalid args to create wallet");e=await b({recoveryMethod:"user-passcode",recoveryPassword:C,chainType:"ethereum",walletIndex:0,latestUser:S})}L(e),U?u("EmbeddedWalletCreatedScreen"):(E(e),A({shouldCallAuthOnSuccess:T}))}catch(e){v(e.message)}}));t((()=>{I||k(3e4).then((e=>x(e)))}),[I]),t((()=>{if(!P||!S)return u("LandingScreen"),void M(Error("User must be authenticated before creating a Privy wallet"))}),[P]),h.current=()=>null;/*#__PURE__*/return e(m,{config:{initiatedBy:"automatic"},appName:w?.name||"privy",loading:!I,buttonLoading:j,buttonHideAnimations:!D&&j,isResettingPassword:!1,error:y,password:C||"",onClose:()=>{D&&"user-passcode"!==D.account.recoveryMethod?(M(new n("User created a wallet but failed to set a password for it")),A({shouldCallAuthOnSuccess:!1})):D?(E(D),A({shouldCallAuthOnSuccess:T})):(M(new n("User wallet creation failed")),A({shouldCallAuthOnSuccess:!1}))},onPasswordChange:g,onPasswordGenerate:()=>g(p()),onSubmit:async()=>(f(!0),R.execute().then((()=>new Promise((e=>setTimeout(e,250))))).finally((()=>f(!1))))})}};export{u as EmbeddedWalletPasswordCreateScreen,u as default};
|
package/dist/esm/{RecoverySelectionScreen-CJG-J3Aj.mjs → RecoverySelectionScreen-DCrjjtfj.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{jsxs as e,jsx as o,Fragment as r}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/LockClosedIcon";import i from"@heroicons/react/24/outline/PencilSquareIcon";import s from"@heroicons/react/24/outline/QuestionMarkCircleIcon";import{useState as c}from"react";import{styled as n}from"styled-components";import{a
|
|
1
|
+
import{jsxs as e,jsx as o,Fragment as r}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/LockClosedIcon";import i from"@heroicons/react/24/outline/PencilSquareIcon";import s from"@heroicons/react/24/outline/QuestionMarkCircleIcon";import{useState as c}from"react";import{styled as n}from"styled-components";import{a,u as l,g as p}from"./get-is-unified-wallet-BC-7_b8O.mjs";import{M as d,B as u,P as m}from"./ModalHeader-D0p4fONI.mjs";import{C as h}from"./ScreenHeader-CHmc4-Lu.mjs";import{u as y}from"./context-Drt9FC1y.mjs";import{u as v}from"./internal-context-Z-fyxadS.mjs";import{w as g}from"./index-BZ6FAPh7.mjs";import{R as f,A as w,G as C,a as j}from"./styles-BsotlekN.mjs";import{U as k}from"./useActiveWallet-DGV02YBT.mjs";import"@privy-io/are-addresses-equal";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/XMarkIcon";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"uuid";import"jose";import"eventemitter3";import"./useWallets-CV3WTwML.mjs";import"./use-export-wallet-BlKa-i97.mjs";import"viem/utils";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"react-device-detect";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-pdKy_IjS.mjs";import"./events-context-CI0iqAXA.mjs";import"@scure/base";import"zustand";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"viem";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./getPublicClient-B4uPLKn-.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";let S=n.div`
|
|
2
2
|
width: 24px;
|
|
3
3
|
height: 24px;
|
|
4
4
|
display: flex;
|
|
5
5
|
justify-content: center;
|
|
6
6
|
align-items: center;
|
|
7
|
-
`,x={"google-drive":"Google Drive",icloud:"iCloud","user-passcode":"password",privy:"Privy","privy-v2":"Privy"},A=({onClose:t})=>/*#__PURE__*/e(j,{children:[/*#__PURE__*/o(h,{title:"Why do I need to secure my account?",icon:/*#__PURE__*/o(s,{width:48}),description:/*#__PURE__*/e(r,{children:[/*#__PURE__*/o("p",{children:"Your app uses cryptography to secure your account. App secrets are split and encrypted so only you can access them."}),/*#__PURE__*/o("p",{children:"To use this app on new devices, secure account secrets using a password, your Google or your Apple account. It’s important you don’t lose access to the method you choose."})]})}),/*#__PURE__*/o(m,{onClick:t,children:"Select backup method"})]});const
|
|
7
|
+
`,x={"google-drive":"Google Drive",icloud:"iCloud","user-passcode":"password",privy:"Privy","privy-v2":"Privy"},A=({onClose:t})=>/*#__PURE__*/e(j,{children:[/*#__PURE__*/o(h,{title:"Why do I need to secure my account?",icon:/*#__PURE__*/o(s,{width:48}),description:/*#__PURE__*/e(r,{children:[/*#__PURE__*/o("p",{children:"Your app uses cryptography to secure your account. App secrets are split and encrypted so only you can access them."}),/*#__PURE__*/o("p",{children:"To use this app on new devices, secure account secrets using a password, your Google or your Apple account. It’s important you don’t lose access to the method you choose."})]})}),/*#__PURE__*/o(m,{onClick:t,children:"Select backup method"})]});const P={component:()=>{let[s,n]=c(!1),{navigate:m,lastScreen:j,navigateBack:P,setModalData:b,data:I,onUserCloseViaDialogOrKeybindRef:M}=a(),{user:O}=l(),{embeddedWallets:W}=y(),{closePrivyModal:R}=v(),F=p(O),B=null===F,{isInAccountCreateFlow:D,isResettingPassword:E,shouldCreateEth:G,shouldCreateSol:U}=I.recoverySelection,q=F&&"privy"!==F.recoveryMethod,H=q?/*#__PURE__*/e("span",{children:["Your account is currently secured using"," ",/*#__PURE__*/o("strong",{children:x[F?.recoveryMethod||"user-passcode"]}),"."]}):"Select a method for logging in on new devices and recovering your account.";function L(e){b({recoveryOAuthStatus:{provider:e,action:B?"create-wallet":"set-recovery",isInAccountCreateFlow:D,shouldCreateEth:G,shouldCreateSol:U}}),m("RecoveryOAuthScreen")}function Y(){I?.setWalletPassword?.onFailure(Error("User exited set recovery flow")),R({shouldCallAuthOnSuccess:I?.setWalletPassword?.callAuthOnSuccessOnClose??!1})}return M.current=Y,/*#__PURE__*/e(r,{children:[/*#__PURE__*/o(d,{onClose:Y,backFn:s?()=>n(!1):j?P:void 0,infoFn:j||s?void 0:()=>n(!0)},"header"),s?/*#__PURE__*/o(A,{onClose:()=>n(!1)}):/*#__PURE__*/e(r,{children:[/*#__PURE__*/o(h,{title:q?"Update backup method":"Secure your account",icon:/*#__PURE__*/o(t,{width:48}),description:H}),/*#__PURE__*/o(f,{children:W.userOwnedRecoveryOptions.filter((e=>!["icloud","google-drive"].includes(F?.recoveryMethod||"")||e!==F?.recoveryMethod)).sort().map((r=>{switch(r){case"google-drive":/*#__PURE__*/return e(k,{onClick:()=>L("google-drive"),children:[/*#__PURE__*/o(S,{children:/*#__PURE__*/o(C,{style:{width:18}})}),"Back up to Google Drive"]},r);case"icloud":/*#__PURE__*/return e(k,{onClick:()=>L("icloud"),children:[/*#__PURE__*/o(S,{children:/*#__PURE__*/o(w,{style:{width:24}})}),"Back up to Apple iCloud"]},r);case"user-passcode":/*#__PURE__*/return e(k,{onClick:()=>{m(g({isCreatingWallet:B,skipSplashScreen:!0}))},children:[/*#__PURE__*/o(S,{children:/*#__PURE__*/o(i,{style:{width:18}})}),E?"Reset your":"Set a"," password"]},r);default:return null}}))})]}),/*#__PURE__*/o(u,{})]})}};export{P as RecoverySelectionScreen,P as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as e,jsxs as r}from"react/jsx-runtime";import i from"react";import{styled as o}from"styled-components";import{a4 as n}from"./useActiveWallet-
|
|
1
|
+
import{jsx as e,jsxs as r}from"react/jsx-runtime";import i from"react";import{styled as o}from"styled-components";import{a4 as n}from"./useActiveWallet-DGV02YBT.mjs";import{M as t,B as a}from"./ModalHeader-D0p4fONI.mjs";import{N as l}from"./index-Dq_xe9dz.mjs";const c=o.div`
|
|
2
2
|
/* spacing tokens */
|
|
3
3
|
--screen-space: 16px; /* base 1x = 16 */
|
|
4
4
|
--screen-space-lg: calc(var(--screen-space) * 1.5); /* 24px */
|
|
@@ -51,11 +51,12 @@ import{jsx as e,jsxs as r}from"react/jsx-runtime";import i from"react";import{st
|
|
|
51
51
|
100% 32px,
|
|
52
52
|
100% 16px;
|
|
53
53
|
background-attachment: local, scroll;
|
|
54
|
-
`,
|
|
54
|
+
`,h=o.div`
|
|
55
55
|
display: flex;
|
|
56
56
|
flex-direction: column;
|
|
57
57
|
gap: var(--screen-space-lg);
|
|
58
|
-
|
|
58
|
+
margin-top: 1.5rem;
|
|
59
|
+
`;let v=o.div`
|
|
59
60
|
text-align: center;
|
|
60
61
|
display: flex;
|
|
61
62
|
flex-direction: column;
|
|
@@ -122,7 +123,7 @@ import{jsx as e,jsxs as r}from"react/jsx-runtime";import i from"react";import{st
|
|
|
122
123
|
top: 50%;
|
|
123
124
|
transform: translate(-50%, -50%);
|
|
124
125
|
}
|
|
125
|
-
`;const w=({children:r,...i})=>/*#__PURE__*/e(
|
|
126
|
+
`;const w=({children:r,...i})=>/*#__PURE__*/e(c,{children:/*#__PURE__*/e(d,{...i,children:r})});let k=o.div`
|
|
126
127
|
position: absolute;
|
|
127
128
|
top: 0;
|
|
128
129
|
left: calc(-1 * var(--screen-space-lg));
|
|
@@ -144,29 +145,38 @@ import{jsx as e,jsxs as r}from"react/jsx-runtime";import i from"react";import{st
|
|
|
144
145
|
background: var(--privy-color-foreground-3);
|
|
145
146
|
border-radius: 2px;
|
|
146
147
|
transition: width 300ms ease-in-out;
|
|
147
|
-
`,F=({step:r})=>r?/*#__PURE__*/e(k,{children:/*#__PURE__*/e(j,{pct:Math.min(100,r.current/r.total*100)})}):null;w.Header=({title:i,subtitle:o,icon:n,iconVariant:t,iconLoadingStatus:a,showBack:
|
|
148
|
+
`,F=({step:r})=>r?/*#__PURE__*/e(k,{children:/*#__PURE__*/e(j,{pct:Math.min(100,r.current/r.total*100)})}):null;w.Header=({title:i,subtitle:o,icon:n,iconVariant:t,iconLoadingStatus:a,showBack:l,onBack:c,showInfo:d,onInfo:g,showClose:h,onClose:x,step:b,headerTitle:y,...k})=>/*#__PURE__*/r(s,{...k,children:[/*#__PURE__*/e(p,{backFn:l?c:void 0,infoFn:d?g:void 0,onClose:h?x:void 0,title:y,closeable:h}),(n||t||i||o)&&/*#__PURE__*/r(v,{children:[n||t?/*#__PURE__*/e(w.Icon,{icon:n,variant:t,loadingStatus:a}):null,!(!i&&!o)&&/*#__PURE__*/r(u,{children:[i&&/*#__PURE__*/e(f,{children:i}),o&&/*#__PURE__*/e(m,{children:o})]})]}),b&&/*#__PURE__*/e(F,{step:b})]}),(w.Body=/*#__PURE__*/i.forwardRef((({children:r,...i},o)=>/*#__PURE__*/e(g,{ref:o,...i,children:r})))).displayName="Screen.Body",w.Footer=({children:r,...i})=>/*#__PURE__*/e(h,{id:"privy-content-footer-container",...i,children:r}),w.Actions=({children:r,...i})=>/*#__PURE__*/e($,{...i,children:r}),w.HelpText=({children:r,...i})=>/*#__PURE__*/e(z,{...i,children:r}),w.FooterText=({children:r,...i})=>/*#__PURE__*/e(S,{...i,children:r}),w.Watermark=()=>/*#__PURE__*/e(E,{}),w.Icon=({icon:o,variant:t="subtle",loadingStatus:a})=>"logo"===t&&o?/*#__PURE__*/e(b,"string"==typeof o?{children:/*#__PURE__*/e("img",{src:o,alt:""})}:/*#__PURE__*/i.isValidElement(o)?{children:o}:{children:/*#__PURE__*/i.createElement(o)}):"loading"===t?o?
|
|
148
149
|
/*#__PURE__*/e(y,{children:/*#__PURE__*/r("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:[/*#__PURE__*/e(n,{success:a?.success,fail:a?.fail}),"string"==typeof o?
|
|
149
150
|
/*#__PURE__*/e("span",{style:{background:`url('${o}') 0 0 / contain`,height:"38px",width:"38px",borderRadius:"6px",margin:"auto",backgroundSize:"contain"}}):/*#__PURE__*/i.isValidElement(o)?
|
|
150
151
|
/*#__PURE__*/i.cloneElement(o,{style:{width:"38px",height:"38px"}}):
|
|
151
152
|
/*#__PURE__*/i.createElement(o,{style:{width:"38px",height:"38px"}})]})}):
|
|
152
|
-
/*#__PURE__*/e(x,{$variant:t,children:/*#__PURE__*/e(
|
|
153
|
+
/*#__PURE__*/e(x,{$variant:t,children:/*#__PURE__*/e(l,{size:"64px"})}):/*#__PURE__*/e(x,{$variant:t,children:o&&("string"==typeof o?
|
|
153
154
|
/*#__PURE__*/e("img",{src:o,alt:"",style:{width:"32px",height:"32px",borderRadius:"6px"}}):/*#__PURE__*/i.isValidElement(o)?o:
|
|
154
155
|
/*#__PURE__*/i.createElement(o,{width:32,height:32,stroke:(()=>{switch(t){case"success":return"var(--privy-color-icon-success)";case"warning":return"var(--privy-color-icon-warning)";case"error":return"var(--privy-color-icon-error)";default:return"var(--privy-color-icon-muted)"}})(),strokeWidth:2}))});let $=o.div`
|
|
155
156
|
width: 100%;
|
|
156
157
|
display: flex;
|
|
157
158
|
flex-direction: column;
|
|
158
159
|
gap: calc(var(--screen-space) / 2);
|
|
159
|
-
`,
|
|
160
|
+
`,z=o.div`
|
|
160
161
|
&& {
|
|
161
162
|
margin: 0;
|
|
162
163
|
width: 100%;
|
|
163
164
|
text-align: center;
|
|
164
|
-
color: var(--privy-color-foreground-
|
|
165
|
-
font-size:
|
|
166
|
-
line-height:
|
|
165
|
+
color: var(--privy-color-foreground-2);
|
|
166
|
+
font-size: 13px;
|
|
167
|
+
line-height: 20px;
|
|
167
168
|
|
|
168
169
|
& a {
|
|
169
|
-
|
|
170
|
+
text-decoration: underline;
|
|
170
171
|
}
|
|
171
172
|
}
|
|
173
|
+
`,S=o.div`
|
|
174
|
+
&& {
|
|
175
|
+
margin-top: -1rem;
|
|
176
|
+
width: 100%;
|
|
177
|
+
text-align: center;
|
|
178
|
+
color: var(--privy-color-foreground-2);
|
|
179
|
+
font-size: 0.6875rem; // 11px
|
|
180
|
+
line-height: 1rem; // 16px
|
|
181
|
+
}
|
|
172
182
|
`;export{w as S};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsxs as e,Fragment as r,jsx as l}from"react/jsx-runtime";import{a as t}from"./ModalHeader-D0p4fONI.mjs";import{S as a}from"./Screen-BVipC9vr.mjs";const n=({primaryCta:n,secondaryCta:i,helpText:d,footerText:o,watermark:c=!0,children:s,...m})=>{let h=n||i?/*#__PURE__*/e(r,{children:[n&&(()=>{let{label:e,...r}=n,a=r.variant||"primary";/*#__PURE__*/return l(t,{...r,variant:a,style:{width:"100%",...r.style},children:e})})(),i&&(()=>{let{label:e,...r}=i,a=r.variant||"secondary";/*#__PURE__*/return l(t,{...r,variant:a,style:{width:"100%",...r.style},children:e})})()]}):null;/*#__PURE__*/return e(a,{id:m.id,className:m.className,children:[/*#__PURE__*/l(a.Header,{...m}),s?/*#__PURE__*/l(a.Body,{children:s}):null,d||h||c?/*#__PURE__*/e(a.Footer,{children:[d?/*#__PURE__*/l(a.HelpText,{children:d}):null,h?/*#__PURE__*/l(a.Actions,{children:h}):null,c?/*#__PURE__*/l(a.Watermark,{}):null]}):null,o?/*#__PURE__*/l(a.FooterText,{children:o}):null]})};export{n as S};
|
package/dist/esm/{SetAutomaticRecoveryScreen-CXNCqRU4.mjs → SetAutomaticRecoveryScreen-BfeoWlEq.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as e,Fragment as r,jsx as o}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/ExclamationTriangleIcon";import i from"@heroicons/react/24/outline/LockClosedIcon";import{useState as n}from"react";import{u as l,a,h as s}from"./get-is-unified-wallet-
|
|
1
|
+
import{jsxs as e,Fragment as r,jsx as o}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/ExclamationTriangleIcon";import i from"@heroicons/react/24/outline/LockClosedIcon";import{useState as n}from"react";import{u as l,a,h as s}from"./get-is-unified-wallet-BC-7_b8O.mjs";import{M as c,c as m,B as d}from"./ModalHeader-D0p4fONI.mjs";import{styled as p}from"styled-components";import{S as u}from"./Subtitle-CV-2yKE4.mjs";import{T as y}from"./Title-BnzYV3Is.mjs";import{q as h}from"./context-Drt9FC1y.mjs";import{u as f}from"./internal-context-Z-fyxadS.mjs";import{Y as v}from"./useActiveWallet-DGV02YBT.mjs";import"@privy-io/are-addresses-equal";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"zustand";import"react-device-detect";import"./use-export-wallet-BlKa-i97.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-CV3WTwML.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";const g=p.div`
|
|
2
2
|
&& {
|
|
3
3
|
border-width: 4px;
|
|
4
4
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import{jsxs as e,Fragment as r,jsx as o}from"react/jsx-runtime";import{useState as n,useEffect as i,useMemo as t,useCallback as a,useReducer as l}from"react";import{q as c}from"./context-
|
|
2
|
-
/*#__PURE__*/o($,{"aria-hidden":!v||
|
|
1
|
+
import{jsxs as e,Fragment as r,jsx as o}from"react/jsx-runtime";import{useState as n,useEffect as i,useMemo as t,useCallback as a,useReducer as l}from"react";import{q as c}from"./context-Drt9FC1y.mjs";import{a as s}from"./get-is-unified-wallet-BC-7_b8O.mjs";import d from"@heroicons/react/24/outline/ExclamationTriangleIcon";import{b as h,R as u,c as p}from"./Layouts-BlFm53ED.mjs";import{M as m,B as g,S as y,P as v}from"./ModalHeader-D0p4fONI.mjs";import{E as f,b as w,P as b,a as k,I as C,H as S,S as x,c as $,N as B,D as R,d as P,R as j,e as A,f as I,g as L}from"./shared-BpuV-mxk.mjs";import{styled as E}from"styled-components";import{C as U}from"./Checkbox-BhNoOKjX.mjs";import z from"@heroicons/react/24/outline/KeyIcon";import D from"@heroicons/react/24/solid/CheckCircleIcon";import H from"fast-password-entropy";import*as T from"secure-password-utilities";import{DEFAULT_WORDLIST as F}from"secure-password-utilities/wordlists";import M from"@heroicons/react/24/outline/ArrowDownTrayIcon";import K from"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import O from"@heroicons/react/24/outline/DocumentDuplicateIcon";import N from"@heroicons/react/24/solid/XCircleIcon";import{C as W}from"./ScreenHeader-CHmc4-Lu.mjs";const Y=({buttonHideAnimations:t,buttonLoading:a,password:l,onSubmit:c,onBack:s})=>{let[p,y]=n(!0),[v,R]=n(!1),[P,j]=n(""),A=l===P;return i((()=>{P&&!v&&R(!0)}),[P]),/*#__PURE__*/e(r,{children:[/*#__PURE__*/o(m,{closeable:!1,backFn:s}),/*#__PURE__*/o(h,{}),/*#__PURE__*/e(f,{children:[/*#__PURE__*/e(w,{children:[/*#__PURE__*/o(d,{height:48,width:48,stroke:"var(--privy-color-background)",fill:"var(--privy-color-accent)"}),/*#__PURE__*/o("h3",{style:{color:"var(--privy-color-foreground)"},children:"Confirm your password"}),/*#__PURE__*/o("p",{style:{color:"var(--privy-color-foreground-2)"},children:"Please re-enter your password below to continue."})]}),/*#__PURE__*/e(b,{children:[/*#__PURE__*/o(k,{value:P,onChange:e=>j(e.target.value),onKeyUp:e=>{"Enter"===e.key&&c()},onBlur:()=>R(!0),placeholder:"confirm your password",type:p?"password":"text",style:{paddingRight:"2.3rem"}}),/*#__PURE__*/o(C,{style:{right:"0.75rem"},children:p?/*#__PURE__*/o(S,{onClick:()=>y(!1)}):/*#__PURE__*/o(x,{onClick:()=>y(!0)})})]}),
|
|
2
|
+
/*#__PURE__*/o($,{"aria-hidden":!v||A,error:!0,children:"Passwords do not match"})]}),/*#__PURE__*/o(B,{onClick:c,loading:a,disabled:!A,$hideAnimations:t,children:"Continue"}),/*#__PURE__*/o(u,{}),/*#__PURE__*/o(g,{})]})},Z=({buttonHideAnimations:i,buttonLoading:t,onSubmit:a,onBack:l,config:c})=>{let[s,p]=n(!1);/*#__PURE__*/return e(r,{children:[/*#__PURE__*/o(m,{closeable:!1,backFn:l}),/*#__PURE__*/o(h,{}),/*#__PURE__*/e(f,{children:[/*#__PURE__*/e(w,{children:[/*#__PURE__*/o(d,{height:48,width:48,stroke:"var(--privy-color-background)",fill:"var(--privy-color-error)"}),/*#__PURE__*/o("h3",{style:{color:"var(--privy-color-foreground)"},children:"Confirm you have saved"}),/*#__PURE__*/o("p",{style:{color:"var(--privy-color-foreground-2)"},children:"Losing access to your password means you will lose access to your account."})]}),/*#__PURE__*/o(R,{children:/*#__PURE__*/e(P,{style:{color:"var(--privy-color-error)",cursor:"pointer"},onClick:e=>{e.preventDefault(),p((e=>!e))},children:[/*#__PURE__*/o(U,{color:"var(--privy-color-error)",readOnly:!0,checked:s}),/*#__PURE__*/o(r,{children:"I understand that if I lose my password and device, I will lose access to my account and my assets."})]})})]}),/*#__PURE__*/e(_,{children:["user"===c.initiatedBy&&/*#__PURE__*/o(y,{onClick:c.onCancel,disabled:t,children:"Cancel"}),/*#__PURE__*/o(B,{onClick:a,loading:t,$hideAnimations:i,disabled:!s,children:"Set Password"})]}),/*#__PURE__*/o(u,{}),/*#__PURE__*/o(g,{})]})};let _=E.div`
|
|
3
3
|
display: flex;
|
|
4
4
|
gap: 10px;
|
|
5
|
-
`,q=/[a-z]/,G=/[A-Z]/,X=/[0-9]/,J="!@#$%^&*()\\-_+.",Q=`a-zA-Z0-9${J}`,V=RegExp(`[${J}]`),ee=RegExp(`[${Q}]`);const re=RegExp(`^[${Q}]{6,}$`),oe=()=>
|
|
5
|
+
`,q=/[a-z]/,G=/[A-Z]/,X=/[0-9]/,J="!@#$%^&*()\\-_+.",Q=`a-zA-Z0-9${J}`,V=RegExp(`[${J}]`),ee=RegExp(`[${Q}]`);const re=RegExp(`^[${Q}]{6,}$`),oe=()=>T.generatePassphrase(4,F);function ne(e){return e>.9?"Strong":e>.5?"Medium":"Weak"}function ie(e=""){return(.3*function(e){if(e.length<8)return 0;let r=0;return q.test(e)&&(r+=1),G.test(e)&&(r+=1),X.test(e)&&(r+=1),V.test(e)&&(r+=1),Math.max(0,Math.min(1,r/3))}(e)+H(e)/95)/2}const te=({buttonHideAnimations:a,buttonLoading:l,password:c="",config:s,isResettingPassword:d,onSubmit:p,onClose:y,onBack:v,onPasswordChange:I,onPasswordGenerate:L})=>{let[E,U]=n(!1),[H,T]=n(!1);i((()=>{c&&!H&&T(!0)}),[c]);let F=t((()=>H?6>(c?.length||0)?"Password must be at least 6 characters":re.test(c||"")?null:`Invalid characters used ( ${((e="")=>[...new Set(e.split("").filter((e=>!ee.test(e))).map((e=>e.replace(" ","SPACE"))))])(c).join(" ")} )`:null),[c,H]),M=t((()=>F?{value:0,label:"Weak"}:function(e=""){let r=ie(e);return{value:r,label:ne(r)}}(c)),[c,F]),K=t((()=>!c?.length||!!F),[F,c]);/*#__PURE__*/return e(r,{children:[/*#__PURE__*/o(m,{onClose:y,closeable:"user"===s.initiatedBy,backFn:v}),/*#__PURE__*/o(h,{}),/*#__PURE__*/e(f,{children:[/*#__PURE__*/e(w,{children:[/*#__PURE__*/o(z,{height:48,width:48,stroke:"var(--privy-color-accent)"}),/*#__PURE__*/e("h3",{style:{color:"var(--privy-color-foreground)"},children:[d?"Reset":"Set"," your password"]}),/*#__PURE__*/o("p",{style:{color:"var(--privy-color-foreground-2)"},children:"Select a strong, memorable password to secure your account."})]}),/*#__PURE__*/e(b,{children:[/*#__PURE__*/o(k,{value:c,onChange:e=>I(e.target.value),onKeyUp:e=>{"Enter"===e.key&&p()},placeholder:"enter or generate a strong password",type:E?"password":"text",style:{paddingRight:"3.8rem"}}),/*#__PURE__*/e(C,{style:{width:"3.5rem"},children:[E?/*#__PURE__*/o(S,{onClick:()=>U(!1)}):/*#__PURE__*/o(x,{onClick:()=>U(!0)}),/*#__PURE__*/o(j,{onClick:L})]})]}),/*#__PURE__*/o(A,{value:0===M.value?.01:M.value,label:M.label}),/*#__PURE__*/o($,{error:!!F,children:F||`Password Strength: ${H?M.label:"--"}`}),/*#__PURE__*/e(le,{children:[/*#__PURE__*/o(ae,{children:/*#__PURE__*/e(R,{children:[/*#__PURE__*/e(P,{children:[/*#__PURE__*/o(D,{width:24,height:24,fill:"var(--privy-color-accent)"}),"This password is used to secure your account."]}),/*#__PURE__*/e(P,{children:[/*#__PURE__*/o(D,{width:24,height:24,fill:"var(--privy-color-accent)"}),"Use it to log in on a new environment, like another browser or device."]})]})}),/*#__PURE__*/o(B,{onClick:p,loading:l,disabled:K,$hideAnimations:a,children:"Continue"})]})]}),/*#__PURE__*/o(u,{}),/*#__PURE__*/o(g,{})]})};let ae=E(R)`
|
|
6
6
|
flex: 1;
|
|
7
7
|
padding-top: 1rem;
|
|
8
8
|
`,le=E.div`
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
height: 100%;
|
|
12
|
-
`;const ce=({buttonHideAnimations:i,buttonLoading:t,appName:l,password:c,onSubmit:s,onBack:p})=>{let[y,v]=n(!1),[k,$]=n(!0),R=a((()=>{v(!0),c&&navigator.clipboard.writeText(c)}),[c]),P=a((()=>{let e=document.createElement("a"),r=l.toLowerCase().replace(/[^a-z\s]/g,"").replace(/\s/g,"-"),o=new Blob([se(l,c)],{type:"text/plain"}),n=URL.createObjectURL(o);e.href=n,e.target="_blank",e.download=`${r}-privy-wallet-recovery.txt`,document.body.appendChild(e),e.click(),setTimeout((()=>{e.remove(),URL.revokeObjectURL(n)}),5e3)}),[c]);/*#__PURE__*/return e(r,{children:[/*#__PURE__*/o(m,{backFn:p,closeable:!1}),/*#__PURE__*/o(h,{}),/*#__PURE__*/e(f,{children:[/*#__PURE__*/e(w,{children:[/*#__PURE__*/o(d,{height:48,width:48,stroke:"var(--privy-color-background)",fill:"var(--privy-color-accent)"}),/*#__PURE__*/o("h3",{style:{color:"var(--privy-color-foreground)"},children:"Save your password"}),/*#__PURE__*/o("p",{style:{color:"var(--privy-color-foreground-2)"},children:"For your security, this password cannot be reset, so keep it somewhere safe."})]}),/*#__PURE__*/e(b,{centered:!0,children:[/*#__PURE__*/o(
|
|
12
|
+
`;const ce=({buttonHideAnimations:i,buttonLoading:t,appName:l,password:c,onSubmit:s,onBack:p})=>{let[y,v]=n(!1),[k,$]=n(!0),R=a((()=>{v(!0),c&&navigator.clipboard.writeText(c)}),[c]),P=a((()=>{let e=document.createElement("a"),r=l.toLowerCase().replace(/[^a-z\s]/g,"").replace(/\s/g,"-"),o=new Blob([se(l,c)],{type:"text/plain"}),n=URL.createObjectURL(o);e.href=n,e.target="_blank",e.download=`${r}-privy-wallet-recovery.txt`,document.body.appendChild(e),e.click(),setTimeout((()=>{e.remove(),URL.revokeObjectURL(n)}),5e3)}),[c]);/*#__PURE__*/return e(r,{children:[/*#__PURE__*/o(m,{backFn:p,closeable:!1}),/*#__PURE__*/o(h,{}),/*#__PURE__*/e(f,{children:[/*#__PURE__*/e(w,{children:[/*#__PURE__*/o(d,{height:48,width:48,stroke:"var(--privy-color-background)",fill:"var(--privy-color-accent)"}),/*#__PURE__*/o("h3",{style:{color:"var(--privy-color-foreground)"},children:"Save your password"}),/*#__PURE__*/o("p",{style:{color:"var(--privy-color-foreground-2)"},children:"For your security, this password cannot be reset, so keep it somewhere safe."})]}),/*#__PURE__*/e(b,{centered:!0,children:[/*#__PURE__*/o(I,{children:k?"•".repeat(c.length):c}),/*#__PURE__*/o(C,{style:{right:"0.75rem"},children:k?/*#__PURE__*/o(S,{onClick:()=>$(!1)}):/*#__PURE__*/o(x,{onClick:()=>$(!0)})})]}),/*#__PURE__*/e("div",{style:{display:"flex",margin:"12px 0",gap:"12px"},children:[/*#__PURE__*/o(L,{onClick:R,children:/*#__PURE__*/e(r,y?{children:[/*#__PURE__*/o(K,{style:{width:24,height:24},stroke:"var(--privy-color-accent)"}),"Copied"]}:{children:[/*#__PURE__*/o(O,{style:{width:24,height:24},stroke:"var(--privy-color-accent)"}),"Copy"]})}),/*#__PURE__*/e(L,{onClick:P,children:[/*#__PURE__*/o(M,{style:{width:24,height:24},stroke:"var(--privy-color-accent)"}),"Download"]})]})]}),/*#__PURE__*/o(B,{onClick:s,loading:t,$hideAnimations:i,children:"Continue"}),/*#__PURE__*/o(u,{}),/*#__PURE__*/o(g,{})]})};let se=(e,r)=>`Your wallet recovery password for ${e} is\n\n${r}\n\nYou will need this password to access your ${e} wallet on a new device. Please keep it somewhere safe.`;const de=({error:n,onClose:i})=>/*#__PURE__*/e(r,{children:[/*#__PURE__*/o(m,{closeable:!1}),/*#__PURE__*/o(h,{}),/*#__PURE__*/e(p,n?{children:[/*#__PURE__*/o(N,{fill:"var(--privy-color-error)",width:"64px",height:"64px"}),/*#__PURE__*/o(W,{title:"Something went wrong",description:n})]}:{children:[/*#__PURE__*/o(D,{fill:"var(--privy-color-success)",width:"64px",height:"64px"}),/*#__PURE__*/o(W,{title:"Success"})]}),/*#__PURE__*/o(v,{onClick:i,children:"Close"}),/*#__PURE__*/o(u,{}),/*#__PURE__*/o(g,{})]});let he=(e,r)=>{switch(e){case"creating":return"back"===r?e:"saving";case"saving":return"back"===r?"creating":"confirming";case"confirming":return"back"===r?"saving":"finalizing";case"finalizing":return"back"===r?"confirming":"done";default:return e}};const ue=({onSubmit:e,...r})=>{let{lastScreen:n,navigate:t}=s(),{send:d,state:h}=(()=>{let[e,r]=l(he,"creating");return{send:r,state:e}})(),u=a((async()=>{"finalizing"===h&&await e(),d("next")}),[h,d,e]);i((()=>{let e;return"done"===h&&"automatic"===r.config.initiatedBy&&(e=setTimeout((()=>r.onClose?.()),c)),()=>{e&&clearTimeout(e)}}),[h,r.config.initiatedBy,r.onClose]);let p=a((()=>{d("back")}),[d]),m=a((()=>{t("RecoverySelectionScreen")}),[n,t]);return"creating"===h?/*#__PURE__*/o(te,{...r,onSubmit:u,onBack:"RecoverySelectionScreen"===n?m:void 0}):"saving"===h?/*#__PURE__*/o(ce,{...r,onSubmit:u,onBack:p}):"confirming"===h?/*#__PURE__*/o(Y,{...r,onSubmit:u,onBack:p}):"finalizing"===h?/*#__PURE__*/o(Z,{...r,onSubmit:u,onBack:p}):"done"===h?/*#__PURE__*/o(de,{...r,onSubmit:u}):null};export{ue as S,oe as g};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as o}from"react/jsx-runtime";import{base64 as r}from"@scure/base";import{Edit as i}from"lucide-react";import{useState as n,useEffect as a}from"react";import{styled as s}from"styled-components";import{isHex as l,hexToString as c}from"viem";import{ProviderErrors as m}from"@privy-io/js-sdk-core";import{C as p}from"./CopyToClipboard-
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as o}from"react/jsx-runtime";import{base64 as r}from"@scure/base";import{Edit as i}from"lucide-react";import{useState as n,useEffect as a}from"react";import{styled as s}from"styled-components";import{isHex as l,hexToString as c}from"viem";import{ProviderErrors as m}from"@privy-io/js-sdk-core";import{C as p}from"./CopyToClipboard-DSTf_eKU.mjs";import{a as d}from"./Layouts-BlFm53ED.mjs";import{M as u,D as g}from"./JsonTree-aPaJmPx7.mjs";import{P as h,j as y}from"./use-export-wallet-BlKa-i97.mjs";import{W as f,q as x}from"./context-Drt9FC1y.mjs";import{u as C}from"./internal-context-Z-fyxadS.mjs";import{u as j,a as w}from"./get-is-unified-wallet-BC-7_b8O.mjs";import{S as b}from"./ScreenLayout-jvcCZKF1.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-CV3WTwML.mjs";import"tinycolor2";import"ofetch";import"@privy-io/are-addresses-equal";import"./ModalHeader-D0p4fONI.mjs";import"./useActiveWallet-DGV02YBT.mjs";import"zustand";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";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 v=s.img`
|
|
2
2
|
&& {
|
|
3
3
|
height: ${e=>"sm"===e.size?"65px":"140px"};
|
|
4
4
|
width: ${e=>"sm"===e.size?"65px":"140px"};
|
|
5
5
|
border-radius: 16px;
|
|
6
6
|
margin-bottom: 12px;
|
|
7
7
|
}
|
|
8
|
-
`;let
|
|
8
|
+
`;let T=e=>{if(!l(e))return e;try{let t=c(e);return t.includes("�")?e:t}catch{return e}},S=e=>{try{let t=r.decode(e),o=(new TextDecoder).decode(t);return o.includes("�")?e:o}catch{return e}},E=r=>{let{types:i,primaryType:n,...a}=r.typedData;/*#__PURE__*/return t(o,{children:[/*#__PURE__*/e(A,{data:a}),/*#__PURE__*/e(p,{text:(s=r.typedData,JSON.stringify(s,null,2)),itemName:"full payload to clipboard"})," "]});var s};const L=({method:o,messageData:r,copy:n,iconUrl:a,isLoading:s,success:l,walletProxyIsLoading:c,errorMessage:m,isCancellable:p,onSign:u,onCancel:g,onClose:h})=>/*#__PURE__*/e(b,{title:n.title,subtitle:n.description,showClose:!0,onClose:h,icon:i,iconVariant:"subtle",helpText:m?/*#__PURE__*/e(D,{children:m}):void 0,primaryCta:{label:n.buttonText,onClick:u,disabled:s||l||c,loading:s},secondaryCta:p?{label:"Not now",onClick:g,disabled:s||l||c}:void 0,watermark:!0,children:/*#__PURE__*/t(d,{children:[a?/*#__PURE__*/e(v,{style:{alignSelf:"center"},size:"sm",src:a,alt:"app image"}):null,/*#__PURE__*/t(_,{children:["personal_sign"===o&&/*#__PURE__*/e(U,{children:T(r)}),"eth_signTypedData_v4"===o&&/*#__PURE__*/e(E,{typedData:r}),"solana_signMessage"===o&&/*#__PURE__*/e(U,{children:S(r)})]})]})}),R={component:()=>{let{authenticated:t}=j(),{initializeWalletProxy:o,closePrivyModal:r}=C(),{navigate:i,data:s,onUserCloseViaDialogOrKeybindRef:l}=w(),[c,p]=n(!0),[d,u]=n(""),[g,b]=n(),[v,T]=n(null),[S,E]=n(!1);a((()=>{t||i("LandingScreen")}),[t]),a((()=>{o(f).then((e=>{p(!1),e||(u("An error has occurred, please try again."),b(new h(new y(d,m.E32603_DEFAULT_INTERNAL_ERROR.eipCode))))}))}),[]);let{method:R,data:_,confirmAndSign:D,onSuccess:A,onFailure:U,uiOptions:M}=s.signMessage,I={title:M?.title||"Sign message",description:M?.description||"Signing this message will not cost you any fees.",buttonText:M?.buttonText||"Sign and continue"},k=e=>{e?A(e):U(g||new h(new y("The user rejected the request.",m.E4001_USER_REJECTED_REQUEST.eipCode))),r({shouldCallAuthOnSuccess:!1}),setTimeout((()=>{T(null),u(""),b(void 0)}),200)};l.current=()=>{k(v)};/*#__PURE__*/return e(L,{method:R,messageData:_,copy:I,iconUrl:M?.iconUrl&&"string"==typeof M.iconUrl?M.iconUrl:void 0,isLoading:S,success:null!==v,walletProxyIsLoading:c,errorMessage:d,isCancellable:M?.isCancellable,onSign:async()=>{E(!0),u("");try{let e=await D();T(e),E(!1),setTimeout((()=>{k(e)}),x)}catch(e){console.error(e),u("An error has occurred, please try again."),b(new h(new y(d,m.E32603_DEFAULT_INTERNAL_ERROR.eipCode))),E(!1)}},onCancel:()=>k(null),onClose:()=>k(v)})}};let _=s.div`
|
|
9
9
|
flex: 1;
|
|
10
10
|
display: flex;
|
|
11
11
|
flex-direction: column;
|
|
12
12
|
gap: 16px;
|
|
13
|
-
`,
|
|
13
|
+
`,D=s.p`
|
|
14
14
|
&& {
|
|
15
15
|
margin: 0;
|
|
16
16
|
width: 100%;
|
|
@@ -23,4 +23,4 @@ import{jsx as e,jsxs as t,Fragment as o}from"react/jsx-runtime";import{base64 as
|
|
|
23
23
|
margin-top: 0;
|
|
24
24
|
`,U=s(u)`
|
|
25
25
|
margin-top: 0;
|
|
26
|
-
`;export{R as SignRequestScreen,
|
|
26
|
+
`;export{R as SignRequestScreen,L as SignRequestView,R as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as t,jsx as n,Fragment as e}from"react/jsx-runtime";import{useState as a,useMemo as r,useEffect as o}from"react";import{formatTokenAmount as i}from"@privy-io/js-sdk-core";import{a as s,u as c,k as l,g as d}from"./get-is-unified-wallet-
|
|
1
|
+
import{jsxs as t,jsx as n,Fragment as e}from"react/jsx-runtime";import{useState as a,useMemo as r,useEffect as o}from"react";import{formatTokenAmount as i}from"@privy-io/js-sdk-core";import{a as s,u as c,k as l,g as d}from"./get-is-unified-wallet-BC-7_b8O.mjs";import{u}from"./context-Drt9FC1y.mjs";import{u as m}from"./internal-context-Z-fyxadS.mjs";import{u as p}from"./useGetSolPrice-DwwjjGbd.mjs";import{ErrorScreenView as f}from"./ErrorScreen-CfvFq4SG.mjs";import g from"@heroicons/react/24/outline/CheckCircleIcon";import{styled as h}from"styled-components";import{M as y,B as w,P as k}from"./ModalHeader-D0p4fONI.mjs";import{R as b}from"./Layouts-BlFm53ED.mjs";import{C as v}from"./ScreenHeader-CHmc4-Lu.mjs";import{a as A,R as I}from"./Row-C9vrS4Zi.mjs";import{L as S,V as j}from"./Value-tcJV9e0L.mjs";import{S as C,W as T}from"./WalletLink-DlGvmqW7.mjs";import{e as O}from"./StackedContainer-B2vaEl56.mjs";import{Y as x}from"./useActiveWallet-DGV02YBT.mjs";import{T as $,a as L}from"./TransactionErrorView-UHPbTcc8.mjs";import{g as E}from"./transaction-CnfuREWo.mjs";import{pipe as P,getCompiledTransactionMessageDecoder as _,decompileTransactionMessage as F,setTransactionMessageLifetimeUsingBlockhash as W,compileTransaction as B,getTransactionEncoder as J,getBase58Decoder as R,fetchAddressesForLookupTables as q}from"@solana/kit";import{a as D,f as M,s as U,b as H,u as V}from"./useSolanaRpcClient-DlKLUp1h.mjs";import{D as z,T as G,a as X,S as Y,A as K,R as N,J as Q,g as Z}from"./getFormattedUsdFromLamports-B6EqSEho.mjs";import"@privy-io/are-addresses-equal";import"tinycolor2";import"ofetch";import"lucide-react";import"./index-BZ6FAPh7.mjs";import"uuid";import"jose";import"eventemitter3";import"./useWallets-CV3WTwML.mjs";import"./use-export-wallet-BlKa-i97.mjs";import"viem/utils";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"react-device-detect";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-pdKy_IjS.mjs";import"./events-context-CI0iqAXA.mjs";import"@scure/base";import"zustand";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"viem";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./getPublicClient-B4uPLKn-.mjs";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./reservoir-0wfhnc0j.mjs";import"./ScreenLayout-jvcCZKF1.mjs";import"./Screen-BVipC9vr.mjs";import"./index-Dq_xe9dz.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./LoadingSkeleton-U6-3yFwI.mjs";import"./ethers-UlIaNUWW.mjs";import"@heroicons/react/24/outline";import"./ErrorMessage-D8VaAP5m.mjs";import"./LabelXs-oqZNqbm_.mjs";import"./Subtitle-CV-2yKE4.mjs";import"./Title-BnzYV3Is.mjs";import"./Address-BUuQgiKx.mjs";import"./WalletInfoCard-B-r0es4h.mjs";import"./shared-FM0rljBt.mjs";import"./Checkbox-BhNoOKjX.mjs";import"./ErrorBanner-CQERa7bL.mjs";import"@heroicons/react/24/outline/ExclamationCircleIcon";import"./WarningBanner-c8L53pJ2.mjs";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import"@heroicons/react/24/outline/ClipboardDocumentIcon";const tt=h.span`
|
|
2
2
|
&& {
|
|
3
3
|
width: 82px;
|
|
4
4
|
height: 82px;
|
|
@@ -17,4 +17,4 @@ import{jsxs as t,jsx as n,Fragment as e}from"react/jsx-runtime";import{useState
|
|
|
17
17
|
transition:
|
|
18
18
|
color 350ms ease,
|
|
19
19
|
background-color 350ms ease;
|
|
20
|
-
`;async function rt(t,n){try{return await t}catch{return n}}function ot(t){switch(t){case"solana:mainnet":return"mainnet-beta";case"solana:devnet":return"devnet";case"solana:testnet":return"testnet"}}async function it({privyClient:t,chain:n,mint:e}){let a=z[n];if(!a[e]){let r=await t.getSplTokenMetadata({mintAddress:e,cluster:ot(n)});r&&(a[e]={address:e,symbol:r.symbol,decimals:r.decimals})}return a[e]}async function st({tx:t,solanaClient:n,privyClient:e,checkFunds:a}){let r=_().decode(R(t)),o=r.staticAccounts[0]??"",i=await q({solanaClient:n,tx:t}),s=a?await rt(U({solanaClient:n,tx:t})):void 0,c=s?.hasFunds??!0,l={},d=[],u=await async function({solanaClient:t,message:n}){if(!("addressTableLookups"in n)||!n.addressTableLookups)return[...n.staticAccounts];let e=n.addressTableLookups.map((t=>t.lookupTableAddress)),a=await M(e,t.rpc),r=e.map(((t,e)=>[...n.addressTableLookups[e]?.writableIndexes.map((n=>{let r=a[t]?.[n];if(r)return{key:r,isWritable:!0,altIdx:e}}))??[],...n.addressTableLookups[e]?.readonlyIndexes.map((n=>{let r=a[t]?.[n];if(r)return{key:r,isWritable:!1,altIdx:e}}))??[]])).flat().filter((t=>!!t)).sort(((t,n)=>t.isWritable!==n.isWritable?t.isWritable?-1:1:t.altIdx-n.altIdx)).map((({key:t})=>t));return[...n.staticAccounts,...r]}({solanaClient:n,message:r});for(let t of r.instructions){let a=r.staticAccounts[t.programAddressIndex]||"";if(a!==G&&a!==K)if(a!==Q){if(a===X){let n=await rt(function(t,n,e){let[a,r,o,i]=t.accountIndices?.map((t=>n[t]))??[];return{type:"ata-creation",program:e,payer:a,ata:r,owner:o,mint:i}}(t,u,a));if(!n){d.push({type:"unknown",program:a,discriminator:t.data?.[0]});continue}if(d.push(n),n.ata&&n.owner&&n.mint){l[n.ata]={owner:n.owner,mint:n.mint};continue}}if(Y.includes(a)){let r=await rt(ut(t,u,n,e,a));if(!r){d.push({type:"unknown",program:a,discriminator:t.data?.[0]});continue}d.push(r)}else if(N.includes(a)){let r=await rt(mt(t,u,n,e,a));if(!r){d.push({type:"unknown",program:a,discriminator:t.data?.[0]});continue}d.push(r)}else d.push({type:"unknown",program:a,discriminator:t.data?.[0]})}else{let n=await rt(dt(t,u));if(!n){d.push({type:"unknown",program:a,discriminator:t.data?.[0]});continue}d.push(n)}else{let r=await rt(lt(t,u,n,e,l,a));if(!r){d.push({type:"unknown",program:a,discriminator:t.data?.[0]});continue}d.push(r),"spl-transfer"===r.type&&(r.fromAta&&r.fromAccount&&r.token.address&&(l[r.fromAta]??={owner:r.fromAccount,mint:r.token.address}),r.toAta&&r.toAccount&&r.token.address&&(l[r.toAta]??={owner:r.toAccount,mint:r.token.address}))}}return{spender:o,fee:i,instructions:d,hasFunds:!!c}}function ct(t,n=0){try{return function(t,n=0){let e=0n;for(let a=0;a<8;a++)e|=BigInt(t[n+a])<<BigInt(8*a);return e}(t,n)}catch{}try{return t.readBigInt64LE(n)}catch{}let e=V(t);try{return((t,n=0)=>{let e=t[n],a=t[n+7];if(!e||!a)throw Error(`Buffer offset out of range: first: ${e}, last: ${a}.`);return(BigInt(t[n+4]+256*t[n+5]+65536*t[n+6]+(a<<24))<<32n)+BigInt(e+256*t[++n]+65536*t[++n]+16777216*t[++n])})(e)}catch{}try{return e.subarray(n).readBigInt64LE()}catch{}try{return e.readBigInt64LE(n)}catch{}return 0n}async function lt(t,n,e,a,r,o){let i=t.data?.[0],s=t.accountIndices?.map((t=>n[t]))??[];if(1===i){let[t,n,e]=s;return{type:"spl-init-account",program:o,account:t,mint:n,owner:e}}if(3===i){let n,i,[c,l,d]=s,u="",m=l?r[l]:void 0;if(m)n=m.owner,u=m.mint;else if(l){let t=await e.rpc.getAccountInfo(l,{commitment:"confirmed",encoding:"jsonParsed"}).send(),a=t.value?.data;n=a?.parsed?.info?.owner,u=a?.parsed?.info?.mint??"",i=a?.parsed?.info?.tokenAmount?.decimals}if(!u&&c){let t=await e.rpc.getAccountInfo(c,{commitment:"confirmed",encoding:"jsonParsed"}).send(),n=t.value?.data;u=n?.parsed?.info?.mint??""}let p=await it({privyClient:a,chain:e.chain,mint:u}),f=p?.symbol??"";return i??=p?.decimals??9,{type:"spl-transfer",program:o,fromAta:c,fromAccount:d,toAta:l,toAccount:n,value:ct(t.data,1),token:{symbol:f,decimals:i,address:u}}}if(9===i){let[t,n,e]=s;return{type:"spl-close-account",program:o,source:t,destination:n,owner:e}}if(17===i)return{type:"spl-sync-native",program:o};throw Error(`Token program instruction type ${i} not supported`)}async function dt(t,n){let e=t.data?.[0],a=t.accountIndices?.map((t=>n[t]))??[];if(0===e){let[,n]=a;return{type:"create-account",program:Q,account:n?.toString(),value:ct(t.data,4),withSeed:!1}}if(2===e){let[n,e]=a;return{type:"sol-transfer",program:Q,fromAccount:n,toAccount:e,token:{symbol:"SOL",decimals:9},value:ct(t.data,4),withSeed:!1}}if(3===e){let[,n]=a;return{type:"create-account",program:Q,account:n,withSeed:!0,value:ct(t.data.slice(t.data.length-32-8-8))}}if(11===e){let[n,e]=a;return{type:"sol-transfer",program:Q,fromAccount:n,toAccount:e,value:ct(t.data,4),token:{symbol:"SOL",decimals:9},withSeed:!0}}throw Error(`System program instruction type ${e} not supported`)}async function ut(t,n,e,a,r){let o=t.accountIndices?.map((t=>n[t]))??[],i=t.data?.[0];if(143===i){let n=o[10],i=o[11];return{type:"raydium-swap-base-input",program:r,mintIn:n,mintOut:i,tokenIn:n?await it({privyClient:a,chain:e.chain,mint:n}):void 0,tokenOut:i?await it({privyClient:a,chain:e.chain,mint:i}):void 0,amountIn:ct(t.data,8),minimumAmountOut:ct(t.data,16)}}if(55===i){let n=o[10],i=o[11];return{type:"raydium-swap-base-output",program:r,mintIn:n,mintOut:i,tokenIn:n?await it({privyClient:a,chain:e.chain,mint:n}):void 0,tokenOut:i?await it({privyClient:a,chain:e.chain,mint:i}):void 0,maxAmountIn:ct(t.data,8),amountOut:ct(t.data,16)}}throw Error(`Raydium swap program instruction type ${i} not supported`)}async function mt(t,n,e,a,r){let o=t.data?.[0],i=t.accountIndices?.map((t=>n[t]))??[];if([208,51,239,151,123,43,237,92].includes(o)){let n=i[5],o=i[6];return{type:"jupiter-swap-exact-out-route",program:r,mintIn:n,mintOut:o,tokenIn:n?await it({privyClient:a,chain:e.chain,mint:n}):void 0,tokenOut:o?await it({privyClient:a,chain:e.chain,mint:o}):void 0,outAmount:ct(t.data,t.data.length-1-2-8-8),quotedInAmount:ct(t.data,t.data.length-1-2-8)}}if([176,209,105,168,154,125,69,62].includes(o)){let n=i[7],o=i[8];return{type:"jupiter-swap-exact-out-route",program:r,mintIn:n,mintOut:o,tokenIn:n?await it({privyClient:a,chain:e.chain,mint:n}):void 0,tokenOut:o?await it({privyClient:a,chain:e.chain,mint:o}):void 0,outAmount:ct(t.data,t.data.length-1-2-8-8),quotedInAmount:ct(t.data,t.data.length-1-2-8)}}if([193,32,155,51,65,214,156,129].includes(o)){let n=i[7],o=i[8];return{type:"jupiter-swap-shared-accounts-route",program:r,mintIn:n,mintOut:o,tokenIn:n?await it({privyClient:a,chain:e.chain,mint:n}):void 0,tokenOut:o?await it({privyClient:a,chain:e.chain,mint:o}):void 0,inAmount:ct(t.data,t.data.length-1-2-8-8),quotedOutAmount:ct(t.data,t.data.length-1-2-8)}}throw[62,198,214,193,213,159,108,210].includes(o)&&console.warn("Jupiter swap program instruction 'claim' not implemented"),[116,206,27,191,166,19,0,73].includes(o)&&console.warn("Jupiter swap program instruction 'claim_token' not implemented"),[26,74,236,151,104,64,183,249].includes(o)&&console.warn("Jupiter swap program instruction 'close_token' not implemented"),[229,194,212,172,8,10,134,147].includes(o)&&console.warn("Jupiter swap program instruction 'create_open_orders' not implemented"),[28,226,32,148,188,136,113,171].includes(o)&&console.warn("Jupiter swap program instruction 'create_program_open_orders' not implemented"),[232,242,197,253,240,143,129,52].includes(o)&&console.warn("Jupiter swap program instruction 'create_token_ledger' not implemented"),[147,241,123,100,244,132,174,118].includes(o)&&console.warn("Jupiter swap program instruction 'create_token_account' not implemented"),[229,23,203,151,122,227,173,42].includes(o)&&console.warn("Jupiter swap program instruction 'route' not implemented"),[150,86,71,116,167,93,14,104].includes(o)&&console.warn("Jupiter swap program instruction 'route_with_token_ledger' not implemented"),[228,85,185,112,78,79,77,2].includes(o)&&console.warn("Jupiter swap program instruction 'set_token_ledger' not implemented"),[230,121,143,80,119,159,106,170].includes(o)&&console.warn("Jupiter swap program instruction 'shared_accounts_route_with_token_ledger' not implemented"),Error(`Jupiter swap program instruction type ${o} not supported`)}const pt={component:()=>{let{data:t,onUserCloseViaDialogOrKeybindRef:e,setModalData:g,navigate:h}=s(),{client:y,closePrivyModal:w,walletProxy:k,showFiatPrices:b}=m(),v=u(),{user:A}=c(),I=H()(t?.standardSignAndSendTransaction?.chain??"solana:mainnet"),[S,j]=a(t?.standardSignAndSendTransaction?.transaction),[C,T]=a(),[O,x]=a(),[M,q]=a({value:0n,isLoading:!1}),[U,V]=a(!1),[z,G]=a({}),[K,Q]=a(),X=t?.standardSignAndSendTransaction?.account,Y=!!t?.standardSignAndSendTransaction?.signOnly,N=X?.imported?l(A).find((t=>t.address===X.address)):d(A),{solPrice:tt,isSolPriceLoading:nt}=p({enabled:b}),at=r((()=>{if(!C)return;let t=C.spender,n=E(C.fee),e=E(M.value,3,!0),a=C.instructions.filter((t=>["sol-transfer","spl-transfer","raydium-swap-base-input","raydium-swap-base-output","jupiter-swap-shared-accounts-route","jupiter-swap-exact-out-route"].includes(t.type))),r=a.at(0);if(!r||a.length>1)return{fee:n,spender:t,balance:e};if("sol-transfer"===r.type)return{fee:n,spender:t,balance:e,total:E(r.value)};if("spl-transfer"===r.type)return{fee:n,spender:t,balance:e,total:`${i({amount:r.value,decimals:r.token.decimals})} ${r.token.symbol}`};if("raydium-swap-base-input"===r.type&&r.tokenIn&&r.tokenOut){return{fee:n,spender:t,balance:e,swap:`${`${i({amount:r.amountIn,decimals:r.tokenIn.decimals})} ${r.tokenIn.symbol}`} → ${`${i({amount:r.minimumAmountOut,decimals:r.tokenOut.decimals})} ${r.tokenOut.symbol}`}`}}if("raydium-swap-base-output"===r.type&&r.tokenIn&&r.tokenOut){return{fee:n,spender:t,balance:e,swap:`${`${i({amount:r.maxAmountIn,decimals:r.tokenIn.decimals})} ${r.tokenIn.symbol}`} → ${`${i({amount:r.amountOut,decimals:r.tokenOut.decimals})} ${r.tokenOut.symbol}`}`}}if("jupiter-swap-shared-accounts-route"===r.type&&r.tokenIn&&r.tokenOut){return{fee:n,spender:t,balance:e,swap:`${`${i({amount:r.inAmount,decimals:r.tokenIn.decimals})} ${r.tokenIn.symbol}`} → ${`${i({amount:r.quotedOutAmount,decimals:r.tokenOut.decimals})} ${r.tokenOut.symbol}`}`}}if("jupiter-swap-exact-out-route"===r.type&&r.tokenIn&&r.tokenOut){return{fee:n,spender:t,balance:e,swap:`${`${i({amount:r.quotedInAmount,decimals:r.tokenIn.decimals})} ${r.tokenIn.symbol}`} → ${`${i({amount:r.outAmount,decimals:r.tokenOut.decimals})} ${r.tokenOut.symbol}`}`}}return{fee:n,spender:t,balance:e}}),[C,X?.address,M]),rt=r((()=>{let t;if(!C||!b||!tt||nt)return;function n(...t){return Z(t.reduce(((t,n)=>t+n),0n),tt??0)}X?.address===C.spender&&(t=n(C.fee));let e=n(M.value),a=C.instructions.filter((t=>"sol-transfer"===t.type||"spl-transfer"===t.type)).at(0);return!a||C.instructions.length>1?{fee:t,balance:e}:"sol-transfer"===a.type?{fee:t,balance:e,total:n(a.value,X?.address===C.spender?C.fee:0n)}:"spl-transfer"===a.type?{fee:t,balance:e,total:`${i({amount:a.value,decimals:a.token.decimals})} ${a.token.symbol}`}:{fee:t,balance:e}}),[C,b,tt,nt,X?.address,M]);if(o((()=>{!async function(){if(S&&y)try{x(void 0);let t=await st({tx:S,solanaClient:I,privyClient:y,checkFunds:!Y});T(t)}catch(t){console.error("Failed to prepare transaction",t),x(t)}}()}),[S,I,y,Y]),o((()=>{(async function(){if(!X)return;q({value:M.value,isLoading:!0});let{value:t}=await I.rpc.getBalance(X.address,{commitment:"confirmed"}).send();q({value:t??0n,isLoading:!1})})().catch(console.error)}),[C]),!S||!t?.standardSignAndSendTransaction||!X){let e=Error("Invalid transaction request");/*#__PURE__*/return n(f,{error:e,allowlistConfig:v.allowlistConfig,onRetry:()=>{t?.standardSignAndSendTransaction?.onFailure(e),w({shouldCallAuthOnSuccess:!1})}})}let ot=()=>{if(!U)return z.signature||z.signedTransaction?t?.standardSignAndSendTransaction?.onSuccess({signature:z.signature,signedTransaction:z.signedTransaction}):t?.standardSignAndSendTransaction?.onFailure(K??O??Error("User exited the modal before submitting the transaction")),w({shouldCallAuthOnSuccess:!1})};e.current=ot;let it=t.standardSignAndSendTransaction?.uiOptions?.transactionInfo?.contractInfo?.imgUrl?/*#__PURE__*/n("img",{src:t.standardSignAndSendTransaction.uiOptions.transactionInfo.contractInfo.imgUrl,alt:t.standardSignAndSendTransaction.uiOptions.transactionInfo.contractInfo.imgAltText}):null,ct=!!(t.funding&&t.funding.supportedOptions.length>0),lt=!C?.hasFunds&&ct;if(z.signature||z.signedTransaction){let e=C?.instructions.filter((t=>"sol-transfer"===t.type||"spl-transfer"===t.type)),a=1===e?.length?e?.at(0):void 0;/*#__PURE__*/return n(et,{fees:z.fees??0n,onClose:ot,transactionInfo:t.standardSignAndSendTransaction?.uiOptions.transactionInfo,solPrice:tt,receiptHeader:t.standardSignAndSendTransaction?.uiOptions.successHeader,receiptDescription:t.standardSignAndSendTransaction?.uiOptions.successDescription,chain:I.chain,signOnly:Y,instruction:"sol-transfer"===a?.type?{to:a.toAccount,amount:a.value}:{to:a?.toAccount||a?.toAta,total:at?.total}})}return K?/*#__PURE__*/n($,{transactionError:K,chainId:I.chain,onClose:ot,chainType:"solana",onRetry:async()=>{Q(void 0);let{value:t}=await I.rpc.getLatestBlockhash().send();var n,e;j((n=S,e=t,P(_().decode(R(n)),(t=>F(t)),(t=>B(e,t)),(t=>W(t)),(t=>new Uint8Array(J().encode(t))))))}}):/*#__PURE__*/n(L,{img:it,title:t.standardSignAndSendTransaction?.uiOptions?.transactionInfo?.title||"Confirm transaction",subtitle:t.standardSignAndSendTransaction?.uiOptions?.description||`${v.name} wants your permission to approve the following transaction.`,cta:lt?"Add funds":t.standardSignAndSendTransaction?.uiOptions?.buttonText||"Approve",instructions:C?.instructions??[],network:"solana:mainnet"==I.chain?"Solana":I.chain.replace("solana:",""),blockExplorerUrl:I.blockExplorerUrl,total:b?rt?.total:at?.total,fee:b?rt?.fee:at?.fee,balance:b?rt?.balance:at?.balance,swap:at?.swap,transactingWalletAddress:X.address,disabled:!C?.hasFunds&&!ct,isSubmitting:U,isPreparing:!C||M.isLoading,isTokenPriceLoading:b&&nt,isMissingFunds:!C?.hasFunds,submitError:K??void 0,isSponsored:!!t.standardSignAndSendTransaction?.isSponsored,parseError:O,onClick:lt?async()=>{if(!X)return;if(!ct)throw Error("Funding wallet is not enabled");let n="FundingMethodSelectionScreen";g({...t,funding:{...t.funding,methodScreen:n},solanaFundingData:t?.solanaFundingData}),h(n)}:async()=>{try{if(V(!0),U||!X||!k||!A||!N)return;let n=await t.standardSignAndSendTransaction.onConfirm(S);if("signature"in n){let t=await async function({solanaClient:t,signature:n}){let e=D().decode(n),a=await t.rpc.getTransaction(e,{maxSupportedTransactionVersion:0,commitment:"confirmed",encoding:"base64"}).send().catch((()=>null));return a?{fee:a.meta?.fee??0n}:null}({solanaClient:I,signature:n.signature});return void G({...n,fees:t?.fee})}G(n)}catch(t){console.warn({transaction:S,error:t}),Q(t)}finally{V(!1)}},onClose:ot})}};export{pt as StandardSignAndSendTransactionScreen,pt as default};
|
|
20
|
+
`;async function rt(t,n){try{return await t}catch{return n}}function ot(t){switch(t){case"solana:mainnet":return"mainnet-beta";case"solana:devnet":return"devnet";case"solana:testnet":return"testnet"}}async function it({privyClient:t,chain:n,mint:e}){let a=z[n];if(!a[e]){let r=await t.getSplTokenMetadata({mintAddress:e,cluster:ot(n)});r&&(a[e]={address:e,symbol:r.symbol,decimals:r.decimals})}return a[e]}async function st({tx:t,solanaClient:n,privyClient:e,checkFunds:a}){let r=_().decode(D(t)),o=r.staticAccounts[0]??"",i=await M({solanaClient:n,tx:t}),s=a?await rt(U({solanaClient:n,tx:t})):void 0,c=s?.hasFunds??!0,l={},d=[],u=await async function({solanaClient:t,message:n}){if(!("addressTableLookups"in n)||!n.addressTableLookups)return[...n.staticAccounts];let e=n.addressTableLookups.map((t=>t.lookupTableAddress)),a=await q(e,t.rpc),r=e.map(((t,e)=>[...n.addressTableLookups[e]?.writableIndexes.map((n=>{let r=a[t]?.[n];if(r)return{key:r,isWritable:!0,altIdx:e}}))??[],...n.addressTableLookups[e]?.readonlyIndexes.map((n=>{let r=a[t]?.[n];if(r)return{key:r,isWritable:!1,altIdx:e}}))??[]])).flat().filter((t=>!!t)).sort(((t,n)=>t.isWritable!==n.isWritable?t.isWritable?-1:1:t.altIdx-n.altIdx)).map((({key:t})=>t));return[...n.staticAccounts,...r]}({solanaClient:n,message:r});for(let t of r.instructions){let a=r.staticAccounts[t.programAddressIndex]||"";if(a!==G&&a!==X)if(a!==Y){if(a===K){let n=await rt(function(t,n,e){let[a,r,o,i]=t.accountIndices?.map((t=>n[t]))??[];return{type:"ata-creation",program:e,payer:a,ata:r,owner:o,mint:i}}(t,u,a));if(!n){d.push({type:"unknown",program:a,discriminator:t.data?.[0]});continue}if(d.push(n),n.ata&&n.owner&&n.mint){l[n.ata]={owner:n.owner,mint:n.mint};continue}}if(N.includes(a)){let r=await rt(ut(t,u,n,e,a));if(!r){d.push({type:"unknown",program:a,discriminator:t.data?.[0]});continue}d.push(r)}else if(Q.includes(a)){let r=await rt(mt(t,u,n,e,a));if(!r){d.push({type:"unknown",program:a,discriminator:t.data?.[0]});continue}d.push(r)}else d.push({type:"unknown",program:a,discriminator:t.data?.[0]})}else{let n=await rt(dt(t,u));if(!n){d.push({type:"unknown",program:a,discriminator:t.data?.[0]});continue}d.push(n)}else{let r=await rt(lt(t,u,n,e,l,a));if(!r){d.push({type:"unknown",program:a,discriminator:t.data?.[0]});continue}d.push(r),"spl-transfer"===r.type&&(r.fromAta&&r.fromAccount&&r.token.address&&(l[r.fromAta]??={owner:r.fromAccount,mint:r.token.address}),r.toAta&&r.toAccount&&r.token.address&&(l[r.toAta]??={owner:r.toAccount,mint:r.token.address}))}}return{spender:o,fee:i,instructions:d,hasFunds:!!c}}function ct(t,n=0){try{return function(t,n=0){let e=0n;for(let a=0;a<8;a++)e|=BigInt(t[n+a])<<BigInt(8*a);return e}(t,n)}catch{}try{return t.readBigInt64LE(n)}catch{}let e=H(t);try{return((t,n=0)=>{let e=t[n],a=t[n+7];if(!e||!a)throw Error(`Buffer offset out of range: first: ${e}, last: ${a}.`);return(BigInt(t[n+4]+256*t[n+5]+65536*t[n+6]+(a<<24))<<32n)+BigInt(e+256*t[++n]+65536*t[++n]+16777216*t[++n])})(e)}catch{}try{return e.subarray(n).readBigInt64LE()}catch{}try{return e.readBigInt64LE(n)}catch{}return 0n}async function lt(t,n,e,a,r,o){let i=t.data?.[0],s=t.accountIndices?.map((t=>n[t]))??[];if(1===i){let[t,n,e]=s;return{type:"spl-init-account",program:o,account:t,mint:n,owner:e}}if(3===i){let n,i,[c,l,d]=s,u="",m=l?r[l]:void 0;if(m)n=m.owner,u=m.mint;else if(l){let t=await e.rpc.getAccountInfo(l,{commitment:"confirmed",encoding:"jsonParsed"}).send(),a=t.value?.data;n=a?.parsed?.info?.owner,u=a?.parsed?.info?.mint??"",i=a?.parsed?.info?.tokenAmount?.decimals}if(!u&&c){let t=await e.rpc.getAccountInfo(c,{commitment:"confirmed",encoding:"jsonParsed"}).send(),n=t.value?.data;u=n?.parsed?.info?.mint??""}let p=await it({privyClient:a,chain:e.chain,mint:u}),f=p?.symbol??"";return i??=p?.decimals??9,{type:"spl-transfer",program:o,fromAta:c,fromAccount:d,toAta:l,toAccount:n,value:ct(t.data,1),token:{symbol:f,decimals:i,address:u}}}if(9===i){let[t,n,e]=s;return{type:"spl-close-account",program:o,source:t,destination:n,owner:e}}if(17===i)return{type:"spl-sync-native",program:o};throw Error(`Token program instruction type ${i} not supported`)}async function dt(t,n){let e=t.data?.[0],a=t.accountIndices?.map((t=>n[t]))??[];if(0===e){let[,n]=a;return{type:"create-account",program:Y,account:n?.toString(),value:ct(t.data,4),withSeed:!1}}if(2===e){let[n,e]=a;return{type:"sol-transfer",program:Y,fromAccount:n,toAccount:e,token:{symbol:"SOL",decimals:9},value:ct(t.data,4),withSeed:!1}}if(3===e){let[,n]=a;return{type:"create-account",program:Y,account:n,withSeed:!0,value:ct(t.data.slice(t.data.length-32-8-8))}}if(11===e){let[n,e]=a;return{type:"sol-transfer",program:Y,fromAccount:n,toAccount:e,value:ct(t.data,4),token:{symbol:"SOL",decimals:9},withSeed:!0}}throw Error(`System program instruction type ${e} not supported`)}async function ut(t,n,e,a,r){let o=t.accountIndices?.map((t=>n[t]))??[],i=t.data?.[0];if(143===i){let n=o[10],i=o[11];return{type:"raydium-swap-base-input",program:r,mintIn:n,mintOut:i,tokenIn:n?await it({privyClient:a,chain:e.chain,mint:n}):void 0,tokenOut:i?await it({privyClient:a,chain:e.chain,mint:i}):void 0,amountIn:ct(t.data,8),minimumAmountOut:ct(t.data,16)}}if(55===i){let n=o[10],i=o[11];return{type:"raydium-swap-base-output",program:r,mintIn:n,mintOut:i,tokenIn:n?await it({privyClient:a,chain:e.chain,mint:n}):void 0,tokenOut:i?await it({privyClient:a,chain:e.chain,mint:i}):void 0,maxAmountIn:ct(t.data,8),amountOut:ct(t.data,16)}}throw Error(`Raydium swap program instruction type ${i} not supported`)}async function mt(t,n,e,a,r){let o=t.data?.[0],i=t.accountIndices?.map((t=>n[t]))??[];if([208,51,239,151,123,43,237,92].includes(o)){let n=i[5],o=i[6];return{type:"jupiter-swap-exact-out-route",program:r,mintIn:n,mintOut:o,tokenIn:n?await it({privyClient:a,chain:e.chain,mint:n}):void 0,tokenOut:o?await it({privyClient:a,chain:e.chain,mint:o}):void 0,outAmount:ct(t.data,t.data.length-1-2-8-8),quotedInAmount:ct(t.data,t.data.length-1-2-8)}}if([176,209,105,168,154,125,69,62].includes(o)){let n=i[7],o=i[8];return{type:"jupiter-swap-exact-out-route",program:r,mintIn:n,mintOut:o,tokenIn:n?await it({privyClient:a,chain:e.chain,mint:n}):void 0,tokenOut:o?await it({privyClient:a,chain:e.chain,mint:o}):void 0,outAmount:ct(t.data,t.data.length-1-2-8-8),quotedInAmount:ct(t.data,t.data.length-1-2-8)}}if([193,32,155,51,65,214,156,129].includes(o)){let n=i[7],o=i[8];return{type:"jupiter-swap-shared-accounts-route",program:r,mintIn:n,mintOut:o,tokenIn:n?await it({privyClient:a,chain:e.chain,mint:n}):void 0,tokenOut:o?await it({privyClient:a,chain:e.chain,mint:o}):void 0,inAmount:ct(t.data,t.data.length-1-2-8-8),quotedOutAmount:ct(t.data,t.data.length-1-2-8)}}throw[62,198,214,193,213,159,108,210].includes(o)&&console.warn("Jupiter swap program instruction 'claim' not implemented"),[116,206,27,191,166,19,0,73].includes(o)&&console.warn("Jupiter swap program instruction 'claim_token' not implemented"),[26,74,236,151,104,64,183,249].includes(o)&&console.warn("Jupiter swap program instruction 'close_token' not implemented"),[229,194,212,172,8,10,134,147].includes(o)&&console.warn("Jupiter swap program instruction 'create_open_orders' not implemented"),[28,226,32,148,188,136,113,171].includes(o)&&console.warn("Jupiter swap program instruction 'create_program_open_orders' not implemented"),[232,242,197,253,240,143,129,52].includes(o)&&console.warn("Jupiter swap program instruction 'create_token_ledger' not implemented"),[147,241,123,100,244,132,174,118].includes(o)&&console.warn("Jupiter swap program instruction 'create_token_account' not implemented"),[229,23,203,151,122,227,173,42].includes(o)&&console.warn("Jupiter swap program instruction 'route' not implemented"),[150,86,71,116,167,93,14,104].includes(o)&&console.warn("Jupiter swap program instruction 'route_with_token_ledger' not implemented"),[228,85,185,112,78,79,77,2].includes(o)&&console.warn("Jupiter swap program instruction 'set_token_ledger' not implemented"),[230,121,143,80,119,159,106,170].includes(o)&&console.warn("Jupiter swap program instruction 'shared_accounts_route_with_token_ledger' not implemented"),Error(`Jupiter swap program instruction type ${o} not supported`)}const pt={component:()=>{let{data:t,onUserCloseViaDialogOrKeybindRef:e,setModalData:g,navigate:h}=s(),{client:y,closePrivyModal:w,walletProxy:k,showFiatPrices:b}=m(),v=u(),{user:A}=c(),I=V()(t?.standardSignAndSendTransaction?.chain??"solana:mainnet"),[S,j]=a(t?.standardSignAndSendTransaction?.transaction),[C,T]=a(),[O,x]=a(),[q,M]=a({value:0n,isLoading:!1}),[U,H]=a(!1),[z,G]=a({}),[X,Y]=a(),K=t?.standardSignAndSendTransaction?.account,N=!!t?.standardSignAndSendTransaction?.signOnly,Q=K?.imported?l(A).find((t=>t.address===K.address)):d(A),{solPrice:tt,isSolPriceLoading:nt}=p({enabled:b}),at=r((()=>{if(!C)return;let t=C.spender,n=E(C.fee),e=E(q.value,3,!0),a=C.instructions.filter((t=>["sol-transfer","spl-transfer","raydium-swap-base-input","raydium-swap-base-output","jupiter-swap-shared-accounts-route","jupiter-swap-exact-out-route"].includes(t.type))),r=a.at(0);if(!r||a.length>1)return{fee:n,spender:t,balance:e};if("sol-transfer"===r.type)return{fee:n,spender:t,balance:e,total:E(r.value)};if("spl-transfer"===r.type)return{fee:n,spender:t,balance:e,total:`${i({amount:r.value,decimals:r.token.decimals})} ${r.token.symbol}`};if("raydium-swap-base-input"===r.type&&r.tokenIn&&r.tokenOut){return{fee:n,spender:t,balance:e,swap:`${`${i({amount:r.amountIn,decimals:r.tokenIn.decimals})} ${r.tokenIn.symbol}`} → ${`${i({amount:r.minimumAmountOut,decimals:r.tokenOut.decimals})} ${r.tokenOut.symbol}`}`}}if("raydium-swap-base-output"===r.type&&r.tokenIn&&r.tokenOut){return{fee:n,spender:t,balance:e,swap:`${`${i({amount:r.maxAmountIn,decimals:r.tokenIn.decimals})} ${r.tokenIn.symbol}`} → ${`${i({amount:r.amountOut,decimals:r.tokenOut.decimals})} ${r.tokenOut.symbol}`}`}}if("jupiter-swap-shared-accounts-route"===r.type&&r.tokenIn&&r.tokenOut){return{fee:n,spender:t,balance:e,swap:`${`${i({amount:r.inAmount,decimals:r.tokenIn.decimals})} ${r.tokenIn.symbol}`} → ${`${i({amount:r.quotedOutAmount,decimals:r.tokenOut.decimals})} ${r.tokenOut.symbol}`}`}}if("jupiter-swap-exact-out-route"===r.type&&r.tokenIn&&r.tokenOut){return{fee:n,spender:t,balance:e,swap:`${`${i({amount:r.quotedInAmount,decimals:r.tokenIn.decimals})} ${r.tokenIn.symbol}`} → ${`${i({amount:r.outAmount,decimals:r.tokenOut.decimals})} ${r.tokenOut.symbol}`}`}}return{fee:n,spender:t,balance:e}}),[C,K?.address,q]),rt=r((()=>{let t;if(!C||!b||!tt||nt)return;function n(...t){return Z(t.reduce(((t,n)=>t+n),0n),tt??0)}K?.address===C.spender&&(t=n(C.fee));let e=n(q.value),a=C.instructions.filter((t=>"sol-transfer"===t.type||"spl-transfer"===t.type)).at(0);return!a||C.instructions.length>1?{fee:t,balance:e}:"sol-transfer"===a.type?{fee:t,balance:e,total:n(a.value,K?.address===C.spender?C.fee:0n)}:"spl-transfer"===a.type?{fee:t,balance:e,total:`${i({amount:a.value,decimals:a.token.decimals})} ${a.token.symbol}`}:{fee:t,balance:e}}),[C,b,tt,nt,K?.address,q]);if(o((()=>{!async function(){if(S&&y)try{x(void 0);let t=await st({tx:S,solanaClient:I,privyClient:y,checkFunds:!N});T(t)}catch(t){console.error("Failed to prepare transaction",t),x(t)}}()}),[S,I,y,N]),o((()=>{(async function(){if(!K)return;M({value:q.value,isLoading:!0});let{value:t}=await I.rpc.getBalance(K.address,{commitment:"confirmed"}).send();M({value:t??0n,isLoading:!1})})().catch(console.error)}),[C]),!S||!t?.standardSignAndSendTransaction||!K){let e=Error("Invalid transaction request");/*#__PURE__*/return n(f,{error:e,allowlistConfig:v.allowlistConfig,onRetry:()=>{t?.standardSignAndSendTransaction?.onFailure(e),w({shouldCallAuthOnSuccess:!1})}})}let ot=()=>{if(!U)return z.signature||z.signedTransaction?t?.standardSignAndSendTransaction?.onSuccess({signature:z.signature,signedTransaction:z.signedTransaction}):t?.standardSignAndSendTransaction?.onFailure(X??O??Error("User exited the modal before submitting the transaction")),w({shouldCallAuthOnSuccess:!1})};e.current=ot;let it=t.standardSignAndSendTransaction?.uiOptions?.transactionInfo?.contractInfo?.imgUrl?/*#__PURE__*/n("img",{src:t.standardSignAndSendTransaction.uiOptions.transactionInfo.contractInfo.imgUrl,alt:t.standardSignAndSendTransaction.uiOptions.transactionInfo.contractInfo.imgAltText}):null,ct=!!(t.funding&&t.funding.supportedOptions.length>0),lt=!C?.hasFunds&&ct;if(z.signature||z.signedTransaction){let e=C?.instructions.filter((t=>"sol-transfer"===t.type||"spl-transfer"===t.type)),a=1===e?.length?e?.at(0):void 0;/*#__PURE__*/return n(et,{fees:z.fees??0n,onClose:ot,transactionInfo:t.standardSignAndSendTransaction?.uiOptions.transactionInfo,solPrice:tt,receiptHeader:t.standardSignAndSendTransaction?.uiOptions.successHeader,receiptDescription:t.standardSignAndSendTransaction?.uiOptions.successDescription,chain:I.chain,signOnly:N,instruction:"sol-transfer"===a?.type?{to:a.toAccount,amount:a.value}:{to:a?.toAccount||a?.toAta,total:at?.total}})}return X?/*#__PURE__*/n($,{transactionError:X,chainId:I.chain,onClose:ot,chainType:"solana",onRetry:async()=>{Y(void 0);let{value:t}=await I.rpc.getLatestBlockhash().send();var n,e;j((n=S,e=t,P(_().decode(D(n)),(t=>F(t)),(t=>W(e,t)),(t=>B(t)),(t=>new Uint8Array(J().encode(t))))))}}):/*#__PURE__*/n(L,{img:it,title:t.standardSignAndSendTransaction?.uiOptions?.transactionInfo?.title||"Confirm transaction",subtitle:t.standardSignAndSendTransaction?.uiOptions?.description||`${v.name} wants your permission to approve the following transaction.`,cta:lt?"Add funds":t.standardSignAndSendTransaction?.uiOptions?.buttonText||"Approve",instructions:C?.instructions??[],network:"solana:mainnet"==I.chain?"Solana":I.chain.replace("solana:",""),blockExplorerUrl:I.blockExplorerUrl,total:b?rt?.total:at?.total,fee:b?rt?.fee:at?.fee,balance:b?rt?.balance:at?.balance,swap:at?.swap,transactingWalletAddress:K.address,disabled:!C?.hasFunds&&!ct,isSubmitting:U,isPreparing:!C||q.isLoading,isTokenPriceLoading:b&&nt,isMissingFunds:!C?.hasFunds,submitError:X??void 0,isSponsored:!!t.standardSignAndSendTransaction?.isSponsored,parseError:O,onClick:lt?async()=>{if(!K)return;if(!ct)throw Error("Funding wallet is not enabled");let n="FundingMethodSelectionScreen";g({...t,funding:{...t.funding,methodScreen:n},solanaFundingData:t?.solanaFundingData}),h(n)}:async()=>{try{if(H(!0),U||!K||!k||!A||!Q)return;let n=await t.standardSignAndSendTransaction.onConfirm(S);if("signature"in n){let t=await async function({solanaClient:t,signature:n}){let e=R().decode(n),a=await t.rpc.getTransaction(e,{maxSupportedTransactionVersion:0,commitment:"confirmed",encoding:"base64"}).send().catch((()=>null));return a?{fee:a.meta?.fee??0n}:null}({solanaClient:I,signature:n.signature});return void G({...n,fees:t?.fee})}G(n)}catch(t){console.warn({transaction:S,error:t}),Y(t)}finally{H(!1)}},onClose:ot})}};export{pt as StandardSignAndSendTransactionScreen,pt as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useState as t,useEffect as r}from"react";import{a as o,m as i,C as a}from"./index-BZ6FAPh7.mjs";import{u as s,q as n}from"./context-Drt9FC1y.mjs";import{u as l,b as m,k as c}from"./internal-context-Z-fyxadS.mjs";import{u as d,a as u}from"./get-is-unified-wallet-BC-7_b8O.mjs";import{s as p}from"./shouldProceedtoEmbeddedWalletCreationFlow-COZ-_baJ.mjs";import{S as g}from"./ScreenLayout-jvcCZKF1.mjs";import{T as v}from"./telegram-B-JqnkqZ.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-DGV02YBT.mjs";import"zustand";import"styled-components";import"react-device-detect";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"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"@privy-io/are-addresses-equal";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"tinycolor2";import"./ModalHeader-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 y=({success:t,errorMessage:r,onRetry:o})=>{let i=t?"Successfully connected with Telegram":r?r.message:"Verifying connection to Telegram";/*#__PURE__*/return e(g,{title:i,subtitle:t?"You're good to go!":r?r.detail:"Just a few moments more",icon:v,iconVariant:"loading",iconLoadingStatus:{success:t,fail:!!r},secondaryCta:r?.retryable&&o?{label:"Retry",onClick:o}:void 0,watermark:!0})},f={component:()=>{let{authenticated:g,logout:v,ready:f,user:h}=d(),{setModalData:A,navigate:j,resetNavigation:b,data:T}=u(),S=s(),{initLoginWithTelegram:C,loginWithTelegram:w,updateWallets:E,setReadyToTrue:R,closePrivyModal:W,createAnalyticsEvent:_,getAuthMeta:L}=l(),[k,x]=t(!1),[M,I]=t(void 0),D=o();async function N(){try{let e=await async function(){let e;if(!g){if(D.enabled&&"error"===D.status)throw new a(D.error,null,m.CAPTCHA_FAILURE);return D.enabled&&"success"!==D.status&&(D.execute(),e=await D.waitForResult()),e}}();await w({captchaToken:e}),x(!0),R(!0)}catch(e){if(e?.privyErrorCode===m.ALLOWLIST_REJECTED)return I(void 0),b(),void j("AllowlistRejectionScreen");if(e?.privyErrorCode===m.USER_LIMIT_REACHED)return console.error(new c(e).toString()),I(void 0),b(),void j("UserLimitReachedScreen");if(e?.privyErrorCode===m.USER_DOES_NOT_EXIST)return I(void 0),b(),void j("AccountNotFoundScreen");if(e?.privyErrorCode===m.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce)return I(void 0),b(),A({accountTransfer:{nonce:e.data?.data?.nonce,account:e.data?.data?.subject,telegramAuthResult:L()?.telegramAuthResult,telegramWebAppData:L()?.telegramWebAppData,displayName:e.data?.data?.account?.displayName,linkMethod:"telegram",embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress}}),void j("LinkConflictScreen");let{retryable:t,detail:r}=i(e);I({retryable:t,detail:r,message:"Authentication failed"})}}r((()=>{N()}),[]),r((()=>{if(!(f&&g&&k&&h))return;if(S?.legal.requireUsersAcceptTerms&&!h.hasAcceptedTerms){let e=setTimeout((()=>{j("AffirmativeConsentScreen")}),n);return()=>clearTimeout(e)}if(p(h,S.embeddedWallets)){let e=setTimeout((()=>{A({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),_({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,provider:"telegram",screen:"TelegramAuthScreen"}}),v()},callAuthOnSuccessOnClose:!0}}),j("EmbeddedWalletOnAccountCreateScreen")}),n);return()=>clearTimeout(e)}E();let e=setTimeout((()=>W({shouldCallAuthOnSuccess:!0,isSuccess:!0})),n);return()=>clearTimeout(e)}),[f,g,k,h]);/*#__PURE__*/return e(y,{success:k,errorMessage:M,onRetry:M?.retryable?async()=>{try{I(void 0),T?.telegramAuthModalData?.seamlessAuth||await C(void 0,T?.login?.disableSignup),await N()}catch(e){let{retryable:t,detail:r}=i(e);I({retryable:t,detail:r,message:"Authentication failed"})}}:void 0})},isCaptchaRequired:!0,isShownBeforeReady:!0};export{f as TelegramAuthScreen,y as TelegramAuthScreenView,f as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as e,jsx as i,Fragment as t}from"react/jsx-runtime";import{styled as n}from"styled-components";import{P as r,H as l,W as o}from"./WalletLink-
|
|
1
|
+
import{jsxs as e,jsx as i,Fragment as t}from"react/jsx-runtime";import{styled as n}from"styled-components";import{P as r,H as l,W as o}from"./WalletLink-DlGvmqW7.mjs";import{g as d}from"./ethers-UlIaNUWW.mjs";import{F as a}from"./Layouts-BlFm53ED.mjs";import c from"@heroicons/react/24/outline/ChevronDownIcon";import{createContext as s,useState as h,useContext as p}from"react";import{s as v,u}from"./context-Drt9FC1y.mjs";const g=({label:t,children:n,valueStyles:r})=>/*#__PURE__*/e(f,{children:[/*#__PURE__*/i("div",{children:t}),/*#__PURE__*/i(m,{style:{...r},children:n})]});let f=n.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: space-between;
|
|
@@ -13,7 +13,7 @@ import{jsxs as e,jsx as i,Fragment as t}from"react/jsx-runtime";import{styled as
|
|
|
13
13
|
color: var(--privy-color-foreground-2);
|
|
14
14
|
text-align: right;
|
|
15
15
|
}
|
|
16
|
-
`,
|
|
16
|
+
`,m=n.div`
|
|
17
17
|
font-size: 14px;
|
|
18
18
|
line-height: 100%;
|
|
19
19
|
display: flex;
|
|
@@ -22,7 +22,7 @@ import{jsxs as e,jsx as i,Fragment as t}from"react/jsx-runtime";import{styled as
|
|
|
22
22
|
border-radius: var(--privy-border-radius-full);
|
|
23
23
|
background-color: var(--privy-color-background-2);
|
|
24
24
|
padding: 4px 8px;
|
|
25
|
-
`;const
|
|
25
|
+
`;const x=({gas:t,tokenPrice:n,tokenSymbol:l})=>/*#__PURE__*/e(a,{style:{paddingBottom:"12px"},children:[/*#__PURE__*/e(b,{children:[/*#__PURE__*/i(k,{children:"Est. Fees"}),/*#__PURE__*/i("div",{children:/*#__PURE__*/i(r,{weiQuantities:[BigInt(t)],tokenPrice:n,tokenSymbol:l})})]}),n&&/*#__PURE__*/i(w,{children:`${d(BigInt(t),l)}`})]}),y=({value:t,gas:n,tokenPrice:l,tokenSymbol:o})=>{let c=BigInt(t??0)+BigInt(n);/*#__PURE__*/return e(a,{children:[/*#__PURE__*/e(b,{children:[/*#__PURE__*/i(k,{children:"Total (including fees)"}),/*#__PURE__*/i("div",{children:/*#__PURE__*/i(r,{weiQuantities:[BigInt(t||0),BigInt(n)],tokenPrice:l,tokenSymbol:o})})]}),l&&/*#__PURE__*/i(w,{children:d(c,o)})]})};let b=n.div`
|
|
26
26
|
display: flex;
|
|
27
27
|
flex-direction: row;
|
|
28
28
|
justify-content: space-between;
|
|
@@ -101,7 +101,7 @@ return e(t,{children:[/*#__PURE__*/e(F,{onClick:l,"data-open":String(d),children
|
|
|
101
101
|
`,V=n.div`
|
|
102
102
|
transform: ${e=>"true"===e.isactive?"rotate(180deg)":"rotate(0deg)"};
|
|
103
103
|
`;const $=({from:t,to:n,txn:r,transactionInfo:d,tokenPrice:a,gas:c,tokenSymbol:s})=>{let h=BigInt(r?.value||0);/*#__PURE__*/
|
|
104
|
-
return i(S,{...u().render.standalone?{defaultValue:"details"}:{},children:/*#__PURE__*/e(j,{value:"details",children:[/*#__PURE__*/i(B,{children:/*#__PURE__*/e(E,{children:[/*#__PURE__*/i("div",{children:d?.title||"Details"}),/*#__PURE__*/i(H,{children:/*#__PURE__*/i(l,{weiQuantities:[h],tokenPrice:a,tokenSymbol:s})})]})}),/*#__PURE__*/e(T,{children:[/*#__PURE__*/i(g,{label:"From",children:/*#__PURE__*/i(o,{walletAddress:t,chainId:r.chainId||v,chainType:"ethereum"})}),/*#__PURE__*/i(g,{label:"To",children:/*#__PURE__*/i(o,{walletAddress:n,chainId:r.chainId||v,chainType:"ethereum"})}),d&&d.action&&/*#__PURE__*/i(g,{label:"Action",children:d.action}),c&&/*#__PURE__*/i(
|
|
104
|
+
return i(S,{...u().render.standalone?{defaultValue:"details"}:{},children:/*#__PURE__*/e(j,{value:"details",children:[/*#__PURE__*/i(B,{children:/*#__PURE__*/e(E,{children:[/*#__PURE__*/i("div",{children:d?.title||"Details"}),/*#__PURE__*/i(H,{children:/*#__PURE__*/i(l,{weiQuantities:[h],tokenPrice:a,tokenSymbol:s})})]})}),/*#__PURE__*/e(T,{children:[/*#__PURE__*/i(g,{label:"From",children:/*#__PURE__*/i(o,{walletAddress:t,chainId:r.chainId||v,chainType:"ethereum"})}),/*#__PURE__*/i(g,{label:"To",children:/*#__PURE__*/i(o,{walletAddress:n,chainId:r.chainId||v,chainType:"ethereum"})}),d&&d.action&&/*#__PURE__*/i(g,{label:"Action",children:d.action}),c&&/*#__PURE__*/i(x,{value:r.value,gas:c,tokenPrice:a,tokenSymbol:s})]}),/*#__PURE__*/i(A,{children:({isActive:e})=>/*#__PURE__*/i(y,{value:r.value,displayFee:e,gas:c||"0x0",tokenPrice:a,tokenSymbol:s})})]})})};let E=n.div`
|
|
105
105
|
display: flex;
|
|
106
106
|
flex-direction: row;
|
|
107
107
|
justify-content: space-between;
|